brepjs 8.8.2 → 8.8.4
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/curves.d.ts.map +1 -1
- package/dist/2d/lib/Curve2D.d.ts.map +1 -1
- package/dist/2d/lib/approximations.d.ts.map +1 -1
- package/dist/2d/lib/makeCurves.d.ts.map +1 -1
- package/dist/2d/lib/ocWrapper.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/Blueprint-C4Rx89oe.js +1440 -0
- package/dist/Blueprint-D1Dik12C.cjs +1439 -0
- package/dist/{boolean2D-q5FOdOQW.cjs → boolean2D-BZnkU_aH.cjs} +215 -130
- package/dist/{boolean2D-Dgnuy63w.js → boolean2D-D4j89vF_.js} +215 -130
- package/dist/{booleanFns-CFit7JYt.cjs → booleanFns-Cf_0aWNe.cjs} +214 -133
- package/dist/{booleanFns--Orezl-b.js → booleanFns-D6SeHoCv.js} +214 -133
- package/dist/brepjs.cjs +478 -314
- package/dist/brepjs.js +574 -410
- package/dist/core/disposal.d.ts +44 -3
- package/dist/core/disposal.d.ts.map +1 -1
- package/dist/core/errors.d.ts +2 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/geometryHelpers.d.ts.map +1 -1
- package/dist/core/kernelCall.d.ts +20 -0
- package/dist/core/kernelCall.d.ts.map +1 -1
- package/dist/core/memory.d.ts +1 -1
- package/dist/core/memory.d.ts.map +1 -1
- package/dist/core.cjs +7 -4
- package/dist/core.d.ts +1 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +14 -11
- package/dist/{cornerFinder-KNTFoGrm.js → cornerFinder-CypY3T_w.js} +1 -1
- package/dist/{cornerFinder-v4un1Fr9.cjs → cornerFinder-DbRL42YI.cjs} +1 -1
- package/dist/{curveFns-6ovDM_sR.cjs → curveFns-KDpL9iyo.cjs} +139 -38
- package/dist/curveFns-VDZEhY97.js +281 -0
- package/dist/{drawFns-WgXeXHH1.cjs → drawFns-B52K-9DJ.cjs} +184 -104
- package/dist/{drawFns-XwroLxdb.js → drawFns-CVPwl2No.js} +184 -104
- package/dist/{errors-NNmTtM5u.cjs → errors-BYb4tL5h.cjs} +3 -0
- package/dist/{errors-DJ92ermb.js → errors-CHfaHQSt.js} +3 -0
- package/dist/faceFns-B8xnZw-f.cjs +358 -0
- package/dist/faceFns-DG4bu-QB.js +359 -0
- package/dist/{helpers-CRfqaW0Y.cjs → helpers-Cfibxk7U.cjs} +15 -12
- package/dist/{helpers-CtBCzEqs.js → helpers-zsENdJlc.js} +15 -12
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/io/importFns.d.ts.map +1 -1
- package/dist/io.cjs +133 -65
- package/dist/io.js +133 -65
- package/dist/kernel/booleanOps.d.ts.map +1 -1
- package/dist/loft-Bhnw5Rfr.cjs +530 -0
- package/dist/loft-fSnlFn-j.js +531 -0
- package/dist/measurement-C4Ofuy_y.cjs +200 -0
- package/dist/measurement-DzRb6oYN.js +201 -0
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CPNNlpbw.cjs → meshFns-C-6Cq3V-.cjs} +3 -3
- package/dist/{meshFns-DAmWVyEp.js → meshFns-Cw3IFJjg.js} +3 -3
- package/dist/{occtBoundary-Cqfsau2c.cjs → occtBoundary-CN_uQJtA.cjs} +4 -3
- package/dist/{occtBoundary-DvBywHyU.js → occtBoundary-Ct0tN8cs.js} +4 -3
- package/dist/operations/exporterFns.d.ts.map +1 -1
- package/dist/operations/exporterUtils.d.ts +3 -3
- package/dist/operations/exporterUtils.d.ts.map +1 -1
- package/dist/operations/exporters.d.ts.map +1 -1
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/loft.d.ts.map +1 -1
- package/dist/operations/multiSweepFns.d.ts.map +1 -1
- package/dist/{operations-BQ25CPI8.cjs → operations-DvwWDqIp.cjs} +263 -168
- package/dist/{operations-vN0tcoaU.js → operations-PYuj8GLd.js} +263 -168
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
- package/dist/query.cjs +67 -15
- package/dist/query.js +68 -16
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-C785aeVn.cjs → shapeFns-ByLUl6KE.cjs} +63 -9
- package/dist/{shapeFns-ClpALED4.js → shapeFns-QL3zx6uW.js} +63 -9
- package/dist/{shapeTypes-DnwCo942.js → shapeTypes-D34s68Xi.js} +51 -20
- package/dist/{shapeTypes-CIijJxCz.cjs → shapeTypes-sXITvFkF.cjs} +33 -2
- package/dist/sketching/CompoundSketch.d.ts.map +1 -1
- package/dist/sketching/Sketch.d.ts.map +1 -1
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching/Sketcher2d.d.ts.map +1 -1
- package/dist/sketching/cannedSketches.d.ts.map +1 -1
- package/dist/sketching/draw.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/surfaceBuilders-DYX6h68y.js +436 -0
- package/dist/surfaceBuilders-hupjYn0W.cjs +435 -0
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/compoundOpsFns.d.ts.map +1 -1
- package/dist/topology/curveBuilders.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/solidBuilders.d.ts.map +1 -1
- package/dist/topology/surfaceBuilders.d.ts.map +1 -1
- package/dist/{topology-zG8maSDK.cjs → topology-DWe9SYAy.cjs} +8 -8
- package/dist/{topology-CqyxpmEh.js → topology-psR8Hqiz.js} +8 -8
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/dist/{vectors-CGLqemPY.cjs → vectors-9rrStq8t.cjs} +2 -2
- package/dist/{vectors-2lOjaa8N.js → vectors-Dp5Iu1KH.js} +2 -2
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +4 -1
- package/dist/Blueprint-BmbNUnGI.cjs +0 -1185
- package/dist/Blueprint-C-JJkkwL.js +0 -1186
- package/dist/curveFns-BhQECv8e.js +0 -180
- package/dist/faceFns-3PDjBeW7.js +0 -272
- package/dist/faceFns-CxaLWOjc.cjs +0 -271
- package/dist/loft-CVb-IjEI.cjs +0 -372
- package/dist/loft-DMFjK6lk.js +0 -373
- package/dist/measurement-CecYIt3s.cjs +0 -134
- package/dist/measurement-DHDLAH7-.js +0 -135
- package/dist/surfaceBuilders-CC0ZQGix.cjs +0 -289
- package/dist/surfaceBuilders-CrJtFu2a.js +0 -290
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
|
|
3
|
+
var __typeError = (msg) => {
|
|
4
|
+
throw TypeError(msg);
|
|
5
|
+
};
|
|
6
|
+
var __using = (stack, value, async) => {
|
|
7
|
+
if (value != null) {
|
|
8
|
+
if (typeof value !== "object" && typeof value !== "function") __typeError("Object expected");
|
|
9
|
+
var dispose, inner;
|
|
10
|
+
if (async) dispose = value[__knownSymbol("asyncDispose")];
|
|
11
|
+
if (dispose === void 0) {
|
|
12
|
+
dispose = value[__knownSymbol("dispose")];
|
|
13
|
+
if (async) inner = dispose;
|
|
14
|
+
}
|
|
15
|
+
if (typeof dispose !== "function") __typeError("Object not disposable");
|
|
16
|
+
if (inner) dispose = function() {
|
|
17
|
+
try {
|
|
18
|
+
inner.call(this);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
return Promise.reject(e);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
stack.push([async, dispose, value]);
|
|
24
|
+
} else if (async) {
|
|
25
|
+
stack.push([async]);
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
};
|
|
29
|
+
var __callDispose = (stack, error, hasError) => {
|
|
30
|
+
var E = typeof SuppressedError === "function" ? SuppressedError : function(e, s, m, _) {
|
|
31
|
+
return _ = Error(m), _.name = "SuppressedError", _.error = e, _.suppressed = s, _;
|
|
32
|
+
};
|
|
33
|
+
var fail = (e) => error = hasError ? new E(e, error, "An error was suppressed during disposal") : (hasError = true, e);
|
|
34
|
+
var next = (it) => {
|
|
35
|
+
while (it = stack.pop()) {
|
|
36
|
+
try {
|
|
37
|
+
var result = it[1] && it[1].call(it[2]);
|
|
38
|
+
if (it[0]) return Promise.resolve(result).then(next, (e) => (fail(e), next()));
|
|
39
|
+
} catch (e) {
|
|
40
|
+
fail(e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (hasError) throw error;
|
|
44
|
+
};
|
|
45
|
+
return next();
|
|
46
|
+
};
|
|
47
|
+
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
48
|
+
const errors = require("./errors-BYb4tL5h.cjs");
|
|
49
|
+
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
50
|
+
const shapeFns = require("./shapeFns-ByLUl6KE.cjs");
|
|
51
|
+
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
52
|
+
function range(len) {
|
|
53
|
+
return Array.from(Array(len).keys());
|
|
54
|
+
}
|
|
55
|
+
function zip(arrays) {
|
|
56
|
+
const minLength = Math.min(...arrays.map((arr) => arr.length));
|
|
57
|
+
return range(minLength).map((i) => arrays.map((arr) => arr[i]));
|
|
58
|
+
}
|
|
59
|
+
function makeLine(v1, v2) {
|
|
60
|
+
var _stack = [];
|
|
61
|
+
try {
|
|
62
|
+
const oc = occtBoundary.getKernel().oc;
|
|
63
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
64
|
+
const p1 = scope.register(occtBoundary.toOcPnt(v1));
|
|
65
|
+
const p2 = scope.register(occtBoundary.toOcPnt(v2));
|
|
66
|
+
const maker = scope.register(new oc.BRepBuilderAPI_MakeEdge_3(p1, p2));
|
|
67
|
+
return shapeTypes.createEdge(maker.Edge());
|
|
68
|
+
} catch (_) {
|
|
69
|
+
var _error = _, _hasError = true;
|
|
70
|
+
} finally {
|
|
71
|
+
__callDispose(_stack, _error, _hasError);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function makeCircle(radius, center = [0, 0, 0], normal = [0, 0, 1]) {
|
|
75
|
+
var _stack = [];
|
|
76
|
+
try {
|
|
77
|
+
const oc = occtBoundary.getKernel().oc;
|
|
78
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
79
|
+
const ax = scope.register(occtBoundary.makeOcAx2(center, normal));
|
|
80
|
+
const circleGp = scope.register(new oc.gp_Circ_2(ax, radius));
|
|
81
|
+
const edgeMaker = scope.register(new oc.BRepBuilderAPI_MakeEdge_8(circleGp));
|
|
82
|
+
return shapeTypes.createEdge(edgeMaker.Edge());
|
|
83
|
+
} catch (_) {
|
|
84
|
+
var _error = _, _hasError = true;
|
|
85
|
+
} finally {
|
|
86
|
+
__callDispose(_stack, _error, _hasError);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function makeEllipse(majorRadius, minorRadius, center = [0, 0, 0], normal = [0, 0, 1], xDir) {
|
|
90
|
+
var _stack = [];
|
|
91
|
+
try {
|
|
92
|
+
if (minorRadius > majorRadius) {
|
|
93
|
+
return errors.err(
|
|
94
|
+
errors.validationError("ELLIPSE_RADII", "The minor radius must be smaller than the major one")
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
const oc = occtBoundary.getKernel().oc;
|
|
98
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
99
|
+
const ax = scope.register(occtBoundary.makeOcAx2(center, normal, xDir));
|
|
100
|
+
const ellipseGp = scope.register(new oc.gp_Elips_2(ax, majorRadius, minorRadius));
|
|
101
|
+
const edgeMaker = scope.register(new oc.BRepBuilderAPI_MakeEdge_12(ellipseGp));
|
|
102
|
+
return errors.ok(shapeTypes.createEdge(edgeMaker.Edge()));
|
|
103
|
+
} catch (_) {
|
|
104
|
+
var _error = _, _hasError = true;
|
|
105
|
+
} finally {
|
|
106
|
+
__callDispose(_stack, _error, _hasError);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function makeHelix(pitch, height, radius, center = [0, 0, 0], dir = [0, 0, 1], lefthand = false) {
|
|
110
|
+
var _stack = [];
|
|
111
|
+
try {
|
|
112
|
+
const oc = occtBoundary.getKernel().oc;
|
|
113
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
114
|
+
const angularStep = lefthand ? -2 * Math.PI : 2 * Math.PI;
|
|
115
|
+
const geomLine = scope.register(
|
|
116
|
+
new oc.Geom2d_Line_3(
|
|
117
|
+
scope.register(new oc.gp_Pnt2d_3(0, 0)),
|
|
118
|
+
scope.register(new oc.gp_Dir2d_4(angularStep, pitch))
|
|
119
|
+
)
|
|
120
|
+
);
|
|
121
|
+
const nTurns = height / pitch;
|
|
122
|
+
const uStart = scope.register(geomLine.Value(0));
|
|
123
|
+
const uStop = scope.register(geomLine.Value(nTurns * Math.sqrt((2 * Math.PI) ** 2 + pitch ** 2)));
|
|
124
|
+
const geomSeg = scope.register(new oc.GCE2d_MakeSegment_1(uStart, uStop));
|
|
125
|
+
const geomSurf = new oc.Geom_CylindricalSurface_1(scope.register(occtBoundary.makeOcAx3(center, dir)), radius);
|
|
126
|
+
const e = scope.register(
|
|
127
|
+
new oc.BRepBuilderAPI_MakeEdge_30(
|
|
128
|
+
scope.register(new oc.Handle_Geom2d_Curve_2(geomSeg.Value().get())),
|
|
129
|
+
scope.register(new oc.Handle_Geom_Surface_2(geomSurf))
|
|
130
|
+
)
|
|
131
|
+
).Edge();
|
|
132
|
+
const w = scope.register(new oc.BRepBuilderAPI_MakeWire_2(e)).Wire();
|
|
133
|
+
oc.BRepLib.BuildCurves3d_2(w);
|
|
134
|
+
return shapeTypes.createWire(w);
|
|
135
|
+
} catch (_) {
|
|
136
|
+
var _error = _, _hasError = true;
|
|
137
|
+
} finally {
|
|
138
|
+
__callDispose(_stack, _error, _hasError);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function makeThreePointArc(v1, v2, v3) {
|
|
142
|
+
var _stack = [];
|
|
143
|
+
try {
|
|
144
|
+
const oc = occtBoundary.getKernel().oc;
|
|
145
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
146
|
+
const p1 = scope.register(occtBoundary.toOcPnt(v1));
|
|
147
|
+
const p2 = scope.register(occtBoundary.toOcPnt(v2));
|
|
148
|
+
const p3 = scope.register(occtBoundary.toOcPnt(v3));
|
|
149
|
+
const arcMaker = scope.register(new oc.GC_MakeArcOfCircle_4(p1, p2, p3));
|
|
150
|
+
const circleGeom = scope.register(arcMaker.Value());
|
|
151
|
+
const curve = scope.register(new oc.Handle_Geom_Curve_2(circleGeom.get()));
|
|
152
|
+
const edgeMaker = scope.register(new oc.BRepBuilderAPI_MakeEdge_24(curve));
|
|
153
|
+
return shapeTypes.createEdge(edgeMaker.Edge());
|
|
154
|
+
} catch (_) {
|
|
155
|
+
var _error = _, _hasError = true;
|
|
156
|
+
} finally {
|
|
157
|
+
__callDispose(_stack, _error, _hasError);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function makeEllipseArc(majorRadius, minorRadius, startAngle, endAngle, center = [0, 0, 0], normal = [0, 0, 1], xDir) {
|
|
161
|
+
var _stack = [];
|
|
162
|
+
try {
|
|
163
|
+
if (minorRadius > majorRadius) {
|
|
164
|
+
return errors.err(
|
|
165
|
+
errors.validationError("ELLIPSE_RADII", "The minor radius must be smaller than the major one")
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
const oc = occtBoundary.getKernel().oc;
|
|
169
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
170
|
+
const ax = scope.register(occtBoundary.makeOcAx2(center, normal, xDir));
|
|
171
|
+
const ellipseGp = scope.register(new oc.gp_Elips_2(ax, majorRadius, minorRadius));
|
|
172
|
+
const edgeMaker = scope.register(
|
|
173
|
+
new oc.BRepBuilderAPI_MakeEdge_13(ellipseGp, startAngle, endAngle)
|
|
174
|
+
);
|
|
175
|
+
return errors.ok(shapeTypes.createEdge(edgeMaker.Edge()));
|
|
176
|
+
} catch (_) {
|
|
177
|
+
var _error = _, _hasError = true;
|
|
178
|
+
} finally {
|
|
179
|
+
__callDispose(_stack, _error, _hasError);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function makeBSplineApproximation(points, { tolerance = 1e-3, smoothing = null, degMax = 6, degMin = 1 } = {}) {
|
|
183
|
+
var _stack = [];
|
|
184
|
+
try {
|
|
185
|
+
const oc = occtBoundary.getKernel().oc;
|
|
186
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
187
|
+
const pnts = scope.register(new oc.TColgp_Array1OfPnt_2(1, points.length));
|
|
188
|
+
points.forEach((point, index) => {
|
|
189
|
+
pnts.SetValue(index + 1, scope.register(occtBoundary.toOcPnt(point)));
|
|
190
|
+
});
|
|
191
|
+
let splineBuilder;
|
|
192
|
+
if (smoothing) {
|
|
193
|
+
splineBuilder = scope.register(
|
|
194
|
+
new oc.GeomAPI_PointsToBSpline_5(
|
|
195
|
+
pnts,
|
|
196
|
+
smoothing[0],
|
|
197
|
+
smoothing[1],
|
|
198
|
+
smoothing[2],
|
|
199
|
+
degMax,
|
|
200
|
+
oc.GeomAbs_Shape.GeomAbs_C2,
|
|
201
|
+
tolerance
|
|
202
|
+
)
|
|
203
|
+
);
|
|
204
|
+
} else {
|
|
205
|
+
splineBuilder = scope.register(
|
|
206
|
+
new oc.GeomAPI_PointsToBSpline_2(
|
|
207
|
+
pnts,
|
|
208
|
+
degMin,
|
|
209
|
+
degMax,
|
|
210
|
+
oc.GeomAbs_Shape.GeomAbs_C2,
|
|
211
|
+
tolerance
|
|
212
|
+
)
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
if (!splineBuilder.IsDone()) {
|
|
216
|
+
return errors.err(errors.occtError("BSPLINE_FAILED", "B-spline approximation failed"));
|
|
217
|
+
}
|
|
218
|
+
const splineGeom = scope.register(splineBuilder.Curve());
|
|
219
|
+
const curve = scope.register(new oc.Handle_Geom_Curve_2(splineGeom.get()));
|
|
220
|
+
return errors.ok(shapeTypes.createEdge(new oc.BRepBuilderAPI_MakeEdge_24(curve).Edge()));
|
|
221
|
+
} catch (_) {
|
|
222
|
+
var _error = _, _hasError = true;
|
|
223
|
+
} finally {
|
|
224
|
+
__callDispose(_stack, _error, _hasError);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
function makeBezierCurve(points) {
|
|
228
|
+
var _stack = [];
|
|
229
|
+
try {
|
|
230
|
+
if (points.length < 2) {
|
|
231
|
+
return errors.err(
|
|
232
|
+
errors.validationError(
|
|
233
|
+
"BEZIER_MIN_POINTS",
|
|
234
|
+
`Need at least 2 points for a Bezier curve, got ${points.length}`,
|
|
235
|
+
void 0,
|
|
236
|
+
{
|
|
237
|
+
pointCount: points.length
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
const oc = occtBoundary.getKernel().oc;
|
|
243
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
244
|
+
const arrayOfPoints = scope.register(new oc.TColgp_Array1OfPnt_2(1, points.length));
|
|
245
|
+
points.forEach((p, i) => {
|
|
246
|
+
arrayOfPoints.SetValue(i + 1, scope.register(occtBoundary.toOcPnt(p)));
|
|
247
|
+
});
|
|
248
|
+
const bezCurve = new oc.Geom_BezierCurve_1(arrayOfPoints);
|
|
249
|
+
const curve = scope.register(new oc.Handle_Geom_Curve_2(bezCurve));
|
|
250
|
+
const edgeMaker = scope.register(new oc.BRepBuilderAPI_MakeEdge_24(curve));
|
|
251
|
+
return errors.ok(shapeTypes.createEdge(edgeMaker.Edge()));
|
|
252
|
+
} catch (_) {
|
|
253
|
+
var _error = _, _hasError = true;
|
|
254
|
+
} finally {
|
|
255
|
+
__callDispose(_stack, _error, _hasError);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
function makeTangentArc(startPoint, startTgt, endPoint) {
|
|
259
|
+
var _stack = [];
|
|
260
|
+
try {
|
|
261
|
+
const oc = occtBoundary.getKernel().oc;
|
|
262
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
263
|
+
const circleGeom = scope.register(
|
|
264
|
+
new oc.GC_MakeArcOfCircle_5(
|
|
265
|
+
scope.register(occtBoundary.toOcPnt(startPoint)),
|
|
266
|
+
scope.register(occtBoundary.toOcVec(startTgt)),
|
|
267
|
+
scope.register(occtBoundary.toOcPnt(endPoint))
|
|
268
|
+
).Value()
|
|
269
|
+
);
|
|
270
|
+
const curve = scope.register(new oc.Handle_Geom_Curve_2(circleGeom.get()));
|
|
271
|
+
const edgeMaker = scope.register(new oc.BRepBuilderAPI_MakeEdge_24(curve));
|
|
272
|
+
return shapeTypes.createEdge(edgeMaker.Edge());
|
|
273
|
+
} catch (_) {
|
|
274
|
+
var _error = _, _hasError = true;
|
|
275
|
+
} finally {
|
|
276
|
+
__callDispose(_stack, _error, _hasError);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function assembleWire(listOfEdges) {
|
|
280
|
+
var _stack = [];
|
|
281
|
+
try {
|
|
282
|
+
const oc = occtBoundary.getKernel().oc;
|
|
283
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
284
|
+
const wireBuilder = scope.register(new oc.BRepBuilderAPI_MakeWire_1());
|
|
285
|
+
listOfEdges.forEach((e) => {
|
|
286
|
+
if (shapeTypes.isEdge(e)) {
|
|
287
|
+
wireBuilder.Add_1(e.wrapped);
|
|
288
|
+
}
|
|
289
|
+
if (shapeTypes.isWire(e)) {
|
|
290
|
+
wireBuilder.Add_2(e.wrapped);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
const progress = scope.register(new oc.Message_ProgressRange_1());
|
|
294
|
+
wireBuilder.Build(progress);
|
|
295
|
+
const res = wireBuilder.Error();
|
|
296
|
+
if (res !== oc.BRepBuilderAPI_WireError.BRepBuilderAPI_WireDone) {
|
|
297
|
+
const errorNames = /* @__PURE__ */ new Map([
|
|
298
|
+
[oc.BRepBuilderAPI_WireError.BRepBuilderAPI_EmptyWire, "empty wire"],
|
|
299
|
+
[oc.BRepBuilderAPI_WireError.BRepBuilderAPI_NonManifoldWire, "non manifold wire"],
|
|
300
|
+
[oc.BRepBuilderAPI_WireError.BRepBuilderAPI_DisconnectedWire, "disconnected wire"]
|
|
301
|
+
]);
|
|
302
|
+
return errors.err(
|
|
303
|
+
errors.occtError(
|
|
304
|
+
"WIRE_BUILD_FAILED",
|
|
305
|
+
`Failed to build the wire, ${errorNames.get(res) || "unknown error"}`
|
|
306
|
+
)
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
return errors.ok(shapeTypes.createWire(wireBuilder.Wire()));
|
|
310
|
+
} catch (_) {
|
|
311
|
+
var _error = _, _hasError = true;
|
|
312
|
+
} finally {
|
|
313
|
+
__callDispose(_stack, _error, _hasError);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
function makeFace(wire, holes) {
|
|
317
|
+
var _stack = [];
|
|
318
|
+
try {
|
|
319
|
+
const oc = occtBoundary.getKernel().oc;
|
|
320
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
321
|
+
const faceBuilder = scope.register(new oc.BRepBuilderAPI_MakeFace_15(wire.wrapped, false));
|
|
322
|
+
holes?.forEach((hole) => {
|
|
323
|
+
faceBuilder.Add(hole.wrapped);
|
|
324
|
+
});
|
|
325
|
+
if (!faceBuilder.IsDone()) {
|
|
326
|
+
return errors.err(
|
|
327
|
+
errors.occtError("FACE_BUILD_FAILED", "Failed to build the face. Your wire might be non planar.")
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
const face = faceBuilder.Face();
|
|
331
|
+
return errors.ok(shapeTypes.createFace(face));
|
|
332
|
+
} catch (_) {
|
|
333
|
+
var _error = _, _hasError = true;
|
|
334
|
+
} finally {
|
|
335
|
+
__callDispose(_stack, _error, _hasError);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
function fill(face) {
|
|
339
|
+
const outer = faceFns.outerWire(face);
|
|
340
|
+
return makeFace(outer);
|
|
341
|
+
}
|
|
342
|
+
function makeNewFaceWithinFace(originFace, wire) {
|
|
343
|
+
var _stack = [];
|
|
344
|
+
try {
|
|
345
|
+
const oc = occtBoundary.getKernel().oc;
|
|
346
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
347
|
+
const surface = scope.register(oc.BRep_Tool.Surface_2(originFace.wrapped));
|
|
348
|
+
const faceBuilder = scope.register(
|
|
349
|
+
new oc.BRepBuilderAPI_MakeFace_21(surface, wire.wrapped, true)
|
|
350
|
+
);
|
|
351
|
+
const face = faceBuilder.Face();
|
|
352
|
+
return shapeTypes.createFace(face);
|
|
353
|
+
} catch (_) {
|
|
354
|
+
var _error = _, _hasError = true;
|
|
355
|
+
} finally {
|
|
356
|
+
__callDispose(_stack, _error, _hasError);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function makeNonPlanarFace(wire) {
|
|
360
|
+
var _stack = [];
|
|
361
|
+
try {
|
|
362
|
+
const oc = occtBoundary.getKernel().oc;
|
|
363
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
364
|
+
const faceBuilder = scope.register(
|
|
365
|
+
new oc.BRepOffsetAPI_MakeFilling(3, 15, 2, false, 1e-5, 1e-4, 0.01, 0.1, 8, 9)
|
|
366
|
+
);
|
|
367
|
+
shapeFns.getEdges(wire).forEach((edge) => {
|
|
368
|
+
faceBuilder.Add_1(
|
|
369
|
+
edge.wrapped,
|
|
370
|
+
oc.GeomAbs_Shape.GeomAbs_C0,
|
|
371
|
+
true
|
|
372
|
+
);
|
|
373
|
+
});
|
|
374
|
+
const progress = scope.register(new oc.Message_ProgressRange_1());
|
|
375
|
+
faceBuilder.Build(progress);
|
|
376
|
+
return errors.andThen(faceFns.cast(faceBuilder.Shape()), (newFace) => {
|
|
377
|
+
if (!shapeTypes.isFace(newFace)) {
|
|
378
|
+
return errors.err(errors.occtError("FACE_BUILD_FAILED", "Failed to create a face"));
|
|
379
|
+
}
|
|
380
|
+
return errors.ok(newFace);
|
|
381
|
+
});
|
|
382
|
+
} catch (_) {
|
|
383
|
+
var _error = _, _hasError = true;
|
|
384
|
+
} finally {
|
|
385
|
+
__callDispose(_stack, _error, _hasError);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function addHolesInFace(face, holes) {
|
|
389
|
+
var _stack = [];
|
|
390
|
+
try {
|
|
391
|
+
const oc = occtBoundary.getKernel().oc;
|
|
392
|
+
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
393
|
+
const faceMaker = scope.register(new oc.BRepBuilderAPI_MakeFace_2(face.wrapped));
|
|
394
|
+
holes.forEach((wire) => {
|
|
395
|
+
faceMaker.Add(wire.wrapped);
|
|
396
|
+
});
|
|
397
|
+
const builtFace = scope.register(faceMaker.Face());
|
|
398
|
+
const fixer = scope.register(new oc.ShapeFix_Face_2(builtFace));
|
|
399
|
+
fixer.FixOrientation_1();
|
|
400
|
+
const newFace = fixer.Face();
|
|
401
|
+
return shapeTypes.createFace(newFace);
|
|
402
|
+
} catch (_) {
|
|
403
|
+
var _error = _, _hasError = true;
|
|
404
|
+
} finally {
|
|
405
|
+
__callDispose(_stack, _error, _hasError);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
function makePolygon(points) {
|
|
409
|
+
if (points.length < 3)
|
|
410
|
+
return errors.err(
|
|
411
|
+
errors.validationError("POLYGON_MIN_POINTS", "You need at least 3 points to make a polygon")
|
|
412
|
+
);
|
|
413
|
+
const edges = zip([points, [...points.slice(1), points[0]]]).map(
|
|
414
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- zip returns untyped pairs
|
|
415
|
+
([p1, p2]) => makeLine(p1, p2)
|
|
416
|
+
);
|
|
417
|
+
return errors.andThen(assembleWire(edges), (wire) => makeFace(wire));
|
|
418
|
+
}
|
|
419
|
+
exports.addHolesInFace = addHolesInFace;
|
|
420
|
+
exports.assembleWire = assembleWire;
|
|
421
|
+
exports.fill = fill;
|
|
422
|
+
exports.makeBSplineApproximation = makeBSplineApproximation;
|
|
423
|
+
exports.makeBezierCurve = makeBezierCurve;
|
|
424
|
+
exports.makeCircle = makeCircle;
|
|
425
|
+
exports.makeEllipse = makeEllipse;
|
|
426
|
+
exports.makeEllipseArc = makeEllipseArc;
|
|
427
|
+
exports.makeFace = makeFace;
|
|
428
|
+
exports.makeHelix = makeHelix;
|
|
429
|
+
exports.makeLine = makeLine;
|
|
430
|
+
exports.makeNewFaceWithinFace = makeNewFaceWithinFace;
|
|
431
|
+
exports.makeNonPlanarFace = makeNonPlanarFace;
|
|
432
|
+
exports.makePolygon = makePolygon;
|
|
433
|
+
exports.makeTangentArc = makeTangentArc;
|
|
434
|
+
exports.makeThreePointArc = makeThreePointArc;
|
|
435
|
+
exports.zip = zip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAQ,MAAM,uBAAuB,CAAC;AAG3E,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAQ,MAAM,uBAAuB,CAAC;AAG3E,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAA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d.ts","sourceRoot":"","sources":["../../src/topology/curveBuilders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGxD,oDAAoD;AACpD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,IAAI,CAQjD;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,IAAgB,EACxB,MAAM,GAAE,IAAgB,GACvB,IAAI,CAQN;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,IAAgB,EACxB,MAAM,GAAE,IAAgB,EACxB,IAAI,CAAC,EAAE,IAAI,GACV,MAAM,CAAC,IAAI,CAAC,CAcd;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,IAAgB,EACxB,GAAG,GAAE,IAAgB,EACrB,QAAQ,UAAQ,GACf,IAAI,
|
|
1
|
+
{"version":3,"file":"curveBuilders.d.ts","sourceRoot":"","sources":["../../src/topology/curveBuilders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGxD,oDAAoD;AACpD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAA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AAO,EAAE,IAAI,GAAG,KAAK,CAQ3D;AAED,qCAAqC;AACrC,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAO9C;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CA+BxF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAY7D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAc3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surfaceBuilders.d.ts","sourceRoot":"","sources":["../../src/topology/surfaceBuilders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAoB,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,EAAQ,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAQ9D;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"surfaceBuilders.d.ts","sourceRoot":"","sources":["../../src/topology/surfaceBuilders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAoB,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,EAAQ,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAQ9D;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAejE;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAG7C;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAUxE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAyB1D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAgB9D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAWxD"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const shapeFns = require("./shapeFns-
|
|
3
|
-
require("./booleanFns-
|
|
4
|
-
const occtBoundary = require("./occtBoundary-
|
|
5
|
-
const shapeTypes = require("./shapeTypes-
|
|
6
|
-
const faceFns = require("./faceFns-
|
|
7
|
-
const errors = require("./errors-
|
|
8
|
-
require("./curveFns-
|
|
2
|
+
const shapeFns = require("./shapeFns-ByLUl6KE.cjs");
|
|
3
|
+
require("./booleanFns-Cf_0aWNe.cjs");
|
|
4
|
+
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
5
|
+
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
6
|
+
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
7
|
+
const errors = require("./errors-BYb4tL5h.cjs");
|
|
8
|
+
require("./curveFns-KDpL9iyo.cjs");
|
|
9
9
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
10
|
-
require("./meshFns-
|
|
10
|
+
require("./meshFns-C-6Cq3V-.cjs");
|
|
11
11
|
function toBufferGeometryData(mesh) {
|
|
12
12
|
return {
|
|
13
13
|
position: mesh.vertices,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as getWires, a as getFaces } from "./shapeFns-
|
|
2
|
-
import "./booleanFns
|
|
3
|
-
import { g as getKernel } from "./occtBoundary-
|
|
4
|
-
import { c as castShape,
|
|
5
|
-
import { d as downcast } from "./faceFns-
|
|
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-
|
|
7
|
-
import "./curveFns-
|
|
1
|
+
import { c as getWires, a as getFaces } from "./shapeFns-QL3zx6uW.js";
|
|
2
|
+
import "./booleanFns-D6SeHoCv.js";
|
|
3
|
+
import { g as getKernel } from "./occtBoundary-Ct0tN8cs.js";
|
|
4
|
+
import { c as castShape, j as isShape3D, l as isSolid, e as isFace, n as isWire } from "./shapeTypes-D34s68Xi.js";
|
|
5
|
+
import { d as downcast } from "./faceFns-DG4bu-QB.js";
|
|
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-CHfaHQSt.js";
|
|
7
|
+
import "./curveFns-VDZEhY97.js";
|
|
8
8
|
import { H as HASH_CODE_MAX } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
-
import "./meshFns-
|
|
9
|
+
import "./meshFns-Cw3IFJjg.js";
|
|
10
10
|
function toBufferGeometryData(mesh) {
|
|
11
11
|
return {
|
|
12
12
|
position: mesh.vertices,
|
package/dist/topology.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const shapeFns = require("./shapeFns-
|
|
4
|
-
const booleanFns = require("./booleanFns-
|
|
5
|
-
const topology = require("./topology-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
7
|
-
const faceFns = require("./faceFns-
|
|
8
|
-
const meshFns = require("./meshFns-
|
|
3
|
+
const shapeFns = require("./shapeFns-ByLUl6KE.cjs");
|
|
4
|
+
const booleanFns = require("./booleanFns-Cf_0aWNe.cjs");
|
|
5
|
+
const topology = require("./topology-DWe9SYAy.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-KDpL9iyo.cjs");
|
|
7
|
+
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
8
|
+
const meshFns = require("./meshFns-C-6Cq3V-.cjs");
|
|
9
9
|
exports.getBounds = shapeFns.getBounds;
|
|
10
10
|
exports.getEdges = shapeFns.getEdges;
|
|
11
11
|
exports.getFaces = shapeFns.getFaces;
|
package/dist/topology.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u, d, a, e, f, c, x, i, y, z, A, B, v } from "./shapeFns-
|
|
2
|
-
import { h, g } from "./booleanFns
|
|
3
|
-
import { a as a2, b, c as c2, e as e2, f as f2, d as d2, g as g2, j, s, t, k, l, v as v2, w } from "./topology-
|
|
4
|
-
import { j as j2, a as a3, e as e3, k as k2, i as i2, l as l2, h as h2, d as d3, c as c3, m, b as b2, g as g3, n, o } from "./curveFns-
|
|
5
|
-
import { l as l3, c as c4, m as m2, j as j3, d as d4, e as e4, f as f3, q, r, g as g4, k as k3, s as s2, i as i3, n as n2, o as o2, p, t as t2, v as v3, u as u2, h as h3 } from "./faceFns-
|
|
6
|
-
import { c as c5, b as b3, e as e5, d as d5, f as f4 } from "./meshFns-
|
|
1
|
+
import { u, d, a, e, f, c, x, i, y, z, A, B, v } from "./shapeFns-QL3zx6uW.js";
|
|
2
|
+
import { h, g } from "./booleanFns-D6SeHoCv.js";
|
|
3
|
+
import { a as a2, b, c as c2, e as e2, f as f2, d as d2, g as g2, j, s, t, k, l, v as v2, w } from "./topology-psR8Hqiz.js";
|
|
4
|
+
import { j as j2, a as a3, e as e3, k as k2, i as i2, l as l2, h as h2, d as d3, c as c3, m, b as b2, g as g3, n, o } from "./curveFns-VDZEhY97.js";
|
|
5
|
+
import { l as l3, c as c4, m as m2, j as j3, d as d4, e as e4, f as f3, q, r, g as g4, k as k3, s as s2, i as i3, n as n2, o as o2, p, t as t2, v as v3, u as u2, h as h3 } from "./faceFns-DG4bu-QB.js";
|
|
6
|
+
import { c as c5, b as b3, e as e5, d as d5, f as f4 } from "./meshFns-Cw3IFJjg.js";
|
|
7
7
|
export {
|
|
8
8
|
a2 as adjacentFaces,
|
|
9
9
|
j2 as approximateCurve,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
3
3
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
4
|
-
const errors = require("./errors-
|
|
4
|
+
const errors = require("./errors-BYb4tL5h.cjs");
|
|
5
5
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
|
6
6
|
const zDir = vecOps.vecNormalize(normal);
|
|
7
7
|
if (vecOps.vecIsZero(zDir)) throw new Error("Plane normal must be non-zero");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { e as makeOcAx3, a as toVec3 } from "./occtBoundary-
|
|
1
|
+
import { e as makeOcAx3, a as toVec3 } from "./occtBoundary-Ct0tN8cs.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
|
-
import { e as err, x as validationError, l as ok } from "./errors-
|
|
3
|
+
import { e as err, x as validationError, l as ok } from "./errors-CHfaHQSt.js";
|
|
4
4
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
|
5
5
|
const zDir = vecNormalize(normal);
|
|
6
6
|
if (vecIsZero(zDir)) throw new Error("Plane normal must be non-zero");
|
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-CN_uQJtA.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
|
-
const vectors = require("./vectors-
|
|
5
|
+
const vectors = require("./vectors-9rrStq8t.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-Ct0tN8cs.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-Dp5Iu1KH.js";
|
|
4
4
|
export {
|
|
5
5
|
D as DEG2RAD,
|
|
6
6
|
R as RAD2DEG,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brepjs",
|
|
3
|
-
"version": "8.8.
|
|
3
|
+
"version": "8.8.4",
|
|
4
4
|
"description": "Web CAD library built on OpenCascade",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
@@ -215,5 +215,8 @@
|
|
|
215
215
|
"dependencies": {
|
|
216
216
|
"flatbush": "4.5.0",
|
|
217
217
|
"opentype.js": "1.3.4"
|
|
218
|
+
},
|
|
219
|
+
"overrides": {
|
|
220
|
+
"minimatch@>=10.0.0 <10.2.3": "10.2.3"
|
|
218
221
|
}
|
|
219
222
|
}
|