brepjs 9.3.6 → 9.3.7
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-jIIEbRJU.js → Blueprint-RZ4nOpeP.js} +5 -5
- package/dist/{Blueprint-DPrVGHO7.cjs → Blueprint-UqKTCIA-.cjs} +5 -5
- package/dist/{boolean2D-BhApsf-L.cjs → boolean2D-B1uobQA4.cjs} +7 -7
- package/dist/{boolean2D-B6u0KRc9.js → boolean2D-LUH72saA.js} +7 -7
- package/dist/{booleanFns-Dj_oaCrD.cjs → booleanFns-Bl2o8KOm.cjs} +64 -17
- package/dist/{booleanFns-BAw-L-nX.js → booleanFns-DU8S1pUR.js} +78 -31
- package/dist/brepjs.cjs +25 -16
- package/dist/brepjs.js +89 -80
- package/dist/core/shapeTypes.d.ts.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-bCrOjpGt.cjs → cornerFinder-BPV6q1Vj.cjs} +1 -1
- package/dist/{cornerFinder-B0tnGcU4.js → cornerFinder-xTPiKfSk.js} +1 -1
- package/dist/{curveFns-CZleOv_h.cjs → curveFns-CjhxIaTL.cjs} +1 -1
- package/dist/{curveFns-BOpSWBM_.js → curveFns-D1h3vwCh.js} +1 -1
- package/dist/{drawFns-D3B-bSgF.js → drawFns-CJShPJQl.js} +10 -10
- package/dist/{drawFns-xNlki_S7.cjs → drawFns-Dcy-HIjE.cjs} +10 -10
- package/dist/{faceFns-Dc5puKHH.cjs → faceFns-CPfQsXwJ.cjs} +14 -14
- package/dist/{faceFns-BOn2mjLG.js → faceFns-D309c5WF.js} +14 -14
- package/dist/{helpers-CPv96_9e.cjs → helpers-DK4mR8qk.cjs} +17 -8
- package/dist/{helpers-BZ-Ihxrc.js → helpers-DW9uVcCI.js} +18 -9
- package/dist/io.cjs +3 -3
- package/dist/io.js +3 -3
- package/dist/kernel/booleanOps.d.ts +13 -0
- package/dist/kernel/booleanOps.d.ts.map +1 -1
- package/dist/kernel/evolutionOps.d.ts.map +1 -1
- package/dist/kernel/meshOps.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +11 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/{loft-s34qDUbd.cjs → loft-C6S8hKeh.cjs} +3 -3
- package/dist/{loft-BD7ZqREo.js → loft-CRTLqcVq.js} +3 -3
- package/dist/measurement/interferenceFns.d.ts.map +1 -1
- package/dist/{measurement-DaGrbF2-.js → measurement-9152QCSW.js} +5 -5
- package/dist/{measurement-qhkA49pp.cjs → measurement-CgFnyeP-.cjs} +5 -5
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-C9iQRYt1.js → meshFns-CwCEIK-J.js} +6 -6
- package/dist/{meshFns-DxVxiYeE.cjs → meshFns-DI87__D1.cjs} +6 -6
- package/dist/operations/patternFns.d.ts.map +1 -1
- package/dist/{operations-DXLc82e9.cjs → operations-U2R99SDL.cjs} +5 -5
- package/dist/{operations-BELmPqGI.js → operations-o4_10ixl.js} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query/finderCore.d.ts.map +1 -1
- package/dist/query.cjs +4 -4
- package/dist/query.js +5 -5
- package/dist/{shapeFns-vG2rLms_.js → shapeFns-BvyqHHY6.js} +21 -17
- package/dist/{shapeFns-BPvrDsoI.cjs → shapeFns-DEMjdpl7.cjs} +12 -8
- package/dist/{shapeTypes-DenorQVG.cjs → shapeTypes-BN_jZhmp.cjs} +38 -58
- package/dist/{shapeTypes-DufCiUqb.js → shapeTypes-TnFxk2_h.js} +38 -58
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-CH0WqBcz.cjs → surfaceBuilders-Bj5RfOfU.cjs} +2 -2
- package/dist/{surfaceBuilders-6muSoK9E.js → surfaceBuilders-Cyr7_YMW.js} +2 -2
- package/dist/topology/booleanFns.d.ts +7 -16
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/cast.d.ts +0 -5
- package/dist/topology/cast.d.ts.map +1 -1
- package/dist/topology/colorFns.d.ts +2 -0
- package/dist/topology/colorFns.d.ts.map +1 -1
- package/dist/topology/faceTagFns.d.ts +2 -0
- package/dist/topology/faceTagFns.d.ts.map +1 -1
- package/dist/topology/meshCache.d.ts +1 -1
- package/dist/topology/meshCache.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/{topology-DNPaVy5y.cjs → topology-D2rTk0_j.cjs} +6 -6
- package/dist/{topology-BlslYPfb.js → topology-DAoT6iZV.js} +6 -6
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +19 -19
- package/package.json +1 -1
package/dist/brepjs.js
CHANGED
|
@@ -43,45 +43,45 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
43
43
|
};
|
|
44
44
|
return next();
|
|
45
45
|
};
|
|
46
|
-
import { c as castShape, D as DisposalScope, q as getKernel, e as isFace, k as isShell, l as isSolid, j as isShape3D, x as createSolid, r as createWire, d as isEdge, n as isWire } from "./shapeTypes-
|
|
47
|
-
import { u, s, t, a, b, B, v, g, C, i, f, h, m, E, F, w, o, p } from "./shapeTypes-
|
|
46
|
+
import { c as castShape, D as DisposalScope, q as getKernel, e as isFace, k as isShell, l as isSolid, j as isShape3D, x as createSolid, r as createWire, d as isEdge, n as isWire } from "./shapeTypes-TnFxk2_h.js";
|
|
47
|
+
import { u, s, t, a, b, B, v, g, C, i, f, h, m, E, F, w, o, p } from "./shapeTypes-TnFxk2_h.js";
|
|
48
48
|
import { o as ok, y as translateKernelError, e as err, p as typeCastError, q as queryError, x as validationError, B as BrepErrorCode, k as kernelError, i as ioError, d as isErr, u as unwrap } from "./errors-C_XjfNt5.js";
|
|
49
49
|
import { O, a as a2, c, b as b2, f as f2, g as g2, m as m2, h as h2, j, l, z, s as s2, t as t2, n, r, v as v2, w as w2 } from "./errors-C_XjfNt5.js";
|
|
50
50
|
import { c as vecDistance, D as DEG2RAD, H as HASH_CODE_MAX, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
51
51
|
import { R, v as v3, a as a3, b as b3, d, e, g as g3, h as h3, i as i2, k, l as l2, m as m3, o as o2 } from "./vecOps-ZDdZWbwT.js";
|
|
52
|
-
import { B as B2, d as d2, C as C2, s as s3 } from "./Blueprint-
|
|
53
|
-
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-
|
|
54
|
-
import { b as b4, g as g4, r as r2 } from "./loft-
|
|
55
|
-
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-
|
|
56
|
-
import { a as a4, b as b5, d as d3, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n2, o as o3, p as p2, q, t as t3, u as u2, v as v4, x, y, z as z2, A, B as B3, C as C3, D, E as E2 } from "./operations-
|
|
57
|
-
import { B as B4, a as a5, e as e2, C as C4, F as F2, S, f as f4, l as l3, g as g6, n as n3, k as k3, q as q2, o as o4, p as p3, r as r3 } from "./boolean2D-
|
|
52
|
+
import { B as B2, d as d2, C as C2, s as s3 } from "./Blueprint-RZ4nOpeP.js";
|
|
53
|
+
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-CRTLqcVq.js";
|
|
54
|
+
import { b as b4, g as g4, r as r2 } from "./loft-CRTLqcVq.js";
|
|
55
|
+
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-o4_10ixl.js";
|
|
56
|
+
import { a as a4, b as b5, d as d3, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n2, o as o3, p as p2, q, t as t3, u as u2, v as v4, x, y, z as z2, A, B as B3, C as C3, D, E as E2 } from "./operations-o4_10ixl.js";
|
|
57
|
+
import { B as B4, a as a5, e as e2, C as C4, F as F2, S, f as f4, l as l3, g as g6, n as n3, k as k3, q as q2, o as o4, p as p3, r as r3 } from "./boolean2D-LUH72saA.js";
|
|
58
58
|
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";
|
|
59
|
-
import { l as createTypedFinder, m as faceFinder } from "./helpers-
|
|
60
|
-
import { g as g7 } from "./helpers-
|
|
59
|
+
import { l as createTypedFinder, m as faceFinder } from "./helpers-DW9uVcCI.js";
|
|
60
|
+
import { g as g7 } from "./helpers-DW9uVcCI.js";
|
|
61
61
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
62
|
-
import { C as C5, D as D2, a as a6, S as S2, b as b6, X, Y, c as c2, d as d4, e as e3, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l4, m as m5, n as n4, o as o5, p as p4, q as q3, r as r4, s as s4, t as t4, u as u3, v as v5, w as w3, x as x2, y as y2, z as z3, _, $, a0, a1, A as A2, a2 as a22, B as B5, E as E3, a3 as a32, F as F3, G, H, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-
|
|
62
|
+
import { C as C5, D as D2, a as a6, S as S2, b as b6, X, Y, c as c2, d as d4, e as e3, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l4, m as m5, n as n4, o as o5, p as p4, q as q3, r as r4, s as s4, t as t4, u as u3, v as v5, w as w3, x as x2, y as y2, z as z3, _, $, a0, a1, A as A2, a2 as a22, B as B5, E as E3, a3 as a32, F as F3, G, H, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-CJShPJQl.js";
|
|
63
63
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
64
64
|
import { r as r5, t as t5 } from "./types-CWDdqcrq.js";
|
|
65
65
|
import { c as c3, a as a7, p as p5, r as r6, t as t6 } from "./vectors-CpZfWX0T.js";
|
|
66
|
-
import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, t as translate$1, p as propagateOriginsFromEvolution,
|
|
67
|
-
import { w as w4,
|
|
68
|
-
import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, c as cut$1, f as fuse$1, i as intersect$1, s as section$1,
|
|
69
|
-
import {
|
|
70
|
-
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-
|
|
71
|
-
import { a as a8, b as b7, e as e4, f as f7, d as d5, g as
|
|
72
|
-
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-
|
|
73
|
-
import { j as
|
|
74
|
-
import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-
|
|
75
|
-
import { l as l8, c as c4, m as m8, d as d6, f as f9, q as q5, r as r8, s as s6, p as p6, t as t9, v as
|
|
76
|
-
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-
|
|
77
|
-
import { c as c5, b as b9, e as e5, d as d7, f as f10 } from "./meshFns-
|
|
78
|
-
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-
|
|
79
|
-
import { d as d8, e as e6, f as f11, g as
|
|
80
|
-
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-
|
|
81
|
-
import { p as p7 } from "./surfaceBuilders-
|
|
66
|
+
import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, h as getBounds, t as translate$1, p as propagateOriginsFromEvolution, g as getFaceOrigins, j as applyMatrix$1, k as clone$1, l as describe$1, m as isEmpty$1, n as mirror$1, r as rotate$1, s as scale$1, o as simplify$1, q as toBREP$1, u as transformCopy$1, c as getWires } from "./shapeFns-BvyqHHY6.js";
|
|
67
|
+
import { w as w4, f as f6, x as x3, i as i5, y as y3, z as z4, A as A3, B as B6, C as C6, D as D3 } from "./shapeFns-BvyqHHY6.js";
|
|
68
|
+
import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, h as hasFaceTags, b as hasColorMetadata, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, d as sectionToFace$1, e as slice$1, g as split$1, j as fuseAll, k as cutAll } from "./booleanFns-DU8S1pUR.js";
|
|
69
|
+
import { l as l5, m as m6, n as n5, o as o6, q as q4, r as r7, t as t7, u as u4, v as v6 } from "./booleanFns-DU8S1pUR.js";
|
|
70
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-DAoT6iZV.js";
|
|
71
|
+
import { a as a8, b as b7, e as e4, f as f7, d as d5, g as g9, j as j4, s as s5, t as t8, k as k5, l as l6, v as v7, w as w5 } from "./topology-DAoT6iZV.js";
|
|
72
|
+
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-D1h3vwCh.js";
|
|
73
|
+
import { j as j5, k as k6, l as l7, f as f8, b as b8, g as g10, m as m7, o as o7 } from "./curveFns-D1h3vwCh.js";
|
|
74
|
+
import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-D309c5WF.js";
|
|
75
|
+
import { l as l8, c as c4, m as m8, d as d6, f as f9, q as q5, r as r8, s as s6, p as p6, t as t9, v as v8, u as u5, h as h6 } from "./faceFns-D309c5WF.js";
|
|
76
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-CwCEIK-J.js";
|
|
77
|
+
import { c as c5, b as b9, e as e5, d as d7, f as f10 } from "./meshFns-CwCEIK-J.js";
|
|
78
|
+
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-9152QCSW.js";
|
|
79
|
+
import { d as d8, e as e6, f as f11, g as g11, h as h7, i as i6 } from "./measurement-9152QCSW.js";
|
|
80
|
+
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-Cyr7_YMW.js";
|
|
81
|
+
import { p as p7 } from "./surfaceBuilders-Cyr7_YMW.js";
|
|
82
82
|
import { edgeFinder } from "./query.js";
|
|
83
83
|
import { BrepBugError, bug } from "./result.js";
|
|
84
|
-
import { c as c6 } from "./cornerFinder-
|
|
84
|
+
import { c as c6 } from "./cornerFinder-xTPiKfSk.js";
|
|
85
85
|
import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
|
|
86
86
|
function supportsProjection(kernel) {
|
|
87
87
|
return "projectShape" in kernel;
|
|
@@ -252,14 +252,14 @@ function buildVertexFinder(filters) {
|
|
|
252
252
|
function vertexFinder() {
|
|
253
253
|
return buildVertexFinder([]);
|
|
254
254
|
}
|
|
255
|
-
function toKernelVec(
|
|
256
|
-
return getKernel().createVector3d(
|
|
255
|
+
function toKernelVec(v9) {
|
|
256
|
+
return getKernel().createVector3d(v9[0], v9[1], v9[2]);
|
|
257
257
|
}
|
|
258
|
-
function toKernelPnt(
|
|
259
|
-
return getKernel().createPoint3d(
|
|
258
|
+
function toKernelPnt(v9) {
|
|
259
|
+
return getKernel().createPoint3d(v9[0], v9[1], v9[2]);
|
|
260
260
|
}
|
|
261
|
-
function toKernelDir(
|
|
262
|
-
return getKernel().createDirection3d(
|
|
261
|
+
function toKernelDir(v9) {
|
|
262
|
+
return getKernel().createDirection3d(v9[0], v9[1], v9[2]);
|
|
263
263
|
}
|
|
264
264
|
function fromKernelVec(ocVec) {
|
|
265
265
|
return [ocVec.X(), ocVec.Y(), ocVec.Z()];
|
|
@@ -270,24 +270,24 @@ function fromKernelPnt(ocPnt) {
|
|
|
270
270
|
function fromKernelDir(ocDir) {
|
|
271
271
|
return [ocDir.X(), ocDir.Y(), ocDir.Z()];
|
|
272
272
|
}
|
|
273
|
-
function withKernelVec(
|
|
274
|
-
const ocVec = toKernelVec(
|
|
273
|
+
function withKernelVec(v9, fn) {
|
|
274
|
+
const ocVec = toKernelVec(v9);
|
|
275
275
|
try {
|
|
276
276
|
return fn(ocVec);
|
|
277
277
|
} finally {
|
|
278
278
|
ocVec.delete();
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
function withKernelPnt(
|
|
282
|
-
const ocPnt = toKernelPnt(
|
|
281
|
+
function withKernelPnt(v9, fn) {
|
|
282
|
+
const ocPnt = toKernelPnt(v9);
|
|
283
283
|
try {
|
|
284
284
|
return fn(ocPnt);
|
|
285
285
|
} finally {
|
|
286
286
|
ocPnt.delete();
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
function withKernelDir(
|
|
290
|
-
const ocDir = toKernelDir(
|
|
289
|
+
function withKernelDir(v9, fn) {
|
|
290
|
+
const ocDir = toKernelDir(v9);
|
|
291
291
|
try {
|
|
292
292
|
return fn(ocDir);
|
|
293
293
|
} finally {
|
|
@@ -440,7 +440,7 @@ async function surfaceFromImage(blob, options = {}) {
|
|
|
440
440
|
for (let x4 = 0; x4 < w6; x4 += downsample) {
|
|
441
441
|
const idx = (y4 * w6 + x4) * 4;
|
|
442
442
|
const r9 = data[idx] ?? 0;
|
|
443
|
-
const
|
|
443
|
+
const g12 = data[idx + 1] ?? 0;
|
|
444
444
|
const b10 = data[idx + 2] ?? 0;
|
|
445
445
|
let value;
|
|
446
446
|
switch (channel) {
|
|
@@ -448,13 +448,13 @@ async function surfaceFromImage(blob, options = {}) {
|
|
|
448
448
|
value = r9 / 255;
|
|
449
449
|
break;
|
|
450
450
|
case "g":
|
|
451
|
-
value =
|
|
451
|
+
value = g12 / 255;
|
|
452
452
|
break;
|
|
453
453
|
case "b":
|
|
454
454
|
value = b10 / 255;
|
|
455
455
|
break;
|
|
456
456
|
default:
|
|
457
|
-
value = (REC601_R * r9 + REC601_G *
|
|
457
|
+
value = (REC601_R * r9 + REC601_G * g12 + REC601_B * b10) / 255;
|
|
458
458
|
break;
|
|
459
459
|
}
|
|
460
460
|
row.push(value);
|
|
@@ -1029,12 +1029,12 @@ function computeStraightSkeleton(polygon2) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
const faces = [];
|
|
1031
1031
|
for (let i7 = 0; i7 < n6; i7++) {
|
|
1032
|
-
const
|
|
1032
|
+
const j6 = (i7 + 1) % n6;
|
|
1033
1033
|
const pi = polyAt(poly, i7);
|
|
1034
|
-
const pj = polyAt(poly,
|
|
1034
|
+
const pj = polyAt(poly, j6);
|
|
1035
1035
|
const faceVerts = [pi, pj];
|
|
1036
1036
|
const faceHeights = [0, 0];
|
|
1037
|
-
const jNodes = vertexToSkelNodes[
|
|
1037
|
+
const jNodes = vertexToSkelNodes[j6];
|
|
1038
1038
|
const iNodes = vertexToSkelNodes[i7];
|
|
1039
1039
|
if (jNodes) {
|
|
1040
1040
|
for (const ni of jNodes) {
|
|
@@ -1046,8 +1046,8 @@ function computeStraightSkeleton(polygon2) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
if (iNodes) {
|
|
1049
|
-
for (let
|
|
1050
|
-
const idx = iNodes[
|
|
1049
|
+
for (let k7 = iNodes.length - 1; k7 >= 0; k7--) {
|
|
1050
|
+
const idx = iNodes[k7];
|
|
1051
1051
|
if (idx === void 0) continue;
|
|
1052
1052
|
const sn = skeletonNodes[idx];
|
|
1053
1053
|
if (!sn) continue;
|
|
@@ -1118,9 +1118,9 @@ function roof(w6, options) {
|
|
|
1118
1118
|
const triFaces = [];
|
|
1119
1119
|
for (const skFace of skeleton.faces) {
|
|
1120
1120
|
const verts3d = skFace.vertices.map(
|
|
1121
|
-
(
|
|
1122
|
-
|
|
1123
|
-
|
|
1121
|
+
(v9, i7) => [
|
|
1122
|
+
v9.x,
|
|
1123
|
+
v9.y,
|
|
1124
1124
|
(skFace.heights[i7] ?? 0) * tanAngle
|
|
1125
1125
|
]
|
|
1126
1126
|
);
|
|
@@ -1368,16 +1368,21 @@ function checkInterference(shape1, shape2, tolerance = 1e-6) {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
function checkAllInterferences(shapes, tolerance = 1e-6) {
|
|
1370
1370
|
const pairs = [];
|
|
1371
|
+
const boxes = shapes.map((s7) => getBounds(s7));
|
|
1371
1372
|
shapes.forEach((si, i7) => {
|
|
1372
|
-
for (let
|
|
1373
|
-
|
|
1373
|
+
for (let j6 = i7 + 1; j6 < shapes.length; j6++) {
|
|
1374
|
+
if (aabbDisjoint(boxes[i7], boxes[j6], tolerance)) continue;
|
|
1375
|
+
const result = unwrap(checkInterference(si, shapes[j6], tolerance));
|
|
1374
1376
|
if (result.hasInterference) {
|
|
1375
|
-
pairs.push({ i: i7, j:
|
|
1377
|
+
pairs.push({ i: i7, j: j6, result });
|
|
1376
1378
|
}
|
|
1377
1379
|
}
|
|
1378
1380
|
});
|
|
1379
1381
|
return pairs;
|
|
1380
1382
|
}
|
|
1383
|
+
function aabbDisjoint(a9, b10, tolerance) {
|
|
1384
|
+
return a9.xMax + tolerance < b10.xMin || b10.xMax + tolerance < a9.xMin || a9.yMax + tolerance < b10.yMin || b10.yMax + tolerance < a9.yMin || a9.zMax + tolerance < b10.zMin || b10.zMax + tolerance < a9.zMin;
|
|
1385
|
+
}
|
|
1381
1386
|
function parseEntities(text) {
|
|
1382
1387
|
const lines = text.split(/\r?\n/);
|
|
1383
1388
|
const entities = [];
|
|
@@ -1415,9 +1420,9 @@ function parseEntities(text) {
|
|
|
1415
1420
|
return entities;
|
|
1416
1421
|
}
|
|
1417
1422
|
function getNum(data, code, fallback = 0) {
|
|
1418
|
-
const
|
|
1419
|
-
if (
|
|
1420
|
-
const n6 = parseFloat(
|
|
1423
|
+
const v9 = data.get(code);
|
|
1424
|
+
if (v9 === void 0) return fallback;
|
|
1425
|
+
const n6 = parseFloat(v9);
|
|
1421
1426
|
return isNaN(n6) ? fallback : n6;
|
|
1422
1427
|
}
|
|
1423
1428
|
function entityToEdge(entity) {
|
|
@@ -1851,6 +1856,10 @@ function validateNotNull(shape2, label) {
|
|
|
1851
1856
|
return ok(void 0);
|
|
1852
1857
|
}
|
|
1853
1858
|
function collectInputFaceHashes(inputs) {
|
|
1859
|
+
const hasMetadata = inputs.some((s7) => {
|
|
1860
|
+
return getFaceOrigins(s7) !== void 0 || hasFaceTags(s7) || hasColorMetadata(s7);
|
|
1861
|
+
});
|
|
1862
|
+
if (!hasMetadata) return [];
|
|
1854
1863
|
const hashes = [];
|
|
1855
1864
|
for (const input of inputs) {
|
|
1856
1865
|
const faces = getKernel().iterShapes(input.wrapped, "face");
|
|
@@ -2136,8 +2145,8 @@ function offset$1(shape2, distance, tolerance = 1e-6) {
|
|
|
2136
2145
|
return err(kernelError("OFFSET_FAILED", `Offset operation failed: ${raw}`, e7));
|
|
2137
2146
|
}
|
|
2138
2147
|
}
|
|
2139
|
-
function translate(shape2,
|
|
2140
|
-
return translate$1(resolve(shape2),
|
|
2148
|
+
function translate(shape2, v9) {
|
|
2149
|
+
return translate$1(resolve(shape2), v9);
|
|
2141
2150
|
}
|
|
2142
2151
|
function rotate(shape2, angle, options) {
|
|
2143
2152
|
const pivotPoint = options?.at;
|
|
@@ -2501,7 +2510,7 @@ function createWrappedBase(val) {
|
|
|
2501
2510
|
const self = {
|
|
2502
2511
|
val,
|
|
2503
2512
|
__wrapped: true,
|
|
2504
|
-
translate: (
|
|
2513
|
+
translate: (v9) => wrapAny(translate(val, v9)),
|
|
2505
2514
|
rotate: (angle, opts) => wrapAny(rotate(val, angle, opts)),
|
|
2506
2515
|
mirror: (opts) => wrapAny(mirror(val, opts)),
|
|
2507
2516
|
scale: (factor, opts) => wrapAny(scale(val, factor, opts)),
|
|
@@ -2668,7 +2677,7 @@ export {
|
|
|
2668
2677
|
a2 as andThen,
|
|
2669
2678
|
applyGlue,
|
|
2670
2679
|
applyMatrix,
|
|
2671
|
-
|
|
2680
|
+
j5 as approximateCurve,
|
|
2672
2681
|
l8 as asTopo,
|
|
2673
2682
|
b7 as autoHeal,
|
|
2674
2683
|
b4 as basicFaceExtrusion,
|
|
@@ -2693,8 +2702,8 @@ export {
|
|
|
2693
2702
|
clone,
|
|
2694
2703
|
c as collect,
|
|
2695
2704
|
d3 as collectShapes,
|
|
2696
|
-
|
|
2697
|
-
|
|
2705
|
+
l5 as colorFaces,
|
|
2706
|
+
m6 as colorShape,
|
|
2698
2707
|
f3 as complexExtrude,
|
|
2699
2708
|
w4 as composeTransforms,
|
|
2700
2709
|
compound,
|
|
@@ -2740,7 +2749,7 @@ export {
|
|
|
2740
2749
|
curve2dTangentAt,
|
|
2741
2750
|
curveEndPoint,
|
|
2742
2751
|
curveIsClosed,
|
|
2743
|
-
|
|
2752
|
+
k6 as curveIsPeriodic,
|
|
2744
2753
|
curveLength,
|
|
2745
2754
|
l7 as curvePeriod,
|
|
2746
2755
|
curvePointAt,
|
|
@@ -2803,7 +2812,7 @@ export {
|
|
|
2803
2812
|
filledFace,
|
|
2804
2813
|
fillet,
|
|
2805
2814
|
findCurveType,
|
|
2806
|
-
|
|
2815
|
+
n5 as findFacesByTag,
|
|
2807
2816
|
n2 as findNode,
|
|
2808
2817
|
o3 as findStep,
|
|
2809
2818
|
f2 as flatMap,
|
|
@@ -2823,28 +2832,28 @@ export {
|
|
|
2823
2832
|
getBounds2D,
|
|
2824
2833
|
b8 as getCurveType,
|
|
2825
2834
|
getEdges,
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2835
|
+
o6 as getFaceColor,
|
|
2836
|
+
getFaceOrigins,
|
|
2837
|
+
q4 as getFaceTags,
|
|
2829
2838
|
getFaces,
|
|
2830
2839
|
$ as getFont,
|
|
2831
2840
|
f6 as getHashCode,
|
|
2832
2841
|
p2 as getHistoryShape,
|
|
2833
2842
|
getKernel,
|
|
2834
|
-
|
|
2843
|
+
g10 as getOrientation,
|
|
2835
2844
|
getOrientation2D,
|
|
2836
|
-
|
|
2845
|
+
r7 as getShapeColor,
|
|
2837
2846
|
g as getShapeKind,
|
|
2838
2847
|
g7 as getSingleFace,
|
|
2839
2848
|
getSurfaceType,
|
|
2840
|
-
|
|
2849
|
+
t7 as getTagMetadata,
|
|
2841
2850
|
getVertices,
|
|
2842
2851
|
getWires,
|
|
2843
2852
|
guidedSweep,
|
|
2844
2853
|
heal,
|
|
2845
2854
|
d5 as healFace,
|
|
2846
|
-
|
|
2847
|
-
|
|
2855
|
+
g9 as healSolid,
|
|
2856
|
+
j4 as healWire,
|
|
2848
2857
|
helix,
|
|
2849
2858
|
hull,
|
|
2850
2859
|
importDXF,
|
|
@@ -2912,7 +2921,7 @@ export {
|
|
|
2912
2921
|
measureArea,
|
|
2913
2922
|
e6 as measureCurvatureAt,
|
|
2914
2923
|
f11 as measureCurvatureAtMid,
|
|
2915
|
-
|
|
2924
|
+
g11 as measureDistance,
|
|
2916
2925
|
h7 as measureLength,
|
|
2917
2926
|
i6 as measureLinearProps,
|
|
2918
2927
|
measureSurfaceProps,
|
|
@@ -2975,10 +2984,10 @@ export {
|
|
|
2975
2984
|
section,
|
|
2976
2985
|
sectionToFace,
|
|
2977
2986
|
D3 as setShapeOrigin,
|
|
2978
|
-
|
|
2987
|
+
u4 as setTagMetadata,
|
|
2979
2988
|
sewShells,
|
|
2980
2989
|
shape,
|
|
2981
|
-
|
|
2990
|
+
v8 as shapeType,
|
|
2982
2991
|
s5 as sharedEdges,
|
|
2983
2992
|
shell,
|
|
2984
2993
|
simplify,
|
|
@@ -3014,7 +3023,7 @@ export {
|
|
|
3014
3023
|
surfaceFromGrid,
|
|
3015
3024
|
surfaceFromImage,
|
|
3016
3025
|
sweep,
|
|
3017
|
-
|
|
3026
|
+
v6 as tagFaces,
|
|
3018
3027
|
tangentArc,
|
|
3019
3028
|
a52 as textBlueprints,
|
|
3020
3029
|
a62 as textMetrics,
|
|
@@ -3022,7 +3031,7 @@ export {
|
|
|
3022
3031
|
threePointArc,
|
|
3023
3032
|
toBREP,
|
|
3024
3033
|
t8 as toBufferGeometryData,
|
|
3025
|
-
|
|
3034
|
+
k5 as toGroupedBufferGeometryData,
|
|
3026
3035
|
toKernelVec,
|
|
3027
3036
|
l6 as toLineGeometryData,
|
|
3028
3037
|
toSVGPathD,
|
|
@@ -3044,7 +3053,7 @@ export {
|
|
|
3044
3053
|
v2 as unwrapOr,
|
|
3045
3054
|
w2 as unwrapOrElse,
|
|
3046
3055
|
E2 as updateNode,
|
|
3047
|
-
|
|
3056
|
+
u5 as uvBounds,
|
|
3048
3057
|
h6 as uvCoordinates,
|
|
3049
3058
|
validationError,
|
|
3050
3059
|
v3 as vecAdd,
|
|
@@ -3066,7 +3075,7 @@ export {
|
|
|
3066
3075
|
vertex,
|
|
3067
3076
|
vertexFinder,
|
|
3068
3077
|
vertexPosition,
|
|
3069
|
-
|
|
3078
|
+
v7 as verticesOfEdge,
|
|
3070
3079
|
walkAssembly,
|
|
3071
3080
|
wire,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,CAAC,OAAO,EAAE,WAAW,GAAG,QAAQ,CAcxD"}
|
package/dist/core.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const types = require("./types-CA_xrgDq.cjs");
|
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
5
|
const errors = require("./errors-HU7EpHt3.cjs");
|
|
6
6
|
const vectors = require("./vectors-BwRTfFd1.cjs");
|
|
7
|
-
const shapeTypes = require("./shapeTypes-
|
|
7
|
+
const shapeTypes = require("./shapeTypes-BN_jZhmp.cjs");
|
|
8
8
|
const result = require("./result.cjs");
|
|
9
9
|
exports.resolveDirection = types.resolveDirection;
|
|
10
10
|
exports.toVec2 = types.toVec2;
|
package/dist/core.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r, t, a } from "./types-CWDdqcrq.js";
|
|
|
2
2
|
import { D, H, R, v, a as a2, b, c, d, e, f, g, h, i, j, k, l, m, n, o } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
import { O, a as a3, c as c2, b as b2, e as e2, f as f2, i as i2, d as d2, g as g2, k as k2, m as m2, h as h2, j as j2, l as l2, o as o2, q, s, t as t2, n as n2, p, u, r as r2, v as v2, w, x } from "./errors-C_XjfNt5.js";
|
|
4
4
|
import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-CpZfWX0T.js";
|
|
5
|
-
import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, n as n3, w as w2, o as o3, p as p3 } from "./shapeTypes-
|
|
5
|
+
import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, n as n3, w as w2, o as o3, p as p3 } from "./shapeTypes-TnFxk2_h.js";
|
|
6
6
|
import { BrepBugError, bug } from "./result.js";
|
|
7
7
|
export {
|
|
8
8
|
BrepBugError,
|
|
@@ -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-DW9uVcCI.js";
|
|
2
2
|
import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
const PI_2 = 2 * Math.PI;
|
|
4
4
|
function positiveHalfAngle(angle) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const shapeTypes = require("./shapeTypes-BN_jZhmp.cjs");
|
|
3
3
|
const errors = require("./errors-HU7EpHt3.cjs");
|
|
4
4
|
function getCurveType(shape) {
|
|
5
5
|
return shapeTypes.getKernel().curveType(shape.wrapped);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as getKernel, c as castShape, d as isEdge, n as isWire } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, c as castShape, d as isEdge, n as isWire } from "./shapeTypes-TnFxk2_h.js";
|
|
2
2
|
import { e as err, p as typeCastError, o as ok } from "./errors-C_XjfNt5.js";
|
|
3
3
|
function getCurveType(shape) {
|
|
4
4
|
return getKernel().curveType(shape.wrapped);
|
|
@@ -47,18 +47,18 @@ import { u as unwrap, g as isOk, e as err, x as validationError, o as ok } from
|
|
|
47
47
|
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-CpZfWX0T.js";
|
|
48
48
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
49
49
|
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";
|
|
50
|
-
import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-
|
|
51
|
-
import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-
|
|
52
|
-
import { c as curveTangentAt, a as curveEndPoint, f as flipOrientation, b as getCurveType, o as offsetWire2D } from "./curveFns-
|
|
53
|
-
import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-
|
|
54
|
-
import { D as DisposalScope, q as getKernel, r as createWire, t as createFace, e as isFace, c as castShape } from "./shapeTypes-
|
|
55
|
-
import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-
|
|
50
|
+
import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-LUH72saA.js";
|
|
51
|
+
import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-D309c5WF.js";
|
|
52
|
+
import { c as curveTangentAt, a as curveEndPoint, f as flipOrientation, b as getCurveType, o as offsetWire2D } from "./curveFns-D1h3vwCh.js";
|
|
53
|
+
import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-Cyr7_YMW.js";
|
|
54
|
+
import { D as DisposalScope, q as getKernel, r as createWire, t as createFace, e as isFace, c as castShape } from "./shapeTypes-TnFxk2_h.js";
|
|
55
|
+
import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-RZ4nOpeP.js";
|
|
56
56
|
import { bug } from "./result.js";
|
|
57
|
-
import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-
|
|
58
|
-
import { d as getEdges } from "./shapeFns-
|
|
59
|
-
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-
|
|
57
|
+
import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-DW9uVcCI.js";
|
|
58
|
+
import { d as getEdges } from "./shapeFns-BvyqHHY6.js";
|
|
59
|
+
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-CRTLqcVq.js";
|
|
60
60
|
import opentype from "opentype.js";
|
|
61
|
-
import { c as cornerFinder } from "./cornerFinder-
|
|
61
|
+
import { c as cornerFinder } from "./cornerFinder-xTPiKfSk.js";
|
|
62
62
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
63
63
|
const startPoints = new Flatbush(curves.length);
|
|
64
64
|
curves.forEach((c) => {
|
|
@@ -48,18 +48,18 @@ const errors = require("./errors-HU7EpHt3.cjs");
|
|
|
48
48
|
const vectors = require("./vectors-BwRTfFd1.cjs");
|
|
49
49
|
const types = require("./types-CA_xrgDq.cjs");
|
|
50
50
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
51
|
-
const boolean2D = require("./boolean2D-
|
|
52
|
-
const faceFns = require("./faceFns-
|
|
53
|
-
const curveFns = require("./curveFns-
|
|
54
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
55
|
-
const shapeTypes = require("./shapeTypes-
|
|
56
|
-
const Blueprint = require("./Blueprint-
|
|
51
|
+
const boolean2D = require("./boolean2D-B1uobQA4.cjs");
|
|
52
|
+
const faceFns = require("./faceFns-CPfQsXwJ.cjs");
|
|
53
|
+
const curveFns = require("./curveFns-CjhxIaTL.cjs");
|
|
54
|
+
const surfaceBuilders = require("./surfaceBuilders-Bj5RfOfU.cjs");
|
|
55
|
+
const shapeTypes = require("./shapeTypes-BN_jZhmp.cjs");
|
|
56
|
+
const Blueprint = require("./Blueprint-UqKTCIA-.cjs");
|
|
57
57
|
const result = require("./result.cjs");
|
|
58
|
-
const helpers = require("./helpers-
|
|
59
|
-
const shapeFns = require("./shapeFns-
|
|
60
|
-
const loft = require("./loft-
|
|
58
|
+
const helpers = require("./helpers-DK4mR8qk.cjs");
|
|
59
|
+
const shapeFns = require("./shapeFns-DEMjdpl7.cjs");
|
|
60
|
+
const loft = require("./loft-C6S8hKeh.cjs");
|
|
61
61
|
const opentype = require("opentype.js");
|
|
62
|
-
const cornerFinder = require("./cornerFinder-
|
|
62
|
+
const cornerFinder = require("./cornerFinder-BPV6q1Vj.cjs");
|
|
63
63
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
64
64
|
const startPoints = new boolean2D.Flatbush(curves.length);
|
|
65
65
|
curves.forEach((c) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const shapeTypes = require("./shapeTypes-BN_jZhmp.cjs");
|
|
3
3
|
const types = require("./types-CA_xrgDq.cjs");
|
|
4
4
|
const errors = require("./errors-HU7EpHt3.cjs");
|
|
5
5
|
const TOPO_ENUM = {
|
|
@@ -16,20 +16,20 @@ const TOPO_ENUM = {
|
|
|
16
16
|
const asTopo = (entity) => {
|
|
17
17
|
return TOPO_ENUM[entity];
|
|
18
18
|
};
|
|
19
|
+
const TOPO_TO_SHAPE_TYPE = {
|
|
20
|
+
vertex: "vertex",
|
|
21
|
+
edge: "edge",
|
|
22
|
+
wire: "wire",
|
|
23
|
+
face: "face",
|
|
24
|
+
shell: "shell",
|
|
25
|
+
solid: "solid",
|
|
26
|
+
solidCompound: "compsolid",
|
|
27
|
+
compound: "compound",
|
|
28
|
+
shape: "compound"
|
|
29
|
+
// fallback; 'shape' isn't used in iterShapes
|
|
30
|
+
};
|
|
19
31
|
const iterTopo = function* iterTopo2(shape, topo) {
|
|
20
|
-
const
|
|
21
|
-
vertex: "vertex",
|
|
22
|
-
edge: "edge",
|
|
23
|
-
wire: "wire",
|
|
24
|
-
face: "face",
|
|
25
|
-
shell: "shell",
|
|
26
|
-
solid: "solid",
|
|
27
|
-
solidCompound: "compsolid",
|
|
28
|
-
compound: "compound",
|
|
29
|
-
shape: "compound"
|
|
30
|
-
// fallback; 'shape' isn't used in iterShapes
|
|
31
|
-
};
|
|
32
|
-
const shapeType2 = topoToShapeType[topo];
|
|
32
|
+
const shapeType2 = TOPO_TO_SHAPE_TYPE[topo];
|
|
33
33
|
if (shapeType2) {
|
|
34
34
|
const shapes = shapeTypes.getKernel().iterShapes(shape, shapeType2);
|
|
35
35
|
for (const s of shapes) yield s;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as getKernel, c as castShape, j as isShape3D$1, n as isWire$1 } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, c as castShape, j as isShape3D$1, n as isWire$1 } from "./shapeTypes-TnFxk2_h.js";
|
|
2
2
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
3
3
|
import { e as err, p as typeCastError, o as ok, u as unwrap } from "./errors-C_XjfNt5.js";
|
|
4
4
|
const TOPO_ENUM = {
|
|
@@ -15,20 +15,20 @@ const TOPO_ENUM = {
|
|
|
15
15
|
const asTopo = (entity) => {
|
|
16
16
|
return TOPO_ENUM[entity];
|
|
17
17
|
};
|
|
18
|
+
const TOPO_TO_SHAPE_TYPE = {
|
|
19
|
+
vertex: "vertex",
|
|
20
|
+
edge: "edge",
|
|
21
|
+
wire: "wire",
|
|
22
|
+
face: "face",
|
|
23
|
+
shell: "shell",
|
|
24
|
+
solid: "solid",
|
|
25
|
+
solidCompound: "compsolid",
|
|
26
|
+
compound: "compound",
|
|
27
|
+
shape: "compound"
|
|
28
|
+
// fallback; 'shape' isn't used in iterShapes
|
|
29
|
+
};
|
|
18
30
|
const iterTopo = function* iterTopo2(shape, topo) {
|
|
19
|
-
const
|
|
20
|
-
vertex: "vertex",
|
|
21
|
-
edge: "edge",
|
|
22
|
-
wire: "wire",
|
|
23
|
-
face: "face",
|
|
24
|
-
shell: "shell",
|
|
25
|
-
solid: "solid",
|
|
26
|
-
solidCompound: "compsolid",
|
|
27
|
-
compound: "compound",
|
|
28
|
-
shape: "compound"
|
|
29
|
-
// fallback; 'shape' isn't used in iterShapes
|
|
30
|
-
};
|
|
31
|
-
const shapeType2 = topoToShapeType[topo];
|
|
31
|
+
const shapeType2 = TOPO_TO_SHAPE_TYPE[topo];
|
|
32
32
|
if (shapeType2) {
|
|
33
33
|
const shapes = getKernel().iterShapes(shape, shapeType2);
|
|
34
34
|
for (const s of shapes) yield s;
|