brepjs 20.12.9 → 20.12.10
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-CfhGIMeR.cjs → adjacencyFns-CxdCl5WP.cjs} +3 -3
- package/dist/{adjacencyFns-1Cmjb2ot.js → adjacencyFns-D5HrKCrU.js} +3 -3
- package/dist/{blueprint-BVcuEefs.js → blueprint-BX9jLBWa.js} +5 -5
- package/dist/{blueprint-DbJVzU9F.cjs → blueprint-D_T-AYNd.cjs} +5 -5
- package/dist/{blueprintFns-DePTHG1I.cjs → blueprintFns-COoax_Qd.cjs} +2 -2
- package/dist/{blueprintFns-mD4pDyFP.js → blueprintFns-DD_cM248.js} +2 -2
- package/dist/{blueprintSketcher-BrGmq-65.js → blueprintSketcher-DtjZEmgc.js} +3 -3
- package/dist/{blueprintSketcher-B5CFmhjg.cjs → blueprintSketcher-wvZPUAlC.cjs} +3 -3
- package/dist/{boolean2D-BrHrY60M.js → boolean2D-Bpy4N2Gn.js} +4 -4
- package/dist/{boolean2D-CFKg1FJ_.cjs → boolean2D-DX0exPxi.cjs} +4 -4
- package/dist/{booleanFns-CKDyqKz0.js → booleanFns-BfHFIGG2.js} +4 -4
- package/dist/{booleanFns-C640CeaY.cjs → booleanFns-CJFWBMrz.cjs} +4 -4
- package/dist/brepjs.cjs +72 -55
- package/dist/brepjs.js +72 -55
- package/dist/{cameraFns-DIbua1lC.js → cameraFns-CQr0Z3FY.js} +3 -3
- package/dist/{cameraFns-hXUKJkLg.cjs → cameraFns-slop0dGo.cjs} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-ByBGU0r7.cjs → cornerFinder-B-odGaqU.cjs} +1 -1
- package/dist/{cornerFinder-BYDkloVc.js → cornerFinder-BGktSDIJ.js} +1 -1
- package/dist/{curveFns-Cqgtmhr0.cjs → curveFns-B1ZGAua6.cjs} +1 -1
- package/dist/{curveFns-DphpaoQ4.js → curveFns-DpAho4sY.js} +1 -1
- package/dist/{drawFns-GwVZX47o.cjs → drawFns-BaX0T4YH.cjs} +12 -12
- package/dist/{drawFns-Ch3ah8K9.js → drawFns-HPK4VIr4.js} +12 -12
- package/dist/{faceFns-D4cDeMRf.js → faceFns-DvnSVq5k.js} +2 -2
- package/dist/{faceFns-BDqVGEoB.cjs → faceFns-mca5oNNe.cjs} +2 -2
- package/dist/{healingFns-Fu7Xl8fu.cjs → healingFns-BY_IdHbC.cjs} +91 -22
- package/dist/{healingFns--vBKh5pa.js → healingFns-DYtkECby.js} +85 -22
- package/dist/{helpers-Wnq-YPWv.cjs → helpers-6DyPwHPE.cjs} +6 -6
- package/dist/{helpers-CroIo2SI.js → helpers-WdI_vPa4.js} +6 -6
- package/dist/{importFns-D5Bt_44J.js → importFns-D7KuHlJx.js} +5 -5
- package/dist/{importFns-tHr15Lhm.cjs → importFns-DN5oxh4I.cjs} +5 -5
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/interfaces/modifierOps.d.ts +12 -0
- package/dist/kernel/occtWasm/modifierOps.d.ts +8 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +5 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/{loftFns-Bh_RuF7a.js → loftFns-DE21800M.js} +1 -1
- package/dist/{loftFns-T0GxcPlB.cjs → loftFns-Udobz6tm.cjs} +1 -1
- package/dist/{measureFns-C3TZ5Fj9.js → measureFns-DmL9FRQC.js} +3 -3
- package/dist/{measureFns-DGm6ndQY.cjs → measureFns-JNQma34N.cjs} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-Go1XSyUh.js → meshFns-CqLLizwL.js} +4 -4
- package/dist/{meshFns-DDgZ3vpr.cjs → meshFns-CsMwXvw3.cjs} +4 -4
- package/dist/{occtWasmAdapter-CZPZnpCe.cjs → occtWasmAdapter-DTEpwXuT.cjs} +29 -4
- package/dist/{occtWasmAdapter-EM3EhKwk.js → occtWasmAdapter-Dr70YU4m.js} +29 -4
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-Dg_XWYtp.cjs → primitiveFns-CE8IsnCc.cjs} +5 -5
- package/dist/{primitiveFns-CeRc4Sls.js → primitiveFns-DnzKWigX.js} +5 -5
- package/dist/{principalBoxFns-B5zdek3y.cjs → principalBoxFns-D_SbLz4g.cjs} +3 -3
- package/dist/{principalBoxFns-BuK-ueAB.js → principalBoxFns-wy3yRjqt.js} +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-CFwsYCKA.cjs → refResolveFns-Bi9CTJ3m.cjs} +6 -6
- package/dist/{refResolveFns-WRcvVhV-.js → refResolveFns-Cd_CuhaX.js} +6 -6
- package/dist/{shapeFns-DuxfaqTw.cjs → shapeFns-DCiFtMCX.cjs} +2 -2
- package/dist/{shapeFns-CYjU8PsF.js → shapeFns-pMt-Oz0f.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes--7XBFlOD.cjs → shapeTypes-B9ACN7a8.cjs} +1 -1
- package/dist/{shapeTypes-DvzbSivn.js → shapeTypes-Ccp9iVna.js} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-BqSVC4cB.js → solidBuilders-BltNQKqZ.js} +3 -3
- package/dist/{solidBuilders-D0bIZX9K.cjs → solidBuilders-DwqlsNW1.cjs} +3 -3
- package/dist/{surfaceBuilders-CPQHyL_5.cjs → surfaceBuilders-CYuQfMQj.cjs} +3 -3
- package/dist/{surfaceBuilders--HOoTQad.js → surfaceBuilders-CiNyRrC4.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-plsbHqiI.js → textBlueprints-CHXueg05.js} +8 -8
- package/dist/{textBlueprints-B4HzJzZM.cjs → textBlueprints-DiYY758O.cjs} +8 -8
- package/dist/{textMetrics-IIS6DUTr.js → textMetrics-C0rVJZVh.js} +1 -1
- package/dist/{textMetrics-CBwUIDI7.cjs → textMetrics-DJIhwIPL.cjs} +1 -1
- package/dist/{threadFns-CmZFykpi.js → threadFns-B9uxy9ud.js} +7 -7
- package/dist/{threadFns-e8_26ZYw.cjs → threadFns-ChWU9CVV.cjs} +7 -7
- package/dist/topology/apiTypes.d.ts +6 -2
- package/dist/topology/chamferAngleFns.d.ts +24 -0
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-BUzMuIs5.js → topologyQueryFns-D7j1fl0n.js} +1 -1
- package/dist/{topologyQueryFns-NszVx8a0.cjs → topologyQueryFns-DEax1nqt.cjs} +1 -1
- package/dist/{validityTypes-CdY06B8c.js → validityTypes-6AePqp-3.js} +1 -1
- package/dist/{validityTypes-Ds4zNICF.cjs → validityTypes-BolqrAZa.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-DCiFtMCX.cjs");
|
|
6
6
|
// src/projection/projectionPlanes.ts
|
|
7
7
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
8
8
|
var PROJECTION_PLANES = {
|
package/dist/core.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
|
|
3
3
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
4
4
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
5
|
-
const require_validityTypes = require("./validityTypes-
|
|
5
|
+
const require_validityTypes = require("./validityTypes-BolqrAZa.cjs");
|
|
6
6
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
7
7
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
8
8
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, H as withScope, L as isLive, M as is3D, N as DisposalScope, P as createHandle, S as isShell, T as isWire, U as withScopeResult, W as withScopeResultAsync, _ as isCompound, b as isShape1D, i as castShape, j as is2D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, H as withScope, L as isLive, M as is3D, N as DisposalScope, P as createHandle, S as isShell, T as isWire, U as withScopeResult, W as withScopeResultAsync, _ as isCompound, b as isShape1D, i as castShape, j as is2D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-Ccp9iVna.js";
|
|
2
2
|
import { n as bug, t as BrepBugError } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, P as unwrap, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, l as typeCastError, m as andThen, n as computationError, o as queryError, r as ioError, u as unsupportedError, w as mapErr, x as isOk } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { c as manifoldShell, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, r as isManifoldShell, s as isValidSolid, t as closedWire } from "./validityTypes-
|
|
4
|
+
import { c as manifoldShell, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, r as isManifoldShell, s as isValidSolid, t as closedWire } from "./validityTypes-6AePqp-3.js";
|
|
5
5
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
6
6
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.js";
|
|
7
7
|
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-S-m9H_fe.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-6DyPwHPE.cjs");
|
|
4
4
|
// 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-iraOnb2p.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
3
|
-
import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-
|
|
3
|
+
import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-WdI_vPa4.js";
|
|
4
4
|
// src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -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-Ccp9iVna.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
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-B9ACN7a8.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-DEax1nqt.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-mca5oNNe.cjs");
|
|
10
|
+
const require_curveFns = require("./curveFns-B1ZGAua6.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-CYuQfMQj.cjs");
|
|
13
|
+
const require_blueprintSketcher = require("./blueprintSketcher-wvZPUAlC.cjs");
|
|
14
|
+
const require_helpers = require("./helpers-6DyPwHPE.cjs");
|
|
15
|
+
const require_blueprint = require("./blueprint-D_T-AYNd.cjs");
|
|
16
|
+
const require_cornerFinder = require("./cornerFinder-B-odGaqU.cjs");
|
|
17
|
+
const require_boolean2D = require("./boolean2D-DX0exPxi.cjs");
|
|
18
|
+
const require_textBlueprints = require("./textBlueprints-DiYY758O.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-slop0dGo.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,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-Ccp9iVna.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-D7j1fl0n.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-DvnSVq5k.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-DpAho4sY.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-CiNyRrC4.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-DtjZEmgc.js";
|
|
14
|
+
import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-WdI_vPa4.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-BX9jLBWa.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-BGktSDIJ.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-Bpy4N2Gn.js";
|
|
18
|
+
import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-CHXueg05.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-CQr0Z3FY.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,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-Ccp9iVna.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-D7j1fl0n.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-B9ACN7a8.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.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
|
-
const require_shapeTypes = require("./shapeTypes
|
|
2
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
|
|
2
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-DTEpwXuT.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.cjs");
|
|
5
5
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_booleanFns = require("./booleanFns-
|
|
6
|
+
const require_faceFns = require("./faceFns-mca5oNNe.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-CJFWBMrz.cjs");
|
|
8
8
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
9
9
|
// src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
@@ -711,9 +711,40 @@ function removeFaces(shape, faces) {
|
|
|
711
711
|
/**
|
|
712
712
|
* Chamfer with distance + angle — functional API.
|
|
713
713
|
*
|
|
714
|
-
* Provides chamferDistAngle() which chamfers edges using
|
|
715
|
-
* measured along one face and
|
|
714
|
+
* Provides chamferDistAngle(), which chamfers edges using one distance
|
|
715
|
+
* measured along one face and one angle that determines the chamfer on the
|
|
716
|
+
* other, and chamferDistAngles(), which gives each edge its own pair.
|
|
716
717
|
*/
|
|
718
|
+
function validateDistAngle(distance, angleDeg) {
|
|
719
|
+
if (distance <= 0) return require_errors.err(require_errors.validationError("CHAMFER_ANGLE_BAD_DISTANCE", `distance must be positive, got ${distance}`, void 0, { distance }));
|
|
720
|
+
if (angleDeg <= 0 || angleDeg >= 90) return require_errors.err(require_errors.validationError("CHAMFER_ANGLE_BAD_ANGLE", `angleDeg must be in range (0, 90), got ${angleDeg}`, void 0, { angleDeg }));
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* `CHAMFER_ANGLE_FAILED`, with `metadata.failedEdges` set to the edges the
|
|
724
|
+
* kernel named when it could not build them (occt-wasm 5.8+).
|
|
725
|
+
*/
|
|
726
|
+
function chamferAngleFailed(operation, e, edges, metadata) {
|
|
727
|
+
const failedEdges = require_occtWasmAdapter.faultyEdgeIndexesOf(e)?.flatMap((i) => edges[i] ?? []);
|
|
728
|
+
return require_errors.err(require_errors.kernelError("CHAMFER_ANGLE_FAILED", `${operation} kernel call failed: ${e instanceof Error ? e.message : String(e)}`, e, {
|
|
729
|
+
...metadata,
|
|
730
|
+
...failedEdges ? { failedEdges } : {}
|
|
731
|
+
}, failedEdges && failedEdges.length > 0 ? "The chamfer could not be built on metadata.failedEdges: use a smaller distance there, or leave those edges out" : void 0));
|
|
732
|
+
}
|
|
733
|
+
/** Cast a fresh kernel result to a 3D shape, releasing every intermediate slot. */
|
|
734
|
+
function castChamferResult(raw) {
|
|
735
|
+
const downcastResult = require_faceFns.downcast(raw);
|
|
736
|
+
if (require_errors.isErr(downcastResult)) {
|
|
737
|
+
require_shapeTypes.getKernel().dispose(raw);
|
|
738
|
+
return downcastResult;
|
|
739
|
+
}
|
|
740
|
+
const wrapped = require_shapeTypes.castResultShape(downcastResult.value);
|
|
741
|
+
require_shapeTypes.disposeDowncastSource(raw, wrapped);
|
|
742
|
+
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
743
|
+
require_shapeTypes.disposeResultShape(wrapped);
|
|
744
|
+
return require_errors.err(require_errors.typeCastError("CHAMFER_ANGLE_NOT_3D", "chamferDistAngle did not produce a 3D shape"));
|
|
745
|
+
}
|
|
746
|
+
return require_errors.ok(wrapped);
|
|
747
|
+
}
|
|
717
748
|
/**
|
|
718
749
|
* Chamfer edges of a shape using distance + angle.
|
|
719
750
|
*
|
|
@@ -730,32 +761,64 @@ function removeFaces(shape, faces) {
|
|
|
730
761
|
*/
|
|
731
762
|
function chamferDistAngle(shape, edges, distance, angleDeg) {
|
|
732
763
|
if (edges.length === 0) return require_errors.err(require_errors.validationError("CHAMFER_ANGLE_NO_EDGES", "chamferDistAngle requires at least one edge", void 0, { edgeCount: 0 }));
|
|
733
|
-
|
|
734
|
-
if (
|
|
764
|
+
const invalid = validateDistAngle(distance, angleDeg);
|
|
765
|
+
if (invalid) return invalid;
|
|
735
766
|
let raw;
|
|
736
767
|
try {
|
|
737
768
|
const kernel = require_shapeTypes.getKernel();
|
|
738
769
|
const rawEdges = edges.map((e) => e.wrapped);
|
|
739
770
|
raw = kernel.chamferDistAngle(shape.wrapped, rawEdges, distance, angleDeg);
|
|
740
771
|
} catch (e) {
|
|
741
|
-
return
|
|
772
|
+
return chamferAngleFailed("chamferDistAngle", e, edges, {
|
|
742
773
|
distance,
|
|
743
774
|
angleDeg,
|
|
744
775
|
edgeCount: edges.length
|
|
745
|
-
})
|
|
746
|
-
}
|
|
747
|
-
const downcastResult = require_faceFns.downcast(raw);
|
|
748
|
-
if (require_errors.isErr(downcastResult)) {
|
|
749
|
-
require_shapeTypes.getKernel().dispose(raw);
|
|
750
|
-
return downcastResult;
|
|
776
|
+
});
|
|
751
777
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
778
|
+
return castChamferResult(raw);
|
|
779
|
+
}
|
|
780
|
+
function perEdgeUnsupported(kernelId, cause) {
|
|
781
|
+
return require_errors.err(require_errors.unsupportedError(require_errors.BrepErrorCode.UNSUPPORTED_CAPABILITY, `chamferDistAngles: the ${kernelId} kernel cannot give each edge its own distance and angle`, cause, { kernel: kernelId }, "Give every edge the same { distance, angle }, or use the occt-wasm kernel (5.9.0 or later)"));
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Chamfer each edge by its own distance and angle, in one operation.
|
|
785
|
+
*
|
|
786
|
+
* Edges that all share one distance and angle go through
|
|
787
|
+
* {@link chamferDistAngle}, which every kernel provides. Different values need
|
|
788
|
+
* a kernel with a per-edge distance-angle chamfer (occt-wasm 5.9.0 or later);
|
|
789
|
+
* on any other kernel the result is an `UNSUPPORTED_CAPABILITY` error. On
|
|
790
|
+
* occt-wasm the edges of one tangent-continuous contour must share their
|
|
791
|
+
* distance and angle, or the result is `CHAMFER_ANGLE_FAILED`.
|
|
792
|
+
*
|
|
793
|
+
* @param shape - The 3D shape to chamfer.
|
|
794
|
+
* @param entries - Each edge with its distance and angle (must not be empty).
|
|
795
|
+
* @returns Ok with the chamfered shape, or Err on invalid input, an unsupported
|
|
796
|
+
* kernel, or kernel failure.
|
|
797
|
+
*/
|
|
798
|
+
function chamferDistAngles(shape, entries) {
|
|
799
|
+
const [first] = entries;
|
|
800
|
+
if (first === void 0) return require_errors.err(require_errors.validationError("CHAMFER_ANGLE_NO_EDGES", "chamferDistAngles requires at least one edge", void 0, { edgeCount: 0 }));
|
|
801
|
+
for (const { distance, angle } of entries) {
|
|
802
|
+
const invalid = validateDistAngle(distance, angle);
|
|
803
|
+
if (invalid) return invalid;
|
|
804
|
+
}
|
|
805
|
+
const edges = entries.map((e) => e.edge);
|
|
806
|
+
if (entries.every((e) => e.distance === first.distance && e.angle === first.angle)) return chamferDistAngle(shape, edges, first.distance, first.angle);
|
|
807
|
+
const kernel = require_shapeTypes.getKernel();
|
|
808
|
+
const perEdge = kernel.chamferDistAngles?.bind(kernel);
|
|
809
|
+
if (!perEdge) return perEdgeUnsupported(kernel.kernelId, void 0);
|
|
810
|
+
let raw;
|
|
811
|
+
try {
|
|
812
|
+
raw = perEdge(shape.wrapped, entries.map(({ edge, distance, angle }) => ({
|
|
813
|
+
edge: edge.wrapped,
|
|
814
|
+
distance,
|
|
815
|
+
angleDeg: angle
|
|
816
|
+
})));
|
|
817
|
+
} catch (e) {
|
|
818
|
+
if (require_occtWasmAdapter.isUnsupportedKernelOperationError(e)) return perEdgeUnsupported(kernel.kernelId, e);
|
|
819
|
+
return chamferAngleFailed("chamferDistAngles", e, edges, { edgeCount: entries.length });
|
|
757
820
|
}
|
|
758
|
-
return
|
|
821
|
+
return castChamferResult(raw);
|
|
759
822
|
}
|
|
760
823
|
// src/topology/nurbsFns.ts
|
|
761
824
|
/**
|
|
@@ -1495,6 +1558,12 @@ Object.defineProperty(exports, "chamferDistAngle", {
|
|
|
1495
1558
|
return chamferDistAngle;
|
|
1496
1559
|
}
|
|
1497
1560
|
});
|
|
1561
|
+
Object.defineProperty(exports, "chamferDistAngles", {
|
|
1562
|
+
enumerable: true,
|
|
1563
|
+
get: function() {
|
|
1564
|
+
return chamferDistAngles;
|
|
1565
|
+
}
|
|
1566
|
+
});
|
|
1498
1567
|
Object.defineProperty(exports, "chamferWithEvolution", {
|
|
1499
1568
|
enumerable: true,
|
|
1500
1569
|
get: function() {
|
|
@@ -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-Ccp9iVna.js";
|
|
2
|
+
import { j as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-Dr70YU4m.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-D7j1fl0n.js";
|
|
5
5
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
6
|
-
import { y as downcast } from "./faceFns-
|
|
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-
|
|
6
|
+
import { y as downcast } from "./faceFns-DvnSVq5k.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-BfHFIGG2.js";
|
|
8
8
|
import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
9
9
|
// src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
@@ -711,9 +711,40 @@ function removeFaces(shape, faces) {
|
|
|
711
711
|
/**
|
|
712
712
|
* Chamfer with distance + angle — functional API.
|
|
713
713
|
*
|
|
714
|
-
* Provides chamferDistAngle() which chamfers edges using
|
|
715
|
-
* measured along one face and
|
|
714
|
+
* Provides chamferDistAngle(), which chamfers edges using one distance
|
|
715
|
+
* measured along one face and one angle that determines the chamfer on the
|
|
716
|
+
* other, and chamferDistAngles(), which gives each edge its own pair.
|
|
716
717
|
*/
|
|
718
|
+
function validateDistAngle(distance, angleDeg) {
|
|
719
|
+
if (distance <= 0) return err(validationError("CHAMFER_ANGLE_BAD_DISTANCE", `distance must be positive, got ${distance}`, void 0, { distance }));
|
|
720
|
+
if (angleDeg <= 0 || angleDeg >= 90) return err(validationError("CHAMFER_ANGLE_BAD_ANGLE", `angleDeg must be in range (0, 90), got ${angleDeg}`, void 0, { angleDeg }));
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* `CHAMFER_ANGLE_FAILED`, with `metadata.failedEdges` set to the edges the
|
|
724
|
+
* kernel named when it could not build them (occt-wasm 5.8+).
|
|
725
|
+
*/
|
|
726
|
+
function chamferAngleFailed(operation, e, edges, metadata) {
|
|
727
|
+
const failedEdges = faultyEdgeIndexesOf(e)?.flatMap((i) => edges[i] ?? []);
|
|
728
|
+
return err(kernelError("CHAMFER_ANGLE_FAILED", `${operation} kernel call failed: ${e instanceof Error ? e.message : String(e)}`, e, {
|
|
729
|
+
...metadata,
|
|
730
|
+
...failedEdges ? { failedEdges } : {}
|
|
731
|
+
}, failedEdges && failedEdges.length > 0 ? "The chamfer could not be built on metadata.failedEdges: use a smaller distance there, or leave those edges out" : void 0));
|
|
732
|
+
}
|
|
733
|
+
/** Cast a fresh kernel result to a 3D shape, releasing every intermediate slot. */
|
|
734
|
+
function castChamferResult(raw) {
|
|
735
|
+
const downcastResult = downcast(raw);
|
|
736
|
+
if (isErr(downcastResult)) {
|
|
737
|
+
getKernel().dispose(raw);
|
|
738
|
+
return downcastResult;
|
|
739
|
+
}
|
|
740
|
+
const wrapped = castResultShape(downcastResult.value);
|
|
741
|
+
disposeDowncastSource(raw, wrapped);
|
|
742
|
+
if (!isShape3D(wrapped)) {
|
|
743
|
+
disposeResultShape(wrapped);
|
|
744
|
+
return err(typeCastError("CHAMFER_ANGLE_NOT_3D", "chamferDistAngle did not produce a 3D shape"));
|
|
745
|
+
}
|
|
746
|
+
return ok(wrapped);
|
|
747
|
+
}
|
|
717
748
|
/**
|
|
718
749
|
* Chamfer edges of a shape using distance + angle.
|
|
719
750
|
*
|
|
@@ -730,32 +761,64 @@ function removeFaces(shape, faces) {
|
|
|
730
761
|
*/
|
|
731
762
|
function chamferDistAngle(shape, edges, distance, angleDeg) {
|
|
732
763
|
if (edges.length === 0) return err(validationError("CHAMFER_ANGLE_NO_EDGES", "chamferDistAngle requires at least one edge", void 0, { edgeCount: 0 }));
|
|
733
|
-
|
|
734
|
-
if (
|
|
764
|
+
const invalid = validateDistAngle(distance, angleDeg);
|
|
765
|
+
if (invalid) return invalid;
|
|
735
766
|
let raw;
|
|
736
767
|
try {
|
|
737
768
|
const kernel = getKernel();
|
|
738
769
|
const rawEdges = edges.map((e) => e.wrapped);
|
|
739
770
|
raw = kernel.chamferDistAngle(shape.wrapped, rawEdges, distance, angleDeg);
|
|
740
771
|
} catch (e) {
|
|
741
|
-
return
|
|
772
|
+
return chamferAngleFailed("chamferDistAngle", e, edges, {
|
|
742
773
|
distance,
|
|
743
774
|
angleDeg,
|
|
744
775
|
edgeCount: edges.length
|
|
745
|
-
})
|
|
776
|
+
});
|
|
746
777
|
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
778
|
+
return castChamferResult(raw);
|
|
779
|
+
}
|
|
780
|
+
function perEdgeUnsupported(kernelId, cause) {
|
|
781
|
+
return err(unsupportedError(BrepErrorCode.UNSUPPORTED_CAPABILITY, `chamferDistAngles: the ${kernelId} kernel cannot give each edge its own distance and angle`, cause, { kernel: kernelId }, "Give every edge the same { distance, angle }, or use the occt-wasm kernel (5.9.0 or later)"));
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Chamfer each edge by its own distance and angle, in one operation.
|
|
785
|
+
*
|
|
786
|
+
* Edges that all share one distance and angle go through
|
|
787
|
+
* {@link chamferDistAngle}, which every kernel provides. Different values need
|
|
788
|
+
* a kernel with a per-edge distance-angle chamfer (occt-wasm 5.9.0 or later);
|
|
789
|
+
* on any other kernel the result is an `UNSUPPORTED_CAPABILITY` error. On
|
|
790
|
+
* occt-wasm the edges of one tangent-continuous contour must share their
|
|
791
|
+
* distance and angle, or the result is `CHAMFER_ANGLE_FAILED`.
|
|
792
|
+
*
|
|
793
|
+
* @param shape - The 3D shape to chamfer.
|
|
794
|
+
* @param entries - Each edge with its distance and angle (must not be empty).
|
|
795
|
+
* @returns Ok with the chamfered shape, or Err on invalid input, an unsupported
|
|
796
|
+
* kernel, or kernel failure.
|
|
797
|
+
*/
|
|
798
|
+
function chamferDistAngles(shape, entries) {
|
|
799
|
+
const [first] = entries;
|
|
800
|
+
if (first === void 0) return err(validationError("CHAMFER_ANGLE_NO_EDGES", "chamferDistAngles requires at least one edge", void 0, { edgeCount: 0 }));
|
|
801
|
+
for (const { distance, angle } of entries) {
|
|
802
|
+
const invalid = validateDistAngle(distance, angle);
|
|
803
|
+
if (invalid) return invalid;
|
|
751
804
|
}
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
805
|
+
const edges = entries.map((e) => e.edge);
|
|
806
|
+
if (entries.every((e) => e.distance === first.distance && e.angle === first.angle)) return chamferDistAngle(shape, edges, first.distance, first.angle);
|
|
807
|
+
const kernel = getKernel();
|
|
808
|
+
const perEdge = kernel.chamferDistAngles?.bind(kernel);
|
|
809
|
+
if (!perEdge) return perEdgeUnsupported(kernel.kernelId, void 0);
|
|
810
|
+
let raw;
|
|
811
|
+
try {
|
|
812
|
+
raw = perEdge(shape.wrapped, entries.map(({ edge, distance, angle }) => ({
|
|
813
|
+
edge: edge.wrapped,
|
|
814
|
+
distance,
|
|
815
|
+
angleDeg: angle
|
|
816
|
+
})));
|
|
817
|
+
} catch (e) {
|
|
818
|
+
if (isUnsupportedKernelOperationError(e)) return perEdgeUnsupported(kernel.kernelId, e);
|
|
819
|
+
return chamferAngleFailed("chamferDistAngles", e, edges, { edgeCount: entries.length });
|
|
757
820
|
}
|
|
758
|
-
return
|
|
821
|
+
return castChamferResult(raw);
|
|
759
822
|
}
|
|
760
823
|
// src/topology/nurbsFns.ts
|
|
761
824
|
/**
|
|
@@ -1477,4 +1540,4 @@ function fixSelfIntersection(wire) {
|
|
|
1477
1540
|
return err(kernelError(BrepErrorCode.FIX_SELF_INTERSECTION_FAILED, "Failed to fix wire self-intersection", e));
|
|
1478
1541
|
}
|
|
1479
1542
|
}
|
|
1480
|
-
export {
|
|
1543
|
+
export { thicken as A, chamferDistAngles as C, offset as D, fillet as E, toLODGeometryLevels as F, toLineGeometryData as I, toBufferGeometryData as M, toGroupedBufferGeometryData as N, removeFaces as O, toLODGeometryData as P, chamferDistAngle as S, draft as T, checkBoolean as _, healFace as a, getNurbsCurveData as b, isValid as c, chamferWithEvolution as d, cutWithEvolution as f, shellWithEvolution as g, intersectWithEvolution as h, heal as i, variableFillet as j, shell as k, solidFromShell as l, fuseWithEvolution as m, fixSelfIntersection as n, healSolid as o, filletWithEvolution as p, fixShape as r, healWire as s, autoHeal as t, positionOnCurve as u, cutAllBisect as v, chamfer as w, getNurbsSurfaceData as x, fuseAllBisect as y };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.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-mca5oNNe.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-DCiFtMCX.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-B1ZGAua6.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-JNQma34N.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-Ccp9iVna.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-D7j1fl0n.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-DvnSVq5k.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-pMt-Oz0f.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-DpAho4sY.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-DmL9FRQC.js";
|
|
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 { C as isSolid, G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { C as isSolid, G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-Ccp9iVna.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At$1 } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { S as subShapeCount, c as getFaces, u as getShells } from "./topologyQueryFns-
|
|
4
|
+
import { S as subShapeCount, c as getFaces, u as getShells } from "./topologyQueryFns-D7j1fl0n.js";
|
|
5
5
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
6
|
-
import { t as makeCompound } from "./solidBuilders-
|
|
7
|
-
import { u as igesUnsupportedError } from "./meshFns-
|
|
6
|
+
import { t as makeCompound } from "./solidBuilders-BltNQKqZ.js";
|
|
7
|
+
import { u as igesUnsupportedError } from "./meshFns-CqLLizwL.js";
|
|
8
8
|
import { n as getAtOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
9
|
-
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
9
|
+
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-BX9jLBWa.js";
|
|
10
10
|
// src/io/objExportFns.ts
|
|
11
11
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
12
12
|
function vec3At(arr, i) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-B9ACN7a8.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-DEax1nqt.cjs");
|
|
5
5
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const require_meshFns = require("./meshFns-
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-DwqlsNW1.cjs");
|
|
7
|
+
const require_meshFns = require("./meshFns-CsMwXvw3.cjs");
|
|
8
8
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
9
|
-
const require_blueprint = require("./blueprint-
|
|
9
|
+
const require_blueprint = require("./blueprint-D_T-AYNd.cjs");
|
|
10
10
|
// src/io/objExportFns.ts
|
|
11
11
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
12
12
|
function vec3At(arr, i) {
|
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-CsMwXvw3.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-DN5oxh4I.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 exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-
|
|
1
|
+
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-CqLLizwL.js";
|
|
2
|
+
import { a as exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-D7KuHlJx.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -3,6 +3,18 @@ export interface KernelModifierOps {
|
|
|
3
3
|
fillet(shape: KernelShape, edges: KernelShape[], radius: number | [number, number] | ((edge: KernelShape) => number | [number, number])): KernelShape;
|
|
4
4
|
chamfer(shape: KernelShape, edges: KernelShape[], distance: number | [number, number] | ((edge: KernelShape) => number | [number, number])): KernelShape;
|
|
5
5
|
chamferDistAngle(shape: KernelShape, edges: KernelShape[], distance: number, angleDeg: number): KernelShape;
|
|
6
|
+
/**
|
|
7
|
+
* Distance-angle chamfer with its own values on each edge, in one operation:
|
|
8
|
+
* `distance` is set back on the edge's reference face (as {@link chamferDistAngle}
|
|
9
|
+
* picks it) and `angleDeg` is measured from that face.
|
|
10
|
+
* Optional: kernels without it can chamfer by distance and angle only with
|
|
11
|
+
* one value for every edge.
|
|
12
|
+
*/
|
|
13
|
+
chamferDistAngles?(shape: KernelShape, edges: ReadonlyArray<{
|
|
14
|
+
edge: KernelShape;
|
|
15
|
+
distance: number;
|
|
16
|
+
angleDeg: number;
|
|
17
|
+
}>): KernelShape;
|
|
6
18
|
shell(shape: KernelShape, faces: KernelShape[], thickness: number, tolerance?: number): KernelShape;
|
|
7
19
|
thicken(shape: KernelShape, thickness: number): KernelShape;
|
|
8
20
|
offset(shape: KernelShape, distance: number, tolerance?: number): KernelShape;
|
|
@@ -3,7 +3,14 @@ import { OcctKernelWasm, OcctWasmModule } from './occtWasmTypes.js';
|
|
|
3
3
|
import { EdgeValueSpec } from './helpers.js';
|
|
4
4
|
export declare function fillet(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, edges: KernelShape[], radius: EdgeValueSpec): KernelShape;
|
|
5
5
|
export declare function chamfer(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, edges: KernelShape[], distance: EdgeValueSpec): KernelShape;
|
|
6
|
+
interface DistAngle {
|
|
7
|
+
readonly distance: number;
|
|
8
|
+
readonly angleDeg: number;
|
|
9
|
+
}
|
|
6
10
|
export declare function chamferDistAngle(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, edges: KernelShape[], distance: number, angleDeg: number): KernelShape;
|
|
11
|
+
export declare function chamferDistAngles(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, entries: ReadonlyArray<{
|
|
12
|
+
edge: KernelShape;
|
|
13
|
+
} & DistAngle>): KernelShape;
|
|
7
14
|
export declare function shell(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, faces: KernelShape[], thickness: number, tolerance?: number): KernelShape;
|
|
8
15
|
export declare function thicken(k: OcctKernelWasm, shape: KernelShape, thickness: number): KernelShape;
|
|
9
16
|
export declare function offset(k: OcctKernelWasm, shape: KernelShape, distance: number, tolerance?: number): KernelShape;
|
|
@@ -14,3 +21,4 @@ export declare function defeature(k: OcctKernelWasm, Module: OcctWasmModule, sha
|
|
|
14
21
|
export declare function offsetWire2D(k: OcctKernelWasm, wire: KernelShape, offset: number, joinType?: number | 'arc' | 'intersection' | 'tangent'): KernelShape;
|
|
15
22
|
export declare function simplify(k: OcctKernelWasm, shape: KernelShape): KernelShape;
|
|
16
23
|
export declare function reverseShape(k: OcctKernelWasm, shape: KernelShape): KernelShape;
|
|
24
|
+
export {};
|
|
@@ -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-DTEpwXuT.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|