brepjs 18.118.4 → 18.118.6
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-CiDCunAU.cjs → adjacencyFns-CpyYIeax.cjs} +2 -2
- package/dist/{adjacencyFns-CxepMm7H.js → adjacencyFns-cSvOB_Ze.js} +2 -2
- package/dist/{blueprint-BIf01dZl.js → blueprint-BelsntLG.js} +5 -5
- package/dist/{blueprint-Bp_sSxx2.cjs → blueprint-CsxL1j9L.cjs} +5 -5
- package/dist/{blueprintFns-Dl_drDhd.js → blueprintFns-CAut3zwQ.js} +2 -2
- package/dist/{blueprintFns-Dc8amB5a.cjs → blueprintFns-DT6M5_k_.cjs} +2 -2
- package/dist/{blueprintSketcher-XiLc6fJ4.cjs → blueprintSketcher-CcZ_89uU.cjs} +3 -3
- package/dist/{blueprintSketcher-D-xSC6Mp.js → blueprintSketcher-x4mNzlv3.js} +3 -3
- package/dist/{boolean2D-BfKG5Wio.cjs → boolean2D-BLigmyIR.cjs} +4 -4
- package/dist/{boolean2D-BNjpYyZl.js → boolean2D-nGqoIZh4.js} +4 -4
- package/dist/brepjs.cjs +45 -39
- package/dist/brepjs.js +45 -39
- package/dist/{cameraFns-ClE0QcuX.cjs → cameraFns-C3Xf7-I7.cjs} +2 -2
- package/dist/{cameraFns-DyMKpFHq.js → cameraFns-DmLhH9Pr.js} +2 -2
- package/dist/core/shapeTypes.d.ts +8 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-DFswCdwf.js → cornerFinder-BC2eaeW9.js} +1 -1
- package/dist/{cornerFinder-CINnfCPc.cjs → cornerFinder-C6IpCea0.cjs} +1 -1
- package/dist/{curveFns-BYcTyyb7.js → curveFns-Ca020OZW.js} +14 -8
- package/dist/{curveFns-YvH970hp.cjs → curveFns-D7d2foN-.cjs} +14 -8
- package/dist/{drawFns-DkhqDgS5.js → drawFns-BW8OeXum.js} +12 -12
- package/dist/{drawFns-CG3ksr6q.cjs → drawFns-Bz_jLHCa.cjs} +12 -12
- package/dist/{faceFns-DnLXDWq2.cjs → faceFns-mARULpM7.cjs} +2 -2
- package/dist/{faceFns-CpOAl1K5.js → faceFns-yqC4gDSc.js} +2 -2
- package/dist/{healingFns-BIcPeCM9.cjs → healingFns-CV0xzJi6.cjs} +38 -29
- package/dist/{healingFns-BP0xjoIs.js → healingFns-D7uMxSHi.js} +38 -29
- package/dist/{helpers-Beq_ugyN.cjs → helpers-CEi8kRzi.cjs} +6 -6
- package/dist/{helpers-BVkEnH5n.js → helpers-DcWisIKC.js} +6 -6
- package/dist/{importFns-DPQmk2TS.js → importFns-B8II-pj-.js} +2 -2
- package/dist/{importFns-BZYgEOu-.cjs → importFns-DUniB9wl.cjs} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loftFns-NauDWzek.js → loftFns-B4ZJYoX2.js} +72 -31
- package/dist/{loftFns-CZC_NH_h.cjs → loftFns-oCtEZjxa.cjs} +72 -31
- package/dist/{measureFns-C4BxD4kC.cjs → measureFns-BD9_NT7u.cjs} +3 -3
- package/dist/{measureFns-BLmLZr0K.js → measureFns-CLWtxkh6.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-BK5O_pJ9.js → meshFns-Cd2zde-k.js} +3 -3
- package/dist/{meshFns-BoF6g1go.cjs → meshFns-Cim4Y6vz.cjs} +3 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DOyyz54-.cjs → primitiveFns-CHrrghJM.cjs} +4 -4
- package/dist/{primitiveFns-DJUXtN6W.js → primitiveFns-DplUMAxU.js} +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-DL1zXF8u.js → refResolveFns-CJ58ZH-S.js} +6 -6
- package/dist/{refResolveFns-DbTYd_Nj.cjs → refResolveFns-TdGhQZUP.cjs} +6 -6
- package/dist/{shapeFns-DED4C70_.js → shapeFns-DjiKoRrd.js} +2 -2
- package/dist/{shapeFns-DxAhtxFP.cjs → shapeFns-DxbbLpGg.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-Ca76Bklg.cjs → shapeTypes-BbUKvpaO.cjs} +17 -0
- package/dist/{shapeTypes-BguzpBK0.js → shapeTypes-Osdj5kMc.js} +12 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-_8mqPO7I.js → solidBuilders-B8hK3cdi.js} +16 -23
- package/dist/{solidBuilders-yyfZ2Q-7.cjs → solidBuilders-BASH2bih.cjs} +16 -23
- package/dist/{surfaceBuilders-CT__o6Be.js → surfaceBuilders-CMUEd1bK.js} +2 -2
- package/dist/{surfaceBuilders-De2XKidK.cjs → surfaceBuilders-DDfVCOVg.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-D9l3v-f3.js → textBlueprints-BKwbX7PZ.js} +7 -7
- package/dist/{textBlueprints-C17PPSzH.cjs → textBlueprints-DdfGcHik.cjs} +7 -7
- package/dist/{textMetrics-GSAxEtaJ.js → textMetrics-DIVTsrHQ.js} +1 -1
- package/dist/{textMetrics-BwQ7TD47.cjs → textMetrics-DNF4ITX5.cjs} +1 -1
- package/dist/{threadFns-DOqhI5OK.js → threadFns-DbqB5RMq.js} +10 -10
- package/dist/{threadFns-Bu2c-lu_.cjs → threadFns-DetQVphJ.cjs} +10 -10
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-B1QAiZVI.cjs → topologyQueryFns-Cf2j9Zt0.cjs} +1 -1
- package/dist/{topologyQueryFns-Dl2F-2d9.js → topologyQueryFns-DzOSCj5J.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as isWire, g as isEdge, p as disposeResultShape, t as castResultShape, tt as getKernel } from "./shapeTypes-Osdj5kMc.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
|
/**
|
|
@@ -121,7 +121,7 @@ function getOrientation(shape) {
|
|
|
121
121
|
}
|
|
122
122
|
/** Flip the orientation of an edge or wire. Returns a new shape with the same dimension. */
|
|
123
123
|
function flipOrientation(shape) {
|
|
124
|
-
return
|
|
124
|
+
return castResultShape(getKernel().reverseShape(shape.wrapped));
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Interpolate a smooth BSpline curve that passes exactly through the given points.
|
|
@@ -133,8 +133,11 @@ function flipOrientation(shape) {
|
|
|
133
133
|
function interpolateCurve(points, options = {}) {
|
|
134
134
|
if (points.length < 2) return err(typeCastError("INTERPOLATE_MIN_POINTS", "Interpolation requires at least 2 points"));
|
|
135
135
|
try {
|
|
136
|
-
const cast =
|
|
137
|
-
if (!isEdge(cast))
|
|
136
|
+
const cast = castResultShape(getKernel().interpolatePoints(points, options));
|
|
137
|
+
if (!isEdge(cast)) {
|
|
138
|
+
disposeResultShape(cast);
|
|
139
|
+
return err(typeCastError("INTERPOLATE_NOT_EDGE", "Interpolation did not produce an edge"));
|
|
140
|
+
}
|
|
138
141
|
return ok(cast);
|
|
139
142
|
} catch (e) {
|
|
140
143
|
return err(typeCastError("INTERPOLATE_FAILED", `Interpolation failed: ${e instanceof Error ? e.message : String(e)}`));
|
|
@@ -150,8 +153,11 @@ function interpolateCurve(points, options = {}) {
|
|
|
150
153
|
function approximateCurve(points, options = {}) {
|
|
151
154
|
if (points.length < 2) return err(typeCastError("APPROXIMATE_MIN_POINTS", "Approximation requires at least 2 points"));
|
|
152
155
|
try {
|
|
153
|
-
const cast =
|
|
154
|
-
if (!isEdge(cast))
|
|
156
|
+
const cast = castResultShape(getKernel().approximatePoints(points, options));
|
|
157
|
+
if (!isEdge(cast)) {
|
|
158
|
+
disposeResultShape(cast);
|
|
159
|
+
return err(typeCastError("APPROXIMATE_NOT_EDGE", "Approximation did not produce an edge"));
|
|
160
|
+
}
|
|
155
161
|
return ok(cast);
|
|
156
162
|
} catch (e) {
|
|
157
163
|
return err(typeCastError("APPROXIMATE_FAILED", `Approximation failed: ${e instanceof Error ? e.message : String(e)}`));
|
|
@@ -166,14 +172,14 @@ function approximateCurve(points, options = {}) {
|
|
|
166
172
|
* @returns Ok with the offset wire, or Err if the operation fails.
|
|
167
173
|
*/
|
|
168
174
|
function offsetWire2D(wire, offset, kind = "arc") {
|
|
169
|
-
const wrapped =
|
|
175
|
+
const wrapped = castResultShape(getKernel().offsetWire2D(wire.wrapped, offset, {
|
|
170
176
|
arc: "arc",
|
|
171
177
|
intersection: "intersection",
|
|
172
178
|
tangent: "tangent",
|
|
173
179
|
chamfer: "intersection"
|
|
174
180
|
}[kind]));
|
|
175
181
|
if (!isWire(wrapped)) {
|
|
176
|
-
wrapped
|
|
182
|
+
disposeResultShape(wrapped);
|
|
177
183
|
return err(typeCastError("OFFSET_NOT_WIRE", "Offset did not produce a Wire"));
|
|
178
184
|
}
|
|
179
185
|
return ok(wrapped);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BbUKvpaO.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
@@ -121,7 +121,7 @@ function getOrientation(shape) {
|
|
|
121
121
|
}
|
|
122
122
|
/** Flip the orientation of an edge or wire. Returns a new shape with the same dimension. */
|
|
123
123
|
function flipOrientation(shape) {
|
|
124
|
-
return require_shapeTypes.
|
|
124
|
+
return require_shapeTypes.castResultShape(require_shapeTypes.getKernel().reverseShape(shape.wrapped));
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Interpolate a smooth BSpline curve that passes exactly through the given points.
|
|
@@ -133,8 +133,11 @@ function flipOrientation(shape) {
|
|
|
133
133
|
function interpolateCurve(points, options = {}) {
|
|
134
134
|
if (points.length < 2) return require_errors.err(require_errors.typeCastError("INTERPOLATE_MIN_POINTS", "Interpolation requires at least 2 points"));
|
|
135
135
|
try {
|
|
136
|
-
const cast = require_shapeTypes.
|
|
137
|
-
if (!require_shapeTypes.isEdge(cast))
|
|
136
|
+
const cast = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().interpolatePoints(points, options));
|
|
137
|
+
if (!require_shapeTypes.isEdge(cast)) {
|
|
138
|
+
require_shapeTypes.disposeResultShape(cast);
|
|
139
|
+
return require_errors.err(require_errors.typeCastError("INTERPOLATE_NOT_EDGE", "Interpolation did not produce an edge"));
|
|
140
|
+
}
|
|
138
141
|
return require_errors.ok(cast);
|
|
139
142
|
} catch (e) {
|
|
140
143
|
return require_errors.err(require_errors.typeCastError("INTERPOLATE_FAILED", `Interpolation failed: ${e instanceof Error ? e.message : String(e)}`));
|
|
@@ -150,8 +153,11 @@ function interpolateCurve(points, options = {}) {
|
|
|
150
153
|
function approximateCurve(points, options = {}) {
|
|
151
154
|
if (points.length < 2) return require_errors.err(require_errors.typeCastError("APPROXIMATE_MIN_POINTS", "Approximation requires at least 2 points"));
|
|
152
155
|
try {
|
|
153
|
-
const cast = require_shapeTypes.
|
|
154
|
-
if (!require_shapeTypes.isEdge(cast))
|
|
156
|
+
const cast = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().approximatePoints(points, options));
|
|
157
|
+
if (!require_shapeTypes.isEdge(cast)) {
|
|
158
|
+
require_shapeTypes.disposeResultShape(cast);
|
|
159
|
+
return require_errors.err(require_errors.typeCastError("APPROXIMATE_NOT_EDGE", "Approximation did not produce an edge"));
|
|
160
|
+
}
|
|
155
161
|
return require_errors.ok(cast);
|
|
156
162
|
} catch (e) {
|
|
157
163
|
return require_errors.err(require_errors.typeCastError("APPROXIMATE_FAILED", `Approximation failed: ${e instanceof Error ? e.message : String(e)}`));
|
|
@@ -166,14 +172,14 @@ function approximateCurve(points, options = {}) {
|
|
|
166
172
|
* @returns Ok with the offset wire, or Err if the operation fails.
|
|
167
173
|
*/
|
|
168
174
|
function offsetWire2D(wire, offset, kind = "arc") {
|
|
169
|
-
const wrapped = require_shapeTypes.
|
|
175
|
+
const wrapped = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().offsetWire2D(wire.wrapped, offset, {
|
|
170
176
|
arc: "arc",
|
|
171
177
|
intersection: "intersection",
|
|
172
178
|
tangent: "tangent",
|
|
173
179
|
chamfer: "intersection"
|
|
174
180
|
}[kind]));
|
|
175
181
|
if (!require_shapeTypes.isWire(wrapped)) {
|
|
176
|
-
|
|
182
|
+
require_shapeTypes.disposeResultShape(wrapped);
|
|
177
183
|
return require_errors.err(require_errors.typeCastError("OFFSET_NOT_WIRE", "Offset did not produce a Wire"));
|
|
178
184
|
}
|
|
179
185
|
return require_errors.ok(wrapped);
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as _usingCtx, H as DisposalScope, d as createWire, o as createEdge, s as createFace, tt as getKernel } from "./shapeTypes-Osdj5kMc.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-DzOSCj5J.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-yqC4gDSc.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-Ca020OZW.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-CMUEd1bK.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-x4mNzlv3.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-DcWisIKC.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-BelsntLG.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-BC2eaeW9.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-nGqoIZh4.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-BKwbX7PZ.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-DmLhH9Pr.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.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-DdfGcHik.cjs");
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-BbUKvpaO.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-Cf2j9Zt0.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-mARULpM7.cjs");
|
|
11
|
+
const require_curveFns = require("./curveFns-D7d2foN-.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-DDfVCOVg.cjs");
|
|
14
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CcZ_89uU.cjs");
|
|
15
|
+
const require_helpers = require("./helpers-CEi8kRzi.cjs");
|
|
16
|
+
const require_blueprint = require("./blueprint-CsxL1j9L.cjs");
|
|
17
|
+
const require_cornerFinder = require("./cornerFinder-C6IpCea0.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-BLigmyIR.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-C3Xf7-I7.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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BbUKvpaO.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cf2j9Zt0.cjs");
|
|
4
4
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as castShape, tt as getKernel } from "./shapeTypes-Osdj5kMc.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-DzOSCj5J.js";
|
|
4
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BbUKvpaO.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cf2j9Zt0.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-mARULpM7.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-DxbbLpGg.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_solidBuilders = require("./solidBuilders-BASH2bih.cjs");
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -146,10 +146,14 @@ function chamferDistAngle(shape, edges, distance, angleDeg) {
|
|
|
146
146
|
}));
|
|
147
147
|
}
|
|
148
148
|
const downcastResult = require_faceFns.downcast(raw);
|
|
149
|
-
if (require_errors.isErr(downcastResult))
|
|
150
|
-
|
|
149
|
+
if (require_errors.isErr(downcastResult)) {
|
|
150
|
+
require_shapeTypes.getKernel().dispose(raw);
|
|
151
|
+
return downcastResult;
|
|
152
|
+
}
|
|
153
|
+
const wrapped = require_shapeTypes.castResultShape(downcastResult.value);
|
|
154
|
+
require_shapeTypes.disposeDowncastSource(raw, wrapped);
|
|
151
155
|
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
152
|
-
|
|
156
|
+
require_shapeTypes.disposeResultShape(wrapped);
|
|
153
157
|
return require_errors.err(require_errors.typeCastError("CHAMFER_ANGLE_NOT_3D", "chamferDistAngle did not produce a 3D shape"));
|
|
154
158
|
}
|
|
155
159
|
return require_errors.ok(wrapped);
|
|
@@ -339,19 +343,9 @@ function validateNotNull$1(shape, label) {
|
|
|
339
343
|
function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
340
344
|
const wrapped = require_shapeTypes.castShape(shape);
|
|
341
345
|
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
"COMPSOLID",
|
|
346
|
-
"SOLID",
|
|
347
|
-
"SHELL",
|
|
348
|
-
"FACE",
|
|
349
|
-
"WIRE",
|
|
350
|
-
"EDGE",
|
|
351
|
-
"VERTEX",
|
|
352
|
-
"SHAPE"
|
|
353
|
-
][shapeType] ?? `UNKNOWN(${shapeType})`;
|
|
354
|
-
wrapped[Symbol.dispose]();
|
|
346
|
+
const typeName = require_shapeTypes.getShapeKind(wrapped).toUpperCase();
|
|
347
|
+
require_shapeTypes.disposeDowncastSource(shape, wrapped);
|
|
348
|
+
require_shapeTypes.disposeResultShape(wrapped);
|
|
355
349
|
return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
356
350
|
}
|
|
357
351
|
require_shapeTypes.disposeDowncastSource(shape, wrapped);
|
|
@@ -471,7 +465,10 @@ function filletWithEvolution(shape, edges, radius) {
|
|
|
471
465
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
472
466
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().filletWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
473
467
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
474
|
-
if (!require_shapeTypes.isShape3D(cast))
|
|
468
|
+
if (!require_shapeTypes.isShape3D(cast)) {
|
|
469
|
+
require_shapeTypes.disposeResultShape(cast);
|
|
470
|
+
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
471
|
+
}
|
|
475
472
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
476
473
|
return require_errors.ok({
|
|
477
474
|
shape: cast,
|
|
@@ -515,7 +512,10 @@ function chamferWithEvolution(shape, edges, distance) {
|
|
|
515
512
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
516
513
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().chamferWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelDistance, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
517
514
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
518
|
-
if (!require_shapeTypes.isShape3D(cast))
|
|
515
|
+
if (!require_shapeTypes.isShape3D(cast)) {
|
|
516
|
+
require_shapeTypes.disposeResultShape(cast);
|
|
517
|
+
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
|
|
518
|
+
}
|
|
519
519
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
520
520
|
return require_errors.ok({
|
|
521
521
|
shape: cast,
|
|
@@ -547,7 +547,10 @@ function shellWithEvolution(shape, faces, thickness, tolerance = .001) {
|
|
|
547
547
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
548
548
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, require_constants.HASH_CODE_MAX, tolerance);
|
|
549
549
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
550
|
-
if (!require_shapeTypes.isShape3D(cast))
|
|
550
|
+
if (!require_shapeTypes.isShape3D(cast)) {
|
|
551
|
+
require_shapeTypes.disposeResultShape(cast);
|
|
552
|
+
return require_errors.err(require_errors.kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
553
|
+
}
|
|
551
554
|
require_shapeFns.propagateAllMetadata(evolution, [shape], cast);
|
|
552
555
|
return require_errors.ok({
|
|
553
556
|
shape: cast,
|
|
@@ -579,8 +582,11 @@ function shellWithEvolution(shape, faces, thickness, tolerance = .001) {
|
|
|
579
582
|
*/
|
|
580
583
|
function positionOnCurve(shape, spine, param) {
|
|
581
584
|
try {
|
|
582
|
-
const wrapped = require_shapeTypes.
|
|
583
|
-
if (!require_shapeTypes.isShape3D(wrapped))
|
|
585
|
+
const wrapped = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().positionOnCurve(shape.wrapped, spine.wrapped, param));
|
|
586
|
+
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
587
|
+
require_shapeTypes.disposeResultShape(wrapped);
|
|
588
|
+
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.POSITION_ON_CURVE_FAILED, "positionOnCurve did not produce a 3D shape"));
|
|
589
|
+
}
|
|
584
590
|
return require_errors.ok(wrapped);
|
|
585
591
|
} catch (e) {
|
|
586
592
|
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.POSITION_ON_CURVE_FAILED, `Failed to position shape on curve at param ${param}`, e));
|
|
@@ -640,7 +646,10 @@ function resolveEdgeCallback(selectedEdges, callbackFn) {
|
|
|
640
646
|
*/
|
|
641
647
|
function finalizeShape3D(evolution, resultShape, inputs, not3dCode, not3dMessage) {
|
|
642
648
|
const cast = require_shapeTypes.castResultShape(resultShape);
|
|
643
|
-
if (!require_shapeTypes.isShape3D(cast))
|
|
649
|
+
if (!require_shapeTypes.isShape3D(cast)) {
|
|
650
|
+
require_shapeTypes.disposeResultShape(cast);
|
|
651
|
+
return require_errors.err(require_errors.kernelError(not3dCode, not3dMessage));
|
|
652
|
+
}
|
|
644
653
|
require_shapeFns.propagateAllMetadata(evolution, inputs, cast);
|
|
645
654
|
return require_errors.ok(cast);
|
|
646
655
|
}
|
|
@@ -925,11 +934,11 @@ function variableFillet(shape, edge, radii) {
|
|
|
925
934
|
});
|
|
926
935
|
const wrapped = require_shapeTypes.castResultShape(kernel.filletVariable(shape.wrapped, spec));
|
|
927
936
|
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
928
|
-
|
|
937
|
+
require_shapeTypes.disposeResultShape(wrapped);
|
|
929
938
|
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.VARIABLE_FILLET_FAILED, "Variable-radius fillet did not produce a 3D shape"));
|
|
930
939
|
}
|
|
931
940
|
if (!require_shapeTypes.isSolid(wrapped)) {
|
|
932
|
-
|
|
941
|
+
require_shapeTypes.disposeResultShape(wrapped);
|
|
933
942
|
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.VARIABLE_FILLET_FAILED, "Variable-radius fillet did not produce a solid"));
|
|
934
943
|
}
|
|
935
944
|
return require_errors.ok(wrapped);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as isWire, I as getShapeKind, _ as isFace, f as disposeDowncastSource, n as castShape, p as disposeResultShape, t as castResultShape, tt as getKernel, x as isSolid, y as isShape3D } from "./shapeTypes-Osdj5kMc.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-DzOSCj5J.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-yqC4gDSc.js";
|
|
6
|
+
import { _ as collectInputFaceHashes, y as propagateAllMetadata } from "./shapeFns-DjiKoRrd.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-B8hK3cdi.js";
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -146,10 +146,14 @@ function chamferDistAngle(shape, edges, distance, angleDeg) {
|
|
|
146
146
|
}));
|
|
147
147
|
}
|
|
148
148
|
const downcastResult = downcast(raw);
|
|
149
|
-
if (isErr(downcastResult))
|
|
150
|
-
|
|
149
|
+
if (isErr(downcastResult)) {
|
|
150
|
+
getKernel().dispose(raw);
|
|
151
|
+
return downcastResult;
|
|
152
|
+
}
|
|
153
|
+
const wrapped = castResultShape(downcastResult.value);
|
|
154
|
+
disposeDowncastSource(raw, wrapped);
|
|
151
155
|
if (!isShape3D(wrapped)) {
|
|
152
|
-
wrapped
|
|
156
|
+
disposeResultShape(wrapped);
|
|
153
157
|
return err(typeCastError("CHAMFER_ANGLE_NOT_3D", "chamferDistAngle did not produce a 3D shape"));
|
|
154
158
|
}
|
|
155
159
|
return ok(wrapped);
|
|
@@ -339,19 +343,9 @@ function validateNotNull$1(shape, label) {
|
|
|
339
343
|
function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
340
344
|
const wrapped = castShape(shape);
|
|
341
345
|
if (!isShape3D(wrapped)) {
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
"COMPSOLID",
|
|
346
|
-
"SOLID",
|
|
347
|
-
"SHELL",
|
|
348
|
-
"FACE",
|
|
349
|
-
"WIRE",
|
|
350
|
-
"EDGE",
|
|
351
|
-
"VERTEX",
|
|
352
|
-
"SHAPE"
|
|
353
|
-
][shapeType] ?? `UNKNOWN(${shapeType})`;
|
|
354
|
-
wrapped[Symbol.dispose]();
|
|
346
|
+
const typeName = getShapeKind(wrapped).toUpperCase();
|
|
347
|
+
disposeDowncastSource(shape, wrapped);
|
|
348
|
+
disposeResultShape(wrapped);
|
|
355
349
|
return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
356
350
|
}
|
|
357
351
|
disposeDowncastSource(shape, wrapped);
|
|
@@ -471,7 +465,10 @@ function filletWithEvolution(shape, edges, radius) {
|
|
|
471
465
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
472
466
|
const { shape: resultShape, evolution } = getKernel().filletWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelRadius, inputFaceHashes, HASH_CODE_MAX);
|
|
473
467
|
const cast = castResultShape(resultShape);
|
|
474
|
-
if (!isShape3D(cast))
|
|
468
|
+
if (!isShape3D(cast)) {
|
|
469
|
+
disposeResultShape(cast);
|
|
470
|
+
return err(kernelError(BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
|
|
471
|
+
}
|
|
475
472
|
propagateAllMetadata(evolution, [shape], cast);
|
|
476
473
|
return ok({
|
|
477
474
|
shape: cast,
|
|
@@ -515,7 +512,10 @@ function chamferWithEvolution(shape, edges, distance) {
|
|
|
515
512
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
516
513
|
const { shape: resultShape, evolution } = getKernel().chamferWithHistory(shape.wrapped, filteredEdges.map((e) => e.wrapped), kernelDistance, inputFaceHashes, HASH_CODE_MAX);
|
|
517
514
|
const cast = castResultShape(resultShape);
|
|
518
|
-
if (!isShape3D(cast))
|
|
515
|
+
if (!isShape3D(cast)) {
|
|
516
|
+
disposeResultShape(cast);
|
|
517
|
+
return err(kernelError(BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
|
|
518
|
+
}
|
|
519
519
|
propagateAllMetadata(evolution, [shape], cast);
|
|
520
520
|
return ok({
|
|
521
521
|
shape: cast,
|
|
@@ -547,7 +547,10 @@ function shellWithEvolution(shape, faces, thickness, tolerance = .001) {
|
|
|
547
547
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
548
548
|
const { shape: resultShape, evolution } = getKernel().shellWithHistory(shape.wrapped, faces.map((f) => f.wrapped), thickness, inputFaceHashes, HASH_CODE_MAX, tolerance);
|
|
549
549
|
const cast = castResultShape(resultShape);
|
|
550
|
-
if (!isShape3D(cast))
|
|
550
|
+
if (!isShape3D(cast)) {
|
|
551
|
+
disposeResultShape(cast);
|
|
552
|
+
return err(kernelError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
|
|
553
|
+
}
|
|
551
554
|
propagateAllMetadata(evolution, [shape], cast);
|
|
552
555
|
return ok({
|
|
553
556
|
shape: cast,
|
|
@@ -579,8 +582,11 @@ function shellWithEvolution(shape, faces, thickness, tolerance = .001) {
|
|
|
579
582
|
*/
|
|
580
583
|
function positionOnCurve(shape, spine, param) {
|
|
581
584
|
try {
|
|
582
|
-
const wrapped =
|
|
583
|
-
if (!isShape3D(wrapped))
|
|
585
|
+
const wrapped = castResultShape(getKernel().positionOnCurve(shape.wrapped, spine.wrapped, param));
|
|
586
|
+
if (!isShape3D(wrapped)) {
|
|
587
|
+
disposeResultShape(wrapped);
|
|
588
|
+
return err(kernelError(BrepErrorCode.POSITION_ON_CURVE_FAILED, "positionOnCurve did not produce a 3D shape"));
|
|
589
|
+
}
|
|
584
590
|
return ok(wrapped);
|
|
585
591
|
} catch (e) {
|
|
586
592
|
return err(kernelError(BrepErrorCode.POSITION_ON_CURVE_FAILED, `Failed to position shape on curve at param ${param}`, e));
|
|
@@ -640,7 +646,10 @@ function resolveEdgeCallback(selectedEdges, callbackFn) {
|
|
|
640
646
|
*/
|
|
641
647
|
function finalizeShape3D(evolution, resultShape, inputs, not3dCode, not3dMessage) {
|
|
642
648
|
const cast = castResultShape(resultShape);
|
|
643
|
-
if (!isShape3D(cast))
|
|
649
|
+
if (!isShape3D(cast)) {
|
|
650
|
+
disposeResultShape(cast);
|
|
651
|
+
return err(kernelError(not3dCode, not3dMessage));
|
|
652
|
+
}
|
|
644
653
|
propagateAllMetadata(evolution, inputs, cast);
|
|
645
654
|
return ok(cast);
|
|
646
655
|
}
|
|
@@ -925,11 +934,11 @@ function variableFillet(shape, edge, radii) {
|
|
|
925
934
|
});
|
|
926
935
|
const wrapped = castResultShape(kernel.filletVariable(shape.wrapped, spec));
|
|
927
936
|
if (!isShape3D(wrapped)) {
|
|
928
|
-
wrapped
|
|
937
|
+
disposeResultShape(wrapped);
|
|
929
938
|
return err(kernelError(BrepErrorCode.VARIABLE_FILLET_FAILED, "Variable-radius fillet did not produce a 3D shape"));
|
|
930
939
|
}
|
|
931
940
|
if (!isSolid(wrapped)) {
|
|
932
|
-
wrapped
|
|
941
|
+
disposeResultShape(wrapped);
|
|
933
942
|
return err(kernelError(BrepErrorCode.VARIABLE_FILLET_FAILED, "Variable-radius fillet did not produce a solid"));
|
|
934
943
|
}
|
|
935
944
|
return ok(wrapped);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BbUKvpaO.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cf2j9Zt0.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-mARULpM7.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-DxbbLpGg.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-D7d2foN-.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-BD9_NT7u.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,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as isFace, tt as getKernel } from "./shapeTypes-Osdj5kMc.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-DzOSCj5J.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-yqC4gDSc.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-DjiKoRrd.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-Ca020OZW.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-CLWtxkh6.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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as castShape, tt as getKernel } from "./shapeTypes-Osdj5kMc.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-BelsntLG.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) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BbUKvpaO.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-CsxL1j9L.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) {
|
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-Cim4Y6vz.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-DUniB9wl.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-Cd2zde-k.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-B8II-pj-.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|