forgecad 0.9.7 → 0.9.8
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/README.md +1 -0
- package/dist/assets/{AdminPage-DX0mpSZT.js → AdminPage-CXaVLMiV.js} +1 -1
- package/dist/assets/{BlogPage-CI_P0_Pf.js → BlogPage-Crpr3JjH.js} +1 -1
- package/dist/assets/{DocsPage-DLhIIZyJ.js → DocsPage-CNBKuitP.js} +2 -2
- package/dist/assets/{EditorApp-DfFT2Dn8.css → EditorApp-D11wL4Qn.css} +51 -0
- package/dist/assets/{EditorApp-BujZvuwX.js → EditorApp-DVMnXOmO.js} +151 -9
- package/dist/assets/{EmbedViewer-0S0qXKog.js → EmbedViewer-KXFLSnpo.js} +2 -2
- package/dist/assets/{LandingPageProofDriven-O_yMtAri.js → LandingPageProofDriven-2q2sn7aW.js} +1 -1
- package/dist/assets/{PricingPage-DGkX3Ahr.js → PricingPage-CVvgdv0i.js} +1 -1
- package/dist/assets/{SettingsPage-DBsqTB_y.js → SettingsPage-BVj1FtEv.js} +1 -1
- package/dist/assets/__vite-browser-external-Dhvy_jtL.js +4 -0
- package/dist/assets/{app-BE2nD6Yz.js → app-Dn4EwHhN.js} +707 -458
- package/dist/assets/cli/{render-iP9qh475.js → render-BI3gLMXz.js} +1011 -145
- package/dist/assets/constructionHistoryWorker-z9_LGiRd.js +42984 -0
- package/dist/assets/{evalWorker-Ds5U4xtN.js → evalWorker-CtO7GsJR.js} +42 -9
- package/dist/assets/{inspectWorker-Dll4eVyD.js → inspectWorker-BZ2CkQZr.js} +785 -111
- package/dist/assets/{manifold-sJ-axdXM.js → manifold-BVi4_OeB.js} +1 -1
- package/dist/assets/{manifold-DjYsd7A_.js → manifold-C6-sZYQN.js} +2 -2
- package/dist/assets/manifold-Cp_dCC7i.js +3018 -0
- package/dist/assets/{manifold-Bk26ViCr.js → manifold-DAzn2Fsa.js} +1 -1
- package/dist/assets/{renderSceneState-Bngp5MrQ.js → renderSceneState-BIvOkPK3.js} +1 -1
- package/dist/assets/{reportWorker-CU8RZ4O0.js → reportWorker-Bz9tGiHb.js} +42 -9
- package/dist/assets/{sectionPlaneMath-BdTjyVfs.js → scalar-sampling-budget-iBAeF8RM.js} +483 -71
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +1 -1
- package/dist/docs-raw/CLI.md +10 -10
- package/dist/docs-raw/coding-best-practices.md +1 -1
- package/dist/docs-raw/guides/inspection-bundles.md +77 -19
- package/dist/docs-raw/guides/skill-maintenance.md +1 -1
- package/dist/docs-raw/runbook.md +2 -2
- package/dist/docs-raw/skills/forgecad-make-a-model.md +11 -0
- package/dist/docs-raw/skills/forgecad-render-inspect.md +12 -6
- package/dist/docs-raw/skills/index.md +1 -1
- package/dist/index.html +1 -1
- package/dist/sitemap.xml +6 -6
- package/dist-cli/forgecad.js +596 -354
- package/dist-cli/forgecad.js.map +1 -1
- package/dist-skill/CONTEXT.md +77 -19
- package/dist-skill/docs/CLI.md +10 -10
- package/dist-skill/docs/guides/inspection-bundles.md +77 -19
- package/dist-skill/docs-dev/CLI.md +10 -10
- package/dist-skill/docs-dev/coding-best-practices.md +1 -1
- package/dist-skill/docs-dev/guides/inspection-bundles.md +77 -19
- package/dist-skill/docs-dev/guides/skill-maintenance.md +1 -1
- package/dist-skill/library/forgecad-make-a-model/SKILL.md +11 -0
- package/dist-skill/library/forgecad-render-inspect/SKILL.md +12 -6
- package/package.json +6 -3
|
@@ -12,7 +12,7 @@ var Module = (() => {
|
|
|
12
12
|
var ENVIRONMENT_IS_WORKER = typeof WorkerGlobalScope != "undefined";
|
|
13
13
|
var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type != "renderer";
|
|
14
14
|
if (ENVIRONMENT_IS_NODE) {
|
|
15
|
-
const { createRequire } = await import("./reportWorker-
|
|
15
|
+
const { createRequire } = await import("./reportWorker-Bz9tGiHb.js").then(function(n) {
|
|
16
16
|
return n._;
|
|
17
17
|
});
|
|
18
18
|
var require2 = createRequire(import.meta.url);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bw as parseViewportCameraState } from "./scalar-sampling-budget-iBAeF8RM.js";
|
|
2
2
|
const roundNumber = (value, digits) => {
|
|
3
3
|
const scale = 10 ** digits;
|
|
4
4
|
return Math.round(value * scale) / scale;
|
|
@@ -10030,7 +10030,7 @@ let _wasm$1 = null;
|
|
|
10030
10030
|
async function initManifoldWasm() {
|
|
10031
10031
|
if (_wasm$1) return _wasm$1;
|
|
10032
10032
|
performance.mark("manifold:start");
|
|
10033
|
-
const Module = (await import("./manifold-
|
|
10033
|
+
const Module = (await import("./manifold-DAzn2Fsa.js")).default;
|
|
10034
10034
|
performance.mark("manifold:imported");
|
|
10035
10035
|
const wasm = await Module();
|
|
10036
10036
|
wasm.setup();
|
|
@@ -60880,6 +60880,16 @@ const RENDER_STYLE_OPTIONS = [
|
|
|
60880
60880
|
id: "glass",
|
|
60881
60881
|
label: "Glass",
|
|
60882
60882
|
description: "Showcase lighting for authored transparent materials."
|
|
60883
|
+
},
|
|
60884
|
+
{
|
|
60885
|
+
id: "precision",
|
|
60886
|
+
label: "Precision",
|
|
60887
|
+
description: "Dense, thin surface-field contours for technical inspection."
|
|
60888
|
+
},
|
|
60889
|
+
{
|
|
60890
|
+
id: "hybrid",
|
|
60891
|
+
label: "Hybrid",
|
|
60892
|
+
description: "Topo-led surface contours with a quiet orthogonal field."
|
|
60883
60893
|
}
|
|
60884
60894
|
];
|
|
60885
60895
|
new Set(RENDER_STYLE_OPTIONS.map((option) => option.id));
|
|
@@ -306891,6 +306901,14 @@ function createForgeRuntimeModule(bindings) {
|
|
|
306891
306901
|
runtime.default = runtime;
|
|
306892
306902
|
return runtime;
|
|
306893
306903
|
}
|
|
306904
|
+
function finalizeForgeJsImport(moduleExports, importedDims) {
|
|
306905
|
+
if (moduleExports instanceof Assembly) {
|
|
306906
|
+
return new ImportedAssembly(moduleExports, moduleExports.getReferences());
|
|
306907
|
+
}
|
|
306908
|
+
if (!(moduleExports instanceof Shape)) return moduleExports;
|
|
306909
|
+
if (importedDims.length === 0) return moduleExports;
|
|
306910
|
+
return setShapeDimensions(moduleExports, [...getShapeDimensions(moduleExports), ...importedDims]);
|
|
306911
|
+
}
|
|
306894
306912
|
function classifySdfPreviewNode(node) {
|
|
306895
306913
|
switch (node.kind) {
|
|
306896
306914
|
case "sdf:sphere":
|
|
@@ -307066,7 +307084,7 @@ function isRenderableEntryResult(value) {
|
|
|
307066
307084
|
return containsRenderableLeaf(value, /* @__PURE__ */ new WeakSet());
|
|
307067
307085
|
}
|
|
307068
307086
|
function containsRenderableLeaf(value, seen) {
|
|
307069
|
-
if (value instanceof Shape || value instanceof Sketch || value instanceof SdfShape || value instanceof ShapeGroup || value instanceof GCodeBuilder || value instanceof Assembly || value instanceof SolvedAssembly) {
|
|
307087
|
+
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) {
|
|
307070
307088
|
return true;
|
|
307071
307089
|
}
|
|
307072
307090
|
if (!value || typeof value !== "object") return false;
|
|
@@ -307088,11 +307106,6 @@ function hasExplicitModuleExports(exportsValue, initialExportsRef) {
|
|
|
307088
307106
|
const keys = Object.keys(exportsValue);
|
|
307089
307107
|
return keys.some((key) => key !== "__esModule");
|
|
307090
307108
|
}
|
|
307091
|
-
function finalizeForgeJsImport(moduleExports, importedDims) {
|
|
307092
|
-
if (!(moduleExports instanceof Shape)) return moduleExports;
|
|
307093
|
-
if (importedDims.length === 0) return moduleExports;
|
|
307094
|
-
return setShapeDimensions(moduleExports, [...getShapeDimensions(moduleExports), ...importedDims]);
|
|
307095
|
-
}
|
|
307096
307109
|
function mapScriptResultToScene(args) {
|
|
307097
307110
|
var _a3;
|
|
307098
307111
|
const objects = [];
|
|
@@ -307220,6 +307233,19 @@ function mapScriptResultToScene(args) {
|
|
|
307220
307233
|
value.solve().toSceneObjects().forEach((item, index2) => processNamedItem(item, `${name}.${index2 + 1}`, `${index2 + 1}`, name, treePath, inheritedTags));
|
|
307221
307234
|
return;
|
|
307222
307235
|
}
|
|
307236
|
+
if (value instanceof ImportedAssembly) {
|
|
307237
|
+
const group2 = value.toGroup();
|
|
307238
|
+
group2.children.forEach((child, index2) => {
|
|
307239
|
+
flattenGroupChild(
|
|
307240
|
+
child,
|
|
307241
|
+
groupChildLabel(group2, name, index2),
|
|
307242
|
+
name,
|
|
307243
|
+
[...treePath, shapeGroupChildSegment(group2, index2)],
|
|
307244
|
+
mergeSceneTags(inheritedTags, group2.tagsForChild(index2))
|
|
307245
|
+
);
|
|
307246
|
+
});
|
|
307247
|
+
return;
|
|
307248
|
+
}
|
|
307223
307249
|
if (value instanceof SolvedAssembly) {
|
|
307224
307250
|
value.toSceneObjects().forEach((item, index2) => processNamedItem(item, `${name}.${index2 + 1}`, `${index2 + 1}`, name, treePath, inheritedTags));
|
|
307225
307251
|
return;
|
|
@@ -307375,6 +307401,12 @@ function mapScriptResultToScene(args) {
|
|
|
307375
307401
|
const label = `Object ${index2 + 1}`;
|
|
307376
307402
|
processNamedItem(item, label, label);
|
|
307377
307403
|
});
|
|
307404
|
+
} else if (result instanceof ImportedAssembly) {
|
|
307405
|
+
const group2 = result.toGroup();
|
|
307406
|
+
group2.children.forEach((child, index2) => {
|
|
307407
|
+
const label = rootGroupChildLabel(group2, index2);
|
|
307408
|
+
flattenGroupChild(child, label, void 0, [label], group2.tagsForChild(index2));
|
|
307409
|
+
});
|
|
307378
307410
|
} else if (result instanceof ShapeGroup) {
|
|
307379
307411
|
result.children.forEach((child, i) => {
|
|
307380
307412
|
const label = rootGroupChildLabel(result, i);
|
|
@@ -307413,7 +307445,7 @@ function mapScriptResultToScene(args) {
|
|
|
307413
307445
|
}
|
|
307414
307446
|
processRenderableTree(item, label, label);
|
|
307415
307447
|
});
|
|
307416
|
-
} 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)) {
|
|
307448
|
+
} 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)) {
|
|
307417
307449
|
const obj = result;
|
|
307418
307450
|
const defaultValue = obj.default;
|
|
307419
307451
|
if (defaultValue && isRenderableEntryResult(defaultValue)) {
|
|
@@ -307501,7 +307533,7 @@ Fix one:
|
|
|
307501
307533
|
sketch: objects.length === 1 ? objects[0].sketch : null,
|
|
307502
307534
|
objects,
|
|
307503
307535
|
extraDimensions: shapeDimensions,
|
|
307504
|
-
error: objects.length > 0 || args.allowEmptyResult ? null : "No renderable objects found. Return a Shape, Sketch, SdfShape, array, or object tree containing renderable values."
|
|
307536
|
+
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."
|
|
307505
307537
|
};
|
|
307506
307538
|
}
|
|
307507
307539
|
const FORGE_RUNTIME_MODULE_SPECIFIERS = /* @__PURE__ */ new Set(["forgecad", "@forge/runtime", "@forgecad/runtime"]);
|
|
@@ -307798,6 +307830,7 @@ function executeFile(code, fileName, allFiles, visited, scope = {}, options, exe
|
|
|
307798
307830
|
composeChain,
|
|
307799
307831
|
assembly,
|
|
307800
307832
|
Assembly,
|
|
307833
|
+
ImportedAssembly,
|
|
307801
307834
|
port: () => {
|
|
307802
307835
|
throw new Error("port() has been renamed to connector(). Update your script.");
|
|
307803
307836
|
},
|