circuit-json-to-gltf 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1345,7 +1345,7 @@ async function convertCircuitJsonTo3D(circuitJson, options = {}) {
|
|
|
1345
1345
|
z: cad.position.y
|
|
1346
1346
|
} : {
|
|
1347
1347
|
x: pcbComponent?.center.x ?? 0,
|
|
1348
|
-
y: isBottomLayer ? -(effectiveBoardThickness
|
|
1348
|
+
y: isBottomLayer ? -(effectiveBoardThickness + size.y / 2) : effectiveBoardThickness / 2 + size.y / 2,
|
|
1349
1349
|
z: pcbComponent?.center.y ?? 0
|
|
1350
1350
|
};
|
|
1351
1351
|
const meshType = model_stl_url ? "stl" : model_obj_url ? "obj" : model_gltf_url ? "gltf" : "glb";
|
|
@@ -1414,7 +1414,7 @@ async function convertCircuitJsonTo3D(circuitJson, options = {}) {
|
|
|
1414
1414
|
boxes.push({
|
|
1415
1415
|
center: {
|
|
1416
1416
|
x: component.center.x,
|
|
1417
|
-
y: isBottomLayer ? -(effectiveBoardThickness
|
|
1417
|
+
y: isBottomLayer ? -(effectiveBoardThickness + compHeight / 2) : effectiveBoardThickness / 2 + compHeight / 2,
|
|
1418
1418
|
z: component.center.y
|
|
1419
1419
|
},
|
|
1420
1420
|
size: {
|