Solid.toSTEP()
July 1, 2026 ยท View on GitHub
Serializes the current solid to a triangulated STEP string.
Signature
solid.toSTEP(name = solid.name || 'part', options = {})
Usage
const step = solid.toSTEP('part', {
unit: 'millimeter',
precision: 6,
scale: 1,
applyWorldTransform: true
});
Parameters
name(string | undefined, defaultsolid.name || 'part') - Product/part name written into the STEP file. Passingundefinedlets the exporter use the solid name fallback.options(object, optional) - STEP exporter settings.
Options
unit(string, default'millimeter') - Length unit recorded in the STEP representation context.precision(number, default6) - Decimal precision for generated STEP numeric values.scale(number, default1) - Multiplier applied to exported vertex coordinates.applyWorldTransform(boolean, defaulttrue) - Applies the solid'smatrixWorldduring export when it is not identity.mergePlanarFaces(boolean, defaulttrue) - Groups coplanar triangles into larger faceted BREP faces when possible.planarNormalTolerance(number, default2e-4) - Normal tolerance used for planar face grouping.planarDistanceTolerance(number, default derived from model bounds) - Plane-distance tolerance used for planar face grouping.useTessellatedFaces(boolean, defaulttrue) - Emits AP242 tessellated-face entities for non-planar regions.exportFaces(boolean, defaulttrue) - Emits face geometry. Disable only for specialized exports.exportEdgesAsPolylines(boolean, defaulttrue) - Emits boundary edges as polyline curves when edge export is enabled.
Returns
string - STEP ISO 10303-21 text for the solid.
Behavior
- Exports the current triangulated mesh through
generateSTEP([solid], options). nameis copied intooptions.namebefore export.- Temporary mesh snapshots are released by the underlying exporter.
Use the options object to control units, precision, scaling, planar merging, and export behavior.