brepjs 7.4.2 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +179 -17
- package/dist/2d/blueprints/blueprintFns.d.ts +0 -22
- package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
- package/dist/2d/blueprints/boolean2D.d.ts +3 -3
- package/dist/2d.cjs +2 -58
- package/dist/2d.d.ts +1 -2
- package/dist/2d.d.ts.map +1 -1
- package/dist/2d.js +7 -64
- package/dist/{Blueprint-3Dyu0OL6.cjs → Blueprint-CVctc41Z.cjs} +4 -4
- package/dist/{Blueprint-DSHD89bZ.js → Blueprint-D3JfGJTz.js} +4 -4
- package/dist/{boolean2D-BwOpOv6L.cjs → boolean2D-BdZATaHs.cjs} +9 -9
- package/dist/{boolean2D-CtyE2hK5.js → boolean2D-hOw5Qay5.js} +9 -9
- package/dist/{booleanFns-5KSbtLBU.cjs → booleanFns-BBSVKhL2.cjs} +27 -31
- package/dist/{booleanFns-DcxqLQSG.js → booleanFns-CqehfzcK.js} +27 -31
- package/dist/brepjs.cjs +95 -106
- package/dist/brepjs.js +129 -140
- package/dist/{cast-D1s7Im9E.js → cast-DQaUibmm.js} +3 -3
- package/dist/{cast-DsxJk_F0.cjs → cast-DkB0GKmQ.cjs} +2 -2
- package/dist/{drawFns-CSbH7uoI.js → drawFns-921SkhDL.js} +9 -9
- package/dist/{drawFns-C6KQjmQj.cjs → drawFns-CUyx50gi.cjs} +9 -9
- package/dist/{faceFns-B9if-FPW.cjs → faceFns-BwK7FP7N.cjs} +1 -1
- package/dist/{faceFns-Bl6HHbqO.js → faceFns-DHu-2JpA.js} +1 -1
- package/dist/index.d.ts +9 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loft-Cc5E5pAf.cjs → loft-BzWFokmC.cjs} +2 -2
- package/dist/{loft-BlNndTOR.js → loft-CtG5nMq5.js} +2 -2
- package/dist/{measurement-D75pyJi1.js → measurement-C5JGCuUP.js} +1 -1
- package/dist/{measurement-BVdZ9cG3.cjs → measurement-fxm_pW7x.cjs} +1 -1
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-p_kv--PW.js → meshFns-AqAjTTVl.js} +11 -11
- package/dist/{meshFns-mVlogI3J.cjs → meshFns-BhrZGi6w.cjs} +11 -11
- package/dist/operations/api.d.ts +4 -6
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/exporterFns.d.ts +0 -2
- package/dist/operations/exporterFns.d.ts.map +1 -1
- package/dist/operations/extrude.d.ts +2 -4
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +4 -4
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/extrudeUtils.d.ts +0 -2
- package/dist/operations/extrudeUtils.d.ts.map +1 -1
- package/dist/operations/loft.d.ts +1 -1
- package/dist/operations/loftFns.d.ts +2 -4
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/{operations-SRN-mfTx.cjs → operations-BP1wVDw0.cjs} +14 -20
- package/dist/{operations-CEV-gqkX.js → operations-C1rWoba2.js} +14 -20
- package/dist/operations.cjs +2 -2
- package/dist/operations.d.ts +3 -3
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +2 -2
- package/dist/{query-D7XclvBZ.js → query-V6nV-VfL.js} +4 -4
- package/dist/{query-DkcMfh6j.cjs → query-hMSmOWJP.cjs} +4 -4
- package/dist/query.cjs +1 -1
- package/dist/query.js +1 -1
- package/dist/{shapeFns-BpCPVHFT.js → shapeFns-BrF97sKt.js} +19 -19
- package/dist/{shapeFns-DjsWo98C.cjs → shapeFns-BvOndshS.cjs} +19 -19
- package/dist/{shapeHelpers-BBSVHPGk.cjs → shapeHelpers-B2SXz1p4.cjs} +2 -2
- package/dist/{shapeHelpers-C4QIp7u5.js → shapeHelpers-BcoZf2N9.js} +2 -2
- package/dist/sketching/sketcherlib.d.ts +2 -4
- package/dist/sketching/sketcherlib.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.d.ts +2 -2
- package/dist/sketching.d.ts.map +1 -1
- package/dist/sketching.js +2 -2
- package/dist/topology/api.d.ts +11 -15
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/apiTypes.d.ts +0 -2
- package/dist/topology/apiTypes.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts +9 -9
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/cast.d.ts +2 -2
- package/dist/topology/cast.d.ts.map +1 -1
- package/dist/topology/chamferAngleFns.d.ts +1 -1
- package/dist/topology/chamferAngleFns.d.ts.map +1 -1
- package/dist/topology/healingFns.d.ts +2 -2
- package/dist/topology/healingFns.d.ts.map +1 -1
- package/dist/topology/index.d.ts +2 -2
- package/dist/topology/index.d.ts.map +1 -1
- package/dist/topology/meshCache.d.ts +2 -4
- package/dist/topology/meshCache.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts +2 -2
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts +5 -5
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +4 -8
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +9 -9
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeModifiers.d.ts +0 -2
- package/dist/topology/shapeModifiers.d.ts.map +1 -1
- package/dist/topology/wrapperFns.d.ts +3 -3
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-Bb1W3SyF.cjs → topology-CIooytHH.cjs} +18 -18
- package/dist/{topology-BEMrS4WZ.js → topology-tFzqSrGH.js} +18 -18
- package/dist/topology.cjs +8 -8
- package/dist/topology.d.ts +1 -1
- package/dist/topology.d.ts.map +1 -1
- package/dist/topology.js +8 -8
- package/package.json +3 -3
- package/dist/2d/blueprints/boolean2dFns.d.ts +0 -46
- package/dist/2d/blueprints/boolean2dFns.d.ts.map +0 -1
- package/dist/core/geometry.d.ts +0 -26
- package/dist/core/geometry.d.ts.map +0 -1
package/dist/brepjs.js
CHANGED
|
@@ -6,34 +6,34 @@ import { c as castShape, o as localGC, p as createSolid, h as isShape3D, n as gc
|
|
|
6
6
|
import { D, r as r3, t as t3, q as q2, a as a2, b as b3, v as v2, u, s as s2, x, g as g2, i as i3, f as f3, j as j3, k as k3, l as l2, w as w3 } from "./shapeTypes-BlSElW8z.js";
|
|
7
7
|
import { D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
8
8
|
import { H, R, v as v3, a as a3, b as b4, c as c2, d, e, g as g3, h as h3, i as i4, k as k4, l as l3, m as m2, o } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
-
import { B, a as a4, C, b as b5, m as m3 } from "./Blueprint-
|
|
9
|
+
import { B, a as a4, C, b as b5, m as m3 } from "./Blueprint-D3JfGJTz.js";
|
|
10
10
|
import { c as curveIsClosed, a as curveTangentAt, b as curvePointAt, d as curveEndPoint, e as curveStartPoint, f as curveLength } from "./curveFns-CdVE4da7.js";
|
|
11
11
|
import { g as g4, h as h4, i as i5, j as j4, k as k5, l as l4, m as m4, n as n2, o as o2 } from "./curveFns-CdVE4da7.js";
|
|
12
|
-
import { b as b6, g as g5, r as r4 } from "./loft-
|
|
13
|
-
import { e as
|
|
14
|
-
import { a as a5, b as b7, d as d2, f as f4, g as g6, h as h5, i as i6, j as j5, k as k6, m as m5, n as n3, o as o3, p, q as q3, t as t4, u as u2, v as v4, w as w4, x as x2, y, z as z2, A, B as B2, C as C2, D as D2, E } from "./operations-
|
|
15
|
-
import { B as B3, a as a6, b as b8, C as C3, F, S, c as c3, d as d3, f as f5, e as e2, i as i7, g as g7, o as o4, p as p2, r as r5 } from "./boolean2D-
|
|
16
|
-
import {
|
|
17
|
-
import { e as edgeFinder, f as faceFinder } from "./query-
|
|
18
|
-
import { c as c4, g as g8, v as v5, w as w5 } from "./query-
|
|
12
|
+
import { b as b6, g as g5, r as r4 } from "./loft-CtG5nMq5.js";
|
|
13
|
+
import { e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-C1rWoba2.js";
|
|
14
|
+
import { a as a5, b as b7, d as d2, f as f4, g as g6, h as h5, i as i6, j as j5, k as k6, m as m5, n as n3, o as o3, p, q as q3, t as t4, u as u2, v as v4, w as w4, x as x2, y, z as z2, A, B as B2, C as C2, D as D2, E } from "./operations-C1rWoba2.js";
|
|
15
|
+
import { B as B3, a as a6, b as b8, C as C3, F, S, c as c3, d as d3, f as f5, e as e2, i as i7, g as g7, o as o4, p as p2, r as r5 } from "./boolean2D-hOw5Qay5.js";
|
|
16
|
+
import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
|
|
17
|
+
import { e as edgeFinder, f as faceFinder } from "./query-V6nV-VfL.js";
|
|
18
|
+
import { c as c4, g as g8, v as v5, w as w5 } from "./query-V6nV-VfL.js";
|
|
19
19
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
20
|
-
import { C as C4, D as D3, a as a7, S as S2, b as b9, X, Y, c as c5, d as d4, e as e3, f as f6, Z, g as g9, h as h6, i as i8, j as j6, k as k7, l as l5, m as m6, n as n4, o as o5, p as p3, q as q4, r as r6, s as s3, t as t5, u as u3, v as v6, w as w6, x as x3, y as y2, z as z3, _, $, a0, A as A2, a1, B as B4, E as E2, a2 as a22, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a3 as a32, V, a4 as a42, W } from "./drawFns-
|
|
20
|
+
import { C as C4, D as D3, a as a7, S as S2, b as b9, X, Y, c as c5, d as d4, e as e3, f as f6, Z, g as g9, h as h6, i as i8, j as j6, k as k7, l as l5, m as m6, n as n4, o as o5, p as p3, q as q4, r as r6, s as s3, t as t5, u as u3, v as v6, w as w6, x as x3, y as y2, z as z3, _, $, a0, A as A2, a1, B as B4, E as E2, a2 as a22, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a3 as a32, V, a4 as a42, W } from "./drawFns-921SkhDL.js";
|
|
21
21
|
import { c as c6, a as a8, p as p4, r as r7, t as t6 } from "./vectors-CBuaMeZv.js";
|
|
22
|
-
import { t as
|
|
23
|
-
import { k as k8, l as l6, n as n5, o as o6, p as p5, q as q5, u as u4, v as v7 } from "./shapeFns-
|
|
24
|
-
import { c as
|
|
25
|
-
import { a as a9, b as b10, e as e4, f as f7, d as d5, g as g10, j as j7, s as s4, t as t7, k as k9, l as l7, v as v8, w as w7 } from "./topology-
|
|
26
|
-
import { n as normalAt, f as faceCenter, i as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-
|
|
27
|
-
import { c as c7, a as a10, b as b11, d as d6, p as p6, e as e5, u as u5, h as h7 } from "./faceFns-
|
|
28
|
-
import { m as
|
|
29
|
-
import { c as c8, b as b12, e as e6, d as d7, f as f8 } from "./meshFns-
|
|
30
|
-
import { c as
|
|
31
|
-
import { e as e7, g as g11 } from "./booleanFns-
|
|
32
|
-
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-
|
|
33
|
-
import { d as d8, e as e8, f as f9, g as g12, h as h8, i as i9 } from "./measurement-
|
|
34
|
-
import { d as addHolesInFace, e as makeBezierCurve, f as makeBSplineApproximation, g as makeCircle, h as makeCompound, i as makeCone, j as makeCylinder, k as makeEllipse, l as makeEllipseArc, n as makeEllipsoid, o as makeFace, p as makeNonPlanarFace, b as makeHelix, m as makeLine, q as makeOffset, r as makePolygon, w as weldShellsAndFaces, s as makeSolid, t as makeSphere, u as makeNewFaceWithinFace, v as makeTangentArc, x as makeThreePointArc, y as makeTorus, c as makeVertex, a as assembleWire } from "./shapeHelpers-
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
22
|
+
import { t as translate$1, g as getEdges, c as clone$1, d as describe$1, i as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, a as simplify$1, b as toBREP$1, e as getBounds, f as getFaces, h as getVertices, j as getWires } from "./shapeFns-BrF97sKt.js";
|
|
23
|
+
import { k as k8, l as l6, n as n5, o as o6, p as p5, q as q5, u as u4, v as v7 } from "./shapeFns-BrF97sKt.js";
|
|
24
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-tFzqSrGH.js";
|
|
25
|
+
import { a as a9, b as b10, e as e4, f as f7, d as d5, g as g10, j as j7, s as s4, t as t7, k as k9, l as l7, v as v8, w as w7 } from "./topology-tFzqSrGH.js";
|
|
26
|
+
import { n as normalAt, f as faceCenter, i as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-DHu-2JpA.js";
|
|
27
|
+
import { c as c7, a as a10, b as b11, d as d6, p as p6, e as e5, u as u5, h as h7 } from "./faceFns-DHu-2JpA.js";
|
|
28
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-AqAjTTVl.js";
|
|
29
|
+
import { c as c8, b as b12, e as e6, d as d7, f as f8 } from "./meshFns-AqAjTTVl.js";
|
|
30
|
+
import { c as cut$1, f as fuse$1, i as intersect$1, s as section$1, a as slice$1, b as split$1, d as cutAll } from "./booleanFns-CqehfzcK.js";
|
|
31
|
+
import { e as e7, g as g11 } from "./booleanFns-CqehfzcK.js";
|
|
32
|
+
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-C5JGCuUP.js";
|
|
33
|
+
import { d as d8, e as e8, f as f9, g as g12, h as h8, i as i9 } from "./measurement-C5JGCuUP.js";
|
|
34
|
+
import { d as addHolesInFace, e as makeBezierCurve, f as makeBSplineApproximation, g as makeCircle, h as makeCompound, i as makeCone, j as makeCylinder, k as makeEllipse, l as makeEllipseArc, n as makeEllipsoid, o as makeFace, p as makeNonPlanarFace, b as makeHelix, m as makeLine, q as makeOffset, r as makePolygon, w as weldShellsAndFaces, s as makeSolid, t as makeSphere, u as makeNewFaceWithinFace, v as makeTangentArc, x as makeThreePointArc, y as makeTorus, c as makeVertex, a as assembleWire } from "./shapeHelpers-BcoZf2N9.js";
|
|
35
|
+
import { f as fromBREP$1 } from "./cast-DQaUibmm.js";
|
|
36
|
+
import { e as e9, c as c9, d as d9, g as g13, i as i10, s as s5 } from "./cast-DQaUibmm.js";
|
|
37
37
|
import { BrepBugError, bug } from "./result.js";
|
|
38
38
|
import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
|
|
39
39
|
const errorFactories = {
|
|
@@ -49,26 +49,21 @@ const errorFactories = {
|
|
|
49
49
|
function kernelCall(fn, code, message, kind = "OCCT_OPERATION") {
|
|
50
50
|
try {
|
|
51
51
|
return ok(castShape(fn()));
|
|
52
|
-
} catch (
|
|
53
|
-
const rawMessage =
|
|
52
|
+
} catch (e10) {
|
|
53
|
+
const rawMessage = e10 instanceof Error ? e10.message : String(e10);
|
|
54
54
|
const translatedMessage = kind === "OCCT_OPERATION" ? translateOcctError(rawMessage) : rawMessage;
|
|
55
|
-
return err(errorFactories[kind](code, `${message}: ${translatedMessage}`,
|
|
55
|
+
return err(errorFactories[kind](code, `${message}: ${translatedMessage}`, e10));
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function kernelCallRaw(fn, code, message, kind = "OCCT_OPERATION") {
|
|
59
59
|
try {
|
|
60
60
|
return ok(fn());
|
|
61
|
-
} catch (
|
|
62
|
-
const rawMessage =
|
|
61
|
+
} catch (e10) {
|
|
62
|
+
const rawMessage = e10 instanceof Error ? e10.message : String(e10);
|
|
63
63
|
const translatedMessage = kind === "OCCT_OPERATION" ? translateOcctError(rawMessage) : rawMessage;
|
|
64
|
-
return err(errorFactories[kind](code, `${message}: ${translatedMessage}`,
|
|
64
|
+
return err(errorFactories[kind](code, `${message}: ${translatedMessage}`, e10));
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function isPoint(p7) {
|
|
68
|
-
if (Array.isArray(p7)) return p7.length === 3 || p7.length === 2;
|
|
69
|
-
else if (p7 && typeof p7?.XYZ === "function") return true;
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
67
|
function isNumber(r8) {
|
|
73
68
|
return typeof r8 === "number";
|
|
74
69
|
}
|
|
@@ -139,9 +134,13 @@ function box(width, depth, height, options) {
|
|
|
139
134
|
const maker = r8(new oc.BRepPrimAPI_MakeBox_2(width, depth, height));
|
|
140
135
|
let solid2 = createSolid(maker.Solid());
|
|
141
136
|
gc();
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
solid2 =
|
|
137
|
+
const center = options?.at ?? (options?.centered ? [0, 0, 0] : void 0);
|
|
138
|
+
if (center) {
|
|
139
|
+
solid2 = translate$1(solid2, [
|
|
140
|
+
center[0] - width / 2,
|
|
141
|
+
center[1] - depth / 2,
|
|
142
|
+
center[2] - height / 2
|
|
143
|
+
]);
|
|
145
144
|
}
|
|
146
145
|
return solid2;
|
|
147
146
|
}
|
|
@@ -155,14 +154,14 @@ function cylinder(radius, height, options) {
|
|
|
155
154
|
-axis[1] * height * 0.5,
|
|
156
155
|
-axis[2] * height * 0.5
|
|
157
156
|
];
|
|
158
|
-
solid2 =
|
|
157
|
+
solid2 = translate$1(solid2, halfShift);
|
|
159
158
|
}
|
|
160
159
|
return solid2;
|
|
161
160
|
}
|
|
162
161
|
function sphere(radius, options) {
|
|
163
162
|
let solid2 = makeSphere(radius);
|
|
164
163
|
if (options?.at) {
|
|
165
|
-
solid2 =
|
|
164
|
+
solid2 = translate$1(solid2, options.at);
|
|
166
165
|
}
|
|
167
166
|
return solid2;
|
|
168
167
|
}
|
|
@@ -176,7 +175,7 @@ function cone(bottomRadius, topRadius, height, options) {
|
|
|
176
175
|
-axis[1] * height * 0.5,
|
|
177
176
|
-axis[2] * height * 0.5
|
|
178
177
|
];
|
|
179
|
-
solid2 =
|
|
178
|
+
solid2 = translate$1(solid2, halfShift);
|
|
180
179
|
}
|
|
181
180
|
return solid2;
|
|
182
181
|
}
|
|
@@ -186,7 +185,7 @@ function torus(majorRadius, minorRadius, options) {
|
|
|
186
185
|
function ellipsoid(rx, ry, rz, options) {
|
|
187
186
|
let solid2 = makeEllipsoid(rx, ry, rz);
|
|
188
187
|
if (options?.at) {
|
|
189
|
-
solid2 =
|
|
188
|
+
solid2 = translate$1(solid2, options.at);
|
|
190
189
|
}
|
|
191
190
|
return solid2;
|
|
192
191
|
}
|
|
@@ -194,11 +193,11 @@ function line(from, to) {
|
|
|
194
193
|
return makeLine(from, to);
|
|
195
194
|
}
|
|
196
195
|
function circle(radius, options) {
|
|
197
|
-
const axisDir = options?.axis ??
|
|
196
|
+
const axisDir = options?.axis ?? [0, 0, 1];
|
|
198
197
|
return makeCircle(radius, options?.at ?? [0, 0, 0], axisDir);
|
|
199
198
|
}
|
|
200
199
|
function ellipse(majorRadius, minorRadius, options) {
|
|
201
|
-
const axisDir = options?.axis ??
|
|
200
|
+
const axisDir = options?.axis ?? [0, 0, 1];
|
|
202
201
|
return makeEllipse(majorRadius, minorRadius, options?.at ?? [0, 0, 0], axisDir, options?.xDir);
|
|
203
202
|
}
|
|
204
203
|
function helix(pitch, height, radius, options) {
|
|
@@ -215,7 +214,7 @@ function threePointArc(p1, p22, p32) {
|
|
|
215
214
|
return makeThreePointArc(p1, p22, p32);
|
|
216
215
|
}
|
|
217
216
|
function ellipseArc(majorRadius, minorRadius, startAngle, endAngle, options) {
|
|
218
|
-
const axisDir = options?.axis ??
|
|
217
|
+
const axisDir = options?.axis ?? [0, 0, 1];
|
|
219
218
|
return makeEllipseArc(
|
|
220
219
|
majorRadius,
|
|
221
220
|
minorRadius,
|
|
@@ -259,14 +258,14 @@ function compound(shapeArray) {
|
|
|
259
258
|
function solid(facesOrShells) {
|
|
260
259
|
return makeSolid(facesOrShells);
|
|
261
260
|
}
|
|
262
|
-
function offsetFace(
|
|
263
|
-
return makeOffset(
|
|
261
|
+
function offsetFace(f10, distance, tolerance) {
|
|
262
|
+
return makeOffset(f10, distance, tolerance);
|
|
264
263
|
}
|
|
265
264
|
function sewShells(facesOrShells, ignoreType) {
|
|
266
265
|
return weldShellsAndFaces(facesOrShells, ignoreType);
|
|
267
266
|
}
|
|
268
|
-
function addHoles(
|
|
269
|
-
return addHolesInFace(
|
|
267
|
+
function addHoles(f10, holes) {
|
|
268
|
+
return addHolesInFace(f10, holes);
|
|
270
269
|
}
|
|
271
270
|
function validateNotNull(shape2, label) {
|
|
272
271
|
if (shape2.wrapped.IsNull()) {
|
|
@@ -274,8 +273,8 @@ function validateNotNull(shape2, label) {
|
|
|
274
273
|
}
|
|
275
274
|
return ok(void 0);
|
|
276
275
|
}
|
|
277
|
-
function
|
|
278
|
-
const check = validateNotNull(shape2, "
|
|
276
|
+
function thicken$1(shape2, thickness) {
|
|
277
|
+
const check = validateNotNull(shape2, "thicken: shape");
|
|
279
278
|
if (isErr(check)) return check;
|
|
280
279
|
return kernelCall(
|
|
281
280
|
() => getKernel().thicken(shape2.wrapped, thickness),
|
|
@@ -283,8 +282,8 @@ function thickenSurface(shape2, thickness) {
|
|
|
283
282
|
"Thicken operation failed"
|
|
284
283
|
);
|
|
285
284
|
}
|
|
286
|
-
function
|
|
287
|
-
const check = validateNotNull(shape2, "
|
|
285
|
+
function fillet$1(shape2, edges, radius) {
|
|
286
|
+
const check = validateNotNull(shape2, "fillet: shape");
|
|
288
287
|
if (isErr(check)) return check;
|
|
289
288
|
if (typeof radius === "number" && radius <= 0) {
|
|
290
289
|
return err(
|
|
@@ -331,7 +330,7 @@ function filletShape(shape2, edges, radius) {
|
|
|
331
330
|
) : radius;
|
|
332
331
|
const result = kernel.fillet(
|
|
333
332
|
shape2.wrapped,
|
|
334
|
-
selectedEdges.map((
|
|
333
|
+
selectedEdges.map((e10) => e10.wrapped),
|
|
335
334
|
kernelRadius
|
|
336
335
|
);
|
|
337
336
|
const cast = castShape(result);
|
|
@@ -339,19 +338,19 @@ function filletShape(shape2, edges, radius) {
|
|
|
339
338
|
return err(occtError("FILLET_RESULT_NOT_3D", "Fillet result is not a 3D shape"));
|
|
340
339
|
}
|
|
341
340
|
return ok(cast);
|
|
342
|
-
} catch (
|
|
343
|
-
const raw =
|
|
341
|
+
} catch (e10) {
|
|
342
|
+
const raw = e10 instanceof Error ? e10.message : String(e10);
|
|
344
343
|
return err(
|
|
345
|
-
occtError("FILLET_FAILED", `Fillet operation failed: ${raw}`,
|
|
346
|
-
operation: "
|
|
344
|
+
occtError("FILLET_FAILED", `Fillet operation failed: ${raw}`, e10, {
|
|
345
|
+
operation: "fillet",
|
|
347
346
|
edgeCount: selectedEdges.length,
|
|
348
347
|
radius
|
|
349
348
|
})
|
|
350
349
|
);
|
|
351
350
|
}
|
|
352
351
|
}
|
|
353
|
-
function
|
|
354
|
-
const check = validateNotNull(shape2, "
|
|
352
|
+
function chamfer$1(shape2, edges, distance) {
|
|
353
|
+
const check = validateNotNull(shape2, "chamfer: shape");
|
|
355
354
|
if (isErr(check)) return check;
|
|
356
355
|
if (typeof distance === "number" && distance <= 0) {
|
|
357
356
|
return err(
|
|
@@ -390,7 +389,7 @@ function chamferShape(shape2, edges, distance) {
|
|
|
390
389
|
) : distance;
|
|
391
390
|
const result = kernel.chamfer(
|
|
392
391
|
shape2.wrapped,
|
|
393
|
-
selectedEdges.map((
|
|
392
|
+
selectedEdges.map((e10) => e10.wrapped),
|
|
394
393
|
kernelDistance
|
|
395
394
|
);
|
|
396
395
|
const cast = castShape(result);
|
|
@@ -398,19 +397,19 @@ function chamferShape(shape2, edges, distance) {
|
|
|
398
397
|
return err(occtError("CHAMFER_RESULT_NOT_3D", "Chamfer result is not a 3D shape"));
|
|
399
398
|
}
|
|
400
399
|
return ok(cast);
|
|
401
|
-
} catch (
|
|
402
|
-
const raw =
|
|
400
|
+
} catch (e10) {
|
|
401
|
+
const raw = e10 instanceof Error ? e10.message : String(e10);
|
|
403
402
|
return err(
|
|
404
|
-
occtError("CHAMFER_FAILED", `Chamfer operation failed: ${raw}`,
|
|
405
|
-
operation: "
|
|
403
|
+
occtError("CHAMFER_FAILED", `Chamfer operation failed: ${raw}`, e10, {
|
|
404
|
+
operation: "chamfer",
|
|
406
405
|
edgeCount: selectedEdges.length,
|
|
407
406
|
distance
|
|
408
407
|
})
|
|
409
408
|
);
|
|
410
409
|
}
|
|
411
410
|
}
|
|
412
|
-
function
|
|
413
|
-
const check = validateNotNull(shape2, "
|
|
411
|
+
function shell$1(shape2, faces, thickness, tolerance = 1e-3) {
|
|
412
|
+
const check = validateNotNull(shape2, "shell: shape");
|
|
414
413
|
if (isErr(check)) return check;
|
|
415
414
|
if (thickness <= 0) {
|
|
416
415
|
return err(validationError("INVALID_THICKNESS", "Shell thickness must be positive"));
|
|
@@ -421,7 +420,7 @@ function shellShape(shape2, faces, thickness, tolerance = 1e-3) {
|
|
|
421
420
|
try {
|
|
422
421
|
const result = getKernel().shell(
|
|
423
422
|
shape2.wrapped,
|
|
424
|
-
faces.map((
|
|
423
|
+
faces.map((f10) => f10.wrapped),
|
|
425
424
|
thickness,
|
|
426
425
|
tolerance
|
|
427
426
|
);
|
|
@@ -430,19 +429,19 @@ function shellShape(shape2, faces, thickness, tolerance = 1e-3) {
|
|
|
430
429
|
return err(occtError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
431
430
|
}
|
|
432
431
|
return ok(cast);
|
|
433
|
-
} catch (
|
|
434
|
-
const raw =
|
|
432
|
+
} catch (e10) {
|
|
433
|
+
const raw = e10 instanceof Error ? e10.message : String(e10);
|
|
435
434
|
return err(
|
|
436
|
-
occtError("SHELL_FAILED", `Shell operation failed: ${raw}`,
|
|
437
|
-
operation: "
|
|
435
|
+
occtError("SHELL_FAILED", `Shell operation failed: ${raw}`, e10, {
|
|
436
|
+
operation: "shell",
|
|
438
437
|
faceCount: faces.length,
|
|
439
438
|
thickness
|
|
440
439
|
})
|
|
441
440
|
);
|
|
442
441
|
}
|
|
443
442
|
}
|
|
444
|
-
function
|
|
445
|
-
const check = validateNotNull(shape2, "
|
|
443
|
+
function offset$1(shape2, distance, tolerance = 1e-6) {
|
|
444
|
+
const check = validateNotNull(shape2, "offset: shape");
|
|
446
445
|
if (isErr(check)) return check;
|
|
447
446
|
if (distance === 0) {
|
|
448
447
|
return err(validationError("ZERO_OFFSET", "Offset distance cannot be zero"));
|
|
@@ -454,39 +453,39 @@ function offsetShape(shape2, distance, tolerance = 1e-6) {
|
|
|
454
453
|
);
|
|
455
454
|
}
|
|
456
455
|
function translate(shape2, v9) {
|
|
457
|
-
return
|
|
456
|
+
return translate$1(resolve(shape2), v9);
|
|
458
457
|
}
|
|
459
458
|
function rotate(shape2, angle, options) {
|
|
460
|
-
const pivotPoint = options?.at
|
|
461
|
-
return
|
|
459
|
+
const pivotPoint = options?.at;
|
|
460
|
+
return rotate$1(resolve(shape2), angle, pivotPoint, options?.axis);
|
|
462
461
|
}
|
|
463
462
|
function mirror(shape2, options) {
|
|
464
|
-
const planeOrigin = options?.at
|
|
465
|
-
return
|
|
463
|
+
const planeOrigin = options?.at;
|
|
464
|
+
return mirror$1(resolve(shape2), options?.normal ?? [1, 0, 0], planeOrigin);
|
|
466
465
|
}
|
|
467
466
|
function scale(shape2, factor, options) {
|
|
468
|
-
return
|
|
467
|
+
return scale$1(resolve(shape2), factor, options?.center);
|
|
469
468
|
}
|
|
470
469
|
function clone(shape2) {
|
|
471
|
-
return
|
|
470
|
+
return clone$1(resolve(shape2));
|
|
472
471
|
}
|
|
473
472
|
function fuse(a11, b13, options) {
|
|
474
|
-
return
|
|
473
|
+
return fuse$1(resolve(a11), resolve(b13), options);
|
|
475
474
|
}
|
|
476
475
|
function cut(base, tool, options) {
|
|
477
|
-
return
|
|
476
|
+
return cut$1(resolve(base), resolve(tool), options);
|
|
478
477
|
}
|
|
479
478
|
function intersect(a11, b13, options) {
|
|
480
|
-
return
|
|
479
|
+
return intersect$1(resolve(a11), resolve(b13), options);
|
|
481
480
|
}
|
|
482
481
|
function section(shape2, plane, options) {
|
|
483
|
-
return
|
|
482
|
+
return section$1(resolve(shape2), plane, options);
|
|
484
483
|
}
|
|
485
484
|
function split(shape2, tools) {
|
|
486
|
-
return
|
|
485
|
+
return split$1(resolve(shape2), tools);
|
|
487
486
|
}
|
|
488
487
|
function slice(shape2, planes, options) {
|
|
489
|
-
return
|
|
488
|
+
return slice$1(resolve(shape2), planes, options);
|
|
490
489
|
}
|
|
491
490
|
function resolveEdges(edgesOrFn, shape2) {
|
|
492
491
|
if (edgesOrFn === void 0) return void 0;
|
|
@@ -536,7 +535,7 @@ function fillet(shape2, edgesOrRadius, maybeRadius) {
|
|
|
536
535
|
edges = void 0;
|
|
537
536
|
radius = edgesOrRadius;
|
|
538
537
|
}
|
|
539
|
-
return
|
|
538
|
+
return fillet$1(s6, edges, normalizeFilletRadius(radius));
|
|
540
539
|
}
|
|
541
540
|
function chamfer(shape2, edgesOrDistance, maybeDistance) {
|
|
542
541
|
const s6 = resolve(shape2);
|
|
@@ -552,54 +551,54 @@ function chamfer(shape2, edgesOrDistance, maybeDistance) {
|
|
|
552
551
|
const normalized = normalizeChamferDistance(distance);
|
|
553
552
|
if (normalized.mode === "distAngle") {
|
|
554
553
|
const selectedEdges = edges ?? getEdges(s6);
|
|
555
|
-
return
|
|
554
|
+
return chamferDistAngle(
|
|
556
555
|
s6,
|
|
557
556
|
[...selectedEdges],
|
|
558
557
|
normalized.distance,
|
|
559
558
|
normalized.angle
|
|
560
559
|
);
|
|
561
560
|
}
|
|
562
|
-
return
|
|
561
|
+
return chamfer$1(s6, edges, normalized.distance);
|
|
563
562
|
}
|
|
564
563
|
function shell(shape2, faces, thickness, options) {
|
|
565
564
|
const s6 = resolve(shape2);
|
|
566
565
|
const resolvedFaces = resolveFaces(faces, s6);
|
|
567
|
-
return
|
|
566
|
+
return shell$1(s6, resolvedFaces, thickness, options?.tolerance);
|
|
568
567
|
}
|
|
569
568
|
function offset(shape2, distance, options) {
|
|
570
|
-
return
|
|
569
|
+
return offset$1(resolve(shape2), distance, options?.tolerance);
|
|
571
570
|
}
|
|
572
571
|
function thicken(shape2, thickness) {
|
|
573
|
-
return
|
|
572
|
+
return thicken$1(resolve(shape2), thickness);
|
|
574
573
|
}
|
|
575
574
|
function heal(shape2) {
|
|
576
|
-
return
|
|
575
|
+
return heal$1(resolve(shape2));
|
|
577
576
|
}
|
|
578
577
|
function simplify(shape2) {
|
|
579
|
-
return
|
|
578
|
+
return simplify$1(resolve(shape2));
|
|
580
579
|
}
|
|
581
580
|
function mesh(shape2, options) {
|
|
582
|
-
return
|
|
581
|
+
return mesh$1(resolve(shape2), options);
|
|
583
582
|
}
|
|
584
583
|
function meshEdges(shape2, options) {
|
|
585
|
-
return
|
|
584
|
+
return meshEdges$1(resolve(shape2), options);
|
|
586
585
|
}
|
|
587
586
|
function describe(shape2) {
|
|
588
|
-
return
|
|
587
|
+
return describe$1(resolve(shape2));
|
|
589
588
|
}
|
|
590
589
|
function toBREP(shape2) {
|
|
591
|
-
return
|
|
590
|
+
return toBREP$1(resolve(shape2));
|
|
592
591
|
}
|
|
593
592
|
function fromBREP(data) {
|
|
594
|
-
return
|
|
593
|
+
return fromBREP$1(data);
|
|
595
594
|
}
|
|
596
595
|
function isValid(shape2) {
|
|
597
|
-
return
|
|
596
|
+
return isValid$1(resolve(shape2));
|
|
598
597
|
}
|
|
599
598
|
function isEmpty(shape2) {
|
|
600
|
-
return
|
|
599
|
+
return isEmpty$1(resolve(shape2));
|
|
601
600
|
}
|
|
602
|
-
function
|
|
601
|
+
function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) {
|
|
603
602
|
if (wires.length === 0 && !startPoint && !endPoint) {
|
|
604
603
|
return err(validationError("LOFT_EMPTY", "Loft requires at least one wire or start/end point"));
|
|
605
604
|
}
|
|
@@ -631,17 +630,22 @@ function loftWires(wires, { ruled = true, startPoint, endPoint } = {}, returnShe
|
|
|
631
630
|
return ok(result);
|
|
632
631
|
}
|
|
633
632
|
function extrude(face2, height) {
|
|
634
|
-
const
|
|
633
|
+
const f10 = resolve(face2);
|
|
635
634
|
const vec = typeof height === "number" ? [0, 0, height] : height;
|
|
636
|
-
return
|
|
635
|
+
return extrude$1(f10, vec);
|
|
637
636
|
}
|
|
638
637
|
function revolve(face2, options) {
|
|
639
|
-
const pivotPoint = options?.at ??
|
|
640
|
-
return
|
|
638
|
+
const pivotPoint = options?.at ?? [0, 0, 0];
|
|
639
|
+
return revolve$1(
|
|
640
|
+
resolve(face2),
|
|
641
|
+
pivotPoint,
|
|
642
|
+
options?.axis ?? [0, 0, 1],
|
|
643
|
+
options?.angle ?? 360
|
|
644
|
+
);
|
|
641
645
|
}
|
|
642
646
|
function loft(wires, options) {
|
|
643
647
|
const resolvedWires = wires.map((w8) => resolve(w8));
|
|
644
|
-
return
|
|
648
|
+
return loft$1(resolvedWires, options);
|
|
645
649
|
}
|
|
646
650
|
function resolveTargetFace(shape2, faceSpec) {
|
|
647
651
|
if (faceSpec === void 0) {
|
|
@@ -652,10 +656,10 @@ function resolveTargetFace(shape2, faceSpec) {
|
|
|
652
656
|
let best = faces[0];
|
|
653
657
|
let bestZ = faceCenter(best)[2];
|
|
654
658
|
for (let i11 = 1; i11 < faces.length; i11++) {
|
|
655
|
-
const
|
|
656
|
-
const z4 = faceCenter(
|
|
659
|
+
const f10 = faces[i11];
|
|
660
|
+
const z4 = faceCenter(f10)[2];
|
|
657
661
|
if (z4 > bestZ) {
|
|
658
|
-
best =
|
|
662
|
+
best = f10;
|
|
659
663
|
bestZ = z4;
|
|
660
664
|
}
|
|
661
665
|
}
|
|
@@ -699,8 +703,8 @@ function drill(shape2, options) {
|
|
|
699
703
|
}
|
|
700
704
|
const cyl = makeCylinder(radius, depth, pos, dir);
|
|
701
705
|
const startOffset = options.depth === void 0 ? vecScale(dir, -depth / 2) : [0, 0, 0];
|
|
702
|
-
const tool = startOffset[0] !== 0 || startOffset[1] !== 0 || startOffset[2] !== 0 ?
|
|
703
|
-
return
|
|
706
|
+
const tool = startOffset[0] !== 0 || startOffset[1] !== 0 || startOffset[2] !== 0 ? translate$1(cyl, startOffset) : cyl;
|
|
707
|
+
return cut$1(s6, tool);
|
|
704
708
|
}
|
|
705
709
|
function pocket(shape2, options) {
|
|
706
710
|
const s6 = resolve(shape2);
|
|
@@ -714,9 +718,9 @@ function pocket(shape2, options) {
|
|
|
714
718
|
const faceResult = makeFace(w8);
|
|
715
719
|
if (isErr(faceResult)) return faceResult;
|
|
716
720
|
const extDir = vecScale(vecNormalize(normal), -depth);
|
|
717
|
-
const toolResult =
|
|
721
|
+
const toolResult = extrude$1(faceResult.value, extDir);
|
|
718
722
|
if (isErr(toolResult)) return toolResult;
|
|
719
|
-
return
|
|
723
|
+
return cut$1(s6, toolResult.value);
|
|
720
724
|
}
|
|
721
725
|
function boss(shape2, options) {
|
|
722
726
|
const s6 = resolve(shape2);
|
|
@@ -730,16 +734,16 @@ function boss(shape2, options) {
|
|
|
730
734
|
const faceResult = makeFace(w8);
|
|
731
735
|
if (isErr(faceResult)) return faceResult;
|
|
732
736
|
const extDir = vecScale(vecNormalize(normal), height);
|
|
733
|
-
const toolResult =
|
|
737
|
+
const toolResult = extrude$1(faceResult.value, extDir);
|
|
734
738
|
if (isErr(toolResult)) return toolResult;
|
|
735
|
-
return
|
|
739
|
+
return fuse$1(s6, toolResult.value);
|
|
736
740
|
}
|
|
737
741
|
function mirrorJoin(shape2, options) {
|
|
738
742
|
const s6 = resolve(shape2);
|
|
739
743
|
const normal = options?.normal ?? [1, 0, 0];
|
|
740
|
-
const planeOrigin = options?.at
|
|
741
|
-
const mirrored =
|
|
742
|
-
return
|
|
744
|
+
const planeOrigin = options?.at;
|
|
745
|
+
const mirrored = mirror$1(s6, normal, planeOrigin);
|
|
746
|
+
return fuse$1(s6, mirrored);
|
|
743
747
|
}
|
|
744
748
|
function rectangularPattern(shape2, options) {
|
|
745
749
|
const s6 = resolve(shape2);
|
|
@@ -765,8 +769,8 @@ function rectangularPattern(shape2, options) {
|
|
|
765
769
|
xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
|
|
766
770
|
xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
|
|
767
771
|
];
|
|
768
|
-
const copy =
|
|
769
|
-
const fuseResult =
|
|
772
|
+
const copy = translate$1(s6, offset2);
|
|
773
|
+
const fuseResult = fuse$1(result, copy);
|
|
770
774
|
if (isErr(fuseResult)) return fuseResult;
|
|
771
775
|
result = fuseResult.value;
|
|
772
776
|
}
|
|
@@ -968,16 +972,12 @@ export {
|
|
|
968
972
|
a as andThen,
|
|
969
973
|
e7 as applyGlue,
|
|
970
974
|
g4 as approximateCurve,
|
|
971
|
-
|
|
975
|
+
e9 as asTopo,
|
|
972
976
|
b10 as autoHeal,
|
|
973
977
|
b5 as axis2d,
|
|
974
978
|
b6 as basicFaceExtrusion,
|
|
975
979
|
bezier,
|
|
976
|
-
blueprintBoundingBox,
|
|
977
|
-
blueprintIsInside,
|
|
978
|
-
blueprintOrientation,
|
|
979
980
|
blueprintToDXF,
|
|
980
|
-
blueprintToSVGPathD,
|
|
981
981
|
boss,
|
|
982
982
|
box,
|
|
983
983
|
bsplineApprox,
|
|
@@ -987,7 +987,7 @@ export {
|
|
|
987
987
|
c9 as cast,
|
|
988
988
|
castShape,
|
|
989
989
|
chamfer,
|
|
990
|
-
chamferDistAngleShape,
|
|
990
|
+
chamferDistAngle as chamferDistAngleShape,
|
|
991
991
|
checkAllInterferences,
|
|
992
992
|
checkInterference,
|
|
993
993
|
circle,
|
|
@@ -1049,13 +1049,12 @@ export {
|
|
|
1049
1049
|
cut,
|
|
1050
1050
|
c3 as cut2D,
|
|
1051
1051
|
cutAll,
|
|
1052
|
-
cutBlueprint2D,
|
|
1053
1052
|
d3 as cutBlueprints,
|
|
1054
1053
|
cylinder,
|
|
1055
1054
|
dequeueTask,
|
|
1056
1055
|
describe,
|
|
1057
1056
|
g9 as deserializeDrawing,
|
|
1058
|
-
deserializeShape,
|
|
1057
|
+
fromBREP$1 as deserializeShape,
|
|
1059
1058
|
d9 as downcast,
|
|
1060
1059
|
h6 as draw,
|
|
1061
1060
|
i8 as drawCircle,
|
|
@@ -1115,7 +1114,6 @@ export {
|
|
|
1115
1114
|
fuse,
|
|
1116
1115
|
f5 as fuse2D,
|
|
1117
1116
|
g11 as fuseAll,
|
|
1118
|
-
fuseBlueprint2D,
|
|
1119
1117
|
e2 as fuseBlueprints,
|
|
1120
1118
|
x as gcWithObject,
|
|
1121
1119
|
gcWithScope,
|
|
@@ -1151,7 +1149,6 @@ export {
|
|
|
1151
1149
|
n2 as interpolateCurve,
|
|
1152
1150
|
intersect,
|
|
1153
1151
|
i7 as intersect2D,
|
|
1154
|
-
intersectBlueprint2D,
|
|
1155
1152
|
g7 as intersectBlueprints,
|
|
1156
1153
|
i2 as ioError,
|
|
1157
1154
|
isChamferRadius,
|
|
@@ -1170,7 +1167,6 @@ export {
|
|
|
1170
1167
|
isNumber,
|
|
1171
1168
|
g as isOk,
|
|
1172
1169
|
isOperationRequest,
|
|
1173
|
-
isPoint,
|
|
1174
1170
|
$ as isProjectionPlane,
|
|
1175
1171
|
isQueueEmpty,
|
|
1176
1172
|
n5 as isSameShape,
|
|
@@ -1213,7 +1209,6 @@ export {
|
|
|
1213
1209
|
meshEdges,
|
|
1214
1210
|
mirror,
|
|
1215
1211
|
mirror2D,
|
|
1216
|
-
mirrorBlueprint,
|
|
1217
1212
|
B4 as mirrorDrawing,
|
|
1218
1213
|
mirrorJoin,
|
|
1219
1214
|
q3 as modifyStep,
|
|
@@ -1254,12 +1249,10 @@ export {
|
|
|
1254
1249
|
revolve,
|
|
1255
1250
|
rotate,
|
|
1256
1251
|
rotate2D,
|
|
1257
|
-
rotateBlueprint,
|
|
1258
1252
|
F2 as rotateDrawing,
|
|
1259
1253
|
r5 as roundedRectangleBlueprint,
|
|
1260
1254
|
scale,
|
|
1261
1255
|
scale2D,
|
|
1262
|
-
scaleBlueprint,
|
|
1263
1256
|
G as scaleDrawing,
|
|
1264
1257
|
section,
|
|
1265
1258
|
sewShells,
|
|
@@ -1270,8 +1263,6 @@ export {
|
|
|
1270
1263
|
simplify,
|
|
1271
1264
|
sketch2DOnFace,
|
|
1272
1265
|
sketch2DOnPlane,
|
|
1273
|
-
sketchBlueprintOnFace,
|
|
1274
|
-
sketchBlueprintOnPlane,
|
|
1275
1266
|
H2 as sketchCircle,
|
|
1276
1267
|
I as sketchEllipse,
|
|
1277
1268
|
J as sketchExtrude,
|
|
@@ -1295,7 +1286,6 @@ export {
|
|
|
1295
1286
|
y as stepCount,
|
|
1296
1287
|
z2 as stepsFrom,
|
|
1297
1288
|
stretch2D,
|
|
1298
|
-
stretchBlueprint,
|
|
1299
1289
|
subFace,
|
|
1300
1290
|
A as supportExtrude,
|
|
1301
1291
|
sweep,
|
|
@@ -1314,7 +1304,6 @@ export {
|
|
|
1314
1304
|
torus,
|
|
1315
1305
|
translate,
|
|
1316
1306
|
translate2D,
|
|
1317
|
-
translateBlueprint,
|
|
1318
1307
|
W as translateDrawing,
|
|
1319
1308
|
t6 as translatePlane,
|
|
1320
1309
|
t2 as tryCatch,
|
|
@@ -86,7 +86,7 @@ function isCompSolid(shape) {
|
|
|
86
86
|
const oc = getKernel().oc;
|
|
87
87
|
return st === oc.TopAbs_ShapeEnum.TopAbs_COMPSOLID;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function fromBREP(data) {
|
|
90
90
|
const oc = getKernel().oc;
|
|
91
91
|
return cast(oc.BRepToolsWrapper.Read(data));
|
|
92
92
|
}
|
|
@@ -95,8 +95,8 @@ export {
|
|
|
95
95
|
isWire as b,
|
|
96
96
|
cast as c,
|
|
97
97
|
downcast as d,
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
asTopo as e,
|
|
99
|
+
fromBREP as f,
|
|
100
100
|
isCompSolid as g,
|
|
101
101
|
iterTopo as i,
|
|
102
102
|
shapeType as s
|