brepjs 18.118.2 → 18.118.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-COWMJ1OX.cjs → adjacencyFns-CiDCunAU.cjs} +2 -2
- package/dist/{adjacencyFns-D026zKM3.js → adjacencyFns-CxepMm7H.js} +2 -2
- package/dist/{blueprint-BeCL-AAl.js → blueprint-BIf01dZl.js} +15 -10
- package/dist/{blueprint-xcDMSkia.cjs → blueprint-Bp_sSxx2.cjs} +17 -11
- package/dist/{blueprintFns-DIMiD67q.cjs → blueprintFns-Dc8amB5a.cjs} +2 -2
- package/dist/{blueprintFns-BkSFPipn.js → blueprintFns-Dl_drDhd.js} +2 -2
- package/dist/{blueprintSketcher-DKfkNg71.js → blueprintSketcher-D-xSC6Mp.js} +5 -4
- package/dist/{blueprintSketcher-DGcCDQq2.cjs → blueprintSketcher-XiLc6fJ4.cjs} +5 -4
- package/dist/{boolean2D-BCTOcf19.js → boolean2D-BNjpYyZl.js} +5 -5
- package/dist/{boolean2D-Dh4IPW_X.cjs → boolean2D-BfKG5Wio.cjs} +7 -6
- package/dist/brepjs.cjs +29 -29
- package/dist/brepjs.js +29 -29
- package/dist/{cameraFns-BAm-2Clq.cjs → cameraFns-ClE0QcuX.cjs} +2 -2
- package/dist/{cameraFns-CRln-7RT.js → cameraFns-DyMKpFHq.js} +2 -2
- package/dist/core/shapeTypes.d.ts +32 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-DMJBP4I2.cjs → cornerFinder-CINnfCPc.cjs} +1 -1
- package/dist/{cornerFinder-Bu482P3S.js → cornerFinder-DFswCdwf.js} +1 -1
- package/dist/{curveFns-pGQFlJG-.js → curveFns-BYcTyyb7.js} +1 -1
- package/dist/{curveFns-CpaxYpa4.cjs → curveFns-YvH970hp.cjs} +1 -1
- package/dist/{drawFns-D-PqWuBQ.cjs → drawFns-CG3ksr6q.cjs} +14 -13
- package/dist/{drawFns-BAETgRWM.js → drawFns-DkhqDgS5.js} +14 -13
- package/dist/{faceFns-Bc6sBrBV.js → faceFns-CpOAl1K5.js} +2 -2
- package/dist/{faceFns-rbWcdpvj.cjs → faceFns-DnLXDWq2.cjs} +4 -3
- package/dist/{healingFns-DfshoSeQ.cjs → healingFns-BIcPeCM9.cjs} +16 -15
- package/dist/{healingFns-DHxzmeCt.js → healingFns-BP0xjoIs.js} +16 -15
- package/dist/{helpers-YD71h41H.js → helpers-BVkEnH5n.js} +6 -6
- package/dist/{helpers-CKbgoPDr.cjs → helpers-Beq_ugyN.cjs} +6 -6
- package/dist/{importFns-CQ16LqPQ.cjs → importFns-BZYgEOu-.cjs} +4 -4
- package/dist/{importFns-A437Sgj6.js → importFns-DPQmk2TS.js} +4 -4
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/booleanOps.d.ts +9 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/types.d.ts +2 -4
- package/dist/{loftFns-BQktV4u4.cjs → loftFns-CZC_NH_h.cjs} +1 -1
- package/dist/{loftFns-CXc9tRv6.js → loftFns-NauDWzek.js} +1 -1
- package/dist/{measureFns-B_vJqwDc.js → measureFns-BLmLZr0K.js} +3 -3
- package/dist/{measureFns-I5KcAgSb.cjs → measureFns-C4BxD4kC.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-COdN1kVO.js → meshFns-BK5O_pJ9.js} +3 -3
- package/dist/{meshFns-fPnPGEPl.cjs → meshFns-BoF6g1go.cjs} +3 -3
- package/dist/{occtWasmAdapter-B2TEQOjs.cjs → occtWasmAdapter-Bj9dX3Lb.cjs} +45 -10
- package/dist/{occtWasmAdapter-CKwtxwNH.js → occtWasmAdapter-wBLknH8f.js} +45 -10
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DxP7GVQh.js → primitiveFns-DJUXtN6W.js} +4 -4
- package/dist/{primitiveFns-Cohp602Q.cjs → primitiveFns-DOyyz54-.cjs} +4 -4
- 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-NGXXyTBa.js → refResolveFns-DL1zXF8u.js} +18 -11
- package/dist/{refResolveFns-Du0v4e3Y.cjs → refResolveFns-DbTYd_Nj.cjs} +18 -11
- package/dist/{shapeFns-DqGDtCsE.js → shapeFns-DED4C70_.js} +84 -23
- package/dist/{shapeFns-DvmBIZaX.cjs → shapeFns-DxAhtxFP.cjs} +84 -23
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-EI4Uxlsb.js → shapeTypes-BguzpBK0.js} +70 -22
- package/dist/{shapeTypes-BLREi6xB.cjs → shapeTypes-Ca76Bklg.cjs} +87 -21
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-Oq-hxTvJ.js → solidBuilders-_8mqPO7I.js} +6 -5
- package/dist/{solidBuilders-B6DBRdRc.cjs → solidBuilders-yyfZ2Q-7.cjs} +6 -5
- package/dist/{surfaceBuilders-C0pJwtCO.js → surfaceBuilders-CT__o6Be.js} +2 -2
- package/dist/{surfaceBuilders-C-UhFlpS.cjs → surfaceBuilders-De2XKidK.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-lSKzw-nT.cjs → textBlueprints-C17PPSzH.cjs} +9 -8
- package/dist/{textBlueprints-fBpuvT3m.js → textBlueprints-D9l3v-f3.js} +9 -8
- package/dist/{textMetrics-BkTdFBwC.cjs → textMetrics-BwQ7TD47.cjs} +1 -1
- package/dist/{textMetrics-CnrAQwLI.js → textMetrics-GSAxEtaJ.js} +1 -1
- package/dist/{threadFns-DJt3EStH.cjs → threadFns-Bu2c-lu_.cjs} +8 -8
- package/dist/{threadFns-Dlts4xFy.js → threadFns-DOqhI5OK.js} +8 -8
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-1PqfeHrV.cjs → topologyQueryFns-B1QAiZVI.cjs} +1 -1
- package/dist/{topologyQueryFns-BjgBf2t-.js → topologyQueryFns-Dl2F-2d9.js} +1 -1
- package/package.json +16 -15
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as manifoldShell, B as is3D, C as closedWire, E as isOrientedFace, F as getShapeKind, G as isLive, H as createHandle, P as validSolid, S as isWire, T as isManifoldShell, U as createKernelHandle, V as DisposalScope, X as withScopeResult, Y as withScope, Z as withScopeResultAsync, _ as isShape1D, b as isSolid, g as isFace, h as isEdge, j as orientedFace, k as isValidSolid, m as isCompound, n as castShape, v as isShape3D, w as isClosedWire, x as isVertex, y as isShell, z as is2D } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
4
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
@@ -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-Beq_ugyN.cjs");
|
|
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
|
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-BVkEnH5n.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as isWire, et as getKernel, h as isEdge, n as castShape } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-C17PPSzH.cjs");
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
3
3
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
4
4
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
5
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
5
|
+
const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
|
|
6
6
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
7
7
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
8
8
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
9
9
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
10
|
-
const require_faceFns = require("./faceFns-
|
|
11
|
-
const require_curveFns = require("./curveFns-
|
|
10
|
+
const require_faceFns = require("./faceFns-DnLXDWq2.cjs");
|
|
11
|
+
const require_curveFns = require("./curveFns-YvH970hp.cjs");
|
|
12
12
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
13
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
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-
|
|
19
|
-
const require_cameraFns = require("./cameraFns-
|
|
13
|
+
const require_surfaceBuilders = require("./surfaceBuilders-De2XKidK.cjs");
|
|
14
|
+
const require_blueprintSketcher = require("./blueprintSketcher-XiLc6fJ4.cjs");
|
|
15
|
+
const require_helpers = require("./helpers-Beq_ugyN.cjs");
|
|
16
|
+
const require_blueprint = require("./blueprint-Bp_sSxx2.cjs");
|
|
17
|
+
const require_cornerFinder = require("./cornerFinder-CINnfCPc.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-BfKG5Wio.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-ClE0QcuX.cjs");
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -451,7 +451,8 @@ var sketchParametricFunction = (func, planeConfig = {}, { pointsCount = 400, sta
|
|
|
451
451
|
const plane = planeConfig.plane && typeof planeConfig.plane !== "string" ? { ...planeConfig.plane } : require_errors.unwrap(require_planeOps.resolvePlane(planeConfig.plane ?? "XY", planeConfig.origin));
|
|
452
452
|
const stepSize = (stop - start) / pointsCount;
|
|
453
453
|
const points = [...Array(pointsCount + 1).keys()].map((t) => {
|
|
454
|
-
|
|
454
|
+
const point = func(start + t * stepSize);
|
|
455
|
+
return require_planeOps.planeToWorld(plane, point);
|
|
455
456
|
});
|
|
456
457
|
return new require_textBlueprints.Sketch(require_errors.unwrap(require_surfaceBuilders.assembleWire([scope.register(require_errors.unwrap(require_surfaceBuilders.makeBSplineApproximation(points, approximationConfig)))])), {
|
|
457
458
|
defaultOrigin: [...plane.origin],
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as _usingCtx, V as DisposalScope, d as createWire, et as getKernel, o as createEdge, s as createFace } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-Dl2F-2d9.js";
|
|
5
5
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
6
6
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
8
8
|
import { a as planeToWorld, o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v 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 downcast } from "./faceFns-CpOAl1K5.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-BYcTyyb7.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.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 { _ 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-
|
|
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-CT__o6Be.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-D-xSC6Mp.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-BVkEnH5n.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-BIf01dZl.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-DFswCdwf.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-BNjpYyZl.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-D9l3v-f3.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-DyMKpFHq.js";
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -451,7 +451,8 @@ var sketchParametricFunction = (func, planeConfig = {}, { pointsCount = 400, sta
|
|
|
451
451
|
const plane = planeConfig.plane && typeof planeConfig.plane !== "string" ? { ...planeConfig.plane } : unwrap(resolvePlane(planeConfig.plane ?? "XY", planeConfig.origin));
|
|
452
452
|
const stepSize = (stop - start) / pointsCount;
|
|
453
453
|
const points = [...Array(pointsCount + 1).keys()].map((t) => {
|
|
454
|
-
|
|
454
|
+
const point = func(start + t * stepSize);
|
|
455
|
+
return planeToWorld(plane, point);
|
|
455
456
|
});
|
|
456
457
|
return new Sketch(unwrap(assembleWire([scope.register(unwrap(makeBSplineApproximation(points, approximationConfig)))])), {
|
|
457
458
|
defaultOrigin: [...plane.origin],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as getKernel, n as castShape } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { a as getCachedSurfaceType } from "./topologyQueryFns-
|
|
3
|
+
import { a as getCachedSurfaceType } from "./topologyQueryFns-Dl2F-2d9.js";
|
|
4
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
5
5
|
//#region 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-Ca76Bklg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
|
|
4
4
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -107,7 +107,8 @@ var KERNEL_TO_PUBLIC_SURFACE_TYPE = {
|
|
|
107
107
|
* @returns Ok with the surface type, or Err for unrecognized kernel surface types.
|
|
108
108
|
*/
|
|
109
109
|
function getSurfaceType(face) {
|
|
110
|
-
|
|
110
|
+
const kernelType = require_topologyQueryFns.getCachedSurfaceType(face);
|
|
111
|
+
return require_errors.ok(KERNEL_TO_PUBLIC_SURFACE_TYPE[kernelType]);
|
|
111
112
|
}
|
|
112
113
|
/** Get the surface type of a face (unwrapped convenience). */
|
|
113
114
|
function faceGeomType(face) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-DnLXDWq2.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-DxAhtxFP.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_solidBuilders = require("./solidBuilders-yyfZ2Q-7.cjs");
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -354,6 +354,7 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
|
354
354
|
wrapped[Symbol.dispose]();
|
|
355
355
|
return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
356
356
|
}
|
|
357
|
+
require_shapeTypes.disposeDowncastSource(shape, wrapped);
|
|
357
358
|
return require_errors.ok(wrapped);
|
|
358
359
|
}
|
|
359
360
|
function resolveEdgeCallback$1(selectedEdges, callbackFn) {
|
|
@@ -469,7 +470,7 @@ function filletWithEvolution(shape, edges, radius) {
|
|
|
469
470
|
}
|
|
470
471
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
471
472
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().filletWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
472
|
-
const cast = require_shapeTypes.
|
|
473
|
+
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
473
474
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
474
475
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
475
476
|
return require_errors.ok({
|
|
@@ -513,7 +514,7 @@ function chamferWithEvolution(shape, edges, distance) {
|
|
|
513
514
|
}
|
|
514
515
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
515
516
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().chamferWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelDistance, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
516
|
-
const cast = require_shapeTypes.
|
|
517
|
+
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
517
518
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
|
|
518
519
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
519
520
|
return require_errors.ok({
|
|
@@ -545,7 +546,7 @@ function shellWithEvolution(shape, faces, thickness, tolerance = .001) {
|
|
|
545
546
|
try {
|
|
546
547
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
547
548
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, require_constants.HASH_CODE_MAX, tolerance);
|
|
548
|
-
const cast = require_shapeTypes.
|
|
549
|
+
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
549
550
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
550
551
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
551
552
|
return require_errors.ok({
|
|
@@ -638,7 +639,7 @@ function resolveEdgeCallback(selectedEdges, callbackFn) {
|
|
|
638
639
|
* Returns an error if the result is not a 3D shape.
|
|
639
640
|
*/
|
|
640
641
|
function finalizeShape3D(evolution, resultShape, inputs, not3dCode, not3dMessage) {
|
|
641
|
-
const cast = require_shapeTypes.
|
|
642
|
+
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
642
643
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError(not3dCode, not3dMessage));
|
|
643
644
|
require_shapeFns.propagateAllMetadata(evolution, inputs, cast);
|
|
644
645
|
return require_errors.ok(cast);
|
|
@@ -683,7 +684,7 @@ function thicken(shape, thickness) {
|
|
|
683
684
|
try {
|
|
684
685
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
685
686
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().thickenWithHistory(shape.wrapped, thickness, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
686
|
-
const cast = require_shapeTypes.
|
|
687
|
+
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
687
688
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
688
689
|
return require_errors.ok(cast);
|
|
689
690
|
} catch (e) {
|
|
@@ -736,7 +737,7 @@ function fillet(shape, edges, radius, { trackEvolution = true } = {}) {
|
|
|
736
737
|
try {
|
|
737
738
|
const edgeShapes = filteredEdges.map((e) => e.wrapped);
|
|
738
739
|
if (!trackEvolution) {
|
|
739
|
-
const cast = require_shapeTypes.
|
|
740
|
+
const cast = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().fillet(shape.wrapped, edgeShapes, kernelRadius));
|
|
740
741
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
741
742
|
return require_errors.ok(cast);
|
|
742
743
|
}
|
|
@@ -809,13 +810,13 @@ function shell(shape, faces, thickness, tolerance = .001, { trackEvolution = tru
|
|
|
809
810
|
if (faces.length === 0) return require_errors.err(require_errors.validationError("NO_FACES", "At least one face must be specified for shell"));
|
|
810
811
|
try {
|
|
811
812
|
if (!trackEvolution) {
|
|
812
|
-
const cast = require_shapeTypes.
|
|
813
|
+
const cast = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().shell(shape.wrapped, faces.map((f) => f.wrapped), thickness, tolerance));
|
|
813
814
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
814
815
|
return require_errors.ok(cast);
|
|
815
816
|
}
|
|
816
817
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
817
818
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, require_constants.HASH_CODE_MAX, tolerance);
|
|
818
|
-
const cast = require_shapeTypes.
|
|
819
|
+
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
819
820
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
820
821
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
821
822
|
return require_errors.ok(cast);
|
|
@@ -841,7 +842,7 @@ function offset(shape, distance, tolerance = 1e-6) {
|
|
|
841
842
|
try {
|
|
842
843
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
843
844
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().offsetWithHistory(shape.wrapped, distance, inputFaceHashes, require_constants.HASH_CODE_MAX, tolerance);
|
|
844
|
-
const cast = require_shapeTypes.
|
|
845
|
+
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
845
846
|
if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.kernelError("OFFSET_RESULT_NOT_3D", "Offset result is not a 3D shape"));
|
|
846
847
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
847
848
|
return require_errors.ok(cast);
|
|
@@ -922,7 +923,7 @@ function variableFillet(shape, edge, radii) {
|
|
|
922
923
|
radius: r.radius
|
|
923
924
|
}))
|
|
924
925
|
});
|
|
925
|
-
const wrapped = require_shapeTypes.
|
|
926
|
+
const wrapped = require_shapeTypes.castResultShape(kernel.filletVariable(shape.wrapped, spec));
|
|
926
927
|
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
927
928
|
wrapped[Symbol.dispose]();
|
|
928
929
|
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.VARIABLE_FILLET_FAILED, "Variable-radius fillet did not produce a 3D shape"));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as isWire, b as isSolid, et as getKernel, f as disposeDowncastSource, g as isFace, n as castShape, t as castResultShape, v as isShape3D } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-Dl2F-2d9.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { v as downcast } from "./faceFns-
|
|
6
|
-
import { _ as collectInputFaceHashes, y as propagateAllMetadata } from "./shapeFns-
|
|
5
|
+
import { v as downcast } from "./faceFns-CpOAl1K5.js";
|
|
6
|
+
import { _ as collectInputFaceHashes, y as propagateAllMetadata } from "./shapeFns-DED4C70_.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
|
-
import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-
|
|
8
|
+
import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-_8mqPO7I.js";
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -354,6 +354,7 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
|
354
354
|
wrapped[Symbol.dispose]();
|
|
355
355
|
return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
356
356
|
}
|
|
357
|
+
disposeDowncastSource(shape, wrapped);
|
|
357
358
|
return ok(wrapped);
|
|
358
359
|
}
|
|
359
360
|
function resolveEdgeCallback$1(selectedEdges, callbackFn) {
|
|
@@ -469,7 +470,7 @@ function filletWithEvolution(shape, edges, radius) {
|
|
|
469
470
|
}
|
|
470
471
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
471
472
|
const { shape: resultShape, evolution } = getKernel().filletWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius, inputFaceHashes, HASH_CODE_MAX);
|
|
472
|
-
const cast =
|
|
473
|
+
const cast = castResultShape(resultShape);
|
|
473
474
|
if (!isShape3D(cast)) return err(kernelError(BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
474
475
|
propagateAllMetadata(evolution, [shape], cast);
|
|
475
476
|
return ok({
|
|
@@ -513,7 +514,7 @@ function chamferWithEvolution(shape, edges, distance) {
|
|
|
513
514
|
}
|
|
514
515
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
515
516
|
const { shape: resultShape, evolution } = getKernel().chamferWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelDistance, inputFaceHashes, HASH_CODE_MAX);
|
|
516
|
-
const cast =
|
|
517
|
+
const cast = castResultShape(resultShape);
|
|
517
518
|
if (!isShape3D(cast)) return err(kernelError(BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
|
|
518
519
|
propagateAllMetadata(evolution, [shape], cast);
|
|
519
520
|
return ok({
|
|
@@ -545,7 +546,7 @@ function shellWithEvolution(shape, faces, thickness, tolerance = .001) {
|
|
|
545
546
|
try {
|
|
546
547
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
547
548
|
const { shape: resultShape, evolution } = getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, HASH_CODE_MAX, tolerance);
|
|
548
|
-
const cast =
|
|
549
|
+
const cast = castResultShape(resultShape);
|
|
549
550
|
if (!isShape3D(cast)) return err(kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
550
551
|
propagateAllMetadata(evolution, [shape], cast);
|
|
551
552
|
return ok({
|
|
@@ -638,7 +639,7 @@ function resolveEdgeCallback(selectedEdges, callbackFn) {
|
|
|
638
639
|
* Returns an error if the result is not a 3D shape.
|
|
639
640
|
*/
|
|
640
641
|
function finalizeShape3D(evolution, resultShape, inputs, not3dCode, not3dMessage) {
|
|
641
|
-
const cast =
|
|
642
|
+
const cast = castResultShape(resultShape);
|
|
642
643
|
if (!isShape3D(cast)) return err(kernelError(not3dCode, not3dMessage));
|
|
643
644
|
propagateAllMetadata(evolution, inputs, cast);
|
|
644
645
|
return ok(cast);
|
|
@@ -683,7 +684,7 @@ function thicken(shape, thickness) {
|
|
|
683
684
|
try {
|
|
684
685
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
685
686
|
const { shape: resultShape, evolution } = getKernel().thickenWithHistory(shape.wrapped, thickness, inputFaceHashes, HASH_CODE_MAX);
|
|
686
|
-
const cast =
|
|
687
|
+
const cast = castResultShape(resultShape);
|
|
687
688
|
propagateAllMetadata(evolution, [shape], cast);
|
|
688
689
|
return ok(cast);
|
|
689
690
|
} catch (e) {
|
|
@@ -736,7 +737,7 @@ function fillet(shape, edges, radius, { trackEvolution = true } = {}) {
|
|
|
736
737
|
try {
|
|
737
738
|
const edgeShapes = filteredEdges.map((e) => e.wrapped);
|
|
738
739
|
if (!trackEvolution) {
|
|
739
|
-
const cast =
|
|
740
|
+
const cast = castResultShape(getKernel().fillet(shape.wrapped, edgeShapes, kernelRadius));
|
|
740
741
|
if (!isShape3D(cast)) return err(kernelError(BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
741
742
|
return ok(cast);
|
|
742
743
|
}
|
|
@@ -809,13 +810,13 @@ function shell(shape, faces, thickness, tolerance = .001, { trackEvolution = tru
|
|
|
809
810
|
if (faces.length === 0) return err(validationError("NO_FACES", "At least one face must be specified for shell"));
|
|
810
811
|
try {
|
|
811
812
|
if (!trackEvolution) {
|
|
812
|
-
const cast =
|
|
813
|
+
const cast = castResultShape(getKernel().shell(shape.wrapped, faces.map((f) => f.wrapped), thickness, tolerance));
|
|
813
814
|
if (!isShape3D(cast)) return err(kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
814
815
|
return ok(cast);
|
|
815
816
|
}
|
|
816
817
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
817
818
|
const { shape: resultShape, evolution } = getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, HASH_CODE_MAX, tolerance);
|
|
818
|
-
const cast =
|
|
819
|
+
const cast = castResultShape(resultShape);
|
|
819
820
|
if (!isShape3D(cast)) return err(kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
820
821
|
propagateAllMetadata(evolution, [shape], cast);
|
|
821
822
|
return ok(cast);
|
|
@@ -841,7 +842,7 @@ function offset(shape, distance, tolerance = 1e-6) {
|
|
|
841
842
|
try {
|
|
842
843
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
843
844
|
const { shape: resultShape, evolution } = getKernel().offsetWithHistory(shape.wrapped, distance, inputFaceHashes, HASH_CODE_MAX, tolerance);
|
|
844
|
-
const cast =
|
|
845
|
+
const cast = castResultShape(resultShape);
|
|
845
846
|
if (!isShape3D(cast)) return err(kernelError("OFFSET_RESULT_NOT_3D", "Offset result is not a 3D shape"));
|
|
846
847
|
propagateAllMetadata(evolution, [shape], cast);
|
|
847
848
|
return ok(cast);
|
|
@@ -922,7 +923,7 @@ function variableFillet(shape, edge, radii) {
|
|
|
922
923
|
radius: r.radius
|
|
923
924
|
}))
|
|
924
925
|
});
|
|
925
|
-
const wrapped =
|
|
926
|
+
const wrapped = castResultShape(kernel.filletVariable(shape.wrapped, spec));
|
|
926
927
|
if (!isShape3D(wrapped)) {
|
|
927
928
|
wrapped[Symbol.dispose]();
|
|
928
929
|
return err(kernelError(BrepErrorCode.VARIABLE_FILLET_FAILED, "Variable-radius fillet did not produce a 3D shape"));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as getKernel, g as isFace } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-DNWJsfVU.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-Dl2F-2d9.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.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-CpOAl1K5.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-DED4C70_.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-BYcTyyb7.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-BLmLZr0K.js";
|
|
10
10
|
//#region 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
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.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-DnLXDWq2.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-DxAhtxFP.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-YvH970hp.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-C4BxD4kC.cjs");
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.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-Bp_sSxx2.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) {
|
|
@@ -535,7 +535,7 @@ function exportDXF(entities, options) {
|
|
|
535
535
|
lines.push("0", "SECTION", "2", "HEADER");
|
|
536
536
|
lines.push("9", "$ACADVER", "1", "AC1009");
|
|
537
537
|
lines.push("0", "ENDSEC");
|
|
538
|
-
const layerNames = new Set([layer]);
|
|
538
|
+
const layerNames = /* @__PURE__ */ new Set([layer]);
|
|
539
539
|
for (const entity of entities) if (entity.layer) layerNames.add(entity.layer);
|
|
540
540
|
lines.push("0", "SECTION", "2", "TABLES");
|
|
541
541
|
lines.push("0", "TABLE", "2", "LAYER", "70", String(layerNames.size));
|
|
@@ -611,7 +611,7 @@ function approximateCurveAsPolyline(curve, segments) {
|
|
|
611
611
|
}
|
|
612
612
|
//#endregion
|
|
613
613
|
//#region src/io/threemfExportFns.ts
|
|
614
|
-
var crcTable = new Uint32Array(256);
|
|
614
|
+
var crcTable = /* @__PURE__ */ new Uint32Array(256);
|
|
615
615
|
for (let i = 0; i < 256; i++) {
|
|
616
616
|
let c = i;
|
|
617
617
|
for (let j = 0; j < 8; j++) c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as getKernel, n as castShape } from "./shapeTypes-BguzpBK0.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-BIf01dZl.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) {
|
|
@@ -535,7 +535,7 @@ function exportDXF(entities, options) {
|
|
|
535
535
|
lines.push("0", "SECTION", "2", "HEADER");
|
|
536
536
|
lines.push("9", "$ACADVER", "1", "AC1009");
|
|
537
537
|
lines.push("0", "ENDSEC");
|
|
538
|
-
const layerNames = new Set([layer]);
|
|
538
|
+
const layerNames = /* @__PURE__ */ new Set([layer]);
|
|
539
539
|
for (const entity of entities) if (entity.layer) layerNames.add(entity.layer);
|
|
540
540
|
lines.push("0", "SECTION", "2", "TABLES");
|
|
541
541
|
lines.push("0", "TABLE", "2", "LAYER", "70", String(layerNames.size));
|
|
@@ -611,7 +611,7 @@ function approximateCurveAsPolyline(curve, segments) {
|
|
|
611
611
|
}
|
|
612
612
|
//#endregion
|
|
613
613
|
//#region src/io/threemfExportFns.ts
|
|
614
|
-
var crcTable = new Uint32Array(256);
|
|
614
|
+
var crcTable = /* @__PURE__ */ new Uint32Array(256);
|
|
615
615
|
for (let i = 0; i < 256; i++) {
|
|
616
616
|
let c = i;
|
|
617
617
|
for (let j = 0; j < 8; j++) c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_meshFns = require("./meshFns-
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
2
|
+
const require_meshFns = require("./meshFns-BoF6g1go.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-BZYgEOu-.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
|
-
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
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-
|
|
1
|
+
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-BK5O_pJ9.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-DPQmk2TS.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { BooleanOpType, BooleanOptions, CheckBooleanResult, KernelMeshResult, KernelShape } from '../types.js';
|
|
2
2
|
import { OcctKernelWasm, OcctWasmModule } from './occtWasmTypes.js';
|
|
3
|
+
/**
|
|
4
|
+
* The resolved tool id plus a `dispose` that releases any temporary the
|
|
5
|
+
* resolution allocated. Callers must call `dispose()` after the boolean.
|
|
6
|
+
*/
|
|
7
|
+
export interface ResolvedTool {
|
|
8
|
+
id: number;
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
}
|
|
3
11
|
/**
|
|
4
12
|
* Normalize a boolean tool to a single fused solid when it is a compound of
|
|
5
13
|
* multiple solids (e.g. engraved text — one solid per glyph). occt-wasm's
|
|
@@ -7,7 +15,7 @@ import { OcctKernelWasm, OcctWasmModule } from './occtWasmTypes.js';
|
|
|
7
15
|
* tolerated them; fusing the solids first yields a usable single tool.
|
|
8
16
|
* Single-solid (or non-solid) tools pass through untouched.
|
|
9
17
|
*/
|
|
10
|
-
export declare function resolveBooleanTool(k: OcctKernelWasm, tool: KernelShape):
|
|
18
|
+
export declare function resolveBooleanTool(k: OcctKernelWasm, tool: KernelShape): ResolvedTool;
|
|
11
19
|
export declare function fuse(k: OcctKernelWasm, shape: KernelShape, tool: KernelShape, _options?: BooleanOptions): KernelShape;
|
|
12
20
|
export declare function cut(k: OcctKernelWasm, shape: KernelShape, tool: KernelShape, _options?: BooleanOptions): KernelShape;
|
|
13
21
|
export declare function intersect(k: OcctKernelWasm, shape: KernelShape, tool: KernelShape, _options?: BooleanOptions): KernelShape;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_occtWasmAdapter = require("../../occtWasmAdapter-
|
|
2
|
+
const require_occtWasmAdapter = require("../../occtWasmAdapter-Bj9dX3Lb.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-
|
|
1
|
+
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-wBLknH8f.js";
|
|
2
2
|
export { OcctWasmAdapter };
|
package/dist/kernel/types.d.ts
CHANGED
|
@@ -49,10 +49,8 @@ export interface MeshOptions {
|
|
|
49
49
|
/** Linear deflection tolerance for tessellation. */
|
|
50
50
|
tolerance: number;
|
|
51
51
|
/**
|
|
52
|
-
* Angular deflection tolerance for tessellation.
|
|
53
|
-
*
|
|
54
|
-
* **Cross-kernel note**: brepkit only supports linear deflection; this
|
|
55
|
-
* parameter is ignored (a one-time warning is emitted). OCCT honours both.
|
|
52
|
+
* Angular deflection tolerance for tessellation. Honoured by both the OCCT
|
|
53
|
+
* and brepkit kernels; a non-positive value falls back to the kernel default.
|
|
56
54
|
*/
|
|
57
55
|
angularTolerance: number;
|
|
58
56
|
skipNormals?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as isWire, et as getKernel, l as createSolid, n as castShape, v as isShape3D } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as getKernel } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { w as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { w as kernelCallRaw } from "./topologyQueryFns-Dl2F-2d9.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-CpOAl1K5.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DnLXDWq2.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|