brepjs 8.2.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-D_luVeES.js → Blueprint-CdVaHDSx.js} +3 -2
- package/dist/{Blueprint-CTAwjJMN.cjs → Blueprint-a3ukJMG4.cjs} +4 -3
- package/dist/{boolean2D-vw76Gayn.js → boolean2D-DzA0STqC.js} +3 -3
- package/dist/{boolean2D-B5axNhjN.cjs → boolean2D-pvPIs21j.cjs} +3 -3
- package/dist/{booleanFns-BhqXpQoZ.js → booleanFns-BcQUqjUu.js} +42 -5
- package/dist/{booleanFns-Yc3EBxdm.cjs → booleanFns-Cd414V3l.cjs} +42 -5
- package/dist/brepjs.cjs +189 -100
- package/dist/brepjs.js +255 -165
- package/dist/{cornerFinder-DuStF5jK.cjs → cornerFinder-BdKtobgb.cjs} +1 -1
- package/dist/{cornerFinder-CPm2baSJ.js → cornerFinder-DvPiz-VR.js} +1 -1
- package/dist/curveFns-B5EQsSwv.cjs +177 -0
- package/dist/curveFns-CyHyk29c.js +178 -0
- package/dist/{drawFns-CzBbcoXA.js → drawFns-CAAE4Z88.js} +6 -5
- package/dist/{drawFns-CiNxPu6J.cjs → drawFns-Mr2pghU8.cjs} +9 -8
- package/dist/{helpers-Dje6wrKi.cjs → helpers-CP2KrBZl.cjs} +4 -4
- package/dist/{helpers-BSQfs538.js → helpers-r_e-u1JM.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{meshFns-BKSPaPXS.js → meshFns-BEvGVcym.js} +4 -1
- package/dist/{meshFns-CFVxKBlE.cjs → meshFns-CJV_k_EQ.cjs} +4 -1
- package/dist/{operations-CjQHEu1h.js → operations-B314mytX.js} +1 -1
- package/dist/{operations-CdGb6IBU.cjs → operations-CYGNxn5D.cjs} +1 -1
- package/dist/operations.cjs +1 -1
- package/dist/operations.js +1 -1
- package/dist/query.cjs +3 -3
- package/dist/query.js +4 -4
- package/dist/{curveFns-C5gSZ5EY.js → shapeFns-CWd_ASDV.js} +115 -194
- package/dist/{curveFns-ByeCqutv.cjs → shapeFns-Z_ScEjmn.cjs} +94 -173
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts +1 -0
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +30 -0
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/{topology-D8Au8q4i.cjs → topology-A7-jUtHB.cjs} +9 -8
- package/dist/{topology-BFB3LI_y.js → topology-BupialMm.js} +4 -3
- package/dist/topology.cjs +32 -31
- package/dist/topology.js +57 -56
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-
|
|
1
|
+
import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-r_e-u1JM.js";
|
|
2
2
|
import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
const PI_2 = 2 * Math.PI;
|
|
4
4
|
function positiveHalfAngle(angle) {
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-UqVCIO_T.cjs");
|
|
4
|
+
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
|
+
let CURVE_TYPES_MAP = null;
|
|
6
|
+
const getCurveTypesMap = (refresh) => {
|
|
7
|
+
if (CURVE_TYPES_MAP && !refresh) return CURVE_TYPES_MAP;
|
|
8
|
+
const oc = occtBoundary.getKernel().oc;
|
|
9
|
+
const ga = oc.GeomAbs_CurveType;
|
|
10
|
+
CURVE_TYPES_MAP = /* @__PURE__ */ new Map([
|
|
11
|
+
[ga.GeomAbs_Line, "LINE"],
|
|
12
|
+
[ga.GeomAbs_Circle, "CIRCLE"],
|
|
13
|
+
[ga.GeomAbs_Ellipse, "ELLIPSE"],
|
|
14
|
+
[ga.GeomAbs_Hyperbola, "HYPERBOLA"],
|
|
15
|
+
[ga.GeomAbs_Parabola, "PARABOLA"],
|
|
16
|
+
[ga.GeomAbs_BezierCurve, "BEZIER_CURVE"],
|
|
17
|
+
[ga.GeomAbs_BSplineCurve, "BSPLINE_CURVE"],
|
|
18
|
+
[ga.GeomAbs_OffsetCurve, "OFFSET_CURVE"],
|
|
19
|
+
[ga.GeomAbs_OtherCurve, "OTHER_CURVE"]
|
|
20
|
+
]);
|
|
21
|
+
return CURVE_TYPES_MAP;
|
|
22
|
+
};
|
|
23
|
+
const findCurveType = (type) => {
|
|
24
|
+
let shapeType = getCurveTypesMap().get(type);
|
|
25
|
+
if (!shapeType) shapeType = getCurveTypesMap(true).get(type);
|
|
26
|
+
if (!shapeType) return errors.err(errors.typeCastError("UNKNOWN_CURVE_TYPE", "Unknown curve type"));
|
|
27
|
+
return errors.ok(shapeType);
|
|
28
|
+
};
|
|
29
|
+
function getAdaptor(shape) {
|
|
30
|
+
const oc = occtBoundary.getKernel().oc;
|
|
31
|
+
const st = shape.wrapped.ShapeType();
|
|
32
|
+
const e = oc.TopAbs_ShapeEnum;
|
|
33
|
+
if (st === e.TopAbs_WIRE) {
|
|
34
|
+
return new oc.BRepAdaptor_CompCurve_2(shape.wrapped, false);
|
|
35
|
+
}
|
|
36
|
+
return new oc.BRepAdaptor_Curve_2(shape.wrapped);
|
|
37
|
+
}
|
|
38
|
+
function mapParam(adaptor, t) {
|
|
39
|
+
const first = Number(adaptor.FirstParameter());
|
|
40
|
+
const last = Number(adaptor.LastParameter());
|
|
41
|
+
return first + (last - first) * t;
|
|
42
|
+
}
|
|
43
|
+
function getCurveType(shape) {
|
|
44
|
+
const r = shapeTypes.gcWithScope();
|
|
45
|
+
const adaptor = r(getAdaptor(shape));
|
|
46
|
+
const technicalType = adaptor.GetType && adaptor.GetType();
|
|
47
|
+
return errors.unwrap(findCurveType(technicalType));
|
|
48
|
+
}
|
|
49
|
+
function curveStartPoint(shape) {
|
|
50
|
+
const r = shapeTypes.gcWithScope();
|
|
51
|
+
const adaptor = r(getAdaptor(shape));
|
|
52
|
+
const pnt = r(adaptor.Value(adaptor.FirstParameter()));
|
|
53
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
54
|
+
}
|
|
55
|
+
function curveEndPoint(shape) {
|
|
56
|
+
const r = shapeTypes.gcWithScope();
|
|
57
|
+
const adaptor = r(getAdaptor(shape));
|
|
58
|
+
const pnt = r(adaptor.Value(adaptor.LastParameter()));
|
|
59
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
60
|
+
}
|
|
61
|
+
function curvePointAt(shape, position = 0.5) {
|
|
62
|
+
const r = shapeTypes.gcWithScope();
|
|
63
|
+
const adaptor = r(getAdaptor(shape));
|
|
64
|
+
const pnt = r(adaptor.Value(mapParam(adaptor, position)));
|
|
65
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
66
|
+
}
|
|
67
|
+
function curveTangentAt(shape, position = 0.5) {
|
|
68
|
+
const oc = occtBoundary.getKernel().oc;
|
|
69
|
+
const r = shapeTypes.gcWithScope();
|
|
70
|
+
const adaptor = r(getAdaptor(shape));
|
|
71
|
+
const param = mapParam(adaptor, position);
|
|
72
|
+
const tmpPnt = r(new oc.gp_Pnt_1());
|
|
73
|
+
const tmpVec = r(new oc.gp_Vec_1());
|
|
74
|
+
adaptor.D1(param, tmpPnt, tmpVec);
|
|
75
|
+
return [tmpVec.X(), tmpVec.Y(), tmpVec.Z()];
|
|
76
|
+
}
|
|
77
|
+
function curveLength(shape) {
|
|
78
|
+
const oc = occtBoundary.getKernel().oc;
|
|
79
|
+
const r = shapeTypes.gcWithScope();
|
|
80
|
+
const props = r(new oc.GProp_GProps_1());
|
|
81
|
+
oc.BRepGProp.LinearProperties(shape.wrapped, props, true, false);
|
|
82
|
+
return props.Mass();
|
|
83
|
+
}
|
|
84
|
+
function curveIsClosed(shape) {
|
|
85
|
+
const r = shapeTypes.gcWithScope();
|
|
86
|
+
const adaptor = r(getAdaptor(shape));
|
|
87
|
+
return adaptor.IsClosed();
|
|
88
|
+
}
|
|
89
|
+
function curveIsPeriodic(shape) {
|
|
90
|
+
const r = shapeTypes.gcWithScope();
|
|
91
|
+
const adaptor = r(getAdaptor(shape));
|
|
92
|
+
return adaptor.IsPeriodic();
|
|
93
|
+
}
|
|
94
|
+
function curvePeriod(shape) {
|
|
95
|
+
const adaptor = getAdaptor(shape);
|
|
96
|
+
const result = adaptor.Period();
|
|
97
|
+
adaptor.delete();
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
function getOrientation(shape) {
|
|
101
|
+
const oc = occtBoundary.getKernel().oc;
|
|
102
|
+
const orient = shape.wrapped.Orientation_1();
|
|
103
|
+
return orient === oc.TopAbs_Orientation.TopAbs_FORWARD ? "forward" : "backward";
|
|
104
|
+
}
|
|
105
|
+
function flipOrientation(shape) {
|
|
106
|
+
return shapeTypes.castShape(shape.wrapped.Reversed());
|
|
107
|
+
}
|
|
108
|
+
function interpolateCurve(points, options = {}) {
|
|
109
|
+
if (points.length < 2) {
|
|
110
|
+
return errors.err(errors.typeCastError("INTERPOLATE_MIN_POINTS", "Interpolation requires at least 2 points"));
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
const result = occtBoundary.getKernel().interpolatePoints(points, options);
|
|
114
|
+
const cast = shapeTypes.castShape(result);
|
|
115
|
+
if (!shapeTypes.isEdge(cast)) {
|
|
116
|
+
return errors.err(errors.typeCastError("INTERPOLATE_NOT_EDGE", "Interpolation did not produce an edge"));
|
|
117
|
+
}
|
|
118
|
+
return errors.ok(cast);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
return errors.err(
|
|
121
|
+
errors.typeCastError(
|
|
122
|
+
"INTERPOLATE_FAILED",
|
|
123
|
+
`Interpolation failed: ${e instanceof Error ? e.message : String(e)}`
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function approximateCurve(points, options = {}) {
|
|
129
|
+
if (points.length < 2) {
|
|
130
|
+
return errors.err(errors.typeCastError("APPROXIMATE_MIN_POINTS", "Approximation requires at least 2 points"));
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
const result = occtBoundary.getKernel().approximatePoints(points, options);
|
|
134
|
+
const cast = shapeTypes.castShape(result);
|
|
135
|
+
if (!shapeTypes.isEdge(cast)) {
|
|
136
|
+
return errors.err(errors.typeCastError("APPROXIMATE_NOT_EDGE", "Approximation did not produce an edge"));
|
|
137
|
+
}
|
|
138
|
+
return errors.ok(cast);
|
|
139
|
+
} catch (e) {
|
|
140
|
+
return errors.err(
|
|
141
|
+
errors.typeCastError(
|
|
142
|
+
"APPROXIMATE_FAILED",
|
|
143
|
+
`Approximation failed: ${e instanceof Error ? e.message : String(e)}`
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function offsetWire2D(wire, offset, kind = "arc") {
|
|
149
|
+
const oc = occtBoundary.getKernel().oc;
|
|
150
|
+
const joinTypes = {
|
|
151
|
+
arc: oc.GeomAbs_JoinType.GeomAbs_Arc,
|
|
152
|
+
intersection: oc.GeomAbs_JoinType.GeomAbs_Intersection,
|
|
153
|
+
tangent: oc.GeomAbs_JoinType.GeomAbs_Tangent
|
|
154
|
+
};
|
|
155
|
+
const resultShape = occtBoundary.getKernel().offsetWire2D(wire.wrapped, offset, joinTypes[kind]);
|
|
156
|
+
const wrapped = shapeTypes.castShape(resultShape);
|
|
157
|
+
if (!shapeTypes.isWire(wrapped)) {
|
|
158
|
+
wrapped[Symbol.dispose]();
|
|
159
|
+
return errors.err(errors.typeCastError("OFFSET_NOT_WIRE", "Offset did not produce a Wire"));
|
|
160
|
+
}
|
|
161
|
+
return errors.ok(wrapped);
|
|
162
|
+
}
|
|
163
|
+
exports.approximateCurve = approximateCurve;
|
|
164
|
+
exports.curveEndPoint = curveEndPoint;
|
|
165
|
+
exports.curveIsClosed = curveIsClosed;
|
|
166
|
+
exports.curveIsPeriodic = curveIsPeriodic;
|
|
167
|
+
exports.curveLength = curveLength;
|
|
168
|
+
exports.curvePeriod = curvePeriod;
|
|
169
|
+
exports.curvePointAt = curvePointAt;
|
|
170
|
+
exports.curveStartPoint = curveStartPoint;
|
|
171
|
+
exports.curveTangentAt = curveTangentAt;
|
|
172
|
+
exports.findCurveType = findCurveType;
|
|
173
|
+
exports.flipOrientation = flipOrientation;
|
|
174
|
+
exports.getCurveType = getCurveType;
|
|
175
|
+
exports.getOrientation = getOrientation;
|
|
176
|
+
exports.interpolateCurve = interpolateCurve;
|
|
177
|
+
exports.offsetWire2D = offsetWire2D;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { g as getKernel } from "./occtBoundary-CoXB2xvx.js";
|
|
2
|
+
import { c as castShape, d as isEdge, m as isWire, p as gcWithScope } from "./shapeTypes-BU2LKv2S.js";
|
|
3
|
+
import { e as err, p as typeCastError, l as ok, u as unwrap } from "./errors-wGhcJMpB.js";
|
|
4
|
+
let CURVE_TYPES_MAP = null;
|
|
5
|
+
const getCurveTypesMap = (refresh) => {
|
|
6
|
+
if (CURVE_TYPES_MAP && !refresh) return CURVE_TYPES_MAP;
|
|
7
|
+
const oc = getKernel().oc;
|
|
8
|
+
const ga = oc.GeomAbs_CurveType;
|
|
9
|
+
CURVE_TYPES_MAP = /* @__PURE__ */ new Map([
|
|
10
|
+
[ga.GeomAbs_Line, "LINE"],
|
|
11
|
+
[ga.GeomAbs_Circle, "CIRCLE"],
|
|
12
|
+
[ga.GeomAbs_Ellipse, "ELLIPSE"],
|
|
13
|
+
[ga.GeomAbs_Hyperbola, "HYPERBOLA"],
|
|
14
|
+
[ga.GeomAbs_Parabola, "PARABOLA"],
|
|
15
|
+
[ga.GeomAbs_BezierCurve, "BEZIER_CURVE"],
|
|
16
|
+
[ga.GeomAbs_BSplineCurve, "BSPLINE_CURVE"],
|
|
17
|
+
[ga.GeomAbs_OffsetCurve, "OFFSET_CURVE"],
|
|
18
|
+
[ga.GeomAbs_OtherCurve, "OTHER_CURVE"]
|
|
19
|
+
]);
|
|
20
|
+
return CURVE_TYPES_MAP;
|
|
21
|
+
};
|
|
22
|
+
const findCurveType = (type) => {
|
|
23
|
+
let shapeType = getCurveTypesMap().get(type);
|
|
24
|
+
if (!shapeType) shapeType = getCurveTypesMap(true).get(type);
|
|
25
|
+
if (!shapeType) return err(typeCastError("UNKNOWN_CURVE_TYPE", "Unknown curve type"));
|
|
26
|
+
return ok(shapeType);
|
|
27
|
+
};
|
|
28
|
+
function getAdaptor(shape) {
|
|
29
|
+
const oc = getKernel().oc;
|
|
30
|
+
const st = shape.wrapped.ShapeType();
|
|
31
|
+
const e = oc.TopAbs_ShapeEnum;
|
|
32
|
+
if (st === e.TopAbs_WIRE) {
|
|
33
|
+
return new oc.BRepAdaptor_CompCurve_2(shape.wrapped, false);
|
|
34
|
+
}
|
|
35
|
+
return new oc.BRepAdaptor_Curve_2(shape.wrapped);
|
|
36
|
+
}
|
|
37
|
+
function mapParam(adaptor, t) {
|
|
38
|
+
const first = Number(adaptor.FirstParameter());
|
|
39
|
+
const last = Number(adaptor.LastParameter());
|
|
40
|
+
return first + (last - first) * t;
|
|
41
|
+
}
|
|
42
|
+
function getCurveType(shape) {
|
|
43
|
+
const r = gcWithScope();
|
|
44
|
+
const adaptor = r(getAdaptor(shape));
|
|
45
|
+
const technicalType = adaptor.GetType && adaptor.GetType();
|
|
46
|
+
return unwrap(findCurveType(technicalType));
|
|
47
|
+
}
|
|
48
|
+
function curveStartPoint(shape) {
|
|
49
|
+
const r = gcWithScope();
|
|
50
|
+
const adaptor = r(getAdaptor(shape));
|
|
51
|
+
const pnt = r(adaptor.Value(adaptor.FirstParameter()));
|
|
52
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
53
|
+
}
|
|
54
|
+
function curveEndPoint(shape) {
|
|
55
|
+
const r = gcWithScope();
|
|
56
|
+
const adaptor = r(getAdaptor(shape));
|
|
57
|
+
const pnt = r(adaptor.Value(adaptor.LastParameter()));
|
|
58
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
59
|
+
}
|
|
60
|
+
function curvePointAt(shape, position = 0.5) {
|
|
61
|
+
const r = gcWithScope();
|
|
62
|
+
const adaptor = r(getAdaptor(shape));
|
|
63
|
+
const pnt = r(adaptor.Value(mapParam(adaptor, position)));
|
|
64
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
65
|
+
}
|
|
66
|
+
function curveTangentAt(shape, position = 0.5) {
|
|
67
|
+
const oc = getKernel().oc;
|
|
68
|
+
const r = gcWithScope();
|
|
69
|
+
const adaptor = r(getAdaptor(shape));
|
|
70
|
+
const param = mapParam(adaptor, position);
|
|
71
|
+
const tmpPnt = r(new oc.gp_Pnt_1());
|
|
72
|
+
const tmpVec = r(new oc.gp_Vec_1());
|
|
73
|
+
adaptor.D1(param, tmpPnt, tmpVec);
|
|
74
|
+
return [tmpVec.X(), tmpVec.Y(), tmpVec.Z()];
|
|
75
|
+
}
|
|
76
|
+
function curveLength(shape) {
|
|
77
|
+
const oc = getKernel().oc;
|
|
78
|
+
const r = gcWithScope();
|
|
79
|
+
const props = r(new oc.GProp_GProps_1());
|
|
80
|
+
oc.BRepGProp.LinearProperties(shape.wrapped, props, true, false);
|
|
81
|
+
return props.Mass();
|
|
82
|
+
}
|
|
83
|
+
function curveIsClosed(shape) {
|
|
84
|
+
const r = gcWithScope();
|
|
85
|
+
const adaptor = r(getAdaptor(shape));
|
|
86
|
+
return adaptor.IsClosed();
|
|
87
|
+
}
|
|
88
|
+
function curveIsPeriodic(shape) {
|
|
89
|
+
const r = gcWithScope();
|
|
90
|
+
const adaptor = r(getAdaptor(shape));
|
|
91
|
+
return adaptor.IsPeriodic();
|
|
92
|
+
}
|
|
93
|
+
function curvePeriod(shape) {
|
|
94
|
+
const adaptor = getAdaptor(shape);
|
|
95
|
+
const result = adaptor.Period();
|
|
96
|
+
adaptor.delete();
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
function getOrientation(shape) {
|
|
100
|
+
const oc = getKernel().oc;
|
|
101
|
+
const orient = shape.wrapped.Orientation_1();
|
|
102
|
+
return orient === oc.TopAbs_Orientation.TopAbs_FORWARD ? "forward" : "backward";
|
|
103
|
+
}
|
|
104
|
+
function flipOrientation(shape) {
|
|
105
|
+
return castShape(shape.wrapped.Reversed());
|
|
106
|
+
}
|
|
107
|
+
function interpolateCurve(points, options = {}) {
|
|
108
|
+
if (points.length < 2) {
|
|
109
|
+
return err(typeCastError("INTERPOLATE_MIN_POINTS", "Interpolation requires at least 2 points"));
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const result = getKernel().interpolatePoints(points, options);
|
|
113
|
+
const cast = castShape(result);
|
|
114
|
+
if (!isEdge(cast)) {
|
|
115
|
+
return err(typeCastError("INTERPOLATE_NOT_EDGE", "Interpolation did not produce an edge"));
|
|
116
|
+
}
|
|
117
|
+
return ok(cast);
|
|
118
|
+
} catch (e) {
|
|
119
|
+
return err(
|
|
120
|
+
typeCastError(
|
|
121
|
+
"INTERPOLATE_FAILED",
|
|
122
|
+
`Interpolation failed: ${e instanceof Error ? e.message : String(e)}`
|
|
123
|
+
)
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function approximateCurve(points, options = {}) {
|
|
128
|
+
if (points.length < 2) {
|
|
129
|
+
return err(typeCastError("APPROXIMATE_MIN_POINTS", "Approximation requires at least 2 points"));
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
const result = getKernel().approximatePoints(points, options);
|
|
133
|
+
const cast = castShape(result);
|
|
134
|
+
if (!isEdge(cast)) {
|
|
135
|
+
return err(typeCastError("APPROXIMATE_NOT_EDGE", "Approximation did not produce an edge"));
|
|
136
|
+
}
|
|
137
|
+
return ok(cast);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
return err(
|
|
140
|
+
typeCastError(
|
|
141
|
+
"APPROXIMATE_FAILED",
|
|
142
|
+
`Approximation failed: ${e instanceof Error ? e.message : String(e)}`
|
|
143
|
+
)
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function offsetWire2D(wire, offset, kind = "arc") {
|
|
148
|
+
const oc = getKernel().oc;
|
|
149
|
+
const joinTypes = {
|
|
150
|
+
arc: oc.GeomAbs_JoinType.GeomAbs_Arc,
|
|
151
|
+
intersection: oc.GeomAbs_JoinType.GeomAbs_Intersection,
|
|
152
|
+
tangent: oc.GeomAbs_JoinType.GeomAbs_Tangent
|
|
153
|
+
};
|
|
154
|
+
const resultShape = getKernel().offsetWire2D(wire.wrapped, offset, joinTypes[kind]);
|
|
155
|
+
const wrapped = castShape(resultShape);
|
|
156
|
+
if (!isWire(wrapped)) {
|
|
157
|
+
wrapped[Symbol.dispose]();
|
|
158
|
+
return err(typeCastError("OFFSET_NOT_WIRE", "Offset did not produce a Wire"));
|
|
159
|
+
}
|
|
160
|
+
return ok(wrapped);
|
|
161
|
+
}
|
|
162
|
+
export {
|
|
163
|
+
curveTangentAt as a,
|
|
164
|
+
curvePointAt as b,
|
|
165
|
+
curveIsClosed as c,
|
|
166
|
+
curveEndPoint as d,
|
|
167
|
+
curveStartPoint as e,
|
|
168
|
+
curveLength as f,
|
|
169
|
+
approximateCurve as g,
|
|
170
|
+
curveIsPeriodic as h,
|
|
171
|
+
curvePeriod as i,
|
|
172
|
+
findCurveType as j,
|
|
173
|
+
flipOrientation as k,
|
|
174
|
+
getCurveType as l,
|
|
175
|
+
getOrientation as m,
|
|
176
|
+
interpolateCurve as n,
|
|
177
|
+
offsetWire2D as o
|
|
178
|
+
};
|
|
@@ -2,18 +2,19 @@ import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from
|
|
|
2
2
|
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-BhfKwL9J.js";
|
|
3
3
|
import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-CoXB2xvx.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-
|
|
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-DzA0STqC.js";
|
|
6
6
|
import { f as faceCenter, n as normalAt, o as outerWire } from "./faceFns-ub3CugDN.js";
|
|
7
|
-
import {
|
|
7
|
+
import { a as curveTangentAt, d as curveEndPoint, l as getCurveType, o as offsetWire2D } from "./curveFns-CyHyk29c.js";
|
|
8
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-CN72XaIQ.js";
|
|
9
9
|
import { n as createWire, t as localGC, u as createFace, e as isFace, p as gcWithScope, c as castShape } from "./shapeTypes-BU2LKv2S.js";
|
|
10
10
|
import { d as downcast, c as cast } from "./cast-D0OhP1nV.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-
|
|
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-CdVaHDSx.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-
|
|
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-r_e-u1JM.js";
|
|
14
|
+
import { c as getEdges } from "./shapeFns-CWd_ASDV.js";
|
|
14
15
|
import { m as makeCompound, i as basicFaceExtrusion, r as revolution, e as makeSolid, k as complexExtrude, t as twistExtrude } from "./loft-BHn7GKm8.js";
|
|
15
16
|
import opentype from "opentype.js";
|
|
16
|
-
import { c as cornerFinder } from "./cornerFinder-
|
|
17
|
+
import { c as cornerFinder } from "./cornerFinder-DvPiz-VR.js";
|
|
17
18
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
18
19
|
const startPoints = new Flatbush(curves.length);
|
|
19
20
|
curves.forEach((c) => {
|
|
@@ -3,18 +3,19 @@ const errors = require("./errors-DK1VAdP4.cjs");
|
|
|
3
3
|
const vectors = require("./vectors-t1XG4LpL.cjs");
|
|
4
4
|
const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const boolean2D = require("./boolean2D-
|
|
6
|
+
const boolean2D = require("./boolean2D-pvPIs21j.cjs");
|
|
7
7
|
const faceFns = require("./faceFns-D1Sqnlu6.cjs");
|
|
8
|
-
const curveFns = require("./curveFns-
|
|
8
|
+
const curveFns = require("./curveFns-B5EQsSwv.cjs");
|
|
9
9
|
const curveBuilders = require("./curveBuilders-Du03_Yyf.cjs");
|
|
10
10
|
const shapeTypes = require("./shapeTypes-UqVCIO_T.cjs");
|
|
11
11
|
const cast = require("./cast-C107o5ow.cjs");
|
|
12
|
-
const Blueprint = require("./Blueprint-
|
|
12
|
+
const Blueprint = require("./Blueprint-a3ukJMG4.cjs");
|
|
13
13
|
const result = require("./result.cjs");
|
|
14
|
-
const helpers = require("./helpers-
|
|
14
|
+
const helpers = require("./helpers-CP2KrBZl.cjs");
|
|
15
|
+
const shapeFns = require("./shapeFns-Z_ScEjmn.cjs");
|
|
15
16
|
const loft = require("./loft-PMRx9iMG.cjs");
|
|
16
17
|
const opentype = require("opentype.js");
|
|
17
|
-
const cornerFinder = require("./cornerFinder-
|
|
18
|
+
const cornerFinder = require("./cornerFinder-BdKtobgb.cjs");
|
|
18
19
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
19
20
|
const startPoints = new boolean2D.Flatbush(curves.length);
|
|
20
21
|
curves.forEach((c) => {
|
|
@@ -414,7 +415,7 @@ const guessFaceFromWires = (wires) => {
|
|
|
414
415
|
new oc.BRepOffsetAPI_MakeFilling(3, 15, 2, false, 1e-5, 1e-4, 0.01, 0.1, 8, 9)
|
|
415
416
|
);
|
|
416
417
|
wires.forEach((wire, wireIndex) => {
|
|
417
|
-
|
|
418
|
+
shapeFns.getEdges(wire).forEach((edge) => {
|
|
418
419
|
faceBuilder.Add_1(edge.wrapped, oc.GeomAbs_Shape.GeomAbs_C0, wireIndex === 0);
|
|
419
420
|
});
|
|
420
421
|
});
|
|
@@ -1119,7 +1120,7 @@ function isProjectionPlane(plane) {
|
|
|
1119
1120
|
}
|
|
1120
1121
|
const getEdgesFromOc = (shape) => {
|
|
1121
1122
|
if (shape.IsNull()) return [];
|
|
1122
|
-
return
|
|
1123
|
+
return shapeFns.getEdges(shapeTypes.castShape(shape));
|
|
1123
1124
|
};
|
|
1124
1125
|
function makeProjectedEdges(shape, camera, withHiddenLines = true) {
|
|
1125
1126
|
const oc = occtBoundary.getKernel().oc;
|
|
@@ -1497,7 +1498,7 @@ function drawFaceOutline(face) {
|
|
|
1497
1498
|
const [r, gc] = shapeTypes.localGC();
|
|
1498
1499
|
const clonedFace = r(shapeTypes.createFace(errors.unwrap(cast.downcast(face.wrapped))));
|
|
1499
1500
|
const faceOuterWire = r(faceFns.outerWire(clonedFace));
|
|
1500
|
-
const curves =
|
|
1501
|
+
const curves = shapeFns.getEdges(faceOuterWire).map((e) => Blueprint.edgeToCurve(e, face));
|
|
1501
1502
|
gc();
|
|
1502
1503
|
const stitchedCurves = stitchCurves(curves).map((s) => new Blueprint.Blueprint(s));
|
|
1503
1504
|
if (stitchedCurves.length === 0) return new Drawing();
|
|
@@ -5,7 +5,7 @@ const errors = require("./errors-DK1VAdP4.cjs");
|
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
6
|
const faceFns = require("./faceFns-D1Sqnlu6.cjs");
|
|
7
7
|
const measurement = require("./measurement-B06hNs89.cjs");
|
|
8
|
-
const
|
|
8
|
+
const shapeFns = require("./shapeFns-Z_ScEjmn.cjs");
|
|
9
9
|
const cast = require("./cast-C107o5ow.cjs");
|
|
10
10
|
const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
|
|
11
11
|
const PRECISION_INTERSECTION = 1e-9;
|
|
@@ -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 = shapeFns.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(shapeFns.getHashCode(el));
|
|
97
|
+
return !!bucket && bucket.some((e) => shapeFns.isSameShape(e, el));
|
|
98
98
|
});
|
|
99
99
|
},
|
|
100
100
|
not: (builderFn) => {
|
|
@@ -4,7 +4,7 @@ import { e as err, q as queryError, l as ok, u as unwrap } from "./errors-wGhcJM
|
|
|
4
4
|
import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
5
5
|
import { g as getSurfaceType, n as normalAt } from "./faceFns-ub3CugDN.js";
|
|
6
6
|
import { m as measureArea } from "./measurement-BfhEneUl.js";
|
|
7
|
-
import {
|
|
7
|
+
import { b as getHashCode, i as isSameShape } from "./shapeFns-CWd_ASDV.js";
|
|
8
8
|
import { i as iterTopo, d as downcast } from "./cast-D0OhP1nV.js";
|
|
9
9
|
import { g as getKernel, b as toOcPnt } from "./occtBoundary-CoXB2xvx.js";
|
|
10
10
|
const PRECISION_INTERSECTION = 1e-9;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export type { ShapeHandle, OcHandle } from './core/disposal.js';
|
|
|
58
58
|
export { createHandle, createOcHandle, DisposalScope, withScope } from './core/disposal.js';
|
|
59
59
|
export type { Plane, PlaneName, PlaneInput } from './core/planeTypes.js';
|
|
60
60
|
export { createPlane, createNamedPlane, resolvePlane, translatePlane, pivotPlane, } from './core/planeOps.js';
|
|
61
|
-
export { getHashCode, isSameShape, isEqualShape, getEdges, getFaces, getWires, getVertices, iterEdges, iterFaces, iterWires, iterVertices, getBounds, vertexPosition, type Bounds3D, type ShapeDescription, } from './topology/shapeFns.js';
|
|
61
|
+
export { getHashCode, isSameShape, isEqualShape, getEdges, getFaces, getWires, getVertices, iterEdges, iterFaces, iterWires, iterVertices, getBounds, vertexPosition, setShapeOrigin, getFaceOrigins, type Bounds3D, type ShapeDescription, } from './topology/shapeFns.js';
|
|
62
62
|
export { chamferDistAngle as chamferDistAngleShape } from './topology/chamferAngleFns.js';
|
|
63
63
|
export { facesOfEdge, edgesOfFace, wiresOfFace, verticesOfEdge, adjacentFaces, sharedEdges, } from './topology/adjacencyFns.js';
|
|
64
64
|
export { getCurveType, curveStartPoint, curveEndPoint, curvePointAt, curveTangentAt, curveLength, curveIsClosed, curveIsPeriodic, curvePeriod, getOrientation, flipOrientation, offsetWire2D, interpolateCurve, approximateCurve, type InterpolateCurveOptions, type ApproximateCurveOptions, } from './topology/curveFns.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,EACL,EAAE,EACF,GAAG,EACH,EAAE,EACF,IAAI,EACJ,KAAK,EACL,GAAG,EACH,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,EAAE,EACP,KAAK,GAAG,EACR,KAAK,IAAI,EACT,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,aAAa,EACb,SAAS,EACT,eAAe,EACf,aAAa,EACb,kB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E,IAAI,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAInG,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,0BAA0B,CAAC"}
|
package/dist/io.cjs
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
|
|
4
4
|
const shapeTypes = require("./shapeTypes-UqVCIO_T.cjs");
|
|
5
5
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
6
|
-
const meshFns = require("./meshFns-
|
|
7
|
-
const Blueprint = require("./Blueprint-
|
|
6
|
+
const meshFns = require("./meshFns-CJV_k_EQ.cjs");
|
|
7
|
+
const Blueprint = require("./Blueprint-a3ukJMG4.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
1
|
import { g as getKernel, n as uniqueId } from "./occtBoundary-CoXB2xvx.js";
|
|
2
2
|
import { c as castShape, p as gcWithScope } from "./shapeTypes-BU2LKv2S.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-BEvGVcym.js";
|
|
5
|
+
import { B as Blueprint, i as make2dSegmentCurve, t as make2dThreePointArc, y as make2dBezierCurve } from "./Blueprint-CdVaHDSx.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,5 +1,6 @@
|
|
|
1
1
|
import { g as getKernel, u as uniqueIOFilename } from "./occtBoundary-CoXB2xvx.js";
|
|
2
2
|
import { l as ok, e as err, i as ioError } from "./errors-wGhcJMpB.js";
|
|
3
|
+
import { g as getFaceOrigins } from "./shapeFns-CWd_ASDV.js";
|
|
3
4
|
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
4
5
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
5
6
|
}
|
|
@@ -109,6 +110,7 @@ function mesh(shape, {
|
|
|
109
110
|
includeUVs,
|
|
110
111
|
...signal ? { signal } : {}
|
|
111
112
|
});
|
|
113
|
+
const origins = getFaceOrigins(shape);
|
|
112
114
|
const mesh2 = {
|
|
113
115
|
vertices: result.vertices,
|
|
114
116
|
normals: result.normals,
|
|
@@ -117,7 +119,8 @@ function mesh(shape, {
|
|
|
117
119
|
faceGroups: result.faceGroups.map((g) => ({
|
|
118
120
|
start: g.start,
|
|
119
121
|
count: g.count,
|
|
120
|
-
faceId: g.faceHash
|
|
122
|
+
faceId: g.faceHash,
|
|
123
|
+
origin: origins?.get(g.faceHash) ?? 0
|
|
121
124
|
}))
|
|
122
125
|
};
|
|
123
126
|
if (cache) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
|
|
3
3
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
4
|
+
const shapeFns = require("./shapeFns-Z_ScEjmn.cjs");
|
|
4
5
|
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
5
6
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
6
7
|
}
|
|
@@ -110,6 +111,7 @@ function mesh(shape, {
|
|
|
110
111
|
includeUVs,
|
|
111
112
|
...signal ? { signal } : {}
|
|
112
113
|
});
|
|
114
|
+
const origins = shapeFns.getFaceOrigins(shape);
|
|
113
115
|
const mesh2 = {
|
|
114
116
|
vertices: result.vertices,
|
|
115
117
|
normals: result.normals,
|
|
@@ -118,7 +120,8 @@ function mesh(shape, {
|
|
|
118
120
|
faceGroups: result.faceGroups.map((g) => ({
|
|
119
121
|
start: g.start,
|
|
120
122
|
count: g.count,
|
|
121
|
-
faceId: g.faceHash
|
|
123
|
+
faceId: g.faceHash,
|
|
124
|
+
origin: origins?.get(g.faceHash) ?? 0
|
|
122
125
|
}))
|
|
123
126
|
};
|
|
124
127
|
if (cache) {
|
|
@@ -4,7 +4,7 @@ import { b as createOcHandle, c as castShape, h as isShape3D, m as isWire, p as
|
|
|
4
4
|
import { d as downcast } from "./cast-D0OhP1nV.js";
|
|
5
5
|
import { e as err, x as validationError, u as unwrap, p as typeCastError, l as ok, B as BrepErrorCode, d as isErr, o as occtError, i as ioError, b as computationError } from "./errors-wGhcJMpB.js";
|
|
6
6
|
import { n as buildLawFromProfile } from "./loft-BHn7GKm8.js";
|
|
7
|
-
import { d as fuseAll } from "./booleanFns-
|
|
7
|
+
import { d as fuseAll } from "./booleanFns-BcQUqjUu.js";
|
|
8
8
|
function uuidv() {
|
|
9
9
|
return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(
|
|
10
10
|
/[018]/g,
|
|
@@ -5,7 +5,7 @@ const shapeTypes = require("./shapeTypes-UqVCIO_T.cjs");
|
|
|
5
5
|
const cast = require("./cast-C107o5ow.cjs");
|
|
6
6
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
7
7
|
const loft = require("./loft-PMRx9iMG.cjs");
|
|
8
|
-
const booleanFns = require("./booleanFns-
|
|
8
|
+
const booleanFns = require("./booleanFns-Cd414V3l.cjs");
|
|
9
9
|
function uuidv() {
|
|
10
10
|
return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(
|
|
11
11
|
/[018]/g,
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const operations = require("./operations-
|
|
3
|
+
const operations = require("./operations-CYGNxn5D.cjs");
|
|
4
4
|
const loft = require("./loft-PMRx9iMG.cjs");
|
|
5
5
|
exports.addChild = operations.addChild;
|
|
6
6
|
exports.addStep = operations.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, w, x, y, z, A, s, B, C, D, E } from "./operations-
|
|
1
|
+
import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, w, x, y, z, A, s, B, C, D, E } from "./operations-B314mytX.js";
|
|
2
2
|
import { i as i2, j as j2, l as l2, r } from "./loft-BHn7GKm8.js";
|
|
3
3
|
export {
|
|
4
4
|
a as addChild,
|