brepjs 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d/blueprints/booleanHelpers.d.ts +32 -0
- package/dist/2d/blueprints/booleanHelpers.d.ts.map +1 -0
- package/dist/2d/blueprints/booleanOperations.d.ts +5 -3
- package/dist/2d/blueprints/booleanOperations.d.ts.map +1 -1
- package/dist/2d/blueprints/intersectionSegments.d.ts +12 -0
- package/dist/2d/blueprints/intersectionSegments.d.ts.map +1 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts +31 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts.map +1 -0
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +8 -8
- package/dist/{Blueprint-D3JfGJTz.js → Blueprint-B9fhnpFp.js} +117 -30
- package/dist/{Blueprint-CVctc41Z.cjs → Blueprint-VGbo3izk.cjs} +111 -24
- package/dist/{boolean2D-BdZATaHs.cjs → boolean2D-B1XrGVgx.cjs} +426 -345
- package/dist/{boolean2D-hOw5Qay5.js → boolean2D-_WiqPxWZ.js} +391 -310
- package/dist/{booleanFns-BBSVKhL2.cjs → booleanFns-BxW-N3rP.cjs} +12 -16
- package/dist/{booleanFns-CqehfzcK.js → booleanFns-CkccZ7UL.js} +14 -18
- package/dist/brepjs.cjs +133 -62
- package/dist/brepjs.js +290 -217
- package/dist/{cast-DQaUibmm.js → cast-C4Ff_1Qe.js} +2 -2
- package/dist/{cast-DkB0GKmQ.cjs → cast-DIiyxDLo.cjs} +2 -2
- package/dist/core/disposal.d.ts +1 -1
- package/dist/core/disposal.d.ts.map +1 -1
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/cornerFinder-BndBNtJE.cjs +58 -0
- package/dist/cornerFinder-DzGzfiqb.js +59 -0
- package/dist/curveBuilders-BUoFO1UG.cjs +196 -0
- package/dist/curveBuilders-CBlIWlbU.js +197 -0
- package/dist/{curveFns-BilyYL_s.cjs → curveFns-BrJDkaWi.cjs} +31 -44
- package/dist/{curveFns-CdVE4da7.js → curveFns-BshHA9Ys.js} +31 -44
- package/dist/{drawFns-921SkhDL.js → drawFns-Btmlh_Oz.js} +13 -14
- package/dist/{drawFns-CUyx50gi.cjs → drawFns-D2eDcf4k.cjs} +58 -59
- package/dist/{faceFns-DHu-2JpA.js → faceFns-DDzCECn3.js} +3 -3
- package/dist/{faceFns-BwK7FP7N.cjs → faceFns-NDRFeekj.cjs} +3 -3
- package/dist/helpers-Ck8GJ58k.cjs +203 -0
- package/dist/helpers-jku2V1DY.js +204 -0
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/occtAdapter.d.ts +1 -0
- package/dist/kernel/occtAdapter.d.ts.map +1 -1
- package/dist/kernel/sweepOps.d.ts +8 -0
- package/dist/kernel/sweepOps.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +1 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/loft-Bk9EM0gZ.js +373 -0
- package/dist/loft-DJXwxV_L.cjs +372 -0
- package/dist/{measurement-C5JGCuUP.js → measurement-DlXaTzKc.js} +3 -3
- package/dist/{measurement-fxm_pW7x.cjs → measurement-LcGh4wV0.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-AqAjTTVl.js → meshFns-Djzdn-CS.js} +1 -1
- package/dist/{meshFns-BhrZGi6w.cjs → meshFns-c8lDKfYy.cjs} +1 -1
- package/dist/{occtBoundary-du8_ex-p.cjs → occtBoundary-6kQSl3cF.cjs} +21 -0
- package/dist/{occtBoundary-CwegMzqc.js → occtBoundary-CqXvDhZY.js} +26 -5
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/extrudeUtils.d.ts +17 -0
- package/dist/operations/extrudeUtils.d.ts.map +1 -1
- package/dist/{operations-C1rWoba2.js → operations-CrQlFDHc.js} +30 -7
- package/dist/{operations-BP1wVDw0.cjs → operations-Do-WZGXc.cjs} +30 -7
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +4 -4
- package/dist/query/cornerFinder.d.ts +48 -0
- package/dist/query/cornerFinder.d.ts.map +1 -0
- package/dist/query/directionUtils.d.ts +6 -0
- package/dist/query/directionUtils.d.ts.map +1 -0
- package/dist/query/edgeFinder.d.ts +15 -0
- package/dist/query/edgeFinder.d.ts.map +1 -0
- package/dist/query/faceFinder.d.ts +15 -0
- package/dist/query/faceFinder.d.ts.map +1 -0
- package/dist/query/finderCore.d.ts +35 -0
- package/dist/query/finderCore.d.ts.map +1 -0
- package/dist/query/finderFns.d.ts +21 -106
- package/dist/query/finderFns.d.ts.map +1 -1
- package/dist/query/shapeDistanceFilter.d.ts +11 -0
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -0
- package/dist/query/vertexFinder.d.ts +16 -0
- package/dist/query/vertexFinder.d.ts.map +1 -0
- package/dist/query/wireFinder.d.ts +10 -0
- package/dist/query/wireFinder.d.ts.map +1 -0
- package/dist/query.cjs +42 -5
- package/dist/query.js +40 -2
- package/dist/{shapeFns-BrF97sKt.js → shapeFns-DQtpzndX.js} +17 -18
- package/dist/{shapeFns-BvOndshS.cjs → shapeFns-cN4qGpbO.cjs} +6 -7
- package/dist/{shapeTypes-DKhwEnUM.cjs → shapeTypes-BJ3Hmskg.cjs} +24 -20
- package/dist/{shapeTypes-BlSElW8z.js → shapeTypes-C9sUsmEW.js} +32 -28
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching/Sketcher2d.d.ts +12 -4
- package/dist/sketching/Sketcher2d.d.ts.map +1 -1
- package/dist/sketching/ellipseUtils.d.ts +29 -0
- package/dist/sketching/ellipseUtils.d.ts.map +1 -0
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/curveBuilders.d.ts +75 -0
- package/dist/topology/curveBuilders.d.ts.map +1 -0
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeHelpers.d.ts +6 -173
- package/dist/topology/shapeHelpers.d.ts.map +1 -1
- package/dist/topology/shapeUtils.d.ts +13 -0
- package/dist/topology/shapeUtils.d.ts.map +1 -0
- package/dist/topology/solidBuilders.d.ts +70 -0
- package/dist/topology/solidBuilders.d.ts.map +1 -0
- package/dist/topology/surfaceBuilders.d.ts +35 -0
- package/dist/topology/surfaceBuilders.d.ts.map +1 -0
- package/dist/topology/wrapperFns.d.ts +1 -0
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-tFzqSrGH.js → topology-CtfUZwLR.js} +8 -8
- package/dist/{topology-CIooytHH.cjs → topology-DXq8dLsi.cjs} +8 -8
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +31 -31
- package/dist/{vectors-CBuaMeZv.js → vectors-BVgXsYWl.js} +1 -1
- package/dist/{vectors-ChWEZPwy.cjs → vectors-DK2hEKcI.cjs} +1 -1
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +1 -1
- package/dist/loft-BzWFokmC.cjs +0 -178
- package/dist/loft-CtG5nMq5.js +0 -179
- package/dist/query-V6nV-VfL.js +0 -396
- package/dist/query-hMSmOWJP.cjs +0 -395
- package/dist/shapeHelpers-B2SXz1p4.cjs +0 -488
- package/dist/shapeHelpers-BcoZf2N9.js +0 -489
package/dist/brepjs.js
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
import { g as getKernel,
|
|
2
|
-
import { f, h, i, j, r,
|
|
3
|
-
import { l as ok, y as translateOcctError, e as err, u as unwrap, x as validationError, B as BrepErrorCode, d as isErr, o as occtError, p as typeCastError } from "./errors-wGhcJMpB.js";
|
|
4
|
-
import { O, a, c
|
|
5
|
-
import { c as castShape,
|
|
6
|
-
import { D,
|
|
7
|
-
import { D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
8
|
-
import { H, R, v as v3, a as a3, b as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { g as getKernel, b as toOcPnt, a as toVec3 } from "./occtBoundary-CqXvDhZY.js";
|
|
2
|
+
import { f, h, i, j, r, c, t, w, k, l } from "./occtBoundary-CqXvDhZY.js";
|
|
3
|
+
import { l as ok, y as translateOcctError, e as err, q as queryError, u as unwrap, x as validationError, B as BrepErrorCode, d as isErr, o as occtError, p as typeCastError } from "./errors-wGhcJMpB.js";
|
|
4
|
+
import { O, a, c as c2, b, f as f2, i as i2, g, m, h as h2, j as j2, k as k2, z, s, t as t2, n, r as r2, v, w as w2 } from "./errors-wGhcJMpB.js";
|
|
5
|
+
import { c as castShape, s as createSolid, p as gcWithScope, h as isShape3D, e as isFace, d as isEdge, m as isWire } from "./shapeTypes-C9sUsmEW.js";
|
|
6
|
+
import { D, q, o, u, a as a2, b as b2, v as v2, r as r3, n as n2, x, g as g2, i as i3, f as f3, j as j3, k as k3, l as l2, t as t3, w as w3 } from "./shapeTypes-C9sUsmEW.js";
|
|
7
|
+
import { c as vecDistance, D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
8
|
+
import { H, R, v as v3, a as a3, b as b3, d, e, g as g3, h as h3, i as i4, k as k4, l as l3, m as m2, o as o2 } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
+
import { a as addHolesInFace, m as makeFace, b as makeNonPlanarFace, c as makePolygon, d as makeNewFaceWithinFace } from "./Blueprint-B9fhnpFp.js";
|
|
10
|
+
import { B, e as e2, C, f as f4, g as g4 } from "./Blueprint-B9fhnpFp.js";
|
|
11
|
+
import { c as curveIsClosed, a as curveTangentAt, b as curvePointAt, d as curveEndPoint, e as curveStartPoint, f as curveLength } from "./curveFns-BshHA9Ys.js";
|
|
12
|
+
import { g as g5, h as h4, i as i5, j as j4, k as k5, l as l4, m as m3, n as n3, o as o3 } from "./curveFns-BshHA9Ys.js";
|
|
13
|
+
import { m as makeCompound, a as makeCone, b as makeCylinder, c as makeEllipsoid, d as makeOffset, w as weldShellsAndFaces, e as makeSolid, f as makeSphere, g as makeTorus, h as makeVertex } from "./loft-Bk9EM0gZ.js";
|
|
14
|
+
import { i as i6, j as j5, r as r4 } from "./loft-Bk9EM0gZ.js";
|
|
15
|
+
import { e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-CrQlFDHc.js";
|
|
16
|
+
import { a as a4, b as b4, d as d2, f as f5, g as g6, h as h5, i as i7, j as j6, k as k6, m as m4, n as n4, o as o4, p, q as q2, 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-CrQlFDHc.js";
|
|
17
|
+
import { B as B3, a as a5, b as b5, C as C3, F, S, c as c3, d as d3, f as f6, e as e3, i as i8, g as g7, o as o5, p as p2, r as r5 } from "./boolean2D-_WiqPxWZ.js";
|
|
16
18
|
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 {
|
|
18
|
-
import {
|
|
19
|
+
import { c as createTypedFinder, f as faceFinder } from "./helpers-jku2V1DY.js";
|
|
20
|
+
import { g as g8 } from "./helpers-jku2V1DY.js";
|
|
19
21
|
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
|
|
21
|
-
import { c as
|
|
22
|
-
import { t as translate$1,
|
|
23
|
-
import {
|
|
24
|
-
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-
|
|
25
|
-
import { a as
|
|
26
|
-
import { n as normalAt, f as faceCenter, i as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-
|
|
27
|
-
import { c as
|
|
28
|
-
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-
|
|
29
|
-
import { c as
|
|
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-
|
|
31
|
-
import {
|
|
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
|
|
34
|
-
import {
|
|
35
|
-
import { f as fromBREP$1 } from "./cast-
|
|
36
|
-
import { e as e9, c as
|
|
22
|
+
import { C as C4, D as D3, a as a6, S as S2, b as b6, X, Y, c as c4, d as d4, e as e4, f as f7, Z, g as g9, h as h6, i as i9, j as j7, k as k7, l as l5, m as m5, n as n5, o as o6, p as p3, q as q3, r as r6, s as s2, t as t5, u as u3, v as v5, w as w5, 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-Btmlh_Oz.js";
|
|
23
|
+
import { c as c5, a as a7, p as p4, r as r7, t as t6 } from "./vectors-BVgXsYWl.js";
|
|
24
|
+
import { v as vertexPosition, t as translate$1, a as getEdges, c as clone$1, d as describe$1, b as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, e as simplify$1, f as toBREP$1, h as getBounds, j as getFaces, k as getVertices, l as getWires } from "./shapeFns-DQtpzndX.js";
|
|
25
|
+
import { g as g10, n as n6, i as i10, o as o7, p as p5, q as q4, u as u4 } from "./shapeFns-DQtpzndX.js";
|
|
26
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-CtfUZwLR.js";
|
|
27
|
+
import { a as a8, b as b7, e as e5, f as f8, d as d5, g as g11, j as j8, s as s3, t as t7, k as k8, l as l6, v as v6, w as w6 } from "./topology-CtfUZwLR.js";
|
|
28
|
+
import { n as normalAt, f as faceCenter, i as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-DDzCECn3.js";
|
|
29
|
+
import { c as c6, a as a9, b as b8, d as d6, p as p6, e as e6, u as u5, h as h7 } from "./faceFns-DDzCECn3.js";
|
|
30
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-Djzdn-CS.js";
|
|
31
|
+
import { c as c7, b as b9, e as e7, d as d7, f as f9 } from "./meshFns-Djzdn-CS.js";
|
|
32
|
+
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, e as fuseAll } from "./booleanFns-CkccZ7UL.js";
|
|
33
|
+
import { g as g12 } from "./booleanFns-CkccZ7UL.js";
|
|
34
|
+
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-DlXaTzKc.js";
|
|
35
|
+
import { d as d8, e as e8, f as f10, g as g13, h as h8, i as i11 } from "./measurement-DlXaTzKc.js";
|
|
36
|
+
import { c as makeBezierCurve, d as makeBSplineApproximation, e as makeCircle, f as makeEllipse, g as makeEllipseArc, b as makeHelix, m as makeLine, h as makeTangentArc, i as makeThreePointArc, a as assembleWire } from "./curveBuilders-CBlIWlbU.js";
|
|
37
|
+
import { i as iterTopo, f as fromBREP$1 } from "./cast-C4Ff_1Qe.js";
|
|
38
|
+
import { e as e9, c as c8, d as d9, g as g14, s as s4 } from "./cast-C4Ff_1Qe.js";
|
|
39
|
+
import { edgeFinder } from "./query.js";
|
|
37
40
|
import { BrepBugError, bug } from "./result.js";
|
|
41
|
+
import { c as c9 } from "./cornerFinder-DzGzfiqb.js";
|
|
38
42
|
import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
|
|
39
43
|
const errorFactories = {
|
|
40
44
|
OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
|
|
@@ -82,6 +86,79 @@ function isFilletRadius(r8) {
|
|
|
82
86
|
}
|
|
83
87
|
return false;
|
|
84
88
|
}
|
|
89
|
+
function buildWireFinder(filters) {
|
|
90
|
+
return createTypedFinder(
|
|
91
|
+
"wire",
|
|
92
|
+
filters,
|
|
93
|
+
buildWireFinder,
|
|
94
|
+
(_base, withFilter) => ({
|
|
95
|
+
isClosed: () => withFilter((wire2) => curveIsClosed(wire2)),
|
|
96
|
+
isOpen: () => withFilter((wire2) => !curveIsClosed(wire2)),
|
|
97
|
+
ofEdgeCount: (count) => withFilter((wire2) => {
|
|
98
|
+
let edgeCount = 0;
|
|
99
|
+
for (const _raw of iterTopo(wire2.wrapped, "edge")) {
|
|
100
|
+
edgeCount++;
|
|
101
|
+
}
|
|
102
|
+
return edgeCount === count;
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function wireFinder() {
|
|
108
|
+
return buildWireFinder([]);
|
|
109
|
+
}
|
|
110
|
+
function withNearestPostFilter(baseFinder, nearestPoint) {
|
|
111
|
+
const findAllNearest = (shape2) => {
|
|
112
|
+
const candidates = baseFinder.findAll(shape2);
|
|
113
|
+
if (candidates.length === 0) return [];
|
|
114
|
+
let bestIdx = 0;
|
|
115
|
+
let bestDist = vecDistance(vertexPosition(candidates[0]), nearestPoint);
|
|
116
|
+
for (let i12 = 1; i12 < candidates.length; i12++) {
|
|
117
|
+
const d10 = vecDistance(vertexPosition(candidates[i12]), nearestPoint);
|
|
118
|
+
if (d10 < bestDist) {
|
|
119
|
+
bestDist = d10;
|
|
120
|
+
bestIdx = i12;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return [candidates[bestIdx]];
|
|
124
|
+
};
|
|
125
|
+
const findUniqueNearest = (shape2) => {
|
|
126
|
+
const nearest = findAllNearest(shape2);
|
|
127
|
+
if (nearest.length === 0) {
|
|
128
|
+
return err(
|
|
129
|
+
queryError("FINDER_NOT_UNIQUE", "Finder expected a unique match but found 0 element(s)")
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
return ok(nearest[0]);
|
|
133
|
+
};
|
|
134
|
+
return {
|
|
135
|
+
...baseFinder,
|
|
136
|
+
findAll: findAllNearest,
|
|
137
|
+
findUnique: findUniqueNearest
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function buildVertexFinder(filters) {
|
|
141
|
+
return createTypedFinder(
|
|
142
|
+
"vertex",
|
|
143
|
+
filters,
|
|
144
|
+
buildVertexFinder,
|
|
145
|
+
(_base, withFilter) => ({
|
|
146
|
+
nearestTo: (point) => withNearestPostFilter(buildVertexFinder(filters), point),
|
|
147
|
+
atPosition: (point, tolerance = 1e-4) => withFilter((vertex2) => vecDistance(vertexPosition(vertex2), point) < tolerance),
|
|
148
|
+
withinBox: (min, max) => withFilter((vertex2) => {
|
|
149
|
+
const pos = vertexPosition(vertex2);
|
|
150
|
+
return pos[0] >= min[0] - 1e-6 && pos[0] <= max[0] + 1e-6 && pos[1] >= min[1] - 1e-6 && pos[1] <= max[1] + 1e-6 && pos[2] >= min[2] - 1e-6 && pos[2] <= max[2] + 1e-6;
|
|
151
|
+
}),
|
|
152
|
+
atDistance: (distance, point = [0, 0, 0], tolerance = 1e-4) => withFilter((vertex2) => {
|
|
153
|
+
const pos = vertexPosition(vertex2);
|
|
154
|
+
return Math.abs(vecDistance(pos, point) - distance) < tolerance;
|
|
155
|
+
})
|
|
156
|
+
})
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
function vertexFinder() {
|
|
160
|
+
return buildVertexFinder([]);
|
|
161
|
+
}
|
|
85
162
|
function checkInterference(shape1, shape2, tolerance = 1e-6) {
|
|
86
163
|
if (shape1.wrapped.IsNull()) {
|
|
87
164
|
return err(
|
|
@@ -109,38 +186,33 @@ function checkInterference(shape1, shape2, tolerance = 1e-6) {
|
|
|
109
186
|
}
|
|
110
187
|
function checkAllInterferences(shapes, tolerance = 1e-6) {
|
|
111
188
|
const pairs = [];
|
|
112
|
-
shapes.forEach((si,
|
|
113
|
-
for (let
|
|
114
|
-
const result = unwrap(checkInterference(si, shapes[
|
|
189
|
+
shapes.forEach((si, i12) => {
|
|
190
|
+
for (let j9 = i12 + 1; j9 < shapes.length; j9++) {
|
|
191
|
+
const result = unwrap(checkInterference(si, shapes[j9], tolerance));
|
|
115
192
|
if (result.hasInterference) {
|
|
116
|
-
pairs.push({ i:
|
|
193
|
+
pairs.push({ i: i12, j: j9, result });
|
|
117
194
|
}
|
|
118
195
|
}
|
|
119
196
|
});
|
|
120
197
|
return pairs;
|
|
121
198
|
}
|
|
122
|
-
function resolve(
|
|
123
|
-
if ("__wrapped" in
|
|
124
|
-
return
|
|
199
|
+
function resolve(s5) {
|
|
200
|
+
if ("__wrapped" in s5) {
|
|
201
|
+
return s5.val;
|
|
125
202
|
}
|
|
126
|
-
return
|
|
203
|
+
return s5;
|
|
127
204
|
}
|
|
128
|
-
function resolve3D(
|
|
129
|
-
return resolve(
|
|
205
|
+
function resolve3D(s5) {
|
|
206
|
+
return resolve(s5);
|
|
130
207
|
}
|
|
131
208
|
function box(width, depth, height, options) {
|
|
132
209
|
const oc = getKernel().oc;
|
|
133
|
-
const
|
|
210
|
+
const r8 = gcWithScope();
|
|
134
211
|
const maker = r8(new oc.BRepPrimAPI_MakeBox_2(width, depth, height));
|
|
135
|
-
|
|
136
|
-
gc();
|
|
212
|
+
const solid2 = createSolid(maker.Solid());
|
|
137
213
|
const center = options?.at ?? (options?.centered ? [0, 0, 0] : void 0);
|
|
138
214
|
if (center) {
|
|
139
|
-
|
|
140
|
-
center[0] - width / 2,
|
|
141
|
-
center[1] - depth / 2,
|
|
142
|
-
center[2] - height / 2
|
|
143
|
-
]);
|
|
215
|
+
return translate$1(solid2, [center[0] - width / 2, center[1] - depth / 2, center[2] - height / 2]);
|
|
144
216
|
}
|
|
145
217
|
return solid2;
|
|
146
218
|
}
|
|
@@ -237,14 +309,14 @@ function tangentArc(startPoint, startTgt, endPoint) {
|
|
|
237
309
|
function wire(listOfEdges) {
|
|
238
310
|
return assembleWire(listOfEdges);
|
|
239
311
|
}
|
|
240
|
-
function face(
|
|
241
|
-
return makeFace(
|
|
312
|
+
function face(w7, holes) {
|
|
313
|
+
return makeFace(w7, holes);
|
|
242
314
|
}
|
|
243
|
-
function filledFace(
|
|
244
|
-
return makeNonPlanarFace(
|
|
315
|
+
function filledFace(w7) {
|
|
316
|
+
return makeNonPlanarFace(w7);
|
|
245
317
|
}
|
|
246
|
-
function subFace(originFace,
|
|
247
|
-
return makeNewFaceWithinFace(originFace,
|
|
318
|
+
function subFace(originFace, w7) {
|
|
319
|
+
return makeNewFaceWithinFace(originFace, w7);
|
|
248
320
|
}
|
|
249
321
|
function polygon(points) {
|
|
250
322
|
return makePolygon(points);
|
|
@@ -258,14 +330,14 @@ function compound(shapeArray) {
|
|
|
258
330
|
function solid(facesOrShells) {
|
|
259
331
|
return makeSolid(facesOrShells);
|
|
260
332
|
}
|
|
261
|
-
function offsetFace(
|
|
262
|
-
return makeOffset(
|
|
333
|
+
function offsetFace(f11, distance, tolerance) {
|
|
334
|
+
return makeOffset(f11, distance, tolerance);
|
|
263
335
|
}
|
|
264
336
|
function sewShells(facesOrShells, ignoreType) {
|
|
265
337
|
return weldShellsAndFaces(facesOrShells, ignoreType);
|
|
266
338
|
}
|
|
267
|
-
function addHoles(
|
|
268
|
-
return addHolesInFace(
|
|
339
|
+
function addHoles(f11, holes) {
|
|
340
|
+
return addHolesInFace(f11, holes);
|
|
269
341
|
}
|
|
270
342
|
function validateNotNull(shape2, label) {
|
|
271
343
|
if (shape2.wrapped.IsNull()) {
|
|
@@ -420,7 +492,7 @@ function shell$1(shape2, faces, thickness, tolerance = 1e-3) {
|
|
|
420
492
|
try {
|
|
421
493
|
const result = getKernel().shell(
|
|
422
494
|
shape2.wrapped,
|
|
423
|
-
faces.map((
|
|
495
|
+
faces.map((f11) => f11.wrapped),
|
|
424
496
|
thickness,
|
|
425
497
|
tolerance
|
|
426
498
|
);
|
|
@@ -452,8 +524,8 @@ function offset$1(shape2, distance, tolerance = 1e-6) {
|
|
|
452
524
|
"Offset operation failed"
|
|
453
525
|
);
|
|
454
526
|
}
|
|
455
|
-
function translate(shape2,
|
|
456
|
-
return translate$1(resolve(shape2),
|
|
527
|
+
function translate(shape2, v7) {
|
|
528
|
+
return translate$1(resolve(shape2), v7);
|
|
457
529
|
}
|
|
458
530
|
function rotate(shape2, angle, options) {
|
|
459
531
|
const pivotPoint = options?.at;
|
|
@@ -469,14 +541,14 @@ function scale(shape2, factor, options) {
|
|
|
469
541
|
function clone(shape2) {
|
|
470
542
|
return clone$1(resolve(shape2));
|
|
471
543
|
}
|
|
472
|
-
function fuse(
|
|
473
|
-
return fuse$1(resolve(
|
|
544
|
+
function fuse(a10, b10, options) {
|
|
545
|
+
return fuse$1(resolve(a10), resolve(b10), options);
|
|
474
546
|
}
|
|
475
547
|
function cut(base, tool, options) {
|
|
476
548
|
return cut$1(resolve(base), resolve(tool), options);
|
|
477
549
|
}
|
|
478
|
-
function intersect(
|
|
479
|
-
return intersect$1(resolve(
|
|
550
|
+
function intersect(a10, b10, options) {
|
|
551
|
+
return intersect$1(resolve(a10), resolve(b10), options);
|
|
480
552
|
}
|
|
481
553
|
function section(shape2, plane, options) {
|
|
482
554
|
return section$1(resolve(shape2), plane, options);
|
|
@@ -525,24 +597,24 @@ function normalizeChamferDistance(distance) {
|
|
|
525
597
|
return { mode: "standard", distance };
|
|
526
598
|
}
|
|
527
599
|
function fillet(shape2, edgesOrRadius, maybeRadius) {
|
|
528
|
-
const
|
|
600
|
+
const s5 = resolve(shape2);
|
|
529
601
|
let edges;
|
|
530
602
|
let radius;
|
|
531
603
|
if (maybeRadius !== void 0) {
|
|
532
|
-
edges = resolveEdges(edgesOrRadius,
|
|
604
|
+
edges = resolveEdges(edgesOrRadius, s5);
|
|
533
605
|
radius = maybeRadius;
|
|
534
606
|
} else {
|
|
535
607
|
edges = void 0;
|
|
536
608
|
radius = edgesOrRadius;
|
|
537
609
|
}
|
|
538
|
-
return fillet$1(
|
|
610
|
+
return fillet$1(s5, edges, normalizeFilletRadius(radius));
|
|
539
611
|
}
|
|
540
612
|
function chamfer(shape2, edgesOrDistance, maybeDistance) {
|
|
541
|
-
const
|
|
613
|
+
const s5 = resolve(shape2);
|
|
542
614
|
let edges;
|
|
543
615
|
let distance;
|
|
544
616
|
if (maybeDistance !== void 0) {
|
|
545
|
-
edges = resolveEdges(edgesOrDistance,
|
|
617
|
+
edges = resolveEdges(edgesOrDistance, s5);
|
|
546
618
|
distance = maybeDistance;
|
|
547
619
|
} else {
|
|
548
620
|
edges = void 0;
|
|
@@ -550,20 +622,20 @@ function chamfer(shape2, edgesOrDistance, maybeDistance) {
|
|
|
550
622
|
}
|
|
551
623
|
const normalized = normalizeChamferDistance(distance);
|
|
552
624
|
if (normalized.mode === "distAngle") {
|
|
553
|
-
const selectedEdges = edges ?? getEdges(
|
|
625
|
+
const selectedEdges = edges ?? getEdges(s5);
|
|
554
626
|
return chamferDistAngle(
|
|
555
|
-
|
|
627
|
+
s5,
|
|
556
628
|
[...selectedEdges],
|
|
557
629
|
normalized.distance,
|
|
558
630
|
normalized.angle
|
|
559
631
|
);
|
|
560
632
|
}
|
|
561
|
-
return chamfer$1(
|
|
633
|
+
return chamfer$1(s5, edges, normalized.distance);
|
|
562
634
|
}
|
|
563
635
|
function shell(shape2, faces, thickness, options) {
|
|
564
|
-
const
|
|
565
|
-
const resolvedFaces = resolveFaces(faces,
|
|
566
|
-
return shell$1(
|
|
636
|
+
const s5 = resolve(shape2);
|
|
637
|
+
const resolvedFaces = resolveFaces(faces, s5);
|
|
638
|
+
return shell$1(s5, resolvedFaces, thickness, options?.tolerance);
|
|
567
639
|
}
|
|
568
640
|
function offset(shape2, distance, options) {
|
|
569
641
|
return offset$1(resolve(shape2), distance, options?.tolerance);
|
|
@@ -610,8 +682,8 @@ function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell
|
|
|
610
682
|
const vMaker = r8(new oc.BRepBuilderAPI_MakeVertex(pnt));
|
|
611
683
|
builder.AddVertex(vMaker.Vertex());
|
|
612
684
|
}
|
|
613
|
-
for (const
|
|
614
|
-
builder.AddWire(
|
|
685
|
+
for (const w7 of wires) {
|
|
686
|
+
builder.AddWire(w7.wrapped);
|
|
615
687
|
}
|
|
616
688
|
if (endPoint) {
|
|
617
689
|
const pnt = r8(toOcPnt(toVec3(endPoint)));
|
|
@@ -630,9 +702,9 @@ function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell
|
|
|
630
702
|
return ok(result);
|
|
631
703
|
}
|
|
632
704
|
function extrude(face2, height) {
|
|
633
|
-
const
|
|
705
|
+
const f11 = resolve(face2);
|
|
634
706
|
const vec = typeof height === "number" ? [0, 0, height] : height;
|
|
635
|
-
return extrude$1(
|
|
707
|
+
return extrude$1(f11, vec);
|
|
636
708
|
}
|
|
637
709
|
function revolve(face2, options) {
|
|
638
710
|
const pivotPoint = options?.at ?? [0, 0, 0];
|
|
@@ -644,7 +716,7 @@ function revolve(face2, options) {
|
|
|
644
716
|
);
|
|
645
717
|
}
|
|
646
718
|
function loft(wires, options) {
|
|
647
|
-
const resolvedWires = wires.map((
|
|
719
|
+
const resolvedWires = wires.map((w7) => resolve(w7));
|
|
648
720
|
return loft$1(resolvedWires, options);
|
|
649
721
|
}
|
|
650
722
|
function resolveTargetFace(shape2, faceSpec) {
|
|
@@ -655,11 +727,11 @@ function resolveTargetFace(shape2, faceSpec) {
|
|
|
655
727
|
}
|
|
656
728
|
let best = faces[0];
|
|
657
729
|
let bestZ = faceCenter(best)[2];
|
|
658
|
-
for (let
|
|
659
|
-
const
|
|
660
|
-
const z4 = faceCenter(
|
|
730
|
+
for (let i12 = 1; i12 < faces.length; i12++) {
|
|
731
|
+
const f11 = faces[i12];
|
|
732
|
+
const z4 = faceCenter(f11)[2];
|
|
661
733
|
if (z4 > bestZ) {
|
|
662
|
-
best =
|
|
734
|
+
best = f11;
|
|
663
735
|
bestZ = z4;
|
|
664
736
|
}
|
|
665
737
|
}
|
|
@@ -682,7 +754,7 @@ function toWire(profile) {
|
|
|
682
754
|
return profile;
|
|
683
755
|
}
|
|
684
756
|
function drill(shape2, options) {
|
|
685
|
-
const
|
|
757
|
+
const s5 = resolve(shape2);
|
|
686
758
|
const { at, radius, axis: rawAxis } = options;
|
|
687
759
|
const axis = rawAxis ?? [0, 0, 1];
|
|
688
760
|
if (radius <= 0) {
|
|
@@ -695,58 +767,58 @@ function drill(shape2, options) {
|
|
|
695
767
|
const pos = at.length === 2 ? [at[0], at[1], 0] : [at[0], at[1], at[2]];
|
|
696
768
|
let depth = options.depth;
|
|
697
769
|
if (depth === void 0) {
|
|
698
|
-
const
|
|
699
|
-
const dx =
|
|
700
|
-
const dy =
|
|
701
|
-
const dz =
|
|
770
|
+
const b10 = getBounds(s5);
|
|
771
|
+
const dx = b10.xMax - b10.xMin;
|
|
772
|
+
const dy = b10.yMax - b10.yMin;
|
|
773
|
+
const dz = b10.zMax - b10.zMin;
|
|
702
774
|
depth = Math.sqrt(dx * dx + dy * dy + dz * dz) + 1;
|
|
703
775
|
}
|
|
704
776
|
const cyl = makeCylinder(radius, depth, pos, dir);
|
|
705
777
|
const startOffset = options.depth === void 0 ? vecScale(dir, -depth / 2) : [0, 0, 0];
|
|
706
778
|
const tool = startOffset[0] !== 0 || startOffset[1] !== 0 || startOffset[2] !== 0 ? translate$1(cyl, startOffset) : cyl;
|
|
707
|
-
return cut$1(
|
|
779
|
+
return cut$1(s5, tool);
|
|
708
780
|
}
|
|
709
781
|
function pocket(shape2, options) {
|
|
710
|
-
const
|
|
782
|
+
const s5 = resolve(shape2);
|
|
711
783
|
const { profile, depth } = options;
|
|
712
784
|
if (depth <= 0) {
|
|
713
785
|
return err(validationError("POCKET_INVALID_DEPTH", "Pocket depth must be positive"));
|
|
714
786
|
}
|
|
715
|
-
const targetFace = resolveTargetFace(
|
|
787
|
+
const targetFace = resolveTargetFace(s5, options.face);
|
|
716
788
|
const normal = normalAt(targetFace);
|
|
717
|
-
const
|
|
718
|
-
const faceResult = makeFace(
|
|
789
|
+
const w7 = toWire(profile);
|
|
790
|
+
const faceResult = makeFace(w7);
|
|
719
791
|
if (isErr(faceResult)) return faceResult;
|
|
720
792
|
const extDir = vecScale(vecNormalize(normal), -depth);
|
|
721
793
|
const toolResult = extrude$1(faceResult.value, extDir);
|
|
722
794
|
if (isErr(toolResult)) return toolResult;
|
|
723
|
-
return cut$1(
|
|
795
|
+
return cut$1(s5, toolResult.value);
|
|
724
796
|
}
|
|
725
797
|
function boss(shape2, options) {
|
|
726
|
-
const
|
|
798
|
+
const s5 = resolve(shape2);
|
|
727
799
|
const { profile, height } = options;
|
|
728
800
|
if (height <= 0) {
|
|
729
801
|
return err(validationError("BOSS_INVALID_HEIGHT", "Boss height must be positive"));
|
|
730
802
|
}
|
|
731
|
-
const targetFace = resolveTargetFace(
|
|
803
|
+
const targetFace = resolveTargetFace(s5, options.face);
|
|
732
804
|
const normal = normalAt(targetFace);
|
|
733
|
-
const
|
|
734
|
-
const faceResult = makeFace(
|
|
805
|
+
const w7 = toWire(profile);
|
|
806
|
+
const faceResult = makeFace(w7);
|
|
735
807
|
if (isErr(faceResult)) return faceResult;
|
|
736
808
|
const extDir = vecScale(vecNormalize(normal), height);
|
|
737
809
|
const toolResult = extrude$1(faceResult.value, extDir);
|
|
738
810
|
if (isErr(toolResult)) return toolResult;
|
|
739
|
-
return fuse$1(
|
|
811
|
+
return fuse$1(s5, toolResult.value);
|
|
740
812
|
}
|
|
741
813
|
function mirrorJoin(shape2, options) {
|
|
742
|
-
const
|
|
814
|
+
const s5 = resolve(shape2);
|
|
743
815
|
const normal = options?.normal ?? [1, 0, 0];
|
|
744
816
|
const planeOrigin = options?.at;
|
|
745
|
-
const mirrored = mirror$1(
|
|
746
|
-
return fuse$1(
|
|
817
|
+
const mirrored = mirror$1(s5, normal, planeOrigin);
|
|
818
|
+
return fuse$1(s5, mirrored);
|
|
747
819
|
}
|
|
748
820
|
function rectangularPattern(shape2, options) {
|
|
749
|
-
const
|
|
821
|
+
const s5 = resolve(shape2);
|
|
750
822
|
const { xDir, xCount, xSpacing, yDir, yCount, ySpacing } = options;
|
|
751
823
|
if (xCount < 1 || yCount < 1) {
|
|
752
824
|
return err(validationError("PATTERN_INVALID_COUNT", "Pattern counts must be at least 1"));
|
|
@@ -757,10 +829,10 @@ function rectangularPattern(shape2, options) {
|
|
|
757
829
|
if (vecIsZero(yDir)) {
|
|
758
830
|
return err(validationError("PATTERN_ZERO_DIRECTION", "Y direction cannot be zero"));
|
|
759
831
|
}
|
|
760
|
-
if (xCount === 1 && yCount === 1) return ok(
|
|
832
|
+
if (xCount === 1 && yCount === 1) return ok(s5);
|
|
761
833
|
const xNorm = vecNormalize(xDir);
|
|
762
834
|
const yNorm = vecNormalize(yDir);
|
|
763
|
-
let result =
|
|
835
|
+
let result = s5;
|
|
764
836
|
for (let xi = 0; xi < xCount; xi++) {
|
|
765
837
|
for (let yi = 0; yi < yCount; yi++) {
|
|
766
838
|
if (xi === 0 && yi === 0) continue;
|
|
@@ -769,7 +841,7 @@ function rectangularPattern(shape2, options) {
|
|
|
769
841
|
xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
|
|
770
842
|
xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
|
|
771
843
|
];
|
|
772
|
-
const copy = translate$1(
|
|
844
|
+
const copy = translate$1(s5, offset2);
|
|
773
845
|
const fuseResult = fuse$1(result, copy);
|
|
774
846
|
if (isErr(fuseResult)) return fuseResult;
|
|
775
847
|
result = fuseResult.value;
|
|
@@ -808,16 +880,16 @@ function createWrappedBase(val) {
|
|
|
808
880
|
const self = {
|
|
809
881
|
val,
|
|
810
882
|
__wrapped: true,
|
|
811
|
-
translate: (
|
|
883
|
+
translate: (v7) => wrapAny(translate(val, v7)),
|
|
812
884
|
rotate: (angle, opts) => wrapAny(rotate(val, angle, opts)),
|
|
813
885
|
mirror: (opts) => wrapAny(mirror(val, opts)),
|
|
814
886
|
scale: (factor, opts) => wrapAny(scale(val, factor, opts)),
|
|
815
887
|
moveX: (d10) => wrapAny(translate(val, [d10, 0, 0])),
|
|
816
888
|
moveY: (d10) => wrapAny(translate(val, [0, d10, 0])),
|
|
817
889
|
moveZ: (d10) => wrapAny(translate(val, [0, 0, d10])),
|
|
818
|
-
rotateX: (
|
|
819
|
-
rotateY: (
|
|
820
|
-
rotateZ: (
|
|
890
|
+
rotateX: (a10) => wrapAny(rotate(val, a10, { axis: [1, 0, 0] })),
|
|
891
|
+
rotateY: (a10) => wrapAny(rotate(val, a10, { axis: [0, 1, 0] })),
|
|
892
|
+
rotateZ: (a10) => wrapAny(rotate(val, a10, { axis: [0, 0, 1] })),
|
|
821
893
|
bounds: () => getBounds(val),
|
|
822
894
|
describe: () => describe(val),
|
|
823
895
|
clone: () => wrapAny(clone(val)),
|
|
@@ -846,6 +918,7 @@ function createWrapped3D(val) {
|
|
|
846
918
|
cut: (tool, opts) => wrap3D(unwrapOrThrow(cut(val, resolve(tool), opts))),
|
|
847
919
|
intersect: (tool, opts) => wrap3D(unwrapOrThrow(intersect(val, resolve(tool), opts))),
|
|
848
920
|
// Batch booleans
|
|
921
|
+
fuseAll: (tools, opts) => wrap3D(unwrapOrThrow(fuseAll([val, ...tools.map(resolve)], opts))),
|
|
849
922
|
cutAll: (tools, opts) => wrap3D(unwrapOrThrow(cutAll(val, tools, opts))),
|
|
850
923
|
// Boolean variants
|
|
851
924
|
section: (plane, opts) => wrapAny(unwrapOrThrow(section(val, plane, opts))),
|
|
@@ -900,8 +973,8 @@ function createWrappedCurve(val) {
|
|
|
900
973
|
isClosed: () => curveIsClosed(val),
|
|
901
974
|
sweep(spine, opts) {
|
|
902
975
|
if (!isWire(val)) throw new Error("sweep requires a Wire");
|
|
903
|
-
const
|
|
904
|
-
const result = unwrapOrThrow(sweep(
|
|
976
|
+
const w7 = val;
|
|
977
|
+
const result = unwrapOrThrow(sweep(w7, resolve(spine), opts));
|
|
905
978
|
const shape3D = Array.isArray(result) ? result[0] : result;
|
|
906
979
|
return wrap3D(shape3D);
|
|
907
980
|
}
|
|
@@ -930,24 +1003,24 @@ function wrapAny(val) {
|
|
|
930
1003
|
function wrap3D(val) {
|
|
931
1004
|
return createWrapped3D(val);
|
|
932
1005
|
}
|
|
933
|
-
function shape(
|
|
934
|
-
if (
|
|
935
|
-
return createWrappedFace(
|
|
1006
|
+
function shape(s5) {
|
|
1007
|
+
if (s5 && typeof s5 === "object" && "face" in s5 && typeof s5.face === "function" && "_defaultOrigin" in s5) {
|
|
1008
|
+
return createWrappedFace(s5.face());
|
|
936
1009
|
}
|
|
937
|
-
if (
|
|
938
|
-
if (isFace(
|
|
939
|
-
if (isShape3D(
|
|
940
|
-
if (isEdge(
|
|
941
|
-
return createWrappedBase(
|
|
1010
|
+
if (s5 && typeof s5 === "object" && "wrapped" in s5) {
|
|
1011
|
+
if (isFace(s5)) return createWrappedFace(s5);
|
|
1012
|
+
if (isShape3D(s5)) return createWrapped3D(s5);
|
|
1013
|
+
if (isEdge(s5) || isWire(s5)) return createWrappedCurve(s5);
|
|
1014
|
+
return createWrappedBase(s5);
|
|
942
1015
|
}
|
|
943
1016
|
throw new Error("shape() requires a Sketch or branded shape type");
|
|
944
1017
|
}
|
|
945
1018
|
export {
|
|
946
1019
|
B3 as BaseSketcher2d,
|
|
947
1020
|
B as Blueprint,
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
1021
|
+
a5 as BlueprintSketcher,
|
|
1022
|
+
b5 as Blueprints,
|
|
1023
|
+
e2 as BoundingBox2d,
|
|
951
1024
|
BrepBugError,
|
|
952
1025
|
BrepErrorCode,
|
|
953
1026
|
BrepWrapperError,
|
|
@@ -957,25 +1030,25 @@ export {
|
|
|
957
1030
|
DEG2RAD,
|
|
958
1031
|
D as DisposalScope,
|
|
959
1032
|
D3 as Drawing,
|
|
960
|
-
|
|
1033
|
+
a6 as DrawingPen,
|
|
961
1034
|
F as FaceSketcher,
|
|
962
1035
|
H as HASH_CODE_MAX,
|
|
963
1036
|
O as OK,
|
|
964
1037
|
R as RAD2DEG,
|
|
965
1038
|
S as Sketch,
|
|
966
1039
|
S2 as Sketcher,
|
|
967
|
-
|
|
968
|
-
|
|
1040
|
+
b6 as Sketches,
|
|
1041
|
+
a4 as addChild,
|
|
969
1042
|
addHoles,
|
|
970
|
-
|
|
971
|
-
|
|
1043
|
+
b4 as addStep,
|
|
1044
|
+
a8 as adjacentFaces,
|
|
972
1045
|
a as andThen,
|
|
973
|
-
|
|
974
|
-
|
|
1046
|
+
g12 as applyGlue,
|
|
1047
|
+
g5 as approximateCurve,
|
|
975
1048
|
e9 as asTopo,
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1049
|
+
b7 as autoHeal,
|
|
1050
|
+
f4 as axis2d,
|
|
1051
|
+
i6 as basicFaceExtrusion,
|
|
979
1052
|
bezier,
|
|
980
1053
|
blueprintToDXF,
|
|
981
1054
|
boss,
|
|
@@ -984,7 +1057,7 @@ export {
|
|
|
984
1057
|
bug,
|
|
985
1058
|
X as cameraFromPlane,
|
|
986
1059
|
Y as cameraLookAt,
|
|
987
|
-
|
|
1060
|
+
c8 as cast,
|
|
988
1061
|
castShape,
|
|
989
1062
|
chamfer,
|
|
990
1063
|
chamferDistAngle as chamferDistAngleShape,
|
|
@@ -992,42 +1065,42 @@ export {
|
|
|
992
1065
|
checkInterference,
|
|
993
1066
|
circle,
|
|
994
1067
|
circularPattern,
|
|
995
|
-
|
|
996
|
-
|
|
1068
|
+
c6 as classifyPointOnFace,
|
|
1069
|
+
c7 as clearMeshCache,
|
|
997
1070
|
clone,
|
|
998
|
-
|
|
1071
|
+
c2 as collect,
|
|
999
1072
|
d2 as collectShapes,
|
|
1000
|
-
|
|
1073
|
+
f5 as complexExtrude,
|
|
1001
1074
|
compound,
|
|
1002
|
-
|
|
1075
|
+
c4 as compoundSketchExtrude,
|
|
1003
1076
|
d4 as compoundSketchFace,
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1077
|
+
e4 as compoundSketchLoft,
|
|
1078
|
+
f7 as compoundSketchRevolve,
|
|
1079
|
+
b as computationError,
|
|
1007
1080
|
cone,
|
|
1008
|
-
|
|
1081
|
+
c9 as cornerFinder,
|
|
1009
1082
|
g6 as countNodes,
|
|
1010
1083
|
h5 as createAssembly,
|
|
1011
|
-
|
|
1084
|
+
i7 as createAssemblyNode,
|
|
1012
1085
|
createBlueprint,
|
|
1013
1086
|
Z as createCamera,
|
|
1014
|
-
|
|
1087
|
+
q as createCompound,
|
|
1015
1088
|
d8 as createDistanceQuery,
|
|
1016
|
-
|
|
1017
|
-
|
|
1089
|
+
o as createEdge,
|
|
1090
|
+
u as createFace,
|
|
1018
1091
|
a2 as createHandle,
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1092
|
+
j6 as createHistory,
|
|
1093
|
+
b9 as createMeshCache,
|
|
1094
|
+
c5 as createNamedPlane,
|
|
1095
|
+
b2 as createOcHandle,
|
|
1023
1096
|
createOperationRegistry,
|
|
1024
|
-
|
|
1097
|
+
a7 as createPlane,
|
|
1025
1098
|
k6 as createRegistry,
|
|
1026
1099
|
v2 as createShell,
|
|
1027
1100
|
createSolid,
|
|
1028
1101
|
createTaskQueue,
|
|
1029
|
-
|
|
1030
|
-
|
|
1102
|
+
r3 as createVertex,
|
|
1103
|
+
n2 as createWire,
|
|
1031
1104
|
createWorkerClient,
|
|
1032
1105
|
createWorkerHandler,
|
|
1033
1106
|
curve2dBoundingBox,
|
|
@@ -1057,53 +1130,53 @@ export {
|
|
|
1057
1130
|
fromBREP$1 as deserializeShape,
|
|
1058
1131
|
d9 as downcast,
|
|
1059
1132
|
h6 as draw,
|
|
1060
|
-
|
|
1061
|
-
|
|
1133
|
+
i9 as drawCircle,
|
|
1134
|
+
j7 as drawEllipse,
|
|
1062
1135
|
k7 as drawFaceOutline,
|
|
1063
1136
|
l5 as drawParametricFunction,
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1137
|
+
m5 as drawPointsInterpolation,
|
|
1138
|
+
n5 as drawPolysides,
|
|
1139
|
+
o6 as drawProjection,
|
|
1067
1140
|
p3 as drawRectangle,
|
|
1068
|
-
|
|
1141
|
+
q3 as drawRoundedRectangle,
|
|
1069
1142
|
r6 as drawSingleCircle,
|
|
1070
|
-
|
|
1143
|
+
s2 as drawSingleEllipse,
|
|
1071
1144
|
t5 as drawText,
|
|
1072
1145
|
u3 as drawingChamfer,
|
|
1073
|
-
|
|
1074
|
-
|
|
1146
|
+
v5 as drawingCut,
|
|
1147
|
+
w5 as drawingFillet,
|
|
1075
1148
|
x3 as drawingFuse,
|
|
1076
1149
|
y2 as drawingIntersect,
|
|
1077
1150
|
z3 as drawingToSketchOnPlane,
|
|
1078
1151
|
drill,
|
|
1079
1152
|
edgeFinder,
|
|
1080
|
-
|
|
1153
|
+
e5 as edgesOfFace,
|
|
1081
1154
|
ellipse,
|
|
1082
1155
|
ellipseArc,
|
|
1083
1156
|
ellipsoid,
|
|
1084
1157
|
enqueueTask,
|
|
1085
1158
|
err,
|
|
1086
|
-
|
|
1159
|
+
m4 as exportAssemblySTEP,
|
|
1087
1160
|
exportDXF,
|
|
1088
1161
|
exportGlb,
|
|
1089
1162
|
exportGltf,
|
|
1090
|
-
|
|
1163
|
+
e7 as exportIGES,
|
|
1091
1164
|
exportOBJ,
|
|
1092
1165
|
d7 as exportSTEP,
|
|
1093
|
-
|
|
1166
|
+
f9 as exportSTL,
|
|
1094
1167
|
exportThreeMF,
|
|
1095
1168
|
extrude,
|
|
1096
1169
|
face,
|
|
1097
1170
|
faceCenter,
|
|
1098
1171
|
faceFinder,
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1172
|
+
a9 as faceGeomType,
|
|
1173
|
+
b8 as faceOrientation,
|
|
1174
|
+
f8 as facesOfEdge,
|
|
1102
1175
|
filledFace,
|
|
1103
1176
|
fillet,
|
|
1104
1177
|
j4 as findCurveType,
|
|
1105
|
-
|
|
1106
|
-
|
|
1178
|
+
n4 as findNode,
|
|
1179
|
+
o4 as findStep,
|
|
1107
1180
|
f2 as flatMap,
|
|
1108
1181
|
d6 as flipFaceOrientation,
|
|
1109
1182
|
k5 as flipOrientation,
|
|
@@ -1112,22 +1185,22 @@ export {
|
|
|
1112
1185
|
h as fromOcPnt,
|
|
1113
1186
|
i as fromOcVec,
|
|
1114
1187
|
fuse,
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1188
|
+
f6 as fuse2D,
|
|
1189
|
+
fuseAll,
|
|
1190
|
+
e3 as fuseBlueprints,
|
|
1118
1191
|
x as gcWithObject,
|
|
1119
1192
|
gcWithScope,
|
|
1120
|
-
|
|
1193
|
+
j5 as genericSweep,
|
|
1121
1194
|
getBounds,
|
|
1122
1195
|
getBounds2D,
|
|
1123
1196
|
l4 as getCurveType,
|
|
1124
1197
|
getEdges,
|
|
1125
1198
|
getFaces,
|
|
1126
1199
|
_ as getFont,
|
|
1127
|
-
|
|
1200
|
+
g10 as getHashCode,
|
|
1128
1201
|
p as getHistoryShape,
|
|
1129
1202
|
getKernel,
|
|
1130
|
-
|
|
1203
|
+
m3 as getOrientation,
|
|
1131
1204
|
getOrientation2D,
|
|
1132
1205
|
g2 as getShapeKind,
|
|
1133
1206
|
g8 as getSingleFace,
|
|
@@ -1136,8 +1209,8 @@ export {
|
|
|
1136
1209
|
getWires,
|
|
1137
1210
|
heal,
|
|
1138
1211
|
d5 as healFace,
|
|
1139
|
-
|
|
1140
|
-
|
|
1212
|
+
g11 as healSolid,
|
|
1213
|
+
j8 as healWire,
|
|
1141
1214
|
helix,
|
|
1142
1215
|
importIGES,
|
|
1143
1216
|
importSTEP,
|
|
@@ -1146,18 +1219,18 @@ export {
|
|
|
1146
1219
|
importSVGPathD,
|
|
1147
1220
|
j as initFromOC,
|
|
1148
1221
|
innerWires,
|
|
1149
|
-
|
|
1222
|
+
n3 as interpolateCurve,
|
|
1150
1223
|
intersect,
|
|
1151
|
-
|
|
1224
|
+
i8 as intersect2D,
|
|
1152
1225
|
g7 as intersectBlueprints,
|
|
1153
1226
|
i2 as ioError,
|
|
1154
1227
|
isChamferRadius,
|
|
1155
|
-
|
|
1228
|
+
g14 as isCompSolid,
|
|
1156
1229
|
i3 as isCompound,
|
|
1157
1230
|
isDisposeRequest,
|
|
1158
1231
|
isEdge,
|
|
1159
1232
|
isEmpty,
|
|
1160
|
-
|
|
1233
|
+
n6 as isEqualShape,
|
|
1161
1234
|
isErr,
|
|
1162
1235
|
isErrorResponse,
|
|
1163
1236
|
isFace,
|
|
@@ -1169,7 +1242,7 @@ export {
|
|
|
1169
1242
|
isOperationRequest,
|
|
1170
1243
|
$ as isProjectionPlane,
|
|
1171
1244
|
isQueueEmpty,
|
|
1172
|
-
|
|
1245
|
+
i10 as isSameShape,
|
|
1173
1246
|
f3 as isShape1D,
|
|
1174
1247
|
isShape3D,
|
|
1175
1248
|
j3 as isShell,
|
|
@@ -1178,30 +1251,30 @@ export {
|
|
|
1178
1251
|
isValid,
|
|
1179
1252
|
l2 as isVertex,
|
|
1180
1253
|
isWire,
|
|
1181
|
-
|
|
1254
|
+
o7 as iterEdges,
|
|
1182
1255
|
p5 as iterFaces,
|
|
1183
|
-
|
|
1184
|
-
|
|
1256
|
+
iterTopo,
|
|
1257
|
+
q4 as iterVertices,
|
|
1185
1258
|
u4 as iterWires,
|
|
1186
1259
|
kernelCall,
|
|
1187
1260
|
kernelCallRaw,
|
|
1188
1261
|
line,
|
|
1189
1262
|
linearPattern,
|
|
1190
1263
|
a0 as loadFont,
|
|
1191
|
-
localGC,
|
|
1264
|
+
t3 as localGC,
|
|
1192
1265
|
loft,
|
|
1193
1266
|
A2 as makeBaseBox,
|
|
1194
|
-
|
|
1267
|
+
g4 as makePlane,
|
|
1195
1268
|
a1 as makeProjectedEdges,
|
|
1196
1269
|
m as map,
|
|
1197
1270
|
h2 as mapErr,
|
|
1198
1271
|
j2 as match,
|
|
1199
1272
|
measureArea,
|
|
1200
1273
|
e8 as measureCurvatureAt,
|
|
1201
|
-
|
|
1202
|
-
|
|
1274
|
+
f10 as measureCurvatureAtMid,
|
|
1275
|
+
g13 as measureDistance,
|
|
1203
1276
|
h8 as measureLength,
|
|
1204
|
-
|
|
1277
|
+
i11 as measureLinearProps,
|
|
1205
1278
|
measureSurfaceProps,
|
|
1206
1279
|
measureVolume,
|
|
1207
1280
|
measureVolumeProps,
|
|
@@ -1211,15 +1284,15 @@ export {
|
|
|
1211
1284
|
mirror2D,
|
|
1212
1285
|
B4 as mirrorDrawing,
|
|
1213
1286
|
mirrorJoin,
|
|
1214
|
-
|
|
1287
|
+
q2 as modifyStep,
|
|
1215
1288
|
k2 as moduleInitError,
|
|
1216
1289
|
normalAt,
|
|
1217
1290
|
occtError,
|
|
1218
1291
|
offset,
|
|
1219
1292
|
offsetFace,
|
|
1220
|
-
|
|
1293
|
+
o3 as offsetWire2D,
|
|
1221
1294
|
ok,
|
|
1222
|
-
|
|
1295
|
+
o5 as organiseBlueprints,
|
|
1223
1296
|
outerWire,
|
|
1224
1297
|
pendingCount,
|
|
1225
1298
|
z as pipeline,
|
|
@@ -1230,8 +1303,8 @@ export {
|
|
|
1230
1303
|
E2 as polysideInnerRadius,
|
|
1231
1304
|
p2 as polysidesBlueprint,
|
|
1232
1305
|
a22 as projectEdges,
|
|
1233
|
-
|
|
1234
|
-
|
|
1306
|
+
e6 as projectPointOnFace,
|
|
1307
|
+
queryError,
|
|
1235
1308
|
rectangularPattern,
|
|
1236
1309
|
registerHandler,
|
|
1237
1310
|
t4 as registerOperation,
|
|
@@ -1257,8 +1330,8 @@ export {
|
|
|
1257
1330
|
section,
|
|
1258
1331
|
sewShells,
|
|
1259
1332
|
shape,
|
|
1260
|
-
|
|
1261
|
-
|
|
1333
|
+
s4 as shapeType,
|
|
1334
|
+
s3 as sharedEdges,
|
|
1262
1335
|
shell,
|
|
1263
1336
|
simplify,
|
|
1264
1337
|
sketch2DOnFace,
|
|
@@ -1295,9 +1368,9 @@ export {
|
|
|
1295
1368
|
threePointArc,
|
|
1296
1369
|
toBREP,
|
|
1297
1370
|
t7 as toBufferGeometryData,
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1371
|
+
k8 as toGroupedBufferGeometryData,
|
|
1372
|
+
l6 as toLineGeometryData,
|
|
1373
|
+
c as toOcVec,
|
|
1301
1374
|
toSVGPathD,
|
|
1302
1375
|
t as toVec2,
|
|
1303
1376
|
toVec3,
|
|
@@ -1321,8 +1394,8 @@ export {
|
|
|
1321
1394
|
validationError,
|
|
1322
1395
|
v3 as vecAdd,
|
|
1323
1396
|
a3 as vecAngle,
|
|
1324
|
-
|
|
1325
|
-
|
|
1397
|
+
b3 as vecCross,
|
|
1398
|
+
vecDistance,
|
|
1326
1399
|
d as vecDot,
|
|
1327
1400
|
e as vecEquals,
|
|
1328
1401
|
vecIsZero,
|
|
@@ -1334,15 +1407,15 @@ export {
|
|
|
1334
1407
|
l3 as vecRepr,
|
|
1335
1408
|
m2 as vecRotate,
|
|
1336
1409
|
vecScale,
|
|
1337
|
-
|
|
1410
|
+
o2 as vecSub,
|
|
1338
1411
|
vertex,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1412
|
+
vertexFinder,
|
|
1413
|
+
vertexPosition,
|
|
1414
|
+
v6 as verticesOfEdge,
|
|
1342
1415
|
E as walkAssembly,
|
|
1343
1416
|
wire,
|
|
1344
|
-
|
|
1345
|
-
|
|
1417
|
+
wireFinder,
|
|
1418
|
+
w6 as wiresOfFace,
|
|
1346
1419
|
w as withOcDir,
|
|
1347
1420
|
k as withOcPnt,
|
|
1348
1421
|
l as withOcVec,
|