forgecad 0.9.15 → 0.9.16

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 (70) hide show
  1. package/dist/assets/{AdminPage-CDyGUinA.js → AdminPage-CXvls4-J.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-DfPMY_-d.js → BenchmarkPage-B27zk8xL.js} +1 -1
  3. package/dist/assets/{BlogPage-kF0fkdJT.js → BlogPage-CMAVvgQL.js} +1 -1
  4. package/dist/assets/{DocsPage-B954L3YN.js → DocsPage-knf4I4h7.js} +1 -1
  5. package/dist/assets/EditorApp-BHMQlJ-D.js +14686 -0
  6. package/dist/assets/{EditorApp-CuDLxKqL.css → EditorApp-BpjZgzk0.css} +148 -0
  7. package/dist/assets/{EmbedViewer-C77B-TrF.js → EmbedViewer-D7ZGlFjx.js} +2 -2
  8. package/dist/assets/{LandingPageProofDriven-Cr6fXMDj.js → LandingPageProofDriven-CnevhTE8.js} +2 -2
  9. package/dist/assets/{LegalPage-Dzklqmmg.js → LegalPage-BPTUmqeg.js} +1 -1
  10. package/dist/assets/{PricingPage-zWXkvlwl.js → PricingPage-B0D4goG_.js} +1 -1
  11. package/dist/assets/{SettingsPage-Bz0of4KQ.js → SettingsPage-CFF-UgjI.js} +1 -1
  12. package/dist/assets/{app-D3kDkggg.js → app-T0pDcSX4.js} +1184 -218
  13. package/dist/assets/cli/{render-DSY3mMQa.js → render-C5pcIISc.js} +144 -26
  14. package/dist/assets/{constructionHistoryWorker-gpDo-uH2.js → constructionHistoryWorker-Ba2Hm58b.js} +1 -0
  15. package/dist/assets/{evalWorker-CU0Ke6DP.js → evalWorker-vkx310U2.js} +1380 -2173
  16. package/dist/assets/{inspectWorker-COyp8XXA.js → inspectWorker-BuTJDVX6.js} +252 -30
  17. package/dist/assets/{targets-B9sGB5nB.js → jointPose-B_Cgedn9.js} +71 -3
  18. package/dist/assets/{manifold-DNkrUWpA.js → manifold-BWgsjmAM.js} +1 -1
  19. package/dist/assets/{manifold-C-3h2M7p.js → manifold-D6IFSkhH.js} +2 -2
  20. package/dist/assets/{manifold-BRI5prcH.js → manifold-rZexZI0G.js} +1 -1
  21. package/dist/assets/{reportWorker-CdBz5bNg.js → reportWorker-0AGij1Ru.js} +1373 -2166
  22. package/dist/assets/{scalar-sampling-budget-wJF98aY9.js → scalar-sampling-budget-J5cuzxT1.js} +1494 -2251
  23. package/dist/assets/{scanProxyWorker-B-9VbLIs.js → scanProxyWorker-Vl4Wxa1y.js} +18 -5
  24. package/dist/cli/render.html +1 -1
  25. package/dist/docs/index.html +1 -1
  26. package/dist/docs-raw/AI/usage.md +2 -0
  27. package/dist/docs-raw/CLI.md +4 -0
  28. package/dist/docs-raw/generated/assembly.md +104 -6
  29. package/dist/docs-raw/generated/concepts.md +14 -4
  30. package/dist/docs-raw/generated/lib.md +2 -18
  31. package/dist/docs-raw/generated/output.md +14 -4
  32. package/dist/docs-raw/generated/runtime-names.md +27 -19
  33. package/dist/docs-raw/skills/forgecad-make-a-model.md +39 -38
  34. package/dist/docs-raw/skills/forgecad-project.md +2 -0
  35. package/dist/docs-raw/welcome.md +2 -0
  36. package/dist/index.html +1 -1
  37. package/dist/sitemap.xml +13 -13
  38. package/dist-cli/{check-compiler-SDX5QIXI.js → check-compiler-SYQ2PWOB.js} +1 -1
  39. package/dist-cli/{check-query-propagation-EAYEFT77.js → check-query-propagation-HIAGV62W.js} +1 -1
  40. package/dist-cli/{chunk-N4O47JLF.js → chunk-SPZE3DUY.js} +1591 -2356
  41. package/dist-cli/forgecad.js +1698 -487
  42. package/dist-skill/CONTEXT.md +117 -46
  43. package/dist-skill/docs/CLI.md +4 -0
  44. package/dist-skill/docs/generated/assembly.md +83 -5
  45. package/dist-skill/docs/generated/lib.md +2 -18
  46. package/dist-skill/docs/generated/output.md +14 -4
  47. package/dist-skill/docs/generated/runtime-names.md +18 -19
  48. package/dist-skill/library/forgecad-make-a-model/SKILL.md +39 -38
  49. package/dist-skill/library/forgecad-project/SKILL.md +2 -0
  50. package/examples/api/helix-basics.forge.js +2 -2
  51. package/examples/api/route3d-elbow.forge.js +3 -0
  52. package/examples/api/variable-sweep-test.forge.js +3 -1
  53. package/package.json +4 -1
  54. package/dist/assets/EditorApp-Beb-IZ0y.js +0 -14014
  55. package/examples/api/bolted-service-cover.forge.js +0 -17
  56. package/examples/api/cable-gland-anchor.forge.js +0 -14
  57. package/examples/api/captured-cartridge-guide.forge.js +0 -14
  58. package/examples/api/captured-linear-slide.forge.js +0 -13
  59. package/examples/api/clevis-pin-joint.forge.js +0 -13
  60. package/examples/api/datum-enclosure.forge.js +0 -16
  61. package/examples/api/hose-barb-port.forge.js +0 -14
  62. package/examples/api/knuckled-hinge-assembly.forge.js +0 -15
  63. package/examples/api/living-hinge-cover.forge.js +0 -14
  64. package/examples/api/pcb-terminal-block.forge.js +0 -22
  65. package/examples/api/pinned-lever-pivot-stack.forge.js +0 -14
  66. package/examples/api/retained-shaft-knob-stack.forge.js +0 -15
  67. package/examples/api/routed-tube-clip.forge.js +0 -15
  68. package/examples/api/seated-bearing-stack.forge.js +0 -30
  69. package/examples/api/snap-latch-cover.forge.js +0 -14
  70. package/examples/api/thumb-screw-clamp.forge.js +0 -15
