forgecad 0.9.16 → 0.10.1
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/assets/{AdminPage-CXvls4-J.js → AdminPage-DcCnj0qo.js} +1 -1
- package/dist/assets/{BenchmarkPage-B27zk8xL.js → BenchmarkPage-BVEpJSVk.js} +1 -1
- package/dist/assets/{BlogPage-CMAVvgQL.js → BlogPage-DHaGP50_.js} +1 -1
- package/dist/assets/{DocsPage-knf4I4h7.js → DocsPage-CDoxHkz8.js} +40 -859
- package/dist/assets/EditorApp-BJ0Dloyh.js +16446 -0
- package/dist/assets/{EmbedViewer-D7ZGlFjx.js → EmbedViewer-CRKZbY0y.js} +2 -2
- package/dist/assets/{LandingPageProofDriven-CnevhTE8.js → LandingPageProofDriven-BxHkYRE7.js} +1 -1
- package/dist/assets/{LegalPage-BPTUmqeg.js → LegalPage-B-u6FrVv.js} +1 -1
- package/dist/assets/{PricingPage-B0D4goG_.js → PricingPage-CzpZ6-Ce.js} +1 -1
- package/dist/assets/{SettingsPage-CFF-UgjI.js → SettingsPage-CIZSSAd0.js} +1 -1
- package/dist/assets/{app-CE3sYcV7.css → app-CjsbDlb7.css} +143 -0
- package/dist/assets/{app-T0pDcSX4.js → app-DaTMg3nH.js} +1310 -290
- package/dist/assets/cli/{render-C5pcIISc.js → render-DPf4AYJK.js} +55 -60
- package/dist/assets/{constructionHistoryWorker-Ba2Hm58b.js → constructionHistoryWorker-AwMMWSxg.js} +1103 -349
- package/dist/assets/{evalWorker-vkx310U2.js → evalWorker-CjZZWRWW.js} +5209 -2643
- package/dist/assets/{inspectWorker-BuTJDVX6.js → inspectWorker-CZsCFtQT.js} +1163 -409
- package/dist/assets/{jointPose-B_Cgedn9.js → jointPose-DzQOViQH.js} +1 -1
- package/dist/assets/{manifold-BWgsjmAM.js → manifold-BYlzU521.js} +1 -1
- package/dist/assets/{manifold-D6IFSkhH.js → manifold-DgXo0T5P.js} +2 -2
- package/dist/assets/{manifold-rZexZI0G.js → manifold-K1SkarlQ.js} +1 -1
- package/dist/assets/{reportWorker-0AGij1Ru.js → reportWorker-B9nWwSrB.js} +8501 -3393
- package/dist/assets/{scalar-sampling-budget-J5cuzxT1.js → scalar-sampling-budget-prBw_s8t.js} +6067 -3479
- package/dist/assets/{scanProxyWorker-Vl4Wxa1y.js → scanProxyWorker-2GtDLk-R.js} +1 -1
- package/dist/assets/{javascript-1kQXfVaz.js → typescript-DBQ6RN5l.js} +874 -22
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +3 -3
- package/dist/docs-raw/AI/usage.md +1 -1
- package/dist/docs-raw/CLI.md +77 -240
- package/dist/docs-raw/README.md +6 -0
- package/dist/docs-raw/component-model.md +17 -150
- package/dist/docs-raw/generated/assembly.md +188 -582
- package/dist/docs-raw/generated/concepts.md +259 -3501
- package/dist/docs-raw/generated/core.md +283 -1250
- package/dist/docs-raw/generated/curves.md +387 -1608
- package/dist/docs-raw/generated/legacy.md +162 -0
- package/dist/docs-raw/generated/lib.md +227 -85
- package/dist/docs-raw/generated/output.md +35 -99
- package/dist/docs-raw/generated/runtime-names.md +23 -23
- package/dist/docs-raw/generated/sdf.md +68 -284
- package/dist/docs-raw/generated/sheet-metal.md +68 -335
- package/dist/docs-raw/generated/sketch.md +240 -1161
- package/dist/docs-raw/generated/viewport.md +75 -316
- package/dist/docs-raw/generated/wood.md +21 -49
- package/dist/docs-raw/guides/coordinate-system.md +4 -42
- package/dist/docs-raw/guides/inspection-bundles.md +44 -442
- package/dist/docs-raw/guides/joint-design.md +18 -79
- package/dist/docs-raw/guides/positioning.md +21 -143
- package/dist/docs-raw/guides/scene-presentation.md +89 -0
- package/dist/docs-raw/guides/simready-quickstart.md +171 -0
- package/dist/docs-raw/simulation-workflow.md +273 -0
- package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
- package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
- package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
- package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
- package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
- package/dist/docs-raw/skills/forgecad-lld.md +19 -113
- package/dist/docs-raw/skills/forgecad-make-a-model.md +112 -532
- package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
- package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
- package/dist/docs-raw/skills/forgecad-project.md +13 -131
- package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
- package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
- package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
- package/dist/docs-raw/skills/forgecad.md +19 -18
- package/dist/docs-raw/skills/index.md +2 -0
- package/dist/docs-raw/welcome.md +2 -2
- package/dist/index.html +2 -2
- package/dist/llms.txt +1 -2
- package/dist/sitemap.xml +25 -13
- package/dist-cli/{check-compiler-SYQ2PWOB.js → check-compiler-II7NLPAB.js} +1 -1
- package/dist-cli/{check-query-propagation-HIAGV62W.js → check-query-propagation-7462TR3R.js} +1 -1
- package/dist-cli/{chunk-SPZE3DUY.js → chunk-UWTJCGXF.js} +5848 -2915
- package/dist-cli/forgecad.js +3496 -703
- package/dist-skill/CONTEXT.md +1797 -7963
- package/dist-skill/SKILL.md +15 -15
- package/dist-skill/docs/API/core/concepts.md +27 -157
- package/dist-skill/docs/CLI.md +77 -240
- package/dist-skill/docs/generated/assembly.md +182 -532
- package/dist-skill/docs/generated/core.md +283 -1250
- package/dist-skill/docs/generated/curves.md +387 -1609
- package/dist-skill/docs/generated/lib.md +227 -85
- package/dist-skill/docs/generated/output.md +35 -99
- package/dist-skill/docs/generated/runtime-names.md +16 -21
- package/dist-skill/docs/generated/sdf.md +68 -284
- package/dist-skill/docs/generated/sheet-metal.md +68 -335
- package/dist-skill/docs/generated/sketch.md +240 -1160
- package/dist-skill/docs/generated/viewport.md +75 -223
- package/dist-skill/docs/generated/wood.md +21 -49
- package/dist-skill/docs/guides/coordinate-system.md +4 -42
- package/dist-skill/docs/guides/inspection-bundles.md +44 -442
- package/dist-skill/docs/guides/joint-design.md +18 -79
- package/dist-skill/docs/guides/positioning.md +21 -143
- package/dist-skill/docs/guides/scene-presentation.md +89 -0
- package/dist-skill/docs/guides/surface-members.md +26 -0
- package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
- package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
- package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
- package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
- package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
- package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
- package/dist-skill/library/forgecad-make-a-model/SKILL.md +110 -532
- package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
- package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
- package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
- package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
- package/dist-skill/library/forgecad-project/SKILL.md +13 -133
- package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
- package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
- package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
- package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
- package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
- package/dist-skill/website/skills/forgecad-component-model.md +53 -0
- package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
- package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
- package/dist-skill/website/skills/forgecad-lld.md +41 -0
- package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
- package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
- package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
- package/dist-skill/website/skills/forgecad-project.md +26 -0
- package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
- package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
- package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
- package/dist-skill/website/skills/forgecad.md +122 -0
- package/dist-skill/website/skills/index.md +26 -0
- package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
- package/examples/api/conformal-product-ribbon.forge.js +1 -1
- package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
- package/examples/api/extrude-options.forge.js +4 -2
- package/examples/api/field-loft-drive-tip.forge.js +40 -0
- package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
- package/examples/api/highlight-debug.forge.js +10 -10
- package/examples/api/mesh-import-slats.forge.js +1 -1
- package/examples/api/real-product-curves.forge.js +1 -1
- package/examples/api/sculpt-box-circle-booleans.forge.js +1 -1
- package/examples/api/sdf-shapes.forge.js +2 -5
- package/examples/api/sketch-rounding-strategies.forge.js +6 -6
- package/examples/api/surface-member-bottle-cage.forge.js +3 -3
- package/examples/api/surface-member-conformal-product-ribbon.forge.js +3 -3
- package/examples/api/surface-member-razor-inlay.forge.js +1 -1
- package/examples/api/variable-sweep-test.forge.js +3 -3
- package/examples/mechanical/airplane-propeller.forge.js +74 -39
- package/examples/nurbs-surface.forge.js +1 -1
- package/examples/products/iphone.forge.js +1 -1
- package/examples/robotics/README.md +46 -0
- package/examples/robotics/scout-cam-rover-simready/README.md +119 -0
- package/examples/robotics/scout-cam-rover-simready/lib/dims.js +140 -0
- package/examples/robotics/scout-cam-rover-simready/main.forge.js +343 -0
- package/examples/robotics/scout-cam-rover-simready/parts/body.forge.js +304 -0
- package/examples/robotics/scout-cam-rover-simready/parts/chassis.forge.js +320 -0
- package/examples/robotics/scout-cam-rover-simready/parts/hardware.forge.js +21 -0
- package/examples/robotics/scout-cam-rover-simready/parts/turret.forge.js +70 -0
- package/examples/robotics/scout-cam-rover-simready/parts/wheel.forge.js +116 -0
- package/examples/robotics/simready-asset-crate.forge.js +79 -0
- package/examples/robotics/simready-diff-drive-rover.forge.js +141 -0
- package/examples/robotics/simready-parallel-gripper.forge.js +102 -0
- package/package.json +1 -1
- package/dist/assets/EditorApp-BHMQlJ-D.js +0 -14686
- package/dist/docs-raw/guides/geometry-conventions.md +0 -52
- package/dist/docs-raw/guides/modeling-recipes.md +0 -78
- package/dist-skill/docs/guides/geometry-conventions.md +0 -52
- package/dist-skill/docs/guides/modeling-recipes.md +0 -78
- package/dist-skill/library/forgecad-visual-spec/references/prompt-template.md +0 -79
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { D as DoubleSide,
|
|
5
|
-
import { m as mergeViewportRenderSceneStates, v as validateJointOverrides, b as buildBaseJointValues, p as parseRenderSceneCliSpec, g as getSceneObjectTreePath } from "../jointPose-
|
|
4
|
+
import { D as DoubleSide, cE as initSolverWasm, cD as initKernel, S as Scene, cF as BoxGeometry, bW as MeshStandardMaterial, a4 as BackSide, b7 as PointLight, M as Mesh, aa as MeshBasicMaterial, cG as localAabbPlaneRelation, h as Vector2, cH as ShapeUtils, cI as analyzePhysicalConnectivity, g as Vector3, $ as Matrix4, cJ as Frustum, G as Box3, a0 as MathUtils, cK as meshContactDataFor, cL as AabbSpatialIndex, cM as detectPhysicalContact, cN as resolveThicknessInspectionOptions, R as Raycaster, cO as thicknessColor, cP as thicknessClass, a$ as BufferAttribute, cQ as roughnessClassForAngle, cR as resolveRoughnessInspectionOptions, cS as roughnessColorForAngle, cT as roughnessScoreForAngle, cU as activateBackend, e as Color, ba as COMPARISON_COLORS, ay as resolveForgeRenderStyle, by as getRenderStylePreset, ax as setParamOverrides, bl as runScript, cn as scanProxyGridForBounds, cV as Group, be as shapeToGeometry, bm as MeshPhysicalMaterial, bw as AdditiveBlending, bB as scanMaterialShellColor, cW as createScanProxyGeometry, aO as LineBasicMaterial, bA as NormalBlending, bn as LineSegments, aN as BufferGeometry, P as PerspectiveCamera, ck as DEFAULT_VIEW_CONFIG, bs as worldAuthorPlaneToLocal, cX as resolveSectionHatchMetrics, cv as buildGeometryComparisonPointCloud, ct as triangleSoupFromMeshes, O as OrthographicCamera, k as ShaderMaterial, bH as ZEBRA_STRIPE_FRAGMENT_SHADER, bI as ZEBRA_STRIPE_VERTEX_SHADER, bC as ZEBRA_STRIPE_SOFTNESS, bD as ZEBRA_STRIPE_SCALE, bE as ZEBRA_LIGHT_COLOR, bF as ZEBRA_DARK_COLOR, bG as ZEBRA_ACCENT_COLOR, bx as geometryWithVisibleVertexColors, cY as intersectWithPlane, cZ as setActiveBackend, W as WebGLRenderer, A as ACESFilmicToneMapping, c as SRGBColorSpace, c_ as parseCameraCliSpec, c$ as PMREMGenerator, b0 as CanvasTexture, b1 as Object3D, b2 as FogExp2, b3 as Fog, b4 as AmbientLight, b8 as DirectionalLight, b5 as HemisphereLight, aI as findJointAnimationClip, p as Plane, bL as SURFACE_FIELD_FRAGMENT_SHADER, bM as SURFACE_FIELD_VERTEX_SHADER, bK as scanMaterialLayerStyles, bJ as SCAN_PROXY_LAYER_STYLES, Y as Vector4, bZ as SDF_RAYMARCH_PROXY_VERTEX_SHADER, bY as buildSdfRaymarchFragmentShader, aJ as resolveJointAnimation, aK as resolveJointViewValues, bR as ROUGHNESS_COLORS, d0 as PointsMaterial, d1 as Points, b9 as heatPointsForSide, d2 as analyzeCollisionIntersections, d3 as serializeCollisionFinding, d4 as summarizeThicknessSamples, bQ as THICKNESS_GRADIENT_COLORS, d5 as THICKNESS_COLORS, b6 as SpotLight, c1 as CylinderGeometry, d6 as TorusGeometry, bO as CatmullRomCurve3, bP as TubeGeometry, cz as resolveScalarSceneSampleBudget, bf as buildComparisonHeatPatchGeometry, bg as EdgesGeometry, d7 as SphereGeometry, d8 as ConeGeometry, bb as comparisonHeatDepthTest, bc as comparisonHeatEdgeOpacity, bd as comparisonHeatPatchOpacity, cB as comparisonCandidateContextOpacity, d9 as DEFAULT_COMPARISON_CANDIDATE_OPACITY } from "../scalar-sampling-budget-prBw_s8t.js";
|
|
5
|
+
import { m as mergeViewportRenderSceneStates, v as validateJointOverrides, b as buildBaseJointValues, p as parseRenderSceneCliSpec, g as getSceneObjectTreePath } from "../jointPose-DzQOViQH.js";
|
|
6
6
|
const CAD_MATERIAL_PROPS = {
|
|
7
7
|
color: 6003669,
|
|
8
8
|
metalness: 0.05,
|
|
@@ -754,6 +754,9 @@ function analyzeCameraFraming(camera, objects) {
|
|
|
754
754
|
fullyOutOfFrame
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
|
+
function selectRenderSceneBoundsEntries(entries) {
|
|
758
|
+
return entries.filter((entry) => entry.visible);
|
|
759
|
+
}
|
|
757
760
|
const DEFAULT_CONTACT_TOLERANCE = 0.05;
|
|
758
761
|
const DEFAULT_BED_TOLERANCE = 0.05;
|
|
759
762
|
const DEFAULT_GROUND_Z = 0;
|
|
@@ -2304,7 +2307,7 @@ function directCadKindForPath(path) {
|
|
|
2304
2307
|
return null;
|
|
2305
2308
|
}
|
|
2306
2309
|
function directCadReferenceCode(path, kind) {
|
|
2307
|
-
const fn = kind === "step" ? "
|
|
2310
|
+
const fn = kind === "step" ? "Import.step" : "Import.mesh";
|
|
2308
2311
|
const name = pathBasename(path);
|
|
2309
2312
|
return [`const imported = ${fn}(${JSON.stringify(path)});`, `return [{ name: ${JSON.stringify(name)}, shape: imported }];`].join("\n");
|
|
2310
2313
|
}
|
|
@@ -4248,18 +4251,15 @@ function createSurfaceFieldMaterial({
|
|
|
4248
4251
|
function createScanProxyMaterial({
|
|
4249
4252
|
color,
|
|
4250
4253
|
opacity,
|
|
4251
|
-
clippingPlanes
|
|
4252
|
-
wireframe = false,
|
|
4253
|
-
additiveWire = true
|
|
4254
|
+
clippingPlanes
|
|
4254
4255
|
}) {
|
|
4255
4256
|
return new MeshBasicMaterial({
|
|
4256
4257
|
color,
|
|
4257
4258
|
transparent: true,
|
|
4258
4259
|
opacity,
|
|
4259
|
-
wireframe,
|
|
4260
4260
|
side: DoubleSide,
|
|
4261
4261
|
depthWrite: false,
|
|
4262
|
-
blending:
|
|
4262
|
+
blending: AdditiveBlending,
|
|
4263
4263
|
toneMapped: false,
|
|
4264
4264
|
clippingPlanes
|
|
4265
4265
|
});
|
|
@@ -4267,32 +4267,20 @@ function createScanProxyMaterial({
|
|
|
4267
4267
|
function createScanProxyGroup(proxy, clippingPlanes, objectColor) {
|
|
4268
4268
|
const group = new Group();
|
|
4269
4269
|
group.userData = { scanProxyTelemetry: proxy.telemetry };
|
|
4270
|
-
const
|
|
4271
|
-
for (const layer of
|
|
4270
|
+
const layers = objectColor ? scanMaterialLayerStyles(objectColor) : SCAN_PROXY_LAYER_STYLES;
|
|
4271
|
+
for (const layer of layers) {
|
|
4272
4272
|
const geometry = proxy.geometries[layer.material];
|
|
4273
4273
|
if (!geometry) continue;
|
|
4274
4274
|
const fill = new Mesh(
|
|
4275
4275
|
geometry,
|
|
4276
4276
|
createScanProxyMaterial({
|
|
4277
|
-
color:
|
|
4278
|
-
opacity: layer.fillOpacity,
|
|
4277
|
+
color: layer.color,
|
|
4278
|
+
opacity: Math.min(0.1, layer.fillOpacity * 0.2),
|
|
4279
4279
|
clippingPlanes
|
|
4280
4280
|
})
|
|
4281
4281
|
);
|
|
4282
4282
|
fill.raycast = () => null;
|
|
4283
4283
|
group.add(fill);
|
|
4284
|
-
const wire = new Mesh(
|
|
4285
|
-
geometry,
|
|
4286
|
-
createScanProxyMaterial({
|
|
4287
|
-
color: objectColor ?? layer.color,
|
|
4288
|
-
opacity: layer.wireOpacity,
|
|
4289
|
-
wireframe: true,
|
|
4290
|
-
additiveWire,
|
|
4291
|
-
clippingPlanes
|
|
4292
|
-
})
|
|
4293
|
-
);
|
|
4294
|
-
wire.raycast = () => null;
|
|
4295
|
-
group.add(wire);
|
|
4296
4284
|
}
|
|
4297
4285
|
return group;
|
|
4298
4286
|
}
|
|
@@ -5108,7 +5096,7 @@ Available renderable objects: ${available}`;
|
|
|
5108
5096
|
return "No visible renderable objects found.";
|
|
5109
5097
|
}
|
|
5110
5098
|
function createSession(code, opts) {
|
|
5111
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
5099
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
5112
5100
|
const size = (opts == null ? void 0 : opts.size) ?? 1024;
|
|
5113
5101
|
const pixelRatio = (opts == null ? void 0 : opts.pixelRatio) ?? 1;
|
|
5114
5102
|
const debug = createCaptureDebugLogger(opts == null ? void 0 : opts.debug);
|
|
@@ -5181,7 +5169,7 @@ function createSession(code, opts) {
|
|
|
5181
5169
|
shapeObjects: visibleObjs.filter((entry) => entry.shape != null).length,
|
|
5182
5170
|
sdfObjects: visibleObjs.filter((entry) => entry.sdf != null).length
|
|
5183
5171
|
});
|
|
5184
|
-
const boundsObjs =
|
|
5172
|
+
const boundsObjs = selectRenderSceneBoundsEntries(objs);
|
|
5185
5173
|
const objectVisibility = new Map(objs.map((entry) => [entry.source.id, entry.visible]));
|
|
5186
5174
|
const objectRenderability = new Set(objs.map((entry) => entry.source.id));
|
|
5187
5175
|
const sceneObjects = result.objects.map((obj) => ({
|
|
@@ -5249,6 +5237,24 @@ function createSession(code, opts) {
|
|
|
5249
5237
|
} else {
|
|
5250
5238
|
addRenderStyleLights(scene, renderStyle);
|
|
5251
5239
|
}
|
|
5240
|
+
const sceneStyleIgnoredFeatures = [];
|
|
5241
|
+
if (sceneConfig) {
|
|
5242
|
+
if (!respectAuthoredSceneStyle) {
|
|
5243
|
+
if (sceneConfig.background != null) sceneStyleIgnoredFeatures.push("background");
|
|
5244
|
+
if (sceneConfig.lights != null) sceneStyleIgnoredFeatures.push("lights");
|
|
5245
|
+
if (sceneConfig.environment != null) sceneStyleIgnoredFeatures.push("environment");
|
|
5246
|
+
if (sceneConfig.fog != null) sceneStyleIgnoredFeatures.push("fog");
|
|
5247
|
+
if (sceneConfig.postProcessing != null) sceneStyleIgnoredFeatures.push("post-processing");
|
|
5248
|
+
if (sceneConfig.ground != null) sceneStyleIgnoredFeatures.push("ground");
|
|
5249
|
+
} else {
|
|
5250
|
+
if (sceneConfig.environment != null) sceneStyleIgnoredFeatures.push("environment");
|
|
5251
|
+
if (sceneConfig.ground != null) sceneStyleIgnoredFeatures.push("ground");
|
|
5252
|
+
if (((_c = sceneConfig.postProcessing) == null ? void 0 : _c.bloom) || ((_d = sceneConfig.postProcessing) == null ? void 0 : _d.vignette) || ((_e = sceneConfig.postProcessing) == null ? void 0 : _e.grain)) {
|
|
5253
|
+
sceneStyleIgnoredFeatures.push("post-processing (except toneMappingExposure)");
|
|
5254
|
+
}
|
|
5255
|
+
}
|
|
5256
|
+
}
|
|
5257
|
+
const authoredSceneStyleIgnored = !respectAuthoredSceneStyle && sceneStyleIgnoredFeatures.length > 0;
|
|
5252
5258
|
const sceneSummary = summarizeSceneGeometry(boundsObjs);
|
|
5253
5259
|
debug("session:summary", {
|
|
5254
5260
|
bbox: sceneSummary.bbox,
|
|
@@ -5267,7 +5273,7 @@ function createSession(code, opts) {
|
|
|
5267
5273
|
const distance = perspectiveCameraDistanceForBounds(bbox, [DEFAULT_FIXED_DIR.x, DEFAULT_FIXED_DIR.y, DEFAULT_FIXED_DIR.z], {
|
|
5268
5274
|
fovDeg: fov
|
|
5269
5275
|
});
|
|
5270
|
-
const cameraFov = ((
|
|
5276
|
+
const cameraFov = ((_f = requestedSceneState == null ? void 0 : requestedSceneState.camera) == null ? void 0 : _f.fov) ?? ((_g = sceneConfig == null ? void 0 : sceneConfig.camera) == null ? void 0 : _g.fov) ?? fov;
|
|
5271
5277
|
try {
|
|
5272
5278
|
if (opts == null ? void 0 : opts.cameraToken) {
|
|
5273
5279
|
if (requestedSceneState == null ? void 0 : requestedSceneState.camera) {
|
|
@@ -5295,17 +5301,17 @@ function createSession(code, opts) {
|
|
|
5295
5301
|
} catch (err) {
|
|
5296
5302
|
return { ok: false, error: err instanceof Error ? err.message : String(err) };
|
|
5297
5303
|
}
|
|
5298
|
-
const joints = ((
|
|
5299
|
-
const jointCouplings = ((
|
|
5304
|
+
const joints = ((_h = result.jointsView) == null ? void 0 : _h.enabled) === false ? [] : ((_i = result.jointsView) == null ? void 0 : _i.joints) ?? [];
|
|
5305
|
+
const jointCouplings = ((_j = result.jointsView) == null ? void 0 : _j.enabled) === false ? [] : ((_k = result.jointsView) == null ? void 0 : _k.couplings) ?? [];
|
|
5300
5306
|
try {
|
|
5301
5307
|
validateJointOverrides(result.jointsView, (opts == null ? void 0 : opts.jointOverrides) ?? {});
|
|
5302
5308
|
} catch (err) {
|
|
5303
5309
|
return { ok: false, error: err instanceof Error ? err.message : String(err) };
|
|
5304
5310
|
}
|
|
5305
|
-
const transformJoints = ((
|
|
5306
|
-
const transformJointCouplings = ((
|
|
5307
|
-
const animationClips = ((
|
|
5308
|
-
const defaultAnimation = ((
|
|
5311
|
+
const transformJoints = ((_l = result.jointsView) == null ? void 0 : _l.motionSource) === "assembly" ? [] : joints;
|
|
5312
|
+
const transformJointCouplings = ((_m = result.jointsView) == null ? void 0 : _m.motionSource) === "assembly" ? [] : jointCouplings;
|
|
5313
|
+
const animationClips = ((_n = result.jointsView) == null ? void 0 : _n.enabled) === false ? [] : ((_o = result.jointsView) == null ? void 0 : _o.animations) ?? [];
|
|
5314
|
+
const defaultAnimation = ((_p = result.jointsView) == null ? void 0 : _p.defaultAnimation) ?? null;
|
|
5309
5315
|
let selectedAnimation;
|
|
5310
5316
|
let sweep = null;
|
|
5311
5317
|
let cutawayBase = null;
|
|
@@ -5381,8 +5387,8 @@ function createSession(code, opts) {
|
|
|
5381
5387
|
id: obj.source.id,
|
|
5382
5388
|
name: objectLabel,
|
|
5383
5389
|
ms: Number((performance.now() - geometryStart).toFixed(1)),
|
|
5384
|
-
triangles: Math.floor((((
|
|
5385
|
-
edgeSegments: Math.floor((((
|
|
5390
|
+
triangles: Math.floor((((_q = geo.solid.getAttribute("position")) == null ? void 0 : _q.count) ?? 0) / 3),
|
|
5391
|
+
edgeSegments: Math.floor((((_r = geo.edges.getAttribute("position")) == null ? void 0 : _r.count) ?? 0) / 2)
|
|
5386
5392
|
});
|
|
5387
5393
|
const materialDefaults = renderStylePreset.material;
|
|
5388
5394
|
const surfaceField = renderStylePreset.surfaceField;
|
|
@@ -5413,12 +5419,12 @@ function createSession(code, opts) {
|
|
|
5413
5419
|
...(mp == null ? void 0 : mp.wireframe) && { wireframe: true }
|
|
5414
5420
|
};
|
|
5415
5421
|
solidMaterial = isScanRenderStyle ? new MeshBasicMaterial({
|
|
5416
|
-
color: objectColor,
|
|
5422
|
+
color: scanMaterialShellColor(objectColor),
|
|
5417
5423
|
transparent: true,
|
|
5418
|
-
opacity: 0.
|
|
5424
|
+
opacity: 0.08,
|
|
5419
5425
|
side: DoubleSide,
|
|
5420
5426
|
depthWrite: false,
|
|
5421
|
-
blending:
|
|
5427
|
+
blending: AdditiveBlending,
|
|
5422
5428
|
toneMapped: false,
|
|
5423
5429
|
clippingPlanes: applicableCutPlanes
|
|
5424
5430
|
}) : surfaceField.enabled ? createSurfaceFieldMaterial({
|
|
@@ -5456,22 +5462,7 @@ function createSession(code, opts) {
|
|
|
5456
5462
|
});
|
|
5457
5463
|
}
|
|
5458
5464
|
}
|
|
5459
|
-
if (isScanRenderStyle &&
|
|
5460
|
-
shell = new Mesh(
|
|
5461
|
-
geo.solid,
|
|
5462
|
-
new MeshBasicMaterial({
|
|
5463
|
-
color: objectColor,
|
|
5464
|
-
transparent: true,
|
|
5465
|
-
opacity: 0.08,
|
|
5466
|
-
side: BackSide,
|
|
5467
|
-
depthWrite: false,
|
|
5468
|
-
blending: NormalBlending,
|
|
5469
|
-
clippingPlanes: applicableCutPlanes
|
|
5470
|
-
})
|
|
5471
|
-
);
|
|
5472
|
-
shell.scale.setScalar(0.992);
|
|
5473
|
-
shell.raycast = () => null;
|
|
5474
|
-
} else if (hasAuthoredTransparency && renderStylePreset.glassShell.enabled) {
|
|
5465
|
+
if (!isScanRenderStyle && hasAuthoredTransparency && renderStylePreset.glassShell.enabled) {
|
|
5475
5466
|
shell = new Mesh(
|
|
5476
5467
|
geo.solid,
|
|
5477
5468
|
new MeshBasicMaterial({
|
|
@@ -5489,9 +5480,9 @@ function createSession(code, opts) {
|
|
|
5489
5480
|
}
|
|
5490
5481
|
wireMaterial = new LineBasicMaterial({
|
|
5491
5482
|
...EDGE_MATERIAL_PROPS,
|
|
5492
|
-
color:
|
|
5483
|
+
color: parseColor(renderStylePreset.edge.color, EDGE_MATERIAL_PROPS.color),
|
|
5493
5484
|
transparent: true,
|
|
5494
|
-
opacity: isScanRenderStyle ? 0
|
|
5485
|
+
opacity: isScanRenderStyle ? 0 : Math.min(1, renderStylePreset.edge.opacity * Math.max(0.35, obj.opacity) + 0.1),
|
|
5495
5486
|
depthWrite: false,
|
|
5496
5487
|
blending: NormalBlending,
|
|
5497
5488
|
clippingPlanes: applicableCutPlanes
|
|
@@ -5557,7 +5548,7 @@ function createSession(code, opts) {
|
|
|
5557
5548
|
{ bodyShape: () => new EmptyInspectionShape() }
|
|
5558
5549
|
) : null;
|
|
5559
5550
|
const connectivityEntries = (connectivityBodyInput == null ? void 0 : connectivityBodyInput.entries) ?? [];
|
|
5560
|
-
const groundOffset = Number.isFinite((
|
|
5551
|
+
const groundOffset = Number.isFinite((_s = sceneConfig == null ? void 0 : sceneConfig.ground) == null ? void 0 : _s.offset) ? sceneConfig.ground.offset : 0;
|
|
5561
5552
|
const floatingGroundZ = bbox.min[2] - groundOffset;
|
|
5562
5553
|
let sceneConfigCameraState = null;
|
|
5563
5554
|
if ((sceneConfig == null ? void 0 : sceneConfig.camera) && !(requestedSceneState == null ? void 0 : requestedSceneState.camera)) {
|
|
@@ -5586,7 +5577,7 @@ function createSession(code, opts) {
|
|
|
5586
5577
|
} : null;
|
|
5587
5578
|
const cameraSpec = sceneConfigCameraState && (opts == null ? void 0 : opts.capture) === "section-sweep" ? fitCameraStateToBounds(sceneConfigCameraState, bbox, cameraFov) : (requestedSceneState == null ? void 0 : requestedSceneState.camera) ?? cutawayCameraState ?? sceneConfigCameraState;
|
|
5588
5579
|
const cameraRig = buildCameraRig(center, distance, maxDim, cameraSpec, cameraFov);
|
|
5589
|
-
const explicitCameraFov = (cameraSpec == null ? void 0 : cameraSpec.fov) ?? ((
|
|
5580
|
+
const explicitCameraFov = (cameraSpec == null ? void 0 : cameraSpec.fov) ?? ((_t = sceneConfig == null ? void 0 : sceneConfig.camera) == null ? void 0 : _t.fov);
|
|
5590
5581
|
if (explicitCameraFov && cameraRig.camera instanceof PerspectiveCamera) {
|
|
5591
5582
|
cameraRig.camera.fov = explicitCameraFov;
|
|
5592
5583
|
cameraRig.camera.updateProjectionMatrix();
|
|
@@ -5621,7 +5612,7 @@ function createSession(code, opts) {
|
|
|
5621
5612
|
jointCouplings,
|
|
5622
5613
|
transformJoints,
|
|
5623
5614
|
transformJointCouplings,
|
|
5624
|
-
jointOverlayConfig: ((
|
|
5615
|
+
jointOverlayConfig: ((_u = result.viewConfig) == null ? void 0 : _u.jointOverlay) ?? DEFAULT_VIEW_CONFIG.jointOverlay,
|
|
5625
5616
|
animationClips,
|
|
5626
5617
|
defaultAnimation,
|
|
5627
5618
|
selectedAnimation,
|
|
@@ -5635,7 +5626,9 @@ function createSession(code, opts) {
|
|
|
5635
5626
|
sweep,
|
|
5636
5627
|
cutaway,
|
|
5637
5628
|
captureDefaults: (sceneConfig == null ? void 0 : sceneConfig.capture) ?? null,
|
|
5638
|
-
renderStyle
|
|
5629
|
+
renderStyle,
|
|
5630
|
+
authoredSceneStyleIgnored,
|
|
5631
|
+
sceneStyleIgnoredFeatures
|
|
5639
5632
|
};
|
|
5640
5633
|
debug("session:renderables:end", { renderables: renderables.length });
|
|
5641
5634
|
setSessionMode(session, "solid");
|
|
@@ -6053,6 +6046,8 @@ window.__forgeRender = async (code, opts) => {
|
|
|
6053
6046
|
method: "bbox-frustum-v1",
|
|
6054
6047
|
views: framingViews
|
|
6055
6048
|
},
|
|
6049
|
+
authoredSceneStyleIgnored: session.authoredSceneStyleIgnored,
|
|
6050
|
+
sceneStyleIgnoredFeatures: session.sceneStyleIgnoredFeatures,
|
|
6056
6051
|
verifications: session.verifications
|
|
6057
6052
|
};
|
|
6058
6053
|
};
|