Skip to main content

Conversion

The client.convert endpoint converts STEP/STP files to glTF (.glb). Upload the file first via client.files, then convert it.

Simple conversion

Default settings — just point it at a file:

import { readFile } from "node:fs/promises";

// 1. Upload the STEP file
const data = await readFile("model.step");
const confirmed = await client.files.uploadBytes("model.step", data);

// 2. Convert — polls automatically, returns all downloads
const { downloads } = await client.convert.stepToGltfAndPoll({
stepFileId: confirmed.fileId,
meshPrecision: 0.1,
});

const glb = downloads.find(d => d.format === "glb");
console.log("GLB:", glb?.downloadUrl);

Submit-only (low-level)

const created = await client.convert.stepToGltf({
stepFileId: confirmed.fileId,
});
// Poll manually: client.tasks.poll(created.taskId)

Advanced conversion

Full control over tessellation, naming, coordinate systems, and export options:

const { downloads } = await client.convert.stepToGltfAdvancedAndPoll({
stepFileId: confirmed.fileId,
options: {
// Attribute extraction
readColors: true,
readNames: true,
readMaterials: true,
readLayers: true,
readProps: true,

// Mesh tessellation
meshDeflection: 0.05, // linear deflection (lower = finer)
meshAngle: 0.5, // angular deflection in radians
meshParallel: true, // faster tessellation

// Mesh optimization
faceCountThreshold: 200000, // max triangles before LOD kicks in (-1 to disable)
mergeFaces: true, // merge co-planar faces
splitIndices16: false, // 16-bit indices for compatibility

// glTF output
parallelWrite: true,
embedTextures: true,
forceUVExport: false,

// Naming
nodeNameFormat: "instanceOrProduct",
meshNameFormat: "productOrInstance",

// Transform
transformFormat: "trs", // "compact" | "mat4" | "trs"

// Coordinate system
adjustZtoY: true, // Z-up (CAD) → Y-up (glTF/WebGL)

// Scale
scale: 0.001, // mm to meters
},
});

Available options

OptionTypeDescription
readColorsbooleanExtract color attributes from STEP
readNamesbooleanExtract product/instance names
readMaterialsbooleanExtract material definitions
readLayersbooleanExtract layer/group structure
readPropsbooleanExtract custom properties (part numbers, metadata)
meshDeflectionnumberLinear deflection [0.005, 10] — lower = finer
meshAnglenumberAngular deflection in radians [0.01, π]
meshParallelbooleanParallel tessellation
faceCountThresholdintegerMax triangles before LOD reduction (-1 to disable)
mergeFacesbooleanMerge co-planar adjacent faces
splitIndices16booleanUse 16-bit index buffers (max 65535 vertices per mesh)
parallelWritebooleanParallel glTF file generation
embedTexturesbooleanEmbed texture data in .glb
forceUVExportbooleanGenerate UVs even without textures
nodeNameFormatstringNode naming strategy from STEP labels
meshNameFormatstringMesh naming strategy from STEP labels
transformFormatstring"compact", "mat4", or "trs"
adjustZtoYbooleanConvert Z-up to Y-up
scalenumberUniform scale factor