Skip to main content

Navigate and Extract Assembly Parts

OCCT category icon with a stylized logo representation

When you need to access individual parts from a STEP file, understanding the assembly structure is key. This tutorial shows you how to explore the hierarchy, find specific parts using their labels, and render them with custom colors.

How the Hierarchy Works

Assemblies organize parts in a tree structure. Each part has:

  • A label (like an address): 0:1:1:3 tells you exactly where the part lives in the structure
  • A name: Human-readable identifier like "Mounting Plate" or "Screw"
  • Properties: Colors, materials, and other metadata

The hierarchy preview component shows this structure visually, making it easy to find the labels you need.

The Workflow

Here's what happens in the examples below:

  1. Fetch the STEP file - Download the compressed CAD model from a URL
  2. Load into a document - Parse the file into an OCCT document structure
  3. Get the hierarchy - Extract the tree structure showing all parts
  4. Preview the hierarchy - Display it so you can see labels and names
  5. Extract shapes by label - Use the labels to get specific parts
  6. Draw with custom styling - Render each part with your chosen colors
Understanding Labels

Labels like 0:1:1:1:6 work like folder paths on your computer. The numbers represent levels in the hierarchy:

  • 0:1 - Root level
  • 0:1:1 - First sub-assembly
  • 0:1:1:1 - Component within that sub-assembly
  • 0:1:1:1:6 - Specific shape within that component

Click on items in the hierarchy preview to see their full labels!

Extract a Single Shape

This first example shows the basic workflow - loading a STEP file and extracting one specific shape using its label.

Bitbybit Platform

