forgecad 0.9.7 → 0.9.9

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 (47) hide show
  1. package/README.md +1 -0
  2. package/dist/assets/{AdminPage-DX0mpSZT.js → AdminPage-CNEvQM7c.js} +1 -1
  3. package/dist/assets/{BlogPage-CI_P0_Pf.js → BlogPage-Cc41PP4d.js} +1 -1
  4. package/dist/assets/{DocsPage-DLhIIZyJ.js → DocsPage-9U1hGjrg.js} +2 -2
  5. package/dist/assets/{EditorApp-DfFT2Dn8.css → EditorApp-D11wL4Qn.css} +51 -0
  6. package/dist/assets/{EditorApp-BujZvuwX.js → EditorApp-DnddQvBt.js} +151 -9
  7. package/dist/assets/{EmbedViewer-0S0qXKog.js → EmbedViewer-B2lhWTcd.js} +2 -2
  8. package/dist/assets/{LandingPageProofDriven-O_yMtAri.js → LandingPageProofDriven-CFet-l3o.js} +1 -1
  9. package/dist/assets/{PricingPage-DGkX3Ahr.js → PricingPage-CPm8mQx3.js} +1 -1
  10. package/dist/assets/{SettingsPage-DBsqTB_y.js → SettingsPage-BarZonVZ.js} +1 -1
  11. package/dist/assets/__vite-browser-external-Dhvy_jtL.js +4 -0
  12. package/dist/assets/{app-BE2nD6Yz.js → app-BjSEB4sY.js} +1006 -526
  13. package/dist/assets/cli/{render-iP9qh475.js → render-CXVrHY8q.js} +647 -481
  14. package/dist/assets/constructionHistoryWorker-z9_LGiRd.js +42984 -0
  15. package/dist/assets/{evalWorker-Ds5U4xtN.js → evalWorker-CtO7GsJR.js} +42 -9
  16. package/dist/assets/{inspectWorker-Dll4eVyD.js → inspectWorker-BZ2CkQZr.js} +785 -111
  17. package/dist/assets/{manifold-DjYsd7A_.js → manifold-BRdhoQy5.js} +2 -2
  18. package/dist/assets/{manifold-sJ-axdXM.js → manifold-BVi4_OeB.js} +1 -1
  19. package/dist/assets/manifold-Cp_dCC7i.js +3018 -0
  20. package/dist/assets/{manifold-Bk26ViCr.js → manifold-DAzn2Fsa.js} +1 -1
  21. package/dist/assets/{renderSceneState-Bngp5MrQ.js → renderSceneState-CWO8rHlt.js} +1 -1
  22. package/dist/assets/{reportWorker-CU8RZ4O0.js → reportWorker-Bz9tGiHb.js} +42 -9
  23. package/dist/assets/{sectionPlaneMath-BdTjyVfs.js → scalar-sampling-budget-Bmewod18.js} +1339 -215
  24. package/dist/cli/render.html +1 -1
  25. package/dist/docs/index.html +1 -1
  26. package/dist/docs-raw/CLI.md +10 -10
  27. package/dist/docs-raw/coding-best-practices.md +1 -1
  28. package/dist/docs-raw/guides/inspection-bundles.md +77 -19
  29. package/dist/docs-raw/guides/skill-maintenance.md +1 -1
  30. package/dist/docs-raw/runbook.md +2 -2
  31. package/dist/docs-raw/skills/forgecad-make-a-model.md +11 -0
  32. package/dist/docs-raw/skills/forgecad-render-inspect.md +12 -6
  33. package/dist/docs-raw/skills/index.md +1 -1
  34. package/dist/index.html +1 -1
  35. package/dist/sitemap.xml +6 -6
  36. package/dist-cli/forgecad.js +596 -354
  37. package/dist-cli/forgecad.js.map +1 -1
  38. package/dist-skill/CONTEXT.md +77 -19
  39. package/dist-skill/docs/CLI.md +10 -10
  40. package/dist-skill/docs/guides/inspection-bundles.md +77 -19
  41. package/dist-skill/docs-dev/CLI.md +10 -10
  42. package/dist-skill/docs-dev/coding-best-practices.md +1 -1
  43. package/dist-skill/docs-dev/guides/inspection-bundles.md +77 -19
  44. package/dist-skill/docs-dev/guides/skill-maintenance.md +1 -1
  45. package/dist-skill/library/forgecad-make-a-model/SKILL.md +11 -0
  46. package/dist-skill/library/forgecad-render-inspect/SKILL.md +12 -6
  47. package/package.json +6 -3
