brepjs 20.12.7 → 20.12.8
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 +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-mMmTBUBY.cjs → adjacencyFns-BfgFo-Rh.cjs} +3 -3
- package/dist/{adjacencyFns-hMihivxC.js → adjacencyFns-Bl109A3Z.js} +3 -3
- package/dist/{blueprint-17RUHsoP.cjs → blueprint-DTDSztfd.cjs} +5 -5
- package/dist/{blueprint-BS50D3J_.js → blueprint-RqemOtg5.js} +5 -5
- package/dist/{blueprintFns-zy5lo2IF.js → blueprintFns-B9_PhTr8.js} +2 -2
- package/dist/{blueprintFns-Dw5_4_Bk.cjs → blueprintFns-C7E5R89N.cjs} +2 -2
- package/dist/{blueprintSketcher-C1WCI6E0.js → blueprintSketcher-B15522Kr.js} +3 -3
- package/dist/{blueprintSketcher-BG--DxWB.cjs → blueprintSketcher-Brj4lXjj.cjs} +3 -3
- package/dist/{boolean2D-7SQ3B0pC.cjs → boolean2D-DZ8aJbI-.cjs} +4 -4
- package/dist/{boolean2D-CsdyfjFE.js → boolean2D-_eiIiNw1.js} +4 -4
- package/dist/{solidBuilders-DdG4NPHM.cjs → booleanFns-D5nQ1nWS.cjs} +11 -217
- package/dist/{solidBuilders-Bmr59cGp.js → booleanFns-cNfXGqMX.js} +10 -156
- package/dist/brepjs.cjs +325 -168
- package/dist/brepjs.js +282 -125
- package/dist/{cameraFns-BAtzhCYM.cjs → cameraFns-6Er2lhp5.cjs} +3 -3
- package/dist/{cameraFns-BVWyAscu.js → cameraFns-YhB7A_Zc.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-e4Wc7_yp.cjs → cornerFinder-D9Wx3DWu.cjs} +1 -1
- package/dist/{cornerFinder-Dv_2rmaY.js → cornerFinder-G1WkSkVl.js} +1 -1
- package/dist/{curveFns-BAM7QHrP.cjs → curveFns-B5_N-gMj.cjs} +1 -1
- package/dist/{curveFns-CEI-rouh.js → curveFns-C4CqthJp.js} +1 -1
- package/dist/{drawFns-Cl1i8B_B.js → drawFns-DU5fewKl.js} +12 -12
- package/dist/{drawFns-d-RvC6u6.cjs → drawFns-UPbO2heB.cjs} +12 -12
- package/dist/{faceFns-Q87HCJrp.js → faceFns-BgRNa5vx.js} +2 -2
- package/dist/{faceFns-C-2ttg8X.cjs → faceFns-C4NOGZBg.cjs} +2 -2
- package/dist/{healingFns-Cm4NkKD8.js → healingFns-BzOo0yyz.js} +5 -5
- package/dist/{healingFns-DZkO5okn.cjs → healingFns-i5gV3BMG.cjs} +29 -29
- package/dist/{helpers-BdGGaLhF.cjs → helpers-DJQeDf_5.cjs} +6 -6
- package/dist/{helpers-DpGcM2qZ.js → helpers-DPHQt2Kr.js} +6 -6
- package/dist/{importFns-DLiP26NW.cjs → importFns-BiRpt227.cjs} +319 -14
- package/dist/{importFns-Bp-p0jiP.js → importFns-CwrJsNvg.js} +314 -15
- package/dist/io/igesSupport.d.ts +6 -0
- package/dist/io/importFns.d.ts +15 -5
- package/dist/io/ioUtils.d.ts +15 -3
- package/dist/io/meshNesting.d.ts +11 -0
- package/dist/io/threemfImportFns.d.ts +6 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -2
- package/dist/{loftFns-DGV1z2NJ.cjs → loftFns-DgkK4Kj_.cjs} +1 -1
- package/dist/{loftFns-DQ7Z29n3.js → loftFns-lwzTh1fI.js} +1 -1
- package/dist/{measureFns-BdSjw5fr.cjs → measureFns-D_RRjCZg.cjs} +3 -3
- package/dist/{measureFns-BrdCH4cH.js → measureFns-Q3K25IfN.js} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-UE8tByyw.js → meshFns-BGoJU6_P.js} +20 -6
- package/dist/{meshFns-BeubBqEI.cjs → meshFns-Djbb4PUC.cjs} +25 -5
- package/dist/{occtWasmAdapter-DA7oMgcQ.js → occtWasmAdapter-BCCwaYkq.js} +7 -5
- package/dist/{occtWasmAdapter-D3qerQTq.cjs → occtWasmAdapter-UcYZRi-w.cjs} +7 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-CLGVLwG8.cjs → primitiveFns-CfSnex9P.cjs} +19 -18
- package/dist/{primitiveFns-3-gs-FUX.js → primitiveFns-D-aYcwt2.js} +5 -4
- package/dist/{principalBoxFns-RMZItjfR.js → principalBoxFns-Dcp9gg5e.js} +3 -3
- package/dist/{principalBoxFns-CiXzjOkr.cjs → principalBoxFns-IY8FfPVj.cjs} +3 -3
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-kJg2iCad.js → refResolveFns-BPge7T5w.js} +6 -6
- package/dist/{refResolveFns-DNX0bCrP.cjs → refResolveFns-gZQ1o5XK.cjs} +6 -6
- package/dist/{shapeFns-SgIrOjN4.cjs → shapeFns-Bs92VrZh.cjs} +2 -2
- package/dist/{shapeFns-CZ6VF1yd.js → shapeFns-TWdr4Dv4.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-BNGu103j.js → shapeTypes-CIH-8d_a.js} +1 -1
- package/dist/{shapeTypes-MUEH4XuH.cjs → shapeTypes-DmThK_oa.cjs} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{originTrackingFns-rEKOAP65.cjs → solidBuilders-DGskMugU.cjs} +209 -2
- package/dist/{originTrackingFns-c2qgRZ_9.js → solidBuilders-q_hwYsdo.js} +150 -3
- package/dist/{surfaceBuilders-DI376ai0.js → surfaceBuilders-DXo4N7wQ.js} +3 -3
- package/dist/{surfaceBuilders-DOmDVuMs.cjs → surfaceBuilders-DeSLKg73.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-CE0oxB43.js → textBlueprints-BYWZho_c.js} +8 -7
- package/dist/{textBlueprints-B7Vhr0xu.cjs → textBlueprints-Dz6wNgve.cjs} +9 -8
- package/dist/{textMetrics-C6_kSht6.cjs → textMetrics-bKoFTj3m.cjs} +1 -1
- package/dist/{textMetrics-_VGqdewQ.js → textMetrics-k_rGqib2.js} +1 -1
- package/dist/{threadFns-CHdY-4Cz.js → threadFns-BeB8s0tA.js} +7 -7
- package/dist/{threadFns-1H60LrFX.cjs → threadFns-CoGAFHHt.cjs} +9 -9
- package/dist/topology/meshFns.d.ts +3 -0
- package/dist/topology.cjs +11 -11
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-C_fXO6xL.cjs → topologyQueryFns-CXbCFaU2.cjs} +1 -1
- package/dist/{topologyQueryFns-CltEv7Pi.js → topologyQueryFns-Cp0yekBh.js} +1 -1
- package/dist/{validityTypes-GanLrmvY.js → validityTypes-DlrWkrSR.js} +1 -1
- package/dist/{validityTypes-CGX2ES81.cjs → validityTypes-m6eLRTYE.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-
|
|
1
|
+
import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { E as ok, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
|
|
3
3
|
// src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { P as unwrap, s as safeIndex } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-Cp0yekBh.js";
|
|
5
5
|
import { t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
6
6
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
8
8
|
import { a as planeToWorld, o as resolvePlane } from "./planeOps-D3yDuMux.js";
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-
|
|
10
|
-
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-BgRNa5vx.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-C4CqthJp.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
12
|
-
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
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 { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-
|
|
15
|
-
import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } 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 wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-
|
|
19
|
-
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-
|
|
12
|
+
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-DXo4N7wQ.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-B15522Kr.js";
|
|
14
|
+
import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-DPHQt2Kr.js";
|
|
15
|
+
import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-RqemOtg5.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-G1WkSkVl.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-_eiIiNw1.js";
|
|
18
|
+
import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-BYWZho_c.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-YhB7A_Zc.js";
|
|
20
20
|
// src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
5
5
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
6
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
7
7
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
8
8
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
9
|
-
const require_faceFns = require("./faceFns-
|
|
10
|
-
const require_curveFns = require("./curveFns-
|
|
9
|
+
const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
|
|
10
|
+
const require_curveFns = require("./curveFns-B5_N-gMj.cjs");
|
|
11
11
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
12
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
13
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
14
|
-
const require_helpers = require("./helpers-
|
|
15
|
-
const require_blueprint = require("./blueprint-
|
|
16
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
17
|
-
const require_boolean2D = require("./boolean2D-
|
|
18
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
19
|
-
const require_cameraFns = require("./cameraFns-
|
|
12
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DeSLKg73.cjs");
|
|
13
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Brj4lXjj.cjs");
|
|
14
|
+
const require_helpers = require("./helpers-DJQeDf_5.cjs");
|
|
15
|
+
const require_blueprint = require("./blueprint-DTDSztfd.cjs");
|
|
16
|
+
const require_cornerFinder = require("./cornerFinder-D9Wx3DWu.cjs");
|
|
17
|
+
const require_boolean2D = require("./boolean2D-DZ8aJbI-.cjs");
|
|
18
|
+
const require_textBlueprints = require("./textBlueprints-Dz6wNgve.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-6Er2lhp5.cjs");
|
|
20
20
|
// src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { E as ok, P as unwrap, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { a as getCachedSurfaceType } from "./topologyQueryFns-
|
|
3
|
+
import { a as getCachedSurfaceType } from "./topologyQueryFns-Cp0yekBh.js";
|
|
4
4
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
5
5
|
// src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
4
4
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
5
5
|
// src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-
|
|
2
|
-
import { j as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-
|
|
1
|
+
import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-CIH-8d_a.js";
|
|
2
|
+
import { j as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-BCCwaYkq.js";
|
|
3
3
|
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, u as unsupportedError, x as isOk } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
4
|
+
import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-Cp0yekBh.js";
|
|
5
5
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
6
|
-
import { y as downcast } from "./faceFns-
|
|
7
|
-
import {
|
|
6
|
+
import { y as downcast } from "./faceFns-BgRNa5vx.js";
|
|
7
|
+
import { a as fuseAll, d as collectInputFaceHashes, i as fuse, m as propagateMetadataByHash, n as cut, p as propagateAllMetadata, r as cutAll } from "./booleanFns-cNfXGqMX.js";
|
|
8
8
|
import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
9
9
|
// src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-UcYZRi-w.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
5
5
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const
|
|
6
|
+
const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-D5nQ1nWS.cjs");
|
|
8
8
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
9
9
|
// src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
@@ -257,7 +257,7 @@ function finalizeShape3D(evolution, resultShape, inputs, not3dCode, not3dMessage
|
|
|
257
257
|
require_shapeTypes.disposeResultShape(cast);
|
|
258
258
|
return require_errors.err(require_errors.kernelError(not3dCode, not3dMessage));
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
require_booleanFns.propagateAllMetadata(evolution, inputs, cast);
|
|
261
261
|
return require_errors.ok(cast);
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
@@ -298,10 +298,10 @@ function thicken(shape, thickness) {
|
|
|
298
298
|
const check = validateNotNull$1(shape, "thicken: shape");
|
|
299
299
|
if (require_errors.isErr(check)) return check;
|
|
300
300
|
try {
|
|
301
|
-
const inputFaceHashes =
|
|
301
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
302
302
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().thickenWithHistory(shape.wrapped, thickness, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
303
303
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
304
|
-
|
|
304
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], cast);
|
|
305
305
|
return require_errors.ok(cast);
|
|
306
306
|
} catch (e) {
|
|
307
307
|
const raw = e instanceof Error ? e.message : String(e);
|
|
@@ -362,7 +362,7 @@ function fillet(shape, edges, radius, { trackEvolution = true } = {}) {
|
|
|
362
362
|
}
|
|
363
363
|
return require_errors.ok(cast);
|
|
364
364
|
}
|
|
365
|
-
const inputFaceHashes =
|
|
365
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
366
366
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().filletWithHistory(shape.wrapped, edgeShapes, kernelRadius, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
367
367
|
return finalizeShape3D(evolution, resultShape, [shape], require_errors.BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape");
|
|
368
368
|
} catch (e) {
|
|
@@ -417,7 +417,7 @@ function chamfer(shape, edges, distance) {
|
|
|
417
417
|
filteredEdges = [...selectedEdges];
|
|
418
418
|
kernelDistance = distance;
|
|
419
419
|
}
|
|
420
|
-
const inputFaceHashes =
|
|
420
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
421
421
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().chamferWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelDistance, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
422
422
|
return finalizeShape3D(evolution, resultShape, [shape], require_errors.BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape");
|
|
423
423
|
} catch (e) {
|
|
@@ -440,7 +440,7 @@ function acceptThickResult(input, cast, evolution, spec, propagateMetadata = tru
|
|
|
440
440
|
require_shapeTypes.disposeResultShape(cast);
|
|
441
441
|
return checked;
|
|
442
442
|
}
|
|
443
|
-
if (evolution && propagateMetadata)
|
|
443
|
+
if (evolution && propagateMetadata) require_booleanFns.propagateAllMetadata(evolution, [input], cast);
|
|
444
444
|
return require_errors.ok(cast);
|
|
445
445
|
}
|
|
446
446
|
/**
|
|
@@ -539,7 +539,7 @@ function draft(shape, faces, pullDirection, neutralPlane, angle) {
|
|
|
539
539
|
try {
|
|
540
540
|
const { filteredFaces, kernelAngle } = resolveDraftCallback(faces, angle);
|
|
541
541
|
if (filteredFaces.length === 0) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.DRAFT_NO_FACES, "No faces with valid draft angle", void 0, void 0, "Check that the angle callback returns non-zero values between -90 and 90 degrees"));
|
|
542
|
-
const inputFaceHashes =
|
|
542
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
543
543
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().draftWithHistory(shape.wrapped, filteredFaces.map((f) => f.wrapped), [
|
|
544
544
|
pullDirection[0],
|
|
545
545
|
pullDirection[1],
|
|
@@ -704,7 +704,7 @@ function removeFaces(shape, faces) {
|
|
|
704
704
|
keptFaceIndexes: kept
|
|
705
705
|
}, "Remove the whole feature, or leave out the faces listed in metadata.keptFaceIndexes"));
|
|
706
706
|
}
|
|
707
|
-
|
|
707
|
+
require_booleanFns.propagateMetadataByHash([shape], result);
|
|
708
708
|
return require_errors.ok(result);
|
|
709
709
|
}
|
|
710
710
|
// src/topology/chamferAngleFns.ts
|
|
@@ -778,10 +778,10 @@ function getNurbsSurfaceData(face) {
|
|
|
778
778
|
}
|
|
779
779
|
// src/topology/booleanBatchFns.ts
|
|
780
780
|
var REAL_OPS = {
|
|
781
|
-
cut:
|
|
782
|
-
cutAll:
|
|
783
|
-
fuse:
|
|
784
|
-
fuseAll:
|
|
781
|
+
cut: require_booleanFns.cut,
|
|
782
|
+
cutAll: require_booleanFns.cutAll,
|
|
783
|
+
fuse: require_booleanFns.fuse,
|
|
784
|
+
fuseAll: require_booleanFns.fuseAll
|
|
785
785
|
};
|
|
786
786
|
function freezeTelemetry(t) {
|
|
787
787
|
return {
|
|
@@ -971,7 +971,7 @@ function fuseWithEvolution(a, b, { optimisation = "none", simplify = false, sign
|
|
|
971
971
|
if (require_errors.isErr(checkA)) return checkA;
|
|
972
972
|
const checkB = validateShape3D(b, "fuseWithEvolution: second operand");
|
|
973
973
|
if (require_errors.isErr(checkB)) return checkB;
|
|
974
|
-
const inputFaceHashes =
|
|
974
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([a, b]);
|
|
975
975
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
976
976
|
optimisation,
|
|
977
977
|
simplify,
|
|
@@ -979,7 +979,7 @@ function fuseWithEvolution(a, b, { optimisation = "none", simplify = false, sign
|
|
|
979
979
|
});
|
|
980
980
|
const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.");
|
|
981
981
|
if (fuseResult.ok) {
|
|
982
|
-
|
|
982
|
+
require_booleanFns.propagateAllMetadata(evolution, [a, b], fuseResult.value);
|
|
983
983
|
return require_errors.ok({
|
|
984
984
|
shape: fuseResult.value,
|
|
985
985
|
evolution
|
|
@@ -993,7 +993,7 @@ function cutWithEvolution(base, tool, { optimisation = "none", simplify = false,
|
|
|
993
993
|
if (require_errors.isErr(checkBase)) return checkBase;
|
|
994
994
|
const checkTool = validateShape3D(tool, "cutWithEvolution: tool");
|
|
995
995
|
if (require_errors.isErr(checkTool)) return checkTool;
|
|
996
|
-
const inputFaceHashes =
|
|
996
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([base, tool]);
|
|
997
997
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
998
998
|
optimisation,
|
|
999
999
|
simplify,
|
|
@@ -1001,7 +1001,7 @@ function cutWithEvolution(base, tool, { optimisation = "none", simplify = false,
|
|
|
1001
1001
|
});
|
|
1002
1002
|
const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.");
|
|
1003
1003
|
if (cutResult.ok) {
|
|
1004
|
-
|
|
1004
|
+
require_booleanFns.propagateAllMetadata(evolution, [base, tool], cutResult.value);
|
|
1005
1005
|
return require_errors.ok({
|
|
1006
1006
|
shape: cutResult.value,
|
|
1007
1007
|
evolution
|
|
@@ -1015,14 +1015,14 @@ function intersectWithEvolution(a, b, { simplify = false, signal, fuzzyValue } =
|
|
|
1015
1015
|
if (require_errors.isErr(checkA)) return checkA;
|
|
1016
1016
|
const checkB = validateShape3D(b, "intersectWithEvolution: second operand");
|
|
1017
1017
|
if (require_errors.isErr(checkB)) return checkB;
|
|
1018
|
-
const inputFaceHashes =
|
|
1018
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([a, b]);
|
|
1019
1019
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
1020
1020
|
simplify,
|
|
1021
1021
|
fuzzyValue
|
|
1022
1022
|
});
|
|
1023
1023
|
const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.");
|
|
1024
1024
|
if (intResult.ok) {
|
|
1025
|
-
|
|
1025
|
+
require_booleanFns.propagateAllMetadata(evolution, [a, b], intResult.value);
|
|
1026
1026
|
return require_errors.ok({
|
|
1027
1027
|
shape: intResult.value,
|
|
1028
1028
|
evolution
|
|
@@ -1057,14 +1057,14 @@ function filletWithEvolution(shape, edges, radius) {
|
|
|
1057
1057
|
filteredEdges = [...selectedEdges];
|
|
1058
1058
|
kernelRadius = radius;
|
|
1059
1059
|
}
|
|
1060
|
-
const inputFaceHashes =
|
|
1060
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
1061
1061
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().filletWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
1062
1062
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
1063
1063
|
if (!require_shapeTypes.isShape3D(cast)) {
|
|
1064
1064
|
require_shapeTypes.disposeResultShape(cast);
|
|
1065
1065
|
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
1066
1066
|
}
|
|
1067
|
-
|
|
1067
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], cast);
|
|
1068
1068
|
return require_errors.ok({
|
|
1069
1069
|
shape: cast,
|
|
1070
1070
|
evolution
|
|
@@ -1105,14 +1105,14 @@ function chamferWithEvolution(shape, edges, distance) {
|
|
|
1105
1105
|
filteredEdges = [...selectedEdges];
|
|
1106
1106
|
kernelDistance = distance;
|
|
1107
1107
|
}
|
|
1108
|
-
const inputFaceHashes =
|
|
1108
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
1109
1109
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().chamferWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelDistance, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
1110
1110
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
1111
1111
|
if (!require_shapeTypes.isShape3D(cast)) {
|
|
1112
1112
|
require_shapeTypes.disposeResultShape(cast);
|
|
1113
1113
|
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
|
|
1114
1114
|
}
|
|
1115
|
-
|
|
1115
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], cast);
|
|
1116
1116
|
return require_errors.ok({
|
|
1117
1117
|
shape: cast,
|
|
1118
1118
|
evolution
|
|
@@ -1141,14 +1141,14 @@ function shellWithEvolution(shape, faces, thickness, tolerance = .001) {
|
|
|
1141
1141
|
if (thickness <= 0) return require_errors.err(require_errors.validationError("INVALID_THICKNESS", "Shell thickness must be positive"));
|
|
1142
1142
|
if (faces.length === 0) return require_errors.err(require_errors.validationError("NO_FACES", "At least one face must be specified for shell"));
|
|
1143
1143
|
try {
|
|
1144
|
-
const inputFaceHashes =
|
|
1144
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
1145
1145
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, require_constants.HASH_CODE_MAX, tolerance);
|
|
1146
1146
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
1147
1147
|
if (!require_shapeTypes.isShape3D(cast)) {
|
|
1148
1148
|
require_shapeTypes.disposeResultShape(cast);
|
|
1149
1149
|
return require_errors.err(require_errors.kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
1150
1150
|
}
|
|
1151
|
-
|
|
1151
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], cast);
|
|
1152
1152
|
return require_errors.ok({
|
|
1153
1153
|
shape: cast,
|
|
1154
1154
|
evolution
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
9
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-Bs92VrZh.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-B5_N-gMj.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-D_RRjCZg.cjs");
|
|
10
10
|
// src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { q as getKernel, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, y as isFace } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { E as ok, g as err, o as queryError, x as isOk } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-Cp0yekBh.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { a as vecDot, d as vecNormalize } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { l as normalAt, s as getSurfaceType } from "./faceFns-
|
|
7
|
-
import { a as isSameShape, n as getHashCode } from "./shapeFns-
|
|
8
|
-
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-
|
|
9
|
-
import { n as measureArea } from "./measureFns-
|
|
6
|
+
import { l as normalAt, s as getSurfaceType } from "./faceFns-BgRNa5vx.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-TWdr4Dv4.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-C4CqthJp.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-Q3K25IfN.js";
|
|
10
10
|
// src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|