brepjs 14.2.0 → 14.2.2
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/{booleanFns-2nes2SPo.js → booleanFns-DViuH9nW.js} +29 -13
- package/dist/{booleanFns-Bu-Lh--S.cjs → booleanFns-Dmvv9VVT.cjs} +29 -13
- package/dist/brepjs.cjs +3 -3
- package/dist/brepjs.js +3 -3
- package/dist/{historyFns-CB4sFREk.cjs → historyFns-BO9c4AgQ.cjs} +1 -1
- package/dist/{historyFns-BNU_OnGC.js → historyFns-C_EoZWD5.js} +1 -1
- package/dist/kernel/types.d.ts +6 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/operations.cjs +1 -1
- package/dist/operations.js +1 -1
- package/dist/{primitiveFns-cCMz_zEp.js → primitiveFns-DmIP-qnU.js} +12 -2
- package/dist/{primitiveFns-Dnw7S05M.cjs → primitiveFns-w2otksRk.cjs} +12 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts +6 -2
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology.cjs +2 -2
- package/dist/topology.js +2 -2
- package/package.json +2 -2
|
@@ -35,12 +35,17 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion, diagnostics) {
|
|
|
35
35
|
}
|
|
36
36
|
return ok(wrapped);
|
|
37
37
|
}
|
|
38
|
-
function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
38
|
+
function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
39
39
|
if (signal?.aborted) throw signal.reason;
|
|
40
40
|
const checkA = validateShape3D(a, "fuse: first operand");
|
|
41
41
|
if (isErr(checkA)) return checkA;
|
|
42
42
|
const checkB = validateShape3D(b, "fuse: second operand");
|
|
43
43
|
if (isErr(checkB)) return checkB;
|
|
44
|
+
if (!trackEvolution) return castToShape3D(getKernel().fuse(a.wrapped, b.wrapped, {
|
|
45
|
+
optimisation,
|
|
46
|
+
simplify,
|
|
47
|
+
fuzzyValue
|
|
48
|
+
}), "FUSE_NOT_3D", "Fuse did not produce a 3D shape");
|
|
44
49
|
const inputFaceHashes = collectInputFaceHashes([a, b]);
|
|
45
50
|
const { shape: resultShape, evolution, diagnostics } = getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
46
51
|
optimisation,
|
|
@@ -55,12 +60,17 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
|
|
|
55
60
|
if (fuseResult.ok) propagateAllMetadata(evolution, [a, b], fuseResult.value);
|
|
56
61
|
return fuseResult;
|
|
57
62
|
}
|
|
58
|
-
function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
63
|
+
function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
59
64
|
if (signal?.aborted) throw signal.reason;
|
|
60
65
|
const checkBase = validateShape3D(base, "cut: base");
|
|
61
66
|
if (isErr(checkBase)) return checkBase;
|
|
62
67
|
const checkTool = validateShape3D(tool, "cut: tool");
|
|
63
68
|
if (isErr(checkTool)) return checkTool;
|
|
69
|
+
if (!trackEvolution) return castToShape3D(getKernel().cut(base.wrapped, tool.wrapped, {
|
|
70
|
+
optimisation,
|
|
71
|
+
simplify,
|
|
72
|
+
fuzzyValue
|
|
73
|
+
}), "CUT_NOT_3D", "Cut did not produce a 3D shape");
|
|
64
74
|
const inputFaceHashes = collectInputFaceHashes([base, tool]);
|
|
65
75
|
const { shape: resultShape, evolution, diagnostics } = getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
66
76
|
optimisation,
|
|
@@ -75,12 +85,16 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
|
|
|
75
85
|
if (cutResult.ok) propagateAllMetadata(evolution, [base, tool], cutResult.value);
|
|
76
86
|
return cutResult;
|
|
77
87
|
}
|
|
78
|
-
function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
88
|
+
function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
79
89
|
if (signal?.aborted) throw signal.reason;
|
|
80
90
|
const checkA = validateShape3D(a, "intersect: first operand");
|
|
81
91
|
if (isErr(checkA)) return checkA;
|
|
82
92
|
const checkB = validateShape3D(b, "intersect: second operand");
|
|
83
93
|
if (isErr(checkB)) return checkB;
|
|
94
|
+
if (!trackEvolution) return castToShape3D(getKernel().intersect(a.wrapped, b.wrapped, {
|
|
95
|
+
simplify,
|
|
96
|
+
fuzzyValue
|
|
97
|
+
}), "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape");
|
|
84
98
|
const inputFaceHashes = collectInputFaceHashes([a, b]);
|
|
85
99
|
const { shape: resultShape, evolution, diagnostics } = getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
86
100
|
simplify,
|
|
@@ -97,31 +111,33 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe
|
|
|
97
111
|
/**
|
|
98
112
|
* Internal helper for pairwise fuse using index ranges to avoid array allocations.
|
|
99
113
|
*/
|
|
100
|
-
function fuseAllPairwise(shapes, start, end, optimisation, simplify,
|
|
114
|
+
function fuseAllPairwise(shapes, start, end, optimisation, simplify, trackEvolution, signal, fuzzyValue) {
|
|
101
115
|
if (signal?.aborted) throw signal.reason;
|
|
102
116
|
const count = end - start;
|
|
103
117
|
if (count === 1) return ok(getAtOrThrow(shapes, start));
|
|
104
118
|
if (count === 2) return fuse(getAtOrThrow(shapes, start), getAtOrThrow(shapes, start + 1), {
|
|
105
119
|
optimisation,
|
|
106
|
-
simplify:
|
|
120
|
+
simplify: false,
|
|
121
|
+
trackEvolution,
|
|
107
122
|
fuzzyValue,
|
|
108
123
|
unsafe: true,
|
|
109
124
|
...signal ? { signal } : {}
|
|
110
125
|
});
|
|
111
126
|
const mid = start + Math.ceil(count / 2);
|
|
112
|
-
const leftResult = fuseAllPairwise(shapes, start, mid, optimisation, simplify,
|
|
127
|
+
const leftResult = fuseAllPairwise(shapes, start, mid, optimisation, simplify, trackEvolution, signal, fuzzyValue);
|
|
113
128
|
if (isErr(leftResult)) return leftResult;
|
|
114
|
-
const rightResult = fuseAllPairwise(shapes, mid, end, optimisation, simplify,
|
|
129
|
+
const rightResult = fuseAllPairwise(shapes, mid, end, optimisation, simplify, trackEvolution, signal, fuzzyValue);
|
|
115
130
|
if (isErr(rightResult)) return rightResult;
|
|
116
131
|
return fuse(leftResult.value, rightResult.value, {
|
|
117
132
|
optimisation,
|
|
118
|
-
simplify
|
|
133
|
+
simplify,
|
|
134
|
+
trackEvolution,
|
|
119
135
|
fuzzyValue,
|
|
120
136
|
unsafe: true,
|
|
121
137
|
...signal ? { signal } : {}
|
|
122
138
|
});
|
|
123
139
|
}
|
|
124
|
-
function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "native", signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
140
|
+
function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "native", signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
125
141
|
if (signal?.aborted) throw signal.reason;
|
|
126
142
|
if (shapes.length === 0) return err(validationError("FUSE_ALL_EMPTY", "fuseAll requires at least one shape"));
|
|
127
143
|
if (shapes.length === 1) return ok(firstOrThrow(shapes));
|
|
@@ -137,12 +153,12 @@ function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "
|
|
|
137
153
|
fuzzyValue,
|
|
138
154
|
...signal ? { signal } : {}
|
|
139
155
|
}), "FUSE_ALL_NOT_3D", "fuseAll did not produce a 3D shape");
|
|
140
|
-
if (fuseAllResult.ok) propagateMetadataByHash(shapes, fuseAllResult.value);
|
|
156
|
+
if (fuseAllResult.ok && trackEvolution) propagateMetadataByHash(shapes, fuseAllResult.value);
|
|
141
157
|
return fuseAllResult;
|
|
142
158
|
}
|
|
143
|
-
return fuseAllPairwise(shapes, 0, shapes.length, optimisation, simplify,
|
|
159
|
+
return fuseAllPairwise(shapes, 0, shapes.length, optimisation, simplify, trackEvolution, signal, fuzzyValue);
|
|
144
160
|
}
|
|
145
|
-
function cutAll(base, tools, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
161
|
+
function cutAll(base, tools, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
146
162
|
if (signal?.aborted) throw signal.reason;
|
|
147
163
|
if (tools.length === 0) return ok(base);
|
|
148
164
|
const checkBase = validateShape3D(base, "cutAll: base");
|
|
@@ -157,7 +173,7 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal,
|
|
|
157
173
|
simplify,
|
|
158
174
|
fuzzyValue
|
|
159
175
|
}), "CUT_ALL_NOT_3D", "cutAll did not produce a 3D shape");
|
|
160
|
-
if (cutAllResult.ok) propagateMetadataByHash(allInputs, cutAllResult.value);
|
|
176
|
+
if (cutAllResult.ok && trackEvolution) propagateMetadataByHash(allInputs, cutAllResult.value);
|
|
161
177
|
return cutAllResult;
|
|
162
178
|
}
|
|
163
179
|
/**
|
|
@@ -35,12 +35,17 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion, diagnostics) {
|
|
|
35
35
|
}
|
|
36
36
|
return require_errors.ok(wrapped);
|
|
37
37
|
}
|
|
38
|
-
function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
38
|
+
function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
39
39
|
if (signal?.aborted) throw signal.reason;
|
|
40
40
|
const checkA = validateShape3D(a, "fuse: first operand");
|
|
41
41
|
if (require_errors.isErr(checkA)) return checkA;
|
|
42
42
|
const checkB = validateShape3D(b, "fuse: second operand");
|
|
43
43
|
if (require_errors.isErr(checkB)) return checkB;
|
|
44
|
+
if (!trackEvolution) return castToShape3D(require_shapeTypes.getKernel().fuse(a.wrapped, b.wrapped, {
|
|
45
|
+
optimisation,
|
|
46
|
+
simplify,
|
|
47
|
+
fuzzyValue
|
|
48
|
+
}), "FUSE_NOT_3D", "Fuse did not produce a 3D shape");
|
|
44
49
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([a, b]);
|
|
45
50
|
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
46
51
|
optimisation,
|
|
@@ -55,12 +60,17 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
|
|
|
55
60
|
if (fuseResult.ok) require_shapeFns.propagateAllMetadata(evolution, [a, b], fuseResult.value);
|
|
56
61
|
return fuseResult;
|
|
57
62
|
}
|
|
58
|
-
function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
63
|
+
function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
59
64
|
if (signal?.aborted) throw signal.reason;
|
|
60
65
|
const checkBase = validateShape3D(base, "cut: base");
|
|
61
66
|
if (require_errors.isErr(checkBase)) return checkBase;
|
|
62
67
|
const checkTool = validateShape3D(tool, "cut: tool");
|
|
63
68
|
if (require_errors.isErr(checkTool)) return checkTool;
|
|
69
|
+
if (!trackEvolution) return castToShape3D(require_shapeTypes.getKernel().cut(base.wrapped, tool.wrapped, {
|
|
70
|
+
optimisation,
|
|
71
|
+
simplify,
|
|
72
|
+
fuzzyValue
|
|
73
|
+
}), "CUT_NOT_3D", "Cut did not produce a 3D shape");
|
|
64
74
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([base, tool]);
|
|
65
75
|
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
66
76
|
optimisation,
|
|
@@ -75,12 +85,16 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
|
|
|
75
85
|
if (cutResult.ok) require_shapeFns.propagateAllMetadata(evolution, [base, tool], cutResult.value);
|
|
76
86
|
return cutResult;
|
|
77
87
|
}
|
|
78
|
-
function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
88
|
+
function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
79
89
|
if (signal?.aborted) throw signal.reason;
|
|
80
90
|
const checkA = validateShape3D(a, "intersect: first operand");
|
|
81
91
|
if (require_errors.isErr(checkA)) return checkA;
|
|
82
92
|
const checkB = validateShape3D(b, "intersect: second operand");
|
|
83
93
|
if (require_errors.isErr(checkB)) return checkB;
|
|
94
|
+
if (!trackEvolution) return castToShape3D(require_shapeTypes.getKernel().intersect(a.wrapped, b.wrapped, {
|
|
95
|
+
simplify,
|
|
96
|
+
fuzzyValue
|
|
97
|
+
}), "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape");
|
|
84
98
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([a, b]);
|
|
85
99
|
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
86
100
|
simplify,
|
|
@@ -97,31 +111,33 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe
|
|
|
97
111
|
/**
|
|
98
112
|
* Internal helper for pairwise fuse using index ranges to avoid array allocations.
|
|
99
113
|
*/
|
|
100
|
-
function fuseAllPairwise(shapes, start, end, optimisation, simplify,
|
|
114
|
+
function fuseAllPairwise(shapes, start, end, optimisation, simplify, trackEvolution, signal, fuzzyValue) {
|
|
101
115
|
if (signal?.aborted) throw signal.reason;
|
|
102
116
|
const count = end - start;
|
|
103
117
|
if (count === 1) return require_errors.ok(require_arrayAccess.getAtOrThrow(shapes, start));
|
|
104
118
|
if (count === 2) return fuse(require_arrayAccess.getAtOrThrow(shapes, start), require_arrayAccess.getAtOrThrow(shapes, start + 1), {
|
|
105
119
|
optimisation,
|
|
106
|
-
simplify:
|
|
120
|
+
simplify: false,
|
|
121
|
+
trackEvolution,
|
|
107
122
|
fuzzyValue,
|
|
108
123
|
unsafe: true,
|
|
109
124
|
...signal ? { signal } : {}
|
|
110
125
|
});
|
|
111
126
|
const mid = start + Math.ceil(count / 2);
|
|
112
|
-
const leftResult = fuseAllPairwise(shapes, start, mid, optimisation, simplify,
|
|
127
|
+
const leftResult = fuseAllPairwise(shapes, start, mid, optimisation, simplify, trackEvolution, signal, fuzzyValue);
|
|
113
128
|
if (require_errors.isErr(leftResult)) return leftResult;
|
|
114
|
-
const rightResult = fuseAllPairwise(shapes, mid, end, optimisation, simplify,
|
|
129
|
+
const rightResult = fuseAllPairwise(shapes, mid, end, optimisation, simplify, trackEvolution, signal, fuzzyValue);
|
|
115
130
|
if (require_errors.isErr(rightResult)) return rightResult;
|
|
116
131
|
return fuse(leftResult.value, rightResult.value, {
|
|
117
132
|
optimisation,
|
|
118
|
-
simplify
|
|
133
|
+
simplify,
|
|
134
|
+
trackEvolution,
|
|
119
135
|
fuzzyValue,
|
|
120
136
|
unsafe: true,
|
|
121
137
|
...signal ? { signal } : {}
|
|
122
138
|
});
|
|
123
139
|
}
|
|
124
|
-
function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "native", signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
140
|
+
function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "native", signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
125
141
|
if (signal?.aborted) throw signal.reason;
|
|
126
142
|
if (shapes.length === 0) return require_errors.err(require_errors.validationError("FUSE_ALL_EMPTY", "fuseAll requires at least one shape"));
|
|
127
143
|
if (shapes.length === 1) return require_errors.ok(require_arrayAccess.firstOrThrow(shapes));
|
|
@@ -137,12 +153,12 @@ function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "
|
|
|
137
153
|
fuzzyValue,
|
|
138
154
|
...signal ? { signal } : {}
|
|
139
155
|
}), "FUSE_ALL_NOT_3D", "fuseAll did not produce a 3D shape");
|
|
140
|
-
if (fuseAllResult.ok) require_shapeFns.propagateMetadataByHash(shapes, fuseAllResult.value);
|
|
156
|
+
if (fuseAllResult.ok && trackEvolution) require_shapeFns.propagateMetadataByHash(shapes, fuseAllResult.value);
|
|
141
157
|
return fuseAllResult;
|
|
142
158
|
}
|
|
143
|
-
return fuseAllPairwise(shapes, 0, shapes.length, optimisation, simplify,
|
|
159
|
+
return fuseAllPairwise(shapes, 0, shapes.length, optimisation, simplify, trackEvolution, signal, fuzzyValue);
|
|
144
160
|
}
|
|
145
|
-
function cutAll(base, tools, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe } = {}) {
|
|
161
|
+
function cutAll(base, tools, { optimisation = "none", simplify = false, signal, fuzzyValue, unsafe: _unsafe, trackEvolution = true } = {}) {
|
|
146
162
|
if (signal?.aborted) throw signal.reason;
|
|
147
163
|
if (tools.length === 0) return require_errors.ok(base);
|
|
148
164
|
const checkBase = validateShape3D(base, "cutAll: base");
|
|
@@ -157,7 +173,7 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal,
|
|
|
157
173
|
simplify,
|
|
158
174
|
fuzzyValue
|
|
159
175
|
}), "CUT_ALL_NOT_3D", "cutAll did not produce a 3D shape");
|
|
160
|
-
if (cutAllResult.ok) require_shapeFns.propagateMetadataByHash(allInputs, cutAllResult.value);
|
|
176
|
+
if (cutAllResult.ok && trackEvolution) require_shapeFns.propagateMetadataByHash(allInputs, cutAllResult.value);
|
|
161
177
|
return cutAllResult;
|
|
162
178
|
}
|
|
163
179
|
/**
|
package/dist/brepjs.cjs
CHANGED
|
@@ -12,9 +12,9 @@ const require_curveFns = require("./curveFns--4Nh1ZtB.cjs");
|
|
|
12
12
|
const require_meshFns = require("./meshFns-Z5n8gFAS.cjs");
|
|
13
13
|
const require_arrayAccess = require("./arrayAccess-CmulMesb.cjs");
|
|
14
14
|
const require_surfaceBuilders = require("./surfaceBuilders-CYWopaht.cjs");
|
|
15
|
-
const require_booleanFns = require("./booleanFns-
|
|
16
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
17
|
-
const require_historyFns = require("./historyFns-
|
|
15
|
+
const require_booleanFns = require("./booleanFns-Dmvv9VVT.cjs");
|
|
16
|
+
const require_primitiveFns = require("./primitiveFns-w2otksRk.cjs");
|
|
17
|
+
const require_historyFns = require("./historyFns-BO9c4AgQ.cjs");
|
|
18
18
|
const require_boolean2D = require("./boolean2D-DE2axG6W.cjs");
|
|
19
19
|
const require_helpers = require("./helpers-BK3DVd3M.cjs");
|
|
20
20
|
const require_solidBuilders = require("./solidBuilders-Bvq6br4f.cjs");
|
package/dist/brepjs.js
CHANGED
|
@@ -10,9 +10,9 @@ import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrie
|
|
|
10
10
|
import { a as meshEdges$1, i as mesh$1, n as exportSTEP, o as clearMeshCache, r as exportSTL, s as createMeshCache, t as exportIGES } from "./meshFns-CKs4H-CH.js";
|
|
11
11
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-xxcB3YNq.js";
|
|
12
12
|
import { n as fill, r as makeFace } from "./surfaceBuilders-DMI0n7Bf.js";
|
|
13
|
-
import { a as intersect$1, c as slice$1, i as fuseAll, l as split$1, n as cutAll, o as section$1, r as fuse$1, s as sectionToFace$1, t as cut$1 } from "./booleanFns-
|
|
14
|
-
import { $ as getNurbsSurfaceData, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as wiresOfFace, b as sphere, c as cylinder, ct as toGroupedBufferGeometryData, d as ellipsoid, et as adjacentFaces, f as face, g as offsetFace, h as line, i as bsplineApprox, it as verticesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toLineGeometryData, m as helix, n as bezier, nt as facesOfEdge, o as compound, ot as chamferDistAngle, p as filledFace, q as filletWithEvolution, r as box, rt as sharedEdges, s as cone, st as toBufferGeometryData, t as addHoles, tt as edgesOfFace, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-
|
|
15
|
-
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-
|
|
13
|
+
import { a as intersect$1, c as slice$1, i as fuseAll, l as split$1, n as cutAll, o as section$1, r as fuse$1, s as sectionToFace$1, t as cut$1 } from "./booleanFns-DViuH9nW.js";
|
|
14
|
+
import { $ as getNurbsSurfaceData, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as wiresOfFace, b as sphere, c as cylinder, ct as toGroupedBufferGeometryData, d as ellipsoid, et as adjacentFaces, f as face, g as offsetFace, h as line, i as bsplineApprox, it as verticesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toLineGeometryData, m as helix, n as bezier, nt as facesOfEdge, o as compound, ot as chamferDistAngle, p as filledFace, q as filletWithEvolution, r as box, rt as sharedEdges, s as cone, st as toBufferGeometryData, t as addHoles, tt as edgesOfFace, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-DmIP-qnU.js";
|
|
15
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-C_EoZWD5.js";
|
|
16
16
|
import { a as fuseBlueprints, c as roundedRectangleBlueprint, f as Sketch, h as organiseBlueprints, i as cutBlueprints, m as loftAll, n as fuse2D, o as intersectBlueprints, p as loft$1, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-D1MYwspP.js";
|
|
17
17
|
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BwzOwHWl.js";
|
|
18
18
|
import { $ as sketchFaceOffset, B as drawSingleCircle, C as cameraFromPlane, D as makeProjectedEdges, E as projectEdges, F as drawParametricFunction, G as loadFont, H as drawText, I as drawPointsInterpolation, J as textMetrics, K as sketchText, L as drawPolysides, M as draw, N as drawCircle, O as isProjectionPlane, P as drawEllipse, Q as sketchEllipse, R as drawRectangle, S as drawProjection, T as createCamera, U as fontMetrics, V as drawSingleEllipse, W as getFont, X as polysideInnerRadius, Y as makeBaseBox, Z as sketchCircle, _ as sketchLoft, a as drawingIntersect, b as sketchWires, c as rotateDrawing, d as compoundSketchExtrude, et as sketchHelix, f as compoundSketchFace, g as sketchFace, h as sketchExtrude, i as drawingFuse, it as sketchRoundedRectangle, j as deserializeDrawing, l as scaleDrawing, m as compoundSketchRevolve, n as drawingCut, nt as sketchPolysides, o as drawingToSketchOnPlane, ot as Sketches, p as compoundSketchLoft, q as textBlueprints, r as drawingFillet, rt as sketchRectangle, s as mirrorDrawing, st as CompoundSketch, t as drawingChamfer, tt as sketchParametricFunction, u as translateDrawing, v as sketchRevolve, w as cameraLookAt, x as drawFaceOutline, y as sketchSweep, z as drawRoundedRectangle } from "./drawFns-BDqEWrCy.js";
|
|
@@ -3,7 +3,7 @@ const require_errors = require("./errors-9zQcQK1H.cjs");
|
|
|
3
3
|
const require_faceFns = require("./faceFns-D7i9yEts.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-BXvBYIor.cjs");
|
|
5
5
|
const require_shapeFns = require("./shapeFns-DZ2c5Nqo.cjs");
|
|
6
|
-
const require_booleanFns = require("./booleanFns-
|
|
6
|
+
const require_booleanFns = require("./booleanFns-Dmvv9VVT.cjs");
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -3,7 +3,7 @@ import { A as ok, b as err, d as validationError, n as computationError, r as io
|
|
|
3
3
|
import { v as fromBREP } from "./faceFns-lcEYbLOs.js";
|
|
4
4
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-D9etjPgV.js";
|
|
5
5
|
import { s as toBREP } from "./shapeFns-E3qTx3nN.js";
|
|
6
|
-
import { i as fuseAll } from "./booleanFns-
|
|
6
|
+
import { i as fuseAll } from "./booleanFns-DViuH9nW.js";
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
package/dist/kernel/types.d.ts
CHANGED
|
@@ -33,6 +33,12 @@ export interface BooleanOptions {
|
|
|
33
33
|
* effect.
|
|
34
34
|
*/
|
|
35
35
|
unsafe?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* When false, skips face evolution tracking (hash collection, Modified/Generated/Deleted
|
|
38
|
+
* queries, metadata propagation). This is a performance optimization for intermediate
|
|
39
|
+
* boolean operations where face tags/colors are not needed. Defaults to `true`.
|
|
40
|
+
*/
|
|
41
|
+
trackEvolution?: boolean | undefined;
|
|
36
42
|
}
|
|
37
43
|
export type ShapeType = 'vertex' | 'edge' | 'wire' | 'face' | 'shell' | 'solid' | 'compsolid' | 'compound';
|
|
38
44
|
/** Surface type discriminant returned by surfaceType(). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/kernel/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC;AAEjC;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC;AAE9B;;;GAGG;AAEH,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC;AAE7B,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC;IAClD,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sHAAsH;IACtH,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACjC,oEAAoE;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;
|
|
1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_historyFns = require("./historyFns-
|
|
2
|
+
const require_historyFns = require("./historyFns-BO9c4AgQ.cjs");
|
|
3
3
|
const require_extrudeFns = require("./extrudeFns-CIUq5ZQW.cjs");
|
|
4
4
|
exports.addChild = require_historyFns.addChild;
|
|
5
5
|
exports.addStep = require_historyFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-
|
|
1
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-C_EoZWD5.js";
|
|
2
2
|
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-DxS_UOMr.js";
|
|
3
3
|
export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -711,7 +711,7 @@ function thicken(shape, thickness) {
|
|
|
711
711
|
* @param edges - Edges to fillet. Pass `undefined` to fillet all edges.
|
|
712
712
|
* @param radius - Constant radius, variable radius `[r1, r2]`, or per-edge callback.
|
|
713
713
|
*/
|
|
714
|
-
function fillet(shape, edges, radius) {
|
|
714
|
+
function fillet(shape, edges, radius, { trackEvolution = true } = {}) {
|
|
715
715
|
const check = validateNotNull(shape, "fillet: shape");
|
|
716
716
|
if (isErr(check)) return check;
|
|
717
717
|
const paramErr = validatePositiveParam(radius, {
|
|
@@ -736,6 +736,11 @@ function fillet(shape, edges, radius) {
|
|
|
736
736
|
filteredEdges = [...selectedEdges];
|
|
737
737
|
kernelRadius = radius;
|
|
738
738
|
}
|
|
739
|
+
if (!trackEvolution) {
|
|
740
|
+
const cast = castShape(getKernel().fillet(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius));
|
|
741
|
+
if (!isShape3D(cast)) return err(kernelError(BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
742
|
+
return ok(cast);
|
|
743
|
+
}
|
|
739
744
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
740
745
|
const { shape: resultShape, evolution } = getKernel().filletWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius, inputFaceHashes, HASH_CODE_MAX);
|
|
741
746
|
return finalizeShape3D(evolution, resultShape, [shape], BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape");
|
|
@@ -798,12 +803,17 @@ function chamfer(shape, edges, distance) {
|
|
|
798
803
|
* @param thickness - Wall thickness.
|
|
799
804
|
* @param tolerance - Shell operation tolerance (default 1e-3).
|
|
800
805
|
*/
|
|
801
|
-
function shell(shape, faces, thickness, tolerance = .001) {
|
|
806
|
+
function shell(shape, faces, thickness, tolerance = .001, { trackEvolution = true } = {}) {
|
|
802
807
|
const check = validateNotNull(shape, "shell: shape");
|
|
803
808
|
if (isErr(check)) return check;
|
|
804
809
|
if (thickness <= 0) return err(validationError("INVALID_THICKNESS", "Shell thickness must be positive"));
|
|
805
810
|
if (faces.length === 0) return err(validationError("NO_FACES", "At least one face must be specified for shell"));
|
|
806
811
|
try {
|
|
812
|
+
if (!trackEvolution) {
|
|
813
|
+
const cast = castShape(getKernel().shell(shape.wrapped, faces.map((f) => f.wrapped), thickness, tolerance));
|
|
814
|
+
if (!isShape3D(cast)) return err(kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
815
|
+
return ok(cast);
|
|
816
|
+
}
|
|
807
817
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
808
818
|
const { shape: resultShape, evolution } = getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, HASH_CODE_MAX, tolerance);
|
|
809
819
|
const cast = castShape(resultShape);
|
|
@@ -711,7 +711,7 @@ function thicken(shape, thickness) {
|
|
|
711
711
|
* @param edges - Edges to fillet. Pass `undefined` to fillet all edges.
|
|
712
712
|
* @param radius - Constant radius, variable radius `[r1, r2]`, or per-edge callback.
|
|
713
713
|
*/
|
|
714
|
-
function fillet(shape, edges, radius) {
|
|
714
|
+
function fillet(shape, edges, radius, { trackEvolution = true } = {}) {
|
|
715
715
|
const check = validateNotNull(shape, "fillet: shape");
|
|
716
716
|
if (require_errors.isErr(check)) return check;
|
|
717
717
|
const paramErr = validatePositiveParam(radius, {
|
|
@@ -736,6 +736,11 @@ function fillet(shape, edges, radius) {
|
|
|
736
736
|
filteredEdges = [...selectedEdges];
|
|
737
737
|
kernelRadius = radius;
|
|
738
738
|
}
|
|
739
|
+
if (!trackEvolution) {
|
|
740
|
+
const cast = require_shapeTypes.castShape(require_shapeTypes.getKernel().fillet(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius));
|
|
741
|
+
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
742
|
+
return require_errors.ok(cast);
|
|
743
|
+
}
|
|
739
744
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
740
745
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().filletWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
741
746
|
return finalizeShape3D(evolution, resultShape, [shape], require_errors.BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape");
|
|
@@ -798,12 +803,17 @@ function chamfer(shape, edges, distance) {
|
|
|
798
803
|
* @param thickness - Wall thickness.
|
|
799
804
|
* @param tolerance - Shell operation tolerance (default 1e-3).
|
|
800
805
|
*/
|
|
801
|
-
function shell(shape, faces, thickness, tolerance = .001) {
|
|
806
|
+
function shell(shape, faces, thickness, tolerance = .001, { trackEvolution = true } = {}) {
|
|
802
807
|
const check = validateNotNull(shape, "shell: shape");
|
|
803
808
|
if (require_errors.isErr(check)) return check;
|
|
804
809
|
if (thickness <= 0) return require_errors.err(require_errors.validationError("INVALID_THICKNESS", "Shell thickness must be positive"));
|
|
805
810
|
if (faces.length === 0) return require_errors.err(require_errors.validationError("NO_FACES", "At least one face must be specified for shell"));
|
|
806
811
|
try {
|
|
812
|
+
if (!trackEvolution) {
|
|
813
|
+
const cast = require_shapeTypes.castShape(require_shapeTypes.getKernel().shell(shape.wrapped, faces.map((f) => f.wrapped), thickness, tolerance));
|
|
814
|
+
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
815
|
+
return require_errors.ok(cast);
|
|
816
|
+
}
|
|
807
817
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
808
818
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, require_constants.HASH_CODE_MAX, tolerance);
|
|
809
819
|
const cast = require_shapeTypes.castShape(resultShape);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mapp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AC,EAAE,MAAM,CAAA;CAAO,GAC5D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAQ/B"}
|
|
@@ -18,7 +18,9 @@ export declare function thicken(shape: Face | Shell, thickness: number): Result<
|
|
|
18
18
|
* @param edges - Edges to fillet. Pass `undefined` to fillet all edges.
|
|
19
19
|
* @param radius - Constant radius, variable radius `[r1, r2]`, or per-edge callback.
|
|
20
20
|
*/
|
|
21
|
-
export declare function fillet(shape: ValidSolid, edges: ReadonlyArray<Edge> | undefined, radius: number | [number, number] | ((edge: Edge) => number | [number, number] | null)
|
|
21
|
+
export declare function fillet(shape: ValidSolid, edges: ReadonlyArray<Edge> | undefined, radius: number | [number, number] | ((edge: Edge) => number | [number, number] | null), { trackEvolution }?: {
|
|
22
|
+
trackEvolution?: boolean | undefined;
|
|
23
|
+
}): Result<ValidSolid>;
|
|
22
24
|
/**
|
|
23
25
|
* Apply a chamfer (beveled edge) to selected edges of a 3D shape.
|
|
24
26
|
*
|
|
@@ -35,7 +37,9 @@ export declare function chamfer(shape: ValidSolid, edges: ReadonlyArray<Edge> |
|
|
|
35
37
|
* @param thickness - Wall thickness.
|
|
36
38
|
* @param tolerance - Shell operation tolerance (default 1e-3).
|
|
37
39
|
*/
|
|
38
|
-
export declare function shell(shape: ValidSolid, faces: ReadonlyArray<Face>, thickness: number, tolerance?: number
|
|
40
|
+
export declare function shell(shape: ValidSolid, faces: ReadonlyArray<Face>, thickness: number, tolerance?: number, { trackEvolution }?: {
|
|
41
|
+
trackEvolution?: boolean | undefined;
|
|
42
|
+
}): Result<ValidSolid>;
|
|
39
43
|
/**
|
|
40
44
|
* Offset all faces of a shape by a given distance.
|
|
41
45
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifierFns.d.ts","sourceRoot":"","sources":["../../src/topology/modifierFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,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,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,EAC1B,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,IAAI,EAClB,KAAK,EAAE,UAAU,GAChB,MAAM,CAAC,UAAU,CAAC,CAkFpB;AAMD,uEAAuE;AACvE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,aAAa,CAAC,oBAAoB,CAAC,GACzC,MAAM,CAAC,UAAU,CAAC,CAiDpB"}
|
package/dist/topology.cjs
CHANGED
|
@@ -3,8 +3,8 @@ const require_faceFns = require("./faceFns-D7i9yEts.cjs");
|
|
|
3
3
|
const require_shapeFns = require("./shapeFns-DZ2c5Nqo.cjs");
|
|
4
4
|
const require_curveFns = require("./curveFns--4Nh1ZtB.cjs");
|
|
5
5
|
const require_meshFns = require("./meshFns-Z5n8gFAS.cjs");
|
|
6
|
-
const require_booleanFns = require("./booleanFns-
|
|
7
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
6
|
+
const require_booleanFns = require("./booleanFns-Dmvv9VVT.cjs");
|
|
7
|
+
const require_primitiveFns = require("./primitiveFns-w2otksRk.cjs");
|
|
8
8
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
9
9
|
exports.adjacentFaces = require_primitiveFns.adjacentFaces;
|
|
10
10
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -2,6 +2,6 @@ import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt,
|
|
|
2
2
|
import { B as iterVertices, F as getVertices, H as vertexPosition, I as getWires, L as invalidateShapeCache, M as getEdges, N as getFaces, R as iterEdges, V as iterWires, a as isSameShape, i as isEqualShape, j as getBounds, n as getHashCode, z as iterFaces } from "./shapeFns-E3qTx3nN.js";
|
|
3
3
|
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-D9GbWpcl.js";
|
|
4
4
|
import { n as exportSTEP, o as clearMeshCache, r as exportSTL, s as createMeshCache, t as exportIGES } from "./meshFns-CKs4H-CH.js";
|
|
5
|
-
import { i as fuseAll, n as cutAll } from "./booleanFns-
|
|
6
|
-
import { $ as getNurbsSurfaceData, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as wiresOfFace, b as sphere, c as cylinder, ct as toGroupedBufferGeometryData, d as ellipsoid, et as adjacentFaces, f as face, g as offsetFace, h as line, i as bsplineApprox, it as verticesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toLineGeometryData, m as helix, n as bezier, nt as facesOfEdge, o as compound, ot as chamferDistAngle, p as filledFace, q as filletWithEvolution, r as box, rt as sharedEdges, s as cone, st as toBufferGeometryData, t as addHoles, tt as edgesOfFace, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-
|
|
5
|
+
import { i as fuseAll, n as cutAll } from "./booleanFns-DViuH9nW.js";
|
|
6
|
+
import { $ as getNurbsSurfaceData, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as wiresOfFace, b as sphere, c as cylinder, ct as toGroupedBufferGeometryData, d as ellipsoid, et as adjacentFaces, f as face, g as offsetFace, h as line, i as bsplineApprox, it as verticesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toLineGeometryData, m as helix, n as bezier, nt as facesOfEdge, o as compound, ot as chamferDistAngle, p as filledFace, q as filletWithEvolution, r as box, rt as sharedEdges, s as cone, st as toBufferGeometryData, t as addHoles, tt as edgesOfFace, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-DmIP-qnU.js";
|
|
7
7
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brepjs",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.2",
|
|
4
4
|
"description": "Web CAD library with pluggable geometry kernel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
"vitest": "4.1.0"
|
|
224
224
|
},
|
|
225
225
|
"peerDependencies": {
|
|
226
|
-
"brepjs-opencascade": "^0.5.1 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0",
|
|
226
|
+
"brepjs-opencascade": "^0.5.1 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0",
|
|
227
227
|
"brepkit-wasm": "^0.10.1 || ^1.0.0 || ^2.0.0"
|
|
228
228
|
},
|
|
229
229
|
"peerDependenciesMeta": {
|