brepjs 8.8.0 → 8.8.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/lib/vectorOperations.d.ts +1 -3
- package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-DEhjUTv4.cjs → Blueprint-BmbNUnGI.cjs} +8 -8
- package/dist/{Blueprint-BihoXiSm.js → Blueprint-C-JJkkwL.js} +8 -8
- package/dist/{boolean2D-B7MAHWWy.js → boolean2D-Dgnuy63w.js} +10 -10
- package/dist/{boolean2D-BMw-2GRS.cjs → boolean2D-q5FOdOQW.cjs} +10 -10
- package/dist/{booleanFns-CxU6z_LD.js → booleanFns--Orezl-b.js} +6 -6
- package/dist/{booleanFns-BOrYk5DW.cjs → booleanFns-CFit7JYt.cjs} +6 -6
- package/dist/brepjs.cjs +33 -148
- package/dist/brepjs.js +85 -200
- package/dist/core/errors.d.ts +0 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/occtBoundary.d.ts +1 -5
- package/dist/core/occtBoundary.d.ts.map +1 -1
- package/dist/core/planeOps.d.ts +0 -12
- package/dist/core/planeOps.d.ts.map +1 -1
- package/dist/core/vecOps.d.ts +1 -20
- package/dist/core/vecOps.d.ts.map +1 -1
- package/dist/core.cjs +4 -4
- package/dist/core.js +4 -4
- package/dist/{cornerFinder-Dh6RKiNy.js → cornerFinder-KNTFoGrm.js} +1 -1
- package/dist/{cornerFinder-DilC5fiE.cjs → cornerFinder-v4un1Fr9.cjs} +1 -1
- package/dist/{curveFns-BT8cTVDA.cjs → curveFns-6ovDM_sR.cjs} +3 -3
- package/dist/{curveFns-BJG6oqMt.js → curveFns-BhQECv8e.js} +3 -3
- package/dist/{drawFns-DcEDgZzq.cjs → drawFns-WgXeXHH1.cjs} +13 -13
- package/dist/{drawFns-aKd56G2a.js → drawFns-XwroLxdb.js} +13 -13
- package/dist/{errors-Coh_5_19.js → errors-DJ92ermb.js} +0 -2
- package/dist/{errors-eRQu29oc.cjs → errors-NNmTtM5u.cjs} +0 -2
- package/dist/{faceFns-C8ye0H_K.js → faceFns-3PDjBeW7.js} +3 -3
- package/dist/{faceFns-B8fGirMy.cjs → faceFns-CxaLWOjc.cjs} +3 -3
- package/dist/{helpers-MiJaYJMA.cjs → helpers-CRfqaW0Y.cjs} +6 -6
- package/dist/{helpers-8QToWU3Q.js → helpers-CtBCzEqs.js} +6 -6
- package/dist/io/objImportFns.d.ts.map +1 -1
- package/dist/io/threemfImportFns.d.ts.map +1 -1
- package/dist/io.cjs +5 -5
- package/dist/io.js +5 -5
- package/dist/kernel/constructorOps.d.ts +6 -0
- package/dist/kernel/constructorOps.d.ts.map +1 -1
- package/dist/kernel/hullOps.d.ts.map +1 -1
- package/dist/{loft-DCEZpu53.cjs → loft-CVb-IjEI.cjs} +7 -7
- package/dist/{loft-C810lPN5.js → loft-DMFjK6lk.js} +7 -7
- package/dist/{measurement-BFotSPr0.cjs → measurement-CecYIt3s.cjs} +3 -3
- package/dist/{measurement-BT2jlvKC.js → measurement-DHDLAH7-.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CxYud6A4.cjs → meshFns-CPNNlpbw.cjs} +3 -3
- package/dist/{meshFns-DPbSUo0q.js → meshFns-DAmWVyEp.js} +3 -3
- package/dist/{occtBoundary-ChEJsbOT.cjs → occtBoundary-Cqfsau2c.cjs} +31 -29
- package/dist/{occtBoundary-DC1yVJex.js → occtBoundary-DvBywHyU.js} +38 -36
- package/dist/operations/exporterUtils.d.ts +0 -9
- package/dist/operations/exporterUtils.d.ts.map +1 -1
- package/dist/operations/roofFns.d.ts.map +1 -1
- package/dist/{operations-CckDdRJ0.cjs → operations-BQ25CPI8.cjs} +6 -6
- package/dist/{operations-IFpeXZme.js → operations-vN0tcoaU.js} +6 -6
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query.cjs +5 -5
- package/dist/query.js +6 -6
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-CQWvvjmd.cjs → shapeFns-C785aeVn.cjs} +4 -4
- package/dist/{shapeFns-BTnqah-6.js → shapeFns-ClpALED4.js} +4 -4
- package/dist/{shapeTypes-MK0PKst9.cjs → shapeTypes-CIijJxCz.cjs} +1 -1
- package/dist/{shapeTypes-BVd0rRNe.js → shapeTypes-DnwCo942.js} +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-5Ci2Du77.cjs → surfaceBuilders-CC0ZQGix.cjs} +5 -5
- package/dist/{surfaceBuilders-nuWe3gns.js → surfaceBuilders-CrJtFu2a.js} +5 -5
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/surfaceFns.d.ts.map +1 -1
- package/dist/{topology-P-u0NDwX.js → topology-CqyxpmEh.js} +8 -8
- package/dist/{topology-C06jndeV.cjs → topology-zG8maSDK.cjs} +8 -8
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/dist/{vectors-Dp17lKnm.js → vectors-2lOjaa8N.js} +2 -2
- package/dist/{vectors-DrAMMsHl.cjs → vectors-CGLqemPY.cjs} +2 -2
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +4 -4
package/dist/brepjs.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { g as getKernel, d as toOcPnt, a as toVec3 } from "./occtBoundary-
|
|
2
|
-
import {
|
|
3
|
-
import { l as ok, y as translateOcctError, e as err, q as queryError, x as validationError, B as BrepErrorCode, o as occtError, i as ioError, d as isErr, p as typeCastError, u as unwrap } from "./errors-
|
|
4
|
-
import { O, a, c, b as b2, f
|
|
5
|
-
import { c as castShape, e as isFace, j as isShell, k as isSolid, h as isShape3D, n as gcWithScope, u as createSolid, o as createWire, d as isEdge, m as isWire } from "./shapeTypes-
|
|
6
|
-
import { D, s as s2, p, q, a as a2, b as b3, y, t as t3, z as z2, g as g2, i as i2, f as
|
|
1
|
+
import { g as getKernel, f as makeTriFace, d as toOcPnt, a as toVec3 } from "./occtBoundary-DvBywHyU.js";
|
|
2
|
+
import { h, i, j, k, r, b, t, w, l, n } from "./occtBoundary-DvBywHyU.js";
|
|
3
|
+
import { l as ok, y as translateOcctError, e as err, q as queryError, x as validationError, B as BrepErrorCode, o as occtError, i as ioError, d as isErr, p as typeCastError, u as unwrap } from "./errors-DJ92ermb.js";
|
|
4
|
+
import { O, a, c, b as b2, f, g, m, h as h2, j as j2, k as k2, z, s, t as t2, n as n2, r as r2, v, w as w2 } from "./errors-DJ92ermb.js";
|
|
5
|
+
import { c as castShape, e as isFace, j as isShell, k as isSolid, h as isShape3D, n as gcWithScope, u as createSolid, o as createWire, d as isEdge, m as isWire } from "./shapeTypes-DnwCo942.js";
|
|
6
|
+
import { D, s as s2, p, q, a as a2, b as b3, y, t as t3, z as z2, g as g2, i as i2, f as f2, l as l2, r as r3, w as w3 } from "./shapeTypes-DnwCo942.js";
|
|
7
7
|
import { c as vecDistance, D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
8
8
|
import { H, R, v as v2, a as a3, b as b4, d, e, g as g3, h as h3, i as i3, k as k3, l as l3, m as m2, o } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
-
import { B, d as d2, C, r as r4, t as t4 } from "./Blueprint-
|
|
10
|
-
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-
|
|
11
|
-
import { j as j3, k as k4, l as l4, f as
|
|
12
|
-
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-
|
|
13
|
-
import { b as b6, g as g5, r as r5 } from "./loft-
|
|
14
|
-
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-
|
|
15
|
-
import { a as a4, b as b7, d as d3, f as
|
|
16
|
-
import { B as B3, a as a5, e as e2, C as C3, F, S, f as
|
|
9
|
+
import { B, d as d2, C, r as r4, t as t4 } from "./Blueprint-C-JJkkwL.js";
|
|
10
|
+
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-BhQECv8e.js";
|
|
11
|
+
import { j as j3, k as k4, l as l4, f as f3, m as m3, b as b5, g as g4, n as n3, o as o2 } from "./curveFns-BhQECv8e.js";
|
|
12
|
+
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-DMFjK6lk.js";
|
|
13
|
+
import { b as b6, g as g5, r as r5 } from "./loft-DMFjK6lk.js";
|
|
14
|
+
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-vN0tcoaU.js";
|
|
15
|
+
import { a as a4, b as b7, d as d3, f as f4, g as g6, h as h4, i as i4, j as j4, k as k5, m as m4, n as n4, o as o3, p as p2, q as q2, t as t5, u, v as v3, x, y as y2, z as z3, A, B as B2, C as C2, D as D2, E } from "./operations-vN0tcoaU.js";
|
|
16
|
+
import { B as B3, a as a5, e as e2, C as C3, F, S, f as f5, l as l5, g as g7, n as n5, k as k6, q as q3, o as o4, p as p3, r as r6 } from "./boolean2D-Dgnuy63w.js";
|
|
17
17
|
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";
|
|
18
|
-
import { l as createTypedFinder, m as faceFinder } from "./helpers-
|
|
19
|
-
import { g as g8 } from "./helpers-
|
|
18
|
+
import { l as createTypedFinder, m as faceFinder } from "./helpers-CtBCzEqs.js";
|
|
19
|
+
import { g as g8 } from "./helpers-CtBCzEqs.js";
|
|
20
20
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
21
|
-
import { C as C4, D as D3, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as
|
|
22
|
-
import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-
|
|
23
|
-
import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-
|
|
24
|
-
import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y4, z as z5, A as A3, B as B5, C as C5, D as D4 } from "./shapeFns-
|
|
25
|
-
import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-
|
|
26
|
-
import { j as j6, k as k8, l as l7, m as m6, n as
|
|
27
|
-
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-
|
|
28
|
-
import { a as a8, b as b9, e as e5, f as
|
|
29
|
-
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-
|
|
30
|
-
import { l as l9, c as c4, m as m7, d as d6, f as
|
|
31
|
-
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-
|
|
32
|
-
import { c as c5, b as b10, e as e6, d as d7, f as
|
|
33
|
-
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-
|
|
34
|
-
import { d as d8, e as e7, f as
|
|
35
|
-
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-
|
|
36
|
-
import { p as p7 } from "./surfaceBuilders-
|
|
21
|
+
import { C as C4, D as D3, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f6, Z, g as g9, h as h5, i as i5, j as j5, k as k7, l as l6, m as m5, n as n6, o as o5, p as p4, q as q4, r as r7, s as s3, t as t6, u as u2, v as v4, w as w4, x as x2, y as y3, z as z4, _, $, a0, a1, A as A2, a2 as a22, B as B4, E as E2, a3 as a32, F as F2, G, H as H2, 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-XwroLxdb.js";
|
|
22
|
+
import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-2lOjaa8N.js";
|
|
23
|
+
import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-ClpALED4.js";
|
|
24
|
+
import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y4, z as z5, A as A3, B as B5, C as C5, D as D4 } from "./shapeFns-ClpALED4.js";
|
|
25
|
+
import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns--Orezl-b.js";
|
|
26
|
+
import { j as j6, k as k8, l as l7, m as m6, n as n7, o as o6, q as q5, r as r9, t as t8, u as u3 } from "./booleanFns--Orezl-b.js";
|
|
27
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-CqyxpmEh.js";
|
|
28
|
+
import { a as a8, b as b9, e as e5, f as f7, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l8, v as v5, w as w6 } from "./topology-CqyxpmEh.js";
|
|
29
|
+
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-3PDjBeW7.js";
|
|
30
|
+
import { l as l9, c as c4, m as m7, d as d6, f as f8, q as q6, r as r10, s as s5, p as p6, t as t10, v as v6, u as u4, h as h6 } from "./faceFns-3PDjBeW7.js";
|
|
31
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DAmWVyEp.js";
|
|
32
|
+
import { c as c5, b as b10, e as e6, d as d7, f as f9 } from "./meshFns-DAmWVyEp.js";
|
|
33
|
+
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-DHDLAH7-.js";
|
|
34
|
+
import { d as d8, e as e7, f as f10, g as g12, h as h7, i as i7 } from "./measurement-DHDLAH7-.js";
|
|
35
|
+
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-CrJtFu2a.js";
|
|
36
|
+
import { p as p7 } from "./surfaceBuilders-CrJtFu2a.js";
|
|
37
37
|
import { edgeFinder } from "./query.js";
|
|
38
38
|
import { BrepBugError, bug } from "./result.js";
|
|
39
|
-
import { c as c6 } from "./cornerFinder-
|
|
39
|
+
import { c as c6 } from "./cornerFinder-KNTFoGrm.js";
|
|
40
40
|
import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
|
|
41
41
|
const errorFactories = {
|
|
42
42
|
OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
|
|
@@ -249,35 +249,7 @@ function buildTriangulatedSurface(heights, rows, cols, dx, dy, scaleZ) {
|
|
|
249
249
|
function pt(r11, c7) {
|
|
250
250
|
const row = heights[r11];
|
|
251
251
|
const z6 = (row ? row[c7] ?? 0 : 0) * scaleZ;
|
|
252
|
-
return
|
|
253
|
-
}
|
|
254
|
-
function buildTriFace2(a9, b11, c7) {
|
|
255
|
-
const gpA = new oc.gp_Pnt_3(a9.x, a9.y, a9.z);
|
|
256
|
-
const gpB = new oc.gp_Pnt_3(b11.x, b11.y, b11.z);
|
|
257
|
-
const gpC = new oc.gp_Pnt_3(c7.x, c7.y, c7.z);
|
|
258
|
-
const e1 = new oc.BRepBuilderAPI_MakeEdge_3(gpA, gpB);
|
|
259
|
-
const e22 = new oc.BRepBuilderAPI_MakeEdge_3(gpB, gpC);
|
|
260
|
-
const e32 = new oc.BRepBuilderAPI_MakeEdge_3(gpC, gpA);
|
|
261
|
-
const wireBuilder = new oc.BRepBuilderAPI_MakeWire_1();
|
|
262
|
-
wireBuilder.Add_1(e1.Edge());
|
|
263
|
-
wireBuilder.Add_1(e22.Edge());
|
|
264
|
-
wireBuilder.Add_1(e32.Edge());
|
|
265
|
-
let face2 = null;
|
|
266
|
-
if (wireBuilder.IsDone()) {
|
|
267
|
-
const makeFace2 = new oc.BRepBuilderAPI_MakeFace_15(wireBuilder.Wire(), false);
|
|
268
|
-
if (makeFace2.IsDone()) {
|
|
269
|
-
face2 = makeFace2.Face();
|
|
270
|
-
}
|
|
271
|
-
makeFace2.delete();
|
|
272
|
-
}
|
|
273
|
-
wireBuilder.delete();
|
|
274
|
-
e1.delete();
|
|
275
|
-
e22.delete();
|
|
276
|
-
e32.delete();
|
|
277
|
-
gpA.delete();
|
|
278
|
-
gpB.delete();
|
|
279
|
-
gpC.delete();
|
|
280
|
-
return face2;
|
|
252
|
+
return [c7 * dx, r11 * dy, z6];
|
|
281
253
|
}
|
|
282
254
|
const sewing = new oc.BRepBuilderAPI_Sewing(1e-6, true, true, true, false);
|
|
283
255
|
let faceCount = 0;
|
|
@@ -288,12 +260,12 @@ function buildTriangulatedSurface(heights, rows, cols, dx, dy, scaleZ) {
|
|
|
288
260
|
const p10 = pt(r11 + 1, c7);
|
|
289
261
|
const p11 = pt(r11 + 1, c7 + 1);
|
|
290
262
|
const p01 = pt(r11, c7 + 1);
|
|
291
|
-
const f1 =
|
|
263
|
+
const f1 = makeTriFace(oc, p00, p10, p11);
|
|
292
264
|
if (f1 !== null) {
|
|
293
265
|
sewing.Add(f1);
|
|
294
266
|
faceCount++;
|
|
295
267
|
}
|
|
296
|
-
const f22 =
|
|
268
|
+
const f22 = makeTriFace(oc, p00, p11, p01);
|
|
297
269
|
if (f22 !== null) {
|
|
298
270
|
sewing.Add(f22);
|
|
299
271
|
faceCount++;
|
|
@@ -507,7 +479,7 @@ function minkowskiSphere(shape2, radius, tolerance) {
|
|
|
507
479
|
);
|
|
508
480
|
}
|
|
509
481
|
}
|
|
510
|
-
function minkowskiGeneral(shape2, tool,
|
|
482
|
+
function minkowskiGeneral(shape2, tool, tolerance) {
|
|
511
483
|
const oc = getKernel().oc;
|
|
512
484
|
try {
|
|
513
485
|
const shapeVerts = getVertices(shape2);
|
|
@@ -537,7 +509,7 @@ function minkowskiGeneral(shape2, tool, _tolerance) {
|
|
|
537
509
|
}
|
|
538
510
|
}
|
|
539
511
|
const kernel = getKernel();
|
|
540
|
-
const hullShape = kernel.hullFromPoints(sumPoints,
|
|
512
|
+
const hullShape = kernel.hullFromPoints(sumPoints, tolerance);
|
|
541
513
|
const wrapped = castShape(hullShape);
|
|
542
514
|
if (!isShape3D(wrapped)) {
|
|
543
515
|
wrapped[Symbol.dispose]();
|
|
@@ -899,12 +871,12 @@ function computeStraightSkeleton(polygon2) {
|
|
|
899
871
|
return { nodes: [], faces: [] };
|
|
900
872
|
}
|
|
901
873
|
const poly = ensureCCW(polygon2);
|
|
902
|
-
const
|
|
874
|
+
const n8 = poly.length;
|
|
903
875
|
const skeletonNodes = [];
|
|
904
|
-
const vertexToSkelNodes = Array.from({ length:
|
|
876
|
+
const vertexToSkelNodes = Array.from({ length: n8 }, () => []);
|
|
905
877
|
const lavNodes = createLav(poly);
|
|
906
878
|
let iterations = 0;
|
|
907
|
-
const maxIter =
|
|
879
|
+
const maxIter = n8 * n8 * 2;
|
|
908
880
|
while (iterations < maxIter) {
|
|
909
881
|
iterations++;
|
|
910
882
|
const activeStart = lavNodes.find((nd) => nd.active);
|
|
@@ -1024,8 +996,8 @@ function computeStraightSkeleton(polygon2) {
|
|
|
1024
996
|
}
|
|
1025
997
|
}
|
|
1026
998
|
const faces = [];
|
|
1027
|
-
for (let i8 = 0; i8 <
|
|
1028
|
-
const j8 = (i8 + 1) %
|
|
999
|
+
for (let i8 = 0; i8 < n8; i8++) {
|
|
1000
|
+
const j8 = (i8 + 1) % n8;
|
|
1029
1001
|
const pi = polyAt(poly, i8);
|
|
1030
1002
|
const pj = polyAt(poly, j8);
|
|
1031
1003
|
const faceVerts = [pi, pj];
|
|
@@ -1091,34 +1063,6 @@ function fanTriangulate(count) {
|
|
|
1091
1063
|
}
|
|
1092
1064
|
return tris;
|
|
1093
1065
|
}
|
|
1094
|
-
function buildTriFace$2(oc, a9, b11, c7) {
|
|
1095
|
-
const gpA = new oc.gp_Pnt_3(a9[0], a9[1], a9[2]);
|
|
1096
|
-
const gpB = new oc.gp_Pnt_3(b11[0], b11[1], b11[2]);
|
|
1097
|
-
const gpC = new oc.gp_Pnt_3(c7[0], c7[1], c7[2]);
|
|
1098
|
-
const e1 = new oc.BRepBuilderAPI_MakeEdge_3(gpA, gpB);
|
|
1099
|
-
const e22 = new oc.BRepBuilderAPI_MakeEdge_3(gpB, gpC);
|
|
1100
|
-
const e32 = new oc.BRepBuilderAPI_MakeEdge_3(gpC, gpA);
|
|
1101
|
-
const wireBuilder = new oc.BRepBuilderAPI_MakeWire_1();
|
|
1102
|
-
wireBuilder.Add_1(e1.Edge());
|
|
1103
|
-
wireBuilder.Add_1(e22.Edge());
|
|
1104
|
-
wireBuilder.Add_1(e32.Edge());
|
|
1105
|
-
let face2 = null;
|
|
1106
|
-
if (wireBuilder.IsDone()) {
|
|
1107
|
-
const makeFace2 = new oc.BRepBuilderAPI_MakeFace_15(wireBuilder.Wire(), false);
|
|
1108
|
-
if (makeFace2.IsDone()) {
|
|
1109
|
-
face2 = makeFace2.Face();
|
|
1110
|
-
}
|
|
1111
|
-
makeFace2.delete();
|
|
1112
|
-
}
|
|
1113
|
-
wireBuilder.delete();
|
|
1114
|
-
e1.delete();
|
|
1115
|
-
e22.delete();
|
|
1116
|
-
e32.delete();
|
|
1117
|
-
gpA.delete();
|
|
1118
|
-
gpB.delete();
|
|
1119
|
-
gpC.delete();
|
|
1120
|
-
return face2;
|
|
1121
|
-
}
|
|
1122
1066
|
function roof(w7, options) {
|
|
1123
1067
|
const angle = (options?.angle ?? 45) * (Math.PI / 180);
|
|
1124
1068
|
const tanAngle = Math.tan(angle);
|
|
@@ -1164,7 +1108,7 @@ function roof(w7, options) {
|
|
|
1164
1108
|
const nz = abx * acy - aby * acx;
|
|
1165
1109
|
const areaSq = nx * nx + ny * ny + nz * nz;
|
|
1166
1110
|
if (areaSq < 1e-20) continue;
|
|
1167
|
-
const triFace =
|
|
1111
|
+
const triFace = makeTriFace(oc, va, vb, vc);
|
|
1168
1112
|
if (triFace !== null) {
|
|
1169
1113
|
sewing.Add(triFace);
|
|
1170
1114
|
faceCount++;
|
|
@@ -1180,7 +1124,7 @@ function roof(w7, options) {
|
|
|
1180
1124
|
const va = [p0.x, p0.y, 0];
|
|
1181
1125
|
const vb = [pi.x, pi.y, 0];
|
|
1182
1126
|
const vc = [pi1.x, pi1.y, 0];
|
|
1183
|
-
const triFace =
|
|
1127
|
+
const triFace = makeTriFace(oc, va, vc, vb);
|
|
1184
1128
|
if (triFace !== null) {
|
|
1185
1129
|
sewing.Add(triFace);
|
|
1186
1130
|
faceCount++;
|
|
@@ -1455,8 +1399,8 @@ function parseEntities(text) {
|
|
|
1455
1399
|
function getNum(data, code, fallback = 0) {
|
|
1456
1400
|
const v7 = data.get(code);
|
|
1457
1401
|
if (v7 === void 0) return fallback;
|
|
1458
|
-
const
|
|
1459
|
-
return isNaN(
|
|
1402
|
+
const n8 = parseFloat(v7);
|
|
1403
|
+
return isNaN(n8) ? fallback : n8;
|
|
1460
1404
|
}
|
|
1461
1405
|
function entityToEdge(entity, oc) {
|
|
1462
1406
|
const { type, data } = entity;
|
|
@@ -1621,7 +1565,7 @@ function buildSolidFromMesh$1(vertices, faces) {
|
|
|
1621
1565
|
const vb = vertices[bi];
|
|
1622
1566
|
const vc = vertices[ci];
|
|
1623
1567
|
if (!va || !vb || !vc) continue;
|
|
1624
|
-
const triFace =
|
|
1568
|
+
const triFace = makeTriFace(oc, va, vb, vc);
|
|
1625
1569
|
if (triFace !== null) {
|
|
1626
1570
|
sewing.Add(triFace);
|
|
1627
1571
|
faceCount++;
|
|
@@ -1651,34 +1595,6 @@ function buildSolidFromMesh$1(vertices, faces) {
|
|
|
1651
1595
|
sewing.delete();
|
|
1652
1596
|
}
|
|
1653
1597
|
}
|
|
1654
|
-
function buildTriFace$1(oc, a9, b11, c7) {
|
|
1655
|
-
const gpA = new oc.gp_Pnt_3(a9[0], a9[1], a9[2]);
|
|
1656
|
-
const gpB = new oc.gp_Pnt_3(b11[0], b11[1], b11[2]);
|
|
1657
|
-
const gpC = new oc.gp_Pnt_3(c7[0], c7[1], c7[2]);
|
|
1658
|
-
const e1 = new oc.BRepBuilderAPI_MakeEdge_3(gpA, gpB);
|
|
1659
|
-
const e22 = new oc.BRepBuilderAPI_MakeEdge_3(gpB, gpC);
|
|
1660
|
-
const e32 = new oc.BRepBuilderAPI_MakeEdge_3(gpC, gpA);
|
|
1661
|
-
const wireBuilder = new oc.BRepBuilderAPI_MakeWire_1();
|
|
1662
|
-
wireBuilder.Add_1(e1.Edge());
|
|
1663
|
-
wireBuilder.Add_1(e22.Edge());
|
|
1664
|
-
wireBuilder.Add_1(e32.Edge());
|
|
1665
|
-
let face2 = null;
|
|
1666
|
-
if (wireBuilder.IsDone()) {
|
|
1667
|
-
const makeFace2 = new oc.BRepBuilderAPI_MakeFace_15(wireBuilder.Wire(), false);
|
|
1668
|
-
if (makeFace2.IsDone()) {
|
|
1669
|
-
face2 = makeFace2.Face();
|
|
1670
|
-
}
|
|
1671
|
-
makeFace2.delete();
|
|
1672
|
-
}
|
|
1673
|
-
wireBuilder.delete();
|
|
1674
|
-
e1.delete();
|
|
1675
|
-
e22.delete();
|
|
1676
|
-
e32.delete();
|
|
1677
|
-
gpA.delete();
|
|
1678
|
-
gpB.delete();
|
|
1679
|
-
gpC.delete();
|
|
1680
|
-
return face2;
|
|
1681
|
-
}
|
|
1682
1598
|
function extractFromZip(data, target) {
|
|
1683
1599
|
let eocdOffset = -1;
|
|
1684
1600
|
for (let i8 = data.length - 22; i8 >= 0; i8--) {
|
|
@@ -1775,34 +1691,6 @@ function parseModelXml(xml) {
|
|
|
1775
1691
|
}
|
|
1776
1692
|
return { vertices, triangles };
|
|
1777
1693
|
}
|
|
1778
|
-
function buildTriFace(oc, a9, b11, c7) {
|
|
1779
|
-
const gpA = new oc.gp_Pnt_3(a9[0], a9[1], a9[2]);
|
|
1780
|
-
const gpB = new oc.gp_Pnt_3(b11[0], b11[1], b11[2]);
|
|
1781
|
-
const gpC = new oc.gp_Pnt_3(c7[0], c7[1], c7[2]);
|
|
1782
|
-
const e1 = new oc.BRepBuilderAPI_MakeEdge_3(gpA, gpB);
|
|
1783
|
-
const e22 = new oc.BRepBuilderAPI_MakeEdge_3(gpB, gpC);
|
|
1784
|
-
const e32 = new oc.BRepBuilderAPI_MakeEdge_3(gpC, gpA);
|
|
1785
|
-
const wireBuilder = new oc.BRepBuilderAPI_MakeWire_1();
|
|
1786
|
-
wireBuilder.Add_1(e1.Edge());
|
|
1787
|
-
wireBuilder.Add_1(e22.Edge());
|
|
1788
|
-
wireBuilder.Add_1(e32.Edge());
|
|
1789
|
-
let face2 = null;
|
|
1790
|
-
if (wireBuilder.IsDone()) {
|
|
1791
|
-
const makeFace2 = new oc.BRepBuilderAPI_MakeFace_15(wireBuilder.Wire(), false);
|
|
1792
|
-
if (makeFace2.IsDone()) {
|
|
1793
|
-
face2 = makeFace2.Face();
|
|
1794
|
-
}
|
|
1795
|
-
makeFace2.delete();
|
|
1796
|
-
}
|
|
1797
|
-
wireBuilder.delete();
|
|
1798
|
-
e1.delete();
|
|
1799
|
-
e22.delete();
|
|
1800
|
-
e32.delete();
|
|
1801
|
-
gpA.delete();
|
|
1802
|
-
gpB.delete();
|
|
1803
|
-
gpC.delete();
|
|
1804
|
-
return face2;
|
|
1805
|
-
}
|
|
1806
1694
|
function buildSolidFromMesh(mesh2) {
|
|
1807
1695
|
const oc = getKernel().oc;
|
|
1808
1696
|
const sewing = new oc.BRepBuilderAPI_Sewing(1e-6, true, true, true, false);
|
|
@@ -1813,7 +1701,7 @@ function buildSolidFromMesh(mesh2) {
|
|
|
1813
1701
|
const vb = mesh2.vertices[v22];
|
|
1814
1702
|
const vc = mesh2.vertices[v32];
|
|
1815
1703
|
if (!va || !vb || !vc) continue;
|
|
1816
|
-
const triFace =
|
|
1704
|
+
const triFace = makeTriFace(oc, va, vb, vc);
|
|
1817
1705
|
if (triFace !== null) {
|
|
1818
1706
|
sewing.Add(triFace);
|
|
1819
1707
|
faceCount++;
|
|
@@ -2002,14 +1890,14 @@ function compound(shapeArray) {
|
|
|
2002
1890
|
function solid(facesOrShells) {
|
|
2003
1891
|
return makeSolid(facesOrShells);
|
|
2004
1892
|
}
|
|
2005
|
-
function offsetFace(
|
|
2006
|
-
return makeOffset(
|
|
1893
|
+
function offsetFace(f11, distance, tolerance) {
|
|
1894
|
+
return makeOffset(f11, distance, tolerance);
|
|
2007
1895
|
}
|
|
2008
1896
|
function sewShells(facesOrShells, ignoreType) {
|
|
2009
1897
|
return weldShellsAndFaces(facesOrShells, ignoreType);
|
|
2010
1898
|
}
|
|
2011
|
-
function addHoles(
|
|
2012
|
-
return addHolesInFace(
|
|
1899
|
+
function addHoles(f11, holes) {
|
|
1900
|
+
return addHolesInFace(f11, holes);
|
|
2013
1901
|
}
|
|
2014
1902
|
function validateNotNull(shape2, label) {
|
|
2015
1903
|
if (shape2.wrapped.IsNull()) {
|
|
@@ -2067,7 +1955,7 @@ function fillet$1(shape2, edges, radius) {
|
|
|
2067
1955
|
if (selectedEdges.length === 0) {
|
|
2068
1956
|
return err(
|
|
2069
1957
|
validationError(
|
|
2070
|
-
|
|
1958
|
+
BrepErrorCode.FILLET_NO_EDGES,
|
|
2071
1959
|
"No edges found for fillet",
|
|
2072
1960
|
void 0,
|
|
2073
1961
|
void 0,
|
|
@@ -2093,7 +1981,7 @@ function fillet$1(shape2, edges, radius) {
|
|
|
2093
1981
|
const resultOc = builder.Shape();
|
|
2094
1982
|
const cast = castShape(resultOc);
|
|
2095
1983
|
if (!isShape3D(cast)) {
|
|
2096
|
-
return err(occtError(
|
|
1984
|
+
return err(occtError(BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
2097
1985
|
}
|
|
2098
1986
|
propagateOrigins(builder, [shape2], cast);
|
|
2099
1987
|
propagateFaceTags(builder, [shape2], cast);
|
|
@@ -2137,7 +2025,7 @@ function chamfer$1(shape2, edges, distance) {
|
|
|
2137
2025
|
}
|
|
2138
2026
|
const selectedEdges = edges ?? getEdges(shape2);
|
|
2139
2027
|
if (selectedEdges.length === 0) {
|
|
2140
|
-
return err(validationError(
|
|
2028
|
+
return err(validationError(BrepErrorCode.CHAMFER_NO_EDGES, "No edges found for chamfer"));
|
|
2141
2029
|
}
|
|
2142
2030
|
try {
|
|
2143
2031
|
let getEdgeFaceMap = function() {
|
|
@@ -2189,7 +2077,7 @@ function chamfer$1(shape2, edges, distance) {
|
|
|
2189
2077
|
const resultOc = builder.Shape();
|
|
2190
2078
|
const cast = castShape(resultOc);
|
|
2191
2079
|
if (!isShape3D(cast)) {
|
|
2192
|
-
return err(occtError(
|
|
2080
|
+
return err(occtError(BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
|
|
2193
2081
|
}
|
|
2194
2082
|
propagateOrigins(builder, [shape2], cast);
|
|
2195
2083
|
propagateFaceTags(builder, [shape2], cast);
|
|
@@ -2353,9 +2241,6 @@ function resolveFaces(facesOrFn, shape2) {
|
|
|
2353
2241
|
const finder = facesOrFn(faceFinder());
|
|
2354
2242
|
return finder.findAll(shape2);
|
|
2355
2243
|
}
|
|
2356
|
-
function normalizeFilletRadius(radius) {
|
|
2357
|
-
return radius;
|
|
2358
|
-
}
|
|
2359
2244
|
function normalizeChamferDistance(distance) {
|
|
2360
2245
|
if (typeof distance === "object" && !Array.isArray(distance) && typeof distance !== "function") {
|
|
2361
2246
|
return { mode: "distAngle", distance: distance.distance, angle: distance.angle };
|
|
@@ -2384,7 +2269,7 @@ function fillet(shape2, edgesOrRadius, maybeRadius) {
|
|
|
2384
2269
|
edges = void 0;
|
|
2385
2270
|
radius = edgesOrRadius;
|
|
2386
2271
|
}
|
|
2387
|
-
return fillet$1(s6, edges,
|
|
2272
|
+
return fillet$1(s6, edges, radius);
|
|
2388
2273
|
}
|
|
2389
2274
|
function chamfer(shape2, edgesOrDistance, maybeDistance) {
|
|
2390
2275
|
const s6 = resolve(shape2);
|
|
@@ -2479,9 +2364,9 @@ function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell
|
|
|
2479
2364
|
return ok(result);
|
|
2480
2365
|
}
|
|
2481
2366
|
function extrude(face2, height) {
|
|
2482
|
-
const
|
|
2367
|
+
const f11 = resolve(face2);
|
|
2483
2368
|
const vec = typeof height === "number" ? [0, 0, height] : height;
|
|
2484
|
-
return extrude$1(
|
|
2369
|
+
return extrude$1(f11, vec);
|
|
2485
2370
|
}
|
|
2486
2371
|
function revolve(face2, options) {
|
|
2487
2372
|
const pivotPoint = options?.at ?? [0, 0, 0];
|
|
@@ -2505,10 +2390,10 @@ function resolveTargetFace(shape2, faceSpec) {
|
|
|
2505
2390
|
let best = faces[0];
|
|
2506
2391
|
let bestZ = faceCenter(best)[2];
|
|
2507
2392
|
for (let i8 = 1; i8 < faces.length; i8++) {
|
|
2508
|
-
const
|
|
2509
|
-
const z6 = faceCenter(
|
|
2393
|
+
const f11 = faces[i8];
|
|
2394
|
+
const z6 = faceCenter(f11)[2];
|
|
2510
2395
|
if (z6 > bestZ) {
|
|
2511
|
-
best =
|
|
2396
|
+
best = f11;
|
|
2512
2397
|
bestZ = z6;
|
|
2513
2398
|
}
|
|
2514
2399
|
}
|
|
@@ -2849,13 +2734,13 @@ export {
|
|
|
2849
2734
|
d3 as collectShapes,
|
|
2850
2735
|
k8 as colorFaces,
|
|
2851
2736
|
l7 as colorShape,
|
|
2852
|
-
|
|
2737
|
+
f4 as complexExtrude,
|
|
2853
2738
|
w5 as composeTransforms,
|
|
2854
2739
|
compound,
|
|
2855
2740
|
c2 as compoundSketchExtrude,
|
|
2856
2741
|
d4 as compoundSketchFace,
|
|
2857
2742
|
e3 as compoundSketchLoft,
|
|
2858
|
-
|
|
2743
|
+
f6 as compoundSketchRevolve,
|
|
2859
2744
|
b2 as computationError,
|
|
2860
2745
|
computeStraightSkeleton,
|
|
2861
2746
|
cone,
|
|
@@ -2901,7 +2786,7 @@ export {
|
|
|
2901
2786
|
curveStartPoint,
|
|
2902
2787
|
curveTangentAt,
|
|
2903
2788
|
cut,
|
|
2904
|
-
|
|
2789
|
+
f5 as cut2D,
|
|
2905
2790
|
cutAll,
|
|
2906
2791
|
l5 as cutBlueprints,
|
|
2907
2792
|
cylinder,
|
|
@@ -2916,7 +2801,7 @@ export {
|
|
|
2916
2801
|
k7 as drawFaceOutline,
|
|
2917
2802
|
l6 as drawParametricFunction,
|
|
2918
2803
|
m5 as drawPointsInterpolation,
|
|
2919
|
-
|
|
2804
|
+
n6 as drawPolysides,
|
|
2920
2805
|
o5 as drawProjection,
|
|
2921
2806
|
p4 as drawRectangle,
|
|
2922
2807
|
q4 as drawRoundedRectangle,
|
|
@@ -2944,34 +2829,34 @@ export {
|
|
|
2944
2829
|
e6 as exportIGES,
|
|
2945
2830
|
exportOBJ,
|
|
2946
2831
|
d7 as exportSTEP,
|
|
2947
|
-
|
|
2832
|
+
f9 as exportSTL,
|
|
2948
2833
|
exportThreeMF,
|
|
2949
2834
|
extrude,
|
|
2950
2835
|
face,
|
|
2951
2836
|
faceCenter,
|
|
2952
2837
|
faceFinder,
|
|
2953
|
-
|
|
2838
|
+
f8 as faceGeomType,
|
|
2954
2839
|
q6 as faceOrientation,
|
|
2955
|
-
|
|
2840
|
+
f7 as facesOfEdge,
|
|
2956
2841
|
p7 as fill,
|
|
2957
2842
|
filledFace,
|
|
2958
2843
|
fillet,
|
|
2959
|
-
|
|
2844
|
+
f3 as findCurveType,
|
|
2960
2845
|
m6 as findFacesByTag,
|
|
2961
|
-
|
|
2846
|
+
n4 as findNode,
|
|
2962
2847
|
o3 as findStep,
|
|
2963
|
-
|
|
2848
|
+
f as flatMap,
|
|
2964
2849
|
r10 as flipFaceOrientation,
|
|
2965
2850
|
m3 as flipOrientation,
|
|
2966
2851
|
_ as fontMetrics,
|
|
2967
2852
|
fromBREP,
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2853
|
+
h as fromOcDir,
|
|
2854
|
+
i as fromOcPnt,
|
|
2855
|
+
j as fromOcVec,
|
|
2971
2856
|
fuse,
|
|
2972
2857
|
g7 as fuse2D,
|
|
2973
2858
|
fuseAll,
|
|
2974
|
-
|
|
2859
|
+
n5 as fuseBlueprints,
|
|
2975
2860
|
z2 as gcWithObject,
|
|
2976
2861
|
gcWithScope,
|
|
2977
2862
|
g5 as genericSweep,
|
|
@@ -2979,7 +2864,7 @@ export {
|
|
|
2979
2864
|
getBounds2D,
|
|
2980
2865
|
b5 as getCurveType,
|
|
2981
2866
|
getEdges,
|
|
2982
|
-
|
|
2867
|
+
n7 as getFaceColor,
|
|
2983
2868
|
g10 as getFaceOrigins,
|
|
2984
2869
|
o6 as getFaceTags,
|
|
2985
2870
|
getFaces,
|
|
@@ -3011,9 +2896,9 @@ export {
|
|
|
3011
2896
|
importSVG,
|
|
3012
2897
|
importSVGPathD,
|
|
3013
2898
|
importThreeMF,
|
|
3014
|
-
|
|
2899
|
+
k as initFromOC,
|
|
3015
2900
|
innerWires,
|
|
3016
|
-
|
|
2901
|
+
n3 as interpolateCurve,
|
|
3017
2902
|
intersect,
|
|
3018
2903
|
k6 as intersect2D,
|
|
3019
2904
|
q3 as intersectBlueprints,
|
|
@@ -3037,7 +2922,7 @@ export {
|
|
|
3037
2922
|
a0 as isProjectionPlane,
|
|
3038
2923
|
isQueueEmpty,
|
|
3039
2924
|
i6 as isSameShape,
|
|
3040
|
-
|
|
2925
|
+
f2 as isShape1D,
|
|
3041
2926
|
isShape3D,
|
|
3042
2927
|
isShell,
|
|
3043
2928
|
isSolid,
|
|
@@ -3065,7 +2950,7 @@ export {
|
|
|
3065
2950
|
j2 as match,
|
|
3066
2951
|
measureArea,
|
|
3067
2952
|
e7 as measureCurvatureAt,
|
|
3068
|
-
|
|
2953
|
+
f10 as measureCurvatureAtMid,
|
|
3069
2954
|
g12 as measureDistance,
|
|
3070
2955
|
h7 as measureLength,
|
|
3071
2956
|
i7 as measureLinearProps,
|
|
@@ -3188,7 +3073,7 @@ export {
|
|
|
3188
3073
|
W as translateDrawing,
|
|
3189
3074
|
t7 as translatePlane,
|
|
3190
3075
|
t2 as tryCatch,
|
|
3191
|
-
|
|
3076
|
+
n2 as tryCatchAsync,
|
|
3192
3077
|
C2 as twistExtrude,
|
|
3193
3078
|
typeCastError,
|
|
3194
3079
|
D2 as undoLast,
|
|
@@ -3225,7 +3110,7 @@ export {
|
|
|
3225
3110
|
wireFinder,
|
|
3226
3111
|
w6 as wiresOfFace,
|
|
3227
3112
|
w as withOcDir,
|
|
3228
|
-
|
|
3229
|
-
|
|
3113
|
+
l as withOcPnt,
|
|
3114
|
+
n as withOcVec,
|
|
3230
3115
|
w3 as withScope
|
|
3231
3116
|
};
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -92,7 +92,6 @@ export declare const BrepErrorCode: {
|
|
|
92
92
|
readonly MULTI_SWEEP_INSUFFICIENT_SECTIONS: "MULTI_SWEEP_INSUFFICIENT_SECTIONS";
|
|
93
93
|
readonly MULTI_SWEEP_FAILED: "MULTI_SWEEP_FAILED";
|
|
94
94
|
readonly GUIDED_SWEEP_FAILED: "GUIDED_SWEEP_FAILED";
|
|
95
|
-
readonly FACE_TAG_INVALID: "FACE_TAG_INVALID";
|
|
96
95
|
readonly SURFACE_GRID_TOO_SMALL: "SURFACE_GRID_TOO_SMALL";
|
|
97
96
|
readonly SURFACE_GRID_JAGGED: "SURFACE_GRID_JAGGED";
|
|
98
97
|
readonly SURFACE_FAILED: "SURFACE_FAILED";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAMpD,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,IAAI,GACJ,OAAO,CAAC;AAMZ;;;;GAIG;AACH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAMpD,8CAA8C;AA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AC,MAAM,EAAE,OAAO,CAAC,EAClC,UAAU,CAAC,EAAE,MAAM,GAClB,SAAS,CAEX;AAyED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAQ9D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vec3
|
|
1
|
+
import { Vec3 } from './types.js';
|
|
2
2
|
type OcType = any;
|
|
3
3
|
/** Convert Vec3 to OCCT gp_Vec. Caller must call .delete() when done. */
|
|
4
4
|
export declare function toOcVec(v: Vec3): OcType;
|
|
@@ -6,10 +6,6 @@ export declare function toOcVec(v: Vec3): OcType;
|
|
|
6
6
|
export declare function toOcPnt(v: Vec3): OcType;
|
|
7
7
|
/** Convert Vec3 to OCCT gp_Dir. Caller must call .delete() when done. */
|
|
8
8
|
export declare function toOcDir(v: Vec3): OcType;
|
|
9
|
-
/** Convert PointInput to OCCT gp_Pnt. Caller must call .delete() when done. */
|
|
10
|
-
export declare function pointToOcPnt(p: PointInput): OcType;
|
|
11
|
-
/** Convert PointInput to OCCT gp_Dir. Caller must call .delete() when done. */
|
|
12
|
-
export declare function pointToOcDir(p: PointInput): OcType;
|
|
13
9
|
/** Extract Vec3 from OCCT gp_Vec */
|
|
14
10
|
export declare function fromOcVec(ocVec: OcType): Vec3;
|
|
15
11
|
/** Extract Vec3 from OCCT gp_Pnt */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"occtBoundary.d.ts","sourceRoot":"","sources":["../../src/core/occtBoundary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"occtBoundary.d.ts","sourceRoot":"","sources":["../../src/core/occtBoundary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,KAAK,MAAM,GAAG,GAAG,CAAC;AAMlB,yEAAyE;A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MAAM,CAiBvE"}
|
package/dist/core/planeOps.d.ts
CHANGED
|
@@ -30,14 +30,8 @@ export declare function resolvePlane(input: PlaneInput, origin?: PointInput | nu
|
|
|
30
30
|
export declare function planeToWorld(plane: Plane, local: Vec2): Vec3;
|
|
31
31
|
/** Convert 3D world coordinates to 2D local coordinates on the plane. */
|
|
32
32
|
export declare function planeToLocal(plane: Plane, world: Vec3): Vec2;
|
|
33
|
-
/** Convert 3D local coordinates to 3D world coordinates on the plane. */
|
|
34
|
-
export declare function planeToWorldVec3(plane: Plane, local: Vec3): Vec3;
|
|
35
|
-
/** Convert 3D world coordinates to 3D local coordinates on the plane. */
|
|
36
|
-
export declare function planeToLocalVec3(plane: Plane, world: Vec3): Vec3;
|
|
37
33
|
/** Translate a plane by a vector. */
|
|
38
34
|
export declare function translatePlane(plane: Plane, offset: Vec3): Plane;
|
|
39
|
-
/** Translate a plane to a new origin. */
|
|
40
|
-
export declare function translatePlaneTo(plane: Plane, newOrigin: Vec3): Plane;
|
|
41
35
|
/**
|
|
42
36
|
* Pivot a plane by rotating its axes around a world-space axis.
|
|
43
37
|
*
|
|
@@ -45,10 +39,4 @@ export declare function translatePlaneTo(plane: Plane, newOrigin: Vec3): Plane;
|
|
|
45
39
|
* @param axis - World-space axis to rotate around.
|
|
46
40
|
*/
|
|
47
41
|
export declare function pivotPlane(plane: Plane, angleDeg: number, axis?: Vec3): Plane;
|
|
48
|
-
/**
|
|
49
|
-
* Rotate the X/Y axes of a plane around its normal (Z direction).
|
|
50
|
-
*
|
|
51
|
-
* @param angleDeg - Rotation angle in **degrees**.
|
|
52
|
-
*/
|
|
53
|
-
export declare function rotatePlane2DAxes(plane: Plane, angleDeg: number): Plane;
|
|
54
42
|
//# sourceMappingURL=planeOps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planeOps.d.ts","sourceRoot":"","sources":["../../src/core/planeOps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,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