Parsing STEP OCCT Assembly Structure

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"e0e94797745b9499": {
"id": "e0e94797745b9499",
"name": "bitbybit.asset.fetchFile",
"customName": "fetch file",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"url": "https://learn.bitbybit.dev/files/3d/Soil-Sensor.stpZ"
},
"inputs": {},
"position": [
447.0390625,
364.58203125
]
},
"824be0f956f86e07": {
"id": "824be0f956f86e07",
"name": "bitbybit.babylon.scene.drawDirectionalLight",
"customName": "draw directional light",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"direction": [
-100,
-100,
-100
],
"intensity": 3,
"diffuse": "#ffffff",
"specular": "#ffffff",
"shadowGeneratorMapSize": 1024,
"enableShadows": true,
"shadowDarkness": 0,
"shadowUsePercentageCloserFiltering": true,
"transparencyShadow": false,
"shadowContactHardeningLightSizeUVRatio": 0.2,
"shadowBias": 0.001,
"shadowNormalBias": 0.02,
"shadowMaxZ": 1000,
"shadowMinZ": 0,
"shadowRefreshRate": 6
},
"inputs": {
"direction": {
"connections": [
{
"node": "1cf530bc3b05cd75",
"output": "result",
"data": {}
}
]
}
},
"position": [
220.90978154060178,
1141.4474910149524
]
},
"a2753a0a68a97354": {
"id": "a2753a0a68a97354",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": -5,
"z": 0
},
"inputs": {},
"position": [
720.7524355897118,
1488.399577959778
]
},
"1cf530bc3b05cd75": {
"id": "1cf530bc3b05cd75",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 100,
"y": -100,
"z": -100
},
"inputs": {},
"position": [
-142.37939449872056,
1144.5669505658402
]
},
"09ff71828df19896": {
"id": "09ff71828df19896",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 70,
"y": 50,
"z": 70
},
"inputs": {},
"position": [
714.6847345665905,
1143.2908329012987
]
},
"d737b03aa186cfde": {
"id": "d737b03aa186cfde",
"name": "bitbybit.babylon.scene.adjustActiveArcRotateCamera",
"customName": "adjust active arc rotate camera",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"position": [
10,
10,
10
],
"lookAt": [
0,
0,
0
],
"lowerBetaLimit": 1,
"upperBetaLimit": 179,
"angularSensibilityX": 1000,
"angularSensibilityY": 1000,
"maxZ": 1000,
"panningSensibility": 1000,
"wheelPrecision": 3
},
"inputs": {
"lookAt": {
"connections": [
{
"node": "a2753a0a68a97354",
"output": "result",
"data": {}
}
]
},
"position": {
"connections": [
{
"node": "09ff71828df19896",
"output": "result",
"data": {}
}
]
}
},
"position": [
1140.4592129965072,
1279.8313039785085
]
},
"6e0425b3ab3715f4": {
"id": "6e0425b3ab3715f4",
"name": "bitbybit.occt.assembly.manager.loadStepToDoc",
"customName": "load step to doc",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"stepData": {
"connections": [
{
"node": "e0e94797745b9499",
"output": "result",
"data": {}
}
]
}
},
"position": [
815.8178400767682,
364.9872279487489
]
},
"ce31b6e5c2308c9c": {
"id": "ce31b6e5c2308c9c",
"name": "bitbybit.previewAssemblyHierarchy",
"customName": "preview occt assembly hierarchy",
"data": {},
"inputs": {
"data": {
"connections": [
{
"node": "a41ed949a48dd353",
"output": "result",
"data": {}
}
]
}
},
"position": [
1568.2992714974453,
402.6559493386362
]
},
"a41ed949a48dd353": {
"id": "a41ed949a48dd353",
"name": "bitbybit.occt.assembly.query.getAssemblyHierarchy",
"customName": "get assembly hierarchy",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
1188.4388314788046,
364.15039486583663
]
},
"4fe2985ce5a35e76": {
"id": "4fe2985ce5a35e76",
"name": "bitbybit.occt.assembly.query.getShapeFromLabel",
"customName": "get shape from label",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"label": "0:1:1:1:6"
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
1178.4270856228939,
8.999238142087234
]
},
"06851fe24453fd5c": {
"id": "06851fe24453fd5c",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "4fe2985ce5a35e76",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "dfaed57ad37e99ee",
"output": "result",
"data": {}
}
]
}
},
"position": [
2673.7673191707004,
12.234165474468261
]
},
"dfaed57ad37e99ee": {
"id": "dfaed57ad37e99ee",
"name": "bitbybit.draw.optionsOcctShape",
"customName": "options occt shape",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"faceOpacity": 1,
"edgeOpacity": 1,
"edgeColour": "#ffffff",
"faceColour": "#ff0000",
"vertexColour": "#ff00ff",
"edgeWidth": 10,
"vertexSize": 0.03,
"drawEdges": true,
"drawFaces": true,
"drawVertices": false,
"precision": 0.1,
"drawEdgeIndexes": false,
"edgeIndexHeight": 0.06,
"edgeIndexColour": "#ff00ff",
"drawFaceIndexes": false,
"faceIndexHeight": 0.06,
"faceIndexColour": "#0000ff",
"drawTwoSided": false,
"backFaceColour": "#0000ff",
"backFaceOpacity": 1,
"edgeArrowSize": 0,
"edgeArrowAngle": 15
},
"inputs": {},
"position": [
2147.0747334465477,
409.56140922372725
]
},
"f0d4e9ea3cd24449": {
"id": "f0d4e9ea3cd24449",
"name": "bitbybit.babylon.scene.twoColorLinearGradientBackground",
"customName": "two color linear gradient background",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"colorFrom": "#1a1c1f",
"colorTo": "#93aacd",
"direction": "to top",
"stopFrom": 0,
"stopTo": 100
},
"inputs": {},
"position": [
326.1284717805745,
2031.466101347526
]
}
}
}

Parse more parts

Once you understand the basics, you can extract multiple parts and style them independently. This is where things get exciting - you can create custom visualizations that highlight different components, use original colors from the CAD model, or apply your own color schemes.

What's New in This Example?

