Skip to content
GitLab
Explore
Sign in
Pattern Making Softwares
Patro
Compare revisions
a9cb845f0ddc95fafdf46c7d6ecf8e94abda3dcc to 6a4bbc556b10e9c4135191866a509bdab48c5afd
Show whitespace changes
Inline
Side-by-side
doc/sphinx/source/valentina-compatibility/detail-demo.val
0 → 100644
View file @
6a4bbc55
<?xml version="1.0" encoding="UTF-8"?>
<pattern>
<!--Pattern created with Valentina (http://www.valentina-project.org/).-->
<version>
0.4.2
</version>
<unit>
cm
</unit>
<author/>
<description/>
<notes/>
<measurements/>
<increments/>
<draw
name=
"Pattern piece 1"
>
<calculation>
<point
id=
"1"
mx=
"0.132292"
x=
"0.79375"
y=
"1.05833"
name=
"A"
type=
"single"
my=
"0.264583"
/>
<point
id=
"2"
basePoint=
"1"
typeLine=
"hair"
mx=
"0.132292"
length=
"20"
name=
"A1"
lineColor=
"black"
type=
"endLine"
angle=
"0"
my=
"0.264583"
/>
<point
id=
"3"
firstPoint=
"2"
typeLine=
"hair"
mx=
"0.132292"
secondPoint=
"1"
length=
"10"
name=
"A2"
lineColor=
"black"
type=
"normal"
angle=
"0"
my=
"0.264583"
/>
<point
id=
"4"
firstPoint=
"1"
mx=
"0.132292"
secondPoint=
"3"
name=
"A3"
type=
"pointOfIntersection"
my=
"0.264583"
/>
<line
id=
"5"
firstPoint=
"1"
typeLine=
"hair"
secondPoint=
"4"
lineColor=
"black"
/>
<line
id=
"6"
firstPoint=
"4"
typeLine=
"hair"
secondPoint=
"3"
lineColor=
"black"
/>
<point
id=
"12"
firstPoint=
"1"
typeLine=
"none"
mx=
"0.132292"
secondPoint=
"4"
length=
"CurrentLength/2"
name=
"A4"
lineColor=
"black"
type=
"alongLine"
my=
"0.264583"
/>
<point
id=
"13"
firstPoint=
"2"
typeLine=
"none"
mx=
"0.132292"
secondPoint=
"3"
length=
"CurrentLength/2"
name=
"A5"
lineColor=
"black"
type=
"alongLine"
my=
"0.264583"
/>
<point
id=
"17"
firstPoint=
"1"
typeLine=
"none"
mx=
"0.132292"
secondPoint=
"12"
length=
"CurrentLength/2"
name=
"A6"
lineColor=
"black"
type=
"alongLine"
my=
"0.264583"
/>
<point
id=
"18"
firstPoint=
"2"
typeLine=
"none"
mx=
"0.132292"
secondPoint=
"13"
length=
"CurrentLength/2"
name=
"A7"
lineColor=
"black"
type=
"alongLine"
my=
"0.264583"
/>
</calculation>
<modeling>
<point
id=
"7"
idObject=
"1"
inUse=
"true"
mx=
"1.44658"
type=
"modeling"
my=
"-1.70684"
/>
<point
id=
"8"
idObject=
"2"
inUse=
"true"
mx=
"-0.343958"
type=
"modeling"
my=
"-2.91042"
/>
<point
id=
"9"
idObject=
"3"
inUse=
"true"
mx=
"0.132292"
type=
"modeling"
my=
"0.264583"
/>
<point
id=
"10"
idObject=
"4"
inUse=
"true"
mx=
"0.132292"
type=
"modeling"
my=
"0.264583"
/>
<point
id=
"14"
idObject=
"12"
inUse=
"true"
mx=
"0.132292"
type=
"modeling"
my=
"0.264583"
/>
<point
id=
"15"
idObject=
"13"
inUse=
"true"
mx=
"0.132292"
type=
"modeling"
my=
"0.264583"
/>
<path
id=
"16"
typeLine=
"dashDotLine"
name=
"Fold"
type=
"2"
>
<nodes>
<node
idObject=
"14"
type=
"NodePoint"
/>
<node
idObject=
"15"
type=
"NodePoint"
/>
</nodes>
</path>
<point
id=
"19"
idObject=
"17"
type=
"pin"
/>
<point
id=
"20"
idObject=
"18"
type=
"pin"
/>
<point
id=
"21"
idObject=
"1"
type=
"pin"
/>
<point
id=
"22"
idObject=
"4"
type=
"pin"
/>
<point
id=
"23"
idObject=
"3"
type=
"pin"
/>
</modeling>
<details>
<detail
id=
"11"
version=
"2"
forbidFlipping=
"false"
width=
"1"
united=
"false"
mx=
"1.16417"
name=
"Detail"
seamAllowance=
"true"
my=
"-0.582084"
>
<data
letter=
"A"
topLeftPin=
"21"
width=
"26.4567"
mx=
"30"
height=
"94.4882"
bottomRightPin=
"19"
fontSize=
"5"
visible=
"true"
rotation=
"-0.0547782"
my=
"39.9999"
>
<mcp
placement=
"0"
material=
"0"
cutNumber=
"1"
/>
<mcp
placement=
"1"
material=
"1"
cutNumber=
"2"
/>
</data>
<patternInfo
topLeftPin=
"19"
width=
"26.4567"
mx=
"30"
height=
"283.465"
bottomRightPin=
"22"
fontSize=
"5"
visible=
"true"
rotation=
"359.876"
my=
"134.488"
/>
<grainline
arrows=
"0"
mx=
"0"
bottomPin=
"20"
length=
"0"
visible=
"true"
rotation=
" 0"
topPin=
"19"
my=
"0"
/>
<nodes>
<node
idObject=
"7"
type=
"NodePoint"
/>
<node
idObject=
"8"
type=
"NodePoint"
/>
<node
idObject=
"9"
type=
"NodePoint"
/>
<node
idObject=
"10"
type=
"NodePoint"
/>
</nodes>
<iPaths>
<record
path=
"16"
/>
</iPaths>
<pins>
<record>
19
</record>
<record>
20
</record>
<record>
21
</record>
<record>
22
</record>
<record>
23
</record>
</pins>
</detail>
</details>
<groups/>
</draw>
</pattern>
doc/sphinx/source/valentina-compatibility/example.vit
0 → 100644
View file @
6a4bbc55
<?xml version='1.0' encoding='UTF-8'?>
<vit>
<!--Measurements created with Valentina (http://www.valentina-project.org/).-->
<version>
0.3.3
</version>
<read-only>
false
</read-only>
<notes/>
<unit>
cm
</unit>
<pm_system>
998
</pm_system>
<personal>
<family-name>
Doe
</family-name>
<given-name>
John
</given-name>
<birth-date>
1970-01-01
</birth-date>
<gender>
male
</gender>
<email/>
</personal>
<body-measurements>
<m
value=
"46"
name=
"height_knee"
/>
<m
value=
"10"
name=
"height_ankle_high"
/>
<m
value=
"95 "
name=
"bust_circ"
/>
<m
value=
"84"
name=
"waist_circ"
/>
<m
value=
"88"
name=
"highhip_circ"
/>
<m
value=
"96"
name=
"hip_circ"
/>
<m
value=
"(hip_arc_b + hip_with_abdomen_arc_f)"
name=
"hip_circ_with_abdomen"
/>
<m
value=
"(hip_arc_f/2)"
name=
"hip_arc_half_f"
/>
<m
value=
"(hip_circ - hip_arc_f)"
name=
"hip_arc_b"
/>
<m
value=
"0"
name=
"hip_arc_f"
/>
<m
value=
"0"
name=
"hip_with_abdomen_arc_f"
/>
<m
value=
"81"
name=
"leg_crotch_to_floor"
/>
<m
value=
"73"
name=
"@leg_crotch_to_floor_men"
/>
<m
value=
"100"
name=
"leg_waist_side_to_floor"
/>
<m
value=
"54.5"
name=
"leg_thigh_upper_circ"
/>
<m
value=
"50"
name=
"leg_thigh_mid_circ"
/>
<m
value=
"37"
name=
"leg_knee_circ"
/>
<m
value=
"32"
name=
"leg_knee_small_circ"
/>
<m
value=
"37"
name=
"leg_calf_circ"
/>
<m
value=
"21"
name=
"leg_ankle_high_circ"
/>
<m
value=
"24"
name=
"leg_ankle_circ"
/>
<m
value=
"40"
name=
"leg_knee_circ_bent"
/>
<m
value=
"62"
name=
"crotch_length"
/>
<m
value=
"28"
name=
"crotch_length_b"
/>
<m
value=
"(crotch_length - crotch_length_b)"
name=
"crotch_length_f"
/>
<m
value=
"22"
name=
"rise_length_side_sitting"
/>
<m
value=
"26"
name=
"rise_length_diag"
/>
<m
full_name=
"Longeur ourlet bas pantalon"
value=
"10"
description=
"Logueur d'ourlet de bas de pantalon"
name=
"@longeur_ourlet_bas_pantalon"
/>
<m
full_name=
"Largeur de bas de pantalon"
value=
"20"
description=
"*2 ?"
name=
"@largeur_bas_pantalon"
/>
<m
full_name=
"Aisanse au genou"
value=
"6"
description=
"???"
name=
"@aisanse_genou"
/>
<m
value=
"leg_knee_circ+@aisanse_genou"
name=
"@circ_genou_avec_aisance"
/>
<m
full_name=
"Aisance bassin Pantalon plat"
value=
"10"
name=
"@aisance_bassin_pantalon_plat"
/>
<m
full_name=
"Tour bassin avec aisance Pantalon plat"
value=
"hip_circ+@aisance_bassin_pantalon_plat"
name=
"@tour_bassin_avec_aisance_pantalon_plat"
/>
<m
full_name=
"Largeur au genou avec aisance (circ)"
value=
"54"
name=
"@circ_genou_avec_aisance_pantalon_plat"
/>
<m
value=
"4"
name=
"@aisance_taile_pantalon_casual"
/>
<m
full_name=
"Aisance bassin Pantalon casual"
value=
"16"
name=
"@aisance_bassin_pantalon_casual"
/>
<m
value=
"waist_circ+@aisance_taile_pantalon_casual"
name=
"@tour_taille_avec_aisance_pantalon_casual"
/>
<m
full_name=
"Tour bassin avec aisance Pantalon casual"
value=
"hip_circ+@aisance_bassin_pantalon_casual"
name=
"@tour_bassin_avec_aisance_pantalon_casual"
/>
<m
value=
"52"
name=
"@circ_genou_avec_aisance_pantalon_casual"
/>
<m
full_name=
"Largeur de bas de pantalon Casual"
value=
"44"
name=
"@circ_bas_pantalon_casual"
/>
<m
value=
"4"
name=
"@aisance_taile_pantalon_jeans"
/>
<m
full_name=
"Aisance bassin Pantalon jeans"
value=
"8"
name=
"@aisance_bassin_pantalon_jeans"
/>
<m
value=
"waist_circ+@aisance_taile_pantalon_jeans"
name=
"@tour_taille_avec_aisance_pantalon_jeans"
/>
<m
full_name=
"Tour bassin avec aisance Pantalon jeans"
value=
"hip_circ+@aisance_bassin_pantalon_jeans"
name=
"@tour_bassin_avec_aisance_pantalon_jeans"
/>
<m
value=
"44"
name=
"@circ_genou_avec_aisance_pantalon_jeans"
/>
<m
full_name=
"Largeur de bas de pantalon Jeans"
value=
"38"
name=
"@circ_bas_pantalon_jeans"
/>
</body-measurements>
</vit>
doc/sphinx/source/valentina-compatibility/index.rst
0 → 100644
View file @
6a4bbc55
.. _valentina-compatibility-page:
=========================
Valentina Compatibility
=========================
.. warning:: To be completed
To learn more on Valentina format, see the source code:
* src/libs/ifc/schema/pattern/v0.6.2.xsd
* src/libs/ifc/xml/vpatternconverter.cpp
Notice the XSD is not sufficient, there is no complete documentation of the Valentina format.
Math Expressions
================
`QMuParser <http://beltoforion.de/article.php?a=muparser>`_ expressions are translated to Python and evaluated on the fly.
* ...
Measurements
============
Calculations
============
=================================== === ========================================================================================================================
Feature Description
=================================== === ========================================================================================================================
arc/arcWithLength N
arc/simple N
elArc/simple N
line Y Construct a line defined by two points
operation/flippingByAxis N
operation/flippingByLine N
operation/moving N
operation/rotation N
point/alongLine Y Construct a point from two points defining a direction and a length
point/bisector N
point/curveIntersectAxis N
point/cutArc N
point/cutSpline N
point/cutSplinePath N
point/endLine Y Construct a point from a base point and a vector defined by an angle and a length
point/height N
point/lineIntersect Y Construct a point from the intersection of two segments defined by four points
point/lineIntersectAxis N
point/normal Y Construct a point at a distance of the first point on the rotated normal of a line defined by two points
point/pointFromArcAndTangent N
point/pointFromCircleAndTangent N
point/pointOfContact N
point/pointOfIntersection Y Construct a point from the x coordinate of a fist point and the y coordinate of a second point
point/pointOfIntersectionArcs N
point/pointOfIntersectionCircles N
point/pointOfIntersectionCurves N
point/shoulder N
point/single Y Construct a point from coordinate
point/triangle N
point/trueDarts N
spline/cubicBezier N
spline/cubicBezierPath N
spline/pathInteractive N
spline/simpleInteractive Y Construct a quadratic Bezier curve from two extremity points and two control points
=================================== === ========================================================================================================================
Graphic Properties
==================
* line styles
* colors
Detail
======
* ...
Valentina File Examples
=======================
Measurements .vit Example
-------------------------
.. literalinclude:: example.vit
:language: xml
Pattern .val Example
--------------------
.. literalinclude:: operations-demo.val
:language: xml
.. literalinclude:: detail-demo.val
:language: xml
doc/sphinx/source/valentina-compatibility/operations-demo.val
0 → 100644
View file @
6a4bbc55
<?xml version='1.0' encoding='UTF-8'?>
<pattern>
<!--Pattern created with Valentina (http://www.valentina-project.org/).-->
<version>
0.4.0
</version>
<unit>
cm
</unit>
<author/>
<description/>
<notes/>
<measurements/>
<increments/>
<draw
name=
"Pattern piece 1"
>
<calculation>
<point
id=
"1"
mx=
"0.132292"
x=
"0.79375"
y=
"1.05833"
name=
"A"
type=
"single"
my=
"0.264583"
/>
<point
id=
"2"
basePoint=
"1"
typeLine=
"hair"
mx=
"0.132292"
length=
"10"
name=
"X"
lineColor=
"blue"
type=
"endLine"
angle=
"360"
my=
"0.25879"
/>
<point
id=
"4"
firstPoint=
"1"
typeLine=
"hair"
mx=
"-0.0996573"
secondPoint=
"2"
length=
"CurrentLength/2"
name=
"M"
lineColor=
"violet"
type=
"alongLine"
my=
"0.612507"
/>
<point
id=
"5"
firstPoint=
"1"
typeLine=
"hair"
mx=
"0.132292"
secondPoint=
"2"
length=
"Line_A_X"
name=
"Y"
lineColor=
"deeppink"
type=
"normal"
angle=
"0"
my=
"0.264583"
/>
<point
id=
"6"
basePoint=
"1"
typeLine=
"hair"
mx=
"0.132292"
length=
"20"
name=
"An1"
lineColor=
"cornflowerblue"
type=
"endLine"
angle=
"10"
my=
"0.264583"
/>
<point
id=
"7"
basePoint=
"1"
typeLine=
"dotLine"
mx=
"0.529451"
length=
"Line_A_An1"
name=
"An2"
lineColor=
"lime"
type=
"endLine"
angle=
"20"
my=
"-0.690272"
/>
<point
id=
"8"
basePoint=
"1"
typeLine=
"dotLine"
mx=
"0.480216"
length=
"Line_A_An1"
name=
"An3"
lineColor=
"darkBlue"
type=
"endLine"
angle=
"30"
my=
"0.467539"
/>
<point
id=
"9"
basePoint=
"1"
typeLine=
"dashLine"
mx=
"0.190279"
length=
"Line_A_An1"
name=
"An4"
lineColor=
"darkGreen"
type=
"endLine"
angle=
"40"
my=
"0.293577"
/>
<point
id=
"10"
basePoint=
"1"
typeLine=
"dashDotLine"
mx=
"0.161286"
length=
"Line_A_An1"
name=
"An5"
lineColor=
"darkRed"
type=
"endLine"
angle=
"50"
my=
"0.264583"
/>
<point
id=
"11"
basePoint=
"1"
typeLine=
"dashDotDotLine"
mx=
"0.0743047"
length=
"Line_A_An1"
name=
"An6"
lineColor=
"darkviolet"
type=
"endLine"
angle=
"60"
my=
"0.264583"
/>
<point
id=
"12"
firstPoint=
"1"
typeLine=
"none"
mx=
"0.132292"
secondPoint=
"6"
length=
"15"
name=
"C"
lineColor=
"black"
type=
"alongLine"
my=
"0.264583"
/>
<point
id=
"13"
firstPoint=
"2"
thirdPoint=
"5"
typeLine=
"hair"
mx=
"0.132292"
secondPoint=
"1"
length=
"Line_A_X"
name=
"B"
lineColor=
"deepskyblue"
type=
"bisector"
my=
"0.289512"
/>
<point
id=
"14"
firstPoint=
"2"
mx=
"0.132292"
secondPoint=
"5"
name=
"XY"
type=
"pointOfIntersection"
my=
"0.264583"
/>
<line
id=
"15"
firstPoint=
"2"
typeLine=
"hair"
secondPoint=
"14"
lineColor=
"orange"
/>
<line
id=
"16"
firstPoint=
"14"
typeLine=
"hair"
secondPoint=
"5"
lineColor=
"black"
/>
<point
id=
"17"
mx=
"0.132292"
p1Line2=
"2"
p1Line1=
"1"
name=
"I"
type=
"lineIntersect"
my=
"0.264583"
p2Line1=
"12"
p2Line2=
"14"
/>
<point
id=
"18"
basePoint=
"7"
typeLine=
"hair"
mx=
"0.132292"
p2Line=
"14"
name=
"P"
p1Line=
"2"
lineColor=
"mediumseagreen"
type=
"height"
my=
"0.293577"
/>
<point
id=
"19"
radius=
"Line_A_M*3/2"
center=
"4"
firstPoint=
"1"
mx=
"0.132292"
secondPoint=
"5"
name=
"R"
type=
"pointOfContact"
my=
"0.264583"
/>
<point
id=
"20"
basePoint=
"14"
typeLine=
"hair"
mx=
"0.422229"
p2Line=
"1"
name=
"AxAn"
p1Line=
"5"
lineColor=
"goldenrod"
type=
"lineIntersectAxis"
angle=
"150"
my=
"-1.82296"
/>
<point
id=
"21"
typeLine=
"hair"
mx=
"0.799146"
p2Line=
"14"
length=
"Line_X_XY*2"
pShoulder=
"20"
name=
"Sh"
p1Line=
"5"
lineColor=
"lightsalmon"
type=
"shoulder"
my=
"-1.38806"
/>
<line
id=
"22"
firstPoint=
"5"
typeLine=
"hair"
secondPoint=
"20"
lineColor=
"yellow"
/>
<line
id=
"23"
firstPoint=
"6"
typeLine=
"hair"
secondPoint=
"7"
lineColor=
"green"
/>
<point
id=
"24"
basePoint=
"1"
typeLine=
"none"
mx=
"0.132292"
length=
"25"
name=
"At"
lineColor=
"black"
type=
"endLine"
angle=
"90"
my=
"0.227009"
/>
<point
id=
"25"
basePoint=
"24"
typeLine=
"hair"
mx=
"0.132292"
length=
"5"
name=
"Bt"
lineColor=
"black"
type=
"endLine"
angle=
"10"
my=
"0.264583"
/>
<point
id=
"26"
firstPoint=
"25"
typeLine=
"hair"
mx=
"0.132292"
secondPoint=
"24"
length=
"5"
name=
"Ct"
lineColor=
"blue"
type=
"normal"
angle=
"0"
my=
"0.189435"
/>
<point
id=
"27"
firstPoint=
"25"
typeLine=
"none"
mx=
"0.132292"
secondPoint=
"26"
length=
"-Line_Bt_Ct"
name=
"Dt"
lineColor=
"black"
type=
"alongLine"
my=
"0.264583"
/>
<point
id=
"28"
axisP2=
"25"
axisP1=
"24"
firstPoint=
"27"
mx=
"0.847452"
secondPoint=
"26"
name=
"T1"
type=
"triangle"
my=
"1.4024"
/>
<point
id=
"29"
basePoint=
"25"
typeLine=
"none"
mx=
"0.132292"
length=
"Line_Bt_Ct"
name=
"Et"
lineColor=
"black"
type=
"endLine"
angle=
"60"
my=
"0.264583"
/>
<point
id=
"30"
axisP2=
"25"
axisP1=
"24"
firstPoint=
"29"
mx=
"0.79244"
secondPoint=
"26"
name=
"T2"
type=
"triangle"
my=
"-1.55082"
/>
<line
id=
"31"
firstPoint=
"27"
typeLine=
"hair"
secondPoint=
"25"
lineColor=
"blue"
/>
<line
id=
"32"
firstPoint=
"27"
typeLine=
"hair"
secondPoint=
"28"
lineColor=
"blue"
/>
<line
id=
"33"
firstPoint=
"26"
typeLine=
"hair"
secondPoint=
"28"
lineColor=
"blue"
/>
<line
id=
"34"
firstPoint=
"29"
typeLine=
"hair"
secondPoint=
"26"
lineColor=
"darkGreen"
/>
<line
id=
"35"
firstPoint=
"29"
typeLine=
"hair"
secondPoint=
"30"
lineColor=
"darkGreen"
/>
<line
id=
"36"
firstPoint=
"26"
typeLine=
"hair"
secondPoint=
"30"
lineColor=
"darkGreen"
/>
<line
id=
"37"
firstPoint=
"25"
typeLine=
"hair"
secondPoint=
"30"
lineColor=
"black"
/>
<point
id=
"38"
basePoint=
"24"
typeLine=
"none"
mx=
"-1.57309"
length=
"30"
name=
"Ad"
lineColor=
"black"
type=
"endLine"
angle=
"0"
my=
"0.814706"
/>
<point
id=
"39"
basePoint=
"38"
typeLine=
"hair"
mx=
"0.297329"
length=
"20"
name=
"Bd"
lineColor=
"black"
type=
"endLine"
angle=
"30"
my=
"0.319595"
/>
<point
id=
"40"
firstPoint=
"38"
typeLine=
"none"
mx=
"1.23254"
secondPoint=
"39"
length=
"CurrentLength/2"
name=
"Md"
lineColor=
"black"
type=
"alongLine"
my=
"-0.175515"
/>
<point
id=
"41"
firstPoint=
"40"
typeLine=
"hair"
mx=
"0.132292"
secondPoint=
"38"
length=
"10"
name=
"Dd"
lineColor=
"black"
type=
"normal"
angle=
"0"
my=
"0.264583"
/>
<point
id=
"42"
firstPoint=
"40"
typeLine=
"none"
mx=
"0.847452"
secondPoint=
"39"
length=
"5"
name=
"Dd2"
lineColor=
"black"
type=
"alongLine"
my=
"0.154558"
/>
<point
id=
"43"
firstPoint=
"40"
typeLine=
"none"
mx=
"-1.13299"
secondPoint=
"38"
length=
"Line_Md_Dd2"
name=
"Dd1"
lineColor=
"black"
type=
"alongLine"
my=
"1.74992"
/>
<point
id=
"44"
mx2=
"-3.93862"
baseLineP2=
"39"
baseLineP1=
"38"
mx1=
"0.242317"
dartP3=
"42"
name1=
"Td1"
dartP2=
"41"
point2=
"46"
point1=
"45"
name2=
"Td2"
my2=
"-0.175515"
type=
"trueDarts"
my1=
"-2.54104"
dartP1=
"43"
/>
<line
id=
"47"
firstPoint=
"38"
typeLine=
"hair"
secondPoint=
"45"
lineColor=
"blue"
/>
<line
id=
"48"
firstPoint=
"45"
typeLine=
"hair"
secondPoint=
"41"
lineColor=
"blue"
/>
<line
id=
"49"
firstPoint=
"41"
typeLine=
"hair"
secondPoint=
"46"
lineColor=
"blue"
/>
<line
id=
"50"
firstPoint=
"46"
typeLine=
"hair"
secondPoint=
"39"
lineColor=
"blue"
/>
<point
id=
"51"
basePoint=
"24"
typeLine=
"none"
mx=
"-1.46306"
length=
"15"
name=
"Ca1"
lineColor=
"black"
type=
"endLine"
angle=
"90"
my=
"2.07999"
/>
<point
id=
"52"
basePoint=
"51"
typeLine=
"none"
mx=
"0.187304"
length=
"20"
name=
"Cb1"
lineColor=
"black"
type=
"endLine"
angle=
"30"
my=
"0.264583"
/>
<spline
id=
"53"
angle2=
"138.403"
length2=
"14.0301"
angle1=
"329.987"
length1=
"18.2062"
point4=
"52"
type=
"simpleInteractive"
point1=
"51"
color=
"blue"
/>
<point
id=
"54"
spline=
"53"
mx=
"0.196818"
length=
"10"
name=
"Cl1"
type=
"cutSpline"
my=
"0.264583"
/>
<point
id=
"55"
basePoint=
"51"
typeLine=
"hair"
mx=
"0.906609"
length=
"10"
name=
"Ca2"
lineColor=
"darkGreen"
type=
"endLine"
angle=
"50"
my=
"0.522689"
/>
<point
id=
"56"
basePoint=
"52"
typeLine=
"hair"
mx=
"0.132292"
length=
"5"
name=
"Cb2"
lineColor=
"darkGreen"
type=
"endLine"
angle=
"280"
my=
"0.200057"
/>
<spline
id=
"57"
duplicate=
"1"
point4=
"52"
point2=
"55"
point3=
"56"
type=
"cubicBezier"
point1=
"51"
color=
"goldenrod"
/>
<point
id=
"58"
basePoint=
"52"
typeLine=
"hair"
mx=
"0.132292"
length=
"15"
name=
"Cc1"
lineColor=
"black"
type=
"endLine"
angle=
"-30"
my=
"0.264583"
/>
<spline
id=
"59"
type=
"pathInteractive"
color=
"violet"
>
<pathPoint
angle2=
"333.352"
length2=
"25.9685"
length1=
"0"
angle1=
"153.352"
pSpline=
"51"
/>
<pathPoint
angle2=
"82.712"
length2=
"15.9887"
length1=
"9.36267"
angle1=
"262.712"
pSpline=
"52"
/>
<pathPoint
angle2=
"254.923"
length2=
"1.78344"
length1=
"7.70133"
angle1=
"74.9232"
pSpline=
"58"
/>
</spline>
<point
id=
"60"
mx=
"0.132292"
splinePath=
"59"
length=
"20"
name=
"CI2"
type=
"cutSplinePath"
my=
"0.264583"
/>
<point
id=
"61"
basePoint=
"58"
typeLine=
"hair"
mx=
"0.132292"
length=
"10"
name=
"Cd1"
lineColor=
"black"
type=
"endLine"
angle=
"40"
my=
"0.264583"
/>
<point
id=
"63"
basePoint=
"61"
typeLine=
"hair"
mx=
"0.132292"
length=
"10"
name=
"Ce1"
lineColor=
"black"
type=
"endLine"
angle=
"-50"
my=
"0.264583"
/>
<point
id=
"64"
basePoint=
"63"
typeLine=
"hair"
mx=
"0.132292"
length=
"15"
name=
"Cf1"
lineColor=
"black"
type=
"endLine"
angle=
"70"
my=
"0.264583"
/>
<point
id=
"65"
basePoint=
"64"
typeLine=
"hair"
mx=
"0.132292"
length=
"10"
name=
"Cg1"
lineColor=
"black"
type=
"endLine"
angle=
"-80"
my=
"0.264583"
/>
<spline
id=
"66"
type=
"cubicBezierPath"
color=
"deepskyblue"
>
<pathPoint
pSpline=
"51"
/>
<pathPoint
pSpline=
"52"
/>
<pathPoint
pSpline=
"58"
/>
<pathPoint
pSpline=
"61"
/>
<pathPoint
pSpline=
"63"
/>
<pathPoint
pSpline=
"64"
/>
<pathPoint
pSpline=
"65"
/>
</spline>
<point
id=
"67"
mx=
"0.971135"
curve1=
"59"
vCrossPoint=
"1"
curve2=
"66"
hCrossPoint=
"1"
name=
"Ci1"
type=
"pointOfIntersectionCurves"
my=
"-3.86511"
/>
<point
id=
"68"
basePoint=
"64"
typeLine=
"hair"
mx=
"0.583977"
name=
"Cax1"
lineColor=
"blue"
type=
"curveIntersectAxis"
angle=
"10"
curve=
"59"
my=
"-3.15532"
/>
<point
id=
"71"
basePoint=
"51"
typeLine=
"none"
mx=
"0.132292"
length=
"40"
name=
"A3"
lineColor=
"black"
type=
"endLine"
angle=
"70"
my=
"0.264583"
/>
<arc
id=
"72"
radius=
"10"
angle2=
"-30"
center=
"71"
angle1=
"30"
type=
"simple"
color=
"black"
/>
<point
id=
"73"
mx=
"-3.79185"
length=
"30"
arc=
"72"
name=
"Cl3"
type=
"cutArc"
my=
"1.41311"
/>
<point
id=
"76"
basePoint=
"71"
typeLine=
"none"
mx=
"0.132292"
length=
"15"
name=
"A4"
lineColor=
"black"
type=
"endLine"
angle=
"0"
my=
"0.264583"
/>
<arc
id=
"77"
radius=
"10"
angle2=
"280"
center=
"76"
angle1=
"10"
type=
"simple"
color=
"black"
/>
<point
id=
"78"
firstArc=
"72"
mx=
"-1.39908"
secondArc=
"77"
crossPoint=
"1"
name=
"Ci2"
type=
"pointOfIntersectionArcs"
my=
"2.65735"
/>
<point
id=
"79"
c1Center=
"71"
mx=
"0.132292"
crossPoint=
"1"
c1Radius=
"15"
name=
"Ci3"
c2Radius=
"18"
type=
"pointOfIntersectionCircles"
my=
"0.264583"
c2Center=
"76"
/>
<point
id=
"80"
basePoint=
"79"
typeLine=
"hair"
mx=
"-0.729105"
name=
"Ci4"
lineColor=
"black"
type=
"curveIntersectAxis"
angle=
"120"
curve=
"72"
my=
"-4.42524"
/>
<point
id=
"81"
tangent=
"80"
mx=
"-2.93045"
cRadius=
"3"
cCenter=
"71"
crossPoint=
"1"
name=
"Cp1"
type=
"pointFromCircleAndTangent"
my=
"-2.70245"
/>
<line
id=
"82"
firstPoint=
"80"
typeLine=
"hair"
secondPoint=
"81"
lineColor=
"blue"
/>
<point
id=
"83"
basePoint=
"76"
typeLine=
"none"
mx=
"0.132292"
length=
"15"
name=
"A5"
lineColor=
"black"
type=
"endLine"
angle=
"45"
my=
"0.264583"
/>
<point
id=
"84"
tangent=
"83"
mx=
"-1.30337"
crossPoint=
"1"
arc=
"77"
name=
"Ctan"
type=
"pointFromArcAndTangent"
my=
"1.79596"
/>
<line
id=
"85"
firstPoint=
"83"
typeLine=
"hair"
secondPoint=
"84"
lineColor=
"blue"
/>
<arc
id=
"86"
radius=
"10"
center=
"83"
angle1=
"45"
length=
"30"
type=
"arcWithLength"
color=
"black"
/>
<elArc
id=
"87"
angle2=
"300"
center=
"83"
radius2=
"15"
rotationAngle=
"60"
radius1=
"10"
angle1=
"30"
type=
"simple"
color=
"lime"
/>
<point
id=
"88"
basePoint=
"1"
typeLine=
"none"
mx=
"-1.93185"
length=
"50"
name=
"A6"
lineColor=
"black"
type=
"endLine"
angle=
"0"
my=
"0.69914"
/>
<point
id=
"89"
basePoint=
"88"
typeLine=
"none"
mx=
"1.00141"
length=
"10"
name=
"A7"
lineColor=
"black"
type=
"endLine"
angle=
"0"
my=
"0.0473046"
/>
<point
id=
"90"
basePoint=
"89"
typeLine=
"none"
mx=
"0.132292"
length=
"10"
name=
"A8"
lineColor=
"black"
type=
"endLine"
angle=
"120"
my=
"0.264583"
/>
<line
id=
"91"
firstPoint=
"88"
typeLine=
"hair"
secondPoint=
"90"
lineColor=
"blue"
/>
<point
id=
"92"
basePoint=
"90"
typeLine=
"hair"
mx=
"0.132292"
p2Line=
"88"
name=
"A1"
p1Line=
"89"
lineColor=
"black"
type=
"height"
my=
"0.264583"
/>
<point
id=
"93"
basePoint=
"88"
typeLine=
"hair"
mx=
"0.132292"
p2Line=
"90"
name=
"A2"
p1Line=
"89"
lineColor=
"black"
type=
"height"
my=
"0.264583"
/>
<point
id=
"94"
mx=
"-7.24225"
p1Line2=
"90"
p1Line1=
"88"
name=
"A9"
type=
"lineIntersect"
my=
"-4.21798"
p2Line1=
"93"
p2Line2=
"92"
/>
<line
id=
"96"
firstPoint=
"88"
typeLine=
"hair"
secondPoint=
"89"
lineColor=
"blue"
/>
<line
id=
"97"
firstPoint=
"89"
typeLine=
"hair"
secondPoint=
"90"
lineColor=
"blue"
/>
<operation
id=
"101"
center=
"94"
suffix=
"rot"
type=
"rotation"
angle=
"30"
>
<source>
<item
idObject=
"88"
/>
<item
idObject=
"89"
/>
<item
idObject=
"90"
/>
</source>
<destination>
<item
idObject=
"102"
mx=
"-0.193626"
my=
"0.738642"
/>
<item
idObject=
"103"
mx=
"1.08041"
my=
"-1.1576"
/>
<item
idObject=
"104"
mx=
"-2.53431"
my=
"-3.68593"
/>
</destination>
</operation>
<line
id=
"105"
firstPoint=
"102"
typeLine=
"hair"
secondPoint=
"103"
lineColor=
"deeppink"
/>
<line
id=
"106"
firstPoint=
"103"
typeLine=
"hair"
secondPoint=
"104"
lineColor=
"deeppink"
/>
<line
id=
"107"
firstPoint=
"104"
typeLine=
"hair"
secondPoint=
"102"
lineColor=
"deeppink"
/>
<operation
id=
"108"
suffix=
"mir"
p2Line=
"89"
p1Line=
"88"
type=
"flippingByLine"
>
<source>
<item
idObject=
"90"
/>
</source>
<destination>
<item
idObject=
"109"
mx=
"0.132292"
my=
"0.264583"
/>
</destination>
</operation>
<operation
id=
"110"
center=
"89"
suffix=
"mir2"
axisType=
"1"
type=
"flippingByAxis"
>
<source>
<item
idObject=
"88"
/>
<item
idObject=
"90"
/>
</source>
<destination>
<item
idObject=
"111"
mx=
"0.132292"
my=
"0.264583"
/>
<item
idObject=
"112"
mx=
"0.132292"
my=
"0.264583"
/>
</destination>
</operation>
<operation
id=
"113"
suffix=
"mov"
length=
"15"
type=
"moving"
angle=
"160"
>
<source>
<item
idObject=
"88"
/>
</source>
<destination>
<item
idObject=
"114"
mx=
"-1.4973"
my=
"1.56825"
/>
</destination>
</operation>
</calculation>
<modeling/>
<details/>
<groups>
<group
id=
"100"
visible=
"true"
name=
"group1"
>
<item
object=
"91"
tool=
"91"
/>
<item
object=
"96"
tool=
"96"
/>
<item
object=
"97"
tool=
"97"
/>
</group>
</groups>
</draw>
</pattern>
examples/test-measurement.py
View file @
6a4bbc55
...
@@ -7,9 +7,16 @@ Logging.setup_logging()
...
@@ -7,9 +7,16 @@ Logging.setup_logging()
from
pathlib
import
Path
from
pathlib
import
Path
from
Patro.FileFormat.Valentina.Measurements
import
VitFile
from
Patro.FileFormat.Valentina.Measurement
import
VitFile
from
Patro.Measurement.Measurement
import
Measurements
####################################################################################################
####################################################################################################
vit_file
=
VitFile
(
Path
(
'
patterns
'
,
'
measurements.vit
'
))
vit_file
=
VitFile
(
Path
(
'
patterns
'
,
'
measurements.vit
'
))
vit_file
.
measurements
.
dump
()
# vit_file.measurements.dump()
yaml_path
=
Path
(
'
output
'
,
'
measurements.yaml
'
)
vit_file
.
measurements
.
save_as_yaml
(
yaml_path
)
measurements
=
Measurements
()
measurements
.
load_yaml
(
yaml_path
)
measurements
.
dump
()
examples/test-pattern.py
View file @
6a4bbc55
...
@@ -7,6 +7,10 @@ Logging.setup_logging()
...
@@ -7,6 +7,10 @@ Logging.setup_logging()
from
Patro.FileFormat.Valentina.Pattern
import
ValFile
from
Patro.FileFormat.Valentina.Pattern
import
ValFile
from
Patro.GraphicEngine.Painter.Paper
import
PaperSize
from
Patro.GraphicEngine.Painter.Paper
import
PaperSize
from
Patro.GraphicEngine.Painter.DxfPainter
import
DxfPainter
from
Patro.GraphicEngine.Painter.MplPainter
import
MplPainter
from
Patro.GraphicEngine.Painter.PdfPainter
import
PdfPainter
from
Patro.GraphicEngine.Painter.SvgPainter
import
SvgPainter
from
Patro.GraphicEngine.Painter.TexPainter
import
TexPainter
from
Patro.GraphicEngine.Painter.TexPainter
import
TexPainter
####################################################################################################
####################################################################################################
...
@@ -30,14 +34,30 @@ val_file.write(output.joinpath('write-test.val'))
...
@@ -30,14 +34,30 @@ val_file.write(output.joinpath('write-test.val'))
scene
=
pattern
.
detail_scene
()
scene
=
pattern
.
detail_scene
()
tex_path
=
output
.
joinpath
(
'
pattern-a0.tex
'
)
# tex_path = output.joinpath('pattern-a0.tex')
# paper = PaperSize('a0', 'portrait', 10)
# tex_painter = TexPainter(str(tex_path), scene, paper)
# tex_painter.add_detail_figure()
# tex_painter._document.write()
# tex_path = output.joinpath('pattern-a4.tex')
# paper = PaperSize('a4', 'portrait', 10)
# tex_painter = TexPainter(str(tex_path), scene, paper)
# tex_painter.add_tiled_detail_figure()
# tex_painter._document.write()
# paper = PaperSize('a0', 'portrait', 10)
# mpl_painter = MplPainter(scene, paper)
# mpl_painter.show()
# paper = PaperSize('a0', 'portrait', 10)
# pdf_path = output.joinpath('pattern-a0-reportlab.pdf')
# pdf_painter = PdfPainter(pdf_path, scene, paper, driver='reportlab')
# paper = PaperSize('a0', 'portrait', 10)
# svg_path = output.joinpath('pattern-a0.svg')
# svg_painter = SvgPainter(svg_path, scene, paper)
paper
=
PaperSize
(
'
a0
'
,
'
portrait
'
,
10
)
paper
=
PaperSize
(
'
a0
'
,
'
portrait
'
,
10
)
tex_painter
=
TexPainter
(
str
(
tex_path
),
scene
,
paper
)
dxf_path
=
output
.
joinpath
(
'
pattern.dxf
'
)
tex_painter
.
add_detail_figure
()
dxf_painter
=
DxfPainter
(
dxf_path
,
scene
,
paper
)
tex_painter
.
_document
.
write
()
tex_path
=
output
.
joinpath
(
'
pattern-a4.tex
'
)
paper
=
PaperSize
(
'
a4
'
,
'
portrait
'
,
10
)
tex_painter
=
TexPainter
(
str
(
tex_path
),
scene
,
paper
)
tex_painter
.
add_tiled_detail_figure
()
tex_painter
.
_document
.
write
()
examples/test-standard-measurements.py
0 → 100644
View file @
6a4bbc55
####################################################################################################
#
# Patro - A Python library to make patterns for fashion design
# Copyright (C) 2018 Fabrice Salvaire
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
####################################################################################################
####################################################################################################
from
Patro.Measurement.StandardMeasurement
import
ValentinaStandardMeasurement
####################################################################################################
valentina_measurement
=
ValentinaStandardMeasurement
()
valentina_measurement
.
dump
()
examples/test-svg-import.py
0 → 100644
View file @
6a4bbc55
####################################################################################################
from
pathlib
import
Path
from
Patro.Common.Logging
import
Logging
Logging
.
setup_logging
()
from
Patro.FileFormat.Svg.SvgFile
import
SvgFile
####################################################################################################
svg_file
=
SvgFile
(
Path
(
'
patterns
'
,
'
veravenus-little-bias-dress.pattern-a0.svg
'
))
requirements.txt
View file @
6a4bbc55
IntervalArithmetic
IntervalArithmetic
PyYAML
astunparse
astunparse
ezdxf
lxml
lxml
matplotlib
numpy
numpy
reportlab
sympy
setup_data.py
View file @
6a4bbc55
...
@@ -79,7 +79,7 @@ setup_dict = dict(
...
@@ -79,7 +79,7 @@ setup_dict = dict(
author_email
=
'
fabrice.salvaire@orange.fr
'
,
author_email
=
'
fabrice.salvaire@orange.fr
'
,
description
=
'
A Python library to make pattern for fashion design
'
,
description
=
'
A Python library to make pattern for fashion design
'
,
license
=
'
GPLv3
'
,
license
=
'
GPLv3
'
,
keywords
=
'
pattern making drafting digitising digitizing sewing fashion design garment cloth valentina seamly
'
,
keywords
=
'
pattern making drafting digitising digitizing sewing fashion design garment cloth valentina seamly
svg latex tikz geometry engine cad
'
,
url
=
'
https://github.com/FabriceSalvaire/Patro
'
,
url
=
'
https://github.com/FabriceSalvaire/Patro
'
,
long_description
=
long_description
,
long_description
=
long_description
,
)
)
tools/extract-measurements
0 → 100755
View file @
6a4bbc55
#! /usr/bin/env python
# -*- Python -*-
####################################################################################################
#
# PyValentina - A Python implementation of Valentina Pattern Drafting Software
# Copyright (C) 2018 Salvaire Fabrice
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
####################################################################################################
####################################################################################################
from
pathlib
import
Path
import
yaml
import
argparse
import
json
####################################################################################################
parser
=
argparse
.
ArgumentParser
(
description
=
'
Extract Valentina Measurement
'
)
parser
.
add_argument
(
'
valentina_path
'
,
metavar
=
'
ValentinaPath
'
,
help
=
'
Valentina source path
'
)
args
=
parser
.
parse_args
()
####################################################################################################
TOPICS
=
{
'
A
'
:
'
Direct Height
'
,
'
B
'
:
'
Direct Width
'
,
'
C
'
:
'
Indentation
'
,
'
D
'
:
'
Circumference and Arc
'
,
'
E
'
:
'
Vertical
'
,
'
F
'
:
'
Horizontal
'
,
'
G
'
:
'
Bust
'
,
'
H
'
:
'
Balance
'
,
'
I
'
:
'
Arm
'
,
'
J
'
:
'
Leg
'
,
'
K
'
:
'
Crotch and Rise
'
,
'
L
'
:
'
Hand
'
,
'
M
'
:
'
Foot
'
,
'
N
'
:
'
Head
'
,
'
O
'
:
'
Men & Tailoring
'
,
'
P
'
:
'
Historical & Specialty
'
,
'
Q
'
:
'
Patternmaking measurements
'
,
}
####################################################################################################
cpp_file
=
Path
(
args
.
valentina_path
).
joinpath
(
'
src
'
,
'
libs
'
,
'
vpatterndb
'
,
'
vtranslatemeasurements.cpp
'
)
# m = translate("VTranslateMeasurements", "height",
# "Name in a formula. Don't use math symbols and space in name!!!!");
# g = translate("VTranslateMeasurements", "Height: Total", "Full measurement name.");
# d = translate("VTranslateMeasurements", "Vertical distance from crown of head to floor.",
# "Full measurement description.");
# InitMeasurement(height_M, m, g, d, "A01");
codes
=
{}
names
=
{}
complete
=
False
with
open
(
cpp_file
,
'
r
'
)
as
fh
:
offset
=
len
(
'
m = translate(
"
VTranslateMeasurements
"
,
"'
)
for
line
in
fh
.
readlines
():
line
=
line
.
strip
()
if
line
.
startswith
(
'
m =
'
):
i
=
line
.
find
(
'"'
,
offset
)
name
=
line
[
offset
:
i
]
elif
line
.
startswith
(
'
g =
'
):
i
=
line
.
find
(
'"'
,
offset
)
full_name
=
line
[
offset
:
i
]
elif
line
.
startswith
(
'
d =
'
):
i
=
line
.
find
(
'"'
,
offset
)
if
i
!=
-
1
:
description
=
line
[
offset
:
i
]
else
:
description
=
''
complete
=
True
if
not
line
.
endswith
(
'
,
'
):
complete
=
True
elif
line
.
startswith
(
'
InitMeasurement
'
):
complete
=
False
i
=
line
.
find
(
'"'
)
+
1
if
i
:
j
=
line
.
find
(
'"'
,
i
)
code
=
line
[
i
:
j
]
description
=
description
.
replace
(
'
\\
"'
,
'"'
)
# measurements[code] = dict(name=name, full_name=full_name, description=description)
data
=
[
name
,
full_name
,
description
,
0
]
codes
[
code
]
=
data
names
[
name
]
=
data
elif
complete
:
# ", "Full
i
=
line
.
find
(
'"
Full measurement description.
"'
)
if
i
==
-
1
:
description
+=
line
[
1
:
-
2
]
elif
i
>
0
:
description
+=
line
[
1
:
i
-
3
]
complete
=
False
####################################################################################################
vit_file
=
Path
(
args
.
valentina_path
).
joinpath
(
'
src
'
,
'
app
'
,
'
share
'
,
'
tables
'
,
'
templates
'
,
'
template_all_measurements.vit
'
)
with
open
(
vit_file
,
'
r
'
)
as
fh
:
# <m name="height" value="0"/>
offset
=
len
(
'
<m name=
"'
)
for
line
in
fh
.
readlines
():
line
=
line
.
strip
()
if
line
.
startswith
(
'
<m
'
):
i
=
line
.
find
(
'"'
,
offset
)
name
=
line
[
offset
:
i
]
j
=
line
.
find
(
'"'
,
i
+
1
)
+
1
k
=
line
.
find
(
'"'
,
j
)
value
=
line
[
j
:
k
]
if
name
not
in
names
:
raise
NameError
(
'
{} is missing
'
.
format
(
name
))
if
value
!=
'
0
'
:
if
value
.
startswith
(
'
(
'
):
value
=
value
[
1
:
-
1
]
names
[
name
][
3
]
=
value
####################################################################################################
# Merge topics
data
=
{
topic
:{
'
description
'
:
description
,
'
measurements
'
:{}}
for
topic
,
description
in
TOPICS
.
items
()}
for
code
,
code_dict
in
codes
.
items
():
letter
=
code
[
0
]
data
[
letter
][
'
measurements
'
][
code
]
=
code_dict
#print(json.dumps(data, indent=True))
print
(
yaml
.
dump
(
data
,
default_flow_style
=
False
,
width
=
160
))
Prev
1
2
3
4
Next