Skip to content

1.0.0-rc.1

Latest

Choose a tag to compare

@matas-bitbybit-dev matas-bitbybit-dev released this 05 Feb 08:19
63dc317

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 color
  • createAssemblyNode - Create a container node for grouping parts
  • createInstanceNode - Place a part at a specific position with translation, rotation, and scale
  • createPartUpdate - Update an existing part's shape, name, or color
  • combineStructure - Combine parts and nodes into a complete assembly structure
  • buildAssemblyDocument - Build the XCAF document from a structure definition
  • loadStepToDoc - Load a STEP file into an OCCT document (supports STEP-Z compression)
  • setLabelColor - Change a label's color in an existing document
  • setLabelName - Rename a label in an existing document
  • exportDocumentToStep - Export to STEP format with optional gzip compression
  • exportDocumentToGltf - 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 document
  • getAssemblyHierarchy - Get the full hierarchy tree with all nodes
  • getShapeFromLabel - Extract a specific shape by its label (e.g., 0:1:1:3)
  • getLabelColor - Get a label's RGBA color values
  • getLabelTransform - Get an instance's position, rotation, and scale
  • getLabelInfo - 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