Skip to main content
Built-in Elements

<assembly.subassembly />

assembly.subassembly groups mechanical models alongside a board. It can have its own model, CAD children, or both.

import { assembly } from "@tscircuit/core"

const models =
"https://docs.tscircuit.com/models/assembly"

export default () => (
<assembly.device name="product">
<board
width="40mm"
height="30mm"
thickness="1.6mm"
/>
<assembly.subassembly
name="housing"
modelUrl={models + "/housing.glb"}
>
<cadmodel
modelUrl={models + "/cover.glb"}
pcbZ={4}
/>
</assembly.subassembly>
</assembly.device>
)
3D Circuit Preview
PropertyDescription
nameRequired group name.
displayNameOptional display label.
modelModelprinter string or HTTP(S) model URL.
modelUrlImported CAD model URL.
cadModelModel with advanced options; see cadmodel.
childrenCAD models or nested subassemblies.

Choose one of model, modelUrl, or cadModel. Omit all three for a group with no model of its own.

Positioning models​

Use cadModel for offsets and rotation:

import { assembly } from "@tscircuit/core"

const models =
"https://docs.tscircuit.com/models/assembly"

export default () => (
<assembly.device name="product">
<board
width="40mm"
height="30mm"
thickness="1.6mm"
/>
<assembly.subassembly
name="bracket"
cadModel={{
glbUrl: models + "/bracket.glb",
positionOffset: { x: 10, y: 0, z: 0.8 },
rotationOffset: { x: 0, y: 0, z: 90 },
}}
/>
</assembly.device>
)
3D Circuit Preview

Coordinates are in millimetres. The board's center is Z = 0, so the top of a 1.6 mm board is Z = 0.8 mm. A model's offset moves only that model, not its children; position CAD children with pcbX, pcbY, and pcbZ.

See Mounting 3D models for screws aligned with holes, or assembly.screen for connector-relative placement.