brepjs 20.12.7 → 20.12.9
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-hMihivxC.js → adjacencyFns-1Cmjb2ot.js} +3 -3
- package/dist/{adjacencyFns-mMmTBUBY.cjs → adjacencyFns-CfhGIMeR.cjs} +3 -3
- package/dist/{blueprint-BS50D3J_.js → blueprint-BVcuEefs.js} +5 -5
- package/dist/{blueprint-17RUHsoP.cjs → blueprint-DbJVzU9F.cjs} +5 -5
- package/dist/{blueprintFns-Dw5_4_Bk.cjs → blueprintFns-DePTHG1I.cjs} +2 -2
- package/dist/{blueprintFns-zy5lo2IF.js → blueprintFns-mD4pDyFP.js} +2 -2
- package/dist/{blueprintSketcher-BG--DxWB.cjs → blueprintSketcher-B5CFmhjg.cjs} +3 -3
- package/dist/{blueprintSketcher-C1WCI6E0.js → blueprintSketcher-BrGmq-65.js} +3 -3
- package/dist/{boolean2D-CsdyfjFE.js → boolean2D-BrHrY60M.js} +4 -4
- package/dist/{boolean2D-7SQ3B0pC.cjs → boolean2D-CFKg1FJ_.cjs} +4 -4
- package/dist/{solidBuilders-DdG4NPHM.cjs → booleanFns-C640CeaY.cjs} +11 -217
- package/dist/{solidBuilders-Bmr59cGp.js → booleanFns-CKDyqKz0.js} +10 -156
- package/dist/brepjs.cjs +325 -168
- package/dist/brepjs.js +282 -125
- package/dist/{cameraFns-BVWyAscu.js → cameraFns-DIbua1lC.js} +3 -3
- package/dist/{cameraFns-BAtzhCYM.cjs → cameraFns-hXUKJkLg.cjs} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-Dv_2rmaY.js → cornerFinder-BYDkloVc.js} +1 -1
- package/dist/{cornerFinder-e4Wc7_yp.cjs → cornerFinder-ByBGU0r7.cjs} +1 -1
- package/dist/{curveFns-BAM7QHrP.cjs → curveFns-Cqgtmhr0.cjs} +1 -1
- package/dist/{curveFns-CEI-rouh.js → curveFns-DphpaoQ4.js} +1 -1
- package/dist/{drawFns-Cl1i8B_B.js → drawFns-Ch3ah8K9.js} +12 -12
- package/dist/{drawFns-d-RvC6u6.cjs → drawFns-GwVZX47o.cjs} +12 -12
- package/dist/{faceFns-C-2ttg8X.cjs → faceFns-BDqVGEoB.cjs} +2 -2
- package/dist/{faceFns-Q87HCJrp.js → faceFns-D4cDeMRf.js} +2 -2
- package/dist/{healingFns-Cm4NkKD8.js → healingFns--vBKh5pa.js} +5 -5
- package/dist/{healingFns-DZkO5okn.cjs → healingFns-Fu7Xl8fu.cjs} +29 -29
- package/dist/{helpers-DpGcM2qZ.js → helpers-CroIo2SI.js} +6 -6
- package/dist/{helpers-BdGGaLhF.cjs → helpers-Wnq-YPWv.cjs} +6 -6
- package/dist/{importFns-Bp-p0jiP.js → importFns-D5Bt_44J.js} +314 -15
- package/dist/{importFns-DLiP26NW.cjs → importFns-tHr15Lhm.cjs} +319 -14
- package/dist/io/igesSupport.d.ts +6 -0
- package/dist/io/importFns.d.ts +15 -5
- package/dist/io/ioUtils.d.ts +15 -3
- package/dist/io/meshNesting.d.ts +11 -0
- package/dist/io/threemfImportFns.d.ts +6 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/evolutionOps.d.ts +4 -3
- package/dist/kernel/occtWasm/helpers.d.ts +14 -3
- package/dist/kernel/occtWasm/ioOps.d.ts +13 -13
- package/dist/kernel/occtWasm/modifierOps.d.ts +5 -3
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +37 -2
- package/dist/{loftFns-DQ7Z29n3.js → loftFns-Bh_RuF7a.js} +1 -1
- package/dist/{loftFns-DGV1z2NJ.cjs → loftFns-T0GxcPlB.cjs} +1 -1
- package/dist/{measureFns-BrdCH4cH.js → measureFns-C3TZ5Fj9.js} +3 -3
- package/dist/{measureFns-BdSjw5fr.cjs → measureFns-DGm6ndQY.cjs} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-BeubBqEI.cjs → meshFns-DDgZ3vpr.cjs} +25 -5
- package/dist/{meshFns-UE8tByyw.js → meshFns-Go1XSyUh.js} +20 -6
- package/dist/{occtWasmAdapter-D3qerQTq.cjs → occtWasmAdapter-CZPZnpCe.cjs} +297 -85
- package/dist/{occtWasmAdapter-DA7oMgcQ.js → occtWasmAdapter-EM3EhKwk.js} +297 -85
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-3-gs-FUX.js → primitiveFns-CeRc4Sls.js} +5 -4
- package/dist/{primitiveFns-CLGVLwG8.cjs → primitiveFns-Dg_XWYtp.cjs} +19 -18
- package/dist/{principalBoxFns-CiXzjOkr.cjs → principalBoxFns-B5zdek3y.cjs} +3 -3
- package/dist/{principalBoxFns-RMZItjfR.js → principalBoxFns-BuK-ueAB.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-DNX0bCrP.cjs → refResolveFns-CFwsYCKA.cjs} +6 -6
- package/dist/{refResolveFns-kJg2iCad.js → refResolveFns-WRcvVhV-.js} +6 -6
- package/dist/{shapeFns-CZ6VF1yd.js → shapeFns-CYjU8PsF.js} +2 -2
- package/dist/{shapeFns-SgIrOjN4.cjs → shapeFns-DuxfaqTw.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-MUEH4XuH.cjs → shapeTypes--7XBFlOD.cjs} +1 -1
- package/dist/{shapeTypes-BNGu103j.js → shapeTypes-DvzbSivn.js} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{originTrackingFns-c2qgRZ_9.js → solidBuilders-BqSVC4cB.js} +150 -3
- package/dist/{originTrackingFns-rEKOAP65.cjs → solidBuilders-D0bIZX9K.cjs} +209 -2
- package/dist/{surfaceBuilders-DI376ai0.js → surfaceBuilders--HOoTQad.js} +3 -3
- package/dist/{surfaceBuilders-DOmDVuMs.cjs → surfaceBuilders-CPQHyL_5.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-B7Vhr0xu.cjs → textBlueprints-B4HzJzZM.cjs} +9 -8
- package/dist/{textBlueprints-CE0oxB43.js → textBlueprints-plsbHqiI.js} +8 -7
- package/dist/{textMetrics-C6_kSht6.cjs → textMetrics-CBwUIDI7.cjs} +1 -1
- package/dist/{textMetrics-_VGqdewQ.js → textMetrics-IIS6DUTr.js} +1 -1
- package/dist/{threadFns-CHdY-4Cz.js → threadFns-CmZFykpi.js} +7 -7
- package/dist/{threadFns-1H60LrFX.cjs → threadFns-e8_26ZYw.cjs} +9 -9
- package/dist/topology/meshFns.d.ts +3 -0
- package/dist/topology.cjs +11 -11
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-CltEv7Pi.js → topologyQueryFns-BUzMuIs5.js} +1 -1
- package/dist/{topologyQueryFns-C_fXO6xL.cjs → topologyQueryFns-NszVx8a0.cjs} +1 -1
- package/dist/{validityTypes-GanLrmvY.js → validityTypes-CdY06B8c.js} +1 -1
- package/dist/{validityTypes-CGX2ES81.cjs → validityTypes-Ds4zNICF.cjs} +1 -1
- package/package.json +2 -2
|
@@ -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-CZPZnpCe.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
@@ -214,7 +214,7 @@ export declare class OcctWasmAdapter implements KernelAdapter {
|
|
|
214
214
|
shellWithHistory(shape: KernelShape, faces: KernelShape[], thickness: number, inputFaceHashes: number[], hashUpperBound: number, tolerance?: number): OperationResult;
|
|
215
215
|
thickenWithHistory(shape: KernelShape, thickness: number, inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
216
216
|
offsetWithHistory(shape: KernelShape, distance: number, inputFaceHashes: number[], hashUpperBound: number, tolerance?: number): OperationResult;
|
|
217
|
-
draftWithHistory(shape: KernelShape, faces: KernelShape[], pullDirection: [number, number, number],
|
|
217
|
+
draftWithHistory(shape: KernelShape, faces: KernelShape[], pullDirection: [number, number, number], neutralPlane: [number, number, number], angleDeg: number | ((face: KernelShape) => number), inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
218
218
|
applyComposedTransformWithHistory(shape: KernelShape, transformHandle: KernelType, inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
219
219
|
mesh(shape: KernelShape, options: MeshOptions): KernelMeshResult;
|
|
220
220
|
meshEdges(shape: KernelShape, tolerance: number, angularTolerance: number): KernelEdgeMeshResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as OcctWasmAdapter } from "../../occtWasmAdapter-
|
|
1
|
+
export { t as OcctWasmAdapter } from "../../occtWasmAdapter-EM3EhKwk.js";
|
|
@@ -144,9 +144,29 @@ export interface OcctKernelWasm {
|
|
|
144
144
|
fillet(solidId: number, edgeIds: EmVectorUint32, radius: number): number;
|
|
145
145
|
chamfer(solidId: number, edgeIds: EmVectorUint32, distance: number): number;
|
|
146
146
|
chamferDistAngle(solidId: number, edgeIds: EmVectorUint32, distance: number, angleDeg: number): number;
|
|
147
|
+
/**
|
|
148
|
+
* occt-wasm >= 5.9.0: one radius pair per edge, constant where start equals
|
|
149
|
+
* end, else a linear taper from the edge's first vertex to its last.
|
|
150
|
+
*/
|
|
151
|
+
filletRadii?(solidId: number, edgeIds: EmVectorUint32, startRadii: EmVectorDouble, endRadii: EmVectorDouble): number;
|
|
152
|
+
/**
|
|
153
|
+
* occt-wasm >= 5.9.0: one distance pair per edge, `distances1` set back on the
|
|
154
|
+
* reference face. `referenceFaceIds` is empty or one per edge; 0 (or empty)
|
|
155
|
+
* picks the edge's first adjacent face.
|
|
156
|
+
*/
|
|
157
|
+
chamferDistances?(solidId: number, edgeIds: EmVectorUint32, distances1: EmVectorDouble, distances2: EmVectorDouble, referenceFaceIds: EmVectorUint32): number;
|
|
158
|
+
/** occt-wasm >= 5.9.0: per-edge distance-angle chamfer; reference faces as in `chamferDistances`. */
|
|
159
|
+
chamferDistAngles?(solidId: number, edgeIds: EmVectorUint32, distances: EmVectorDouble, anglesDeg: EmVectorDouble, referenceFaceIds: EmVectorUint32): number;
|
|
147
160
|
shell(solidId: number, faceIds: EmVectorUint32, thickness: number, tolerance: number): number;
|
|
148
161
|
offset(solidId: number, distance: number, tolerance: number): number;
|
|
162
|
+
/** Drafts about the XY plane through the origin, whatever the caller's neutral plane. */
|
|
149
163
|
draft(shapeId: number, faceId: number, angleRad: number, dx: number, dy: number, dz: number): number;
|
|
164
|
+
/**
|
|
165
|
+
* occt-wasm >= 5.9.0: draft every face in one operation, face i by
|
|
166
|
+
* `anglesRad[i]`, pulling along (dx, dy, dz) about the plane through
|
|
167
|
+
* (px, py, pz) with normal (nx, ny, nz).
|
|
168
|
+
*/
|
|
169
|
+
draftFaces?(shapeId: number, faceIds: EmVectorUint32, anglesRad: EmVectorDouble, dx: number, dy: number, dz: number, px: number, py: number, pz: number, nx: number, ny: number, nz: number): number;
|
|
150
170
|
pipe(profileId: number, spineId: number): number;
|
|
151
171
|
simplePipe(profileId: number, spineId: number): number;
|
|
152
172
|
loft(wireIds: EmVectorUint32, isSolid: boolean, ruled: boolean): number;
|
|
@@ -228,9 +248,16 @@ export interface OcctKernelWasm {
|
|
|
228
248
|
meshShape(id: number, linearDeflection: number, angularDeflection: number): EmMeshData;
|
|
229
249
|
importStep(data: string): number;
|
|
230
250
|
exportStep(id: number): string;
|
|
251
|
+
/**
|
|
252
|
+
* occt-wasm >= 5.9.0: STEP with lengths written in `unit` (mm, cm, m, km,
|
|
253
|
+
* inch, ft, mi, mil, um, uin). Geometry is read as millimeters.
|
|
254
|
+
*/
|
|
255
|
+
exportStepWithUnit?(id: number, unit: string): string;
|
|
231
256
|
importStl(data: string): number;
|
|
232
|
-
|
|
233
|
-
|
|
257
|
+
/** Absent from published occt-wasm builds (no IGES translator), so callers feature-detect. */
|
|
258
|
+
importIges?(data: string): number;
|
|
259
|
+
/** Absent from published occt-wasm builds (no IGES translator), so callers feature-detect. */
|
|
260
|
+
exportIges?(id: number): string;
|
|
234
261
|
exportStl(id: number, linearDeflection: number, ascii: boolean): string;
|
|
235
262
|
toBREP(id: number): string;
|
|
236
263
|
fromBREP(data: string): number;
|
|
@@ -278,6 +305,8 @@ export interface OcctKernelWasm {
|
|
|
278
305
|
xcafSetName(docId: number, labelId: number, name: string): void;
|
|
279
306
|
xcafGetRootLabels(docId: number): EmVectorInt;
|
|
280
307
|
xcafExportSTEP(docId: number): string;
|
|
308
|
+
/** occt-wasm >= 5.9.0: units as in {@link exportStepWithUnit}. */
|
|
309
|
+
xcafExportSTEPWithUnit?(docId: number, unit: string): string;
|
|
281
310
|
bsplineSurface(flatPoints: EmVectorDouble, rows: number, cols: number): number;
|
|
282
311
|
makeFaceOnSurface(faceId: number, wireId: number): number;
|
|
283
312
|
makeNullShape(): number;
|
|
@@ -296,6 +325,12 @@ export interface OcctKernelWasm {
|
|
|
296
325
|
scaleWithHistory(id: number, cx: number, cy: number, cz: number, factor: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
297
326
|
intersectWithHistory(a: number, b: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
298
327
|
chamferWithHistory(solidId: number, edgeIds: EmVectorUint32, distance: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
328
|
+
/** occt-wasm >= 5.9.0: {@link filletRadii} with face evolution. */
|
|
329
|
+
filletRadiiWithHistory?(solidId: number, edgeIds: EmVectorUint32, startRadii: EmVectorDouble, endRadii: EmVectorDouble, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
330
|
+
/** occt-wasm >= 5.9.0: {@link chamferDistances} with face evolution. */
|
|
331
|
+
chamferDistancesWithHistory?(solidId: number, edgeIds: EmVectorUint32, distances1: EmVectorDouble, distances2: EmVectorDouble, referenceFaceIds: EmVectorUint32, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
332
|
+
/** occt-wasm >= 5.9.0 (npm build): {@link draftFaces} with face evolution. */
|
|
333
|
+
draftFacesWithHistory?(shapeId: number, faceIds: EmVectorUint32, anglesRad: EmVectorDouble, dx: number, dy: number, dz: number, px: number, py: number, pz: number, nx: number, ny: number, nz: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
299
334
|
shellWithHistory(solidId: number, faceIds: EmVectorUint32, thickness: number, tolerance: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
300
335
|
offsetWithHistory(solidId: number, distance: number, tolerance: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
301
336
|
thickenWithHistory(shapeId: number, thickness: number, tolerance: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DvzbSivn.js";
|
|
2
2
|
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
4
4
|
import { c as vecLength, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DvzbSivn.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { E as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { E as kernelCallRaw } from "./topologyQueryFns-BUzMuIs5.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-D4cDeMRf.js";
|
|
5
5
|
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-NszVx8a0.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-BDqVGEoB.cjs");
|
|
5
5
|
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
3
|
-
const require_principalBoxFns = require("./principalBoxFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-DGm6ndQY.cjs");
|
|
3
|
+
const require_principalBoxFns = require("./principalBoxFns-B5zdek3y.cjs");
|
|
4
4
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
5
5
|
exports.measureArea = require_measureFns.measureArea;
|
|
6
6
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
2
|
-
import { t as principalBoundingBox } from "./principalBoxFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-C3TZ5Fj9.js";
|
|
2
|
+
import { t as principalBoundingBox } from "./principalBoxFns-BuK-ueAB.js";
|
|
3
3
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
|
|
2
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-CZPZnpCe.cjs");
|
|
2
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-NszVx8a0.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-D0bIZX9K.cjs");
|
|
5
6
|
// src/topology/meshCache.ts
|
|
6
7
|
/**
|
|
7
8
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -107,6 +108,16 @@ function createMeshCache() {
|
|
|
107
108
|
}
|
|
108
109
|
};
|
|
109
110
|
}
|
|
111
|
+
// src/io/igesSupport.ts
|
|
112
|
+
/**
|
|
113
|
+
* The capability error for an IGES call on a kernel built without an IGES
|
|
114
|
+
* translator (occt-wasm), or `null` when `cause` is any other failure.
|
|
115
|
+
*/
|
|
116
|
+
function igesUnsupportedError(operation, cause) {
|
|
117
|
+
if (!require_occtWasmAdapter.isUnsupportedKernelOperationError(cause)) return null;
|
|
118
|
+
const kernel = require_shapeTypes.getKernel().kernelId;
|
|
119
|
+
return require_errors.unsupportedError(require_errors.BrepErrorCode.UNSUPPORTED_CAPABILITY, `${operation}: the ${kernel} kernel has no IGES support`, cause, { kernel }, "Exchange the model as STEP (importSTEP / exportSTEP) instead");
|
|
120
|
+
}
|
|
110
121
|
// src/topology/meshFns.ts
|
|
111
122
|
/**
|
|
112
123
|
* Meshing and export functions — functional replacements for Shape mesh/export methods.
|
|
@@ -150,7 +161,7 @@ function mesh(shape, opts = {}) {
|
|
|
150
161
|
includeUVs,
|
|
151
162
|
...signal ? { signal } : {}
|
|
152
163
|
});
|
|
153
|
-
const origins =
|
|
164
|
+
const origins = require_solidBuilders.getFaceOrigins(shape);
|
|
154
165
|
const mesh = {
|
|
155
166
|
vertices: result.vertices,
|
|
156
167
|
normals: result.normals,
|
|
@@ -297,13 +308,16 @@ function exportSTL(shape, opts = {}) {
|
|
|
297
308
|
* Export a shape as an IGES file Blob.
|
|
298
309
|
*
|
|
299
310
|
* @returns Ok with a Blob (MIME type `application/iges`), or Err on failure.
|
|
311
|
+
*
|
|
312
|
+
* @remarks The default occt-wasm kernel is built without an IGES translator, so
|
|
313
|
+
* there this returns an `UNSUPPORTED_CAPABILITY` error; export STEP instead.
|
|
300
314
|
*/
|
|
301
315
|
function exportIGES(shape) {
|
|
302
316
|
try {
|
|
303
317
|
const igesString = require_shapeTypes.getKernel().exportIGES([shape.wrapped]);
|
|
304
318
|
return require_errors.ok(new Blob([igesString], { type: "application/iges" }));
|
|
305
319
|
} catch (e) {
|
|
306
|
-
return require_errors.err(require_errors.ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
320
|
+
return require_errors.err(igesUnsupportedError("exportIGES", e) ?? require_errors.ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
307
321
|
}
|
|
308
322
|
}
|
|
309
323
|
/**
|
|
@@ -472,6 +486,12 @@ Object.defineProperty(exports, "exportSTL", {
|
|
|
472
486
|
return exportSTL;
|
|
473
487
|
}
|
|
474
488
|
});
|
|
489
|
+
Object.defineProperty(exports, "igesUnsupportedError", {
|
|
490
|
+
enumerable: true,
|
|
491
|
+
get: function() {
|
|
492
|
+
return igesUnsupportedError;
|
|
493
|
+
}
|
|
494
|
+
});
|
|
475
495
|
Object.defineProperty(exports, "mesh", {
|
|
476
496
|
enumerable: true,
|
|
477
497
|
get: function() {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-DvzbSivn.js";
|
|
2
|
+
import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-EM3EhKwk.js";
|
|
3
|
+
import { E as ok, g as err, r as ioError, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
|
|
4
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-BUzMuIs5.js";
|
|
5
|
+
import { d as getFaceOrigins } from "./solidBuilders-BqSVC4cB.js";
|
|
5
6
|
// src/topology/meshCache.ts
|
|
6
7
|
/**
|
|
7
8
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -107,6 +108,16 @@ function createMeshCache() {
|
|
|
107
108
|
}
|
|
108
109
|
};
|
|
109
110
|
}
|
|
111
|
+
// src/io/igesSupport.ts
|
|
112
|
+
/**
|
|
113
|
+
* The capability error for an IGES call on a kernel built without an IGES
|
|
114
|
+
* translator (occt-wasm), or `null` when `cause` is any other failure.
|
|
115
|
+
*/
|
|
116
|
+
function igesUnsupportedError(operation, cause) {
|
|
117
|
+
if (!isUnsupportedKernelOperationError(cause)) return null;
|
|
118
|
+
const kernel = getKernel().kernelId;
|
|
119
|
+
return unsupportedError(BrepErrorCode.UNSUPPORTED_CAPABILITY, `${operation}: the ${kernel} kernel has no IGES support`, cause, { kernel }, "Exchange the model as STEP (importSTEP / exportSTEP) instead");
|
|
120
|
+
}
|
|
110
121
|
// src/topology/meshFns.ts
|
|
111
122
|
/**
|
|
112
123
|
* Meshing and export functions — functional replacements for Shape mesh/export methods.
|
|
@@ -297,13 +308,16 @@ function exportSTL(shape, opts = {}) {
|
|
|
297
308
|
* Export a shape as an IGES file Blob.
|
|
298
309
|
*
|
|
299
310
|
* @returns Ok with a Blob (MIME type `application/iges`), or Err on failure.
|
|
311
|
+
*
|
|
312
|
+
* @remarks The default occt-wasm kernel is built without an IGES translator, so
|
|
313
|
+
* there this returns an `UNSUPPORTED_CAPABILITY` error; export STEP instead.
|
|
300
314
|
*/
|
|
301
315
|
function exportIGES(shape) {
|
|
302
316
|
try {
|
|
303
317
|
const igesString = getKernel().exportIGES([shape.wrapped]);
|
|
304
318
|
return ok(new Blob([igesString], { type: "application/iges" }));
|
|
305
319
|
} catch (e) {
|
|
306
|
-
return err(ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
320
|
+
return err(igesUnsupportedError("exportIGES", e) ?? ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
307
321
|
}
|
|
308
322
|
}
|
|
309
323
|
/**
|
|
@@ -436,4 +450,4 @@ async function meshLODsProgressive(shape, options = {}) {
|
|
|
436
450
|
}
|
|
437
451
|
return results;
|
|
438
452
|
}
|
|
439
|
-
export { meshEdges as a, meshMultiLOD as c,
|
|
453
|
+
export { meshEdges as a, meshMultiLOD as c, buildMeshCacheKey as d, clearMeshCache as f, mesh as i, scaleDefaultTolerance as l, exportSTEP as n, meshLODs as o, createMeshCache as p, exportSTL as r, meshLODsProgressive as s, exportIGES as t, igesUnsupportedError as u };
|