brepjs 8.0.2 → 8.0.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.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-B9fhnpFp.js → Blueprint-2_aAKNQR.js} +8 -9
- package/dist/{Blueprint-VGbo3izk.cjs → Blueprint-DLrTLXzX.cjs} +9 -10
- package/dist/{boolean2D-B1XrGVgx.cjs → boolean2D-DeFQSg1m.cjs} +10 -10
- package/dist/{boolean2D-_WiqPxWZ.js → boolean2D-XbuOXTHG.js} +10 -10
- package/dist/{booleanFns-CkccZ7UL.js → booleanFns-DGMIgJl_.js} +5 -5
- package/dist/{booleanFns-BxW-N3rP.cjs → booleanFns-ND7sZvhu.cjs} +3 -3
- package/dist/brepjs.cjs +65 -69
- package/dist/brepjs.js +114 -119
- package/dist/{cast-C4Ff_1Qe.js → cast-BEg1mN7n.js} +2 -2
- package/dist/{cast-DIiyxDLo.cjs → cast-CqDc8oFW.cjs} +2 -2
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-DzGzfiqb.js → cornerFinder-D52Bk6bt.js} +1 -1
- package/dist/{cornerFinder-BndBNtJE.cjs → cornerFinder-DhbwiYQK.cjs} +1 -1
- package/dist/{curveBuilders-BUoFO1UG.cjs → curveBuilders-BjtdNw1B.cjs} +2 -2
- package/dist/{curveBuilders-CBlIWlbU.js → curveBuilders-U26XDfxg.js} +2 -2
- package/dist/curveFns-BoG_iA07.cjs +375 -0
- package/dist/curveFns-Cg99XKe2.js +376 -0
- package/dist/{drawFns-Btmlh_Oz.js → drawFns-CqfB685D.js} +12 -13
- package/dist/{drawFns-D2eDcf4k.cjs → drawFns-DJIg_iZh.cjs} +15 -16
- package/dist/{faceFns-DDzCECn3.js → faceFns-CyokaCDr.js} +3 -3
- package/dist/{faceFns-NDRFeekj.cjs → faceFns-DcSCjDG0.cjs} +3 -3
- package/dist/{helpers-jku2V1DY.js → helpers-BCWmNSKh.js} +14 -14
- package/dist/{helpers-Ck8GJ58k.cjs → helpers-DwmieP38.cjs} +17 -17
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/curveOps.d.ts.map +1 -1
- package/dist/kernel/meshOps.d.ts.map +1 -1
- package/dist/kernel/modifierOps.d.ts.map +1 -1
- package/dist/{loft-DJXwxV_L.cjs → loft-8asn63t4.cjs} +4 -4
- package/dist/{loft-Bk9EM0gZ.js → loft-jIkZRqHm.js} +4 -4
- package/dist/{measurement-DlXaTzKc.js → measurement-DWv8kK6J.js} +3 -3
- package/dist/{measurement-LcGh4wV0.cjs → measurement-lRLwaoqD.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-c8lDKfYy.cjs → meshFns-DWuLC3fk.cjs} +29 -9
- package/dist/{meshFns-Djzdn-CS.js → meshFns-DgAIL1B-.js} +29 -9
- package/dist/{occtBoundary-6kQSl3cF.cjs → occtBoundary-DHtzU4tz.cjs} +72 -61
- package/dist/{occtBoundary-CqXvDhZY.js → occtBoundary-DYsksDtE.js} +72 -61
- package/dist/operations/patternFns.d.ts.map +1 -1
- package/dist/{operations-CrQlFDHc.js → operations-BtwU1X9p.js} +32 -10
- package/dist/{operations-Do-WZGXc.cjs → operations-CCFPvtd-.cjs} +32 -10
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
- package/dist/query.cjs +5 -5
- package/dist/query.js +6 -6
- package/dist/{shapeTypes-BJ3Hmskg.cjs → shapeTypes-b_lhwQB7.cjs} +1 -1
- package/dist/{shapeTypes-C9sUsmEW.js → shapeTypes-i7VwMRwc.js} +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/adjacencyFns.d.ts.map +1 -1
- package/dist/topology/compoundOpsFns.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/{topology-CtfUZwLR.js → topology-DXDdiKaF.js} +39 -18
- package/dist/{topology-DXq8dLsi.cjs → topology-uexRi0i6.cjs} +44 -23
- package/dist/topology.cjs +33 -34
- package/dist/topology.js +52 -53
- package/dist/{vectors-BVgXsYWl.js → vectors-DWLjb9-P.js} +1 -1
- package/dist/{vectors-DK2hEKcI.cjs → vectors-aQBZK0Sb.cjs} +1 -1
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +1 -1
- package/dist/curveFns-BrJDkaWi.cjs +0 -177
- package/dist/curveFns-BshHA9Ys.js +0 -178
- package/dist/shapeFns-DQtpzndX.js +0 -203
- package/dist/shapeFns-cN4qGpbO.cjs +0 -202
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { g as getKernel, c as toOcVec, m as makeOcAx2, e as makeOcAx1, b as toOcPnt } from "./occtBoundary-DYsksDtE.js";
|
|
2
|
+
import { c as castShape, g as getShapeKind, p as gcWithScope, d as isEdge, m as isWire } from "./shapeTypes-i7VwMRwc.js";
|
|
3
|
+
import { H as HASH_CODE_MAX, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
4
|
+
import { i as iterTopo, d as downcast } from "./cast-BEg1mN7n.js";
|
|
5
|
+
import { e as err, p as typeCastError, l as ok, u as unwrap } from "./errors-wGhcJMpB.js";
|
|
6
|
+
let CURVE_TYPES_MAP = null;
|
|
7
|
+
const getCurveTypesMap = (refresh) => {
|
|
8
|
+
if (CURVE_TYPES_MAP && !refresh) return CURVE_TYPES_MAP;
|
|
9
|
+
const oc = getKernel().oc;
|
|
10
|
+
const ga = oc.GeomAbs_CurveType;
|
|
11
|
+
CURVE_TYPES_MAP = /* @__PURE__ */ new Map([
|
|
12
|
+
[ga.GeomAbs_Line, "LINE"],
|
|
13
|
+
[ga.GeomAbs_Circle, "CIRCLE"],
|
|
14
|
+
[ga.GeomAbs_Ellipse, "ELLIPSE"],
|
|
15
|
+
[ga.GeomAbs_Hyperbola, "HYPERBOLA"],
|
|
16
|
+
[ga.GeomAbs_Parabola, "PARABOLA"],
|
|
17
|
+
[ga.GeomAbs_BezierCurve, "BEZIER_CURVE"],
|
|
18
|
+
[ga.GeomAbs_BSplineCurve, "BSPLINE_CURVE"],
|
|
19
|
+
[ga.GeomAbs_OffsetCurve, "OFFSET_CURVE"],
|
|
20
|
+
[ga.GeomAbs_OtherCurve, "OTHER_CURVE"]
|
|
21
|
+
]);
|
|
22
|
+
return CURVE_TYPES_MAP;
|
|
23
|
+
};
|
|
24
|
+
const findCurveType = (type) => {
|
|
25
|
+
let shapeType = getCurveTypesMap().get(type);
|
|
26
|
+
if (!shapeType) shapeType = getCurveTypesMap(true).get(type);
|
|
27
|
+
if (!shapeType) return err(typeCastError("UNKNOWN_CURVE_TYPE", "Unknown curve type"));
|
|
28
|
+
return ok(shapeType);
|
|
29
|
+
};
|
|
30
|
+
function clone(shape) {
|
|
31
|
+
return castShape(unwrap(downcast(shape.wrapped)));
|
|
32
|
+
}
|
|
33
|
+
function toBREP(shape) {
|
|
34
|
+
const oc = getKernel().oc;
|
|
35
|
+
return oc.BRepToolsWrapper.Write(shape.wrapped);
|
|
36
|
+
}
|
|
37
|
+
function getHashCode(shape) {
|
|
38
|
+
return shape.wrapped.HashCode(HASH_CODE_MAX);
|
|
39
|
+
}
|
|
40
|
+
function isEmpty(shape) {
|
|
41
|
+
return shape.wrapped.IsNull();
|
|
42
|
+
}
|
|
43
|
+
function isSameShape(a, b) {
|
|
44
|
+
return a.wrapped.IsSame(b.wrapped);
|
|
45
|
+
}
|
|
46
|
+
function isEqualShape(a, b) {
|
|
47
|
+
return a.wrapped.IsEqual(b.wrapped);
|
|
48
|
+
}
|
|
49
|
+
function simplify(shape) {
|
|
50
|
+
const oc = getKernel().oc;
|
|
51
|
+
const r = gcWithScope();
|
|
52
|
+
const upgrader = r(new oc.ShapeUpgrade_UnifySameDomain_2(shape.wrapped, true, true, false));
|
|
53
|
+
upgrader.Build();
|
|
54
|
+
return castShape(upgrader.Shape());
|
|
55
|
+
}
|
|
56
|
+
function translate(shape, v) {
|
|
57
|
+
const oc = getKernel().oc;
|
|
58
|
+
const trsf = new oc.gp_Trsf_1();
|
|
59
|
+
const vec = toOcVec(v);
|
|
60
|
+
trsf.SetTranslation_1(vec);
|
|
61
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape.wrapped, trsf, true);
|
|
62
|
+
const result = castShape(transformer.Shape());
|
|
63
|
+
transformer.delete();
|
|
64
|
+
trsf.delete();
|
|
65
|
+
vec.delete();
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
function rotate(shape, angle, position = [0, 0, 0], direction = [0, 0, 1]) {
|
|
69
|
+
const oc = getKernel().oc;
|
|
70
|
+
const trsf = new oc.gp_Trsf_1();
|
|
71
|
+
const ax1 = makeOcAx1(position, direction);
|
|
72
|
+
trsf.SetRotation_1(ax1, angle * DEG2RAD);
|
|
73
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape.wrapped, trsf, true);
|
|
74
|
+
const result = castShape(transformer.Shape());
|
|
75
|
+
transformer.delete();
|
|
76
|
+
trsf.delete();
|
|
77
|
+
ax1.delete();
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
function mirror(shape, planeNormal = [0, 1, 0], planeOrigin = [0, 0, 0]) {
|
|
81
|
+
const oc = getKernel().oc;
|
|
82
|
+
const trsf = new oc.gp_Trsf_1();
|
|
83
|
+
const ax2 = makeOcAx2(planeOrigin, planeNormal);
|
|
84
|
+
trsf.SetMirror_3(ax2);
|
|
85
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape.wrapped, trsf, true);
|
|
86
|
+
const result = castShape(transformer.Shape());
|
|
87
|
+
transformer.delete();
|
|
88
|
+
trsf.delete();
|
|
89
|
+
ax2.delete();
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
function scale(shape, factor, center = [0, 0, 0]) {
|
|
93
|
+
const oc = getKernel().oc;
|
|
94
|
+
const trsf = new oc.gp_Trsf_1();
|
|
95
|
+
const pnt = toOcPnt(center);
|
|
96
|
+
trsf.SetScale(pnt, factor);
|
|
97
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape.wrapped, trsf, true);
|
|
98
|
+
const result = castShape(transformer.Shape());
|
|
99
|
+
transformer.delete();
|
|
100
|
+
trsf.delete();
|
|
101
|
+
pnt.delete();
|
|
102
|
+
return result;
|
|
103
|
+
}
|
|
104
|
+
const topoCache = /* @__PURE__ */ new WeakMap();
|
|
105
|
+
function getOrCreateCache(shape) {
|
|
106
|
+
let entry = topoCache.get(shape.wrapped);
|
|
107
|
+
if (!entry) {
|
|
108
|
+
entry = {};
|
|
109
|
+
topoCache.set(shape.wrapped, entry);
|
|
110
|
+
}
|
|
111
|
+
return entry;
|
|
112
|
+
}
|
|
113
|
+
function getEdges(shape) {
|
|
114
|
+
const cache = getOrCreateCache(shape);
|
|
115
|
+
if (cache.edges) return cache.edges;
|
|
116
|
+
const edges = Array.from(iterTopo(shape.wrapped, "edge")).map(
|
|
117
|
+
(e) => castShape(unwrap(downcast(e)))
|
|
118
|
+
);
|
|
119
|
+
cache.edges = edges;
|
|
120
|
+
return edges;
|
|
121
|
+
}
|
|
122
|
+
function getFaces(shape) {
|
|
123
|
+
const cache = getOrCreateCache(shape);
|
|
124
|
+
if (cache.faces) return cache.faces;
|
|
125
|
+
const faces = Array.from(iterTopo(shape.wrapped, "face")).map(
|
|
126
|
+
(e) => castShape(unwrap(downcast(e)))
|
|
127
|
+
);
|
|
128
|
+
cache.faces = faces;
|
|
129
|
+
return faces;
|
|
130
|
+
}
|
|
131
|
+
function getWires(shape) {
|
|
132
|
+
const cache = getOrCreateCache(shape);
|
|
133
|
+
if (cache.wires) return cache.wires;
|
|
134
|
+
const wires = Array.from(iterTopo(shape.wrapped, "wire")).map(
|
|
135
|
+
(e) => castShape(unwrap(downcast(e)))
|
|
136
|
+
);
|
|
137
|
+
cache.wires = wires;
|
|
138
|
+
return wires;
|
|
139
|
+
}
|
|
140
|
+
function getVertices(shape) {
|
|
141
|
+
return Array.from(iterTopo(shape.wrapped, "vertex")).map(
|
|
142
|
+
(e) => castShape(unwrap(downcast(e)))
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function* iterEdges(shape) {
|
|
146
|
+
for (const e of iterTopo(shape.wrapped, "edge")) {
|
|
147
|
+
yield castShape(unwrap(downcast(e)));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function* iterFaces(shape) {
|
|
151
|
+
for (const f of iterTopo(shape.wrapped, "face")) {
|
|
152
|
+
yield castShape(unwrap(downcast(f)));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function* iterWires(shape) {
|
|
156
|
+
for (const w of iterTopo(shape.wrapped, "wire")) {
|
|
157
|
+
yield castShape(unwrap(downcast(w)));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function* iterVertices(shape) {
|
|
161
|
+
for (const v of iterTopo(shape.wrapped, "vertex")) {
|
|
162
|
+
yield castShape(unwrap(downcast(v)));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function getBounds(shape) {
|
|
166
|
+
const oc = getKernel().oc;
|
|
167
|
+
const bbox = new oc.Bnd_Box_1();
|
|
168
|
+
oc.BRepBndLib.Add(shape.wrapped, bbox, true);
|
|
169
|
+
const xMin = { current: 0 };
|
|
170
|
+
const yMin = { current: 0 };
|
|
171
|
+
const zMin = { current: 0 };
|
|
172
|
+
const xMax = { current: 0 };
|
|
173
|
+
const yMax = { current: 0 };
|
|
174
|
+
const zMax = { current: 0 };
|
|
175
|
+
bbox.Get(xMin, yMin, zMin, xMax, yMax, zMax);
|
|
176
|
+
bbox.delete();
|
|
177
|
+
return {
|
|
178
|
+
xMin: xMin.current,
|
|
179
|
+
xMax: xMax.current,
|
|
180
|
+
yMin: yMin.current,
|
|
181
|
+
yMax: yMax.current,
|
|
182
|
+
zMin: zMin.current,
|
|
183
|
+
zMax: zMax.current
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function describe(shape) {
|
|
187
|
+
return {
|
|
188
|
+
kind: getShapeKind(shape),
|
|
189
|
+
faceCount: getFaces(shape).length,
|
|
190
|
+
edgeCount: getEdges(shape).length,
|
|
191
|
+
wireCount: getWires(shape).length,
|
|
192
|
+
vertexCount: getVertices(shape).length,
|
|
193
|
+
valid: getKernel().isValid(shape.wrapped),
|
|
194
|
+
bounds: getBounds(shape)
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function vertexPosition(vertex) {
|
|
198
|
+
const oc = getKernel().oc;
|
|
199
|
+
const pnt = oc.BRep_Tool.Pnt(vertex.wrapped);
|
|
200
|
+
const result = [pnt.X(), pnt.Y(), pnt.Z()];
|
|
201
|
+
pnt.delete();
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
function getAdaptor(shape) {
|
|
205
|
+
const oc = getKernel().oc;
|
|
206
|
+
const st = shape.wrapped.ShapeType();
|
|
207
|
+
const e = oc.TopAbs_ShapeEnum;
|
|
208
|
+
if (st === e.TopAbs_WIRE) {
|
|
209
|
+
return new oc.BRepAdaptor_CompCurve_2(shape.wrapped, false);
|
|
210
|
+
}
|
|
211
|
+
return new oc.BRepAdaptor_Curve_2(shape.wrapped);
|
|
212
|
+
}
|
|
213
|
+
function mapParam(adaptor, t) {
|
|
214
|
+
const first = Number(adaptor.FirstParameter());
|
|
215
|
+
const last = Number(adaptor.LastParameter());
|
|
216
|
+
return first + (last - first) * t;
|
|
217
|
+
}
|
|
218
|
+
function getCurveType(shape) {
|
|
219
|
+
const r = gcWithScope();
|
|
220
|
+
const adaptor = r(getAdaptor(shape));
|
|
221
|
+
const technicalType = adaptor.GetType && adaptor.GetType();
|
|
222
|
+
return unwrap(findCurveType(technicalType));
|
|
223
|
+
}
|
|
224
|
+
function curveStartPoint(shape) {
|
|
225
|
+
const r = gcWithScope();
|
|
226
|
+
const adaptor = r(getAdaptor(shape));
|
|
227
|
+
const pnt = r(adaptor.Value(adaptor.FirstParameter()));
|
|
228
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
229
|
+
}
|
|
230
|
+
function curveEndPoint(shape) {
|
|
231
|
+
const r = gcWithScope();
|
|
232
|
+
const adaptor = r(getAdaptor(shape));
|
|
233
|
+
const pnt = r(adaptor.Value(adaptor.LastParameter()));
|
|
234
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
235
|
+
}
|
|
236
|
+
function curvePointAt(shape, position = 0.5) {
|
|
237
|
+
const r = gcWithScope();
|
|
238
|
+
const adaptor = r(getAdaptor(shape));
|
|
239
|
+
const pnt = r(adaptor.Value(mapParam(adaptor, position)));
|
|
240
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
241
|
+
}
|
|
242
|
+
function curveTangentAt(shape, position = 0.5) {
|
|
243
|
+
const oc = getKernel().oc;
|
|
244
|
+
const r = gcWithScope();
|
|
245
|
+
const adaptor = r(getAdaptor(shape));
|
|
246
|
+
const param = mapParam(adaptor, position);
|
|
247
|
+
const tmpPnt = r(new oc.gp_Pnt_1());
|
|
248
|
+
const tmpVec = r(new oc.gp_Vec_1());
|
|
249
|
+
adaptor.D1(param, tmpPnt, tmpVec);
|
|
250
|
+
return [tmpVec.X(), tmpVec.Y(), tmpVec.Z()];
|
|
251
|
+
}
|
|
252
|
+
function curveLength(shape) {
|
|
253
|
+
const oc = getKernel().oc;
|
|
254
|
+
const r = gcWithScope();
|
|
255
|
+
const props = r(new oc.GProp_GProps_1());
|
|
256
|
+
oc.BRepGProp.LinearProperties(shape.wrapped, props, true, false);
|
|
257
|
+
return props.Mass();
|
|
258
|
+
}
|
|
259
|
+
function curveIsClosed(shape) {
|
|
260
|
+
const r = gcWithScope();
|
|
261
|
+
const adaptor = r(getAdaptor(shape));
|
|
262
|
+
return adaptor.IsClosed();
|
|
263
|
+
}
|
|
264
|
+
function curveIsPeriodic(shape) {
|
|
265
|
+
const r = gcWithScope();
|
|
266
|
+
const adaptor = r(getAdaptor(shape));
|
|
267
|
+
return adaptor.IsPeriodic();
|
|
268
|
+
}
|
|
269
|
+
function curvePeriod(shape) {
|
|
270
|
+
const adaptor = getAdaptor(shape);
|
|
271
|
+
const result = adaptor.Period();
|
|
272
|
+
adaptor.delete();
|
|
273
|
+
return result;
|
|
274
|
+
}
|
|
275
|
+
function getOrientation(shape) {
|
|
276
|
+
const oc = getKernel().oc;
|
|
277
|
+
const orient = shape.wrapped.Orientation_1();
|
|
278
|
+
return orient === oc.TopAbs_Orientation.TopAbs_FORWARD ? "forward" : "backward";
|
|
279
|
+
}
|
|
280
|
+
function flipOrientation(shape) {
|
|
281
|
+
return castShape(shape.wrapped.Reversed());
|
|
282
|
+
}
|
|
283
|
+
function interpolateCurve(points, options = {}) {
|
|
284
|
+
if (points.length < 2) {
|
|
285
|
+
return err(typeCastError("INTERPOLATE_MIN_POINTS", "Interpolation requires at least 2 points"));
|
|
286
|
+
}
|
|
287
|
+
try {
|
|
288
|
+
const result = getKernel().interpolatePoints(points, options);
|
|
289
|
+
const cast = castShape(result);
|
|
290
|
+
if (!isEdge(cast)) {
|
|
291
|
+
return err(typeCastError("INTERPOLATE_NOT_EDGE", "Interpolation did not produce an edge"));
|
|
292
|
+
}
|
|
293
|
+
return ok(cast);
|
|
294
|
+
} catch (e) {
|
|
295
|
+
return err(
|
|
296
|
+
typeCastError(
|
|
297
|
+
"INTERPOLATE_FAILED",
|
|
298
|
+
`Interpolation failed: ${e instanceof Error ? e.message : String(e)}`
|
|
299
|
+
)
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
function approximateCurve(points, options = {}) {
|
|
304
|
+
if (points.length < 2) {
|
|
305
|
+
return err(typeCastError("APPROXIMATE_MIN_POINTS", "Approximation requires at least 2 points"));
|
|
306
|
+
}
|
|
307
|
+
try {
|
|
308
|
+
const result = getKernel().approximatePoints(points, options);
|
|
309
|
+
const cast = castShape(result);
|
|
310
|
+
if (!isEdge(cast)) {
|
|
311
|
+
return err(typeCastError("APPROXIMATE_NOT_EDGE", "Approximation did not produce an edge"));
|
|
312
|
+
}
|
|
313
|
+
return ok(cast);
|
|
314
|
+
} catch (e) {
|
|
315
|
+
return err(
|
|
316
|
+
typeCastError(
|
|
317
|
+
"APPROXIMATE_FAILED",
|
|
318
|
+
`Approximation failed: ${e instanceof Error ? e.message : String(e)}`
|
|
319
|
+
)
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function offsetWire2D(wire, offset, kind = "arc") {
|
|
324
|
+
const oc = getKernel().oc;
|
|
325
|
+
const joinTypes = {
|
|
326
|
+
arc: oc.GeomAbs_JoinType.GeomAbs_Arc,
|
|
327
|
+
intersection: oc.GeomAbs_JoinType.GeomAbs_Intersection,
|
|
328
|
+
tangent: oc.GeomAbs_JoinType.GeomAbs_Tangent
|
|
329
|
+
};
|
|
330
|
+
const resultShape = getKernel().offsetWire2D(wire.wrapped, offset, joinTypes[kind]);
|
|
331
|
+
const wrapped = castShape(resultShape);
|
|
332
|
+
if (!isWire(wrapped)) {
|
|
333
|
+
wrapped[Symbol.dispose]();
|
|
334
|
+
return err(typeCastError("OFFSET_NOT_WIRE", "Offset did not produce a Wire"));
|
|
335
|
+
}
|
|
336
|
+
return ok(wrapped);
|
|
337
|
+
}
|
|
338
|
+
export {
|
|
339
|
+
findCurveType as A,
|
|
340
|
+
flipOrientation as B,
|
|
341
|
+
getCurveType as C,
|
|
342
|
+
getOrientation as D,
|
|
343
|
+
interpolateCurve as E,
|
|
344
|
+
isEqualShape as F,
|
|
345
|
+
iterEdges as G,
|
|
346
|
+
iterFaces as H,
|
|
347
|
+
iterVertices as I,
|
|
348
|
+
iterWires as J,
|
|
349
|
+
offsetWire2D as K,
|
|
350
|
+
getEdges as a,
|
|
351
|
+
clone as b,
|
|
352
|
+
curveIsClosed as c,
|
|
353
|
+
describe as d,
|
|
354
|
+
isEmpty as e,
|
|
355
|
+
simplify as f,
|
|
356
|
+
getHashCode as g,
|
|
357
|
+
toBREP as h,
|
|
358
|
+
isSameShape as i,
|
|
359
|
+
getBounds as j,
|
|
360
|
+
getFaces as k,
|
|
361
|
+
curveTangentAt as l,
|
|
362
|
+
mirror as m,
|
|
363
|
+
curvePointAt as n,
|
|
364
|
+
curveEndPoint as o,
|
|
365
|
+
curveStartPoint as p,
|
|
366
|
+
curveLength as q,
|
|
367
|
+
rotate as r,
|
|
368
|
+
scale as s,
|
|
369
|
+
translate as t,
|
|
370
|
+
getVertices as u,
|
|
371
|
+
vertexPosition as v,
|
|
372
|
+
getWires as w,
|
|
373
|
+
approximateCurve as x,
|
|
374
|
+
curveIsPeriodic as y,
|
|
375
|
+
curvePeriod as z
|
|
376
|
+
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from "./errors-wGhcJMpB.js";
|
|
2
|
-
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-
|
|
3
|
-
import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-
|
|
2
|
+
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-DWLjb9-P.js";
|
|
3
|
+
import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-DYsksDtE.js";
|
|
4
4
|
import { n as vecScale, j as vecNormalize, v as vecAdd, o as vecSub, b as vecCross, m as vecRotate, R as RAD2DEG, g as vecLength, e as vecEquals, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { h as Flatbush, j as convertSvgEllipseParams, k as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, b as Blueprints, C as CompoundBlueprint, c as cut2D, l as intersectCurves, f as fuse2D, m as make2dOffset, n as filletCurves, q as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, i as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-
|
|
6
|
-
import { f as faceCenter, n as normalAt, o as outerWire } from "./faceFns-
|
|
7
|
-
import {
|
|
8
|
-
import { m as makeLine, i as makeThreePointArc, h as makeTangentArc, g as makeEllipseArc, c as makeBezierCurve, a as assembleWire, e as makeCircle, f as makeEllipse, b as makeHelix, d as makeBSplineApproximation } from "./curveBuilders-
|
|
9
|
-
import { n as createWire, t as localGC, u as createFace, e as isFace, p as gcWithScope, c as castShape } from "./shapeTypes-
|
|
10
|
-
import { d as downcast, c as cast } from "./cast-
|
|
11
|
-
import { h as mirror, a as addHolesInFace, m as makeFace, B as Blueprint, C as Curve2D, i as make2dSegmentCurve, j as make2dArcFromCenter, k as approximateAsSvgCompatibleCurve, e as BoundingBox2d, l as edgeToCurve, n as make2dInerpolatedBSplineCurve, o as make2dCircle, p as make2dEllipse, q as deserializeCurve2D } from "./Blueprint-
|
|
5
|
+
import { h as Flatbush, j as convertSvgEllipseParams, k as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, b as Blueprints, C as CompoundBlueprint, c as cut2D, l as intersectCurves, f as fuse2D, m as make2dOffset, n as filletCurves, q as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, i as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-XbuOXTHG.js";
|
|
6
|
+
import { f as faceCenter, n as normalAt, o as outerWire } from "./faceFns-CyokaCDr.js";
|
|
7
|
+
import { l as curveTangentAt, o as curveEndPoint, C as getCurveType, a as getEdges, K as offsetWire2D } from "./curveFns-Cg99XKe2.js";
|
|
8
|
+
import { m as makeLine, i as makeThreePointArc, h as makeTangentArc, g as makeEllipseArc, c as makeBezierCurve, a as assembleWire, e as makeCircle, f as makeEllipse, b as makeHelix, d as makeBSplineApproximation } from "./curveBuilders-U26XDfxg.js";
|
|
9
|
+
import { n as createWire, t as localGC, u as createFace, e as isFace, p as gcWithScope, c as castShape } from "./shapeTypes-i7VwMRwc.js";
|
|
10
|
+
import { d as downcast, c as cast } from "./cast-BEg1mN7n.js";
|
|
11
|
+
import { h as mirror, a as addHolesInFace, m as makeFace, B as Blueprint, C as Curve2D, i as make2dSegmentCurve, j as make2dArcFromCenter, k as approximateAsSvgCompatibleCurve, e as BoundingBox2d, l as edgeToCurve, n as make2dInerpolatedBSplineCurve, o as make2dCircle, p as make2dEllipse, q as deserializeCurve2D } from "./Blueprint-2_aAKNQR.js";
|
|
12
12
|
import { bug } from "./result.js";
|
|
13
|
-
import { d as distance2d, p as polarAngle2d, b as polarToCartesian, P as PRECISION_OFFSET, e as squareDistance2d, s as samePoint$1, h as subtract2d, i as add2d } from "./helpers-
|
|
14
|
-
import {
|
|
15
|
-
import { m as makeCompound, i as basicFaceExtrusion, r as revolution, e as makeSolid, k as complexExtrude, t as twistExtrude } from "./loft-Bk9EM0gZ.js";
|
|
13
|
+
import { d as distance2d, p as polarAngle2d, b as polarToCartesian, P as PRECISION_OFFSET, e as squareDistance2d, s as samePoint$1, h as subtract2d, i as add2d } from "./helpers-BCWmNSKh.js";
|
|
14
|
+
import { m as makeCompound, i as basicFaceExtrusion, r as revolution, e as makeSolid, k as complexExtrude, t as twistExtrude } from "./loft-jIkZRqHm.js";
|
|
16
15
|
import opentype from "opentype.js";
|
|
17
|
-
import { c as cornerFinder } from "./cornerFinder-
|
|
16
|
+
import { c as cornerFinder } from "./cornerFinder-D52Bk6bt.js";
|
|
18
17
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
19
18
|
const startPoints = new Flatbush(curves.length);
|
|
20
19
|
curves.forEach((c) => {
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
3
|
-
const vectors = require("./vectors-
|
|
4
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const vectors = require("./vectors-aQBZK0Sb.cjs");
|
|
4
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const boolean2D = require("./boolean2D-
|
|
7
|
-
const faceFns = require("./faceFns-
|
|
8
|
-
const curveFns = require("./curveFns-
|
|
9
|
-
const curveBuilders = require("./curveBuilders-
|
|
10
|
-
const shapeTypes = require("./shapeTypes-
|
|
11
|
-
const cast = require("./cast-
|
|
12
|
-
const Blueprint = require("./Blueprint-
|
|
6
|
+
const boolean2D = require("./boolean2D-DeFQSg1m.cjs");
|
|
7
|
+
const faceFns = require("./faceFns-DcSCjDG0.cjs");
|
|
8
|
+
const curveFns = require("./curveFns-BoG_iA07.cjs");
|
|
9
|
+
const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
|
|
10
|
+
const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
|
|
11
|
+
const cast = require("./cast-CqDc8oFW.cjs");
|
|
12
|
+
const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
|
|
13
13
|
const result = require("./result.cjs");
|
|
14
|
-
const helpers = require("./helpers-
|
|
15
|
-
const
|
|
16
|
-
const loft = require("./loft-DJXwxV_L.cjs");
|
|
14
|
+
const helpers = require("./helpers-DwmieP38.cjs");
|
|
15
|
+
const loft = require("./loft-8asn63t4.cjs");
|
|
17
16
|
const opentype = require("opentype.js");
|
|
18
|
-
const cornerFinder = require("./cornerFinder-
|
|
17
|
+
const cornerFinder = require("./cornerFinder-DhbwiYQK.cjs");
|
|
19
18
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
20
19
|
const startPoints = new boolean2D.Flatbush(curves.length);
|
|
21
20
|
curves.forEach((c) => {
|
|
@@ -415,7 +414,7 @@ const guessFaceFromWires = (wires) => {
|
|
|
415
414
|
new oc.BRepOffsetAPI_MakeFilling(3, 15, 2, false, 1e-5, 1e-4, 0.01, 0.1, 8, 9)
|
|
416
415
|
);
|
|
417
416
|
wires.forEach((wire, wireIndex) => {
|
|
418
|
-
|
|
417
|
+
curveFns.getEdges(wire).forEach((edge) => {
|
|
419
418
|
faceBuilder.Add_1(edge.wrapped, oc.GeomAbs_Shape.GeomAbs_C0, wireIndex === 0);
|
|
420
419
|
});
|
|
421
420
|
});
|
|
@@ -1120,7 +1119,7 @@ function isProjectionPlane(plane) {
|
|
|
1120
1119
|
}
|
|
1121
1120
|
const getEdgesFromOc = (shape) => {
|
|
1122
1121
|
if (shape.IsNull()) return [];
|
|
1123
|
-
return
|
|
1122
|
+
return curveFns.getEdges(shapeTypes.castShape(shape));
|
|
1124
1123
|
};
|
|
1125
1124
|
function makeProjectedEdges(shape, camera, withHiddenLines = true) {
|
|
1126
1125
|
const oc = occtBoundary.getKernel().oc;
|
|
@@ -1498,7 +1497,7 @@ function drawFaceOutline(face) {
|
|
|
1498
1497
|
const [r, gc] = shapeTypes.localGC();
|
|
1499
1498
|
const clonedFace = r(shapeTypes.createFace(errors.unwrap(cast.downcast(face.wrapped))));
|
|
1500
1499
|
const faceOuterWire = r(faceFns.outerWire(clonedFace));
|
|
1501
|
-
const curves =
|
|
1500
|
+
const curves = curveFns.getEdges(faceOuterWire).map((e) => Blueprint.edgeToCurve(e, face));
|
|
1502
1501
|
gc();
|
|
1503
1502
|
const stitchedCurves = stitchCurves(curves).map((s) => new Blueprint.Blueprint(s));
|
|
1504
1503
|
if (stitchedCurves.length === 0) return new Drawing();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as getKernel, a as toVec3, b as toOcPnt } from "./occtBoundary-
|
|
2
|
-
import { c as castShape, p as gcWithScope } from "./shapeTypes-
|
|
1
|
+
import { g as getKernel, a as toVec3, b as toOcPnt } from "./occtBoundary-DYsksDtE.js";
|
|
2
|
+
import { c as castShape, p as gcWithScope } from "./shapeTypes-i7VwMRwc.js";
|
|
3
3
|
import { u as unwrap, e as err, p as typeCastError, l as ok } from "./errors-wGhcJMpB.js";
|
|
4
|
-
import { i as iterTopo, d as downcast } from "./cast-
|
|
4
|
+
import { i as iterTopo, d as downcast } from "./cast-BEg1mN7n.js";
|
|
5
5
|
function getSurfaceType(face) {
|
|
6
6
|
const oc = getKernel().oc;
|
|
7
7
|
const r = gcWithScope();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
|
|
4
4
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
|
-
const cast = require("./cast-
|
|
5
|
+
const cast = require("./cast-CqDc8oFW.cjs");
|
|
6
6
|
function getSurfaceType(face) {
|
|
7
7
|
const oc = occtBoundary.getKernel().oc;
|
|
8
8
|
const r = shapeTypes.gcWithScope();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { bug } from "./result.js";
|
|
2
|
-
import { c as castShape, p as gcWithScope, e as isFace } from "./shapeTypes-
|
|
2
|
+
import { c as castShape, p as gcWithScope, e as isFace } from "./shapeTypes-i7VwMRwc.js";
|
|
3
3
|
import { e as err, q as queryError, l as ok, u as unwrap } from "./errors-wGhcJMpB.js";
|
|
4
4
|
import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { g as getSurfaceType, n as normalAt } from "./faceFns-
|
|
6
|
-
import { m as measureArea } from "./measurement-
|
|
7
|
-
import { g as getHashCode, i as isSameShape } from "./
|
|
8
|
-
import { i as iterTopo, d as downcast } from "./cast-
|
|
9
|
-
import { g as getKernel, b as toOcPnt } from "./occtBoundary-
|
|
5
|
+
import { g as getSurfaceType, n as normalAt } from "./faceFns-CyokaCDr.js";
|
|
6
|
+
import { m as measureArea } from "./measurement-DWv8kK6J.js";
|
|
7
|
+
import { g as getHashCode, i as isSameShape } from "./curveFns-Cg99XKe2.js";
|
|
8
|
+
import { i as iterTopo, d as downcast } from "./cast-BEg1mN7n.js";
|
|
9
|
+
import { g as getKernel, b as toOcPnt } from "./occtBoundary-DYsksDtE.js";
|
|
10
10
|
const PRECISION_INTERSECTION = 1e-9;
|
|
11
11
|
const PRECISION_OFFSET = 1e-8;
|
|
12
12
|
const PRECISION_POINT = 1e-6;
|
|
@@ -132,16 +132,16 @@ function resolveDir(dir) {
|
|
|
132
132
|
return dir;
|
|
133
133
|
}
|
|
134
134
|
function distanceFromPointFilter(distance, point, tolerance) {
|
|
135
|
+
const oc = getKernel().oc;
|
|
136
|
+
const r = gcWithScope();
|
|
137
|
+
const pnt = r(toOcPnt(point));
|
|
138
|
+
const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
|
|
139
|
+
const vtx = vtxMaker.Vertex();
|
|
140
|
+
const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
|
|
141
|
+
distTool.LoadS1(vtx);
|
|
142
|
+
const progress = r(new oc.Message_ProgressRange_1());
|
|
135
143
|
return (element) => {
|
|
136
|
-
const oc = getKernel().oc;
|
|
137
|
-
const r = gcWithScope();
|
|
138
|
-
const pnt = r(toOcPnt(point));
|
|
139
|
-
const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
|
|
140
|
-
const vtx = vtxMaker.Vertex();
|
|
141
|
-
const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
|
|
142
|
-
distTool.LoadS1(vtx);
|
|
143
144
|
distTool.LoadS2(element.wrapped);
|
|
144
|
-
const progress = r(new oc.Message_ProgressRange_1());
|
|
145
145
|
distTool.Perform(progress);
|
|
146
146
|
const d = distTool.Value();
|
|
147
147
|
return Math.abs(d - distance) < tolerance;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const result = require("./result.cjs");
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
3
|
+
const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
|
|
4
4
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const faceFns = require("./faceFns-
|
|
7
|
-
const measurement = require("./measurement-
|
|
8
|
-
const
|
|
9
|
-
const cast = require("./cast-
|
|
10
|
-
const occtBoundary = require("./occtBoundary-
|
|
6
|
+
const faceFns = require("./faceFns-DcSCjDG0.cjs");
|
|
7
|
+
const measurement = require("./measurement-lRLwaoqD.cjs");
|
|
8
|
+
const curveFns = require("./curveFns-BoG_iA07.cjs");
|
|
9
|
+
const cast = require("./cast-CqDc8oFW.cjs");
|
|
10
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
11
11
|
const PRECISION_INTERSECTION = 1e-9;
|
|
12
12
|
const PRECISION_OFFSET = 1e-8;
|
|
13
13
|
const PRECISION_POINT = 1e-6;
|
|
@@ -87,14 +87,14 @@ function createTypedFinder(topoKind, filters, rebuild, extend) {
|
|
|
87
87
|
inList: (elements) => {
|
|
88
88
|
const hashSet = /* @__PURE__ */ new Map();
|
|
89
89
|
for (const e of elements) {
|
|
90
|
-
const h =
|
|
90
|
+
const h = curveFns.getHashCode(e);
|
|
91
91
|
const bucket = hashSet.get(h);
|
|
92
92
|
if (bucket) bucket.push(e);
|
|
93
93
|
else hashSet.set(h, [e]);
|
|
94
94
|
}
|
|
95
95
|
return withFilter((el) => {
|
|
96
|
-
const bucket = hashSet.get(
|
|
97
|
-
return !!bucket && bucket.some((e) =>
|
|
96
|
+
const bucket = hashSet.get(curveFns.getHashCode(el));
|
|
97
|
+
return !!bucket && bucket.some((e) => curveFns.isSameShape(e, el));
|
|
98
98
|
});
|
|
99
99
|
},
|
|
100
100
|
not: (builderFn) => {
|
|
@@ -133,16 +133,16 @@ function resolveDir(dir) {
|
|
|
133
133
|
return dir;
|
|
134
134
|
}
|
|
135
135
|
function distanceFromPointFilter(distance, point, tolerance) {
|
|
136
|
+
const oc = occtBoundary.getKernel().oc;
|
|
137
|
+
const r = shapeTypes.gcWithScope();
|
|
138
|
+
const pnt = r(occtBoundary.toOcPnt(point));
|
|
139
|
+
const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
|
|
140
|
+
const vtx = vtxMaker.Vertex();
|
|
141
|
+
const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
|
|
142
|
+
distTool.LoadS1(vtx);
|
|
143
|
+
const progress = r(new oc.Message_ProgressRange_1());
|
|
136
144
|
return (element) => {
|
|
137
|
-
const oc = occtBoundary.getKernel().oc;
|
|
138
|
-
const r = shapeTypes.gcWithScope();
|
|
139
|
-
const pnt = r(occtBoundary.toOcPnt(point));
|
|
140
|
-
const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
|
|
141
|
-
const vtx = vtxMaker.Vertex();
|
|
142
|
-
const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
|
|
143
|
-
distTool.LoadS1(vtx);
|
|
144
145
|
distTool.LoadS2(element.wrapped);
|
|
145
|
-
const progress = r(new oc.Message_ProgressRange_1());
|
|
146
146
|
distTool.Perform(progress);
|
|
147
147
|
const d = distTool.Value();
|
|
148
148
|
return Math.abs(d - distance) < tolerance;
|
package/dist/io.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
4
|
-
const shapeTypes = require("./shapeTypes-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
|
|
4
|
+
const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
|
|
5
5
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
6
|
-
const meshFns = require("./meshFns-
|
|
7
|
-
const Blueprint = require("./Blueprint-
|
|
6
|
+
const meshFns = require("./meshFns-DWuLC3fk.cjs");
|
|
7
|
+
const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
|
|
8
8
|
function vec3At(arr, i) {
|
|
9
9
|
const off = i * 3;
|
|
10
10
|
return [arr[off], arr[off + 1], arr[off + 2]];
|
package/dist/io.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as getKernel, n as uniqueId } from "./occtBoundary-
|
|
2
|
-
import { c as castShape, p as gcWithScope } from "./shapeTypes-
|
|
1
|
+
import { g as getKernel, n as uniqueId } from "./occtBoundary-DYsksDtE.js";
|
|
2
|
+
import { c as castShape, p as gcWithScope } from "./shapeTypes-i7VwMRwc.js";
|
|
3
3
|
import { e as err, i as ioError, l as ok } from "./errors-wGhcJMpB.js";
|
|
4
|
-
import { e, d, f } from "./meshFns-
|
|
5
|
-
import { B as Blueprint, i as make2dSegmentCurve, t as make2dThreePointArc, y as make2dBezierCurve } from "./Blueprint-
|
|
4
|
+
import { e, d, f } from "./meshFns-DgAIL1B-.js";
|
|
5
|
+
import { B as Blueprint, i as make2dSegmentCurve, t as make2dThreePointArc, y as make2dBezierCurve } from "./Blueprint-2_aAKNQR.js";
|
|
6
6
|
function vec3At(arr, i) {
|
|
7
7
|
const off = i * 3;
|
|
8
8
|
return [arr[off], arr[off + 1], arr[off + 2]];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curveOps.d.ts","sourceRoot":"","sources":["../../src/kernel/curveOps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAU,MAAM,YAAY,CAAC;AAEvE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAClC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"curveOps.d.ts","sourceRoot":"","sources":["../../src/kernel/curveOps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAU,MAAM,YAAY,CAAC;AAEvE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAClC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAmCT;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAClC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAgDT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meshOps.d.ts","sourceRoot":"","sources":["../../src/kernel/meshOps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"meshOps.d.ts","sourceRoot":"","sources":["../../src/kernel/meshOps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AA0BpB;;GAEG;AACH,wBAAgB,QAAQ,CACtB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GACnB,gBAAgB,CAgDlB;AAED;;GAEG;AACH,wBAAgB,MAAM,CACpB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GACnB,gBAAgB,CAqIlB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAClB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GACnB,gBAAgB,CAMlB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,oBAAoB,CA6BtB;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,oBAAoB,CA2ItB;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,oBAAoB,CAKtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifierOps.d.ts","sourceRoot":"","sources":["../../src/kernel/modifierOps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,MAAM,CACpB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EAAE,EAChB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAcT;AAED,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,OAAO,CACrB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EAAE,EAChB,QAAQ,EAAE,eAAe,GACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"modifierOps.d.ts","sourceRoot":"","sources":["../../src/kernel/modifierOps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,MAAM,CACpB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EAAE,EAChB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAcT;AAED,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,OAAO,CACrB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EAAE,EAChB,QAAQ,EAAE,eAAe,GACxB,OAAO,CAwDT;AAED;;GAEG;AACH,wBAAgB,KAAK,CACnB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EAAE,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,SAAO,GACf,OAAO,CAwBT;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAS3F;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EAAE,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAyCT;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,mBAAmB,EACvB,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,MAAM,CACpB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,SAAO,GACf,OAAO,CAkBT"}
|