brepjs 10.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d/blueprints/Blueprint.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-B6UDSVJN.cjs → Blueprint-BbgdNjMG.cjs} +5 -5
- package/dist/{Blueprint-QlgNyzP7.js → Blueprint-CFUlMh67.js} +5 -5
- package/dist/{boolean2D-Gr-OYFsO.js → boolean2D-DNKu6gA7.js} +10 -9
- package/dist/{boolean2D-DZxTrl9x.cjs → boolean2D-Y4yATWl7.cjs} +10 -9
- package/dist/{booleanFns-CR6vk8qv.cjs → booleanFns-BaMEij5u.cjs} +7 -4
- package/dist/{booleanFns-BEIrQNUH.js → booleanFns-DOonidp8.js} +7 -4
- package/dist/brepjs.cjs +37 -16
- package/dist/brepjs.js +83 -62
- package/dist/core/shapeTypes.d.ts +106 -0
- package/dist/core/shapeTypes.d.ts.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-DlwI0iHu.cjs → cornerFinder-CDkc5qfD.cjs} +1 -1
- package/dist/{cornerFinder-Bh_jsF_w.js → cornerFinder-CcNE4HxW.js} +1 -1
- package/dist/{curveFns-CNkC51il.js → curveFns-BMXtgX1x.js} +1 -1
- package/dist/{curveFns-jnEgxP5N.cjs → curveFns-Dtaf2CvG.cjs} +1 -1
- package/dist/{drawFns-D0Wg1cy7.cjs → drawFns-B-r3aaqa.cjs} +10 -10
- package/dist/{drawFns-Ex_DyuI1.js → drawFns-c8p_xTP0.js} +10 -10
- package/dist/{faceFns-DKkW12_x.js → faceFns-Cz71BDro.js} +1 -1
- package/dist/{faceFns-B10DQksf.cjs → faceFns-DVo4NiOl.cjs} +1 -1
- package/dist/{helpers-4kc7odPn.cjs → helpers-BOPjTzbq.cjs} +4 -4
- package/dist/{helpers-BPzEhlP8.js → helpers-Cg_I5KyH.js} +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +3 -3
- package/dist/io.js +3 -3
- package/dist/{loft-CfNUe13X.js → loft-Cg7rdMf1.js} +9 -5
- package/dist/{loft-ByirrIHz.cjs → loft-DCPqcyZE.cjs} +9 -5
- package/dist/{measurement-BMfzcJ2H.js → measurement-BN6FiFD4.js} +2 -2
- package/dist/{measurement-CpWygrRd.cjs → measurement-Crexq3aQ.cjs} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-DRZcKqgZ.cjs → meshFns-d6Ta_uov.cjs} +2 -2
- package/dist/{meshFns-CbuZpQmE.js → meshFns-kdGtj-un.js} +2 -2
- package/dist/operations/api.d.ts +3 -3
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/extrude.d.ts +3 -3
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +3 -3
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/{operations-DBJ9dkjD.js → operations-BaSVJrqt.js} +5 -5
- package/dist/{operations-DAt3B8iS.cjs → operations-C9rwsqkO.cjs} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query.cjs +4 -4
- package/dist/query.js +5 -5
- package/dist/{shapeFns-BrfVnd9Q.js → shapeFns-BbnD8E_4.js} +2 -2
- package/dist/{shapeFns-vPR93KGT.cjs → shapeFns-vrqpeRIf.cjs} +2 -2
- package/dist/{shapeTypes-C1z8HWJf.js → shapeTypes-BkPK8XIl.js} +57 -9
- package/dist/{shapeTypes-BxAzFSfl.cjs → shapeTypes-CHvr4HNj.cjs} +48 -0
- package/dist/sketching/CompoundSketch.d.ts +2 -2
- package/dist/sketching/CompoundSketch.d.ts.map +1 -1
- package/dist/sketching/Sketch.d.ts.map +1 -1
- package/dist/sketching/draw.d.ts.map +1 -1
- package/dist/sketching/sketchFns.d.ts +3 -3
- package/dist/sketching/sketchFns.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-B-yoDL2e.js → surfaceBuilders-DCThAtoQ.js} +5 -3
- package/dist/{surfaceBuilders-BkTPbZFl.cjs → surfaceBuilders-DIPPckQg.cjs} +5 -3
- package/dist/topology/adjacencyFns.d.ts +3 -2
- package/dist/topology/adjacencyFns.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/compoundOpsFns.d.ts.map +1 -1
- package/dist/topology/faceFns.d.ts +5 -5
- package/dist/topology/faceFns.d.ts.map +1 -1
- package/dist/topology/healingFns.d.ts +2 -2
- package/dist/topology/healingFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +32 -13
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +6 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/solidBuilders.d.ts +8 -8
- package/dist/topology/solidBuilders.d.ts.map +1 -1
- package/dist/topology/surfaceBuilders.d.ts +7 -7
- package/dist/topology/surfaceBuilders.d.ts.map +1 -1
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-CBZcJ5pS.cjs → topology-BK5M8FlG.cjs} +11 -6
- package/dist/{topology-Bt4qS8pS.js → topology-DoSBNUPF.js} +11 -6
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY9C,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAQvE,OAAO,KAAK,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprint.ts"],"names":[],"mappings":"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"}
|
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Blueprint = require("./Blueprint-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const Blueprint = require("./Blueprint-BbgdNjMG.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-Y4yATWl7.cjs");
|
|
5
5
|
function reverseCurve(curve) {
|
|
6
6
|
const cloned = curve.clone();
|
|
7
7
|
cloned.reverse();
|
package/dist/2d.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Blueprint } from "./Blueprint-
|
|
2
|
-
import { d, C } from "./Blueprint-
|
|
3
|
-
import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-
|
|
1
|
+
import { B as Blueprint } from "./Blueprint-CFUlMh67.js";
|
|
2
|
+
import { d, C } from "./Blueprint-CFUlMh67.js";
|
|
3
|
+
import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-DNKu6gA7.js";
|
|
4
4
|
function reverseCurve(curve) {
|
|
5
5
|
const cloned = curve.clone();
|
|
6
6
|
cloned.reverse();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
3
3
|
const types = require("./types-CA_xrgDq.cjs");
|
|
4
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
-
const faceFns = require("./faceFns-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
4
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
5
|
+
const faceFns = require("./faceFns-DVo4NiOl.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-Dtaf2CvG.cjs");
|
|
7
7
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
8
|
-
const helpers = require("./helpers-
|
|
8
|
+
const helpers = require("./helpers-BOPjTzbq.cjs");
|
|
9
9
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
10
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
11
11
|
const result = require("./result.cjs");
|
|
12
12
|
function makePlane(plane, origin) {
|
|
13
13
|
if (plane && typeof plane !== "string") {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as resolvePlane } from "./vectors-B8RRTytu.js";
|
|
2
2
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
3
|
-
import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-
|
|
4
|
-
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-
|
|
5
|
-
import { g as getOrientation } from "./curveFns-
|
|
3
|
+
import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-BkPK8XIl.js";
|
|
4
|
+
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-Cz71BDro.js";
|
|
5
|
+
import { g as getOrientation } from "./curveFns-BMXtgX1x.js";
|
|
6
6
|
import { o as ok, e as err, b as computationError, u as unwrap, x as validationError } from "./errors-lBwyc8YG.js";
|
|
7
|
-
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-
|
|
7
|
+
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-Cg_I5KyH.js";
|
|
8
8
|
import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
9
|
+
import { m as makeFace } from "./surfaceBuilders-DCThAtoQ.js";
|
|
10
10
|
import { bug } from "./result.js";
|
|
11
11
|
function makePlane(plane, origin) {
|
|
12
12
|
if (plane && typeof plane !== "string") {
|
|
@@ -45,16 +45,16 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
45
45
|
};
|
|
46
46
|
import { a as createPlane } from "./vectors-B8RRTytu.js";
|
|
47
47
|
import { o as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-lBwyc8YG.js";
|
|
48
|
-
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-
|
|
48
|
+
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-Cz71BDro.js";
|
|
49
49
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
50
50
|
import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
|
|
51
|
-
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-
|
|
52
|
-
import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-
|
|
53
|
-
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-
|
|
54
|
-
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-
|
|
51
|
+
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-Cg7rdMf1.js";
|
|
52
|
+
import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-BkPK8XIl.js";
|
|
53
|
+
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-BMXtgX1x.js";
|
|
54
|
+
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-DCThAtoQ.js";
|
|
55
55
|
import { bug } from "./result.js";
|
|
56
|
-
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-
|
|
57
|
-
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-
|
|
56
|
+
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-Cg_I5KyH.js";
|
|
57
|
+
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-CFUlMh67.js";
|
|
58
58
|
const intersectCurves = (first, second, precision = 1e-9) => {
|
|
59
59
|
if (first.boundingBox.isOut(second.boundingBox))
|
|
60
60
|
return ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
|
|
@@ -1009,10 +1009,11 @@ class Sketch {
|
|
|
1009
1009
|
*/
|
|
1010
1010
|
face() {
|
|
1011
1011
|
let face;
|
|
1012
|
+
const closedWire = this.wire;
|
|
1012
1013
|
if (!this.baseFace) {
|
|
1013
|
-
face = unwrap(makeFace(
|
|
1014
|
+
face = unwrap(makeFace(closedWire));
|
|
1014
1015
|
} else {
|
|
1015
|
-
face = makeNewFaceWithinFace(this.baseFace,
|
|
1016
|
+
face = makeNewFaceWithinFace(this.baseFace, closedWire);
|
|
1016
1017
|
}
|
|
1017
1018
|
return face;
|
|
1018
1019
|
}
|
|
@@ -46,16 +46,16 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
46
46
|
};
|
|
47
47
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
48
48
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
49
|
-
const faceFns = require("./faceFns-
|
|
49
|
+
const faceFns = require("./faceFns-DVo4NiOl.cjs");
|
|
50
50
|
const types = require("./types-CA_xrgDq.cjs");
|
|
51
51
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
52
|
-
const loft = require("./loft-
|
|
53
|
-
const shapeTypes = require("./shapeTypes-
|
|
54
|
-
const curveFns = require("./curveFns-
|
|
55
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
52
|
+
const loft = require("./loft-DCPqcyZE.cjs");
|
|
53
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
54
|
+
const curveFns = require("./curveFns-Dtaf2CvG.cjs");
|
|
55
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
56
56
|
const result = require("./result.cjs");
|
|
57
|
-
const helpers = require("./helpers-
|
|
58
|
-
const Blueprint = require("./Blueprint-
|
|
57
|
+
const helpers = require("./helpers-BOPjTzbq.cjs");
|
|
58
|
+
const Blueprint = require("./Blueprint-BbgdNjMG.cjs");
|
|
59
59
|
const intersectCurves = (first, second, precision = 1e-9) => {
|
|
60
60
|
if (first.boundingBox.isOut(second.boundingBox))
|
|
61
61
|
return errors.ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
|
|
@@ -1010,10 +1010,11 @@ class Sketch {
|
|
|
1010
1010
|
*/
|
|
1011
1011
|
face() {
|
|
1012
1012
|
let face;
|
|
1013
|
+
const closedWire = this.wire;
|
|
1013
1014
|
if (!this.baseFace) {
|
|
1014
|
-
face = errors.unwrap(surfaceBuilders.makeFace(
|
|
1015
|
+
face = errors.unwrap(surfaceBuilders.makeFace(closedWire));
|
|
1015
1016
|
} else {
|
|
1016
|
-
face = surfaceBuilders.makeNewFaceWithinFace(this.baseFace,
|
|
1017
|
+
face = surfaceBuilders.makeNewFaceWithinFace(this.baseFace, closedWire);
|
|
1017
1018
|
}
|
|
1018
1019
|
return face;
|
|
1019
1020
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
3
3
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
4
4
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const shapeFns = require("./shapeFns-
|
|
7
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
+
const shapeFns = require("./shapeFns-vrqpeRIf.cjs");
|
|
7
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
8
8
|
const shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
const tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function hasFaceTags(shape) {
|
|
@@ -551,7 +551,10 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
551
551
|
}
|
|
552
552
|
const outer = wires[outerIdx];
|
|
553
553
|
const holes = wires.filter((_, i) => i !== outerIdx);
|
|
554
|
-
return surfaceBuilders.makeFace(
|
|
554
|
+
return surfaceBuilders.makeFace(
|
|
555
|
+
outer,
|
|
556
|
+
holes.length > 0 ? holes : void 0
|
|
557
|
+
);
|
|
555
558
|
}
|
|
556
559
|
function split(shape, tools) {
|
|
557
560
|
if (tools.length === 0) return errors.ok(shape);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-BkPK8XIl.js";
|
|
2
2
|
import { o as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, k as kernelError } from "./errors-lBwyc8YG.js";
|
|
3
3
|
import { r as resolvePlane } from "./vectors-B8RRTytu.js";
|
|
4
4
|
import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, g as getFaceOrigins, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-
|
|
6
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
5
|
+
import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, g as getFaceOrigins, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-BbnD8E_4.js";
|
|
6
|
+
import { m as makeFace } from "./surfaceBuilders-DCThAtoQ.js";
|
|
7
7
|
const shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
const tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
function hasFaceTags(shape) {
|
|
@@ -550,7 +550,10 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
550
550
|
}
|
|
551
551
|
const outer = wires[outerIdx];
|
|
552
552
|
const holes = wires.filter((_, i) => i !== outerIdx);
|
|
553
|
-
return makeFace(
|
|
553
|
+
return makeFace(
|
|
554
|
+
outer,
|
|
555
|
+
holes.length > 0 ? holes : void 0
|
|
556
|
+
);
|
|
554
557
|
}
|
|
555
558
|
function split(shape, tools) {
|
|
556
559
|
if (tools.length === 0) return ok(shape);
|
package/dist/brepjs.cjs
CHANGED
|
@@ -45,30 +45,30 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
45
45
|
return next();
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
48
|
-
const shapeTypes = require("./shapeTypes-
|
|
48
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
49
49
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
50
50
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
51
|
-
const Blueprint = require("./Blueprint-
|
|
52
|
-
const loft$2 = require("./loft-
|
|
53
|
-
const operations = require("./operations-
|
|
54
|
-
const boolean2D = require("./boolean2D-
|
|
51
|
+
const Blueprint = require("./Blueprint-BbgdNjMG.cjs");
|
|
52
|
+
const loft$2 = require("./loft-DCPqcyZE.cjs");
|
|
53
|
+
const operations = require("./operations-C9rwsqkO.cjs");
|
|
54
|
+
const boolean2D = require("./boolean2D-Y4yATWl7.cjs");
|
|
55
55
|
const _2d = require("./2d.cjs");
|
|
56
|
-
const helpers = require("./helpers-
|
|
56
|
+
const helpers = require("./helpers-BOPjTzbq.cjs");
|
|
57
57
|
const io = require("./io.cjs");
|
|
58
|
-
const drawFns = require("./drawFns-
|
|
58
|
+
const drawFns = require("./drawFns-B-r3aaqa.cjs");
|
|
59
59
|
const types = require("./types-CA_xrgDq.cjs");
|
|
60
60
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
61
|
-
const shapeFns = require("./shapeFns-
|
|
62
|
-
const booleanFns = require("./booleanFns-
|
|
63
|
-
const topology = require("./topology-
|
|
64
|
-
const curveFns = require("./curveFns-
|
|
65
|
-
const faceFns = require("./faceFns-
|
|
66
|
-
const meshFns = require("./meshFns-
|
|
67
|
-
const measurement = require("./measurement-
|
|
68
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
61
|
+
const shapeFns = require("./shapeFns-vrqpeRIf.cjs");
|
|
62
|
+
const booleanFns = require("./booleanFns-BaMEij5u.cjs");
|
|
63
|
+
const topology = require("./topology-BK5M8FlG.cjs");
|
|
64
|
+
const curveFns = require("./curveFns-Dtaf2CvG.cjs");
|
|
65
|
+
const faceFns = require("./faceFns-DVo4NiOl.cjs");
|
|
66
|
+
const meshFns = require("./meshFns-d6Ta_uov.cjs");
|
|
67
|
+
const measurement = require("./measurement-Crexq3aQ.cjs");
|
|
68
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
69
69
|
const query = require("./query.cjs");
|
|
70
70
|
const result = require("./result.cjs");
|
|
71
|
-
const cornerFinder = require("./cornerFinder-
|
|
71
|
+
const cornerFinder = require("./cornerFinder-CDkc5qfD.cjs");
|
|
72
72
|
const worker = require("./worker.cjs");
|
|
73
73
|
function supportsProjection(kernel) {
|
|
74
74
|
return "projectShape" in kernel;
|
|
@@ -1876,6 +1876,17 @@ function tangentArc(startPoint, startTgt, endPoint) {
|
|
|
1876
1876
|
function wire(listOfEdges) {
|
|
1877
1877
|
return surfaceBuilders.assembleWire(listOfEdges);
|
|
1878
1878
|
}
|
|
1879
|
+
function wireLoop(listOfEdges) {
|
|
1880
|
+
return errors.andThen(surfaceBuilders.assembleWire(listOfEdges), (w) => {
|
|
1881
|
+
if (shapeTypes.isClosedWire(w)) return errors.ok(w);
|
|
1882
|
+
return errors.err(
|
|
1883
|
+
errors.validationError(
|
|
1884
|
+
"WIRE_NOT_CLOSED",
|
|
1885
|
+
"Assembled wire is not closed: start and end points do not coincide"
|
|
1886
|
+
)
|
|
1887
|
+
);
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1879
1890
|
function face(w, holes) {
|
|
1880
1891
|
return surfaceBuilders.makeFace(w, holes);
|
|
1881
1892
|
}
|
|
@@ -2697,6 +2708,7 @@ function createWrappedFace(val) {
|
|
|
2697
2708
|
surfaceType: () => unwrapOrThrow(faceFns.getSurfaceType(val)),
|
|
2698
2709
|
outerWire: () => faceFns.outerWire(val),
|
|
2699
2710
|
innerWires: () => faceFns.innerWires(val),
|
|
2711
|
+
// Wrapped faces from the fluent API are always oriented
|
|
2700
2712
|
extrude: (height) => wrap3D(unwrapOrThrow(extrude(val, height))),
|
|
2701
2713
|
revolve: (opts) => wrap3D(unwrapOrThrow(revolve(val, opts)))
|
|
2702
2714
|
};
|
|
@@ -2727,6 +2739,7 @@ exports.as2D = shapeTypes.as2D;
|
|
|
2727
2739
|
exports.as3D = shapeTypes.as3D;
|
|
2728
2740
|
exports.castShape = shapeTypes.castShape;
|
|
2729
2741
|
exports.castShape3D = shapeTypes.castShape3D;
|
|
2742
|
+
exports.closedWire = shapeTypes.closedWire;
|
|
2730
2743
|
exports.createCompound = shapeTypes.createCompound;
|
|
2731
2744
|
exports.createEdge = shapeTypes.createEdge;
|
|
2732
2745
|
exports.createFace = shapeTypes.createFace;
|
|
@@ -2741,17 +2754,24 @@ exports.getShapeKind = shapeTypes.getShapeKind;
|
|
|
2741
2754
|
exports.initFromOC = shapeTypes.initFromOC;
|
|
2742
2755
|
exports.is2D = shapeTypes.is2D;
|
|
2743
2756
|
exports.is3D = shapeTypes.is3D;
|
|
2757
|
+
exports.isClosedWire = shapeTypes.isClosedWire;
|
|
2744
2758
|
exports.isCompound = shapeTypes.isCompound;
|
|
2745
2759
|
exports.isEdge = shapeTypes.isEdge;
|
|
2746
2760
|
exports.isFace = shapeTypes.isFace;
|
|
2747
2761
|
exports.isLive = shapeTypes.isLive;
|
|
2762
|
+
exports.isManifoldShell = shapeTypes.isManifoldShell;
|
|
2763
|
+
exports.isOrientedFace = shapeTypes.isOrientedFace;
|
|
2748
2764
|
exports.isShape1D = shapeTypes.isShape1D;
|
|
2749
2765
|
exports.isShape3D = shapeTypes.isShape3D;
|
|
2750
2766
|
exports.isShell = shapeTypes.isShell;
|
|
2751
2767
|
exports.isSolid = shapeTypes.isSolid;
|
|
2768
|
+
exports.isValidSolid = shapeTypes.isValidSolid;
|
|
2752
2769
|
exports.isVertex = shapeTypes.isVertex;
|
|
2753
2770
|
exports.isWire = shapeTypes.isWire;
|
|
2771
|
+
exports.manifoldShell = shapeTypes.manifoldShell;
|
|
2772
|
+
exports.orientedFace = shapeTypes.orientedFace;
|
|
2754
2773
|
exports.registerKernel = shapeTypes.registerKernel;
|
|
2774
|
+
exports.validSolid = shapeTypes.validSolid;
|
|
2755
2775
|
exports.withKernel = shapeTypes.withKernel;
|
|
2756
2776
|
exports.withScope = shapeTypes.withScope;
|
|
2757
2777
|
exports.withScopeResult = shapeTypes.withScopeResult;
|
|
@@ -3173,6 +3193,7 @@ exports.vertex = vertex;
|
|
|
3173
3193
|
exports.vertexFinder = vertexFinder;
|
|
3174
3194
|
exports.wire = wire;
|
|
3175
3195
|
exports.wireFinder = wireFinder;
|
|
3196
|
+
exports.wireLoop = wireLoop;
|
|
3176
3197
|
exports.withKernelDir = withKernelDir;
|
|
3177
3198
|
exports.withKernelPnt = withKernelPnt;
|
|
3178
3199
|
exports.withKernelVec = withKernelVec;
|
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 {
|
|
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-lBwyc8YG.js";
|
|
49
|
-
import { O, z,
|
|
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, B as isClosedWire, d as isEdge, n as isWire } from "./shapeTypes-BkPK8XIl.js";
|
|
47
|
+
import { C, E, F, G, u, s, t, a, b, H, v, g, I, J, K, i, f, L, M, h, N, m, O, P, Q, R, S, w, o, p } from "./shapeTypes-BkPK8XIl.js";
|
|
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, a as andThen } from "./errors-lBwyc8YG.js";
|
|
49
|
+
import { O as O2, z, c, b as b2, f as f2, A, g as g2, m as m2, h as h2, j, l, C as C2, D, E as E2, s as s2, F as F2, G as G2, t as t2, n, r, v as v2, w as w2, H as H2 } from "./errors-lBwyc8YG.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
|
-
import { R, v as v3, a as
|
|
52
|
-
import { B
|
|
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
|
|
57
|
-
import { B as
|
|
51
|
+
import { R as R2, v as v3, a as a2, 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, d as d2, C as C3, s as s3 } from "./Blueprint-CFUlMh67.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-Cg7rdMf1.js";
|
|
54
|
+
import { b as b4, g as g4, r as r2 } from "./loft-Cg7rdMf1.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-BaSVJrqt.js";
|
|
56
|
+
import { a as a3, 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 as A2, B as B2, C as C4, D as D2, E as E3, F as F3, G as G3 } from "./operations-BaSVJrqt.js";
|
|
57
|
+
import { B as B3, a as a4, e as e2, C as C5, F as F4, S as S2, 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-DNKu6gA7.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-Cg_I5KyH.js";
|
|
60
|
+
import { g as g7 } from "./helpers-Cg_I5KyH.js";
|
|
61
61
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
62
|
-
import { C as C6, D as D3, a as
|
|
62
|
+
import { C as C6, D as D3, a as a5, S as S3, 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 A3, a2 as a22, B as B4, E as E4, a3 as a32, F as F5, G as G4, H as H3, I as I2, J as J2, K as K2, L as L2, M as M2, N as N2, O as O3, P as P2, Q as Q2, R as R3, T, U, a4 as a42, V, a5 as a52, a6, W } from "./drawFns-c8p_xTP0.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-B8RRTytu.js";
|
|
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-
|
|
67
|
-
import { w as w4, f as f6, x as x3, i as i5, y as y3, z as z4, A as A4, B as
|
|
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-
|
|
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-
|
|
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 g9, j as j4, s as s5, t as t8, k as k5, l as l6, v as v7, w as w5 } from "./topology-
|
|
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 j5, k as k6, l as l7, f as f8, b as b8, g as g10, m as m7, o as o7 } from "./curveFns-
|
|
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 v8, u as u5, h as h6 } from "./faceFns-
|
|
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 g11, h as h7, i as i6 } from "./measurement-
|
|
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-BbnD8E_4.js";
|
|
67
|
+
import { w as w4, f as f6, x as x3, i as i5, y as y3, z as z4, A as A4, B as B5, C as C7, D as D4 } from "./shapeFns-BbnD8E_4.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-DOonidp8.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-DOonidp8.js";
|
|
70
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-DoSBNUPF.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-DoSBNUPF.js";
|
|
72
|
+
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-BMXtgX1x.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-BMXtgX1x.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-Cz71BDro.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-Cz71BDro.js";
|
|
76
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-kdGtj-un.js";
|
|
77
|
+
import { c as c5, b as b9, e as e5, d as d7, f as f10 } from "./meshFns-kdGtj-un.js";
|
|
78
|
+
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-BN6FiFD4.js";
|
|
79
|
+
import { d as d8, e as e6, f as f11, g as g11, h as h7, i as i6 } from "./measurement-BN6FiFD4.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-DCThAtoQ.js";
|
|
81
|
+
import { p as p7 } from "./surfaceBuilders-DCThAtoQ.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-CcNE4HxW.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;
|
|
@@ -1889,6 +1889,17 @@ function tangentArc(startPoint, startTgt, endPoint) {
|
|
|
1889
1889
|
function wire(listOfEdges) {
|
|
1890
1890
|
return assembleWire(listOfEdges);
|
|
1891
1891
|
}
|
|
1892
|
+
function wireLoop(listOfEdges) {
|
|
1893
|
+
return andThen(assembleWire(listOfEdges), (w6) => {
|
|
1894
|
+
if (isClosedWire(w6)) return ok(w6);
|
|
1895
|
+
return err(
|
|
1896
|
+
validationError(
|
|
1897
|
+
"WIRE_NOT_CLOSED",
|
|
1898
|
+
"Assembled wire is not closed: start and end points do not coincide"
|
|
1899
|
+
)
|
|
1900
|
+
);
|
|
1901
|
+
});
|
|
1902
|
+
}
|
|
1892
1903
|
function face(w6, holes) {
|
|
1893
1904
|
return makeFace(w6, holes);
|
|
1894
1905
|
}
|
|
@@ -2710,6 +2721,7 @@ function createWrappedFace(val) {
|
|
|
2710
2721
|
surfaceType: () => unwrapOrThrow(getSurfaceType(val)),
|
|
2711
2722
|
outerWire: () => outerWire(val),
|
|
2712
2723
|
innerWires: () => innerWires(val),
|
|
2724
|
+
// Wrapped faces from the fluent API are always oriented
|
|
2713
2725
|
extrude: (height) => wrap3D(unwrapOrThrow(extrude(val, height))),
|
|
2714
2726
|
revolve: (opts) => wrap3D(unwrapOrThrow(revolve(val, opts)))
|
|
2715
2727
|
};
|
|
@@ -2736,9 +2748,9 @@ function shape(s7) {
|
|
|
2736
2748
|
throw new Error("shape() requires a Sketch or branded shape type");
|
|
2737
2749
|
}
|
|
2738
2750
|
export {
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2751
|
+
B3 as BaseSketcher2d,
|
|
2752
|
+
B as Blueprint,
|
|
2753
|
+
a4 as BlueprintSketcher,
|
|
2742
2754
|
e2 as Blueprints,
|
|
2743
2755
|
d2 as BoundingBox2d,
|
|
2744
2756
|
BrepBugError,
|
|
@@ -2750,26 +2762,26 @@ export {
|
|
|
2750
2762
|
DEG2RAD,
|
|
2751
2763
|
DisposalScope,
|
|
2752
2764
|
D3 as Drawing,
|
|
2753
|
-
|
|
2765
|
+
a5 as DrawingPen,
|
|
2754
2766
|
F4 as FaceSketcher,
|
|
2755
2767
|
HASH_CODE_MAX,
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2768
|
+
O2 as OK,
|
|
2769
|
+
R2 as RAD2DEG,
|
|
2770
|
+
S2 as Sketch,
|
|
2771
|
+
S3 as Sketcher,
|
|
2760
2772
|
b6 as Sketches,
|
|
2761
|
-
|
|
2773
|
+
a3 as addChild,
|
|
2762
2774
|
addHoles,
|
|
2763
2775
|
addMate,
|
|
2764
2776
|
b5 as addStep,
|
|
2765
2777
|
a8 as adjacentFaces,
|
|
2766
2778
|
z as all,
|
|
2767
|
-
|
|
2779
|
+
andThen,
|
|
2768
2780
|
applyGlue,
|
|
2769
2781
|
applyMatrix,
|
|
2770
2782
|
j5 as approximateCurve,
|
|
2771
|
-
|
|
2772
|
-
|
|
2783
|
+
C as as2D,
|
|
2784
|
+
E as as3D,
|
|
2773
2785
|
l8 as asTopo,
|
|
2774
2786
|
b7 as autoHeal,
|
|
2775
2787
|
b4 as basicFaceExtrusion,
|
|
@@ -2783,7 +2795,7 @@ export {
|
|
|
2783
2795
|
Y as cameraLookAt,
|
|
2784
2796
|
c4 as cast,
|
|
2785
2797
|
castShape,
|
|
2786
|
-
|
|
2798
|
+
F as castShape3D,
|
|
2787
2799
|
chamfer,
|
|
2788
2800
|
chamferDistAngle as chamferDistAngleShape,
|
|
2789
2801
|
checkAllInterferences,
|
|
@@ -2793,6 +2805,7 @@ export {
|
|
|
2793
2805
|
m8 as classifyPointOnFace,
|
|
2794
2806
|
c5 as clearMeshCache,
|
|
2795
2807
|
clone,
|
|
2808
|
+
G as closedWire,
|
|
2796
2809
|
c as collect,
|
|
2797
2810
|
d3 as collectShapes,
|
|
2798
2811
|
l5 as colorFaces,
|
|
@@ -2825,7 +2838,7 @@ export {
|
|
|
2825
2838
|
createOperationRegistry,
|
|
2826
2839
|
a7 as createPlane,
|
|
2827
2840
|
k2 as createRegistry,
|
|
2828
|
-
|
|
2841
|
+
H as createShell,
|
|
2829
2842
|
createSolid,
|
|
2830
2843
|
createTaskQueue,
|
|
2831
2844
|
v as createVertex,
|
|
@@ -2959,16 +2972,17 @@ export {
|
|
|
2959
2972
|
importSVG,
|
|
2960
2973
|
importSVGPathD,
|
|
2961
2974
|
importThreeMF,
|
|
2962
|
-
|
|
2975
|
+
I as initFromOC,
|
|
2963
2976
|
innerWires,
|
|
2964
2977
|
m7 as interpolateCurve,
|
|
2965
2978
|
intersect,
|
|
2966
2979
|
k3 as intersect2D,
|
|
2967
2980
|
q2 as intersectBlueprints,
|
|
2968
2981
|
ioError,
|
|
2969
|
-
|
|
2970
|
-
|
|
2982
|
+
J as is2D,
|
|
2983
|
+
K as is3D,
|
|
2971
2984
|
isChamferRadius,
|
|
2985
|
+
isClosedWire,
|
|
2972
2986
|
s6 as isCompSolid,
|
|
2973
2987
|
i as isCompound,
|
|
2974
2988
|
isDisposeRequest,
|
|
@@ -2982,9 +2996,11 @@ export {
|
|
|
2982
2996
|
isInitRequest,
|
|
2983
2997
|
isInside2D,
|
|
2984
2998
|
f as isLive,
|
|
2999
|
+
L as isManifoldShell,
|
|
2985
3000
|
isNumber,
|
|
2986
3001
|
g2 as isOk,
|
|
2987
3002
|
isOperationRequest,
|
|
3003
|
+
M as isOrientedFace,
|
|
2988
3004
|
a0 as isProjectionPlane,
|
|
2989
3005
|
isQueueEmpty,
|
|
2990
3006
|
i5 as isSameShape,
|
|
@@ -2994,13 +3010,14 @@ export {
|
|
|
2994
3010
|
isSolid,
|
|
2995
3011
|
isSuccessResponse,
|
|
2996
3012
|
isValid,
|
|
3013
|
+
N as isValidSolid,
|
|
2997
3014
|
m as isVertex,
|
|
2998
3015
|
isWire,
|
|
2999
3016
|
y3 as iterEdges,
|
|
3000
3017
|
z4 as iterFaces,
|
|
3001
3018
|
iterTopo,
|
|
3002
3019
|
A4 as iterVertices,
|
|
3003
|
-
|
|
3020
|
+
B5 as iterWires,
|
|
3004
3021
|
kernelCall,
|
|
3005
3022
|
kernelCallRaw,
|
|
3006
3023
|
kernelCallScoped,
|
|
@@ -3012,6 +3029,7 @@ export {
|
|
|
3012
3029
|
A3 as makeBaseBox,
|
|
3013
3030
|
s3 as makePlane,
|
|
3014
3031
|
a22 as makeProjectedEdges,
|
|
3032
|
+
O as manifoldShell,
|
|
3015
3033
|
m2 as map,
|
|
3016
3034
|
h2 as mapErr,
|
|
3017
3035
|
j as match,
|
|
@@ -3029,7 +3047,7 @@ export {
|
|
|
3029
3047
|
minkowski,
|
|
3030
3048
|
mirror,
|
|
3031
3049
|
mirror2D,
|
|
3032
|
-
|
|
3050
|
+
B4 as mirrorDrawing,
|
|
3033
3051
|
mirrorJoin,
|
|
3034
3052
|
t3 as modifyStep,
|
|
3035
3053
|
l as moduleInitError,
|
|
@@ -3042,6 +3060,7 @@ export {
|
|
|
3042
3060
|
C2 as or,
|
|
3043
3061
|
D as orElse,
|
|
3044
3062
|
o4 as organiseBlueprints,
|
|
3063
|
+
P as orientedFace,
|
|
3045
3064
|
outerWire,
|
|
3046
3065
|
pendingCount,
|
|
3047
3066
|
E2 as pipeline,
|
|
@@ -3057,7 +3076,7 @@ export {
|
|
|
3057
3076
|
queryError,
|
|
3058
3077
|
rectangularPattern,
|
|
3059
3078
|
registerHandler,
|
|
3060
|
-
|
|
3079
|
+
Q as registerKernel,
|
|
3061
3080
|
u2 as registerOperation,
|
|
3062
3081
|
v4 as registerShape,
|
|
3063
3082
|
rejectAll,
|
|
@@ -3097,13 +3116,13 @@ export {
|
|
|
3097
3116
|
I2 as sketchEllipse,
|
|
3098
3117
|
J2 as sketchExtrude,
|
|
3099
3118
|
K2 as sketchFace,
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3119
|
+
L2 as sketchFaceOffset,
|
|
3120
|
+
M2 as sketchHelix,
|
|
3121
|
+
N2 as sketchLoft,
|
|
3122
|
+
O3 as sketchParametricFunction,
|
|
3123
|
+
P2 as sketchPolysides,
|
|
3124
|
+
Q2 as sketchRectangle,
|
|
3125
|
+
R3 as sketchRevolve,
|
|
3107
3126
|
T as sketchRoundedRectangle,
|
|
3108
3127
|
U as sketchSweep,
|
|
3109
3128
|
a42 as sketchText,
|
|
@@ -3114,7 +3133,7 @@ export {
|
|
|
3114
3133
|
solveAssembly,
|
|
3115
3134
|
sphere,
|
|
3116
3135
|
split,
|
|
3117
|
-
|
|
3136
|
+
B2 as stepCount,
|
|
3118
3137
|
C4 as stepsFrom,
|
|
3119
3138
|
stretch2D,
|
|
3120
3139
|
subFace,
|
|
@@ -3128,7 +3147,7 @@ export {
|
|
|
3128
3147
|
F2 as tap,
|
|
3129
3148
|
G2 as tapErr,
|
|
3130
3149
|
a52 as textBlueprints,
|
|
3131
|
-
|
|
3150
|
+
a6 as textMetrics,
|
|
3132
3151
|
thicken,
|
|
3133
3152
|
threePointArc,
|
|
3134
3153
|
toBREP,
|
|
@@ -3157,9 +3176,10 @@ export {
|
|
|
3157
3176
|
G3 as updateNode,
|
|
3158
3177
|
u5 as uvBounds,
|
|
3159
3178
|
h6 as uvCoordinates,
|
|
3179
|
+
R as validSolid,
|
|
3160
3180
|
validationError,
|
|
3161
3181
|
v3 as vecAdd,
|
|
3162
|
-
|
|
3182
|
+
a2 as vecAngle,
|
|
3163
3183
|
b3 as vecCross,
|
|
3164
3184
|
vecDistance,
|
|
3165
3185
|
d as vecDot,
|
|
@@ -3181,8 +3201,9 @@ export {
|
|
|
3181
3201
|
walkAssembly,
|
|
3182
3202
|
wire,
|
|
3183
3203
|
wireFinder,
|
|
3204
|
+
wireLoop,
|
|
3184
3205
|
w5 as wiresOfFace,
|
|
3185
|
-
|
|
3206
|
+
S as withKernel,
|
|
3186
3207
|
withKernelDir,
|
|
3187
3208
|
withKernelPnt,
|
|
3188
3209
|
withKernelVec,
|