brepjs 18.82.3 → 18.82.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +4 -4
- package/dist/2d.js +4 -4
- package/dist/{blueprint-BWb1b-R_.cjs → blueprint-BBUOweQy.cjs} +1 -1
- package/dist/{blueprint-BBSt1k_F.js → blueprint-DjzevNhB.js} +1 -1
- package/dist/{blueprintFns-oFr-O71P.cjs → blueprintFns-CRES_5vP.cjs} +2 -2
- package/dist/{blueprintFns-DWji-hqn.js → blueprintFns-CxSMnMfl.js} +2 -2
- package/dist/{blueprintSketcher-CMKW8gMH.cjs → blueprintSketcher-CFa32JZU.cjs} +2 -2
- package/dist/{blueprintSketcher-BJn6P9IX.js → blueprintSketcher-CIydRzRr.js} +2 -2
- package/dist/{boolean2D-DaOXyVXh.js → boolean2D-BRWPIJhe.js} +3 -3
- package/dist/{boolean2D-M3i4os2c.cjs → boolean2D-Z0KE98a4.cjs} +3 -3
- package/dist/brepjs.cjs +40 -40
- package/dist/brepjs.js +15 -15
- package/dist/{cornerFinder-Cc1KSYKs.js → cornerFinder-BRYZAgdE.js} +1 -1
- package/dist/{cornerFinder-CG2Pgp7d.cjs → cornerFinder-BuYpqGO8.cjs} +1 -1
- package/dist/{drawFns-tHcBGNpE.js → drawFns-C5Mdr0iH.js} +6 -6
- package/dist/{drawFns-t-ro78FP.cjs → drawFns-DK3DGHku.cjs} +6 -6
- package/dist/{healingFns-Ct_-O3yk.js → healingFns-C4JZHv8K.js} +1 -1
- package/dist/{healingFns-MxlhdTIc.cjs → healingFns-D3BkAVML.cjs} +5 -5
- package/dist/{helpers-BGoSvX_s.js → helpers-CTc8ZbY8.js} +1 -1
- package/dist/{helpers-B0uqRA6z.cjs → helpers-DN6s-TLC.cjs} +1 -1
- package/dist/{importFns-DA_iBX9K.cjs → importFns-Cb-cmpGG.cjs} +1 -1
- package/dist/{importFns-D8lE2Bou.js → importFns-D4Xet5aD.js} +1 -1
- package/dist/io.cjs +1 -1
- package/dist/io.js +1 -1
- package/dist/{measureFns-Ck2YGGfE.js → measureFns-7Nz5JklM.js} +14 -0
- package/dist/{measureFns-CynnLMdY.cjs → measureFns-BNHvjShh.cjs} +14 -0
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/operations.cjs +1 -1
- package/dist/operations.js +1 -1
- package/dist/primitiveFns-BPfYb_t5.cjs +461 -0
- package/dist/primitiveFns-DkuLOFkI.js +300 -0
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-Botsp7SL.cjs → shapeRefFns-Bb0aQZWz.cjs} +1 -1
- package/dist/{shapeRefFns-DS9FldJc.js → shapeRefFns-NdQvPa5J.js} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{primitiveFns-CjL5bygY.js → solidBuilders-QUpJdbiK.js} +99 -256
- package/dist/{primitiveFns-LWkd7M2f.cjs → solidBuilders-lDXPwoCz.cjs} +120 -379
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-C2INf1kF.cjs → textBlueprints-D4pLmVno.cjs} +26 -43
- package/dist/{textBlueprints-C03mB6SZ.js → textBlueprints-f8cgx9vi.js} +29 -46
- package/dist/{textMetrics-DgGJ3bZP.js → textMetrics-CQtQI4vF.js} +1 -1
- package/dist/{textMetrics-B1eg4u4V.cjs → textMetrics-DTRuXeXr.cjs} +1 -1
- package/dist/{threadFns-DqMbjyxZ.js → threadFns-CvLvKdwB.js} +2 -1
- package/dist/{threadFns-CX9l8sRv.cjs → threadFns-DvSdQiRw.cjs} +4 -3
- package/dist/topology.cjs +5 -4
- package/dist/topology.js +3 -2
- package/package.json +1 -1
- package/dist/solidBuilders-CgPOdC3Q.js +0 -140
- package/dist/solidBuilders-mxHbGDW6.cjs +0 -199
package/dist/2d.cjs
CHANGED
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_shapeTypes = require("./shapeTypes-D1eUDuzl.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_topologyQueryFns = require("./topologyQueryFns-Nnu56Ke2.cjs");
|
|
5
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
6
|
-
const require_blueprint = require("./blueprint-
|
|
7
|
-
const require_boolean2D = require("./boolean2D-
|
|
8
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CFa32JZU.cjs");
|
|
6
|
+
const require_blueprint = require("./blueprint-BBUOweQy.cjs");
|
|
7
|
+
const require_boolean2D = require("./boolean2D-Z0KE98a4.cjs");
|
|
8
|
+
const require_blueprintFns = require("./blueprintFns-CRES_5vP.cjs");
|
|
9
9
|
//#region src/core/curve2dHandle.ts
|
|
10
10
|
/**
|
|
11
11
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
package/dist/2d.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-D4Evnmz_.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { w as kernelCallRaw } from "./topologyQueryFns-5EeBz6_7.js";
|
|
4
|
-
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-
|
|
5
|
-
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-
|
|
6
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
7
|
-
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-
|
|
4
|
+
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-CIydRzRr.js";
|
|
5
|
+
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-DjzevNhB.js";
|
|
6
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-BRWPIJhe.js";
|
|
7
|
+
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-CxSMnMfl.js";
|
|
8
8
|
//#region src/core/curve2dHandle.ts
|
|
9
9
|
/**
|
|
10
10
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
|
@@ -8,7 +8,7 @@ const require_faceFns = require("./faceFns-6AarivqH.cjs");
|
|
|
8
8
|
const require_curveFns = require("./curveFns-BA5zsoce.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
10
|
const require_surfaceBuilders = require("./surfaceBuilders-R4DKNFkI.cjs");
|
|
11
|
-
const require_helpers = require("./helpers-
|
|
11
|
+
const require_helpers = require("./helpers-DN6s-TLC.cjs");
|
|
12
12
|
//#region src/2d/lib/definitions.ts
|
|
13
13
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
14
14
|
function isPoint2D(point) {
|
|
@@ -8,7 +8,7 @@ import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as f
|
|
|
8
8
|
import { p as getOrientation } from "./curveFns-XSz4F9j3.js";
|
|
9
9
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
10
|
import { r as makeFace } from "./surfaceBuilders-CLMyFimy.js";
|
|
11
|
-
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-
|
|
11
|
+
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-CTc8ZbY8.js";
|
|
12
12
|
//#region src/2d/lib/definitions.ts
|
|
13
13
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
14
14
|
function isPoint2D(point) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_blueprint = require("./blueprint-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CFa32JZU.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-BBUOweQy.cjs");
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
2
|
-
import { i as CompoundBlueprint } from "./blueprintSketcher-
|
|
3
|
-
import { t as Blueprint } from "./blueprint-
|
|
2
|
+
import { i as CompoundBlueprint } from "./blueprintSketcher-CIydRzRr.js";
|
|
3
|
+
import { t as Blueprint } from "./blueprint-DjzevNhB.js";
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -3,8 +3,8 @@ const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
6
|
+
const require_helpers = require("./helpers-DN6s-TLC.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-BBUOweQy.cjs");
|
|
8
8
|
//#region node_modules/flatqueue/index.js
|
|
9
9
|
/** @template T */
|
|
10
10
|
var FlatQueue = class {
|
|
@@ -3,8 +3,8 @@ import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
|
3
3
|
import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
6
|
-
import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-
|
|
7
|
-
import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-
|
|
6
|
+
import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-CTc8ZbY8.js";
|
|
7
|
+
import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-DjzevNhB.js";
|
|
8
8
|
//#region node_modules/flatqueue/index.js
|
|
9
9
|
/** @template T */
|
|
10
10
|
var FlatQueue = class {
|
|
@@ -2,9 +2,9 @@ import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
|
2
2
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
4
4
|
import { v as zip } from "./surfaceBuilders-CLMyFimy.js";
|
|
5
|
-
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-
|
|
6
|
-
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-
|
|
7
|
-
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-CIydRzRr.js";
|
|
6
|
+
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-CTc8ZbY8.js";
|
|
7
|
+
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-DjzevNhB.js";
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
|
@@ -2,9 +2,9 @@ const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
4
4
|
const require_surfaceBuilders = require("./surfaceBuilders-R4DKNFkI.cjs");
|
|
5
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CFa32JZU.cjs");
|
|
6
|
+
const require_helpers = require("./helpers-DN6s-TLC.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-BBUOweQy.cjs");
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-D4pLmVno.cjs");
|
|
3
3
|
const require_shapeTypes = require("./shapeTypes-D1eUDuzl.cjs");
|
|
4
4
|
const require_occtWasmAdapter = require("./occtWasmAdapter-5hzzhkME.cjs");
|
|
5
5
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
@@ -15,23 +15,23 @@ const require_curveFns = require("./curveFns-BA5zsoce.cjs");
|
|
|
15
15
|
const require_meshFns = require("./meshFns-YXFipjjx.cjs");
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
17
17
|
const require_surfaceBuilders = require("./surfaceBuilders-R4DKNFkI.cjs");
|
|
18
|
-
const
|
|
19
|
-
const require_healingFns = require("./healingFns-
|
|
20
|
-
const require_threadFns = require("./threadFns-
|
|
21
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
22
|
-
const require_helpers = require("./helpers-
|
|
23
|
-
const require_drawFns = require("./drawFns-
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const require_importFns = require("./importFns-DA_iBX9K.cjs");
|
|
18
|
+
const require_solidBuilders = require("./solidBuilders-lDXPwoCz.cjs");
|
|
19
|
+
const require_healingFns = require("./healingFns-D3BkAVML.cjs");
|
|
20
|
+
const require_threadFns = require("./threadFns-DvSdQiRw.cjs");
|
|
21
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CFa32JZU.cjs");
|
|
22
|
+
const require_helpers = require("./helpers-DN6s-TLC.cjs");
|
|
23
|
+
const require_drawFns = require("./drawFns-DK3DGHku.cjs");
|
|
24
|
+
const require_measureFns = require("./measureFns-BNHvjShh.cjs");
|
|
25
|
+
const require_cornerFinder = require("./cornerFinder-BuYpqGO8.cjs");
|
|
26
|
+
const require_boolean2D = require("./boolean2D-Z0KE98a4.cjs");
|
|
27
|
+
const require_blueprintFns = require("./blueprintFns-CRES_5vP.cjs");
|
|
28
|
+
const require_importFns = require("./importFns-Cb-cmpGG.cjs");
|
|
30
29
|
const require_loftFns = require("./loftFns-DxhcdpAu.cjs");
|
|
31
30
|
const require_cameraFns = require("./cameraFns-Drgka78Q.cjs");
|
|
32
|
-
const require_textMetrics = require("./textMetrics-
|
|
33
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
31
|
+
const require_textMetrics = require("./textMetrics-DTRuXeXr.cjs");
|
|
32
|
+
const require_shapeRefFns = require("./shapeRefFns-Bb0aQZWz.cjs");
|
|
34
33
|
const require_workerHandler = require("./workerHandler-CdlOTwJg.cjs");
|
|
34
|
+
const require_primitiveFns = require("./primitiveFns-BPfYb_t5.cjs");
|
|
35
35
|
//#region src/topology/shapeBooleans.ts
|
|
36
36
|
var BOPAlgo_GlueShift = 1;
|
|
37
37
|
var BOPAlgo_GlueFull = 2;
|
|
@@ -3342,40 +3342,40 @@ function transformCopy(shape, composed) {
|
|
|
3342
3342
|
}
|
|
3343
3343
|
/** Fuse two 3D shapes (boolean union). */
|
|
3344
3344
|
function fuse(a, b, options) {
|
|
3345
|
-
return
|
|
3345
|
+
return require_solidBuilders.fuse(resolve(a), resolve(b), {
|
|
3346
3346
|
...options,
|
|
3347
3347
|
unsafe: true
|
|
3348
3348
|
});
|
|
3349
3349
|
}
|
|
3350
3350
|
/** Cut a tool from a base shape (boolean subtraction). */
|
|
3351
3351
|
function cut(base, tool, options) {
|
|
3352
|
-
return
|
|
3352
|
+
return require_solidBuilders.cut(resolve(base), resolve(tool), {
|
|
3353
3353
|
...options,
|
|
3354
3354
|
unsafe: true
|
|
3355
3355
|
});
|
|
3356
3356
|
}
|
|
3357
3357
|
/** Compute the intersection of two shapes (boolean common). */
|
|
3358
3358
|
function intersect(a, b, options) {
|
|
3359
|
-
return
|
|
3359
|
+
return require_solidBuilders.intersect(resolve(a), resolve(b), {
|
|
3360
3360
|
...options,
|
|
3361
3361
|
unsafe: true
|
|
3362
3362
|
});
|
|
3363
3363
|
}
|
|
3364
3364
|
/** Section (cross-section) a shape with a plane. */
|
|
3365
3365
|
function section(shape, plane, options) {
|
|
3366
|
-
return
|
|
3366
|
+
return require_solidBuilders.section(resolve(shape), plane, options);
|
|
3367
3367
|
}
|
|
3368
3368
|
/** Section a shape with a plane and return a filled Face. */
|
|
3369
3369
|
function sectionToFace(shape, plane, options) {
|
|
3370
|
-
return
|
|
3370
|
+
return require_solidBuilders.sectionToFace(resolve(shape), plane, options);
|
|
3371
3371
|
}
|
|
3372
3372
|
/** Split a shape with tool shapes. */
|
|
3373
3373
|
function split(shape, tools) {
|
|
3374
|
-
return
|
|
3374
|
+
return require_solidBuilders.split(resolve(shape), tools);
|
|
3375
3375
|
}
|
|
3376
3376
|
/** Slice a shape with multiple planes. */
|
|
3377
3377
|
function slice(shape, planes, options) {
|
|
3378
|
-
return
|
|
3378
|
+
return require_solidBuilders.slice(resolve(shape), planes, options);
|
|
3379
3379
|
}
|
|
3380
3380
|
/**
|
|
3381
3381
|
* Resolve a FinderFn callback or ShapeFinder into an array of elements.
|
|
@@ -3667,7 +3667,7 @@ function drill(shape, options) {
|
|
|
3667
3667
|
pos[2] + dir[2] * tMin
|
|
3668
3668
|
], dir);
|
|
3669
3669
|
}
|
|
3670
|
-
return
|
|
3670
|
+
return require_solidBuilders.cut(s, tool, { unsafe: true });
|
|
3671
3671
|
}
|
|
3672
3672
|
/**
|
|
3673
3673
|
* Cut a pocket (2D profile extruded inward) into a shape.
|
|
@@ -3688,7 +3688,7 @@ function pocket(shape, options) {
|
|
|
3688
3688
|
if (require_errors.isErr(faceResult)) return faceResult;
|
|
3689
3689
|
const toolResult = require_loftFns.extrude(require_shapeFns.translate(faceResult.value, center), require_vecOps.vecScale(require_vecOps.vecNormalize(normal), -depth));
|
|
3690
3690
|
if (require_errors.isErr(toolResult)) return toolResult;
|
|
3691
|
-
return
|
|
3691
|
+
return require_solidBuilders.cut(s, toolResult.value, { unsafe: true });
|
|
3692
3692
|
}
|
|
3693
3693
|
/**
|
|
3694
3694
|
* Add a boss (2D profile extruded outward) onto a shape.
|
|
@@ -3709,7 +3709,7 @@ function boss(shape, options) {
|
|
|
3709
3709
|
if (require_errors.isErr(faceResult)) return faceResult;
|
|
3710
3710
|
const toolResult = require_loftFns.extrude(require_shapeFns.translate(faceResult.value, center), require_vecOps.vecScale(require_vecOps.vecNormalize(normal), height));
|
|
3711
3711
|
if (require_errors.isErr(toolResult)) return toolResult;
|
|
3712
|
-
return
|
|
3712
|
+
return require_solidBuilders.fuse(s, toolResult.value, { unsafe: true });
|
|
3713
3713
|
}
|
|
3714
3714
|
/**
|
|
3715
3715
|
* Mirror a shape and fuse it with the original.
|
|
@@ -3725,7 +3725,7 @@ function mirrorJoin(shape, options) {
|
|
|
3725
3725
|
];
|
|
3726
3726
|
const planeOrigin = options?.at;
|
|
3727
3727
|
if (require_vecOps.vecIsZero(normal)) return require_errors.err(require_errors.validationError("MIRROR_ZERO_NORMAL", "Mirror plane normal cannot be zero"));
|
|
3728
|
-
return
|
|
3728
|
+
return require_solidBuilders.fuse(s, require_shapeFns.mirror(s, normal, planeOrigin), { unsafe: true });
|
|
3729
3729
|
}
|
|
3730
3730
|
/**
|
|
3731
3731
|
* Create a rectangular (2D grid) pattern of a shape.
|
|
@@ -3752,7 +3752,7 @@ function rectangularPattern(shape, options) {
|
|
|
3752
3752
|
];
|
|
3753
3753
|
copies.push(require_shapeFns.translate(s, offset));
|
|
3754
3754
|
}
|
|
3755
|
-
return
|
|
3755
|
+
return require_solidBuilders.fuseAll(copies, { unsafe: true });
|
|
3756
3756
|
}
|
|
3757
3757
|
//#endregion
|
|
3758
3758
|
//#region src/topology/wrapperFns.ts
|
|
@@ -3869,11 +3869,11 @@ function create3DBooleans(val) {
|
|
|
3869
3869
|
...opts,
|
|
3870
3870
|
unsafe: true
|
|
3871
3871
|
}))),
|
|
3872
|
-
fuseAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(
|
|
3872
|
+
fuseAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(require_solidBuilders.fuseAll([val, ...tools.map(resolve)], {
|
|
3873
3873
|
...opts,
|
|
3874
3874
|
unsafe: true
|
|
3875
3875
|
})))),
|
|
3876
|
-
cutAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(
|
|
3876
|
+
cutAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(require_solidBuilders.cutAll(val, tools, {
|
|
3877
3877
|
...opts,
|
|
3878
3878
|
unsafe: true
|
|
3879
3879
|
})))),
|
|
@@ -4483,7 +4483,7 @@ function finalizeExternalSolid(wire, thickness, bore, geom, diagnostics) {
|
|
|
4483
4483
|
0,
|
|
4484
4484
|
-.5
|
|
4485
4485
|
]));
|
|
4486
|
-
const cutResult =
|
|
4486
|
+
const cutResult = require_solidBuilders.cut(solidResult.value, boreSolid);
|
|
4487
4487
|
if (require_errors.isErr(cutResult)) return cutResult;
|
|
4488
4488
|
return require_errors.ok(buildGearResult(cutResult.value, geom, diagnostics));
|
|
4489
4489
|
} catch (_) {
|
|
@@ -4661,10 +4661,10 @@ var booleans_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
|
4661
4661
|
checkBoolean: () => require_healingFns.checkBoolean,
|
|
4662
4662
|
convexHull: () => convexHull,
|
|
4663
4663
|
cut: () => cut,
|
|
4664
|
-
cutAll: () =>
|
|
4664
|
+
cutAll: () => require_solidBuilders.cutAll,
|
|
4665
4665
|
cutAllBisect: () => require_healingFns.cutAllBisect,
|
|
4666
4666
|
fuse: () => fuse,
|
|
4667
|
-
fuseAll: () =>
|
|
4667
|
+
fuseAll: () => require_solidBuilders.fuseAll,
|
|
4668
4668
|
fuseAllBisect: () => require_healingFns.fuseAllBisect,
|
|
4669
4669
|
hull: () => hull,
|
|
4670
4670
|
intersect: () => intersect,
|
|
@@ -5450,7 +5450,7 @@ function evalFuse(node, ctx) {
|
|
|
5450
5450
|
if (!a.ok) return a;
|
|
5451
5451
|
const b = resolveOperand(ctx, node.b, "Fuse.b");
|
|
5452
5452
|
if (!b.ok) return b;
|
|
5453
|
-
return
|
|
5453
|
+
return require_solidBuilders.fuse(a.value, b.value, boolOptions(node, ctx));
|
|
5454
5454
|
}
|
|
5455
5455
|
function evalCut(node, ctx) {
|
|
5456
5456
|
if (node.a.kind === "Empty") return emptyResult$1("Cut");
|
|
@@ -5459,7 +5459,7 @@ function evalCut(node, ctx) {
|
|
|
5459
5459
|
if (!a.ok) return a;
|
|
5460
5460
|
const b = resolveOperand(ctx, node.b, "Cut.b");
|
|
5461
5461
|
if (!b.ok) return b;
|
|
5462
|
-
return
|
|
5462
|
+
return require_solidBuilders.cut(a.value, b.value, boolOptions(node, ctx));
|
|
5463
5463
|
}
|
|
5464
5464
|
function evalIntersect(node, ctx) {
|
|
5465
5465
|
if (node.a.kind === "Empty" || node.b.kind === "Empty") return emptyResult$1("Intersect");
|
|
@@ -5467,7 +5467,7 @@ function evalIntersect(node, ctx) {
|
|
|
5467
5467
|
if (!a.ok) return a;
|
|
5468
5468
|
const b = resolveOperand(ctx, node.b, "Intersect.b");
|
|
5469
5469
|
if (!b.ok) return b;
|
|
5470
|
-
return
|
|
5470
|
+
return require_solidBuilders.intersect(a.value, b.value, boolOptions(node, ctx));
|
|
5471
5471
|
}
|
|
5472
5472
|
function resolveAll(ctx, nodes, where) {
|
|
5473
5473
|
const out = [];
|
|
@@ -5484,7 +5484,7 @@ function evalFuseAll(node, ctx) {
|
|
|
5484
5484
|
if (non.length === 1 && non[0]) return ctx.evalNode(non[0]);
|
|
5485
5485
|
const resolved = resolveAll(ctx, non, "FuseAll.operand");
|
|
5486
5486
|
if (!resolved.ok) return resolved;
|
|
5487
|
-
return
|
|
5487
|
+
return require_solidBuilders.fuseAll(resolved.value, boolOptions(node, ctx));
|
|
5488
5488
|
}
|
|
5489
5489
|
function evalCutAll(node, ctx) {
|
|
5490
5490
|
if (node.base.kind === "Empty") return emptyResult$1("CutAll");
|
|
@@ -5494,7 +5494,7 @@ function evalCutAll(node, ctx) {
|
|
|
5494
5494
|
if (!base.ok) return base;
|
|
5495
5495
|
const resolved = resolveAll(ctx, tools, "CutAll.tool");
|
|
5496
5496
|
if (!resolved.ok) return resolved;
|
|
5497
|
-
return
|
|
5497
|
+
return require_solidBuilders.cutAll(base.value, resolved.value, boolOptions(node, ctx));
|
|
5498
5498
|
}
|
|
5499
5499
|
//#endregion
|
|
5500
5500
|
//#region src/csg/evaluators/transforms.ts
|
|
@@ -6491,7 +6491,7 @@ exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
|
6491
6491
|
exports.autoHeal = require_healingFns.autoHeal;
|
|
6492
6492
|
exports.bezier = require_primitiveFns.bezier;
|
|
6493
6493
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
6494
|
-
exports.booleanPipeline =
|
|
6494
|
+
exports.booleanPipeline = require_solidBuilders.booleanPipeline;
|
|
6495
6495
|
Object.defineProperty(exports, "booleans", {
|
|
6496
6496
|
enumerable: true,
|
|
6497
6497
|
get: function() {
|
|
@@ -6594,7 +6594,7 @@ exports.curveStartPoint = require_curveFns.curveStartPoint;
|
|
|
6594
6594
|
exports.curveTangentAt = require_curveFns.curveTangentAt;
|
|
6595
6595
|
exports.cut = cut;
|
|
6596
6596
|
exports.cut2D = require_boolean2D.cut2D;
|
|
6597
|
-
exports.cutAll =
|
|
6597
|
+
exports.cutAll = require_solidBuilders.cutAll;
|
|
6598
6598
|
exports.cutAllBisect = require_healingFns.cutAllBisect;
|
|
6599
6599
|
exports.cutBlueprints = require_boolean2D.cutBlueprints;
|
|
6600
6600
|
exports.cutWithEvolution = require_healingFns.cutWithEvolution;
|
|
@@ -6682,7 +6682,7 @@ exports.fromKernelVec = fromKernelVec;
|
|
|
6682
6682
|
exports.fromNullable = require_errors.fromNullable;
|
|
6683
6683
|
exports.fuse = fuse;
|
|
6684
6684
|
exports.fuse2D = require_boolean2D.fuse2D;
|
|
6685
|
-
exports.fuseAll =
|
|
6685
|
+
exports.fuseAll = require_solidBuilders.fuseAll;
|
|
6686
6686
|
exports.fuseAllBisect = require_healingFns.fuseAllBisect;
|
|
6687
6687
|
exports.fuseBlueprints = require_boolean2D.fuseBlueprints;
|
|
6688
6688
|
exports.fuseWithEvolution = require_healingFns.fuseWithEvolution;
|
package/dist/brepjs.js
CHANGED
|
@@ -13,24 +13,24 @@ import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as get
|
|
|
13
13
|
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CWwOpBlM.js";
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
15
15
|
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-CLMyFimy.js";
|
|
16
|
-
import {
|
|
17
|
-
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, R as toLODGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-
|
|
18
|
-
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatRotate, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as exportAssemblySTEP, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as createAssemblyNode } from "./threadFns-
|
|
19
|
-
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
20
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
21
|
-
import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
22
|
-
import { r as
|
|
23
|
-
import {
|
|
24
|
-
import { t as
|
|
25
|
-
import { a as
|
|
26
|
-
import {
|
|
27
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-D8lE2Bou.js";
|
|
16
|
+
import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll, m as fuse$2, p as cutAll, r as makeCylinder, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-QUpJdbiK.js";
|
|
17
|
+
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, R as toLODGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-C4JZHv8K.js";
|
|
18
|
+
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatRotate, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as exportAssemblySTEP, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as createAssemblyNode } from "./threadFns-CvLvKdwB.js";
|
|
19
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CIydRzRr.js";
|
|
20
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CTc8ZbY8.js";
|
|
21
|
+
import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-C5Mdr0iH.js";
|
|
22
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-7Nz5JklM.js";
|
|
23
|
+
import { t as cornerFinder } from "./cornerFinder-BRYZAgdE.js";
|
|
24
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-BRWPIJhe.js";
|
|
25
|
+
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-CxSMnMfl.js";
|
|
26
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-D4Xet5aD.js";
|
|
28
27
|
import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-BVbzy6gm.js";
|
|
29
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
28
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-f8cgx9vi.js";
|
|
30
29
|
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-B3Wb4Br9.js";
|
|
31
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
32
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
30
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-CQtQI4vF.js";
|
|
31
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-NdQvPa5J.js";
|
|
33
32
|
import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-CFetYgIm.js";
|
|
33
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-DkuLOFkI.js";
|
|
34
34
|
//#region \0rolldown/runtime.js
|
|
35
35
|
var __defProp = Object.defineProperty;
|
|
36
36
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
3
|
-
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-
|
|
3
|
+
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-CTc8ZbY8.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-DN6s-TLC.cjs");
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -10,12 +10,12 @@ import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u a
|
|
|
10
10
|
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-XSz4F9j3.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
12
12
|
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-CLMyFimy.js";
|
|
13
|
-
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-
|
|
14
|
-
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-
|
|
15
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-
|
|
16
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
17
|
-
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
18
|
-
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-
|
|
13
|
+
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-CIydRzRr.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-CTc8ZbY8.js";
|
|
15
|
+
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-DjzevNhB.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-BRYZAgdE.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-BRWPIJhe.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-f8cgx9vi.js";
|
|
19
19
|
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-B3Wb4Br9.js";
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-D4pLmVno.cjs");
|
|
2
2
|
const require_shapeTypes = require("./shapeTypes-D1eUDuzl.cjs");
|
|
3
3
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
4
4
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
@@ -11,11 +11,11 @@ const require_faceFns = require("./faceFns-6AarivqH.cjs");
|
|
|
11
11
|
const require_curveFns = require("./curveFns-BA5zsoce.cjs");
|
|
12
12
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
13
13
|
const require_surfaceBuilders = require("./surfaceBuilders-R4DKNFkI.cjs");
|
|
14
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
15
|
-
const require_helpers = require("./helpers-
|
|
16
|
-
const require_blueprint = require("./blueprint-
|
|
17
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
18
|
-
const require_boolean2D = require("./boolean2D-
|
|
14
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CFa32JZU.cjs");
|
|
15
|
+
const require_helpers = require("./helpers-DN6s-TLC.cjs");
|
|
16
|
+
const require_blueprint = require("./blueprint-BBUOweQy.cjs");
|
|
17
|
+
const require_cornerFinder = require("./cornerFinder-BuYpqGO8.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-Z0KE98a4.cjs");
|
|
19
19
|
const require_cameraFns = require("./cameraFns-Drgka78Q.cjs");
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
@@ -5,7 +5,7 @@ import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
|
5
5
|
import { v as downcast } from "./faceFns-BO8IXhhf.js";
|
|
6
6
|
import { _ as propagateAllMetadata, g as collectInputFaceHashes } from "./shapeFns-B6UAiYAx.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
|
-
import {
|
|
8
|
+
import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-QUpJdbiK.js";
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -5,7 +5,7 @@ const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
|
5
5
|
const require_faceFns = require("./faceFns-6AarivqH.cjs");
|
|
6
6
|
const require_shapeFns = require("./shapeFns-sF0x5Zhj.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const
|
|
8
|
+
const require_solidBuilders = require("./solidBuilders-lDXPwoCz.cjs");
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -336,10 +336,10 @@ function getNurbsSurfaceData(face) {
|
|
|
336
336
|
//#endregion
|
|
337
337
|
//#region src/topology/booleanBatchFns.ts
|
|
338
338
|
var REAL_OPS = {
|
|
339
|
-
cut:
|
|
340
|
-
cutAll:
|
|
341
|
-
fuse:
|
|
342
|
-
fuseAll:
|
|
339
|
+
cut: require_solidBuilders.cut,
|
|
340
|
+
cutAll: require_solidBuilders.cutAll,
|
|
341
|
+
fuse: require_solidBuilders.fuse,
|
|
342
|
+
fuseAll: require_solidBuilders.fuseAll
|
|
343
343
|
};
|
|
344
344
|
function freezeTelemetry(t) {
|
|
345
345
|
return {
|
|
@@ -6,7 +6,7 @@ import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
|
|
|
6
6
|
import { l as normalAt, s as getSurfaceType } from "./faceFns-BO8IXhhf.js";
|
|
7
7
|
import { a as isSameShape, n as getHashCode } from "./shapeFns-B6UAiYAx.js";
|
|
8
8
|
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-XSz4F9j3.js";
|
|
9
|
-
import { n as measureArea } from "./measureFns-
|
|
9
|
+
import { n as measureArea } from "./measureFns-7Nz5JklM.js";
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -6,7 +6,7 @@ const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
|
6
6
|
const require_faceFns = require("./faceFns-6AarivqH.cjs");
|
|
7
7
|
const require_shapeFns = require("./shapeFns-sF0x5Zhj.cjs");
|
|
8
8
|
const require_curveFns = require("./curveFns-BA5zsoce.cjs");
|
|
9
|
-
const require_measureFns = require("./measureFns-
|
|
9
|
+
const require_measureFns = require("./measureFns-BNHvjShh.cjs");
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -2,7 +2,7 @@ const require_shapeTypes = require("./shapeTypes-D1eUDuzl.cjs");
|
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-BBUOweQy.cjs");
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
|
@@ -2,7 +2,7 @@ import { Z as getKernel, t as castShape } from "./shapeTypes-D4Evnmz_.js";
|
|
|
2
2
|
import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-DjzevNhB.js";
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_meshFns = require("./meshFns-YXFipjjx.cjs");
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
3
|
+
const require_importFns = require("./importFns-Cb-cmpGG.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
|
6
6
|
exports.exportGlb = require_importFns.exportGlb;
|
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-CWwOpBlM.js";
|
|
2
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-
|
|
2
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-D4Xet5aD.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -39,6 +39,20 @@ function measureVolumeProps(shape) {
|
|
|
39
39
|
if (cached) return ok(cached);
|
|
40
40
|
if (shapeIsNull(shape)) return nullShapeErr("measureVolumeProps");
|
|
41
41
|
const kernel = getKernel();
|
|
42
|
+
const type = kernel.shapeType(shape.wrapped);
|
|
43
|
+
if (type !== "solid" && type !== "compsolid" && type !== "compound") {
|
|
44
|
+
const zero = {
|
|
45
|
+
mass: 0,
|
|
46
|
+
volume: 0,
|
|
47
|
+
centerOfMass: [
|
|
48
|
+
0,
|
|
49
|
+
0,
|
|
50
|
+
0
|
|
51
|
+
]
|
|
52
|
+
};
|
|
53
|
+
setCachedMeasurement(shape.wrapped, "volume", zero);
|
|
54
|
+
return ok(zero);
|
|
55
|
+
}
|
|
42
56
|
const m = kernel.volume(shape.wrapped);
|
|
43
57
|
const comResult = kernelCallRaw(() => kernel.centerOfMass(shape.wrapped), BrepErrorCode.CENTER_OF_MASS_FAILED, "Failed to compute center of mass");
|
|
44
58
|
if (!comResult.ok) return comResult;
|