STEP Assembly Support
Overview
This release focuses on STEP assembly support - a complete toolkit for loading, creating, inspecting, and exporting multi-part CAD assemblies in the browser. You can now work with professional engineering files that contain multiple components, part hierarchies, and color information, all without leaving your web application.
New Features
Assembly Module (occt.assembly)
A new module for working with STEP assembly documents. It's split into two sub-modules:
Manager (occt.assembly.manager)
Build and export assembly documents:
createPart- Define a part with a shape, name, and optional colorcreateAssemblyNode- Create a container node for grouping partscreateInstanceNode- Place a part at a specific position with translation, rotation, and scalecreatePartUpdate- Update an existing part's shape, name, or colorcombineStructure- Combine parts and nodes into a complete assembly structurebuildAssemblyDocument- Build the XCAF document from a structure definitionloadStepToDoc- Load a STEP file into an OCCT document (supports STEP-Z compression)setLabelColor- Change a label's color in an existing documentsetLabelName- Rename a label in an existing documentexportDocumentToStep- Export to STEP format with optional gzip compressionexportDocumentToGltf- Export to GLTF/GLB format for web viewing
Query (occt.assembly.query)
Inspect and extract data from assembly documents:
getDocumentParts- List all parts and assemblies in a documentgetAssemblyHierarchy- Get the full hierarchy tree with all nodesgetShapeFromLabel- Extract a specific shape by its label (e.g.,0:1:1:3)getLabelColor- Get a label's RGBA color valuesgetLabelTransform- Get an instance's position, rotation, and scalegetLabelInfo- Get detailed metadata about a label (type, flags, children)
IO Enhancements (occt.io)
New methods for STEP-to-GLTF conversion:
convertStepToGltf- Convert STEP files to GLTF/GLB format in a single call. Uses OCCT's native RWGltf_CafWriter for maximum performance with full preservation of hierarchy, names, colors, and transforms.convertStepToGltfAdvanced- Same conversion with fine-grained control over STEP reading options, mesh generation settings, and GLTF export options. Use this for performance tuning.parseStepToJson- Parse a STEP file and return the assembly structure as JSON without full geometry processing. Nice way to inspect what's in a file.
Color Preservation
Standard STEP exports lose color information. This release uses OCCT's XCAF (Extended CAD Application Framework) to embed colors into assembly structures. When you export a colored model from Bitbybit and open it in FreeCAD, the colors are preserved.
Visual Programming Support
All new methods are available as Rete and Blockly components too. The hierarchy preview component shows the assembly tree and lets you click on any item to see its label.
Use Cases
- Load STEP assemblies from CAD software and display them in the browser
- Parse assembly hierarchies to understand part structure and relationships
- Extract individual parts for selective visualization or customization
- Build parametric assemblies from scratch with algorithmic geometry
- Export to GLTF for web viewers, games, or AR applications
- Export to STEP with colors preserved for downstream CAD work
- Create product configurators that generate professional CAD files
Memory Considerations
Large assemblies require significant memory. The standard 32-bit build supports up to 2GB. For complex models, use the 64-bit version which supports up to 16GB.
Documentation
Blog Post
Tutorials
- Introduction to Assemblies - Understand assembly concepts
- Convert STEP to GLTF - Export for web viewing
- Parse Assembly Structure - Navigate and extract parts
- Build and Export Assemblies - Create from scratch
- Export Shapes with Color - Preserve colors in exports