Pages & Units¶
sewpat.pages
¶
DIN paper-size constants for sewing pattern export.
All dimensions are in mm (the project's internal unit).
Import the namespace constant that matches the target paper size and pass it to
:func:~sewpat.render.export_pattern_svg_mm.
Example
from sewpat.pages import DinA4 print(DinA4.width, DinA4.height) 210.0 297.0
DinA4 = SimpleNamespace(width=(210 * MM), height=(297 * MM))
module-attribute
¶
DinA2 = SimpleNamespace(width=(420 * MM), height=(594 * MM))
module-attribute
¶
DinA1 = SimpleNamespace(width=(594 * MM), height=(841 * MM))
module-attribute
¶
DinA0 = SimpleNamespace(width=(841 * MM), height=(1189 * MM))
module-attribute
¶
sewpat.units
¶
Length unit constants for sewing pattern generation.
All internal coordinates are in millimetres. Use these constants to express measurements in other units and convert them to the base unit (mm).
Example::
from sewpat.units import CM, MM
width = 5 * CM # 50 mm