@@ -10526,7 +10526,7 @@ let _wasm$1 = null;
10526
10526
  async function initManifoldWasm() {
10527
10527
  if (_wasm$1) return _wasm$1;
10528
10528
  performance.mark("manifold:start");
10529
- const Module = (await import("./manifold-sJ-axdXM.js")).default;
10529
+ const Module = (await import("./manifold-BVi4_OeB.js")).default;
10530
10530
  performance.mark("manifold:imported");
10531
10531
  const wasm = await Module();
10532
10532
  wasm.setup();
@@ -54512,6 +54512,16 @@ const RENDER_STYLE_OPTIONS = [
54512
54512
  id: "glass",
54513
54513
  label: "Glass",
54514
54514
  description: "Showcase lighting for authored transparent materials."
54515
+ },
54516
+ {
54517
+ id: "precision",
54518
+ label: "Precision",
54519
+ description: "Dense, thin surface-field contours for technical inspection."
54520
+ },
54521
+ {
54522
+ id: "hybrid",
54523
+ label: "Hybrid",
54524
+ description: "Topo-led surface contours with a quiet orthogonal field."
54515
54525
  }
54516
54526
  ];
54517
54527
  new Set(RENDER_STYLE_OPTIONS.map((option) => option.id));
@@ -298709,6 +298719,14 @@ function createForgeRuntimeModule(bindings) {
298709
298719
  runtime.default = runtime;
298710
298720
  return runtime;
298711
298721
  }
