New measurement (N08) rise_length_side.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-11-11 16:26:48 +02:00
parent fa822dda24
commit 833c507148
19 changed files with 643 additions and 9 deletions

View File

@ -76,6 +76,7 @@
<file>diagrams/Np2.png</file>
<file>diagrams/Np3.png</file>
<file>diagrams/Np4.png</file>
<file>diagrams/Np5.png</file>
<file>diagrams/Op1.png</file>
<file>diagrams/Op2.png</file>
<file>diagrams/Op3.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -340,6 +340,7 @@ DIAGRAMS += \
$${PWD}/share/resources/diagrams/Np2.png \
$${PWD}/share/resources/diagrams/Np3.png \
$${PWD}/share/resources/diagrams/Np4.png \
$${PWD}/share/resources/diagrams/Np5.png \
$${PWD}/share/resources/diagrams/Op1.png \
$${PWD}/share/resources/diagrams/Op2.png \
$${PWD}/share/resources/diagrams/Op3.png \

View File

@ -6,12 +6,15 @@
<file>schema/pattern/v0.1.3.xsd</file>
<file>schema/pattern/v0.1.4.xsd</file>
<file>schema/pattern/v0.2.0.xsd</file>
<file>schema/pattern/v0.2.1.xsd</file>
<file>schema/standard_measurements/v0.3.0.xsd</file>
<file>schema/standard_measurements/v0.4.0.xsd</file>
<file>schema/standard_measurements/v0.4.1.xsd</file>
<file>schema/standard_measurements/v0.4.2.xsd</file>
<file>schema/individual_measurements/v0.2.0.xsd</file>
<file>schema/individual_measurements/v0.3.0.xsd</file>
<file>schema/individual_measurements/v0.3.1.xsd</file>
<file>schema/individual_measurements/v0.3.2.xsd</file>
<file>schema/individual_measurements/v0.3.3.xsd</file>
</qresource>
</RCC>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="vit">
<xs:complexType>
<xs:sequence>
<xs:element name="version" type="formatVersion"></xs:element>
<xs:element name="read-only" type="xs:boolean"></xs:element>
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="unit" type="units"></xs:element>
<xs:element name="pm_system" type="psCode"></xs:element>
<xs:element name="personal">
<xs:complexType>
<xs:sequence>
<xs:element name="family-name" type="xs:string"></xs:element>
<xs:element name="given-name" type="xs:string"></xs:element>
<xs:element name="birth-date" type="xs:date"></xs:element>
<xs:element name="gender" type="gender"></xs:element>
<xs:element name="email" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="body-measurements">
<xs:complexType>
<xs:sequence>
<xs:element name="m" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="shortName" use="required"></xs:attribute>
<xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="full_name" type="xs:string"></xs:attribute>
<xs:attribute name="description" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="measurementName">
<xs:selector xpath="body-measurements/m"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:simpleType name="shortName">
<xs:restriction base="xs:string">
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\&quot;]){1,1}([^*/^+\-=\s()?%:;!.,`'\&quot;]){0,}$"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="formatVersion">
<xs:restriction base="xs:string">
<xs:pattern value="^(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))$"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="units">
<xs:restriction base="xs:string">
<xs:enumeration value="mm"/>
<xs:enumeration value="cm"/>
<xs:enumeration value="inch"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="gender">
<xs:restriction base="xs:string">
<xs:enumeration value="unknown"/>
<xs:enumeration value="male"/>
<xs:enumeration value="female"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="psCode">
<xs:restriction base="xs:string">
<xs:pattern value="^^(([0-9]|[1-4][0-9]|5[0-4])|998)$"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@ -0,0 +1,329 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- XML Schema Generated from XML Document-->
<xs:element name="pattern">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="version" type="formatVersion"></xs:element>
<xs:element name="unit" type="units"></xs:element>
<xs:element name="author" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="gradation" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="heights">
<xs:complexType>
<xs:attribute name="all" type="xs:boolean" use="required"></xs:attribute>
<xs:attribute name="h92" type="xs:boolean"></xs:attribute>
<xs:attribute name="h98" type="xs:boolean"></xs:attribute>
<xs:attribute name="h104" type="xs:boolean"></xs:attribute>
<xs:attribute name="h110" type="xs:boolean"></xs:attribute>
<xs:attribute name="h116" type="xs:boolean"></xs:attribute>
<xs:attribute name="h122" type="xs:boolean"></xs:attribute>
<xs:attribute name="h128" type="xs:boolean"></xs:attribute>
<xs:attribute name="h134" type="xs:boolean"></xs:attribute>
<xs:attribute name="h140" type="xs:boolean"></xs:attribute>
<xs:attribute name="h146" type="xs:boolean"></xs:attribute>
<xs:attribute name="h152" type="xs:boolean"></xs:attribute>
<xs:attribute name="h158" type="xs:boolean"></xs:attribute>
<xs:attribute name="h164" type="xs:boolean"></xs:attribute>
<xs:attribute name="h170" type="xs:boolean"></xs:attribute>
<xs:attribute name="h176" type="xs:boolean"></xs:attribute>
<xs:attribute name="h182" type="xs:boolean"></xs:attribute>
<xs:attribute name="h188" type="xs:boolean"></xs:attribute>
<xs:attribute name="h194" type="xs:boolean"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="sizes">
<xs:complexType>
<xs:attribute name="all" type="xs:boolean" use="required"></xs:attribute>
<xs:attribute name="s22" type="xs:boolean"></xs:attribute>
<xs:attribute name="s24" type="xs:boolean"></xs:attribute>
<xs:attribute name="s26" type="xs:boolean"></xs:attribute>
<xs:attribute name="s28" type="xs:boolean"></xs:attribute>
<xs:attribute name="s30" type="xs:boolean"></xs:attribute>
<xs:attribute name="s32" type="xs:boolean"></xs:attribute>
<xs:attribute name="s34" type="xs:boolean"></xs:attribute>
<xs:attribute name="s36" type="xs:boolean"></xs:attribute>
<xs:attribute name="s38" type="xs:boolean"></xs:attribute>
<xs:attribute name="s40" type="xs:boolean"></xs:attribute>
<xs:attribute name="s42" type="xs:boolean"></xs:attribute>
<xs:attribute name="s44" type="xs:boolean"></xs:attribute>
<xs:attribute name="s46" type="xs:boolean"></xs:attribute>
<xs:attribute name="s48" type="xs:boolean"></xs:attribute>
<xs:attribute name="s50" type="xs:boolean"></xs:attribute>
<xs:attribute name="s52" type="xs:boolean"></xs:attribute>
<xs:attribute name="s54" type="xs:boolean"></xs:attribute>
<xs:attribute name="s56" type="xs:boolean"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="measurements" type="xs:string"></xs:element>
<xs:element name="increments" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="increment" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="name" type="shortName" use="required"></xs:attribute>
<xs:attribute name="formula" type="xs:string" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="incrementName">
<xs:selector xpath="increment"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:element name="draw" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="calculation" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="point" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="x" type="xs:double"></xs:attribute>
<xs:attribute name="y" type="xs:double"></xs:attribute>
<xs:attribute name="mx" type="xs:double"></xs:attribute>
<xs:attribute name="my" type="xs:double"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="name" type="shortName"></xs:attribute>
<xs:attribute name="firstPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="secondPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="thirdPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="basePoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="pShoulder" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p1Line" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p2Line" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="length" type="xs:string"></xs:attribute>
<xs:attribute name="angle" type="xs:string"></xs:attribute>
<xs:attribute name="typeLine" type="xs:string"></xs:attribute>
<xs:attribute name="splinePath" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="spline" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p1Line1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p1Line2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p2Line1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p2Line2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="center" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="radius" type="xs:string"></xs:attribute>
<xs:attribute name="axisP1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="axisP2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="arc" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="curve" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="lineColor" type="colors"></xs:attribute>
<xs:attribute name="color" type="colors"></xs:attribute>
<xs:attribute name="firstArc" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="secondArc" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="crossPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="c1Center" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="c2Center" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="c1Radius" type="xs:string"></xs:attribute>
<xs:attribute name="c2Radius" type="xs:string"></xs:attribute>
<xs:attribute name="cRadius" type="xs:string"></xs:attribute>
<xs:attribute name="tangent" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="cCenter" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="name1" type="shortName"></xs:attribute>
<xs:attribute name="mx1" type="xs:double"></xs:attribute>
<xs:attribute name="my1" type="xs:double"></xs:attribute>
<xs:attribute name="name2" type="shortName"></xs:attribute>
<xs:attribute name="mx2" type="xs:double"></xs:attribute>
<xs:attribute name="my2" type="xs:double"></xs:attribute>
<xs:attribute name="point1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="point2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="dartP1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="dartP2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="dartP3" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="baseLineP1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="baseLineP2" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="line" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="firstPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="secondPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="typeLine" type="xs:string"></xs:attribute>
<xs:attribute name="lineColor" type="colors"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="angle1" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="angle2" type="xs:string"></xs:attribute>
<xs:attribute name="radius" type="xs:string"></xs:attribute>
<xs:attribute name="center" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="color" type="colors"></xs:attribute>
<xs:attribute name="length" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="spline" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="pathPoint" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="kAsm2" type="xs:string"></xs:attribute>
<xs:attribute name="pSpline" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="angle" type="xs:string"></xs:attribute>
<xs:attribute name="kAsm1" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="kCurve" type="xs:double"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="kAsm1" type="xs:double"></xs:attribute>
<xs:attribute name="kAsm2" type="xs:double"></xs:attribute>
<xs:attribute name="angle1" type="xs:double"></xs:attribute>
<xs:attribute name="angle2" type="xs:double"></xs:attribute>
<xs:attribute name="point1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="point4" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="color" type="colors"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="modeling" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="point" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:double"></xs:attribute>
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
<xs:attribute name="my" type="xs:double"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="idTool" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="idTool" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="spline" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="idTool" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="tools" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="det" minOccurs="2" maxOccurs="2">
<xs:complexType>
<xs:sequence>
<xs:element name="node" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="nodeType" type="xs:string"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:double"></xs:attribute>
<xs:attribute name="my" type="xs:double"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="reverse" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="indexD1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="indexD2" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="details" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="detail" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="node" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="nodeType" type="xs:string"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:double"></xs:attribute>
<xs:attribute name="my" type="xs:double"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="reverse" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="supplement" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:double"></xs:attribute>
<xs:attribute name="my" type="xs:double"></xs:attribute>
<xs:attribute name="width" type="xs:double"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="closed" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="shortName">
<xs:restriction base="xs:string">
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\&quot;]){1,1}([^*/^+\-=\s()?%:;!.,`'\&quot;]){0,}$"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="units">
<xs:restriction base="xs:string">
<xs:enumeration value="mm"/>
<xs:enumeration value="cm"/>
<xs:enumeration value="inch"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="measurementsTypes">
<xs:restriction base="xs:string">
<xs:enumeration value="standard"/>
<xs:enumeration value="individual"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="formatVersion">
<xs:restriction base="xs:string">
<xs:pattern value="^(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))$"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="colors">
<xs:restriction base="xs:string">
<xs:enumeration value="black"/>
<xs:enumeration value="green"/>
<xs:enumeration value="blue"/>
<xs:enumeration value="darkRed"/>
<xs:enumeration value="darkGreen"/>
<xs:enumeration value="darkBlue"/>
<xs:enumeration value="yellow"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="vst">
<xs:complexType>
<xs:sequence>
<xs:element name="version" type="formatVersion"></xs:element>
<xs:element name="read-only" type="xs:boolean"></xs:element>
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="unit" type="units"></xs:element>
<xs:element name="pm_system" type="psCode"></xs:element>
<xs:element name="size">
<xs:complexType>
<xs:attribute name="base" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height">
<xs:complexType>
<xs:attribute name="base" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="body-measurements">
<xs:complexType>
<xs:sequence>
<xs:element name="m" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="shortName" use="required"></xs:attribute>
<xs:attribute name="base" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="full_name" type="xs:string"></xs:attribute>
<xs:attribute name="description" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="measurementName">
<xs:selector xpath="body-measurements/m"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:simpleType name="shortName">
<xs:restriction base="xs:string">
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\&quot;]){1,1}([^*/^+\-=\s()?%:;!.,`'\&quot;]){0,}$"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="units">
<xs:restriction base="xs:string">
<xs:enumeration value="mm"/>
<xs:enumeration value="cm"/>
<xs:enumeration value="inch"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="formatVersion">
<xs:restriction base="xs:string">
<xs:pattern value="^(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))$"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="psCode">
<xs:restriction base="xs:string">
<xs:pattern value="^^(([0-9]|[1-4][0-9]|5[0-4])|998)$"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@ -128,7 +128,7 @@ QMultiMap<QString, QString> VAbstractMConverter::OldNamesToNewNames_InV0_3_0()
names.insert(QStringLiteral("body_armfold_circ"), QStringLiteral("shoulder_girth"));
names.insert(QStringLiteral("body_torso_circ"), QStringLiteral("trunk_length"));
names.insert(QStringLiteral("neck_front_to_waist_f"), QStringLiteral("front_waist_length"));
names.insert(QStringLiteral("neck_front_to_waist_flat"), QStringLiteral("center_front_waist_length"));
names.insert(QStringLiteral("neck_front_to_waist_flat_f"), QStringLiteral("center_front_waist_length"));
names.insert(QStringLiteral("armpit_to_waist_side"), QStringLiteral("side_waist_length"));
names.insert(QStringLiteral("neck_side_to_waist_b"), QStringLiteral("waist_to_neck_side"));
@ -235,3 +235,14 @@ QMultiMap<QString, QString> VAbstractMConverter::OldNamesToNewNames_InV0_3_0()
return names;
}
//---------------------------------------------------------------------------------------------------------------------
QMap<QString, QString> VAbstractMConverter::OldNamesToNewNames_InV0_3_3()
{
// new name, old name
QMap<QString, QString> names;
names.insert(QStringLiteral("rise_length_side_sitting"), QStringLiteral("rise_length_side"));
return names;
}

View File

@ -40,6 +40,7 @@ public:
protected:
void AddRootComment();
static QMultiMap<QString, QString> OldNamesToNewNames_InV0_3_0();
static QMap<QString, QString> OldNamesToNewNames_InV0_3_3();
private:
Q_DISABLE_COPY(VAbstractMConverter)

View File

@ -43,8 +43,8 @@
*/
const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.0");
const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.2.0");
const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.2.0.xsd");
const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.2.1");
const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.2.1.xsd");
//---------------------------------------------------------------------------------------------------------------------
VPatternConverter::VPatternConverter(const QString &fileName)
@ -100,6 +100,8 @@ QString VPatternConverter::XSDSchema(int ver) const
case (0x000104):
return QStringLiteral("://schema/pattern/v0.1.4.xsd");
case (0x000200):
return QStringLiteral("://schema/pattern/v0.2.0.xsd");
case (0x000201):
return CurrentSchema;
default:
{
@ -152,6 +154,13 @@ void VPatternConverter::ApplyPatches()
V_FALLTHROUGH
}
case (0x000200):
{
ToV0_2_1();
const QString schema = XSDSchema(0x000201);
ValidateXML(schema, fileName);
V_FALLTHROUGH
}
case (0x000201):
break;
default:
break;
@ -215,6 +224,14 @@ void VPatternConverter::ToV0_2_0()
Save();
}
//---------------------------------------------------------------------------------------------------------------------
void VPatternConverter::ToV0_2_1()
{
SetVersion(QStringLiteral("0.2.1"));
ConvertMeasurementsToV0_2_1();
Save();
}
//---------------------------------------------------------------------------------------------------------------------
void VPatternConverter::TagUnitToV0_2_0()
{
@ -665,6 +682,17 @@ void VPatternConverter::TagMeasurementsToV0_2_0()
ms.appendChild(newNodeText);
}
//---------------------------------------------------------------------------------------------------------------------
void VPatternConverter::ConvertMeasurementsToV0_2_1()
{
const QMap<QString, QString> names = OldNamesToNewNames_InV0_2_1();
// Structure did not change. We can use the same code.
ConvertPointExpressionsToV0_2_0(names);
ConvertArcExpressionsToV0_2_0(names);
ConvertPathPointExpressionsToV0_2_0(names);
}
//---------------------------------------------------------------------------------------------------------------------
QString VPatternConverter::MUnitV0_1_4() const
{
@ -826,7 +854,7 @@ QMap<QString, QString> VPatternConverter::OldNamesToNewNames_InV0_2_0()
names.insert(QStringLiteral("shoulder_girth"), QStringLiteral("body_armfold_circ"));
names.insert(QStringLiteral("trunk_length"), QStringLiteral("body_torso_circ"));
names.insert(QStringLiteral("front_waist_length"), QStringLiteral("neck_front_to_waist_f"));
names.insert(QStringLiteral("center_front_waist_length"), QStringLiteral("neck_front_to_waist_flat"));
names.insert(QStringLiteral("center_front_waist_length"), QStringLiteral("neck_front_to_waist_flat_f"));
names.insert(QStringLiteral("side_waist_length"), QStringLiteral("armpit_to_waist_side"));
names.insert(QStringLiteral("waist_to_neck_side"), QStringLiteral("neck_side_to_waist_b"));
@ -922,3 +950,14 @@ QMap<QString, QString> VPatternConverter::OldNamesToNewNames_InV0_2_0()
return names;
}
//---------------------------------------------------------------------------------------------------------------------
QMap<QString, QString> VPatternConverter::OldNamesToNewNames_InV0_2_1()
{
// old name, new name
QMap<QString, QString> names;
names.insert(QStringLiteral("rise_length_side"), QStringLiteral("rise_length_side_sitting"));
return names;
}

View File

@ -60,12 +60,15 @@ private:
void ToV0_1_3();
void ToV0_1_4();
void ToV0_2_0();
void ToV0_2_1();
void TagUnitToV0_2_0();
void TagIncrementToV0_2_0();
void ConvertMeasurementsToV0_2_0();
void TagMeasurementsToV0_2_0();
void ConvertMeasurementsToV0_2_1();
QSet<QString> FixIncrementsToV0_2_0();
QString FixIncrementInFormulaToV0_2_0(const QString &formula, const QSet<QString> &names);
void FixPointExpressionsToV0_2_0(const QSet<QString> &names);
@ -83,6 +86,7 @@ private:
QStringList ListPathPointExpressionsV0_1_4() const;
static QMap<QString, QString> OldNamesToNewNames_InV0_2_0();
static QMap<QString, QString> OldNamesToNewNames_InV0_2_1();
};
#endif // VPATTERNCONVERTER_H

View File

@ -40,8 +40,8 @@
*/
const QString VVITConverter::MeasurementMinVerStr = QStringLiteral("0.2.0");
const QString VVITConverter::MeasurementMaxVerStr = QStringLiteral("0.3.2");
const QString VVITConverter::CurrentSchema = QStringLiteral("://schema/individual_measurements/v0.3.2.xsd");
const QString VVITConverter::MeasurementMaxVerStr = QStringLiteral("0.3.3");
const QString VVITConverter::CurrentSchema = QStringLiteral("://schema/individual_measurements/v0.3.3.xsd");
//---------------------------------------------------------------------------------------------------------------------
VVITConverter::VVITConverter(const QString &fileName)
@ -93,6 +93,8 @@ QString VVITConverter::XSDSchema(int ver) const
case (0x000301):
return QStringLiteral("://schema/individual_measurements/v0.3.1.xsd");
case (0x000302):
return QStringLiteral("://schema/individual_measurements/v0.3.2.xsd");
case (0x000303):
return CurrentSchema;
default:
{
@ -131,6 +133,13 @@ void VVITConverter::ApplyPatches()
V_FALLTHROUGH
}
case (0x000302):
{
ToV0_3_3();
const QString schema = XSDSchema(0x000303);
ValidateXML(schema, fileName);
V_FALLTHROUGH
}
case (0x000303):
break;
default:
break;
@ -257,6 +266,34 @@ void VVITConverter::PM_SystemV0_3_2()
parent.insertBefore(pm_system, personal);
}
//---------------------------------------------------------------------------------------------------------------------
void VVITConverter::ConvertMeasurementsToV0_3_3()
{
const QMap<QString, QString> names = OldNamesToNewNames_InV0_3_3();
auto i = names.constBegin();
while (i != names.constEnd())
{
const QDomNodeList nodeList = this->elementsByTagName(QStringLiteral("m"));
if (nodeList.isEmpty())
{
continue;
}
for (int ii = 0; ii < nodeList.size(); ++ii)
{
const QString attrName = QStringLiteral("name");
QDomElement element = nodeList.at(ii).toElement();
const QString name = GetParametrString(element, attrName);
if (name == i.value())
{
SetAttribute(element, attrName, i.key());
}
}
++i;
}
}
//---------------------------------------------------------------------------------------------------------------------
void VVITConverter::ToV0_3_0()
{
@ -282,3 +319,11 @@ void VVITConverter::ToV0_3_2()
PM_SystemV0_3_2();
Save();
}
//---------------------------------------------------------------------------------------------------------------------
void VVITConverter::ToV0_3_3()
{
SetVersion(QStringLiteral("0.3.3"));
ConvertMeasurementsToV0_3_3();
Save();
}

View File

@ -61,10 +61,12 @@ private:
QDomElement AddMV0_3_0(const QString &name, qreal value);
void GenderV0_3_1();
void PM_SystemV0_3_2();
void ConvertMeasurementsToV0_3_3();
void ToV0_3_0();
void ToV0_3_1();
void ToV0_3_2();
void ToV0_3_3();
};
#endif // VVITCONVERTER_H

View File

@ -40,8 +40,8 @@
*/
const QString VVSTConverter::MeasurementMinVerStr = QStringLiteral("0.3.0");
const QString VVSTConverter::MeasurementMaxVerStr = QStringLiteral("0.4.1");
const QString VVSTConverter::CurrentSchema = QStringLiteral("://schema/standard_measurements/v0.4.1.xsd");
const QString VVSTConverter::MeasurementMaxVerStr = QStringLiteral("0.4.2");
const QString VVSTConverter::CurrentSchema = QStringLiteral("://schema/standard_measurements/v0.4.2.xsd");
//---------------------------------------------------------------------------------------------------------------------
VVSTConverter::VVSTConverter(const QString &fileName)
@ -91,6 +91,8 @@ QString VVSTConverter::XSDSchema(int ver) const
case (0x000400):
return QStringLiteral("://schema/standard_measurements/v0.4.0.xsd");
case (0x000401):
return QStringLiteral("://schema/standard_measurements/v0.4.1.xsd");
case (0x000402):
return CurrentSchema;
default:
{
@ -122,6 +124,13 @@ void VVSTConverter::ApplyPatches()
V_FALLTHROUGH
}
case (0x000401):
{
ToV0_4_2();
const QString schema = XSDSchema(0x000402);
ValidateXML(schema, fileName);
V_FALLTHROUGH
}
case (0x000402):
break;
default:
break;
@ -263,6 +272,34 @@ void VVSTConverter::PM_SystemV0_4_1()
parent.insertBefore(pm_system, personal);
}
//---------------------------------------------------------------------------------------------------------------------
void VVSTConverter::ConvertMeasurementsToV0_4_2()
{
const QMap<QString, QString> names = OldNamesToNewNames_InV0_3_3();
auto i = names.constBegin();
while (i != names.constEnd())
{
const QDomNodeList nodeList = this->elementsByTagName(QStringLiteral("m"));
if (nodeList.isEmpty())
{
continue;
}
for (int ii = 0; ii < nodeList.size(); ++ii)
{
const QString attrName = QStringLiteral("name");
QDomElement element = nodeList.at(ii).toElement();
const QString name = GetParametrString(element, attrName);
if (name == i.value())
{
SetAttribute(element, attrName, i.key());
}
}
++i;
}
}
//---------------------------------------------------------------------------------------------------------------------
void VVSTConverter::ToV0_4_0()
{
@ -281,3 +318,11 @@ void VVSTConverter::ToV0_4_1()
PM_SystemV0_4_1();
Save();
}
//---------------------------------------------------------------------------------------------------------------------
void VVSTConverter::ToV0_4_2()
{
SetVersion(QStringLiteral("0.4.2"));
ConvertMeasurementsToV0_4_2();
Save();
}

View File

@ -60,9 +60,11 @@ private:
void ConvertMeasurementsToV0_4_0();
QDomElement AddMV0_4_0(const QString &name, qreal value, qreal sizeIncrease, qreal heightIncrease);
void PM_SystemV0_4_1();
void ConvertMeasurementsToV0_4_2();
void ToV0_4_0();
void ToV0_4_1();
void ToV0_4_2();
};
#endif // VMEASUREMENTCONVERTER_H

View File

@ -264,6 +264,7 @@ const QString riseLengthSideSitting_M = QStringLiteral("rise_length_side_sitting
const QString riseLengthDiag_M = QStringLiteral("rise_length_diag"); // N05
const QString riseLengthB_M = QStringLiteral("rise_length_b"); // N06
const QString riseLengthF_M = QStringLiteral("rise_length_f"); // N07
const QString riseLengthSide_M = QStringLiteral("rise_length_side"); // N08
// O
const QString neckBackToWaistFront_M = QStringLiteral("neck_back_to_waist_front"); // O01
const QString waistToWaistHalter_M = QStringLiteral("waist_to_waist_halter"); // O02
@ -881,7 +882,8 @@ QStringList ListGroupN()
<< riseLengthSideSitting_M // N04
<< riseLengthDiag_M // N05
<< riseLengthB_M // N06
<< riseLengthF_M; // N07
<< riseLengthF_M // N07
<< riseLengthSide_M; // N08
return list;
}
@ -1603,6 +1605,8 @@ QString MapDiagrams(const QString &number)
V_FALLTHROUGH
case 6: // N07
return QStringLiteral("Np4");
case 7: // N08
return QStringLiteral("Np5");
default:
break;
}

View File

@ -420,6 +420,7 @@ extern const QString riseLengthSideSitting_M; // N04
extern const QString riseLengthDiag_M; // N05
extern const QString riseLengthB_M; // N06
extern const QString riseLengthF_M; // N07
extern const QString riseLengthSide_M; // N08
// O
extern const QString neckBackToWaistFront_M; // O01
extern const QString waistToWaistHalter_M; // O02

View File

@ -1852,6 +1852,13 @@ void VTranslateMeasurements::InitGroupN()
"Full measurement description.");
InitMeasurement(riseLengthF_M, m, g, d, "N07");
//=================================================================================================================
m = translate("VTranslateMeasurements", "rise_length_side",
"Name in a formula. Don't use math symbols and space in name!!!!");
g = translate("VTranslateMeasurements", "Rise length, side", "Full measurement name.");
d = translate("VTranslateMeasurements", "Vertical distance from Waist side down to Crotch level. Use formula "
"(Height: Waist side - Leg: Crotch to floor).", "Full measurement description.");
InitMeasurement(riseLengthSide_M, m, g, d, "N08");
//=================================================================================================================
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -334,6 +334,7 @@ void TST_MeasurementRegExp::TestCorrectOrderMeasurement_data()
QTest::newRow("N05") << riseLengthDiag_M << "rise_length_diag";
QTest::newRow("N06") << riseLengthB_M << "rise_length_b";
QTest::newRow("N07") << riseLengthF_M << "rise_length_f";
QTest::newRow("N08") << riseLengthSide_M << "rise_length_side";
QTest::newRow("O01") << neckBackToWaistFront_M << "neck_back_to_waist_front";
QTest::newRow("O02") << waistToWaistHalter_M << "waist_to_waist_halter";
QTest::newRow("O03") << waistNaturalCirc_M << "waist_natural_circ";