@tscircuit/3d-viewer 0.0.467 → 0.0.469

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28509,7 +28509,7 @@ import * as THREE15 from "three";
28509
28509
  // package.json
28510
28510
  var package_default = {
28511
28511
  name: "@tscircuit/3d-viewer",
28512
- version: "0.0.466",
28512
+ version: "0.0.468",
28513
28513
  main: "./dist/index.js",
28514
28514
  module: "./dist/index.js",
28515
28515
  type: "module",
@@ -31343,24 +31343,20 @@ var BoardGeomBuilder = class {
31343
31343
  });
31344
31344
  cutoutGeom = (0, import_extrusions8.extrudeLinear)({ height: cutoutHeight }, rect2d);
31345
31345
  cutoutGeom = (0, import_transforms10.translate)([0, 0, -cutoutHeight / 2], cutoutGeom);
31346
- cutoutGeom = (0, import_transforms10.translate)(
31347
- [cutout.center.x, cutout.center.y, 0],
31348
- cutoutGeom
31349
- );
31350
31346
  } else {
31351
- const baseCutoutGeom = (0, import_primitives11.cuboid)({
31347
+ cutoutGeom = (0, import_primitives11.cuboid)({
31352
31348
  center: [0, 0, 0],
31353
31349
  size: [cutout.width, cutout.height, cutoutHeight]
31354
31350
  });
31355
- cutoutGeom = (0, import_transforms10.translate)(
31356
- [cutout.center.x, cutout.center.y, 0],
31357
- baseCutoutGeom
31358
- );
31359
31351
  }
31360
31352
  if (cutout.rotation) {
31361
31353
  const rotationRadians = cutout.rotation * Math.PI / 180;
31362
31354
  cutoutGeom = (0, import_transforms10.rotateZ)(rotationRadians, cutoutGeom);
31363
31355
  }
31356
+ cutoutGeom = (0, import_transforms10.translate)(
31357
+ [cutout.center.x, cutout.center.y, 0],
31358
+ cutoutGeom
31359
+ );
31364
31360
  break;
31365
31361
  }
31366
31362
  case "circle":
@@ -31728,7 +31724,8 @@ var BoardGeomBuilder = class {
31728
31724
  const finishSegment = () => {
31729
31725
  if (currentSegmentPoints.length >= 2 && currentLayer) {
31730
31726
  const layerSign = currentLayer === "bottom" ? -1 : 1;
31731
- const zCenter = layerSign * this.ctx.pcbThickness / 2 + layerSign * BOARD_SURFACE_OFFSET.traces;
31727
+ const traceOffset = BOARD_SURFACE_OFFSET.traces - 2e-3;
31728
+ const zCenter = layerSign * this.ctx.pcbThickness / 2 + layerSign * traceOffset;
31732
31729
  const linePath = (0, import_primitives11.line)(currentSegmentPoints);
31733
31730
  const expandedPath = (0, import_expansions4.expand)(
31734
31731
  { delta: currentWidth / 2, corners: "round" },
@@ -33346,7 +33343,7 @@ function JscadBoardTextures({
33346
33343
  if (visibility.topCopper && visibility.topMask) {
33347
33344
  const topTraceWithMaskMesh = createTexturePlane(
33348
33345
  textures.topTraceWithMask,
33349
- pcbThickness / 2 + SURFACE_OFFSET + 1e-3,
33346
+ pcbThickness / 2 + BOARD_SURFACE_OFFSET.traces + 4e-3,
33350
33347
  false,
33351
33348
  "jscad-top-trace-with-mask"
33352
33349
  );
@@ -33358,7 +33355,7 @@ function JscadBoardTextures({
33358
33355
  if (visibility.bottomCopper && visibility.bottomMask) {
33359
33356
  const bottomTraceWithMaskMesh = createTexturePlane(
33360
33357
  textures.bottomTraceWithMask,
33361
- -pcbThickness / 2 - SURFACE_OFFSET - 1e-3,
33358
+ -pcbThickness / 2 - BOARD_SURFACE_OFFSET.traces - 5e-3,
33362
33359
  true,
33363
33360
  "jscad-bottom-trace-with-mask"
33364
33361
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.467",
3
+ "version": "0.0.469",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",