brepjs 9.6.5 → 10.0.0
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/blueprints/Blueprint.d.ts +3 -3
- package/dist/2d/blueprints/Blueprint.d.ts.map +1 -1
- package/dist/2d/blueprints/Blueprints.d.ts +3 -3
- package/dist/2d/blueprints/Blueprints.d.ts.map +1 -1
- package/dist/2d/blueprints/CompoundBlueprint.d.ts +3 -3
- package/dist/2d/blueprints/CompoundBlueprint.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-D73qryz7.cjs → Blueprint-B6UDSVJN.cjs} +5 -5
- package/dist/{Blueprint-DebTNazC.js → Blueprint-QlgNyzP7.js} +5 -5
- package/dist/{boolean2D-Die5sMjA.cjs → boolean2D-DZxTrl9x.cjs} +7 -7
- package/dist/{boolean2D-Dg9wSxP6.js → boolean2D-Gr-OYFsO.js} +7 -7
- package/dist/{booleanFns-D3QHXA3L.js → booleanFns-BEIrQNUH.js} +3 -3
- package/dist/{booleanFns-uwsn5G2P.cjs → booleanFns-CR6vk8qv.cjs} +3 -3
- package/dist/brepjs.cjs +22 -17
- package/dist/brepjs.js +47 -42
- package/dist/core/shapeTypes.d.ts +84 -33
- package/dist/core/shapeTypes.d.ts.map +1 -1
- package/dist/core/typeErrors.d.ts +17 -0
- package/dist/core/typeErrors.d.ts.map +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-DvYYBvKj.js → cornerFinder-Bh_jsF_w.js} +1 -1
- package/dist/{cornerFinder-BcA7Chiv.cjs → cornerFinder-DlwI0iHu.cjs} +1 -1
- package/dist/{curveFns-DY55OAr3.js → curveFns-CNkC51il.js} +1 -1
- package/dist/{curveFns-BAXBhYiR.cjs → curveFns-jnEgxP5N.cjs} +1 -1
- package/dist/{drawFns-a74YTSws.cjs → drawFns-D0Wg1cy7.cjs} +10 -10
- package/dist/{drawFns-Diysw_m4.js → drawFns-Ex_DyuI1.js} +10 -10
- package/dist/{faceFns-CjRZGka6.cjs → faceFns-B10DQksf.cjs} +1 -1
- package/dist/{faceFns-BQ26A_zd.js → faceFns-DKkW12_x.js} +1 -1
- package/dist/{helpers-D2N1HNiK.cjs → helpers-4kc7odPn.cjs} +4 -4
- package/dist/{helpers-TF7WTmKB.js → helpers-BPzEhlP8.js} +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/io/importFns.d.ts +4 -4
- package/dist/io/importFns.d.ts.map +1 -1
- package/dist/io/objImportFns.d.ts +2 -2
- package/dist/io/objImportFns.d.ts.map +1 -1
- package/dist/io/threemfImportFns.d.ts +2 -2
- package/dist/io/threemfImportFns.d.ts.map +1 -1
- package/dist/io.cjs +3 -3
- package/dist/io.js +3 -3
- package/dist/{loft-C55d1XrF.cjs → loft-ByirrIHz.cjs} +3 -3
- package/dist/{loft-DK0_xi5M.js → loft-CfNUe13X.js} +3 -3
- package/dist/measurement/interferenceFns.d.ts +3 -3
- package/dist/measurement/interferenceFns.d.ts.map +1 -1
- package/dist/measurement/measureFns.d.ts +10 -10
- package/dist/measurement/measureFns.d.ts.map +1 -1
- package/dist/{measurement-DQWf2-IP.js → measurement-BMfzcJ2H.js} +2 -2
- package/dist/{measurement-BF_JvjuA.cjs → measurement-CpWygrRd.cjs} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CmZM1bAd.js → meshFns-CbuZpQmE.js} +2 -2
- package/dist/{meshFns-DYdC0ztK.cjs → meshFns-DRZcKqgZ.cjs} +2 -2
- package/dist/operations/api.d.ts +4 -4
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/exporterFns.d.ts +2 -2
- package/dist/operations/exporterFns.d.ts.map +1 -1
- package/dist/operations/exporters.d.ts +2 -2
- package/dist/operations/exporters.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +7 -7
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/guidedSweepFns.d.ts +2 -2
- package/dist/operations/guidedSweepFns.d.ts.map +1 -1
- package/dist/operations/historyFns.d.ts +6 -6
- package/dist/operations/historyFns.d.ts.map +1 -1
- package/dist/operations/loftFns.d.ts +2 -2
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/operations/multiSweepFns.d.ts +3 -3
- package/dist/operations/multiSweepFns.d.ts.map +1 -1
- package/dist/operations/roofFns.d.ts +2 -2
- package/dist/operations/roofFns.d.ts.map +1 -1
- package/dist/{operations-CMcb2KJ3.cjs → operations-DAt3B8iS.cjs} +5 -5
- package/dist/{operations-DhgY338f.js → operations-DBJ9dkjD.js} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query/finderCore.d.ts +5 -5
- package/dist/query/finderCore.d.ts.map +1 -1
- package/dist/query/helpers.d.ts +2 -2
- package/dist/query/helpers.d.ts.map +1 -1
- package/dist/query/shapeDistanceFilter.d.ts +2 -2
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
- package/dist/query/vertexFinder.d.ts.map +1 -1
- package/dist/query.cjs +4 -4
- package/dist/query.js +5 -5
- package/dist/{shapeFns-DBSqO7QJ.js → shapeFns-BrfVnd9Q.js} +2 -2
- package/dist/{shapeFns-D6qzq_Cu.cjs → shapeFns-vPR93KGT.cjs} +2 -2
- package/dist/{shapeTypes-BHy5rqqk.cjs → shapeTypes-BxAzFSfl.cjs} +25 -1
- package/dist/{shapeTypes-1WVcBBn_.js → shapeTypes-C1z8HWJf.js} +29 -5
- package/dist/sketching/CompoundSketch.d.ts +1 -1
- package/dist/sketching/draw.d.ts +3 -3
- package/dist/sketching/draw.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-C_UpU97c.js → surfaceBuilders-B-yoDL2e.js} +2 -2
- package/dist/{surfaceBuilders-DU6Pq2ju.cjs → surfaceBuilders-BkTPbZFl.cjs} +2 -2
- package/dist/topology/adjacencyFns.d.ts +7 -7
- package/dist/topology/adjacencyFns.d.ts.map +1 -1
- package/dist/topology/api.d.ts +24 -24
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/apiTypes.d.ts +7 -7
- package/dist/topology/apiTypes.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts +7 -7
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/cast.d.ts +6 -6
- package/dist/topology/cast.d.ts.map +1 -1
- package/dist/topology/colorFns.d.ts +7 -7
- package/dist/topology/colorFns.d.ts.map +1 -1
- package/dist/topology/curveFns.d.ts +14 -14
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/faceTagFns.d.ts +8 -8
- package/dist/topology/faceTagFns.d.ts.map +1 -1
- package/dist/topology/healingFns.d.ts +7 -7
- package/dist/topology/healingFns.d.ts.map +1 -1
- package/dist/topology/hullFns.d.ts +2 -2
- package/dist/topology/hullFns.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts +6 -6
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +2 -2
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +29 -29
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeUtils.d.ts +2 -2
- package/dist/topology/shapeUtils.d.ts.map +1 -1
- package/dist/topology/solidBuilders.d.ts +2 -2
- package/dist/topology/solidBuilders.d.ts.map +1 -1
- package/dist/topology/surfaceBuilders.d.ts +5 -5
- package/dist/topology/surfaceBuilders.d.ts.map +1 -1
- package/dist/{topology-B-UCQkll.js → topology-Bt4qS8pS.js} +6 -6
- package/dist/{topology-BrCU7nI6.cjs → topology-CBZcJ5pS.cjs} +6 -6
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ScaleMode } from '../curves.js';
|
|
2
2
|
import { Point2D, BoundingBox2d, Curve2D } from '../lib/index.js';
|
|
3
|
-
import { AnyShape, Face } from '../../core/shapeTypes.js';
|
|
3
|
+
import { AnyShape, Dimension, Face } from '../../core/shapeTypes.js';
|
|
4
4
|
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
5
5
|
import { PointInput } from '../../core/types.js';
|
|
6
6
|
import { DrawingInterface, SketchData } from './lib.js';
|
|
@@ -135,11 +135,11 @@ export default class Blueprint implements DrawingInterface {
|
|
|
135
135
|
* @param options.draftAngle - Taper angle in degrees (0 = straight hole).
|
|
136
136
|
* @returns The modified shape with the hole removed.
|
|
137
137
|
*/
|
|
138
|
-
punchHole(shape: AnyShape
|
|
138
|
+
punchHole(shape: AnyShape<Dimension>, face: SingleFace, { height, origin, draftAngle, }?: {
|
|
139
139
|
height?: number | null;
|
|
140
140
|
origin?: PointInput | null;
|
|
141
141
|
draftAngle?: number;
|
|
142
|
-
}): AnyShape
|
|
142
|
+
}): AnyShape<Dimension>;
|
|
143
143
|
/** Convert the blueprint to an SVG path `d` attribute string. */
|
|
144
144
|
toSVGPathD(): string;
|
|
145
145
|
/** Wrap the SVG path data in a `<path>` element string. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY9C,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAQvE,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAQ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY9C,OAA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AAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAmBjC,gFAAgF;IAChF,QAAQ;IAIR;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS;CAc5B"}
|
|
@@ -2,7 +2,7 @@ import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
|
2
2
|
import { default as Blueprint } from './Blueprint.js';
|
|
3
3
|
import { default as CompoundBlueprint } from './CompoundBlueprint.js';
|
|
4
4
|
import { DrawingInterface, SketchData } from './lib.js';
|
|
5
|
-
import { AnyShape, Face } from '../../core/shapeTypes.js';
|
|
5
|
+
import { AnyShape, Dimension, Face } from '../../core/shapeTypes.js';
|
|
6
6
|
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
7
7
|
import { PointInput } from '../../core/types.js';
|
|
8
8
|
import { ScaleMode } from '../curves.js';
|
|
@@ -49,11 +49,11 @@ export default class Blueprints implements DrawingInterface {
|
|
|
49
49
|
*
|
|
50
50
|
* @returns The shape with all holes applied.
|
|
51
51
|
*/
|
|
52
|
-
punchHole(shape: AnyShape
|
|
52
|
+
punchHole(shape: AnyShape<Dimension>, face: SingleFace, options?: {
|
|
53
53
|
height?: number;
|
|
54
54
|
origin?: PointInput;
|
|
55
55
|
draftAngle?: number;
|
|
56
|
-
}): AnyShape
|
|
56
|
+
}): AnyShape<Dimension>;
|
|
57
57
|
/** Compute the SVG `viewBox` attribute for this collection. */
|
|
58
58
|
toSVGViewBox(margin?: number): string;
|
|
59
59
|
/** Return nested SVG path `d` string arrays -- one sub-array per child. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprints.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAA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,SAAI;CAQjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
2
2
|
import { default as Blueprint } from './Blueprint.js';
|
|
3
3
|
import { DrawingInterface, SketchData } from './lib.js';
|
|
4
|
-
import { AnyShape, Face } from '../../core/shapeTypes.js';
|
|
4
|
+
import { AnyShape, Dimension, Face } from '../../core/shapeTypes.js';
|
|
5
5
|
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
6
6
|
import { PointInput } from '../../core/types.js';
|
|
7
7
|
import { ScaleMode } from '../curves.js';
|
|
@@ -64,11 +64,11 @@ export default class CompoundBlueprint implements DrawingInterface {
|
|
|
64
64
|
*
|
|
65
65
|
* @remarks Only the outer boundary (`blueprints[0]`) is used for the hole.
|
|
66
66
|
*/
|
|
67
|
-
punchHole(shape: AnyShape
|
|
67
|
+
punchHole(shape: AnyShape<Dimension>, face: SingleFace, options?: {
|
|
68
68
|
height?: number;
|
|
69
69
|
origin?: PointInput;
|
|
70
70
|
draftAngle?: number;
|
|
71
|
-
}): AnyShape
|
|
71
|
+
}): AnyShape<Dimension>;
|
|
72
72
|
/** Compute the SVG `viewBox` attribute for this compound blueprint. */
|
|
73
73
|
toSVGViewBox(margin?: number): string;
|
|
74
74
|
/** Return SVG path `d` strings for every child blueprint. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompoundBlueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/CompoundBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,0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iB;IAI1D,kEAAkE;IAClE,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,iBAAiB;IAK/D,4EAA4E;IAC5E,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB;IAC1D,SAAS,CAAC,iBAAiB,EAAE,OAAO,GAAG,iBAAiB;IAQxD,2DAA2D;IAC3D,MAAM,CACJ,iBAAiB,EAAE,OAAO,EAC1B,MAAM,CAAC,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GACxB,iBAAiB;IAMpB;;;OAGG;IACH,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,EAAE;IAIpF;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,EAAE;IAI7D;;;;OAIG;IACH,SAAS,CACP,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,IAAI,EAAE,UAAU,EAChB,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,UAAU,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB,GACL,QAAQ,CAAC,SAAS,CAAC;IAKtB,uEAAuE;IACvE,YAAY,CAAC,MAAM,SAAI;IAIvB,6DAA6D;IAC7D,UAAU;IAIV,gEAAgE;IAChE,UAAU;IAIV,yEAAyE;IACzE,KAAK,CAAC,MAAM,SAAI;CAGjB"}
|
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Blueprint = require("./Blueprint-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const Blueprint = require("./Blueprint-B6UDSVJN.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-DZxTrl9x.cjs");
|
|
5
5
|
function reverseCurve(curve) {
|
|
6
6
|
const cloned = curve.clone();
|
|
7
7
|
cloned.reverse();
|
package/dist/2d.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Blueprint } from "./Blueprint-
|
|
2
|
-
import { d, C } from "./Blueprint-
|
|
3
|
-
import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-
|
|
1
|
+
import { B as Blueprint } from "./Blueprint-QlgNyzP7.js";
|
|
2
|
+
import { d, C } from "./Blueprint-QlgNyzP7.js";
|
|
3
|
+
import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-Gr-OYFsO.js";
|
|
4
4
|
function reverseCurve(curve) {
|
|
5
5
|
const cloned = curve.clone();
|
|
6
6
|
cloned.reverse();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
3
3
|
const types = require("./types-CA_xrgDq.cjs");
|
|
4
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
-
const faceFns = require("./faceFns-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
4
|
+
const shapeTypes = require("./shapeTypes-BxAzFSfl.cjs");
|
|
5
|
+
const faceFns = require("./faceFns-B10DQksf.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-jnEgxP5N.cjs");
|
|
7
7
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
8
|
-
const helpers = require("./helpers-
|
|
8
|
+
const helpers = require("./helpers-4kc7odPn.cjs");
|
|
9
9
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
10
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const surfaceBuilders = require("./surfaceBuilders-BkTPbZFl.cjs");
|
|
11
11
|
const result = require("./result.cjs");
|
|
12
12
|
function makePlane(plane, origin) {
|
|
13
13
|
if (plane && typeof plane !== "string") {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as resolvePlane } from "./vectors-B8RRTytu.js";
|
|
2
2
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
3
|
-
import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-
|
|
4
|
-
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-
|
|
5
|
-
import { g as getOrientation } from "./curveFns-
|
|
3
|
+
import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-C1z8HWJf.js";
|
|
4
|
+
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-DKkW12_x.js";
|
|
5
|
+
import { g as getOrientation } from "./curveFns-CNkC51il.js";
|
|
6
6
|
import { o as ok, e as err, b as computationError, u as unwrap, x as validationError } from "./errors-lBwyc8YG.js";
|
|
7
|
-
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-
|
|
7
|
+
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-BPzEhlP8.js";
|
|
8
8
|
import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
9
|
+
import { m as makeFace } from "./surfaceBuilders-B-yoDL2e.js";
|
|
10
10
|
import { bug } from "./result.js";
|
|
11
11
|
function makePlane(plane, origin) {
|
|
12
12
|
if (plane && typeof plane !== "string") {
|
|
@@ -46,16 +46,16 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
46
46
|
};
|
|
47
47
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
48
48
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
49
|
-
const faceFns = require("./faceFns-
|
|
49
|
+
const faceFns = require("./faceFns-B10DQksf.cjs");
|
|
50
50
|
const types = require("./types-CA_xrgDq.cjs");
|
|
51
51
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
52
|
-
const loft = require("./loft-
|
|
53
|
-
const shapeTypes = require("./shapeTypes-
|
|
54
|
-
const curveFns = require("./curveFns-
|
|
55
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
52
|
+
const loft = require("./loft-ByirrIHz.cjs");
|
|
53
|
+
const shapeTypes = require("./shapeTypes-BxAzFSfl.cjs");
|
|
54
|
+
const curveFns = require("./curveFns-jnEgxP5N.cjs");
|
|
55
|
+
const surfaceBuilders = require("./surfaceBuilders-BkTPbZFl.cjs");
|
|
56
56
|
const result = require("./result.cjs");
|
|
57
|
-
const helpers = require("./helpers-
|
|
58
|
-
const Blueprint = require("./Blueprint-
|
|
57
|
+
const helpers = require("./helpers-4kc7odPn.cjs");
|
|
58
|
+
const Blueprint = require("./Blueprint-B6UDSVJN.cjs");
|
|
59
59
|
const intersectCurves = (first, second, precision = 1e-9) => {
|
|
60
60
|
if (first.boundingBox.isOut(second.boundingBox))
|
|
61
61
|
return errors.ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
|
|
@@ -45,16 +45,16 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
45
45
|
};
|
|
46
46
|
import { a as createPlane } from "./vectors-B8RRTytu.js";
|
|
47
47
|
import { o as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-lBwyc8YG.js";
|
|
48
|
-
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-
|
|
48
|
+
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-DKkW12_x.js";
|
|
49
49
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
50
50
|
import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
|
|
51
|
-
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-
|
|
52
|
-
import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-
|
|
53
|
-
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-
|
|
54
|
-
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-
|
|
51
|
+
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-CfNUe13X.js";
|
|
52
|
+
import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-C1z8HWJf.js";
|
|
53
|
+
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-CNkC51il.js";
|
|
54
|
+
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-B-yoDL2e.js";
|
|
55
55
|
import { bug } from "./result.js";
|
|
56
|
-
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-
|
|
57
|
-
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-
|
|
56
|
+
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-BPzEhlP8.js";
|
|
57
|
+
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-QlgNyzP7.js";
|
|
58
58
|
const intersectCurves = (first, second, precision = 1e-9) => {
|
|
59
59
|
if (first.boundingBox.isOut(second.boundingBox))
|
|
60
60
|
return ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-C1z8HWJf.js";
|
|
2
2
|
import { o as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, k as kernelError } from "./errors-lBwyc8YG.js";
|
|
3
3
|
import { r as resolvePlane } from "./vectors-B8RRTytu.js";
|
|
4
4
|
import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, g as getFaceOrigins, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-
|
|
6
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
5
|
+
import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, g as getFaceOrigins, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-BrfVnd9Q.js";
|
|
6
|
+
import { m as makeFace } from "./surfaceBuilders-B-yoDL2e.js";
|
|
7
7
|
const shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
const tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
function hasFaceTags(shape) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const shapeTypes = require("./shapeTypes-BxAzFSfl.cjs");
|
|
3
3
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
4
4
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const shapeFns = require("./shapeFns-
|
|
7
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
+
const shapeFns = require("./shapeFns-vPR93KGT.cjs");
|
|
7
|
+
const surfaceBuilders = require("./surfaceBuilders-BkTPbZFl.cjs");
|
|
8
8
|
const shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
const tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function hasFaceTags(shape) {
|
package/dist/brepjs.cjs
CHANGED
|
@@ -45,30 +45,30 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
45
45
|
return next();
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
48
|
-
const shapeTypes = require("./shapeTypes-
|
|
48
|
+
const shapeTypes = require("./shapeTypes-BxAzFSfl.cjs");
|
|
49
49
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
50
50
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
51
|
-
const Blueprint = require("./Blueprint-
|
|
52
|
-
const loft$2 = require("./loft-
|
|
53
|
-
const operations = require("./operations-
|
|
54
|
-
const boolean2D = require("./boolean2D-
|
|
51
|
+
const Blueprint = require("./Blueprint-B6UDSVJN.cjs");
|
|
52
|
+
const loft$2 = require("./loft-ByirrIHz.cjs");
|
|
53
|
+
const operations = require("./operations-DAt3B8iS.cjs");
|
|
54
|
+
const boolean2D = require("./boolean2D-DZxTrl9x.cjs");
|
|
55
55
|
const _2d = require("./2d.cjs");
|
|
56
|
-
const helpers = require("./helpers-
|
|
56
|
+
const helpers = require("./helpers-4kc7odPn.cjs");
|
|
57
57
|
const io = require("./io.cjs");
|
|
58
|
-
const drawFns = require("./drawFns-
|
|
58
|
+
const drawFns = require("./drawFns-D0Wg1cy7.cjs");
|
|
59
59
|
const types = require("./types-CA_xrgDq.cjs");
|
|
60
60
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
61
|
-
const shapeFns = require("./shapeFns-
|
|
62
|
-
const booleanFns = require("./booleanFns-
|
|
63
|
-
const topology = require("./topology-
|
|
64
|
-
const curveFns = require("./curveFns-
|
|
65
|
-
const faceFns = require("./faceFns-
|
|
66
|
-
const meshFns = require("./meshFns-
|
|
67
|
-
const measurement = require("./measurement-
|
|
68
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
61
|
+
const shapeFns = require("./shapeFns-vPR93KGT.cjs");
|
|
62
|
+
const booleanFns = require("./booleanFns-CR6vk8qv.cjs");
|
|
63
|
+
const topology = require("./topology-CBZcJ5pS.cjs");
|
|
64
|
+
const curveFns = require("./curveFns-jnEgxP5N.cjs");
|
|
65
|
+
const faceFns = require("./faceFns-B10DQksf.cjs");
|
|
66
|
+
const meshFns = require("./meshFns-DRZcKqgZ.cjs");
|
|
67
|
+
const measurement = require("./measurement-CpWygrRd.cjs");
|
|
68
|
+
const surfaceBuilders = require("./surfaceBuilders-BkTPbZFl.cjs");
|
|
69
69
|
const query = require("./query.cjs");
|
|
70
70
|
const result = require("./result.cjs");
|
|
71
|
-
const cornerFinder = require("./cornerFinder-
|
|
71
|
+
const cornerFinder = require("./cornerFinder-DlwI0iHu.cjs");
|
|
72
72
|
const worker = require("./worker.cjs");
|
|
73
73
|
function supportsProjection(kernel) {
|
|
74
74
|
return "projectShape" in kernel;
|
|
@@ -2627,7 +2627,7 @@ function createWrapped3D(val) {
|
|
|
2627
2627
|
// Batch booleans
|
|
2628
2628
|
fuseAll: (tools, opts) => wrap3D(unwrapOrThrow(booleanFns.fuseAll([val, ...tools.map(resolve)], opts))),
|
|
2629
2629
|
cutAll: (tools, opts) => wrap3D(unwrapOrThrow(booleanFns.cutAll(val, tools, opts))),
|
|
2630
|
-
// Boolean variants
|
|
2630
|
+
// Boolean variants — wrappers are always 3D context, safe to narrow
|
|
2631
2631
|
section: (plane, opts) => wrapAny(unwrapOrThrow(section(val, plane, opts))),
|
|
2632
2632
|
split: (tools) => wrapAny(unwrapOrThrow(split(val, tools))),
|
|
2633
2633
|
slice: (planes, opts) => unwrapOrThrow(slice(val, planes, opts)),
|
|
@@ -2723,7 +2723,10 @@ function shape(s) {
|
|
|
2723
2723
|
throw new Error("shape() requires a Sketch or branded shape type");
|
|
2724
2724
|
}
|
|
2725
2725
|
exports.DisposalScope = shapeTypes.DisposalScope;
|
|
2726
|
+
exports.as2D = shapeTypes.as2D;
|
|
2727
|
+
exports.as3D = shapeTypes.as3D;
|
|
2726
2728
|
exports.castShape = shapeTypes.castShape;
|
|
2729
|
+
exports.castShape3D = shapeTypes.castShape3D;
|
|
2727
2730
|
exports.createCompound = shapeTypes.createCompound;
|
|
2728
2731
|
exports.createEdge = shapeTypes.createEdge;
|
|
2729
2732
|
exports.createFace = shapeTypes.createFace;
|
|
@@ -2736,6 +2739,8 @@ exports.createWire = shapeTypes.createWire;
|
|
|
2736
2739
|
exports.getKernel = shapeTypes.getKernel;
|
|
2737
2740
|
exports.getShapeKind = shapeTypes.getShapeKind;
|
|
2738
2741
|
exports.initFromOC = shapeTypes.initFromOC;
|
|
2742
|
+
exports.is2D = shapeTypes.is2D;
|
|
2743
|
+
exports.is3D = shapeTypes.is3D;
|
|
2739
2744
|
exports.isCompound = shapeTypes.isCompound;
|
|
2740
2745
|
exports.isEdge = shapeTypes.isEdge;
|
|
2741
2746
|
exports.isFace = shapeTypes.isFace;
|
package/dist/brepjs.js
CHANGED
|
@@ -43,45 +43,45 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
43
43
|
};
|
|
44
44
|
return next();
|
|
45
45
|
};
|
|
46
|
-
import { c as castShape, D as DisposalScope, q as getKernel, e as isFace, k as isShell, l as isSolid, j as isShape3D, x as createSolid, r as createWire, d as isEdge, n as isWire } from "./shapeTypes-
|
|
47
|
-
import { u, s, t, a, b,
|
|
46
|
+
import { c as castShape, D as DisposalScope, q as getKernel, e as isFace, k as isShell, l as isSolid, j as isShape3D, x as createSolid, r as createWire, d as isEdge, n as isWire } from "./shapeTypes-C1z8HWJf.js";
|
|
47
|
+
import { B, C, E, u, s, t, a, b, F, v, g, G, H, I, i, f, h, m, J, K, w, o, p } from "./shapeTypes-C1z8HWJf.js";
|
|
48
48
|
import { o as ok, y as translateKernelError, e as err, p as typeCastError, q as queryError, x as validationError, B as BrepErrorCode, k as kernelError, i as ioError, d as isErr, u as unwrap } from "./errors-lBwyc8YG.js";
|
|
49
|
-
import { O, z, a as a2, c, b as b2, f as f2, A, g as g2, m as m2, h as h2, j, l, C as C2, D, E as E2, s as s2, F as F2, G, t as t2, n, r, v as v2, w as w2, H } from "./errors-lBwyc8YG.js";
|
|
49
|
+
import { O, z, a as a2, c, b as b2, f as f2, A, g as g2, m as m2, h as h2, j, l, C as C2, D, E as E2, s as s2, F as F2, G as G2, t as t2, n, r, v as v2, w as w2, H as H2 } from "./errors-lBwyc8YG.js";
|
|
50
50
|
import { c as vecDistance, D as DEG2RAD, H as HASH_CODE_MAX, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
51
51
|
import { R, v as v3, a as a3, b as b3, d, e, g as g3, h as h3, i as i2, k, l as l2, m as m3, o as o2 } from "./vecOps-ZDdZWbwT.js";
|
|
52
|
-
import { B as B2, d as d2, C as C3, s as s3 } from "./Blueprint-
|
|
53
|
-
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-
|
|
54
|
-
import { b as b4, g as g4, r as r2 } from "./loft-
|
|
55
|
-
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-
|
|
56
|
-
import { a as a4, b as b5, d as d3, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n2, o as o3, p as p2, q, t as t3, u as u2, v as v4, x, y, z as z2, A as A2, B as B3, C as C4, D as D2, E as E3, F as F3, G as
|
|
57
|
-
import { B as B4, a as a5, e as e2, C as C5, F as F4, S, f as f4, l as l3, g as g6, n as n3, k as k3, q as q2, o as o4, p as p3, r as r3 } from "./boolean2D-
|
|
52
|
+
import { B as B2, d as d2, C as C3, s as s3 } from "./Blueprint-QlgNyzP7.js";
|
|
53
|
+
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-CfNUe13X.js";
|
|
54
|
+
import { b as b4, g as g4, r as r2 } from "./loft-CfNUe13X.js";
|
|
55
|
+
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-DBJ9dkjD.js";
|
|
56
|
+
import { a as a4, b as b5, d as d3, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n2, o as o3, p as p2, q, t as t3, u as u2, v as v4, x, y, z as z2, A as A2, B as B3, C as C4, D as D2, E as E3, F as F3, G as G3 } from "./operations-DBJ9dkjD.js";
|
|
57
|
+
import { B as B4, a as a5, e as e2, C as C5, F as F4, S, f as f4, l as l3, g as g6, n as n3, k as k3, q as q2, o as o4, p as p3, r as r3 } from "./boolean2D-Gr-OYFsO.js";
|
|
58
58
|
import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
|
|
59
|
-
import { l as createTypedFinder, m as faceFinder } from "./helpers-
|
|
60
|
-
import { g as g7 } from "./helpers-
|
|
59
|
+
import { l as createTypedFinder, m as faceFinder } from "./helpers-BPzEhlP8.js";
|
|
60
|
+
import { g as g7 } from "./helpers-BPzEhlP8.js";
|
|
61
61
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
62
|
-
import { C as C6, D as D3, a as a6, S as S2, b as b6, X, Y, c as c2, d as d4, e as e3, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l4, m as m5, n as n4, o as o5, p as p4, q as q3, r as r4, s as s4, t as t4, u as u3, v as v5, w as w3, x as x2, y as y2, z as z3, _, $, a0, a1, A as A3, a2 as a22, B as B5, E as E4, a3 as a32, F as F5, G as
|
|
62
|
+
import { C as C6, D as D3, a as a6, S as S2, b as b6, X, Y, c as c2, d as d4, e as e3, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l4, m as m5, n as n4, o as o5, p as p4, q as q3, r as r4, s as s4, t as t4, u as u3, v as v5, w as w3, x as x2, y as y2, z as z3, _, $, a0, a1, A as A3, a2 as a22, B as B5, E as E4, a3 as a32, F as F5, G as G4, H as H3, I as I2, J as J2, K as K2, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-Ex_DyuI1.js";
|
|
63
63
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
64
64
|
import { r as r5, t as t5 } from "./types-CWDdqcrq.js";
|
|
65
65
|
import { c as c3, a as a7, p as p5, r as r6, t as t6 } from "./vectors-B8RRTytu.js";
|
|
66
|
-
import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, h as getBounds, t as translate$1, p as propagateOriginsFromEvolution, g as getFaceOrigins, j as applyMatrix$1, k as clone$1, l as describe$1, m as isEmpty$1, n as mirror$1, r as rotate$1, s as scale$1, o as simplify$1, q as toBREP$1, u as transformCopy$1, c as getWires } from "./shapeFns-
|
|
67
|
-
import { w as w4, f as f6, x as x3, i as i5, y as y3, z as z4, A as A4, B as B6, C as C7, D as D4 } from "./shapeFns-
|
|
68
|
-
import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, h as hasFaceTags, b as hasColorMetadata, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, d as sectionToFace$1, e as slice$1, g as split$1, j as fuseAll, k as cutAll } from "./booleanFns-
|
|
69
|
-
import { l as l5, m as m6, n as n5, o as o6, q as q4, r as r7, t as t7, u as u4, v as v6 } from "./booleanFns-
|
|
70
|
-
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-
|
|
71
|
-
import { a as a8, b as b7, e as e4, f as f7, d as d5, g as g9, j as j4, s as s5, t as t8, k as k5, l as l6, v as v7, w as w5 } from "./topology-
|
|
72
|
-
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-
|
|
73
|
-
import { j as j5, k as k6, l as l7, f as f8, b as b8, g as g10, m as m7, o as o7 } from "./curveFns-
|
|
74
|
-
import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-
|
|
75
|
-
import { l as l8, c as c4, m as m8, d as d6, f as f9, q as q5, r as r8, s as s6, p as p6, t as t9, v as v8, u as u5, h as h6 } from "./faceFns-
|
|
76
|
-
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-
|
|
77
|
-
import { c as c5, b as b9, e as e5, d as d7, f as f10 } from "./meshFns-
|
|
78
|
-
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-
|
|
79
|
-
import { d as d8, e as e6, f as f11, g as g11, h as h7, i as i6 } from "./measurement-
|
|
80
|
-
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-
|
|
81
|
-
import { p as p7 } from "./surfaceBuilders-
|
|
66
|
+
import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, h as getBounds, t as translate$1, p as propagateOriginsFromEvolution, g as getFaceOrigins, j as applyMatrix$1, k as clone$1, l as describe$1, m as isEmpty$1, n as mirror$1, r as rotate$1, s as scale$1, o as simplify$1, q as toBREP$1, u as transformCopy$1, c as getWires } from "./shapeFns-BrfVnd9Q.js";
|
|
67
|
+
import { w as w4, f as f6, x as x3, i as i5, y as y3, z as z4, A as A4, B as B6, C as C7, D as D4 } from "./shapeFns-BrfVnd9Q.js";
|
|
68
|
+
import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, h as hasFaceTags, b as hasColorMetadata, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, d as sectionToFace$1, e as slice$1, g as split$1, j as fuseAll, k as cutAll } from "./booleanFns-BEIrQNUH.js";
|
|
69
|
+
import { l as l5, m as m6, n as n5, o as o6, q as q4, r as r7, t as t7, u as u4, v as v6 } from "./booleanFns-BEIrQNUH.js";
|
|
70
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-Bt4qS8pS.js";
|
|
71
|
+
import { a as a8, b as b7, e as e4, f as f7, d as d5, g as g9, j as j4, s as s5, t as t8, k as k5, l as l6, v as v7, w as w5 } from "./topology-Bt4qS8pS.js";
|
|
72
|
+
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-CNkC51il.js";
|
|
73
|
+
import { j as j5, k as k6, l as l7, f as f8, b as b8, g as g10, m as m7, o as o7 } from "./curveFns-CNkC51il.js";
|
|
74
|
+
import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-DKkW12_x.js";
|
|
75
|
+
import { l as l8, c as c4, m as m8, d as d6, f as f9, q as q5, r as r8, s as s6, p as p6, t as t9, v as v8, u as u5, h as h6 } from "./faceFns-DKkW12_x.js";
|
|
76
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-CbuZpQmE.js";
|
|
77
|
+
import { c as c5, b as b9, e as e5, d as d7, f as f10 } from "./meshFns-CbuZpQmE.js";
|
|
78
|
+
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-BMfzcJ2H.js";
|
|
79
|
+
import { d as d8, e as e6, f as f11, g as g11, h as h7, i as i6 } from "./measurement-BMfzcJ2H.js";
|
|
80
|
+
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-B-yoDL2e.js";
|
|
81
|
+
import { p as p7 } from "./surfaceBuilders-B-yoDL2e.js";
|
|
82
82
|
import { edgeFinder } from "./query.js";
|
|
83
83
|
import { BrepBugError, bug } from "./result.js";
|
|
84
|
-
import { c as c6 } from "./cornerFinder-
|
|
84
|
+
import { c as c6 } from "./cornerFinder-Bh_jsF_w.js";
|
|
85
85
|
import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
|
|
86
86
|
function supportsProjection(kernel) {
|
|
87
87
|
return "projectShape" in kernel;
|
|
@@ -2640,7 +2640,7 @@ function createWrapped3D(val) {
|
|
|
2640
2640
|
// Batch booleans
|
|
2641
2641
|
fuseAll: (tools, opts) => wrap3D(unwrapOrThrow(fuseAll([val, ...tools.map(resolve)], opts))),
|
|
2642
2642
|
cutAll: (tools, opts) => wrap3D(unwrapOrThrow(cutAll(val, tools, opts))),
|
|
2643
|
-
// Boolean variants
|
|
2643
|
+
// Boolean variants — wrappers are always 3D context, safe to narrow
|
|
2644
2644
|
section: (plane, opts) => wrapAny(unwrapOrThrow(section(val, plane, opts))),
|
|
2645
2645
|
split: (tools) => wrapAny(unwrapOrThrow(split(val, tools))),
|
|
2646
2646
|
slice: (planes, opts) => unwrapOrThrow(slice(val, planes, opts)),
|
|
@@ -2768,6 +2768,8 @@ export {
|
|
|
2768
2768
|
applyGlue,
|
|
2769
2769
|
applyMatrix,
|
|
2770
2770
|
j5 as approximateCurve,
|
|
2771
|
+
B as as2D,
|
|
2772
|
+
C as as3D,
|
|
2771
2773
|
l8 as asTopo,
|
|
2772
2774
|
b7 as autoHeal,
|
|
2773
2775
|
b4 as basicFaceExtrusion,
|
|
@@ -2781,6 +2783,7 @@ export {
|
|
|
2781
2783
|
Y as cameraLookAt,
|
|
2782
2784
|
c4 as cast,
|
|
2783
2785
|
castShape,
|
|
2786
|
+
E as castShape3D,
|
|
2784
2787
|
chamfer,
|
|
2785
2788
|
chamferDistAngle as chamferDistAngleShape,
|
|
2786
2789
|
checkAllInterferences,
|
|
@@ -2822,7 +2825,7 @@ export {
|
|
|
2822
2825
|
createOperationRegistry,
|
|
2823
2826
|
a7 as createPlane,
|
|
2824
2827
|
k2 as createRegistry,
|
|
2825
|
-
|
|
2828
|
+
F as createShell,
|
|
2826
2829
|
createSolid,
|
|
2827
2830
|
createTaskQueue,
|
|
2828
2831
|
v as createVertex,
|
|
@@ -2956,13 +2959,15 @@ export {
|
|
|
2956
2959
|
importSVG,
|
|
2957
2960
|
importSVGPathD,
|
|
2958
2961
|
importThreeMF,
|
|
2959
|
-
|
|
2962
|
+
G as initFromOC,
|
|
2960
2963
|
innerWires,
|
|
2961
2964
|
m7 as interpolateCurve,
|
|
2962
2965
|
intersect,
|
|
2963
2966
|
k3 as intersect2D,
|
|
2964
2967
|
q2 as intersectBlueprints,
|
|
2965
2968
|
ioError,
|
|
2969
|
+
H as is2D,
|
|
2970
|
+
I as is3D,
|
|
2966
2971
|
isChamferRadius,
|
|
2967
2972
|
s6 as isCompSolid,
|
|
2968
2973
|
i as isCompound,
|
|
@@ -3052,7 +3057,7 @@ export {
|
|
|
3052
3057
|
queryError,
|
|
3053
3058
|
rectangularPattern,
|
|
3054
3059
|
registerHandler,
|
|
3055
|
-
|
|
3060
|
+
J as registerKernel,
|
|
3056
3061
|
u2 as registerOperation,
|
|
3057
3062
|
v4 as registerShape,
|
|
3058
3063
|
rejectAll,
|
|
@@ -3074,7 +3079,7 @@ export {
|
|
|
3074
3079
|
r3 as roundedRectangleBlueprint,
|
|
3075
3080
|
scale,
|
|
3076
3081
|
scale2D,
|
|
3077
|
-
|
|
3082
|
+
G4 as scaleDrawing,
|
|
3078
3083
|
section,
|
|
3079
3084
|
sectionToFace,
|
|
3080
3085
|
A2 as serializeHistory,
|
|
@@ -3088,10 +3093,10 @@ export {
|
|
|
3088
3093
|
simplify,
|
|
3089
3094
|
sketch2DOnFace,
|
|
3090
3095
|
sketch2DOnPlane,
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3096
|
+
H3 as sketchCircle,
|
|
3097
|
+
I2 as sketchEllipse,
|
|
3098
|
+
J2 as sketchExtrude,
|
|
3099
|
+
K2 as sketchFace,
|
|
3095
3100
|
L as sketchFaceOffset,
|
|
3096
3101
|
M as sketchHelix,
|
|
3097
3102
|
N as sketchLoft,
|
|
@@ -3121,7 +3126,7 @@ export {
|
|
|
3121
3126
|
v6 as tagFaces,
|
|
3122
3127
|
tangentArc,
|
|
3123
3128
|
F2 as tap,
|
|
3124
|
-
|
|
3129
|
+
G2 as tapErr,
|
|
3125
3130
|
a52 as textBlueprints,
|
|
3126
3131
|
a62 as textMetrics,
|
|
3127
3132
|
thicken,
|
|
@@ -3149,7 +3154,7 @@ export {
|
|
|
3149
3154
|
r as unwrapErr,
|
|
3150
3155
|
v2 as unwrapOr,
|
|
3151
3156
|
w2 as unwrapOrElse,
|
|
3152
|
-
|
|
3157
|
+
G3 as updateNode,
|
|
3153
3158
|
u5 as uvBounds,
|
|
3154
3159
|
h6 as uvCoordinates,
|
|
3155
3160
|
validationError,
|
|
@@ -3177,12 +3182,12 @@ export {
|
|
|
3177
3182
|
wire,
|
|
3178
3183
|
wireFinder,
|
|
3179
3184
|
w5 as wiresOfFace,
|
|
3180
|
-
|
|
3185
|
+
K as withKernel,
|
|
3181
3186
|
withKernelDir,
|
|
3182
3187
|
withKernelPnt,
|
|
3183
3188
|
withKernelVec,
|
|
3184
3189
|
w as withScope,
|
|
3185
3190
|
o as withScopeResult,
|
|
3186
3191
|
p as withScopeResultAsync,
|
|
3187
|
-
|
|
3192
|
+
H2 as zipResults
|
|
3188
3193
|
};
|