Skip to content

Commit 4a5bde4

Browse files
Fix empty footprinter models showing (#160)
as fallback boxes in normal 3D renders
1 parent 8db0b5a commit 4a5bde4

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/converters/circuit-to-3d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,9 @@ export async function convertCircuitJsonTo3D(
520520
box.size = getBoundingBoxSize(box.mesh.boundingBox)
521521
}
522522

523-
// Only set color if mesh loading failed (fallback to simple box)
523+
// Skip empty generated footprint models unless debug boxes are requested.
524524
if (!box.mesh) {
525+
if (hasFootprinterModel && !showBoundingBoxes) continue
525526
box.color = componentColor
526527
}
527528

-2.13 KB
Loading

tests/repro/repro12-testpoint.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test("repro12 testpoint 3d snapshot", async () => {
2828
textureResolution: 512,
2929
})
3030

31-
expect(scene.boxes).toHaveLength(7)
31+
expect(scene.boxes).toHaveLength(1)
3232

3333
const glb = await convertCircuitJsonToGltf(circuitJson, {
3434
format: "glb",

0 commit comments

Comments
 (0)