brepjs 18.124.0 → 18.124.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/2d.cjs +10 -8
- package/dist/2d.js +10 -8
- package/dist/{adjacencyFns-BJ6jcQ-N.cjs → adjacencyFns-Dxx7ftVV.cjs} +3 -3
- package/dist/{adjacencyFns-CnehwLNj.js → adjacencyFns-Syimhi5A.js} +3 -3
- package/dist/{blueprint-BSfG0Uik.cjs → blueprint-BxwG1Gza.cjs} +14 -10
- package/dist/{blueprint-BGWbpQ-w.js → blueprint-DvJhiSQF.js} +16 -11
- package/dist/{blueprintFns-C0-nGqlW.cjs → blueprintFns-CURJa6gK.cjs} +2 -2
- package/dist/{blueprintFns-Bt1hKlL7.js → blueprintFns-CiOJiPIw.js} +2 -2
- package/dist/{blueprintSketcher-Bd5ZS9p6.cjs → blueprintSketcher-COLNJfbg.cjs} +19 -11
- package/dist/{blueprintSketcher-BTGRoQ_G.js → blueprintSketcher-CfgOzgxc.js} +19 -11
- package/dist/{boolean2D-Cr6oLsbf.cjs → boolean2D-BQqC_nps.cjs} +12 -8
- package/dist/{boolean2D-zZ9-qR5a.js → boolean2D-Cdh2qVf6.js} +14 -9
- package/dist/brepjs.cjs +121 -81
- package/dist/brepjs.js +132 -85
- package/dist/{cameraFns-j2I9G3L_.cjs → cameraFns-CFVDwvGj.cjs} +5 -4
- package/dist/{cameraFns-CGMawqfi.js → cameraFns-USpwGr6_.js} +5 -4
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-CaXBdZz9.js → cornerFinder-CIiXl5Kq.js} +1 -1
- package/dist/{cornerFinder-CPwSLgpM.cjs → cornerFinder-DyWf9i1I.cjs} +1 -1
- package/dist/{curveFns-BBLaLG1U.cjs → curveFns-CSY23hP9.cjs} +8 -5
- package/dist/{curveFns-BoHbhtqX.js → curveFns-F4E56Inv.js} +8 -5
- package/dist/{drawFns-BrRbAeYB.js → drawFns-BiTlyKMy.js} +59 -30
- package/dist/{drawFns-DOkSdo8E.cjs → drawFns-r8PNRpEn.cjs} +59 -30
- package/dist/{faceFns-UozswcwP.cjs → faceFns-D9LdZArB.cjs} +4 -3
- package/dist/{faceFns-Ce7Fq6j5.js → faceFns-Dy4lA0f_.js} +6 -4
- package/dist/{healingFns-Dn0EFSHm.js → healingFns-B6tDq40C.js} +38 -21
- package/dist/{healingFns-mKogaVOk.cjs → healingFns-jxoJQApv.cjs} +38 -21
- package/dist/{helpers-DuTAcGVX.cjs → helpers-CeX5zwCS.cjs} +6 -6
- package/dist/{helpers-CZsK8STz.js → helpers-ClZ_C5nP.js} +6 -6
- package/dist/{importFns-Ch2YwieP.cjs → importFns-CR3k4ct3.cjs} +5 -6
- package/dist/{importFns-CE4byS-8.js → importFns-DpbQ02xU.js} +5 -6
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/{loftFns-BYiUcAxk.cjs → loftFns-Bd6Qs7uB.cjs} +15 -9
- package/dist/{loftFns-DQVg8qxM.js → loftFns-sILTLlrA.js} +15 -9
- package/dist/{measureFns-BbLLBg5q.js → measureFns-B9CjOY97.js} +3 -3
- package/dist/{measureFns-Cao9gY1L.cjs → measureFns-D3wAgSGr.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-B6NveFwc.js → meshFns-BWgXP2-7.js} +3 -3
- package/dist/{meshFns-CnYIUU9b.cjs → meshFns-C5Mni6NE.cjs} +3 -3
- package/dist/{occtWasmAdapter-BQKQXF63.js → occtWasmAdapter-BEe---7w.js} +3 -1
- package/dist/{occtWasmAdapter-Aubfbks6.cjs → occtWasmAdapter-DEpy64ji.cjs} +3 -1
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-uz38yuMp.cjs → originTrackingFns-BVmoGfxj.cjs} +2 -2
- package/dist/{originTrackingFns-DXcggmgf.js → originTrackingFns-CgXHRXve.js} +2 -2
- package/dist/{primitiveFns-DmEPf6av.cjs → primitiveFns-BI3xR_wX.cjs} +7 -5
- package/dist/{primitiveFns-CmmTWOkO.js → primitiveFns-CSOkiKA7.js} +7 -5
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-CnPEaqHw.cjs → refResolveFns-D_RnidoD.cjs} +10 -8
- package/dist/{refResolveFns-DqY7Cd00.js → refResolveFns-DxjdVw1p.js} +10 -8
- package/dist/{rolldown-runtime-DakpK96I.cjs → rolldown-runtime-C0BPl7ul.cjs} +1 -1
- package/dist/{shapeFns-BLZ1dDSz.cjs → shapeFns-XPAVA2ZZ.cjs} +2 -2
- package/dist/{shapeFns-mYczuWOy.js → shapeFns-lw5Mzj__.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-bHlssytH.js → shapeTypes-7_c5mEYb.js} +25 -17
- package/dist/{shapeTypes-DZKuRt24.cjs → shapeTypes-Dm6f4xsN.cjs} +9 -9
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-9s-j-ZiW.js → solidBuilders-Cyfx4vIB.js} +14 -9
- package/dist/{solidBuilders-5tA9O1SM.cjs → solidBuilders-D0dqmSE6.cjs} +14 -9
- package/dist/{surfaceBuilders-B7UnwkQz.js → surfaceBuilders-BCDBd5Ii.js} +7 -5
- package/dist/{surfaceBuilders-0x7j0ibk.cjs → surfaceBuilders-DEMrBvXW.cjs} +7 -5
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BPbIpA4-.cjs → textBlueprints-B-7POKfB.cjs} +37 -22
- package/dist/{textBlueprints-DE3M-E9o.js → textBlueprints-DnCz3w4s.js} +36 -21
- package/dist/{textMetrics-rRuWxQG_.cjs → textMetrics-4a8KfRbQ.cjs} +3 -2
- package/dist/{textMetrics-D3Bly1w4.js → textMetrics-m_H1URz5.js} +3 -2
- package/dist/{threadFns-BAjFNk2_.js → threadFns-CJDOHziO.js} +17 -12
- package/dist/{threadFns-BMT6ziG_.cjs → threadFns-ZrJsQtPC.cjs} +17 -12
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-DVhWxBwT.js → topologyQueryFns-Bihcwoz0.js} +1 -1
- package/dist/{topologyQueryFns-DZUpJz2p.cjs → topologyQueryFns-RjAzu76K.cjs} +1 -1
- package/dist/{validityTypes-19mfqWVv.js → validityTypes-C1GMwI9t.js} +1 -1
- package/dist/{validityTypes-CCnRq3A9.cjs → validityTypes-DeiK-KFO.cjs} +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as getKernel, T as isWire, W as _usingCtx, h as disposeResultShape, n as castResultShape, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, T as isWire, W as _usingCtx, h as disposeResultShape, n as castResultShape, x as isShape3D } from "./shapeTypes-7_c5mEYb.js";
|
|
2
2
|
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { c as vecLength, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
@@ -22,7 +22,8 @@ import { c as vecLength, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
|
22
22
|
function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
23
23
|
if (extrusionLength < 1e-10) return err(validationError("INVALID_EXTRUSION_LENGTH", "Extrusion length too small (< 1e-10)"));
|
|
24
24
|
if (profile !== "s-curve" && profile !== "linear") return err(validationError("UNSUPPORTED_PROFILE", `Unsupported extrusion profile: ${String(profile)}`));
|
|
25
|
-
|
|
25
|
+
const law = getKernel().buildExtrusionLaw(profile, extrusionLength, endFactor);
|
|
26
|
+
return ok(law.Trim(0, extrusionLength, 1e-6));
|
|
26
27
|
}
|
|
27
28
|
//#endregion
|
|
28
29
|
//#region src/operations/sweepFns.ts
|
|
@@ -42,7 +43,8 @@ function makeSpineWire(start, end) {
|
|
|
42
43
|
}
|
|
43
44
|
/** Build a helix wire for twist extrusion. */
|
|
44
45
|
function makeHelixWire(pitch, height, radius, center, dir, leftHanded = false) {
|
|
45
|
-
|
|
46
|
+
const kernel = getKernel();
|
|
47
|
+
return castResultShape(kernel.makeHelixWire(pitch, height, radius, [...center], [...dir], leftHanded));
|
|
46
48
|
}
|
|
47
49
|
/** Cast a shell-mode sweep result `[shell, startWire, endWire]`, releasing all three on any reject. */
|
|
48
50
|
function castSweepShellTuple(result) {
|
|
@@ -86,7 +88,8 @@ function castSweepShellTuple(result) {
|
|
|
86
88
|
*/
|
|
87
89
|
function sweep(wire, spine, config = {}, shellMode = false) {
|
|
88
90
|
if (config.mode === "simple" && !shellMode) {
|
|
89
|
-
const
|
|
91
|
+
const resultOc = getKernel().simplePipe(wire.wrapped, spine.wrapped);
|
|
92
|
+
const shape = castResultShape(resultOc);
|
|
90
93
|
if (!isShape3D(shape)) {
|
|
91
94
|
disposeResultShape(shape);
|
|
92
95
|
return err(typeCastError("SWEEP_NOT_3D", "Simple pipe did not produce a 3D shape"));
|
|
@@ -279,11 +282,12 @@ function multiSectionSweep(sections, spine, options) {
|
|
|
279
282
|
positioned.push(p);
|
|
280
283
|
positionedWires.push(kernel.downcast(p, "wire"));
|
|
281
284
|
}
|
|
282
|
-
const
|
|
285
|
+
const loftResult = kernel.loftAdvanced(positionedWires, {
|
|
283
286
|
solid,
|
|
284
287
|
ruled,
|
|
285
288
|
tolerance
|
|
286
|
-
})
|
|
289
|
+
});
|
|
290
|
+
const result = castResultShape(loftResult);
|
|
287
291
|
if (!isShape3D(result)) {
|
|
288
292
|
disposeResultShape(result);
|
|
289
293
|
return err(typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape"));
|
|
@@ -325,7 +329,8 @@ function guidedSweep(profile, spine, guides, options = {}) {
|
|
|
325
329
|
boundTolerance: tolerance
|
|
326
330
|
} : {}
|
|
327
331
|
});
|
|
328
|
-
const
|
|
332
|
+
const ocShape = typeof sweepResult === "object" && "shape" in sweepResult ? sweepResult.shape : sweepResult;
|
|
333
|
+
const result = castResultShape(ocShape);
|
|
329
334
|
if (!isShape3D(result)) {
|
|
330
335
|
disposeResultShape(result);
|
|
331
336
|
return err(typeCastError("GUIDED_SWEEP_NOT_3D", "Guided sweep did not produce a 3D shape"));
|
|
@@ -366,13 +371,14 @@ function loft(wires, { ruled = true, startPoint, endPoint, tolerance = 1e-6 } =
|
|
|
366
371
|
const startVertex = startPoint ? kernel.makeVertex(...toVec3(startPoint)) : void 0;
|
|
367
372
|
const endVertex = endPoint ? kernel.makeVertex(...toVec3(endPoint)) : void 0;
|
|
368
373
|
try {
|
|
369
|
-
const
|
|
374
|
+
const shape = kernel.loftAdvanced(wires.map((w) => w.wrapped), {
|
|
370
375
|
solid: !returnShell,
|
|
371
376
|
ruled,
|
|
372
377
|
tolerance,
|
|
373
378
|
...startVertex ? { startVertex } : {},
|
|
374
379
|
...endVertex ? { endVertex } : {}
|
|
375
|
-
})
|
|
380
|
+
});
|
|
381
|
+
const result = castResultShape(shape);
|
|
376
382
|
if (!isShape3D(result)) {
|
|
377
383
|
disposeResultShape(result);
|
|
378
384
|
return err(typeCastError("LOFT_NOT_3D", "Loft did not produce a 3D shape"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as getKernel } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel } from "./shapeTypes-7_c5mEYb.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { T as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { T as kernelCallRaw } from "./topologyQueryFns-Bihcwoz0.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-Dy4lA0f_.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dm6f4xsN.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-RjAzu76K.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-D9LdZArB.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-D3wAgSGr.cjs");
|
|
3
3
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
4
4
|
exports.measureArea = require_measureFns.measureArea;
|
|
5
5
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-B9CjOY97.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as getKernel, lt as qualityDeflection } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, lt as qualityDeflection } from "./shapeTypes-7_c5mEYb.js";
|
|
2
2
|
import { E as ok, g as err, r as ioError } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { t as getFaceOrigins } from "./originTrackingFns-
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-Bihcwoz0.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-CgXHRXve.js";
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dm6f4xsN.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-RjAzu76K.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-BVmoGfxj.cjs");
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -295,6 +295,8 @@ function quickHull(inputPoints, tolerance) {
|
|
|
295
295
|
}
|
|
296
296
|
//#endregion
|
|
297
297
|
//#region src/kernel/geometry2d.ts
|
|
298
|
+
/* v8 ignore file -- excluded from coverage reports; prevents V8 instrumentation
|
|
299
|
+
overhead that causes 2D-heavy tests to timeout under coverage mode. */
|
|
298
300
|
function evaluateCurve2d$1(c, t) {
|
|
299
301
|
switch (c.__bk2d) {
|
|
300
302
|
case "line": return [c.ox + c.dx * t, c.oy + c.dy * t];
|
|
@@ -901,7 +903,7 @@ function numericalIntersect(c1, c2, tolerance, isSelf = false) {
|
|
|
901
903
|
});
|
|
902
904
|
}
|
|
903
905
|
const crossTol = Math.max(tolerance * 100, .5);
|
|
904
|
-
const seg2Bounds = new Float64Array(
|
|
906
|
+
const seg2Bounds = /* @__PURE__ */ new Float64Array(600);
|
|
905
907
|
for (let j = 0; j < N; j++) {
|
|
906
908
|
const a = pts2[j], b = pts2[j + 1];
|
|
907
909
|
const off = j * 6;
|
|
@@ -295,6 +295,8 @@ function quickHull(inputPoints, tolerance) {
|
|
|
295
295
|
}
|
|
296
296
|
//#endregion
|
|
297
297
|
//#region src/kernel/geometry2d.ts
|
|
298
|
+
/* v8 ignore file -- excluded from coverage reports; prevents V8 instrumentation
|
|
299
|
+
overhead that causes 2D-heavy tests to timeout under coverage mode. */
|
|
298
300
|
function evaluateCurve2d$1(c, t) {
|
|
299
301
|
switch (c.__bk2d) {
|
|
300
302
|
case "line": return [c.ox + c.dx * t, c.oy + c.dy * t];
|
|
@@ -901,7 +903,7 @@ function numericalIntersect(c1, c2, tolerance, isSelf = false) {
|
|
|
901
903
|
});
|
|
902
904
|
}
|
|
903
905
|
const crossTol = Math.max(tolerance * 100, .5);
|
|
904
|
-
const seg2Bounds = new Float64Array(
|
|
906
|
+
const seg2Bounds = /* @__PURE__ */ new Float64Array(600);
|
|
905
907
|
for (let j = 0; j < N; j++) {
|
|
906
908
|
const a = pts2[j], b = pts2[j + 1];
|
|
907
909
|
const off = j * 6;
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
3
|
-
const require_loftFns = require("./loftFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-ZrJsQtPC.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-Bd6Qs7uB.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-CJDOHziO.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-sILTLlrA.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dm6f4xsN.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-RjAzu76K.cjs");
|
|
3
3
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
4
4
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as getKernel } from "./shapeTypes-
|
|
2
|
-
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-
|
|
1
|
+
import { K as getKernel } from "./shapeTypes-7_c5mEYb.js";
|
|
2
|
+
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-Bihcwoz0.js";
|
|
3
3
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
4
4
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dm6f4xsN.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-DeiK-KFO.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-D0dqmSE6.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DEMrBvXW.cjs");
|
|
7
7
|
//#region src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -163,7 +163,9 @@ function applyMatrix(shape, matrix) {
|
|
|
163
163
|
require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
|
|
164
164
|
return require_errors.ok(result);
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
/* v8 ignore start -- untestable until WASM is rebuilt with BRepBuilderAPI_GTransform */
|
|
167
|
+
const resultShape = require_shapeTypes.getKernel().generalTransformNonOrthogonal(shape.wrapped, linear, translation);
|
|
168
|
+
const result = require_shapeTypes.castResultShape(resultShape);
|
|
167
169
|
require_solidBuilders.propagateMetadataByHash([shape], result);
|
|
168
170
|
return require_errors.ok(result);
|
|
169
171
|
/* v8 ignore stop */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { K as getKernel, W as _usingCtx, d as createSolid, n as castResultShape } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, W as _usingCtx, d as createSolid, n as castResultShape } from "./shapeTypes-7_c5mEYb.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-C1GMwI9t.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-
|
|
6
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
5
|
+
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-Cyfx4vIB.js";
|
|
6
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-BCDBd5Ii.js";
|
|
7
7
|
//#region src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -163,7 +163,9 @@ function applyMatrix(shape, matrix) {
|
|
|
163
163
|
propagateAllMetadata(evolution, [shape], result);
|
|
164
164
|
return ok(result);
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
/* v8 ignore start -- untestable until WASM is rebuilt with BRepBuilderAPI_GTransform */
|
|
167
|
+
const resultShape = getKernel().generalTransformNonOrthogonal(shape.wrapped, linear, translation);
|
|
168
|
+
const result = castResultShape(resultShape);
|
|
167
169
|
propagateMetadataByHash([shape], result);
|
|
168
170
|
return ok(result);
|
|
169
171
|
/* v8 ignore stop */
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-CFVDwvGj.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-USpwGr6_.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-CeX5zwCS.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-DyWf9i1I.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-ClZ_C5nP.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-CIiXl5Kq.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dm6f4xsN.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-RjAzu76K.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-D9LdZArB.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-XPAVA2ZZ.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-D3wAgSGr.cjs");
|
|
6
|
+
const require_adjacencyFns = require("./adjacencyFns-Dxx7ftVV.cjs");
|
|
7
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
8
8
|
/**
|
|
9
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -18,8 +18,10 @@ const require_adjacencyFns = require("./adjacencyFns-BJ6jcQ-N.cjs");
|
|
|
18
18
|
function defaultScorer(hint, face) {
|
|
19
19
|
let score = 0;
|
|
20
20
|
const faceType = require_faceFns.faceGeomType(face);
|
|
21
|
-
if (hint.surfaceType !== void 0)
|
|
22
|
-
|
|
21
|
+
if (hint.surfaceType !== void 0) {
|
|
22
|
+
if (faceType === hint.surfaceType) score += 1;
|
|
23
|
+
else return -Infinity;
|
|
24
|
+
}
|
|
23
25
|
if (hint.normal !== void 0) {
|
|
24
26
|
const faceNormal = require_faceFns.normalAt(face);
|
|
25
27
|
const dot = hint.normal[0] * faceNormal[0] + hint.normal[1] * faceNormal[1] + hint.normal[2] * faceNormal[2];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { K as getKernel, g as disposeTransientSubShape, o as castShapeWithKnownType } from "./shapeTypes-
|
|
2
|
-
import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea, s as measureLength } from "./measureFns-
|
|
6
|
-
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-
|
|
1
|
+
import { K as getKernel, g as disposeTransientSubShape, o as castShapeWithKnownType } from "./shapeTypes-7_c5mEYb.js";
|
|
2
|
+
import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-Bihcwoz0.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-Dy4lA0f_.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-lw5Mzj__.js";
|
|
5
|
+
import { n as measureArea, s as measureLength } from "./measureFns-B9CjOY97.js";
|
|
6
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-Syimhi5A.js";
|
|
7
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
8
8
|
/**
|
|
9
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -18,8 +18,10 @@ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedE
|
|
|
18
18
|
function defaultScorer(hint, face) {
|
|
19
19
|
let score = 0;
|
|
20
20
|
const faceType = faceGeomType(face);
|
|
21
|
-
if (hint.surfaceType !== void 0)
|
|
22
|
-
|
|
21
|
+
if (hint.surfaceType !== void 0) {
|
|
22
|
+
if (faceType === hint.surfaceType) score += 1;
|
|
23
|
+
else return -Infinity;
|
|
24
|
+
}
|
|
23
25
|
if (hint.normal !== void 0) {
|
|
24
26
|
const faceNormal = normalAt(face);
|
|
25
27
|
const dot = hint.normal[0] * faceNormal[0] + hint.normal[1] * faceNormal[1] + hint.normal[2] * faceNormal[2];
|
|
@@ -24,7 +24,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
}
|
|
25
25
|
return to;
|
|
26
26
|
};
|
|
27
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
28
28
|
value: mod,
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dm6f4xsN.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-RjAzu76K.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/shapeFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { K as getKernel } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel } from "./shapeTypes-7_c5mEYb.js";
|
|
2
2
|
import { t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-
|
|
3
|
+
import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-Bihcwoz0.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/shapeFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
2
|
+
const require_refResolveFns = require("./refResolveFns-D_RnidoD.cjs");
|
|
3
3
|
exports.assignRoles = require_refResolveFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_refResolveFns.captureHint;
|
|
5
5
|
exports.createDerivedFaceRef = require_refResolveFns.createDerivedFaceRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-
|
|
1
|
+
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-DxjdVw1p.js";
|
|
2
2
|
export { assignRoles, captureHint, createDerivedFaceRef, createEdgeRef, createRef, createVertexRef, defaultScorer, isDerivedFaceRef, isEdgeRef, isFaceRef, isLineageRef, isVertexRef, resolveDerivedFaceRef, resolveEdgeRef, resolveLineageRef, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, updateRoles };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, O as isUnsupportedKernelOperationError, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-
|
|
1
|
+
import { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, O as isUnsupportedKernelOperationError, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-BEe---7w.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At } from "./bug-BdOHwn_e.js";
|
|
3
3
|
//#region src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -2176,9 +2176,7 @@ function transformBatch$2(oc, entries) {
|
|
|
2176
2176
|
case "scale":
|
|
2177
2177
|
batch.addScale(e.shape, ...e.center, e.factor);
|
|
2178
2178
|
break;
|
|
2179
|
-
case "mirror":
|
|
2180
|
-
batch.addMirror(e.shape, ...e.origin, ...e.normal);
|
|
2181
|
-
break;
|
|
2179
|
+
case "mirror": batch.addMirror(e.shape, ...e.origin, ...e.normal);
|
|
2182
2180
|
}
|
|
2183
2181
|
const result = batch.execute();
|
|
2184
2182
|
try {
|
|
@@ -3956,7 +3954,8 @@ function makeFaceOnSurface$1(oc, surfaceOrFace, wire) {
|
|
|
3956
3954
|
function bsplineSurface$1(oc, points, rows, cols) {
|
|
3957
3955
|
const arr = new oc.TColgp_Array2OfPnt_2(1, rows, 1, cols);
|
|
3958
3956
|
for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) {
|
|
3959
|
-
const
|
|
3957
|
+
const idx = r * cols + c;
|
|
3958
|
+
const pt = wasmIndex(points, idx);
|
|
3960
3959
|
const pnt = new oc.gp_Pnt_3(pt[0], pt[1], pt[2]);
|
|
3961
3960
|
arr.SetValue_1(r + 1, c + 1, pnt);
|
|
3962
3961
|
pnt.delete();
|
|
@@ -4741,7 +4740,8 @@ function transformCurve2dGeneral$1(curve, gtrsf) {
|
|
|
4741
4740
|
const N = 20;
|
|
4742
4741
|
const pts = [];
|
|
4743
4742
|
for (let i = 0; i <= N; i++) {
|
|
4744
|
-
const
|
|
4743
|
+
const t = bounds.first + (bounds.last - bounds.first) * i / N;
|
|
4744
|
+
const [px, py] = evaluateCurve2d$2(c, t);
|
|
4745
4745
|
pts.push([m0 * px + m1 * py + tx, m3 * px + m4 * py + ty]);
|
|
4746
4746
|
}
|
|
4747
4747
|
return makeBezier2d$2(pts);
|
|
@@ -4874,7 +4874,8 @@ function approximateCurve2dAsBSpline$1(curve, tol, cont, maxSeg) {
|
|
|
4874
4874
|
}
|
|
4875
4875
|
maxErr = 0;
|
|
4876
4876
|
for (let i = 0; i < curN; i++) {
|
|
4877
|
-
const
|
|
4877
|
+
const tMid = bounds.first + (bounds.last - bounds.first) * (i + .5) / curN;
|
|
4878
|
+
const [ex, ey] = evaluateCurve2d$2(c, tMid);
|
|
4878
4879
|
const p0 = wasmIndex(poles, i);
|
|
4879
4880
|
const p1 = wasmIndex(poles, i + 1);
|
|
4880
4881
|
const mx = (p0[0] + p1[0]) / 2;
|
|
@@ -5123,7 +5124,8 @@ function liftCurve2dToPlane$1(oc, curve, planeOrigin, planeZ, planeX) {
|
|
|
5123
5124
|
const nSamples = 60;
|
|
5124
5125
|
const pts3d = [];
|
|
5125
5126
|
for (let i = 0; i <= nSamples; i++) {
|
|
5126
|
-
const
|
|
5127
|
+
const t = bounds.first + (bounds.last - bounds.first) * i / nSamples;
|
|
5128
|
+
const [u, v] = evaluateCurve2d$2(c, t);
|
|
5127
5129
|
pts3d.push(lift(u, v));
|
|
5128
5130
|
}
|
|
5129
5131
|
return interpolatePoints3d(oc, pts3d);
|
|
@@ -5134,7 +5136,8 @@ function buildEdgeOnSurface$1(oc, curve, surface) {
|
|
|
5134
5136
|
const N = 60;
|
|
5135
5137
|
const pts3d = [];
|
|
5136
5138
|
for (let i = 0; i <= N; i++) {
|
|
5137
|
-
const
|
|
5139
|
+
const t = bounds.first + (bounds.last - bounds.first) * i / N;
|
|
5140
|
+
const [u, v] = evaluateCurve2d$2(c, t);
|
|
5138
5141
|
const gpPnt = surface.get().Value(u, v);
|
|
5139
5142
|
pts3d.push([
|
|
5140
5143
|
gpPnt.X(),
|
|
@@ -8355,7 +8358,8 @@ function exportSTEP(bk, shapes) {
|
|
|
8355
8358
|
return parts.join("\n");
|
|
8356
8359
|
}
|
|
8357
8360
|
function exportSTL$1(bk, shape, binary, tolerance = DEFAULT_STL_TOLERANCE, angularTolerance = DEFAULT_STL_ANGULAR_TOLERANCE) {
|
|
8358
|
-
const
|
|
8361
|
+
const solidIds = unwrapSolidsForExport(bk, shape, "exportSTL");
|
|
8362
|
+
const { vertices, triangles } = mesh$1(bk, solidHandle(wasmIndex(solidIds, 0)), {
|
|
8359
8363
|
tolerance,
|
|
8360
8364
|
angularTolerance,
|
|
8361
8365
|
skipNormals: true
|
|
@@ -8609,7 +8613,6 @@ function reverseCurve2d(curve) {
|
|
|
8609
8613
|
if (Array.isArray(m.weights)) m.weights = [...m.weights].reverse();
|
|
8610
8614
|
break;
|
|
8611
8615
|
}
|
|
8612
|
-
default: break;
|
|
8613
8616
|
}
|
|
8614
8617
|
}
|
|
8615
8618
|
function copyCurve2d(curve) {
|
|
@@ -8801,7 +8804,8 @@ function transformCurve2dGeneral(curve, gtrsf) {
|
|
|
8801
8804
|
const N = 20;
|
|
8802
8805
|
const pts = [];
|
|
8803
8806
|
for (let i = 0; i <= N; i++) {
|
|
8804
|
-
const
|
|
8807
|
+
const t = bounds.first + (bounds.last - bounds.first) * i / N;
|
|
8808
|
+
const [px, py] = evaluateCurve2d$2(c, t);
|
|
8805
8809
|
pts.push([m0 * px + m1 * py + tx, m3 * px + m4 * py + ty]);
|
|
8806
8810
|
}
|
|
8807
8811
|
return makeBezier2d$2(pts);
|
|
@@ -8934,7 +8938,8 @@ function approximateCurve2dAsBSpline(curve, tol, cont, maxSeg) {
|
|
|
8934
8938
|
}
|
|
8935
8939
|
maxErr = 0;
|
|
8936
8940
|
for (let i = 0; i < N; i++) {
|
|
8937
|
-
const
|
|
8941
|
+
const tMid = bounds.first + (bounds.last - bounds.first) * (i + .5) / N;
|
|
8942
|
+
const [ex, ey] = evaluateCurve2d$2(c, tMid);
|
|
8938
8943
|
const p0 = wasmIndex(poles, i);
|
|
8939
8944
|
const p1 = wasmIndex(poles, i + 1);
|
|
8940
8945
|
const mx = (p0[0] + p1[0]) / 2;
|
|
@@ -9165,7 +9170,8 @@ function liftCurve2dToPlane(bk, curve, origin, planeZ, planeX) {
|
|
|
9165
9170
|
const nSamples = 100;
|
|
9166
9171
|
const points = [];
|
|
9167
9172
|
for (let i = 0; i <= nSamples; i++) {
|
|
9168
|
-
const
|
|
9173
|
+
const t = bounds.first + (bounds.last - bounds.first) * i / nSamples;
|
|
9174
|
+
const [u, v] = evaluateCurve2d$2(c, t);
|
|
9169
9175
|
points.push(lift(u, v));
|
|
9170
9176
|
}
|
|
9171
9177
|
return interpolatePoints(bk, points);
|
|
@@ -9178,7 +9184,8 @@ function buildEdgeOnSurface(bk, curve, surface) {
|
|
|
9178
9184
|
const N = bk.getSurfaceType(fid) === "plane" ? 50 : 100;
|
|
9179
9185
|
const points = [];
|
|
9180
9186
|
for (let i = 0; i <= N; i++) {
|
|
9181
|
-
const
|
|
9187
|
+
const t = bounds.first + (bounds.last - bounds.first) * i / N;
|
|
9188
|
+
const [u, v] = evaluateCurve2d$2(c, t);
|
|
9182
9189
|
points.push(vec3At(bk.evaluateSurface(fid, u, v)));
|
|
9183
9190
|
}
|
|
9184
9191
|
return interpolatePoints(bk, points);
|
|
@@ -9908,6 +9915,7 @@ function makeSweepOps$1(bk) {
|
|
|
9908
9915
|
}
|
|
9909
9916
|
//#endregion
|
|
9910
9917
|
//#region src/kernel/brepkit/brepkitAdapter.ts
|
|
9918
|
+
/* v8 ignore file -- brepkit WASM kernel not available in OCCT test suite */
|
|
9911
9919
|
/**
|
|
9912
9920
|
* Kernel-lifecycle ops that call directly into the brepkit WASM instance
|
|
9913
9921
|
* without delegating through a `*Ops.ts` module. These are too thin to
|
|
@@ -14808,7 +14816,7 @@ function segSeg(p1, p2, p3, p4) {
|
|
|
14808
14816
|
if (Math.abs(den) < 1e-15) return null;
|
|
14809
14817
|
const t = ((p3[0] - p1[0]) * d2y - (p3[1] - p1[1]) * d2x) / den;
|
|
14810
14818
|
const u = ((p3[0] - p1[0]) * d1y - (p3[1] - p1[1]) * d1x) / den;
|
|
14811
|
-
if (t < -1e-9 || t > 1
|
|
14819
|
+
if (t < -1e-9 || t > 1 + 1e-9 || u < -1e-9 || u > 1 + 1e-9) return null;
|
|
14812
14820
|
return [p1[0] + d1x * t, p1[1] + d1y * t];
|
|
14813
14821
|
}
|
|
14814
14822
|
/**
|
|
@@ -15929,7 +15937,7 @@ async function init() {
|
|
|
15929
15937
|
throw new Error("brepjs: no kernel package found. Install one of:\n npm install occt-wasm (recommended, default)\n npm install brepjs-opencascade\n npm install brepkit-wasm");
|
|
15930
15938
|
}
|
|
15931
15939
|
//#endregion
|
|
15932
|
-
//#region \0@oxc-project+runtime@0.
|
|
15940
|
+
//#region \0@oxc-project+runtime@0.143.0/helpers/esm/usingCtx.js
|
|
15933
15941
|
function _usingCtx() {
|
|
15934
15942
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
15935
15943
|
var n = Error();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-DEpy64ji.cjs");
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
3
|
//#region src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -2176,9 +2176,7 @@ function transformBatch$2(oc, entries) {
|
|
|
2176
2176
|
case "scale":
|
|
2177
2177
|
batch.addScale(e.shape, ...e.center, e.factor);
|
|
2178
2178
|
break;
|
|
2179
|
-
case "mirror":
|
|
2180
|
-
batch.addMirror(e.shape, ...e.origin, ...e.normal);
|
|
2181
|
-
break;
|
|
2179
|
+
case "mirror": batch.addMirror(e.shape, ...e.origin, ...e.normal);
|
|
2182
2180
|
}
|
|
2183
2181
|
const result = batch.execute();
|
|
2184
2182
|
try {
|
|
@@ -3956,7 +3954,8 @@ function makeFaceOnSurface$1(oc, surfaceOrFace, wire) {
|
|
|
3956
3954
|
function bsplineSurface$1(oc, points, rows, cols) {
|
|
3957
3955
|
const arr = new oc.TColgp_Array2OfPnt_2(1, rows, 1, cols);
|
|
3958
3956
|
for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) {
|
|
3959
|
-
const
|
|
3957
|
+
const idx = r * cols + c;
|
|
3958
|
+
const pt = require_bug.wasmIndex(points, idx);
|
|
3960
3959
|
const pnt = new oc.gp_Pnt_3(pt[0], pt[1], pt[2]);
|
|
3961
3960
|
arr.SetValue_1(r + 1, c + 1, pnt);
|
|
3962
3961
|
pnt.delete();
|
|
@@ -8359,7 +8358,8 @@ function exportSTEP(bk, shapes) {
|
|
|
8359
8358
|
return parts.join("\n");
|
|
8360
8359
|
}
|
|
8361
8360
|
function exportSTL$1(bk, shape, binary, tolerance = require_occtWasmAdapter.DEFAULT_STL_TOLERANCE, angularTolerance = require_occtWasmAdapter.DEFAULT_STL_ANGULAR_TOLERANCE) {
|
|
8362
|
-
const
|
|
8361
|
+
const solidIds = unwrapSolidsForExport(bk, shape, "exportSTL");
|
|
8362
|
+
const { vertices, triangles } = mesh$1(bk, solidHandle(require_bug.wasmIndex(solidIds, 0)), {
|
|
8363
8363
|
tolerance,
|
|
8364
8364
|
angularTolerance,
|
|
8365
8365
|
skipNormals: true
|
|
@@ -8613,7 +8613,6 @@ function reverseCurve2d(curve) {
|
|
|
8613
8613
|
if (Array.isArray(m.weights)) m.weights = [...m.weights].reverse();
|
|
8614
8614
|
break;
|
|
8615
8615
|
}
|
|
8616
|
-
default: break;
|
|
8617
8616
|
}
|
|
8618
8617
|
}
|
|
8619
8618
|
function copyCurve2d(curve) {
|
|
@@ -9916,6 +9915,7 @@ function makeSweepOps$1(bk) {
|
|
|
9916
9915
|
}
|
|
9917
9916
|
//#endregion
|
|
9918
9917
|
//#region src/kernel/brepkit/brepkitAdapter.ts
|
|
9918
|
+
/* v8 ignore file -- brepkit WASM kernel not available in OCCT test suite */
|
|
9919
9919
|
/**
|
|
9920
9920
|
* Kernel-lifecycle ops that call directly into the brepkit WASM instance
|
|
9921
9921
|
* without delegating through a `*Ops.ts` module. These are too thin to
|
|
@@ -14816,7 +14816,7 @@ function segSeg(p1, p2, p3, p4) {
|
|
|
14816
14816
|
if (Math.abs(den) < 1e-15) return null;
|
|
14817
14817
|
const t = ((p3[0] - p1[0]) * d2y - (p3[1] - p1[1]) * d2x) / den;
|
|
14818
14818
|
const u = ((p3[0] - p1[0]) * d1y - (p3[1] - p1[1]) * d1x) / den;
|
|
14819
|
-
if (t < -1e-9 || t > 1
|
|
14819
|
+
if (t < -1e-9 || t > 1 + 1e-9 || u < -1e-9 || u > 1 + 1e-9) return null;
|
|
14820
14820
|
return [p1[0] + d1x * t, p1[1] + d1y * t];
|
|
14821
14821
|
}
|
|
14822
14822
|
/**
|
|
@@ -15937,7 +15937,7 @@ async function init() {
|
|
|
15937
15937
|
throw new Error("brepjs: no kernel package found. Install one of:\n npm install occt-wasm (recommended, default)\n npm install brepjs-opencascade\n npm install brepkit-wasm");
|
|
15938
15938
|
}
|
|
15939
15939
|
//#endregion
|
|
15940
|
-
//#region \0@oxc-project+runtime@0.
|
|
15940
|
+
//#region \0@oxc-project+runtime@0.143.0/helpers/esm/usingCtx.js
|
|
15941
15941
|
function _usingCtx() {
|
|
15942
15942
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
15943
15943
|
var n = Error();
|