Skip to content

Commit 28846ad

Browse files
adjustments to assembly tutorials
1 parent 97f41d1 commit 28846ad

6 files changed

Lines changed: 30 additions & 35 deletions

File tree

docs/learn/code/common/occt/assembly/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"link": {
55
"type": "generated-index",
66
"title": "OCCT Assembly",
7-
"description": "Learn how to create OCCT assemblies and manage complex parts.",
7+
"description": "Work with OCCT assemblies: load STEP files, export to GLTF, parse hierarchy, create multi-part models, and preserve colors for CAD visualization.",
88
"slug": "/code/common/occt/assembly"
99
}
1010
}

docs/learn/code/common/occt/assembly/assembly-structure.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
22
sidebar_position: 3
3-
title: "Structure"
3+
title: "Parse Assembly Structure"
44
sidebar_label: Structure
5-
description: Learn how to analyze the structure of assembly. Bitbybit probides dedicated preview components for Visual Programmers.
5+
description: Extract and navigate assembly hierarchy from STEP files - find part labels, retrieve shapes, and apply custom styling to individual components.
66
tags: [occt, assembly, step, gltf, cad]
77
---
88

99
import Tabs from '@theme/Tabs';
1010
import TabItem from '@theme/TabItem';
1111
import BitByBitRenderCanvas from '@site/src/components/BitByBitRenderCanvas';
1212

13-
# OCCT Assembly Structure
13+
# Navigate and Extract Assembly Parts
1414

1515
<img
1616
class="category-icon-small"
1717
src="https://s.bitbybit.dev/assets/icons/white/occt-icon.svg"
1818
alt="OCCT category icon with a stylized logo representation"
1919
title="OCCT category icon" />
2020

21-
Understanding assembly structure is essential when working with CAD models. Think of an assembly like a family tree for 3D parts - it shows how different components are organized and related to each other. Let's explore how to navigate this structure and extract the parts you need.
21+
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.
2222

23-
## What is Assembly Structure?
23+
## How the Hierarchy Works
2424

25-
When engineers design complex products (like machines, robots, or buildings), they don't create one giant 3D shape. Instead, they build **assemblies** - collections of individual parts organized in a hierarchy. Each part has:
25+
Assemblies organize parts in a tree structure. Each part has:
2626

2727
- A **label** (like an address): `0:1:1:3` tells you exactly where the part lives in the structure
2828
- A **name**: Human-readable identifier like "Mounting Plate" or "Screw"

docs/learn/code/common/occt/assembly/create-assembly.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
2-
sidebar_position: 4
3-
title: "Create Assembly"
2+
sidebar_position: 5
3+
title: "Build and Export Assemblies"
44
sidebar_label: Creating Assembly
5-
description: Learn how to create OCCT assembly documents with parts, instances, and hierarchies. Export structured STEP files compatible with FreeCAD, Fusion 360, SolidWorks, and other CAD software.
5+
description: Create structured CAD assemblies with parts, instances, and hierarchies. Export STEP files compatible with FreeCAD, Fusion 360, and SolidWorks.
66
tags: [occt, assembly, step, gltf, cad]
77
---
88

99
import Tabs from '@theme/Tabs';
1010
import TabItem from '@theme/TabItem';
1111
import BitByBitRenderCanvas from '@site/src/components/BitByBitRenderCanvas';
1212

13-
# OCCT Assembly Structure
13+
# Build Multi-Part Assemblies from Scratch
1414

1515
<img
1616
class="category-icon-small"
1717
src="https://s.bitbybit.dev/assets/icons/white/occt-icon.svg"
1818
alt="OCCT category icon with a stylized logo representation"
1919
title="OCCT category icon" />
2020

21-
## What is an Assembly Document?
21+
This tutorial demonstrates how to create an assembly programmatically using parts and instances, then export it as a structured STEP file.
2222

23-
An **assembly document** is a structured CAD file format that organizes your 3D model into a hierarchy of **parts** and **instances**. Unlike a flat shape export where all geometry is merged into a single blob, an assembly preserves the logical structure of your design.
23+
## Parts, Instances, and Nodes
2424

25-
Think of it like building a car:
25+
An **assembly document** organizes your 3D model into a hierarchy:
2626
- **Parts** are the unique component designs (e.g., a wheel, a door, an engine)
2727
- **Instances** are the actual placements of those parts in your model (e.g., "put a wheel at each corner of the chassis")
2828
- **Assembly nodes** are containers that group related instances together (e.g., "the drivetrain" containing engine and transmission)