@@ -7589,6 +7589,7 @@ function createScanProxyGeometry(source, options = {}) {
7589
7589
  },
7590
7590
  cellCenters,
7591
7591
  cellSize: spec.cellSize,
7592
+ grid: scanProxyGridFromSpec(spec),
7592
7593
  cells: {
7593
7594
  shell: shell.size,
7594
7595
  core: 0,
@@ -7630,7 +7631,7 @@ function scanProxyPayloadTransferables(payload) {
7630
7631
  const transferables = [];
7631
7632
  for (const layer of Object.values(payload.geometries)) {
7632
7633
  if (!layer) continue;
7633
- transferables.push(layer.positions.buffer, layer.normals.buffer);
7634
+ transferables.push(layer.positions.buffer, layer.normals.buffer, layer.cells.buffer);
7634
7635
  }
7635
7636
  if (payload.cellCenters) transferables.push(payload.cellCenters.positions.buffer);
7636
7637
  return transferables;
@@ -7652,6 +7653,7 @@ function scanProxyGeometryToPayload(proxy) {
7652
7653
  },
7653
7654
  cellCenters: pointPayloadFromGeometry(proxy.cellCenters),
7654
7655
  cellSize: proxy.cellSize,
7656
+ grid: proxy.grid,
7655
7657
  cells: proxy.cells,
7656
7658
  faces: proxy.faces,
7657
7659
  telemetry: proxy.telemetry
@@ -7669,10 +7671,12 @@ function layerPayloadFromGeometry(geometry) {
7669
7671
  if (!geometry) return null;
7670
7672
  const positions = geometry.getAttribute("position");
7671
7673
  const normals = geometry.getAttribute("normal");
7672
- if (!positions || !normals) return null;
7674
+ const cells = geometry.getAttribute("scanCell");
7675
+ if (!positions || !normals || !cells) return null;
7673
7676
  return {
7674
7677
  positions: positions.array,
7675
- normals: normals.array
7678
+ normals: normals.array,
7679
+ cells: cells.array
7676
7680
  };
7677
7681
  }
7678
7682
  function buildCellCenterGeometry(cells, spec) {
@@ -7779,6 +7783,7 @@ function buildCellGeometry(cells, material, spec, lookup) {
7779
7783
  if (cells.size === 0) return { geometry: null, faces: 0 };
7780
7784
  const positions = [];
7781
7785
  const normals = [];
7786
+ const cellCoords = [];
7782
7787
  let faces = 0;
7783
7788
  for (const cell of cells.values()) {
7784
7789
  for (const dir of FACE_DIRS) {
@@ -7786,7 +7791,7 @@ function buildCellGeometry(cells, material, spec, lookup) {
7786
7791
  const neighborMaterial = lookup.get(neighborKey);
7787
7792
  if (neighborMaterial === material) continue;
7788
7793
  if (neighborMaterial && neighborMaterial !== "shell") continue;
7789
- addFace(positions, normals, cell, dir, spec);
7794
+ addFace(positions, normals, cellCoords, cell, dir, spec);
7790
7795
  faces += 1;
7791
7796
  }
7792
7797
  }
@@ -7794,10 +7799,11 @@ function buildCellGeometry(cells, material, spec, lookup) {
7794
7799
  const geometry = new BufferGeometry();
7795
7800
  geometry.setAttribute("position", new Float32BufferAttribute(positions, 3));
7796
7801
  geometry.setAttribute("normal", new Float32BufferAttribute(normals, 3));
7802
+ geometry.setAttribute("scanCell", new Float32BufferAttribute(cellCoords, 3));
7797
7803
  geometry.computeBoundingSphere();
7798
7804
  return { geometry, faces };
7799
7805
  }
7800
- function addFace(positions, normals, cell, dir, spec) {
7806
+ function addFace(positions, normals, cellCoords, cell, dir, spec) {
7801
7807
  const half = (spec.cellSize - scanProxyCellGap(spec.cellSize)) / 2;
7802
7808
  const center = cellCenter(cell, spec);
7803
7809
  const normal = new Vector3(dir.normal[0], dir.normal[1], dir.normal[2]);
@@ -7815,6 +7821,7 @@ function addFace(positions, normals, cell, dir, spec) {
7815
7821
  for (const point of pts) {
7816
7822
  positions.push(point.x, point.y, point.z);
7817
7823
  normals.push(normal.x, normal.y, normal.z);
7824
+ cellCoords.push(cell.ix, cell.iy, cell.iz);
7818
7825
  }
7819
7826
  }
7820
7827
  function boundsForPosition(position, matrix) {
@@ -7899,6 +7906,12 @@ function cellCenter(cell, spec) {
7899
7906
  spec.min.z + (cell.iz + 0.5) * spec.cellSize
7900
7907
  );
7901
7908
  }
7909
+ function scanProxyGridFromSpec(spec) {
7910
+ return {
7911
+ cellSize: spec.cellSize,
7912
+ origin: [spec.min.x, spec.min.y, spec.min.z]
7913
+ };
7914
+ }
7902
7915
  function clampCellIndex(index, count) {
7903
7916
  return Math.max(0, Math.min(count - 1, index));
7904
7917
  }
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head><title>ForgeCAD Headless Render</title> <script type="module" crossorigin src="/assets/cli/render-DSY3mMQa.js"></script>
3
+ <head><title>ForgeCAD Headless Render</title> <script type="module" crossorigin src="/assets/cli/render-C5pcIISc.js"></script>
4
4
  </head>
5
5
  <body>
6
6
  <canvas id="canvas" width="1024" height="1024"></canvas>