brepjs 18.35.1 → 18.35.2
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/brepjs.cjs +1 -1
- package/dist/brepjs.js +1 -1
- package/dist/io.cjs +1 -1
- package/dist/io.js +1 -1
- package/dist/{meshFns-D66okPxP.cjs → meshFns-DM2mLIlu.cjs} +27 -1
- package/dist/{meshFns-Bbm7_5wS.js → meshFns-F9QLm-Bk.js} +28 -2
- package/dist/topology.cjs +1 -1
- package/dist/topology.js +1 -1
- package/package.json +1 -1
package/dist/brepjs.cjs
CHANGED
|
@@ -12,7 +12,7 @@ const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
|
12
12
|
const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
|
|
13
13
|
const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
|
|
14
14
|
const require_curveFns = require("./curveFns-p1YEnmZu.cjs");
|
|
15
|
-
const require_meshFns = require("./meshFns-
|
|
15
|
+
const require_meshFns = require("./meshFns-DM2mLIlu.cjs");
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
17
17
|
const require_surfaceBuilders = require("./surfaceBuilders-DsISMCwj.cjs");
|
|
18
18
|
const require_booleanFns = require("./booleanFns-D19tR8Gn.cjs");
|
package/dist/brepjs.js
CHANGED
|
@@ -10,7 +10,7 @@ import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s
|
|
|
10
10
|
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-eVWgSIzt.js";
|
|
11
11
|
import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-BbHQjI5-.js";
|
|
12
12
|
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-rUkX4tEm.js";
|
|
13
|
-
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-
|
|
13
|
+
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-F9QLm-Bk.js";
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
15
15
|
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-D4p1YPCz.js";
|
|
16
16
|
import { a as fuseAll, c as sectionToFace$1, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-nHsLqZ7Y.js";
|
package/dist/io.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_meshFns = require("./meshFns-
|
|
2
|
+
const require_meshFns = require("./meshFns-DM2mLIlu.cjs");
|
|
3
3
|
const require_importFns = require("./importFns-CJc5NYJp.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
1
|
+
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-F9QLm-Bk.js";
|
|
2
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-DuAmdf0Q.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -196,6 +196,32 @@ function exportError(e, fmt) {
|
|
|
196
196
|
return require_errors.ioError(`${fmt}_FILE_READ_ERROR`, `Failed to read exported ${fmt} file`, e);
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
+
* When a compound's bounds probe fails, localize the offending sub-solid(s) so the
|
|
200
|
+
* caller can heal or drop them. Returns a suffix for the error message; empty when
|
|
201
|
+
* the shape is a single solid or localization itself fails. Only reached on the
|
|
202
|
+
* error path, so the extra per-solid probes cost nothing in the happy case.
|
|
203
|
+
*/
|
|
204
|
+
function describeOffendingSolids(shape) {
|
|
205
|
+
let solids;
|
|
206
|
+
try {
|
|
207
|
+
solids = require_topologyQueryFns.getSolids(shape);
|
|
208
|
+
} catch {
|
|
209
|
+
return "";
|
|
210
|
+
}
|
|
211
|
+
if (solids.length <= 1) return "";
|
|
212
|
+
const bad = [];
|
|
213
|
+
solids.forEach((solid, i) => {
|
|
214
|
+
try {
|
|
215
|
+
require_topologyQueryFns.getBounds(solid);
|
|
216
|
+
} catch (e) {
|
|
217
|
+
if (e instanceof TypeError) throw e;
|
|
218
|
+
bad.push(i);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
if (bad.length === 0) return `; could not localize the offending sub-solid among ${solids.length} solids`;
|
|
222
|
+
return `; offending sub-solid${bad.length > 1 ? "s" : ""} (of ${solids.length}): index ${bad.join(", ")}`;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
199
225
|
* Probe a shape's bounding box before handing it to the STEP/STL writer.
|
|
200
226
|
*
|
|
201
227
|
* Some sub-shapes pass `isValid`/`validSolid` yet are degenerate enough that the
|
|
@@ -212,7 +238,7 @@ function probeSerializable(shape, fmt) {
|
|
|
212
238
|
return null;
|
|
213
239
|
} catch (e) {
|
|
214
240
|
if (e instanceof TypeError) throw e;
|
|
215
|
-
return require_errors.ioError(`${fmt}_EXPORT_UNSERIALIZABLE`, `${fmt} export aborted: the shape contains degenerate geometry the ${fmt} writer cannot serialize (bounding-box evaluation failed); export was skipped to avoid crashing the kernel`, e);
|
|
241
|
+
return require_errors.ioError(`${fmt}_EXPORT_UNSERIALIZABLE`, `${fmt} export aborted: the shape contains degenerate geometry the ${fmt} writer cannot serialize (bounding-box evaluation failed); export was skipped to avoid crashing the kernel${describeOffendingSolids(shape)}`, e);
|
|
216
242
|
}
|
|
217
243
|
}
|
|
218
244
|
function exportSTEP(shape) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Z as getKernel } from "./shapeTypes-C-MpR5-e.js";
|
|
2
2
|
import { A as ok, b as err, r as ioError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { n as getBounds } from "./topologyQueryFns-B81GSST_.js";
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-B81GSST_.js";
|
|
4
4
|
import { O as getFaceOrigins } from "./shapeFns-BbHQjI5-.js";
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
@@ -196,6 +196,32 @@ function exportError(e, fmt) {
|
|
|
196
196
|
return ioError(`${fmt}_FILE_READ_ERROR`, `Failed to read exported ${fmt} file`, e);
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
+
* When a compound's bounds probe fails, localize the offending sub-solid(s) so the
|
|
200
|
+
* caller can heal or drop them. Returns a suffix for the error message; empty when
|
|
201
|
+
* the shape is a single solid or localization itself fails. Only reached on the
|
|
202
|
+
* error path, so the extra per-solid probes cost nothing in the happy case.
|
|
203
|
+
*/
|
|
204
|
+
function describeOffendingSolids(shape) {
|
|
205
|
+
let solids;
|
|
206
|
+
try {
|
|
207
|
+
solids = getSolids(shape);
|
|
208
|
+
} catch {
|
|
209
|
+
return "";
|
|
210
|
+
}
|
|
211
|
+
if (solids.length <= 1) return "";
|
|
212
|
+
const bad = [];
|
|
213
|
+
solids.forEach((solid, i) => {
|
|
214
|
+
try {
|
|
215
|
+
getBounds(solid);
|
|
216
|
+
} catch (e) {
|
|
217
|
+
if (e instanceof TypeError) throw e;
|
|
218
|
+
bad.push(i);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
if (bad.length === 0) return `; could not localize the offending sub-solid among ${solids.length} solids`;
|
|
222
|
+
return `; offending sub-solid${bad.length > 1 ? "s" : ""} (of ${solids.length}): index ${bad.join(", ")}`;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
199
225
|
* Probe a shape's bounding box before handing it to the STEP/STL writer.
|
|
200
226
|
*
|
|
201
227
|
* Some sub-shapes pass `isValid`/`validSolid` yet are degenerate enough that the
|
|
@@ -212,7 +238,7 @@ function probeSerializable(shape, fmt) {
|
|
|
212
238
|
return null;
|
|
213
239
|
} catch (e) {
|
|
214
240
|
if (e instanceof TypeError) throw e;
|
|
215
|
-
return ioError(`${fmt}_EXPORT_UNSERIALIZABLE`, `${fmt} export aborted: the shape contains degenerate geometry the ${fmt} writer cannot serialize (bounding-box evaluation failed); export was skipped to avoid crashing the kernel`, e);
|
|
241
|
+
return ioError(`${fmt}_EXPORT_UNSERIALIZABLE`, `${fmt} export aborted: the shape contains degenerate geometry the ${fmt} writer cannot serialize (bounding-box evaluation failed); export was skipped to avoid crashing the kernel${describeOffendingSolids(shape)}`, e);
|
|
216
242
|
}
|
|
217
243
|
}
|
|
218
244
|
function exportSTEP(shape) {
|
package/dist/topology.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
|
3
3
|
const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
|
|
4
4
|
const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
|
|
5
5
|
const require_curveFns = require("./curveFns-p1YEnmZu.cjs");
|
|
6
|
-
const require_meshFns = require("./meshFns-
|
|
6
|
+
const require_meshFns = require("./meshFns-DM2mLIlu.cjs");
|
|
7
7
|
const require_booleanFns = require("./booleanFns-D19tR8Gn.cjs");
|
|
8
8
|
const require_primitiveFns = require("./primitiveFns-CXn9Jl4q.cjs");
|
|
9
9
|
exports.addHoles = require_primitiveFns.addHoles;
|
package/dist/topology.js
CHANGED
|
@@ -2,7 +2,7 @@ import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces,
|
|
|
2
2
|
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-eVWgSIzt.js";
|
|
3
3
|
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BbHQjI5-.js";
|
|
4
4
|
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-rUkX4tEm.js";
|
|
5
|
-
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-
|
|
5
|
+
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-F9QLm-Bk.js";
|
|
6
6
|
import { a as fuseAll, r as cutAll } from "./booleanFns-nHsLqZ7Y.js";
|
|
7
7
|
import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-vQh7Lz7B.js";
|
|
8
8
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|