Skip to content

TypeScript generator exports

Procedural generator exports, including TPMS surfaces and options.

NormalizedStarPolygonAlpha

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export interface NormalizedStarPolygonAlpha

Normalized alpha angle and regime classification for a lattice family.

Fields

FieldTypeRequiredSummary
inputDegnumberYesCaller-provided alpha angle in degrees.
effectiveDegnumberYesMirrored/effective alpha angle in degrees.
mirroredbooleanYesWhether the input angle was mirrored around the uniqueness limit.
regimeStarPolygonRegimeYesClassified geometric regime.

normalizeStarPolygonAlpha

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export function normalizeStarPolygonAlpha(family: StarPolygonFamily, alphaDeg: number): NormalizedStarPolygonAlpha

Normalize an alpha angle into its effective value and geometric regime.

Parameters

ParameterTypeDefaultRequired
familyStarPolygonFamilyYes
alphaDegnumberYes

Returns: NormalizedStarPolygonAlpha

STAR_POLYGON_FAMILIES

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export const STAR_POLYGON_FAMILIES: Record<StarPolygonFamily, StarPolygonFamilySpec>

Metadata catalog for the supported star-polygon lattice families.

StarPolygonBasis

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export type StarPolygonBasis = 'triangular' | 'square'

Base tiling used by a star-polygon lattice family.

starPolygonDentRadiusRatio

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export function starPolygonDentRadiusRatio(starSides: number, alphaDeg: number): number

Ratio of dent radius to star-point radius for an equiangular/equilateral star n-gon. At alphaSPL it equals cos(pi / n); at alphaUL it reaches 1.0.

Parameters

ParameterTypeDefaultRequired
starSidesnumberYes
alphaDegnumberYes

Returns: number

StarPolygonFamily

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export type StarPolygonFamily = 'M1' | 'M2' | 'M3' | 'M4'

Star-polygon lattice family from the original M1-M4 construction.

starPolygonFamilySpec

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export function starPolygonFamilySpec(family: StarPolygonFamily): StarPolygonFamilySpec

Return static metadata for a star-polygon lattice family.

Parameters

ParameterTypeDefaultRequired
familyStarPolygonFamilyYes

Returns: StarPolygonFamilySpec

StarPolygonFamilySpec

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export interface StarPolygonFamilySpec

Static metadata for one star-polygon lattice family.

Fields

FieldTypeRequiredSummary
familyStarPolygonFamilyYesFamily identifier.
topologystringYesHuman-readable topology label.
starSidesnumberYesNumber of star sides in the underlying polygon.
alphaSplDegnumberYesStar-polygon limit angle in degrees.
alphaUlDegnumberYesUniqueness-limit angle in degrees.
basisStarPolygonBasisYesBase tiling used by this family.
isotropicInPlanebooleanYesWhether the family is isotropic in the print plane.

starPolygonLattice

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export function starPolygonLattice(options: StarPolygonLatticeOptions = {}): Design

Generate a fluent Design containing a star-polygon lattice toolpath.

Parameters

ParameterTypeDefaultRequired
optionsStarPolygonLatticeOptions{}No

Returns: Design

starPolygonLatticeOps

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export function starPolygonLatticeOps(options: StarPolygonLatticeOptions = {}): Op[]

Generate Dry L1 authoring operations for a star-polygon lattice.

Parameters

ParameterTypeDefaultRequired
optionsStarPolygonLatticeOptions{}No

Returns: Op[]

StarPolygonLatticeOptions

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export interface StarPolygonLatticeOptions

Options for generating a star-polygon lattice toolpath.

Fields

FieldTypeRequiredSummary
familyStarPolygonFamilyNoPaper lattice sub-family.
alphaDegnumberNoColab star-polygon angle alpha in degrees.
colsnumberNoUnit cells along the print length.
rowsnumberNoUnit cells in the print width.
segLengthnumberNoStrut length in mm.
unitnumberNoBackward-compatible alias for segLength.
layersnumberNoPrinted layers.
layerHeightnumberNoDistance between repeated layers in mm.
z0numberNoFirst layer Z in mm.
startXnumberNoXY start offset.
startYnumberNoDeclared in the public API.
centerXnumberNoBackward-compatible aliases for the old motif-centered generator.
centerYnumberNoDeclared in the public API.
beadWidthnumberNoExtrusion bead geometry in mm.
beadHeightnumberNoDeclared in the public API.
nozzleTempnumberNoProcess settings from the original notebook defaults.
printSpeednumberNoDeclared in the public API.
flownumberNoDeclared in the public API.
sacrificialReturnbooleanNoKeep the three printed return lines that condition the next layer in the original notebook.
completeWidthbooleanNoFor M4, round odd row counts up to an even row-pair width like the original notebook.
outerRadiusRationumberNoDeprecated no-op from the older motif approximation.
includeConnectorsbooleanNoDeprecated no-op from the older motif approximation.

StarPolygonRegime

Source: sdk/ts/src/generators/starPolygonLattice.ts