298722
+ function finalizeForgeJsImport(moduleExports, importedDims) {
298723
+ if (moduleExports instanceof Assembly) {
298724
+ return new ImportedAssembly(moduleExports, moduleExports.getReferences());
298725
+ }
298726
+ if (!(moduleExports instanceof Shape)) return moduleExports;
298727
+ if (importedDims.length === 0) return moduleExports;
298728
+ return setShapeDimensions(moduleExports, [...getShapeDimensions(moduleExports), ...importedDims]);
298729
+ }
298712
298730
  function classifySdfPreviewNode(node) {
298713
298731
  switch (node.kind) {
298714
298732
  case "sdf:sphere":
@@ -298884,7 +298902,7 @@ function isRenderableEntryResult(value) {
298884
298902
  return containsRenderableLeaf(value, /* @__PURE__ */ new WeakSet());
298885
298903
  }
298886
298904
  function containsRenderableLeaf(value, seen) {
298887
- if (value instanceof Shape || value instanceof Sketch || value instanceof SdfShape || value instanceof ShapeGroup || value instanceof GCodeBuilder || value instanceof Assembly || value instanceof SolvedAssembly) {
298905
+ if (value instanceof Shape || value instanceof Sketch || value instanceof SdfShape || value instanceof ShapeGroup || value instanceof GCodeBuilder || value instanceof Assembly || value instanceof ImportedAssembly || value instanceof SolvedAssembly) {
298888
298906
  return true;
298889
298907
  }
298890
298908
  if (!value || typeof value !== "object") return false;
@@ -298906,11 +298924,6 @@ function hasExplicitModuleExports(exportsValue, initialExportsRef) {
298906
298924
  const keys = Object.keys(exportsValue);
298907
298925
  return keys.some((key) => key !== "__esModule");
298908
298926
  }
298909
- function finalizeForgeJsImport(moduleExports, importedDims) {
298910
- if (!(moduleExports instanceof Shape)) return moduleExports;
298911
- if (importedDims.length === 0) return moduleExports;
298912
- return setShapeDimensions(moduleExports, [...getShapeDimensions(moduleExports), ...importedDims]);
298913
- }
298914
298927
  function mapScriptResultToScene(args) {
298915
298928
  var _a3;
298916
298929
  const objects = [];
@@ -299038,6 +299051,19 @@ function mapScriptResultToScene(args) {
299038
299051
  value.solve().toSceneObjects().forEach((item, index2) => processNamedItem(item, `${name}.${index2 + 1}`, `${index2 + 1}`, name, treePath, inheritedTags));
299039
299052
  return;
299040
299053
  }
299054
+ if (value instanceof ImportedAssembly) {
299055
+ const group2 = value.toGroup();
299056
+ group2.children.forEach((child, index2) => {
299057
+ flattenGroupChild(
299058
+ child,
299059
+ groupChildLabel(group2, name, index2),
299060
+ name,
299061
+ [...treePath, shapeGroupChildSegment(group2, index2)],
299062
+ mergeSceneTags(inheritedTags, group2.tagsForChild(index2))
299063
+ );
299064
+ });
299065
+ return;
299066
+ }
299041
299067
  if (value instanceof SolvedAssembly) {
299042
299068
  value.toSceneObjects().forEach((item, index2) => processNamedItem(item, `${name}.${index2 + 1}`, `${index2 + 1}`, name, treePath, inheritedTags));
299043
299069
  return;
@@ -299193,6 +299219,12 @@ function mapScriptResultToScene(args) {
299193
299219
  const label = `Object ${index2 + 1}`;
299194
299220
  processNamedItem(item, label, label);
299195
299221
  });
299222
+ } else if (result instanceof ImportedAssembly) {
299223
+ const group2 = result.toGroup();
299224
+ group2.children.forEach((child, index2) => {
299225
+ const label = rootGroupChildLabel(group2, index2);
299226
+ flattenGroupChild(child, label, void 0, [label], group2.tagsForChild(index2));
299227
+ });
299196
299228
  } else if (result instanceof ShapeGroup) {
299197
299229
  result.children.forEach((child, i) => {
299198
299230
  const label = rootGroupChildLabel(result, i);
@@ -299231,7 +299263,7 @@ function mapScriptResultToScene(args) {
299231
299263
  }
299232
299264
  processRenderableTree(item, label, label);
299233
299265
  });
299234
- } else if (result !== null && typeof result === "object" && !Array.isArray(result) && !(result instanceof Shape) && !(result instanceof Sketch) && !(result instanceof SdfShape) && !(result instanceof ShapeGroup) && !(result instanceof GCodeBuilder) && !(result instanceof Assembly) && !(result instanceof SolvedAssembly)) {
299266
+ } else if (result !== null && typeof result === "object" && !Array.isArray(result) && !(result instanceof Shape) && !(result instanceof Sketch) && !(result instanceof SdfShape) && !(result instanceof ShapeGroup) && !(result instanceof GCodeBuilder) && !(result instanceof Assembly) && !(result instanceof ImportedAssembly) && !(result instanceof SolvedAssembly)) {
299235
299267
  const obj = result;
299236
299268
  const defaultValue = obj.default;
299237
299269
  if (defaultValue && isRenderableEntryResult(defaultValue)) {
@@ -299319,7 +299351,7 @@ Fix one:
299319
299351
  sketch: objects.length === 1 ? objects[0].sketch : null,
299320
299352
  objects,
299321
299353
  extraDimensions: shapeDimensions,
299322
- error: objects.length > 0 || args.allowEmptyResult ? null : "No renderable objects found. Return a Shape, Sketch, SdfShape, array, or object tree containing renderable values."
299354
+ error: objects.length > 0 || args.allowEmptyResult ? null : "No renderable objects found. Return a Shape, Sketch, SdfShape, Assembly, ImportedAssembly, array, or object tree containing renderable values."
299323
299355
  };
299324
299356
  }
299325
299357
  const FORGE_RUNTIME_MODULE_SPECIFIERS = /* @__PURE__ */ new Set(["forgecad", "@forge/runtime", "@forgecad/runtime"]);
@@ -299616,6 +299648,7 @@ function executeFile(code, fileName, allFiles, visited, scope = {}, options, exe
299616
299648
  composeChain,
299617
299649
  assembly,
299618
299650
  Assembly,
299651
+ ImportedAssembly,
299619
299652
  port: () => {
299620
299653
  throw new Error("port() has been renamed to connector(). Update your script.");
299621
299654
  },