Skip to content

Commit 8c2126c

Browse files
Patch the step-model-merger to fix the offset (#35)
1 parent 89d9f5b commit 8c2126c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/step-model-merger.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ function adjustTransformForPlacement(
203203

204204
if (isThroughHoleComponent) {
205205
// Place model's z=0 at board top surface.
206-
// position.z = 0 means the component sits directly on the board top.
207-
transform.translation.z = targetZ + boardThickness
206+
// For through-hole components, the flange should always sit at board top (z=boardThickness),
207+
// regardless of position.z from circuit JSON (which may include absolute coordinates or offsets
208+
// that shouldn't affect the flange placement).
209+
transform.translation.z = boardThickness
208210
}
209211

210212
if (!isThroughHoleComponent && boardThickness > 0) {

0 commit comments

Comments
 (0)