This advanced example introduces several important concepts:

  1. Right-handed coordinate system - Some CAD software exports models with a different orientation (Y-Up). We use useRightHandedSystem to ensure the model displays correctly.

  2. Multiple shape extraction - Instead of one shape, we extract four different parts using their labels.

  3. Original colors from CAD - The getLabelColor function retrieves the color assigned to a part in the original CAD software, preserving the designer's intent.

  4. Color conversion - CAD colors are stored as RGB objects (with values 0-1). We convert them to hex format (#ff0000) using rgbObjToHex for use in drawing options.

  5. Batch rendering - Multiple shapes can be drawn with the same styling by passing them as an array.

Why This Matters

Understanding assembly structure unlocks powerful capabilities:

  • Selective visualization - Show only the parts that matter for your use case
  • Interactive configurators - Let users click to select and customize individual components
  • Assembly analysis - Check if all required parts are present
  • Documentation - Generate exploded views or highlight specific components
  • Performance optimization - Load and display only the parts you need
Coordinate System Note

BabylonJS uses a left-handed coordinate system by default, which causes Y-Up models to appear mirrored. We use useRightHandedSystem to compensate for this. This will be improved in the next release.

Bitbybit Platform

Parsing STEP OCCT Assembly Structure Parts

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"e0e94797745b9499": {
"id": "e0e94797745b9499",
"name": "bitbybit.asset.fetchFile",
"customName": "fetch file",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"url": "https://learn.bitbybit.dev/files/3d/Soil-Sensor-Y-Up.stpZ"
},
"inputs": {},
"position": [
447.0390625,
364.58203125
]
},
"824be0f956f86e07": {
"id": "824be0f956f86e07",
"name": "bitbybit.babylon.scene.drawDirectionalLight",
"customName": "draw directional light",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"direction": [
-100,
-100,
-100
],
"intensity": 3,
"diffuse": "#ffffff",
"specular": "#ffffff",
"shadowGeneratorMapSize": 1024,
"enableShadows": true,
"shadowDarkness": 0,
"shadowUsePercentageCloserFiltering": true,
"transparencyShadow": false,
"shadowContactHardeningLightSizeUVRatio": 0.2,
"shadowBias": 0.001,
"shadowNormalBias": 0.02,
"shadowMaxZ": 1000,
"shadowMinZ": 0,
"shadowRefreshRate": 6
},
"inputs": {
"direction": {
"connections": [
{
"node": "1cf530bc3b05cd75",
"output": "result",
"data": {}
}
]
}
},
"position": [
220.90978154060178,
1141.4474910149524
]
},
"a2753a0a68a97354": {
"id": "a2753a0a68a97354",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": -5,
"z": 0
},
"inputs": {},
"position": [
720.7524355897118,
1488.399577959778
]
},
"1cf530bc3b05cd75": {
"id": "1cf530bc3b05cd75",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 100,
"y": -100,
"z": -100
},
"inputs": {},
"position": [
-142.37939449872056,
1144.5669505658402
]
},
"09ff71828df19896": {
"id": "09ff71828df19896",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 70,
"y": 50,
"z": 70
},
"inputs": {},
"position": [
714.6847345665905,
1143.2908329012987
]
},
"d737b03aa186cfde": {
"id": "d737b03aa186cfde",
"name": "bitbybit.babylon.scene.adjustActiveArcRotateCamera",
"customName": "adjust active arc rotate camera",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"position": [
10,
10,
10
],
"lookAt": [
0,
0,
0
],
"lowerBetaLimit": 1,
"upperBetaLimit": 179,
"angularSensibilityX": 1000,
"angularSensibilityY": 1000,
"maxZ": 1000,
"panningSensibility": 1000,
"wheelPrecision": 3
},
"inputs": {
"lookAt": {
"connections": [
{
"node": "a2753a0a68a97354",
"output": "result",
"data": {}
}
]
},
"position": {
"connections": [
{
"node": "09ff71828df19896",
"output": "result",
"data": {}
}
]
}
},
"position": [
1140.4592129965072,
1279.8313039785085
]
},
"6e0425b3ab3715f4": {
"id": "6e0425b3ab3715f4",
"name": "bitbybit.occt.assembly.manager.loadStepToDoc",
"customName": "load step to doc",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"stepData": {
"connections": [
{
"node": "e0e94797745b9499",
"output": "result",
"data": {}
}
]
}
},
"position": [
815.8178400767682,
364.9872279487489
]
},
"ce31b6e5c2308c9c": {
"id": "ce31b6e5c2308c9c",
"name": "bitbybit.previewAssemblyHierarchy",
"customName": "preview occt assembly hierarchy",
"data": {},
"inputs": {
"data": {
"connections": [
{
"node": "a41ed949a48dd353",
"output": "result",
"data": {}
}
]
}
},
"position": [
1784.887643979641,
649.6759881067767
]
},
"a41ed949a48dd353": {
"id": "a41ed949a48dd353",
"name": "bitbybit.occt.assembly.query.getAssemblyHierarchy",
"customName": "get assembly hierarchy",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
1394.8366083022465,
607.909443023177
]
},
"4fe2985ce5a35e76": {
"id": "4fe2985ce5a35e76",
"name": "bitbybit.occt.assembly.query.getShapeFromLabel",
"customName": "get shape from label",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"label": "0:1:1:3"
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
2156.547963359031,
-12.896263949365462
]
},
"06851fe24453fd5c": {
"id": "06851fe24453fd5c",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "4fe2985ce5a35e76",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "dfaed57ad37e99ee",
"output": "result",
"data": {}
}
]
}
},
"position": [
3671.1763385204913,
29.207742738975483
]
},
"dfaed57ad37e99ee": {
"id": "dfaed57ad37e99ee",
"name": "bitbybit.draw.optionsOcctShape",
"customName": "options occt shape",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"faceOpacity": 1,
"edgeOpacity": 1,
"edgeColour": "#ffffff",
"faceColour": "#ff0000",
"vertexColour": "#ff00ff",
"edgeWidth": 10,
"vertexSize": 0.03,
"drawEdges": true,
"drawFaces": true,
"drawVertices": false,
"precision": 0.1,
"drawEdgeIndexes": false,
"edgeIndexHeight": 0.06,
"edgeIndexColour": "#ff00ff",
"drawFaceIndexes": false,
"faceIndexHeight": 0.06,
"faceIndexColour": "#0000ff",
"drawTwoSided": false,
"backFaceColour": "#0000ff",
"backFaceOpacity": 1,
"edgeArrowSize": 0,
"edgeArrowAngle": 15
},
"inputs": {
"faceColour": {
"connections": [
{
"node": "7dee1698453f567d",
"output": "result",
"data": {}
}
]
}
},
"position": [
2995.9608037824505,
256.0881469787753
]
},
"f0d4e9ea3cd24449": {
"id": "f0d4e9ea3cd24449",
"name": "bitbybit.babylon.scene.twoColorLinearGradientBackground",
"customName": "two color linear gradient background",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"colorFrom": "#1a1c1f",
"colorTo": "#93aacd",
"direction": "to top",
"stopFrom": 0,
"stopTo": 100
},
"inputs": {},
"position": [
326.1284717805745,
2031.466101347526
]
},
"d5a48cb27b820987": {
"id": "d5a48cb27b820987",
"name": "bitbybit.occt.assembly.query.getLabelColor",
"customName": "get label color",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"label": "0:1:1:3"
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
2159.6684784714134,
305.31442553740163
]
},
"7dee1698453f567d": {
"id": "7dee1698453f567d",
"name": "bitbybit.color.rgbObjToHex",
"customName": "rgb obj to hex",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"rgb": {
"r": 0,
"g": 0,
"b": 1
},
"min": 0,
"max": 1
},
"inputs": {
"rgb": {
"connections": [
{
"node": "d5a48cb27b820987",
"output": "result",
"data": {}
}
]
}
},
"position": [
2624.3920949660132,
368.8889633788438
]
},
"d7c85a30eb78221f": {
"id": "d7c85a30eb78221f",
"name": "bitbybit.babylon.scene.useRightHandedSystem",
"customName": "use right handed system",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"use": true
},
"inputs": {},
"position": [
21.7841448438097,
366.34065342780343
]
},
"5036c49105610d5e": {
"id": "5036c49105610d5e",
"name": "bitbybit.occt.assembly.query.getShapeFromLabel",
"customName": "get shape from label",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"label": "0:1:1:5"
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
2151.823468782882,
-655.1743062177443
]
},
"dd577d75ba3affc0": {
"id": "dd577d75ba3affc0",
"name": "bitbybit.occt.assembly.query.getShapeFromLabel",
"customName": "get shape from label",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"label": "0:1:1:1:6"
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
2146.3287113784004,
-1309.6547664008176
]
},
"2b66393cc9a664d7": {
"id": "2b66393cc9a664d7",
"name": "bitbybit.occt.assembly.query.getShapeFromLabel",
"customName": "get shape from label",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"label": "0:1:1:1:7"
},
"inputs": {
"document": {
"connections": [
{
"node": "6e0425b3ab3715f4",
"output": "result",
"data": {}
}
]
}
},
"position": [
2158.734535684166,
-338.45393687967106
]
},
"c44f71935e30d923": {
"id": "c44f71935e30d923",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "dd577d75ba3affc0",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "1b8a0240f5caf9d2",
"output": "result",
"data": {}
}
]
}
},
"position": [
3528.1664634619065,
-1695.1896885314713
]
},
"1b8a0240f5caf9d2": {
"id": "1b8a0240f5caf9d2",
"name": "bitbybit.draw.optionsOcctShapeSimple",
"customName": "options occt shape simple",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.01,
"drawFaces": true,
"faceColour": "#0011ff",
"drawEdges": true,
"edgeColour": "#ffffff",
"edgeWidth": 10,
"drawTwoSided": true,
"backFaceColour": "#0000ff",
"backFaceOpacity": 1
},
"inputs": {},
"position": [
3093.6154269708823,
-1404.5733810085403
]
},
"370d7f17f2793bdd": {
"id": "370d7f17f2793bdd",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "5036c49105610d5e",
"output": "result",
"data": {}
},
{
"node": "2b66393cc9a664d7",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "48a24c0fde98d856",
"output": "result",
"data": {}
}
]
}
},
"position": [
3617.4327673234375,
-851.2304624572846
]
},
"48a24c0fde98d856": {
"id": "48a24c0fde98d856",
"name": "bitbybit.draw.optionsOcctShapeSimple",
"customName": "options occt shape simple",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.01,
"drawFaces": true,
"faceColour": "#fb05ff",
"drawEdges": true,
"edgeColour": "#000000",
"edgeWidth": 10,
"drawTwoSided": true,
"backFaceColour": "#0000ff",
"backFaceOpacity": 1
},
"inputs": {},
"position": [
3130.5380527600073,
-490.49271645542683
]
}
}
}

Conclusion

You've learned the fundamentals of working with OCCT assembly structures! Here's a quick recap:

  • Assemblies are hierarchical - Parts are organized in a tree structure with unique labels
  • Labels are addresses - Use them to pinpoint and extract specific shapes
  • Colors can be preserved - Extract original CAD colors using getLabelColor
  • Coordinate systems matter - Use useRightHandedSystem when models appear incorrectly oriented

With these skills, you can now build interactive 3D viewers, product configurators, and CAD visualization tools that work with professional engineering files. Try experimenting with your own STEP files to see how different assemblies are structured!