docs/learn/code/common/occt/assembly/intro.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
sidebar_position: 1
3-
title: "Intro OCCT Assemblies"
3+
title: "Introduction to Assemblies"
44
sidebar_label: Introduction
5-
description: Learn how to work with OCCT assemblies in Bitbybit - load STEP files, convert CAD data to glTF for web display, parse assembly structure, and build interactive 3D CAD viewers with examples in Rete, Blockly, and TypeScript.
5+
description: Understand what OCCT assemblies are, why STEP files matter for CAD workflows, and preview your first assembly model in the browser.
66
tags: [occt, assembly, step, gltf, cad]
77
---
88

docs/learn/code/common/occt/assembly/shape-to-step-with-color-assembly.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
---
22
sidebar_position: 4
3-
title: "Shape With Color to STEP"
4-
sidebar_label: Shape with color to STEP
5-
description: Learn
3+
title: "Export Shapes with Color"
4+
sidebar_label: Shape with Color to STEP
5+
description: Export OCCT shapes to STEP files with preserved colors using the assembly document structure for CAD software compatibility.
66
tags: [occt, assembly, step, gltf, cad]
77
---
88

99
import Tabs from '@theme/Tabs';
1010
import TabItem from '@theme/TabItem';
1111
import BitByBitRenderCanvas from '@site/src/components/BitByBitRenderCanvas';
1212

13-
# OCCT Assembly Structure
13+
# Preserve Colors in STEP Exports
1414

1515
<img
1616
class="category-icon-small"
1717
src="https://s.bitbybit.dev/assets/icons/white/occt-icon.svg"
1818
alt="OCCT category icon with a stylized logo representation"
1919
title="OCCT category icon" />
2020

21-
## Preserving Colors
21+
Standard STEP files store only geometry — no color information. To preserve colors, you need to use the assembly document structure. This was one of our most requested features, and it's finally available!
2222

23-
In order to preserve colors in your STEP files, you have to use assemblies. While fundamental, this was always one of the most requested features of our users, but it required full Assembly support in order to function properly. It's nice that it finally arrived.
23+
## Why Colors Require Assemblies
24+
25+
The XCAF (Extended CAD Application Framework) format used by OCCT can embed colors into assembly structures. By wrapping shapes in an assembly with color-assigned instances, you ensure colors transfer correctly to other CAD applications.
2426

2527
## What These Scripts Do
2628

docs/learn/code/common/occt/assembly/step-to-gltf.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
11
---
22
sidebar_position: 2
3-
title: "STEP to GLTF"
3+
title: "Convert STEP to GLTF"
44
sidebar_label: STEP to GLTF
5-
description: While displaying GLTF model is very useful, you can use Bitbybit browser based algorithms for conversions too. In this tutorial you'll learn how to do that.
5+
description: Convert STEP files to web-optimized GLTF/GLB format directly in the browser with privacy-preserving local processing.
66
tags: [occt, assembly, step, gltf, cad]
77
---
88

99
import Tabs from '@theme/Tabs';
1010
import TabItem from '@theme/TabItem';
1111
import BitByBitRenderCanvas from '@site/src/components/BitByBitRenderCanvas';
1212

13-
# Exporting GLTF files produced from STEP files
13+
# Export STEP Files to GLTF
1414

1515
<img
1616
class="category-icon-small"
1717
src="https://s.bitbybit.dev/assets/icons/white/occt-icon.svg"
1818
alt="OCCT category icon with a stylized logo representation"
1919
title="OCCT category icon" />
2020

21-
Converting STEP files to GLTF is one of the most practical operations you can perform with CAD data. This tutorial shows you how to transform engineering CAD files into web-friendly 3D formats - all running directly in your browser!
21+
This tutorial shows you how to convert STEP files to web-optimized GLTF/GLB format — with all processing happening directly in your browser.
2222

23-
## Why Convert STEP to GLTF?
23+
## Why Export to GLTF?
2424

25-
**STEP files** are the gold standard for exchanging CAD data between professional engineering software. They preserve exact geometry, assembly structure, colors, and metadata. However, they're not designed for web viewing.
26-
27-
**GLTF (GL Transmission Format)** is the "JPEG of 3D" - a lightweight, web-optimized format that loads quickly in browsers, game engines, and 3D viewers. The binary version (**.glb**) packages everything into a single file.
28-
29-
By converting STEP to GLTF, you get the best of both worlds:
30-
- ✅ Start with precise engineering data
31-
- ✅ End with a fast-loading web-ready model
32-
- ✅ Preserve colors and structure from the original CAD file
25+
STEP files preserve precise CAD geometry but aren't optimized for web viewing. GLTF (the "JPEG of 3D") loads quickly in browsers and 3D engines while preserving colors and structure from the original file.
3326

3427
## Browser-Based Conversion
3528

0 commit comments

Comments
 (0)