brepjs 8.0.2 → 8.0.3
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 +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-B9fhnpFp.js → Blueprint-DnAO3gr5.js} +8 -9
- package/dist/{Blueprint-VGbo3izk.cjs → Blueprint-FxmMji4s.cjs} +9 -10
- package/dist/{boolean2D-_WiqPxWZ.js → boolean2D-BnZKKBWU.js} +10 -10
- package/dist/{boolean2D-B1XrGVgx.cjs → boolean2D-BrjHZfWn.cjs} +10 -10
- package/dist/{booleanFns-CkccZ7UL.js → booleanFns-Ct3wDnhc.js} +3 -3
- package/dist/{booleanFns-BxW-N3rP.cjs → booleanFns-ND7sZvhu.cjs} +3 -3
- package/dist/brepjs.cjs +63 -64
- package/dist/brepjs.js +111 -113
- package/dist/{cast-C4Ff_1Qe.js → cast-BEg1mN7n.js} +2 -2
- package/dist/{cast-DIiyxDLo.cjs → cast-CqDc8oFW.cjs} +2 -2
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-DzGzfiqb.js → cornerFinder-89obDwGi.js} +1 -1
- package/dist/{cornerFinder-BndBNtJE.cjs → cornerFinder-BKsCkrXd.cjs} +1 -1
- package/dist/{curveBuilders-BUoFO1UG.cjs → curveBuilders-BjtdNw1B.cjs} +2 -2
- package/dist/{curveBuilders-CBlIWlbU.js → curveBuilders-U26XDfxg.js} +2 -2
- package/dist/curveFns-BoG_iA07.cjs +375 -0
- package/dist/curveFns-Cg99XKe2.js +376 -0
- package/dist/{drawFns-D2eDcf4k.cjs → drawFns-C-MCkYj6.cjs} +15 -16
- package/dist/{drawFns-Btmlh_Oz.js → drawFns-DJV-nOox.js} +12 -13
- package/dist/{faceFns-DDzCECn3.js → faceFns-CyokaCDr.js} +3 -3
- package/dist/{faceFns-NDRFeekj.cjs → faceFns-DcSCjDG0.cjs} +3 -3
- package/dist/{helpers-Ck8GJ58k.cjs → helpers--iZxPeJg.cjs} +9 -9
- package/dist/{helpers-jku2V1DY.js → helpers-CRx_ks-u.js} +6 -6
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/curveOps.d.ts.map +1 -1
- package/dist/kernel/meshOps.d.ts.map +1 -1
- package/dist/kernel/modifierOps.d.ts.map +1 -1
- package/dist/{loft-DJXwxV_L.cjs → loft-8asn63t4.cjs} +4 -4
- package/dist/{loft-Bk9EM0gZ.js → loft-jIkZRqHm.js} +4 -4
- package/dist/{measurement-DlXaTzKc.js → measurement-DWv8kK6J.js} +3 -3
- package/dist/{measurement-LcGh4wV0.cjs → measurement-lRLwaoqD.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-c8lDKfYy.cjs → meshFns-DWuLC3fk.cjs} +29 -9
- package/dist/{meshFns-Djzdn-CS.js → meshFns-DgAIL1B-.js} +29 -9
- package/dist/{occtBoundary-6kQSl3cF.cjs → occtBoundary-DHtzU4tz.cjs} +72 -61
- package/dist/{occtBoundary-CqXvDhZY.js → occtBoundary-DYsksDtE.js} +72 -61
- package/dist/operations/patternFns.d.ts.map +1 -1
- package/dist/{operations-CrQlFDHc.js → operations-B8FHVC22.js} +32 -10
- package/dist/{operations-Do-WZGXc.cjs → operations-CCFPvtd-.cjs} +32 -10
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query.cjs +5 -5
- package/dist/query.js +6 -6
- package/dist/{shapeTypes-BJ3Hmskg.cjs → shapeTypes-b_lhwQB7.cjs} +1 -1
- package/dist/{shapeTypes-C9sUsmEW.js → shapeTypes-i7VwMRwc.js} +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/{topology-CtfUZwLR.js → topology-Bh-aPIxA.js} +7 -8
- package/dist/{topology-DXq8dLsi.cjs → topology-ByOn_z3E.cjs} +12 -13
- package/dist/topology.cjs +33 -34
- package/dist/topology.js +50 -51
- package/dist/{vectors-BVgXsYWl.js → vectors-DWLjb9-P.js} +1 -1
- package/dist/{vectors-DK2hEKcI.cjs → vectors-aQBZK0Sb.cjs} +1 -1
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +1 -1
- package/dist/curveFns-BrJDkaWi.cjs +0 -177
- package/dist/curveFns-BshHA9Ys.js +0 -178
- package/dist/shapeFns-DQtpzndX.js +0 -203
- package/dist/shapeFns-cN4qGpbO.cjs +0 -202
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
3
3
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
4
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
-
const cast = require("./cast-
|
|
4
|
+
const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
|
|
5
|
+
const cast = require("./cast-CqDc8oFW.cjs");
|
|
6
6
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
7
|
-
const loft = require("./loft-
|
|
8
|
-
const
|
|
9
|
-
const booleanFns = require("./booleanFns-BxW-N3rP.cjs");
|
|
7
|
+
const loft = require("./loft-8asn63t4.cjs");
|
|
8
|
+
const booleanFns = require("./booleanFns-ND7sZvhu.cjs");
|
|
10
9
|
function uuidv() {
|
|
11
10
|
return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(
|
|
12
11
|
/[018]/g,
|
|
@@ -311,10 +310,20 @@ function linearPattern(shape, direction, count, spacing, options) {
|
|
|
311
310
|
return errors.err(errors.validationError("PATTERN_ZERO_DIRECTION", "Pattern direction cannot be zero"));
|
|
312
311
|
const dir = vecOps.vecNormalize(direction);
|
|
313
312
|
const copies = [shape];
|
|
313
|
+
const oc = occtBoundary.getKernel().oc;
|
|
314
|
+
const trsf = new oc.gp_Trsf_1();
|
|
315
|
+
const vec = new oc.gp_Vec_4(0, 0, 0);
|
|
314
316
|
for (let i = 1; i < count; i++) {
|
|
315
317
|
const offset = vecOps.vecScale(dir, spacing * i);
|
|
316
|
-
|
|
317
|
-
|
|
318
|
+
vec.SetCoord_2(offset[0], offset[1], offset[2]);
|
|
319
|
+
trsf.SetTranslation_1(vec);
|
|
320
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape.wrapped, trsf, true);
|
|
321
|
+
const result = transformer.ModifiedShape(shape.wrapped);
|
|
322
|
+
transformer.delete();
|
|
323
|
+
copies.push(shapeTypes.castShape(result));
|
|
324
|
+
}
|
|
325
|
+
trsf.delete();
|
|
326
|
+
vec.delete();
|
|
318
327
|
return booleanFns.fuseAll(copies, options);
|
|
319
328
|
}
|
|
320
329
|
function circularPattern(shape, axis, count, fullAngle = 360, center = [0, 0, 0], options) {
|
|
@@ -325,9 +334,22 @@ function circularPattern(shape, axis, count, fullAngle = 360, center = [0, 0, 0]
|
|
|
325
334
|
return errors.err(errors.validationError("PATTERN_ZERO_AXIS", "Pattern axis cannot be zero"));
|
|
326
335
|
const angleStep = fullAngle / count;
|
|
327
336
|
const copies = [shape];
|
|
337
|
+
const oc = occtBoundary.getKernel().oc;
|
|
338
|
+
const trsf = new oc.gp_Trsf_1();
|
|
339
|
+
const origin = new oc.gp_Pnt_3(center[0], center[1], center[2]);
|
|
340
|
+
const dir = new oc.gp_Dir_4(axis[0], axis[1], axis[2]);
|
|
341
|
+
const ax1 = new oc.gp_Ax1_2(origin, dir);
|
|
328
342
|
for (let i = 1; i < count; i++) {
|
|
329
|
-
|
|
330
|
-
|
|
343
|
+
trsf.SetRotation_1(ax1, angleStep * i * Math.PI / 180);
|
|
344
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape.wrapped, trsf, true);
|
|
345
|
+
const result = transformer.ModifiedShape(shape.wrapped);
|
|
346
|
+
transformer.delete();
|
|
347
|
+
copies.push(shapeTypes.castShape(result));
|
|
348
|
+
}
|
|
349
|
+
trsf.delete();
|
|
350
|
+
ax1.delete();
|
|
351
|
+
origin.delete();
|
|
352
|
+
dir.delete();
|
|
331
353
|
return booleanFns.fuseAll(copies, options);
|
|
332
354
|
}
|
|
333
355
|
function createAssemblyNode(name, options = {}) {
|
package/dist/operations.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const operations = require("./operations-
|
|
4
|
-
const loft = require("./loft-
|
|
3
|
+
const operations = require("./operations-CCFPvtd-.cjs");
|
|
4
|
+
const loft = require("./loft-8asn63t4.cjs");
|
|
5
5
|
exports.addChild = operations.addChild;
|
|
6
6
|
exports.addStep = operations.addStep;
|
|
7
7
|
exports.circularPattern = operations.circularPattern;
|
package/dist/operations.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, w, x, y, z, A, s, B, C, D, E } from "./operations-
|
|
2
|
-
import { i as i2, j as j2, l as l2, r } from "./loft-
|
|
1
|
+
import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, w, x, y, z, A, s, B, C, D, E } from "./operations-B8FHVC22.js";
|
|
2
|
+
import { i as i2, j as j2, l as l2, r } from "./loft-jIkZRqHm.js";
|
|
3
3
|
export {
|
|
4
4
|
a as addChild,
|
|
5
5
|
b as addStep,
|
package/dist/query.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const helpers = require("./helpers
|
|
4
|
-
const cornerFinder = require("./cornerFinder-
|
|
5
|
-
const occtBoundary = require("./occtBoundary-
|
|
6
|
-
const shapeTypes = require("./shapeTypes-
|
|
3
|
+
const helpers = require("./helpers--iZxPeJg.cjs");
|
|
4
|
+
const cornerFinder = require("./cornerFinder-BKsCkrXd.cjs");
|
|
5
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
6
|
+
const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
|
|
7
7
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
8
|
-
const curveFns = require("./curveFns-
|
|
8
|
+
const curveFns = require("./curveFns-BoG_iA07.cjs");
|
|
9
9
|
function edgeDirectionFilter(dir, angle) {
|
|
10
10
|
const d = vecOps.vecNormalize(helpers.resolveDir(dir));
|
|
11
11
|
return (edge) => {
|
package/dist/query.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as createTypedFinder, o as distanceFromPointFilter, q as resolveDir } from "./helpers-
|
|
2
|
-
import { f, g } from "./helpers-
|
|
3
|
-
import { c } from "./cornerFinder-
|
|
4
|
-
import { g as getKernel } from "./occtBoundary-
|
|
5
|
-
import { p as gcWithScope } from "./shapeTypes-
|
|
1
|
+
import { c as createTypedFinder, o as distanceFromPointFilter, q as resolveDir } from "./helpers-CRx_ks-u.js";
|
|
2
|
+
import { f, g } from "./helpers-CRx_ks-u.js";
|
|
3
|
+
import { c } from "./cornerFinder-89obDwGi.js";
|
|
4
|
+
import { g as getKernel } from "./occtBoundary-DYsksDtE.js";
|
|
5
|
+
import { p as gcWithScope } from "./shapeTypes-i7VwMRwc.js";
|
|
6
6
|
import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
7
|
-
import {
|
|
7
|
+
import { C as getCurveType, q as curveLength } from "./curveFns-Cg99XKe2.js";
|
|
8
8
|
function edgeDirectionFilter(dir, angle) {
|
|
9
9
|
const d = vecNormalize(resolveDir(dir));
|
|
10
10
|
return (edge) => {
|
|
@@ -44,7 +44,7 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
44
44
|
};
|
|
45
45
|
return next();
|
|
46
46
|
};
|
|
47
|
-
const occtBoundary = require("./occtBoundary-
|
|
47
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
48
48
|
const globalWithRegistry = globalThis;
|
|
49
49
|
if (!globalWithRegistry.FinalizationRegistry) {
|
|
50
50
|
console.warn("brepjs: FinalizationRegistry unavailable — garbage collection will not work");
|
|
@@ -43,7 +43,7 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
43
43
|
};
|
|
44
44
|
return next();
|
|
45
45
|
};
|
|
46
|
-
import { g as getKernel } from "./occtBoundary-
|
|
46
|
+
import { g as getKernel } from "./occtBoundary-DYsksDtE.js";
|
|
47
47
|
const globalWithRegistry = globalThis;
|
|
48
48
|
if (!globalWithRegistry.FinalizationRegistry) {
|
|
49
49
|
console.warn("brepjs: FinalizationRegistry unavailable — garbage collection will not work");
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const drawFns = require("./drawFns-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const drawFns = require("./drawFns-C-MCkYj6.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-BrjHZfWn.cjs");
|
|
5
5
|
exports.CompoundSketch = drawFns.CompoundSketch;
|
|
6
6
|
exports.Drawing = drawFns.Drawing;
|
|
7
7
|
exports.DrawingPen = drawFns.DrawingPen;
|
package/dist/sketching.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-
|
|
2
|
-
import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-
|
|
1
|
+
import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-DJV-nOox.js";
|
|
2
|
+
import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-BnZKKBWU.js";
|
|
3
3
|
export {
|
|
4
4
|
B2 as BaseSketcher2d,
|
|
5
5
|
a2 as BlueprintSketcher,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meshFns.d.ts","sourceRoot":"","sources":["../../src/topology/meshFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"meshFns.d.ts","sourceRoot":"","sources":["../../src/topology/meshFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAuCzD,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,SAAS,EAAE,WAAW,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,EAAE,YAAY,CAAC;IACvB,wDAAwD;IACxD,OAAO,EAAE,YAAY,CAAC;IACtB,8EAA8E;IAC9E,GAAG,EAAE,YAAY,CAAC;IAClB,mEAAmE;IACnE,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChE;AAED,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACvB,uFAAuF;IACvF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,4EAA4E;IAC5E,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChE;AAED,6CAA6C;AAC7C,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sGAAsG;IACtG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,QAAQ,EACf,EACE,SAAgB,EAChB,gBAAsB,EACtB,WAAmB,EACnB,UAAkB,EAClB,KAAY,EACZ,MAAM,GACP,GAAE,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GACrF,SAAS,CAmCX;AAMD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,EACf,EAAE,SAAgB,EAAE,gBAAsB,EAAE,KAAY,EAAE,GAAE,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GACjG,QAAQ,CAyBV;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CA4BxD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,EACf,EACE,SAAgB,EAChB,gBAAsB,EACtB,MAAc,GACf,GAAE,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,MAAM,CAAC,IAAI,CAAC,CA0Bd;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAwBxD"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./booleanFns-
|
|
3
|
-
import { g as getKernel } from "./occtBoundary-
|
|
4
|
-
import { c as castShape, h as isShape3D, k as isSolid, e as isFace, m as isWire } from "./shapeTypes-
|
|
5
|
-
import { d as downcast } from "./cast-
|
|
1
|
+
import { w as getWires, k as getFaces } from "./curveFns-Cg99XKe2.js";
|
|
2
|
+
import "./booleanFns-Ct3wDnhc.js";
|
|
3
|
+
import { g as getKernel } from "./occtBoundary-DYsksDtE.js";
|
|
4
|
+
import { c as castShape, h as isShape3D, k as isSolid, e as isFace, m as isWire } from "./shapeTypes-i7VwMRwc.js";
|
|
5
|
+
import { d as downcast } from "./cast-BEg1mN7n.js";
|
|
6
6
|
import { e as err, x as validationError, o as occtError, d as isErr, p as typeCastError, l as ok, u as unwrap, g as isOk, B as BrepErrorCode } from "./errors-wGhcJMpB.js";
|
|
7
|
-
import "./
|
|
8
|
-
import "./faceFns-DDzCECn3.js";
|
|
7
|
+
import "./faceFns-CyokaCDr.js";
|
|
9
8
|
import { H as HASH_CODE_MAX } from "./vecOps-ZDdZWbwT.js";
|
|
10
|
-
import "./meshFns-
|
|
9
|
+
import "./meshFns-DgAIL1B-.js";
|
|
11
10
|
function toBufferGeometryData(mesh) {
|
|
12
11
|
return {
|
|
13
12
|
position: mesh.vertices,
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
require("./booleanFns-
|
|
4
|
-
const occtBoundary = require("./occtBoundary-
|
|
5
|
-
const shapeTypes = require("./shapeTypes-
|
|
6
|
-
const cast = require("./cast-
|
|
2
|
+
const curveFns = require("./curveFns-BoG_iA07.cjs");
|
|
3
|
+
require("./booleanFns-ND7sZvhu.cjs");
|
|
4
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
5
|
+
const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
|
|
6
|
+
const cast = require("./cast-CqDc8oFW.cjs");
|
|
7
7
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
8
|
-
require("./
|
|
9
|
-
require("./faceFns-NDRFeekj.cjs");
|
|
8
|
+
require("./faceFns-DcSCjDG0.cjs");
|
|
10
9
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
11
|
-
require("./meshFns-
|
|
10
|
+
require("./meshFns-DWuLC3fk.cjs");
|
|
12
11
|
function toBufferGeometryData(mesh) {
|
|
13
12
|
return {
|
|
14
13
|
position: mesh.vertices,
|
|
@@ -312,8 +311,8 @@ function autoHeal(shape, options) {
|
|
|
312
311
|
});
|
|
313
312
|
}
|
|
314
313
|
steps.push("Shape invalid — applying shape-level healing");
|
|
315
|
-
const wiresBefore =
|
|
316
|
-
const facesBefore =
|
|
314
|
+
const wiresBefore = curveFns.getWires(shape).length;
|
|
315
|
+
const facesBefore = curveFns.getFaces(shape).length;
|
|
317
316
|
let current = shape;
|
|
318
317
|
let solidHealed = false;
|
|
319
318
|
if (sewTolerance !== void 0) {
|
|
@@ -334,7 +333,7 @@ function autoHeal(shape, options) {
|
|
|
334
333
|
}
|
|
335
334
|
}
|
|
336
335
|
if (fixSelfIntersection && fixWires) {
|
|
337
|
-
const wires =
|
|
336
|
+
const wires = curveFns.getWires(current);
|
|
338
337
|
let fixCount = 0;
|
|
339
338
|
for (const wire of wires) {
|
|
340
339
|
try {
|
|
@@ -383,8 +382,8 @@ function autoHeal(shape, options) {
|
|
|
383
382
|
detail: "skipped by options"
|
|
384
383
|
});
|
|
385
384
|
}
|
|
386
|
-
const wiresAfter =
|
|
387
|
-
const facesAfter =
|
|
385
|
+
const wiresAfter = curveFns.getWires(current).length;
|
|
386
|
+
const facesAfter = curveFns.getFaces(current).length;
|
|
388
387
|
const wiresHealed = Math.abs(wiresAfter - wiresBefore);
|
|
389
388
|
const facesHealed = Math.abs(facesAfter - facesBefore);
|
|
390
389
|
if (wiresHealed > 0) steps.push(`Wire count changed by ${wiresHealed}`);
|
package/dist/topology.cjs
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const booleanFns = require("./booleanFns-
|
|
5
|
-
const topology = require("./topology-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
3
|
+
const curveFns = require("./curveFns-BoG_iA07.cjs");
|
|
4
|
+
const booleanFns = require("./booleanFns-ND7sZvhu.cjs");
|
|
5
|
+
const topology = require("./topology-ByOn_z3E.cjs");
|
|
6
|
+
const faceFns = require("./faceFns-DcSCjDG0.cjs");
|
|
7
|
+
const meshFns = require("./meshFns-DWuLC3fk.cjs");
|
|
8
|
+
const cast = require("./cast-CqDc8oFW.cjs");
|
|
9
|
+
exports.approximateCurve = curveFns.approximateCurve;
|
|
10
|
+
exports.curveEndPoint = curveFns.curveEndPoint;
|
|
11
|
+
exports.curveIsClosed = curveFns.curveIsClosed;
|
|
12
|
+
exports.curveIsPeriodic = curveFns.curveIsPeriodic;
|
|
13
|
+
exports.curveLength = curveFns.curveLength;
|
|
14
|
+
exports.curvePeriod = curveFns.curvePeriod;
|
|
15
|
+
exports.curvePointAt = curveFns.curvePointAt;
|
|
16
|
+
exports.curveStartPoint = curveFns.curveStartPoint;
|
|
17
|
+
exports.curveTangentAt = curveFns.curveTangentAt;
|
|
18
|
+
exports.flipOrientation = curveFns.flipOrientation;
|
|
19
|
+
exports.getBounds = curveFns.getBounds;
|
|
20
|
+
exports.getCurveType = curveFns.getCurveType;
|
|
21
|
+
exports.getEdges = curveFns.getEdges;
|
|
22
|
+
exports.getFaces = curveFns.getFaces;
|
|
23
|
+
exports.getHashCode = curveFns.getHashCode;
|
|
24
|
+
exports.getOrientation = curveFns.getOrientation;
|
|
25
|
+
exports.getVertices = curveFns.getVertices;
|
|
26
|
+
exports.getWires = curveFns.getWires;
|
|
27
|
+
exports.interpolateCurve = curveFns.interpolateCurve;
|
|
28
|
+
exports.isEqualShape = curveFns.isEqualShape;
|
|
29
|
+
exports.isSameShape = curveFns.isSameShape;
|
|
30
|
+
exports.iterEdges = curveFns.iterEdges;
|
|
31
|
+
exports.iterFaces = curveFns.iterFaces;
|
|
32
|
+
exports.iterVertices = curveFns.iterVertices;
|
|
33
|
+
exports.iterWires = curveFns.iterWires;
|
|
34
|
+
exports.offsetWire2D = curveFns.offsetWire2D;
|
|
35
|
+
exports.vertexPosition = curveFns.vertexPosition;
|
|
23
36
|
exports.cutAll = booleanFns.cutAll;
|
|
24
37
|
exports.fuseAll = booleanFns.fuseAll;
|
|
25
38
|
exports.adjacentFaces = topology.adjacentFaces;
|
|
@@ -36,20 +49,6 @@ exports.toGroupedBufferGeometryData = topology.toGroupedBufferGeometryData;
|
|
|
36
49
|
exports.toLineGeometryData = topology.toLineGeometryData;
|
|
37
50
|
exports.verticesOfEdge = topology.verticesOfEdge;
|
|
38
51
|
exports.wiresOfFace = topology.wiresOfFace;
|
|
39
|
-
exports.approximateCurve = curveFns.approximateCurve;
|
|
40
|
-
exports.curveEndPoint = curveFns.curveEndPoint;
|
|
41
|
-
exports.curveIsClosed = curveFns.curveIsClosed;
|
|
42
|
-
exports.curveIsPeriodic = curveFns.curveIsPeriodic;
|
|
43
|
-
exports.curveLength = curveFns.curveLength;
|
|
44
|
-
exports.curvePeriod = curveFns.curvePeriod;
|
|
45
|
-
exports.curvePointAt = curveFns.curvePointAt;
|
|
46
|
-
exports.curveStartPoint = curveFns.curveStartPoint;
|
|
47
|
-
exports.curveTangentAt = curveFns.curveTangentAt;
|
|
48
|
-
exports.flipOrientation = curveFns.flipOrientation;
|
|
49
|
-
exports.getCurveType = curveFns.getCurveType;
|
|
50
|
-
exports.getOrientation = curveFns.getOrientation;
|
|
51
|
-
exports.interpolateCurve = curveFns.interpolateCurve;
|
|
52
|
-
exports.offsetWire2D = curveFns.offsetWire2D;
|
|
53
52
|
exports.classifyPointOnFace = faceFns.classifyPointOnFace;
|
|
54
53
|
exports.faceCenter = faceFns.faceCenter;
|
|
55
54
|
exports.faceGeomType = faceFns.faceGeomType;
|
package/dist/topology.js
CHANGED
|
@@ -1,77 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d, e } from "./booleanFns-
|
|
3
|
-
import { a as a2, b, c, e as e2, f, d as d2, g as g2, j as j2, s, t, k as k2, l as l2, v as v2, w } from "./topology-
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { e as e6, c as c5, f as f5, d as d6, g as g5, i as i4, s as s2 } from "./cast-C4Ff_1Qe.js";
|
|
1
|
+
import { x, o, c, y, q, z, n, p, l, B, j, C, a, k, g, D, u, w, E, F, i, G, H, I, J, K, v } from "./curveFns-Cg99XKe2.js";
|
|
2
|
+
import { d, e } from "./booleanFns-Ct3wDnhc.js";
|
|
3
|
+
import { a as a2, b, c as c2, e as e2, f, d as d2, g as g2, j as j2, s, t, k as k2, l as l2, v as v2, w as w2 } from "./topology-Bh-aPIxA.js";
|
|
4
|
+
import { c as c3, f as f2, a as a3, b as b2, d as d3, g as g3, i as i2, n as n2, o as o2, p as p2, e as e3, u as u2, h } from "./faceFns-CyokaCDr.js";
|
|
5
|
+
import { c as c4, b as b3, e as e4, d as d4, f as f3 } from "./meshFns-DgAIL1B-.js";
|
|
6
|
+
import { e as e5, c as c5, f as f4, d as d5, g as g4, i as i3, s as s2 } from "./cast-BEg1mN7n.js";
|
|
8
7
|
export {
|
|
9
8
|
a2 as adjacentFaces,
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
x as approximateCurve,
|
|
10
|
+
e5 as asTopo,
|
|
12
11
|
b as autoHeal,
|
|
13
12
|
c5 as cast,
|
|
14
|
-
|
|
13
|
+
c2 as chamferDistAngleShape,
|
|
15
14
|
c3 as classifyPointOnFace,
|
|
16
15
|
c4 as clearMeshCache,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
b3 as createMeshCache,
|
|
17
|
+
o as curveEndPoint,
|
|
18
|
+
c as curveIsClosed,
|
|
19
|
+
y as curveIsPeriodic,
|
|
20
|
+
q as curveLength,
|
|
21
|
+
z as curvePeriod,
|
|
22
|
+
n as curvePointAt,
|
|
23
|
+
p as curveStartPoint,
|
|
24
|
+
l as curveTangentAt,
|
|
26
25
|
d as cutAll,
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
f4 as deserializeShape,
|
|
27
|
+
d5 as downcast,
|
|
29
28
|
e2 as edgesOfFace,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
e4 as exportIGES,
|
|
30
|
+
d4 as exportSTEP,
|
|
31
|
+
f3 as exportSTL,
|
|
32
|
+
f2 as faceCenter,
|
|
33
|
+
a3 as faceGeomType,
|
|
34
|
+
b2 as faceOrientation,
|
|
36
35
|
f as facesOfEdge,
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
d3 as flipFaceOrientation,
|
|
37
|
+
B as flipOrientation,
|
|
39
38
|
e as fuseAll,
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
j as getBounds,
|
|
40
|
+
C as getCurveType,
|
|
42
41
|
a as getEdges,
|
|
43
|
-
|
|
42
|
+
k as getFaces,
|
|
44
43
|
g as getHashCode,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
D as getOrientation,
|
|
45
|
+
g3 as getSurfaceType,
|
|
46
|
+
u as getVertices,
|
|
47
|
+
w as getWires,
|
|
49
48
|
d2 as healFace,
|
|
50
49
|
g2 as healSolid,
|
|
51
50
|
j2 as healWire,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
i2 as innerWires,
|
|
52
|
+
E as interpolateCurve,
|
|
53
|
+
g4 as isCompSolid,
|
|
54
|
+
F as isEqualShape,
|
|
56
55
|
i as isSameShape,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
G as iterEdges,
|
|
57
|
+
H as iterFaces,
|
|
58
|
+
i3 as iterTopo,
|
|
59
|
+
I as iterVertices,
|
|
60
|
+
J as iterWires,
|
|
61
|
+
n2 as normalAt,
|
|
62
|
+
K as offsetWire2D,
|
|
63
|
+
o2 as outerWire,
|
|
65
64
|
p2 as pointOnSurface,
|
|
66
|
-
|
|
65
|
+
e3 as projectPointOnFace,
|
|
67
66
|
s2 as shapeType,
|
|
68
67
|
s as sharedEdges,
|
|
69
68
|
t as toBufferGeometryData,
|
|
70
69
|
k2 as toGroupedBufferGeometryData,
|
|
71
70
|
l2 as toLineGeometryData,
|
|
72
71
|
u2 as uvBounds,
|
|
73
|
-
|
|
72
|
+
h as uvCoordinates,
|
|
74
73
|
v as vertexPosition,
|
|
75
74
|
v2 as verticesOfEdge,
|
|
76
|
-
|
|
75
|
+
w2 as wiresOfFace
|
|
77
76
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as makeOcAx3, a as toVec3 } from "./occtBoundary-
|
|
1
|
+
import { d as makeOcAx3, a as toVec3 } from "./occtBoundary-DYsksDtE.js";
|
|
2
2
|
import { j as vecNormalize, f as vecIsZero, b as vecCross, v as vecAdd, n as vecScale, o as vecSub, d as vecDot, m as vecRotate, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
import { e as err, x as validationError, l as ok } from "./errors-wGhcJMpB.js";
|
|
4
4
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
3
3
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
4
4
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
5
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
package/dist/vectors.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
|
-
const vectors = require("./vectors-
|
|
5
|
+
const vectors = require("./vectors-aQBZK0Sb.cjs");
|
|
6
6
|
exports.resolveDirection = occtBoundary.resolveDirection;
|
|
7
7
|
exports.toVec2 = occtBoundary.toVec2;
|
|
8
8
|
exports.toVec3 = occtBoundary.toVec3;
|
package/dist/vectors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r, t, a } from "./occtBoundary-
|
|
1
|
+
import { r, t, a } from "./occtBoundary-DYsksDtE.js";
|
|
2
2
|
import { D, R, v, a as a2, b, c, d, e, f, g, h, i, j, k, l, m, n, o } from "./vecOps-ZDdZWbwT.js";
|
|
3
|
-
import { c as c2, a as a3, p, r as r2, t as t2 } from "./vectors-
|
|
3
|
+
import { c as c2, a as a3, p, r as r2, t as t2 } from "./vectors-DWLjb9-P.js";
|
|
4
4
|
export {
|
|
5
5
|
D as DEG2RAD,
|
|
6
6
|
R as RAD2DEG,
|