brepjs 8.3.0 → 8.7.4
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/Curve2D.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +13 -13
- package/dist/{Blueprint-a3ukJMG4.cjs → Blueprint-BcbOBF-9.cjs} +17 -102
- package/dist/{Blueprint-CdVaHDSx.js → Blueprint-Cmh8lKc4.js} +35 -120
- package/dist/{boolean2D-pvPIs21j.cjs → boolean2D-CqacqjME.cjs} +24 -25
- package/dist/{boolean2D-DzA0STqC.js → boolean2D-D94Axs3i.js} +23 -24
- package/dist/{booleanFns-BcQUqjUu.js → booleanFns-DdjtpcM6.js} +306 -12
- package/dist/{booleanFns-Cd414V3l.cjs → booleanFns-NtKxkiXn.cjs} +299 -5
- package/dist/brepjs.cjs +1782 -68
- package/dist/brepjs.js +2030 -317
- package/dist/core/errors.d.ts +25 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core.cjs +4 -4
- package/dist/core.js +4 -4
- package/dist/{cornerFinder-DvPiz-VR.js → cornerFinder-BBOYfsXl.js} +1 -1
- package/dist/{cornerFinder-BdKtobgb.cjs → cornerFinder-Bqy8Lw2p.cjs} +1 -1
- package/dist/{curveFns-CyHyk29c.js → curveFns-B85Glnfo.js} +19 -17
- package/dist/{curveFns-B5EQsSwv.cjs → curveFns-BXCbASW-.cjs} +6 -4
- package/dist/{drawFns-CAAE4Z88.js → drawFns-B-gJ2WUc.js} +52 -23
- package/dist/{drawFns-Mr2pghU8.cjs → drawFns-CAmFEqd1.cjs} +68 -39
- package/dist/{errors-wGhcJMpB.js → errors-Coh_5_19.js} +35 -1
- package/dist/{errors-DK1VAdP4.cjs → errors-eRQu29oc.cjs} +35 -1
- package/dist/{faceFns-ub3CugDN.js → faceFns-CltrEfOo.js} +109 -12
- package/dist/{faceFns-D1Sqnlu6.cjs → faceFns-DcndPHWm.cjs} +103 -6
- package/dist/{helpers-CP2KrBZl.cjs → helpers-CC21GeAr.cjs} +8 -9
- package/dist/{helpers-r_e-u1JM.js → helpers-SksQIreB.js} +16 -17
- package/dist/index.d.ts +20 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/io/dxfImportFns.d.ts +17 -0
- package/dist/io/dxfImportFns.d.ts.map +1 -0
- package/dist/io/objImportFns.d.ts +19 -0
- package/dist/io/objImportFns.d.ts.map +1 -0
- package/dist/io/threemfImportFns.d.ts +19 -0
- package/dist/io/threemfImportFns.d.ts.map +1 -0
- package/dist/io.cjs +5 -5
- package/dist/io.js +5 -5
- package/dist/kernel/hullOps.d.ts +23 -0
- package/dist/kernel/hullOps.d.ts.map +1 -0
- package/dist/kernel/occtAdapter.d.ts +11 -0
- package/dist/kernel/occtAdapter.d.ts.map +1 -1
- package/dist/kernel/solverAdapter.d.ts +39 -0
- package/dist/kernel/solverAdapter.d.ts.map +1 -0
- package/dist/kernel/types.d.ts +11 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/{loft-PMRx9iMG.cjs → loft-BcyyvWCj.cjs} +28 -28
- package/dist/{loft-BHn7GKm8.js → loft-CJMPx1NQ.js} +16 -16
- package/dist/{measurement-BfhEneUl.js → measurement-ByOztLxb.js} +3 -3
- package/dist/{measurement-B06hNs89.cjs → measurement-DU3ry-0Q.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-BEvGVcym.js → meshFns-D2gLyLFt.js} +3 -3
- package/dist/{meshFns-CJV_k_EQ.cjs → meshFns-DawUwI3W.cjs} +3 -3
- package/dist/{occtBoundary-CoXB2xvx.js → occtBoundary-CWzWqBCm.js} +436 -7
- package/dist/{occtBoundary-BFAaUtA7.cjs → occtBoundary-DH2VO-rq.cjs} +431 -2
- package/dist/operations/assemblyFns.d.ts +1 -0
- package/dist/operations/assemblyFns.d.ts.map +1 -1
- package/dist/operations/guidedSweepFns.d.ts +25 -0
- package/dist/operations/guidedSweepFns.d.ts.map +1 -0
- package/dist/operations/mateFns.d.ts +50 -0
- package/dist/operations/mateFns.d.ts.map +1 -0
- package/dist/operations/multiSweepFns.d.ts +32 -0
- package/dist/operations/multiSweepFns.d.ts.map +1 -0
- package/dist/operations/roofFns.d.ts +16 -0
- package/dist/operations/roofFns.d.ts.map +1 -0
- package/dist/operations/straightSkeleton.d.ts +28 -0
- package/dist/operations/straightSkeleton.d.ts.map +1 -0
- package/dist/{operations-CYGNxn5D.cjs → operations-CdELWxgv.cjs} +7 -7
- package/dist/{operations-B314mytX.js → operations-DiXo_4t9.js} +15 -15
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +13 -13
- package/dist/query.cjs +5 -5
- package/dist/query.js +7 -7
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-Z_ScEjmn.cjs → shapeFns-3RYtsUVY.cjs} +54 -21
- package/dist/{shapeFns-CWd_ASDV.js → shapeFns-4ioRrhih.js} +52 -19
- package/dist/{shapeTypes-UqVCIO_T.cjs → shapeTypes-CMjrTv36.cjs} +1 -1
- package/dist/{shapeTypes-BU2LKv2S.js → shapeTypes-D0vfRxWb.js} +13 -13
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{curveBuilders-CN72XaIQ.js → surfaceBuilders-B7Jxob8g.js} +106 -13
- package/dist/{curveBuilders-Du03_Yyf.cjs → surfaceBuilders-Xx9DRRxs.cjs} +96 -3
- package/dist/text/textBlueprints.d.ts +38 -0
- package/dist/text/textBlueprints.d.ts.map +1 -1
- package/dist/topology/api.d.ts +5 -0
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts +10 -1
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/colorFns.d.ts +38 -0
- package/dist/topology/colorFns.d.ts.map +1 -0
- package/dist/topology/curveFns.d.ts +1 -1
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/faceTagFns.d.ts +44 -0
- package/dist/topology/faceTagFns.d.ts.map +1 -0
- package/dist/topology/hullFns.d.ts +16 -0
- package/dist/topology/hullFns.d.ts.map +1 -0
- package/dist/topology/minkowskiFns.d.ts +20 -0
- package/dist/topology/minkowskiFns.d.ts.map +1 -0
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/polyhedronFns.d.ts +8 -0
- package/dist/topology/polyhedronFns.d.ts.map +1 -0
- package/dist/topology/shapeFns.d.ts +4 -0
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/surfaceBuilders.d.ts +7 -0
- package/dist/topology/surfaceBuilders.d.ts.map +1 -1
- package/dist/topology/surfaceFns.d.ts +38 -0
- package/dist/topology/surfaceFns.d.ts.map +1 -0
- package/dist/{topology-A7-jUtHB.cjs → topology-D-nGjCzV.cjs} +19 -20
- package/dist/{topology-BupialMm.js → topology-DRP9zreU.js} +8 -9
- package/dist/topology.cjs +13 -14
- package/dist/topology.js +51 -52
- package/dist/{vectors-BhfKwL9J.js → vectors-CZV4ZrTz.js} +2 -2
- package/dist/{vectors-t1XG4LpL.cjs → vectors-DwFeX0Ja.cjs} +2 -2
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +8 -7
- package/dist/cast-C107o5ow.cjs +0 -102
- package/dist/cast-D0OhP1nV.js +0 -103
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./booleanFns-
|
|
3
|
-
import { g as getKernel } from "./occtBoundary-
|
|
4
|
-
import { c as castShape, h as isShape3D, k as isSolid, e as isFace, m as isWire } from "./shapeTypes-
|
|
5
|
-
import { d as downcast } from "./
|
|
6
|
-
import { e as err, x as validationError, o as occtError, d as isErr, p as typeCastError, l as ok, u as unwrap, g as isOk, B as BrepErrorCode } from "./errors-
|
|
7
|
-
import "./curveFns-
|
|
8
|
-
import "./faceFns-ub3CugDN.js";
|
|
1
|
+
import { c as getWires, a as getFaces } from "./shapeFns-4ioRrhih.js";
|
|
2
|
+
import "./booleanFns-DdjtpcM6.js";
|
|
3
|
+
import { g as getKernel } from "./occtBoundary-CWzWqBCm.js";
|
|
4
|
+
import { c as castShape, h as isShape3D, k as isSolid, e as isFace, m as isWire } from "./shapeTypes-D0vfRxWb.js";
|
|
5
|
+
import { d as downcast } from "./faceFns-CltrEfOo.js";
|
|
6
|
+
import { e as err, x as validationError, o as occtError, d as isErr, p as typeCastError, l as ok, u as unwrap, g as isOk, B as BrepErrorCode } from "./errors-Coh_5_19.js";
|
|
7
|
+
import "./curveFns-B85Glnfo.js";
|
|
9
8
|
import { H as HASH_CODE_MAX } from "./vecOps-ZDdZWbwT.js";
|
|
10
|
-
import "./meshFns-
|
|
9
|
+
import "./meshFns-D2gLyLFt.js";
|
|
11
10
|
function toBufferGeometryData(mesh) {
|
|
12
11
|
return {
|
|
13
12
|
position: mesh.vertices,
|
package/dist/topology.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const shapeFns = require("./shapeFns-
|
|
4
|
-
const booleanFns = require("./booleanFns-
|
|
5
|
-
const topology = require("./topology-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
7
|
-
const faceFns = require("./faceFns-
|
|
8
|
-
const meshFns = require("./meshFns-
|
|
9
|
-
const cast = require("./cast-C107o5ow.cjs");
|
|
3
|
+
const shapeFns = require("./shapeFns-3RYtsUVY.cjs");
|
|
4
|
+
const booleanFns = require("./booleanFns-NtKxkiXn.cjs");
|
|
5
|
+
const topology = require("./topology-D-nGjCzV.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-BXCbASW-.cjs");
|
|
7
|
+
const faceFns = require("./faceFns-DcndPHWm.cjs");
|
|
8
|
+
const meshFns = require("./meshFns-DawUwI3W.cjs");
|
|
10
9
|
exports.getBounds = shapeFns.getBounds;
|
|
11
10
|
exports.getEdges = shapeFns.getEdges;
|
|
12
11
|
exports.getFaces = shapeFns.getFaces;
|
|
@@ -50,17 +49,24 @@ exports.getCurveType = curveFns.getCurveType;
|
|
|
50
49
|
exports.getOrientation = curveFns.getOrientation;
|
|
51
50
|
exports.interpolateCurve = curveFns.interpolateCurve;
|
|
52
51
|
exports.offsetWire2D = curveFns.offsetWire2D;
|
|
52
|
+
exports.asTopo = faceFns.asTopo;
|
|
53
|
+
exports.cast = faceFns.cast;
|
|
53
54
|
exports.classifyPointOnFace = faceFns.classifyPointOnFace;
|
|
55
|
+
exports.deserializeShape = faceFns.fromBREP;
|
|
56
|
+
exports.downcast = faceFns.downcast;
|
|
54
57
|
exports.faceCenter = faceFns.faceCenter;
|
|
55
58
|
exports.faceGeomType = faceFns.faceGeomType;
|
|
56
59
|
exports.faceOrientation = faceFns.faceOrientation;
|
|
57
60
|
exports.flipFaceOrientation = faceFns.flipFaceOrientation;
|
|
58
61
|
exports.getSurfaceType = faceFns.getSurfaceType;
|
|
59
62
|
exports.innerWires = faceFns.innerWires;
|
|
63
|
+
exports.isCompSolid = faceFns.isCompSolid;
|
|
64
|
+
exports.iterTopo = faceFns.iterTopo;
|
|
60
65
|
exports.normalAt = faceFns.normalAt;
|
|
61
66
|
exports.outerWire = faceFns.outerWire;
|
|
62
67
|
exports.pointOnSurface = faceFns.pointOnSurface;
|
|
63
68
|
exports.projectPointOnFace = faceFns.projectPointOnFace;
|
|
69
|
+
exports.shapeType = faceFns.shapeType;
|
|
64
70
|
exports.uvBounds = faceFns.uvBounds;
|
|
65
71
|
exports.uvCoordinates = faceFns.uvCoordinates;
|
|
66
72
|
exports.clearMeshCache = meshFns.clearMeshCache;
|
|
@@ -68,10 +74,3 @@ exports.createMeshCache = meshFns.createMeshCache;
|
|
|
68
74
|
exports.exportIGES = meshFns.exportIGES;
|
|
69
75
|
exports.exportSTEP = meshFns.exportSTEP;
|
|
70
76
|
exports.exportSTL = meshFns.exportSTL;
|
|
71
|
-
exports.asTopo = cast.asTopo;
|
|
72
|
-
exports.cast = cast.cast;
|
|
73
|
-
exports.deserializeShape = cast.fromBREP;
|
|
74
|
-
exports.downcast = cast.downcast;
|
|
75
|
-
exports.isCompSolid = cast.isCompSolid;
|
|
76
|
-
exports.iterTopo = cast.iterTopo;
|
|
77
|
-
exports.shapeType = cast.shapeType;
|
package/dist/topology.js
CHANGED
|
@@ -1,76 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as c5, b as
|
|
7
|
-
import { e as e6, c as c6, f as f5, d as d6, g as g4, i as i4, s as s2 } from "./cast-D0OhP1nV.js";
|
|
1
|
+
import { u, d, a, e, f, c, x, i, y, z, A, B, v } from "./shapeFns-4ioRrhih.js";
|
|
2
|
+
import { h, g } from "./booleanFns-DdjtpcM6.js";
|
|
3
|
+
import { a as a2, b, c as c2, e as e2, f as f2, d as d2, g as g2, j, s, t, k, l, v as v2, w } from "./topology-DRP9zreU.js";
|
|
4
|
+
import { j as j2, a as a3, e as e3, k as k2, i as i2, l as l2, h as h2, d as d3, c as c3, m, b as b2, g as g3, n, o } from "./curveFns-B85Glnfo.js";
|
|
5
|
+
import { l as l3, c as c4, m as m2, j as j3, d as d4, e as e4, f as f3, q, r, g as g4, k as k3, s as s2, i as i3, n as n2, o as o2, p, t as t2, v as v3, u as u2, h as h3 } from "./faceFns-CltrEfOo.js";
|
|
6
|
+
import { c as c5, b as b3, e as e5, d as d5, f as f4 } from "./meshFns-D2gLyLFt.js";
|
|
8
7
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
a2 as adjacentFaces,
|
|
9
|
+
j2 as approximateCurve,
|
|
10
|
+
l3 as asTopo,
|
|
11
|
+
b as autoHeal,
|
|
12
|
+
c4 as cast,
|
|
14
13
|
c2 as chamferDistAngleShape,
|
|
15
|
-
|
|
14
|
+
m2 as classifyPointOnFace,
|
|
16
15
|
c5 as clearMeshCache,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
b3 as createMeshCache,
|
|
17
|
+
a3 as curveEndPoint,
|
|
18
|
+
e3 as curveIsClosed,
|
|
19
|
+
k2 as curveIsPeriodic,
|
|
20
|
+
i2 as curveLength,
|
|
21
|
+
l2 as curvePeriod,
|
|
22
|
+
h2 as curvePointAt,
|
|
23
|
+
d3 as curveStartPoint,
|
|
24
|
+
c3 as curveTangentAt,
|
|
25
|
+
h as cutAll,
|
|
26
|
+
j3 as deserializeShape,
|
|
27
|
+
d4 as downcast,
|
|
29
28
|
e2 as edgesOfFace,
|
|
30
29
|
e5 as exportIGES,
|
|
31
30
|
d5 as exportSTEP,
|
|
32
31
|
f4 as exportSTL,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
e4 as faceCenter,
|
|
33
|
+
f3 as faceGeomType,
|
|
34
|
+
q as faceOrientation,
|
|
35
|
+
f2 as facesOfEdge,
|
|
36
|
+
r as flipFaceOrientation,
|
|
37
|
+
m as flipOrientation,
|
|
38
|
+
g as fuseAll,
|
|
39
|
+
u as getBounds,
|
|
40
|
+
b2 as getCurveType,
|
|
41
|
+
d as getEdges,
|
|
42
|
+
a as getFaces,
|
|
43
|
+
e as getHashCode,
|
|
44
|
+
g3 as getOrientation,
|
|
45
|
+
g4 as getSurfaceType,
|
|
46
|
+
f as getVertices,
|
|
47
|
+
c as getWires,
|
|
49
48
|
d2 as healFace,
|
|
50
|
-
|
|
49
|
+
g2 as healSolid,
|
|
51
50
|
j as healWire,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
k3 as innerWires,
|
|
52
|
+
n as interpolateCurve,
|
|
53
|
+
s2 as isCompSolid,
|
|
55
54
|
x as isEqualShape,
|
|
56
55
|
i as isSameShape,
|
|
57
56
|
y as iterEdges,
|
|
58
57
|
z as iterFaces,
|
|
59
|
-
|
|
58
|
+
i3 as iterTopo,
|
|
60
59
|
A as iterVertices,
|
|
61
60
|
B as iterWires,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
n2 as normalAt,
|
|
62
|
+
o as offsetWire2D,
|
|
63
|
+
o2 as outerWire,
|
|
65
64
|
p as pointOnSurface,
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
t2 as projectPointOnFace,
|
|
66
|
+
v3 as shapeType,
|
|
68
67
|
s as sharedEdges,
|
|
69
68
|
t as toBufferGeometryData,
|
|
70
69
|
k as toGroupedBufferGeometryData,
|
|
71
70
|
l as toLineGeometryData,
|
|
72
71
|
u2 as uvBounds,
|
|
73
|
-
|
|
72
|
+
h3 as uvCoordinates,
|
|
74
73
|
v as vertexPosition,
|
|
75
74
|
v2 as verticesOfEdge,
|
|
76
75
|
w as wiresOfFace
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as makeOcAx3, a as toVec3 } from "./occtBoundary-CWzWqBCm.js";
|
|
2
2
|
import { j as vecNormalize, f as vecIsZero, b as vecCross, v as vecAdd, n as vecScale, o as vecSub, d as vecDot, m as vecRotate, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
|
-
import { e as err, x as validationError, l as ok } from "./errors-
|
|
3
|
+
import { e as err, x as validationError, l as ok } from "./errors-Coh_5_19.js";
|
|
4
4
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
|
5
5
|
const zDir = vecNormalize(normal);
|
|
6
6
|
if (vecIsZero(zDir)) throw new Error("Plane normal must be non-zero");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
|
|
3
3
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
4
|
-
const errors = require("./errors-
|
|
4
|
+
const errors = require("./errors-eRQu29oc.cjs");
|
|
5
5
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
|
6
6
|
const zDir = vecOps.vecNormalize(normal);
|
|
7
7
|
if (vecOps.vecIsZero(zDir)) throw new Error("Plane normal must be non-zero");
|
package/dist/vectors.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
|
-
const vectors = require("./vectors-
|
|
5
|
+
const vectors = require("./vectors-DwFeX0Ja.cjs");
|
|
6
6
|
exports.resolveDirection = occtBoundary.resolveDirection;
|
|
7
7
|
exports.toVec2 = occtBoundary.toVec2;
|
|
8
8
|
exports.toVec3 = occtBoundary.toVec3;
|
package/dist/vectors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r, t, a } from "./occtBoundary-
|
|
1
|
+
import { r, t, a } from "./occtBoundary-CWzWqBCm.js";
|
|
2
2
|
import { D, R, v, a as a2, b, c, d, e, f, g, h, i, j, k, l, m, n, o } from "./vecOps-ZDdZWbwT.js";
|
|
3
|
-
import { c as c2, a as a3, p, r as r2, t as t2 } from "./vectors-
|
|
3
|
+
import { c as c2, a as a3, p, r as r2, t as t2 } from "./vectors-CZV4ZrTz.js";
|
|
4
4
|
export {
|
|
5
5
|
D as DEG2RAD,
|
|
6
6
|
R as RAD2DEG,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brepjs",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.4",
|
|
4
4
|
"description": "Web CAD library built on OpenCascade",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
@@ -184,29 +184,30 @@
|
|
|
184
184
|
"docs:api": "typedoc",
|
|
185
185
|
"docs:generate-lookup": "npx tsx scripts/generate-function-lookup.ts",
|
|
186
186
|
"docs:generate-previews": "npx tsx scripts/generate-example-previews.ts",
|
|
187
|
+
"postinstall": "bash scripts/ensure-wasm.sh",
|
|
187
188
|
"prepare": "husky"
|
|
188
189
|
},
|
|
189
190
|
"devDependencies": {
|
|
190
191
|
"@commitlint/cli": "20.4.1",
|
|
191
|
-
"@commitlint/config-conventional": "20.4.
|
|
192
|
-
"@eslint/js": "
|
|
192
|
+
"@commitlint/config-conventional": "20.4.1",
|
|
193
|
+
"@eslint/js": "10.0.1",
|
|
193
194
|
"@types/opentype.js": "1.3.9",
|
|
194
195
|
"@vitest/coverage-v8": "4.0.18",
|
|
195
196
|
"brepjs-opencascade": "*",
|
|
196
|
-
"eslint": "
|
|
197
|
+
"eslint": "10.0.0",
|
|
197
198
|
"husky": "9.1.7",
|
|
198
199
|
"knip": "5.83.1",
|
|
199
200
|
"lint-staged": "16.2.7",
|
|
200
201
|
"prettier": "3.8.1",
|
|
201
|
-
"typedoc": "0.28.
|
|
202
|
+
"typedoc": "0.28.17",
|
|
202
203
|
"typescript": "5.9.3",
|
|
203
|
-
"typescript-eslint": "8.
|
|
204
|
+
"typescript-eslint": "8.56.0",
|
|
204
205
|
"vite": "7.3.1",
|
|
205
206
|
"vite-plugin-dts": "4.5.4",
|
|
206
207
|
"vitest": "4.0.18"
|
|
207
208
|
},
|
|
208
209
|
"peerDependencies": {
|
|
209
|
-
"brepjs-opencascade": "^0.5.1 || ^0.6.0 || ^0.7.0"
|
|
210
|
+
"brepjs-opencascade": "^0.5.1 || ^0.6.0 || ^0.7.0 || ^0.8.0"
|
|
210
211
|
},
|
|
211
212
|
"dependencies": {
|
|
212
213
|
"flatbush": "4.5.0",
|
package/dist/cast-C107o5ow.cjs
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const shapeTypes = require("./shapeTypes-UqVCIO_T.cjs");
|
|
3
|
-
const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
|
|
4
|
-
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
|
-
let _topoMap = null;
|
|
6
|
-
const asTopo = (entity) => {
|
|
7
|
-
if (!_topoMap) {
|
|
8
|
-
const oc = occtBoundary.getKernel().oc;
|
|
9
|
-
const ta = oc.TopAbs_ShapeEnum;
|
|
10
|
-
_topoMap = /* @__PURE__ */ new Map([
|
|
11
|
-
["vertex", ta.TopAbs_VERTEX],
|
|
12
|
-
["edge", ta.TopAbs_EDGE],
|
|
13
|
-
["wire", ta.TopAbs_WIRE],
|
|
14
|
-
["face", ta.TopAbs_FACE],
|
|
15
|
-
["shell", ta.TopAbs_SHELL],
|
|
16
|
-
["solid", ta.TopAbs_SOLID],
|
|
17
|
-
["solidCompound", ta.TopAbs_COMPSOLID],
|
|
18
|
-
["compound", ta.TopAbs_COMPOUND],
|
|
19
|
-
["shape", ta.TopAbs_SHAPE]
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
return _topoMap.get(entity);
|
|
23
|
-
};
|
|
24
|
-
const iterTopo = function* iterTopo2(shape, topo) {
|
|
25
|
-
const topoToShapeType = {
|
|
26
|
-
vertex: "vertex",
|
|
27
|
-
edge: "edge",
|
|
28
|
-
wire: "wire",
|
|
29
|
-
face: "face",
|
|
30
|
-
shell: "shell",
|
|
31
|
-
solid: "solid",
|
|
32
|
-
solidCompound: "compsolid",
|
|
33
|
-
compound: "compound",
|
|
34
|
-
shape: "compound"
|
|
35
|
-
// fallback; 'shape' isn't used in iterShapes
|
|
36
|
-
};
|
|
37
|
-
const shapeType2 = topoToShapeType[topo];
|
|
38
|
-
if (shapeType2) {
|
|
39
|
-
const shapes = occtBoundary.getKernel().iterShapes(shape, shapeType2);
|
|
40
|
-
for (const s of shapes) yield s;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const shapeType = (shape) => {
|
|
44
|
-
if (shape.IsNull()) return errors.err(errors.typeCastError("NULL_SHAPE", "This shape has no type, it is null"));
|
|
45
|
-
return errors.ok(shape.ShapeType());
|
|
46
|
-
};
|
|
47
|
-
let _downcastMap = null;
|
|
48
|
-
function getDowncastMap() {
|
|
49
|
-
if (!_downcastMap) {
|
|
50
|
-
const oc = occtBoundary.getKernel().oc;
|
|
51
|
-
const ta = oc.TopAbs_ShapeEnum;
|
|
52
|
-
_downcastMap = /* @__PURE__ */ new Map([
|
|
53
|
-
[ta.TopAbs_VERTEX, oc.TopoDS.Vertex_1],
|
|
54
|
-
[ta.TopAbs_EDGE, oc.TopoDS.Edge_1],
|
|
55
|
-
[ta.TopAbs_WIRE, oc.TopoDS.Wire_1],
|
|
56
|
-
[ta.TopAbs_FACE, oc.TopoDS.Face_1],
|
|
57
|
-
[ta.TopAbs_SHELL, oc.TopoDS.Shell_1],
|
|
58
|
-
[ta.TopAbs_SOLID, oc.TopoDS.Solid_1],
|
|
59
|
-
[ta.TopAbs_COMPSOLID, oc.TopoDS.CompSolid_1],
|
|
60
|
-
[ta.TopAbs_COMPOUND, oc.TopoDS.Compound_1]
|
|
61
|
-
]);
|
|
62
|
-
}
|
|
63
|
-
return _downcastMap;
|
|
64
|
-
}
|
|
65
|
-
function downcast(shape) {
|
|
66
|
-
return errors.andThen(shapeType(shape), (myType) => {
|
|
67
|
-
const caster = getDowncastMap().get(myType);
|
|
68
|
-
if (!caster)
|
|
69
|
-
return errors.err(errors.typeCastError("NO_WRAPPER", "Could not find a wrapper for this shape type"));
|
|
70
|
-
return errors.ok(caster(shape));
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function cast(shape) {
|
|
74
|
-
if (shape.IsNull()) {
|
|
75
|
-
return errors.err(errors.typeCastError("NULL_SHAPE", "Cannot cast a null shape"));
|
|
76
|
-
}
|
|
77
|
-
return errors.ok(shapeTypes.castShape(shape));
|
|
78
|
-
}
|
|
79
|
-
function isShape3D(shape) {
|
|
80
|
-
return shapeTypes.isShape3D(shape);
|
|
81
|
-
}
|
|
82
|
-
function isWire(shape) {
|
|
83
|
-
return shapeTypes.isWire(shape);
|
|
84
|
-
}
|
|
85
|
-
function isCompSolid(shape) {
|
|
86
|
-
const st = shape.wrapped.ShapeType();
|
|
87
|
-
const oc = occtBoundary.getKernel().oc;
|
|
88
|
-
return st === oc.TopAbs_ShapeEnum.TopAbs_COMPSOLID;
|
|
89
|
-
}
|
|
90
|
-
function fromBREP(data) {
|
|
91
|
-
const oc = occtBoundary.getKernel().oc;
|
|
92
|
-
return cast(oc.BRepToolsWrapper.Read(data));
|
|
93
|
-
}
|
|
94
|
-
exports.asTopo = asTopo;
|
|
95
|
-
exports.cast = cast;
|
|
96
|
-
exports.downcast = downcast;
|
|
97
|
-
exports.fromBREP = fromBREP;
|
|
98
|
-
exports.isCompSolid = isCompSolid;
|
|
99
|
-
exports.isShape3D = isShape3D;
|
|
100
|
-
exports.isWire = isWire;
|
|
101
|
-
exports.iterTopo = iterTopo;
|
|
102
|
-
exports.shapeType = shapeType;
|
package/dist/cast-D0OhP1nV.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { c as castShape, h as isShape3D$1, m as isWire$1 } from "./shapeTypes-BU2LKv2S.js";
|
|
2
|
-
import { g as getKernel } from "./occtBoundary-CoXB2xvx.js";
|
|
3
|
-
import { e as err, p as typeCastError, l as ok, a as andThen } from "./errors-wGhcJMpB.js";
|
|
4
|
-
let _topoMap = null;
|
|
5
|
-
const asTopo = (entity) => {
|
|
6
|
-
if (!_topoMap) {
|
|
7
|
-
const oc = getKernel().oc;
|
|
8
|
-
const ta = oc.TopAbs_ShapeEnum;
|
|
9
|
-
_topoMap = /* @__PURE__ */ new Map([
|
|
10
|
-
["vertex", ta.TopAbs_VERTEX],
|
|
11
|
-
["edge", ta.TopAbs_EDGE],
|
|
12
|
-
["wire", ta.TopAbs_WIRE],
|
|
13
|
-
["face", ta.TopAbs_FACE],
|
|
14
|
-
["shell", ta.TopAbs_SHELL],
|
|
15
|
-
["solid", ta.TopAbs_SOLID],
|
|
16
|
-
["solidCompound", ta.TopAbs_COMPSOLID],
|
|
17
|
-
["compound", ta.TopAbs_COMPOUND],
|
|
18
|
-
["shape", ta.TopAbs_SHAPE]
|
|
19
|
-
]);
|
|
20
|
-
}
|
|
21
|
-
return _topoMap.get(entity);
|
|
22
|
-
};
|
|
23
|
-
const iterTopo = function* iterTopo2(shape, topo) {
|
|
24
|
-
const topoToShapeType = {
|
|
25
|
-
vertex: "vertex",
|
|
26
|
-
edge: "edge",
|
|
27
|
-
wire: "wire",
|
|
28
|
-
face: "face",
|
|
29
|
-
shell: "shell",
|
|
30
|
-
solid: "solid",
|
|
31
|
-
solidCompound: "compsolid",
|
|
32
|
-
compound: "compound",
|
|
33
|
-
shape: "compound"
|
|
34
|
-
// fallback; 'shape' isn't used in iterShapes
|
|
35
|
-
};
|
|
36
|
-
const shapeType2 = topoToShapeType[topo];
|
|
37
|
-
if (shapeType2) {
|
|
38
|
-
const shapes = getKernel().iterShapes(shape, shapeType2);
|
|
39
|
-
for (const s of shapes) yield s;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const shapeType = (shape) => {
|
|
43
|
-
if (shape.IsNull()) return err(typeCastError("NULL_SHAPE", "This shape has no type, it is null"));
|
|
44
|
-
return ok(shape.ShapeType());
|
|
45
|
-
};
|
|
46
|
-
let _downcastMap = null;
|
|
47
|
-
function getDowncastMap() {
|
|
48
|
-
if (!_downcastMap) {
|
|
49
|
-
const oc = getKernel().oc;
|
|
50
|
-
const ta = oc.TopAbs_ShapeEnum;
|
|
51
|
-
_downcastMap = /* @__PURE__ */ new Map([
|
|
52
|
-
[ta.TopAbs_VERTEX, oc.TopoDS.Vertex_1],
|
|
53
|
-
[ta.TopAbs_EDGE, oc.TopoDS.Edge_1],
|
|
54
|
-
[ta.TopAbs_WIRE, oc.TopoDS.Wire_1],
|
|
55
|
-
[ta.TopAbs_FACE, oc.TopoDS.Face_1],
|
|
56
|
-
[ta.TopAbs_SHELL, oc.TopoDS.Shell_1],
|
|
57
|
-
[ta.TopAbs_SOLID, oc.TopoDS.Solid_1],
|
|
58
|
-
[ta.TopAbs_COMPSOLID, oc.TopoDS.CompSolid_1],
|
|
59
|
-
[ta.TopAbs_COMPOUND, oc.TopoDS.Compound_1]
|
|
60
|
-
]);
|
|
61
|
-
}
|
|
62
|
-
return _downcastMap;
|
|
63
|
-
}
|
|
64
|
-
function downcast(shape) {
|
|
65
|
-
return andThen(shapeType(shape), (myType) => {
|
|
66
|
-
const caster = getDowncastMap().get(myType);
|
|
67
|
-
if (!caster)
|
|
68
|
-
return err(typeCastError("NO_WRAPPER", "Could not find a wrapper for this shape type"));
|
|
69
|
-
return ok(caster(shape));
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
function cast(shape) {
|
|
73
|
-
if (shape.IsNull()) {
|
|
74
|
-
return err(typeCastError("NULL_SHAPE", "Cannot cast a null shape"));
|
|
75
|
-
}
|
|
76
|
-
return ok(castShape(shape));
|
|
77
|
-
}
|
|
78
|
-
function isShape3D(shape) {
|
|
79
|
-
return isShape3D$1(shape);
|
|
80
|
-
}
|
|
81
|
-
function isWire(shape) {
|
|
82
|
-
return isWire$1(shape);
|
|
83
|
-
}
|
|
84
|
-
function isCompSolid(shape) {
|
|
85
|
-
const st = shape.wrapped.ShapeType();
|
|
86
|
-
const oc = getKernel().oc;
|
|
87
|
-
return st === oc.TopAbs_ShapeEnum.TopAbs_COMPSOLID;
|
|
88
|
-
}
|
|
89
|
-
function fromBREP(data) {
|
|
90
|
-
const oc = getKernel().oc;
|
|
91
|
-
return cast(oc.BRepToolsWrapper.Read(data));
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
isShape3D as a,
|
|
95
|
-
isWire as b,
|
|
96
|
-
cast as c,
|
|
97
|
-
downcast as d,
|
|
98
|
-
asTopo as e,
|
|
99
|
-
fromBREP as f,
|
|
100
|
-
isCompSolid as g,
|
|
101
|
-
iterTopo as i,
|
|
102
|
-
shapeType as s
|
|
103
|
-
};
|