ts
export type StarPolygonRegime = 'star' | 'star-limit' | 'convex' | 'uniqueness-limit'

Geometric regime after normalizing the input alpha angle.

tpms

Source: sdk/ts/src/generators/tpms.ts

ts
export function tpms(options: TpmsOptions = {}): Design

Generate a fluent Design containing a TPMS toolpath.

Parameters

ParameterTypeDefaultRequired
optionsTpmsOptions{}No

Returns: Design

TPMS_SURFACES

Source: sdk/ts/src/generators/tpms.ts

ts
export const TPMS_SURFACES: Record<TpmsSurface, TpmsSurfaceSpec>

Metadata catalog for all supported TPMS surfaces.

tpmsField

Source: sdk/ts/src/generators/tpms.ts

ts
export function tpmsField(surface: TpmsSurface, x: number, y: number, z: number): number

Sample a surface's nodal field at (x, y, z) — world coordinates already scaled by 2π / cellSize.

Parameters

ParameterTypeDefaultRequired
surfaceTpmsSurfaceYes
xnumberYes
ynumberYes
znumberYes

Returns: number

tpmsOps

Source: sdk/ts/src/generators/tpms.ts

ts
export function tpmsOps(options: TpmsOptions = {}): Op[]

Build the selected TPMS infill as an L1 op list. Delegates generation to the Rust engine so the output is byte-identical to the native CLI / Python SDK (the engine uses libm, not JS Math). Invalid options (unknown surface, budget overrun, …) throw the engine's structured error.

Parameters

ParameterTypeDefaultRequired
optionsTpmsOptions{}No

Returns: Op[]

TpmsOptions

Source: sdk/ts/src/generators/tpms.ts

ts
export interface TpmsOptions

Options for slicing a TPMS scalar field into Dry authoring operations.

Fields

FieldTypeRequiredSummary
surfaceTpmsSurfaceNoSurface family.
isoLevelnumberNoIsosurface value f(x,y,z)=isoLevel.
cellSizenumberNoCubic unit-cell size in mm.
cellsXnumberNoUnit cells along X.
cellsYnumberNoUnit cells along Y.
cellsZnumberNoUnit cells along Z.
samplesPerCellnumberNoXY marching-squares resolution per unit cell.
layerHeightnumberNoLayer height in mm.
z0numberNoFirst layer Z in mm.
centerXnumberNoX coordinate for the generated field origin/center.
centerYnumberNoY coordinate for the generated field origin/center.
beadWidthnumberNoExtrusion bead width in mm.
beadHeightnumberNoExtrusion bead height in mm.
nozzleTempnumberNoNozzle temperature in degrees Celsius.
printSpeednumberNoPrint feedrate in mm/min.
flownumberNoFlow multiplier.
phaseXnumberNoPhase offsets in unit-cell periods, useful for moving seams/features.
phaseYnumberNoDeclared in the public API.
phaseZnumberNoDeclared in the public API.
perimeterbooleanNoAdd a single-wall rectangular perimeter around every sliced layer for infill-style previews.
perimeterInsetnumberNoInset for the generated perimeter in mm.
minPathLengthnumberNoDrop very short stitched contours.
adaptivebooleanNoInsert extra Z slices in intervals that are too tall or change contour topology sharply.
adaptiveMinLayerHeightnumberNoMinimum adaptive layer height in mm.
adaptiveMaxLayerHeightnumberNoMaximum adaptive layer height in mm.
adaptiveMaxLengthDeltanumberNoMaximum tolerated path-length delta before adaptive subdivision.
adaptiveMaxPointDeltanumberNoMaximum tolerated contour point-count delta before adaptive subdivision.
adaptiveMaxDepthnumberNoMaximum recursive adaptive subdivision depth.
maxFieldSamplesnumberNoGuardrail for browser/interactive use.

TpmsSurface

Source: sdk/ts/src/generators/tpms.ts

ts
export type TpmsSurface = | 'gyroid'
  | 'schwarz-p'
  | 'schwarz-d'
  | 'iwp'
  | 'neovius'
  | 'fischer-koch-s'
  | 'fischer-koch-y'
  | 'frd'
  | 'lidinoid'
  | 'split-p'

Supported triply periodic minimal surface names for TPMS generation.

tpmsSurfaceSpec

Source: sdk/ts/src/generators/tpms.ts

ts
export function tpmsSurfaceSpec(surface: TpmsSurface): TpmsSurfaceSpec

Return display metadata for a TPMS surface.

Parameters

ParameterTypeDefaultRequired
surfaceTpmsSurfaceYes

Returns: TpmsSurfaceSpec

TpmsSurfaceSpec

Source: sdk/ts/src/generators/tpms.ts

ts
export interface TpmsSurfaceSpec

Display metadata for a TPMS surface.

Fields

FieldTypeRequiredSummary
surfaceTpmsSurfaceYesStable surface identifier used in options.
labelstringYesHuman-readable surface label.
equationstringYesMathematical field equation shown in reference docs/UI.