Skip to content

Python module API

Generated from py/python/dry/__init__.py using Python AST extraction.

Values and aliases

NameKindValue
Boundstype aliasUnion[Sequence[Sequence[Number]], str]
Kinematicstype aliasMapping[str, Number]
Metricstype aliasDict[str, Any]
Numbertype aliasUnion[int, float]
Optype aliasDict[str, Any]
Pointtype aliasSequence[Number]
PRINTERSconstantDict[str, ResolveParams]
Rangetype aliasUnion[Sequence[Number], str]
Reporttype aliasDict[str, Any]
ResolveParamstype aliasMapping[str, Number]
Toolpathtype aliasDict[str, Any]
TpmsOptionstype aliasMapping[str, Any]
TPMS_SURFACESconstantTuple[str, ...]

Functions

FunctionSignatureSampleSummary
tpms_gcodedef tpms_gcode(options: Optional[TpmsOptions], printer: str = 'generic', relative_e: bool = True, travel_g1_e0: bool = False, five_axis: bool = False, rotary_axes: str = 'ab', kinematics: Optional[str] = None) -> List[str]GenerativeGenerate TPMS infill g-code (a list of lines) from an options dict.

tpms_gcode

Generative rendered preview
Sample: GenerativeGenerate TPMS-style infill paths from structured options.typescript: docs/site/examples/generative.ts · python: docs/site/examples/generative.py
py
def tpms_gcode(options: Optional[TpmsOptions], printer: str = 'generic', relative_e: bool = True, travel_g1_e0: bool = False, five_axis: bool = False, rotary_axes: str = 'ab', kinematics: Optional[str] = None) -> List[str]

Parameters

ParameterAnnotationDefaultRequired
optionsOptional[TpmsOptions]Yes
printerstr'generic'No
relative_eboolTrueNo
travel_g1_e0boolFalseNo
five_axisboolFalseNo
rotary_axesstr'ab'No
kinematicsOptional[str]NoneNo

Returns: List[str]

Generate TPMS infill g-code (a list of lines) from an options dict.

options is the TPMS option bundle with camelCase keys (matching the engine / TS SDK), e.g. {"surface": "schwarz-p", "cellSize": 12, "cellsX": 2}. The surface is one of TPMS_SURFACES (default "gyroid"); an unknown name raises ValueError. The field math runs in the engine (libm), so output differs sub-micron from the TypeScript generator — there is no byte-identity contract between them.

rotary_axes is the rotary-axes selector (the ab/ac/bc STRING) for 5-axis emit — NOT the machine motion-limits object. kinematics is a deprecated alias for rotary_axes, kept for backward compatibility; when provided (not None) it takes precedence.