circuit-json-to-gltf 0.0.30 → 0.0.32
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 +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14763,9 +14763,11 @@ var createHoleGeoms = (boardCenter, thickness, holes = [], platedHoles = []) =>
|
|
|
14763
14763
|
holeGeoms.push(createCircularHole(relX, relY, radius, thickness));
|
|
14764
14764
|
}
|
|
14765
14765
|
for (const plated of platedHoles) {
|
|
14766
|
-
const relX = plated.x - boardCenter.x;
|
|
14767
|
-
const relY = -(plated.y - boardCenter.y);
|
|
14768
14766
|
const platedRecord = plated;
|
|
14767
|
+
const holeOffsetX = getNumberProperty(platedRecord, "hole_offset_x") ?? 0;
|
|
14768
|
+
const holeOffsetY = getNumberProperty(platedRecord, "hole_offset_y") ?? 0;
|
|
14769
|
+
const relX = plated.x - boardCenter.x + holeOffsetX;
|
|
14770
|
+
const relY = -(plated.y - boardCenter.y + holeOffsetY);
|
|
14769
14771
|
if (plated.shape === "pill" || plated.shape === "pill_hole_with_rect_pad") {
|
|
14770
14772
|
const holeWidth = getNumberProperty(platedRecord, "hole_width") ?? getNumberProperty(platedRecord, "outer_diameter") ?? 0;
|
|
14771
14773
|
const holeHeight = getNumberProperty(platedRecord, "hole_height") ?? getNumberProperty(platedRecord, "hole_diameter") ?? 0;
|