From fe8552cec11834a8c1e6990ab7693170b3f78734 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi <dismine@gmail.com> Date: Tue, 27 Oct 2020 18:25:03 +0200 Subject: [PATCH] New pattern format version. --- src/libs/ifc/schema.qrc | 1 + src/libs/ifc/schema/pattern/v0.8.9.xsd | 1079 ++++++++++++++++++++++++ src/libs/ifc/xml/vpatternconverter.cpp | 23 +- src/libs/ifc/xml/vpatternconverter.h | 3 +- 4 files changed, 1101 insertions(+), 5 deletions(-) create mode 100644 src/libs/ifc/schema/pattern/v0.8.9.xsd diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc index 22c1f5128..c775ca329 100644 --- a/src/libs/ifc/schema.qrc +++ b/src/libs/ifc/schema.qrc @@ -60,6 +60,7 @@ <file>schema/pattern/v0.8.6.xsd</file> <file>schema/pattern/v0.8.7.xsd</file> <file>schema/pattern/v0.8.8.xsd</file> + <file>schema/pattern/v0.8.9.xsd</file> <file>schema/multisize_measurements/v0.3.0.xsd</file> <file>schema/multisize_measurements/v0.4.0.xsd</file> <file>schema/multisize_measurements/v0.4.1.xsd</file> diff --git a/src/libs/ifc/schema/pattern/v0.8.9.xsd b/src/libs/ifc/schema/pattern/v0.8.9.xsd new file mode 100644 index 000000000..02072e940 --- /dev/null +++ b/src/libs/ifc/schema/pattern/v0.8.9.xsd @@ -0,0 +1,1079 @@ +<?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 name="unit" type="units"/> + <xs:element name="image" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="extension" type="imageExtension"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="patternName" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="patternNumber" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="company" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="customer" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="birthDate" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="email" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="patternLabel" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="line" type="templateLine" minOccurs="0" maxOccurs="unbounded"> + </xs:element> + </xs:sequence> + <xs:attribute name="dateFormat" type="xs:string"/> + <xs:attribute name="timeFormat" type="xs:string"/> + </xs:complexType> + </xs:element> + <xs:element name="watermark" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="patternMaterials" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="material" minOccurs="0" maxOccurs="20"> + <xs:complexType> + <xs:attribute name="number" type="userMaterialType" use="required"/> + <xs:attribute name="name" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="finalMeasurements" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element name="finalMeasurment" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="description" type="xs:string"/> + <xs:attribute name="name" type="shortName" use="required"/> + <xs:attribute name="formula" type="xs:string" use="required"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="measurements" type="xs:string"/> + <xs:element name="increments"> + <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"/> + <xs:attribute name="name" type="shortName" use="required"/> + <xs:attribute name="formula" type="xs:string"/> + <xs:attribute name="type" type="incrementType"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="previewCalculations"> + <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"/> + <xs:attribute name="name" type="shortName" use="required"/> + <xs:attribute name="formula" type="xs:string"/> + <xs:attribute name="type" type="incrementType"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </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 name="x" type="xs:double"/> + <xs:attribute name="y" type="xs:double"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="name" type="shortName"/> + <xs:attribute name="firstPoint" type="xs:unsignedInt"/> + <xs:attribute name="secondPoint" type="xs:unsignedInt"/> + <xs:attribute name="thirdPoint" type="xs:unsignedInt"/> + <xs:attribute name="basePoint" type="xs:unsignedInt"/> + <xs:attribute name="pShoulder" type="xs:unsignedInt"/> + <xs:attribute name="p1Line" type="xs:unsignedInt"/> + <xs:attribute name="p2Line" type="xs:unsignedInt"/> + <xs:attribute name="length" type="xs:string"/> + <xs:attribute name="angle" type="xs:string"/> + <xs:attribute name="typeLine" type="linePenStyle"/> + <xs:attribute name="splinePath" type="xs:unsignedInt"/> + <xs:attribute name="spline" type="xs:unsignedInt"/> + <xs:attribute name="p1Line1" type="xs:unsignedInt"/> + <xs:attribute name="p1Line2" type="xs:unsignedInt"/> + <xs:attribute name="p2Line1" type="xs:unsignedInt"/> + <xs:attribute name="p2Line2" type="xs:unsignedInt"/> + <xs:attribute name="center" type="xs:unsignedInt"/> + <xs:attribute name="radius" type="xs:string"/> + <xs:attribute name="axisP1" type="xs:unsignedInt"/> + <xs:attribute name="axisP2" type="xs:unsignedInt"/> + <xs:attribute name="arc" type="xs:unsignedInt"/> + <xs:attribute name="elArc" type="xs:unsignedInt"/> + <xs:attribute name="curve" type="xs:unsignedInt"/> + <xs:attribute name="curve1" type="xs:unsignedInt"/> + <xs:attribute name="curve2" type="xs:unsignedInt"/> + <xs:attribute name="lineColor" type="colors"/> + <xs:attribute name="color" type="colors"/> + <xs:attribute name="firstArc" type="xs:unsignedInt"/> + <xs:attribute name="secondArc" type="xs:unsignedInt"/> + <xs:attribute name="crossPoint" type="crossType"/> + <xs:attribute name="vCrossPoint" type="crossType"/> + <xs:attribute name="hCrossPoint" type="crossType"/> + <xs:attribute name="c1Center" type="xs:unsignedInt"/> + <xs:attribute name="c2Center" type="xs:unsignedInt"/> + <xs:attribute name="c1Radius" type="xs:string"/> + <xs:attribute name="c2Radius" type="xs:string"/> + <xs:attribute name="cRadius" type="xs:string"/> + <xs:attribute name="tangent" type="xs:unsignedInt"/> + <xs:attribute name="cCenter" type="xs:unsignedInt"/> + <xs:attribute name="name1" type="shortName"/> + <xs:attribute name="mx1" type="xs:double"/> + <xs:attribute name="my1" type="xs:double"/> + <xs:attribute name="name2" type="shortName"/> + <xs:attribute name="mx2" type="xs:double"/> + <xs:attribute name="my2" type="xs:double"/> + <xs:attribute name="point1" type="xs:unsignedInt"/> + <xs:attribute name="point2" type="xs:unsignedInt"/> + <xs:attribute name="dartP1" type="xs:unsignedInt"/> + <xs:attribute name="dartP2" type="xs:unsignedInt"/> + <xs:attribute name="dartP3" type="xs:unsignedInt"/> + <xs:attribute name="baseLineP1" type="xs:unsignedInt"/> + <xs:attribute name="baseLineP2" type="xs:unsignedInt"/> + <xs:attribute name="showLabel" type="xs:boolean"/> + <xs:attribute name="showLabel1" type="xs:boolean"/> + <xs:attribute name="showLabel2" type="xs:boolean"/> + <xs:attribute name="notes" type="xs:string"/> + </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 name="firstPoint" type="xs:unsignedInt"/> + <xs:attribute name="secondPoint" type="xs:unsignedInt"/> + <xs:attribute name="typeLine" type="linePenStyle"/> + <xs:attribute name="lineColor" type="colors"/> + <xs:attribute name="notes" type="xs:string"/> + </xs:complexType> + </xs:element> + <xs:element name="operation" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="source" minOccurs="1" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="item" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="idObject" type="xs:unsignedInt" use="required"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="destination" minOccurs="1" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="item" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="idObject" type="xs:unsignedInt" use="required"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="showLabel" type="xs:boolean"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="center" type="xs:unsignedInt"/> + <xs:attribute name="angle" type="xs:string"/> + <xs:attribute name="rotationAngle" type="xs:string"/> + <xs:attribute name="length" type="xs:string"/> + <xs:attribute name="suffix" type="xs:string"/> + <xs:attribute name="type" type="xs:string" use="required"/> + <xs:attribute name="p1Line" type="xs:unsignedInt"/> + <xs:attribute name="p2Line" type="xs:unsignedInt"/> + <xs:attribute name="axisType" type="axisType"/> + <xs:attribute name="notes" type="xs:string"/> + </xs:complexType> + </xs:element> + <xs:element name="arc" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="angle1" type="xs:string"/> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="angle2" type="xs:string"/> + <xs:attribute name="radius" type="xs:string"/> + <xs:attribute name="center" type="xs:unsignedInt"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="color" type="colors"/> + <xs:attribute name="penStyle" type="curvePenStyle"/> + <xs:attribute name="length" type="xs:string"/> + <xs:attribute name="aScale" type="ApproximationScaleType"/> + <xs:attribute name="notes" type="xs:string"/> + </xs:complexType> + </xs:element> + <xs:element name="elArc" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="angle1" type="xs:string"/> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="angle2" type="xs:string"/> + <xs:attribute name="rotationAngle" type="xs:string"/> + <xs:attribute name="radius1" type="xs:string"/> + <xs:attribute name="radius2" type="xs:string"/> + <xs:attribute name="center" type="xs:unsignedInt"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="color" type="colors"/> + <xs:attribute name="penStyle" type="curvePenStyle"/> + <xs:attribute name="length" type="xs:string"/> + <xs:attribute name="aScale" type="ApproximationScaleType"/> + <xs:attribute name="notes" type="xs:string"/> + </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 name="pSpline" type="xs:unsignedInt"/> + <xs:attribute name="angle" type="xs:string"/> + <xs:attribute name="angle1" type="xs:string"/> + <xs:attribute name="angle2" type="xs:string"/> + <xs:attribute name="length1" type="xs:string"/> + <xs:attribute name="length2" type="xs:string"/> + <xs:attribute name="kAsm1" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="kCurve" type="xs:double"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="kAsm1" type="xs:double"/> + <xs:attribute name="kAsm2" type="xs:double"/> + <xs:attribute name="angle1" type="xs:string"/> + <xs:attribute name="angle2" type="xs:string"/> + <xs:attribute name="length1" type="xs:string"/> + <xs:attribute name="length2" type="xs:string"/> + <xs:attribute name="point1" type="xs:unsignedInt"/> + <xs:attribute name="point2" type="xs:unsignedInt"/> + <xs:attribute name="point3" type="xs:unsignedInt"/> + <xs:attribute name="point4" type="xs:unsignedInt"/> + <xs:attribute name="color" type="colors"/> + <xs:attribute name="penStyle" type="curvePenStyle"/> + <xs:attribute name="duplicate" type="xs:unsignedInt"/> + <xs:attribute name="aScale" type="ApproximationScaleType"/> + <xs:attribute name="notes" type="xs:string"/> + </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 name="idObject" type="xs:unsignedInt"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="idTool" type="xs:unsignedInt"/> + <xs:attribute name="inUse" type="xs:boolean"/> + <xs:attribute name="angle" type="xs:string"/> + <xs:attribute name="width" type="xs:string"/> + <xs:attribute name="height" type="xs:string"/> + <xs:attribute name="placeLabelType" type="placeLabelType"/> + <xs:attribute name="showLabel" type="xs:boolean"/> + <xs:attribute name="visible" type="xs:string"/> + <xs:attribute name="checkWidth" type="xs:string"/> + <xs:attribute name="checkHeight" type="xs:string"/> + <xs:attribute name="checkWidthReference" type="checkReference"/> + <xs:attribute name="checkHeightReference" type="checkReference"/> + <xs:attribute name="checkStop" type="cuttingStop"/> + <xs:attribute name="cuttingNumber" type="xs:unsignedInt"/> + <xs:attribute name="cuttingMode" type="cuttingMode"/> + <xs:attribute name="cuttingVelocityReduction" type="velocityReduction"/> + </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 name="idObject" type="xs:unsignedInt"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="idTool" type="xs:unsignedInt"/> + <xs:attribute name="inUse" type="xs:boolean"/> + </xs:complexType> + </xs:element> + <xs:element name="elArc" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="idObject" type="xs:unsignedInt"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="idTool" type="xs:unsignedInt"/> + <xs:attribute name="inUse" type="xs:boolean"/> + </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 name="idObject" type="xs:unsignedInt"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="idTool" type="xs:unsignedInt"/> + <xs:attribute name="inUse" type="xs:boolean"/> + </xs:complexType> + </xs:element> + <xs:element name="path" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="nodes" minOccurs="1" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="node" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required"/> + <xs:attribute name="idObject" type="xs:unsignedInt" use="required"/> + <xs:attribute name="reverse" type="xs:unsignedInt"/> + <xs:attribute name="excluded" type="xs:boolean"/> + <xs:attribute name="softExcluded" type="xs:boolean"/> + <xs:attribute name="bufferSoftExcluded" type="xs:boolean"/> + <xs:attribute name="checkUniqueness" type="xs:boolean"/> + <xs:attribute name="before" type="xs:string"/> + <xs:attribute name="after" type="xs:string"/> + <xs:attribute name="angle" type="nodeAngle"/> + <xs:attribute name="passmark" type="xs:boolean"/> + <xs:attribute name="passmarkLine" type="passmarkLineType"/> + <xs:attribute name="passmarkAngle" type="passmarkAngleType"/> + <xs:attribute name="showSecondPassmark" type="xs:boolean"/> + <xs:attribute name="allowCollapse" type="xs:boolean"/> + <xs:attribute name="checkWidth" type="xs:string"/> + <xs:attribute name="checkHeight" type="xs:string"/> + <xs:attribute name="checkWidthReference" type="checkReference"/> + <xs:attribute name="checkHeightReference" type="checkReference"/> + <xs:attribute name="manualPassmarkLength" type="xs:boolean"/> + <xs:attribute name="passmarkLength" type="xs:string"/> + <xs:attribute name="singlePassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="leftPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="rightPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="builtInPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="singlePassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="leftPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="rightPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="builtInPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="singlePassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="leftPassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="rightPassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="builtInPassmarkCuttingMode" type="cuttingMode"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="type" type="piecePathType"/> + <xs:attribute name="idTool" type="xs:unsignedInt"/> + <xs:attribute name="inUse" type="xs:boolean"/> + <xs:attribute name="name" type="xs:string"/> + <xs:attribute name="typeLine" type="curvePenStyle"/> + <xs:attribute name="cut" type="xs:boolean"/> + <xs:attribute name="visible" type="xs:string"/> + <xs:attribute name="firstToCountour" type="xs:boolean"/> + <xs:attribute name="lastToCountour" type="xs:boolean"/> + <xs:attribute name="cuttingNumber" type="xs:unsignedInt"/> + <xs:attribute name="cuttingVelocityReduction" type="velocityReduction"/> + </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="nodes" minOccurs="1" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="node" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required"/> + <xs:attribute name="idObject" type="xs:unsignedInt" use="required"/> + <xs:attribute name="reverse" type="xs:unsignedInt"/> + <xs:attribute name="excluded" type="xs:boolean"/> + <xs:attribute name="softExcluded" type="xs:boolean"/> + <xs:attribute name="bufferSoftExcluded" type="xs:boolean"/> + <xs:attribute name="checkUniqueness" type="xs:boolean"/> + <xs:attribute name="before" type="xs:string"/> + <xs:attribute name="after" type="xs:string"/> + <xs:attribute name="angle" type="nodeAngle"/> + <xs:attribute name="passmark" type="xs:boolean"/> + <xs:attribute name="passmarkLine" type="passmarkLineType"/> + <xs:attribute name="passmarkAngle" type="passmarkAngleType"/> + <xs:attribute name="showSecondPassmark" type="xs:boolean"/> + <xs:attribute name="allowCollapse" type="xs:boolean"/> + <xs:attribute name="manualPassmarkLength" type="xs:boolean"/> + <xs:attribute name="passmarkLength" type="xs:string"/> + <xs:attribute name="singlePassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="leftPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="rightPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="builtInPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="singlePassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="leftPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="rightPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="builtInPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="singlePassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="leftPassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="rightPassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="builtInPassmarkCuttingMode" type="cuttingMode"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="csa" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="start" type="xs:unsignedInt"/> + <xs:attribute name="path" type="xs:unsignedInt" use="required"/> + <xs:attribute name="end" type="xs:unsignedInt"/> + <xs:attribute name="reverse" type="xs:boolean"/> + <xs:attribute name="includeAs" type="piecePathIncludeType"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="iPaths" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="path" type="xs:unsignedInt" use="required"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="pins" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" type="xs:unsignedInt" minOccurs="1" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="placeLabels" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" type="xs:unsignedInt" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="children" minOccurs="1" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="nodes" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="child" type="xs:unsignedInt" minOccurs="1" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="csa" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="child" type="xs:unsignedInt" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="iPaths" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="child" type="xs:unsignedInt" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="pins" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="child" type="xs:unsignedInt" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="placeLabels" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="child" type="xs:unsignedInt" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="type" type="xs:string"/> + <xs:attribute name="indexD1" type="xs:unsignedInt"/> + <xs:attribute name="indexD2" type="xs:unsignedInt"/> + <xs:attribute name="inUse" type="xs:boolean"/> + <xs:attribute name="version" type="unionVersion"/> + </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="data" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="line" type="templateLine" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + <xs:attribute name="letter" type="xs:string"/> + <xs:attribute name="annotation" type="xs:string"/> + <xs:attribute name="orientation" type="xs:string"/> + <xs:attribute name="rotationWay" type="xs:string"/> + <xs:attribute name="tilt" type="xs:string"/> + <xs:attribute name="foldPosition" type="xs:string"/> + <xs:attribute name="visible" type="xs:boolean"/> + <xs:attribute name="onFold" type="xs:boolean"/> + <xs:attribute name="fontSize" type="xs:unsignedInt"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="width" type="xs:string"/> + <xs:attribute name="height" type="xs:string"/> + <xs:attribute name="rotation" type="xs:string"/> + <xs:attribute name="centerPin" type="xs:unsignedInt"/> + <xs:attribute name="topLeftPin" type="xs:unsignedInt"/> + <xs:attribute name="quantity" type="xs:unsignedInt"/> + <xs:attribute name="bottomRightPin" type="xs:unsignedInt"/> + <xs:attribute name="noBufferMaterial" type="pieceMaterialType"/> + <xs:attribute name="withBufferMaterial" type="pieceMaterialType"/> + <xs:attribute name="bufferMaterial" type="pieceMaterialType"/> + </xs:complexType> + </xs:element> + <xs:element name="patternInfo" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:attribute name="visible" type="xs:boolean"/> + <xs:attribute name="fontSize" type="xs:unsignedInt"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="width" type="xs:string"/> + <xs:attribute name="height" type="xs:string"/> + <xs:attribute name="rotation" type="xs:string"/> + <xs:attribute name="centerPin" type="xs:unsignedInt"/> + <xs:attribute name="topLeftPin" type="xs:unsignedInt"/> + <xs:attribute name="bottomRightPin" type="xs:unsignedInt"/> + </xs:complexType> + </xs:element> + <xs:element name="grainline" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:attribute name="visible" type="xs:boolean"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="length" type="xs:string"/> + <xs:attribute name="rotation" type="xs:string"/> + <xs:attribute name="arrows" type="arrowType"/> + <xs:attribute name="centerPin" type="xs:unsignedInt"/> + <xs:attribute name="topPin" type="xs:unsignedInt"/> + <xs:attribute name="bottomPin" type="xs:unsignedInt"/> + </xs:complexType> + </xs:element> + <xs:element name="nodes" minOccurs="1" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="node" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required"/> + <xs:attribute name="idObject" type="xs:unsignedInt" use="required"/> + <xs:attribute name="reverse" type="xs:unsignedInt"/> + <xs:attribute name="excluded" type="xs:boolean"/> + <xs:attribute name="softExcluded" type="xs:boolean"/> + <xs:attribute name="bufferSoftExcluded" type="xs:boolean"/> + <xs:attribute name="checkUniqueness" type="xs:boolean"/> + <xs:attribute name="before" type="xs:string"/> + <xs:attribute name="after" type="xs:string"/> + <xs:attribute name="angle" type="nodeAngle"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="passmark" type="xs:boolean"/> + <xs:attribute name="passmarkLine" type="passmarkLineType"/> + <xs:attribute name="passmarkAngle" type="passmarkAngleType"/> + <xs:attribute name="showSecondPassmark" type="xs:boolean"/> + <xs:attribute name="allowCollapse" type="xs:boolean"/> + <xs:attribute name="checkWidth" type="xs:string"/> + <xs:attribute name="checkHeight" type="xs:string"/> + <xs:attribute name="checkWidthReference" type="checkReference"/> + <xs:attribute name="checkHeightReference" type="checkReference"/> + <xs:attribute name="checkStop" type="cuttingStop"/> + <xs:attribute name="manualPassmarkLength" type="xs:boolean"/> + <xs:attribute name="passmarkLength" type="xs:string"/> + <xs:attribute name="singlePassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="leftPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="rightPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="builtInPassmarkCuttingStop" type="cuttingStop"/> + <xs:attribute name="singlePassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="leftPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="rightPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="builtInPassmarkCuttingNumber" type="xs:int"/> + <xs:attribute name="singlePassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="leftPassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="rightPassmarkCuttingMode" type="cuttingMode"/> + <xs:attribute name="builtInPassmarkCuttingMode" type="cuttingMode"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="csa" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="start" type="xs:unsignedInt"/> + <xs:attribute name="path" type="xs:unsignedInt" use="required"/> + <xs:attribute name="end" type="xs:unsignedInt"/> + <xs:attribute name="reverse" type="xs:boolean"/> + <xs:attribute name="includeAs" type="piecePathIncludeType"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="iPaths" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" minOccurs="1" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="path" type="xs:unsignedInt" use="required"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="pins" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" type="xs:unsignedInt" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="placeLabels" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="record" type="xs:unsignedInt" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="version" type="pieceVersion"/> + <xs:attribute name="mx" type="xs:double"/> + <xs:attribute name="my" type="xs:double"/> + <xs:attribute name="name" type="xs:string"/> + <xs:attribute name="bufferName" type="xs:string"/> + <xs:attribute name="inLayout" type="xs:boolean"/> + <xs:attribute name="bufferInLayout" type="xs:boolean"/> + <xs:attribute name="forbidFlipping" type="xs:boolean"/> + <xs:attribute name="forceFlipping" type="xs:boolean"/> + <xs:attribute name="width" type="xs:string"/> + <xs:attribute name="bufferVisible" type="xs:string"/> + <xs:attribute name="bufferWidth" type="xs:string"/> + <xs:attribute name="seamAllowance" type="xs:boolean"/> + <xs:attribute name="seamAllowanceBuiltIn" type="xs:boolean"/> + <xs:attribute name="united" type="xs:boolean"/> + <xs:attribute name="closed" type="xs:unsignedInt"/> + <xs:attribute name="hideMainPath" type="xs:boolean"/> + <xs:attribute name="priority" type="piecePriorityType"/> + <xs:attribute name="gravity" type="layoutSideGravityType"/> + <xs:attribute name="cuttingTime" type="cuttingTime"/> + <xs:attribute name="nestTogethWithNext" type="xs:boolean"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="groups" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="group" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="item" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="object" type="xs:unsignedInt"/> + <xs:attribute name="tool" type="xs:unsignedInt"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="id" type="xs:unsignedInt" use="required"/> + <xs:attribute name="name" type="xs:string"/> + <xs:attribute name="visible" type="xs:boolean"/> + <xs:attribute name="tool" type="xs:unsignedInt"/> + <xs:attribute name="tags" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="name" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="readOnly" type="xs:boolean"/> + <xs:attribute name="labelPrefix" type="labelPrefixType"/> + </xs:complexType> + <xs:unique name="incrementName"> + <xs:selector xpath=".//increment"/> + <xs:field xpath="@name"/> + </xs:unique> + <xs:unique name="uniqueDrawName"> + <xs:selector xpath="draw"/> + <xs:field xpath="@name"/> + </xs:unique> + <xs:unique name="uniquePatternMaterialNumber"> + <xs:selector xpath="patternMaterials/material"/> + <xs:field xpath="@number"/> + </xs:unique> + </xs:element> + <xs:simpleType name="shortName"> + <xs:restriction base="xs:string"> + <xs:pattern value="([^\p{Nd}\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;\"]){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-9]{1,}\.[0-9]{1,}\.[0-9]{1,}"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="imageExtension"> + <xs:restriction base="xs:string"> + <xs:enumeration value="PNG"/> + <xs:enumeration value="JPG"/> + <xs:enumeration value="BMP"/> + </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:enumeration value="lightsalmon"/> + <xs:enumeration value="goldenrod"/> + <xs:enumeration value="orange"/> + <xs:enumeration value="deeppink"/> + <xs:enumeration value="violet"/> + <xs:enumeration value="darkviolet"/> + <xs:enumeration value="mediumseagreen"/> + <xs:enumeration value="lime"/> + <xs:enumeration value="deepskyblue"/> + <xs:enumeration value="cornflowerblue"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="linePenStyle"> + <xs:restriction base="xs:string"> + <xs:enumeration value="none"/> + <xs:enumeration value="hair"/> + <xs:enumeration value="dashLine"/> + <xs:enumeration value="dotLine"/> + <xs:enumeration value="dashDotLine"/> + <xs:enumeration value="dashDotDotLine"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="curvePenStyle"> + <xs:restriction base="xs:string"> + <xs:enumeration value="hair"/> + <xs:enumeration value="dashLine"/> + <xs:enumeration value="dotLine"/> + <xs:enumeration value="dashDotLine"/> + <xs:enumeration value="dashDotDotLine"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="crossType"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="1"/> + <xs:enumeration value="2"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="axisType"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="1"/> + <xs:enumeration value="2"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="arrowType"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/> + <!--Both--> + <xs:enumeration value="1"/> + <!--Front--> + <xs:enumeration value="2"/> + <!--Rear--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="pieceVersion"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="1"/> + <!--Old version--> + <xs:enumeration value="2"/> + <!--New version--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="nodeAngle"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/> + <!--by length--> + <xs:enumeration value="1"/> + <!--by points intersections--> + <xs:enumeration value="2"/> + <!--by first edge symmetry--> + <xs:enumeration value="3"/> + <!--by second edge symmetry--> + <xs:enumeration value="4"/> + <!--by first edge right angle--> + <xs:enumeration value="5"/> + <!--by second edge right angle--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="piecePathType"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="1"/> + <!--custom seam allowance--> + <xs:enumeration value="2"/> + <!--internal path--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="piecePathIncludeType"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/> + <!--as main path--> + <xs:enumeration value="1"/> + <!--as custom seam allowance--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="passmarkLineType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="one"/> + <xs:enumeration value="two"/> + <xs:enumeration value="three"/> + <xs:enumeration value="tMark"/> + <xs:enumeration value="vMark"/> + <xs:enumeration value="vMark2"/> + <xs:enumeration value="uMark"/> + <xs:enumeration value="boxMark"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="passmarkAngleType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="straightforward"/> + <xs:enumeration value="bisector"/> + <xs:enumeration value="intersection"/> + <xs:enumeration value="intersectionLeft"/> + <xs:enumeration value="intersectionRight"/> + <xs:enumeration value="intersection2"/> + <xs:enumeration value="intersection2Left"/> + <xs:enumeration value="intersection2Right"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="alignmentType"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/><!--default (no aligns)--> + <xs:enumeration value="1"/><!--aligns with the left edge--> + <xs:enumeration value="2"/><!--aligns with the right edge--> + <xs:enumeration value="4"/><!--Centers horizontally in the available space--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="userMaterialType"> + <xs:restriction base="xs:unsignedInt"> + <xs:minInclusive value="1"/> + <xs:maxInclusive value="20"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="pieceMaterialType"> + <xs:restriction base="xs:unsignedInt"> + <xs:minInclusive value="0"/> + <xs:maxInclusive value="20"/><!--keep syncr with userMaterialType --> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="ApproximationScaleType"> + <xs:restriction base="xs:double"> + <xs:minInclusive value="0"/> + <xs:maxInclusive value="10"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="placeLabelType"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/><!--Segment--> + <xs:enumeration value="1"/><!--Rectangle--> + <xs:enumeration value="2"/><!--Cross--> + <xs:enumeration value="3"/><!--Tshaped--> + <xs:enumeration value="4"/><!--Doubletree--> + <xs:enumeration value="5"/><!--Corner--> + <xs:enumeration value="6"/><!--Triangle--> + <xs:enumeration value="7"/><!--Hshaped--> + <xs:enumeration value="8"/><!--Button--> + <xs:enumeration value="9"/><!--Circle--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="unionVersion"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="1"/> + <!--Old version--> + <xs:enumeration value="2"/> + <!--New version--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="labelPrefixType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="de"/> + <xs:enumeration value="en"/> + <xs:enumeration value="fr"/> + <xs:enumeration value="ru"/> + <xs:enumeration value="uk"/> + <xs:enumeration value="hr"/> + <xs:enumeration value="sr"/> + <xs:enumeration value="bs"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="incrementType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="increment"/> + <xs:enumeration value="separator"/> + <xs:enumeration value="checkWidth"/> + <xs:enumeration value="checkHeight"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="checkReference"> + <xs:restriction base="xs:string"> + <xs:pattern value="[1-9]+[0-9]*<\*>[1-9]+[0-9]*"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="cuttingStop"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/> + <!--No--> + <xs:enumeration value="1"/> + <!--Yes--> + <xs:enumeration value="2"/> + <!--With Confirmation--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="cuttingTime"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/> + <!--Before--> + <xs:enumeration value="1"/> + <!--Together--> + <xs:enumeration value="2"/> + <!--After--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="cuttingMode"> + <xs:restriction base="xs:unsignedInt"> + <xs:enumeration value="0"/> + <!--Draw--> + <xs:enumeration value="1"/> + <!--Cut--> + <xs:enumeration value="2"/> + <!--Punch--> + <xs:enumeration value="3"/> + <!--Drill--> + <xs:enumeration value="4"/> + <!--AuxDrill--> + <xs:enumeration value="5"/> + <!--Quality--> + <xs:enumeration value="6"/> + <!--None--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="velocityReduction"> + <xs:restriction base="xs:int"> + <xs:enumeration value="-1"/> + <!--NONE--> + <xs:enumeration value="5"/> + <!--5%--> + <xs:enumeration value="10"/> + <!--10%--> + <xs:enumeration value="15"/> + <!--15%--> + <xs:enumeration value="20"/> + <!--20%--> + <xs:enumeration value="25"/> + <!--25%--> + <xs:enumeration value="30"/> + <!--30%--> + <xs:enumeration value="35"/> + <!--35%--> + <xs:enumeration value="40"/> + <!--40%--> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="piecePriorityType"> + <xs:restriction base="xs:unsignedInt"> + <xs:minInclusive value="0"/> + <xs:maxInclusive value="99"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="layoutSideGravityType"> + <xs:restriction base="xs:int"> + <xs:enumeration value="-1"/> + <!--Negative--> + <xs:enumeration value="0"/> + <!--Neutral--> + <xs:enumeration value="1"/> + <!--Positive--> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="templateLine"> + <xs:attribute name="text" type="xs:string" use="required"/> + <xs:attribute name="bold" type="xs:boolean"/> + <xs:attribute name="italic" type="xs:boolean"/> + <xs:attribute name="alignment" type="alignmentType"/> + <xs:attribute name="sfIncrement" type="xs:unsignedInt"/> + </xs:complexType> +</xs:schema> diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index a995660a6..a3521fd6a 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -59,8 +59,8 @@ class QDomElement; */ const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.4"); -const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.8.8"); -const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.8.8.xsd"); +const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.8.9"); +const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.8.9.xsd"); //VPatternConverter::PatternMinVer; // <== DON'T FORGET TO UPDATE TOO!!!! //VPatternConverter::PatternMaxVer; // <== DON'T FORGET TO UPDATE TOO!!!! @@ -238,7 +238,8 @@ QString VPatternConverter::XSDSchema(int ver) const std::make_pair(FORMAT_VERSION(0, 8, 5), QStringLiteral("://schema/pattern/v0.8.5.xsd")), std::make_pair(FORMAT_VERSION(0, 8, 6), QStringLiteral("://schema/pattern/v0.8.6.xsd")), std::make_pair(FORMAT_VERSION(0, 8, 7), QStringLiteral("://schema/pattern/v0.8.7.xsd")), - std::make_pair(FORMAT_VERSION(0, 8, 8), CurrentSchema) + std::make_pair(FORMAT_VERSION(0, 8, 8), QStringLiteral("://schema/pattern/v0.8.8.xsd")), + std::make_pair(FORMAT_VERSION(0, 8, 9), CurrentSchema) }; if (schemas.contains(ver)) @@ -491,6 +492,10 @@ void VPatternConverter::ApplyPatches() ValidateXML(XSDSchema(FORMAT_VERSION(0, 8, 8))); Q_FALLTHROUGH(); case (FORMAT_VERSION(0, 8, 8)): + ToV0_8_9(); + ValidateXML(XSDSchema(FORMAT_VERSION(0, 8, 9))); + Q_FALLTHROUGH(); + case (FORMAT_VERSION(0, 8, 9)): break; default: InvalidVersion(m_ver); @@ -508,7 +513,7 @@ void VPatternConverter::DowngradeToCurrentMaxVersion() bool VPatternConverter::IsReadOnly() const { // Check if attribute readOnly was not changed in file format - Q_STATIC_ASSERT_X(VPatternConverter::PatternMaxVer == FORMAT_VERSION(0, 8, 8), + Q_STATIC_ASSERT_X(VPatternConverter::PatternMaxVer == FORMAT_VERSION(0, 8, 9), "Check attribute readOnly."); // Possibly in future attribute readOnly will change position etc. @@ -1159,6 +1164,16 @@ void VPatternConverter::ToV0_8_8() Save(); } +//--------------------------------------------------------------------------------------------------------------------- +void VPatternConverter::ToV0_8_9() +{ + // TODO. Delete if minimal supported version is 0.8.9 + Q_STATIC_ASSERT_X(VPatternConverter::PatternMinVer < FORMAT_VERSION(0, 8, 9), + "Time to refactor the code."); + SetVersion(QStringLiteral("0.8.9")); + Save(); +} + //--------------------------------------------------------------------------------------------------------------------- void VPatternConverter::TagUnitToV0_2_0() { diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 6280b53c8..b973fc7c9 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -53,7 +53,7 @@ public: static const QString PatternMaxVerStr; static const QString CurrentSchema; static Q_DECL_CONSTEXPR const int PatternMinVer = FORMAT_VERSION(0, 1, 4); - static Q_DECL_CONSTEXPR const int PatternMaxVer = FORMAT_VERSION(0, 8, 8); + static Q_DECL_CONSTEXPR const int PatternMaxVer = FORMAT_VERSION(0, 8, 9); protected: virtual int MinVer() const override; @@ -131,6 +131,7 @@ private: void ToV0_8_6(); void ToV0_8_7(); void ToV0_8_8(); + void ToV0_8_9(); void TagUnitToV0_2_0(); void TagIncrementToV0_2_0();