brepjs 20.12.10 → 20.12.12
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-CxdCl5WP.cjs → adjacencyFns-DSGyqGyy.cjs} +3 -3
- package/dist/{adjacencyFns-D5HrKCrU.js → adjacencyFns-DfPO5LGP.js} +3 -3
- package/dist/{blueprint-BX9jLBWa.js → blueprint-BYXwa2cF.js} +5 -5
- package/dist/{blueprint-D_T-AYNd.cjs → blueprint-DtPRNDEu.cjs} +5 -5
- package/dist/{blueprintFns-DD_cM248.js → blueprintFns-YuJQgywS.js} +2 -2
- package/dist/{blueprintFns-COoax_Qd.cjs → blueprintFns-y2oH3LOO.cjs} +2 -2
- package/dist/{blueprintSketcher-DtjZEmgc.js → blueprintSketcher-DPP1g95U.js} +3 -3
- package/dist/{blueprintSketcher-wvZPUAlC.cjs → blueprintSketcher-zQgjgodb.cjs} +3 -3
- package/dist/{boolean2D-DX0exPxi.cjs → boolean2D-BJFpEXix.cjs} +4 -4
- package/dist/{boolean2D-Bpy4N2Gn.js → boolean2D-CNf7lVXV.js} +4 -4
- package/dist/{booleanFns-BfHFIGG2.js → booleanFns-B9RvEpHB.js} +59 -33
- package/dist/{booleanFns-CJFWBMrz.cjs → booleanFns-CkcJ8WB7.cjs} +64 -32
- package/dist/brepjs.cjs +31 -31
- package/dist/brepjs.js +31 -31
- package/dist/{cameraFns-slop0dGo.cjs → cameraFns-B9xKg36U.cjs} +3 -3
- package/dist/{cameraFns-CQr0Z3FY.js → cameraFns-CLkNCsYU.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-BGktSDIJ.js → cornerFinder-DgVMDBCo.js} +1 -1
- package/dist/{cornerFinder-B-odGaqU.cjs → cornerFinder-Dzsi68w-.cjs} +1 -1
- package/dist/{curveFns-B1ZGAua6.cjs → curveFns-B8mm5cou.cjs} +1 -1
- package/dist/{curveFns-DpAho4sY.js → curveFns-EsJgIpc6.js} +1 -1
- package/dist/{drawFns-HPK4VIr4.js → drawFns-Bht1ceeH.js} +12 -12
- package/dist/{drawFns-BaX0T4YH.cjs → drawFns-CLJog-Xp.cjs} +12 -12
- package/dist/{faceFns-DvnSVq5k.js → faceFns-2jGPfqvB.js} +2 -2
- package/dist/{faceFns-mca5oNNe.cjs → faceFns-Jo9hMVqL.cjs} +2 -2
- package/dist/{healingFns-BY_IdHbC.cjs → healingFns-DGc2hk9z.cjs} +80 -20
- package/dist/{healingFns-DYtkECby.js → healingFns-DvuJr4RS.js} +80 -20
- package/dist/{helpers-WdI_vPa4.js → helpers-BuI9lh-t.js} +6 -6
- package/dist/{helpers-6DyPwHPE.cjs → helpers-D7Y4Vxhf.cjs} +6 -6
- package/dist/{importFns-DN5oxh4I.cjs → importFns-Dwlc0KtB.cjs} +5 -5
- package/dist/{importFns-D7KuHlJx.js → importFns-TKzj4FaZ.js} +5 -5
- package/dist/io/stepConfigFns.d.ts +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/helpers.d.ts +1 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -0
- package/dist/{loftFns-Udobz6tm.cjs → loftFns-CnerVgTM.cjs} +1 -1
- package/dist/{loftFns-DE21800M.js → loftFns-jnQL_zpD.js} +1 -1
- package/dist/{measureFns-DmL9FRQC.js → measureFns--UKrACtx.js} +15 -9
- package/dist/{measureFns-JNQma34N.cjs → measureFns-D8uSDn-8.cjs} +26 -8
- package/dist/measurement/measureFns.d.ts +18 -3
- package/dist/measurement/principalBoxFns.d.ts +2 -1
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-CqLLizwL.js → meshFns-Bo4EQJFO.js} +4 -4
- package/dist/{meshFns-CsMwXvw3.cjs → meshFns-Cs_qrlXI.cjs} +4 -4
- package/dist/{occtWasmAdapter-DTEpwXuT.cjs → occtWasmAdapter-BK--kx4R.cjs} +33 -8
- package/dist/{occtWasmAdapter-Dr70YU4m.js → occtWasmAdapter-C-Qi-jxS.js} +33 -8
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-CE8IsnCc.cjs → primitiveFns-CZqSRhm8.cjs} +5 -5
- package/dist/{primitiveFns-DnzKWigX.js → primitiveFns-DPqHA3sX.js} +5 -5
- package/dist/{principalBoxFns-wy3yRjqt.js → principalBoxFns-C3SQMyG5.js} +29 -20
- package/dist/{principalBoxFns-D_SbLz4g.cjs → principalBoxFns-Cozj46sS.cjs} +29 -20
- 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-Bi9CTJ3m.cjs → refResolveFns-DBY8yC6n.cjs} +6 -6
- package/dist/{refResolveFns-Cd_CuhaX.js → refResolveFns-DtztzO1g.js} +6 -6
- package/dist/{shapeFns-DCiFtMCX.cjs → shapeFns-D47cmLG8.cjs} +2 -2
- package/dist/{shapeFns-pMt-Oz0f.js → shapeFns-kFm-m8jh.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-B9ACN7a8.cjs → shapeTypes-C06KHgTm.cjs} +1 -1
- package/dist/{shapeTypes-Ccp9iVna.js → shapeTypes-DoPnZHn_.js} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-DwqlsNW1.cjs → solidBuilders-Dwm0hXn5.cjs} +3 -3
- package/dist/{solidBuilders-BltNQKqZ.js → solidBuilders-ZDGdvaTU.js} +3 -3
- package/dist/{surfaceBuilders-CiNyRrC4.js → surfaceBuilders-BBs6D6Km.js} +3 -3
- package/dist/{surfaceBuilders-CYuQfMQj.cjs → surfaceBuilders-D5kFAV1i.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-DiYY758O.cjs → textBlueprints-BPrPhg5b.cjs} +8 -8
- package/dist/{textBlueprints-CHXueg05.js → textBlueprints-Dq3pUNSr.js} +8 -8
- package/dist/{textMetrics-DJIhwIPL.cjs → textMetrics-4xkjKmD1.cjs} +1 -1
- package/dist/{textMetrics-C0rVJZVh.js → textMetrics-JN70dV5x.js} +1 -1
- package/dist/{threadFns-B9uxy9ud.js → threadFns-D7D_qR7t.js} +7 -7
- package/dist/{threadFns-ChWU9CVV.cjs → threadFns-Dq_Gff0C.cjs} +7 -7
- package/dist/topology/booleanFns.d.ts +15 -3
- package/dist/topology/metadata/metadataPropagation.d.ts +4 -1
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-DEax1nqt.cjs → topologyQueryFns-BUhKY2Kj.cjs} +1 -1
- package/dist/{topologyQueryFns-D7j1fl0n.js → topologyQueryFns-yOGEI9hO.js} +1 -1
- package/dist/{validityTypes-6AePqp-3.js → validityTypes-CGrEOscY.js} +1 -1
- package/dist/{validityTypes-BolqrAZa.cjs → validityTypes-lfyOkCQm.cjs} +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { q as getKernel, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, y as isFace } from "./shapeTypes-DoPnZHn_.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-yOGEI9hO.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-2jGPfqvB.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-kFm-m8jh.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-EsJgIpc6.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns--UKrACtx.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
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.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-Jo9hMVqL.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-D47cmLG8.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-B8mm5cou.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-D8uSDn-8.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
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C06KHgTm.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-BUhKY2Kj.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-Dwm0hXn5.cjs");
|
|
7
|
+
const require_meshFns = require("./meshFns-Cs_qrlXI.cjs");
|
|
8
8
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
9
|
-
const require_blueprint = require("./blueprint-
|
|
9
|
+
const require_blueprint = require("./blueprint-DtPRNDEu.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) {
|
|
@@ -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-DoPnZHn_.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-yOGEI9hO.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-ZDGdvaTU.js";
|
|
7
|
+
import { u as igesUnsupportedError } from "./meshFns-Bo4EQJFO.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-BYXwa2cF.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) {
|
|
@@ -6,7 +6,7 @@ export interface StepExportOptions {
|
|
|
6
6
|
readonly unit?: string | undefined;
|
|
7
7
|
/** Model unit override. */
|
|
8
8
|
readonly modelUnit?: string | undefined;
|
|
9
|
-
/** STEP
|
|
9
|
+
/** STEP application protocol: 203, 214 (the default), or 242. */
|
|
10
10
|
readonly schema?: number | undefined;
|
|
11
11
|
}
|
|
12
12
|
/** A shape with optional name and color for STEP assembly export. */
|
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-Cs_qrlXI.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-Dwlc0KtB.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-Bo4EQJFO.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-TKzj4FaZ.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -39,6 +39,7 @@ export declare function runEdgeTreatment<T>(Module: OcctWasmModule, edges: Kerne
|
|
|
39
39
|
export declare function draftAnglesRad(faces: readonly KernelShape[], angleDeg: number | ((face: KernelShape) => number)): number[];
|
|
40
40
|
/** The peer range still admits older builds, which lack the per-edge and unit entry points. */
|
|
41
41
|
export declare function needsOcctWasm59(what: string): UnsupportedKernelOperationError;
|
|
42
|
+
export declare function needsOcctWasm510(what: string): UnsupportedKernelOperationError;
|
|
42
43
|
/**
|
|
43
44
|
* Rotate a shape from the kernel's default Z-axis to an arbitrary direction.
|
|
44
45
|
* Used by primitives whose creation API only takes a Z-aligned form.
|
|
@@ -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-BK--kx4R.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as OcctWasmAdapter } from "../../occtWasmAdapter-
|
|
1
|
+
export { t as OcctWasmAdapter } from "../../occtWasmAdapter-C-Qi-jxS.js";
|
|
@@ -253,6 +253,8 @@ export interface OcctKernelWasm {
|
|
|
253
253
|
* inch, ft, mi, mil, um, uin). Geometry is read as millimeters.
|
|
254
254
|
*/
|
|
255
255
|
exportStepWithUnit?(id: number, unit: string): string;
|
|
256
|
+
/** occt-wasm >= 5.10.0: `schema` is 'AP203', 'AP214', or 'AP242'; '' keeps AP214. */
|
|
257
|
+
exportStepWithOptions?(id: number, unit: string, schema: string): string;
|
|
256
258
|
importStl(data: string): number;
|
|
257
259
|
/** Absent from published occt-wasm builds (no IGES translator), so callers feature-detect. */
|
|
258
260
|
importIges?(data: string): number;
|
|
@@ -307,6 +309,8 @@ export interface OcctKernelWasm {
|
|
|
307
309
|
xcafExportSTEP(docId: number): string;
|
|
308
310
|
/** occt-wasm >= 5.9.0: units as in {@link exportStepWithUnit}. */
|
|
309
311
|
xcafExportSTEPWithUnit?(docId: number, unit: string): string;
|
|
312
|
+
/** occt-wasm >= 5.10.0: unit and schema as in {@link exportStepWithOptions}. */
|
|
313
|
+
xcafExportSTEPWithOptions?(docId: number, unit: string, schema: string): string;
|
|
310
314
|
bsplineSurface(flatPoints: EmVectorDouble, rows: number, cols: number): number;
|
|
311
315
|
makeFaceOnSurface(faceId: number, wireId: number): number;
|
|
312
316
|
makeNullShape(): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C06KHgTm.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,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-DoPnZHn_.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,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DoPnZHn_.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-yOGEI9hO.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-2jGPfqvB.js";
|
|
5
5
|
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -30,6 +30,8 @@ function nullShapeErr(fn) {
|
|
|
30
30
|
* Run `fn` on fresh handles to the distinct sub-shapes of `type`, releasing them
|
|
31
31
|
* afterwards. Unlike getFaces and friends this leaves the shape's topology cache
|
|
32
32
|
* alone, so a measurement allocates nothing that outlives it.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
33
35
|
*/
|
|
34
36
|
function withSubShapes(shape, type, fn) {
|
|
35
37
|
const kernel = getKernel();
|
|
@@ -40,7 +42,11 @@ function withSubShapes(shape, type, fn) {
|
|
|
40
42
|
for (const item of items) kernel.dispose(item);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Run `fn` on a throwaway compound of `parts`, releasing the compound afterwards.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
44
50
|
function withCompoundOf(parts, fn) {
|
|
45
51
|
const kernel = getKernel();
|
|
46
52
|
const c = kernel.makeCompound(parts);
|
|
@@ -141,9 +147,9 @@ function measureSurfaceProps(shape) {
|
|
|
141
147
|
/**
|
|
142
148
|
* Measure linear properties of any shape.
|
|
143
149
|
*
|
|
144
|
-
* For edges this is the arc length; for wires
|
|
145
|
-
*
|
|
146
|
-
* their distinct edges, each counted once.
|
|
150
|
+
* For edges this is the arc length; for wires it is the total length of their
|
|
151
|
+
* edges; for faces, shells, solids, and compounds it is the total length of
|
|
152
|
+
* their distinct edges, each counted once (a face's seam edge included).
|
|
147
153
|
*
|
|
148
154
|
* @param shape - Any shape whose linear extent is to be measured.
|
|
149
155
|
* @returns `Result` containing length, center of mass, and raw mass property.
|
|
@@ -164,7 +170,7 @@ function measureLinearProps(shape) {
|
|
|
164
170
|
};
|
|
165
171
|
};
|
|
166
172
|
let result;
|
|
167
|
-
if (type === "vertex" || type === "edge" || type === "wire"
|
|
173
|
+
if (type === "vertex" || type === "edge" || type === "wire") result = linearOf(shape.wrapped);
|
|
168
174
|
else result = withSubShapes(shape, "edge", (edges) => edges.length === 0 ? {
|
|
169
175
|
mass: 0,
|
|
170
176
|
length: 0,
|
|
@@ -289,4 +295,4 @@ function measureCurvatureAtMid(face) {
|
|
|
289
295
|
minDirection: result.minDirection
|
|
290
296
|
});
|
|
291
297
|
}
|
|
292
|
-
export { measureDistance as a, measureLinearProps as c, measureVolumeProps as d,
|
|
298
|
+
export { measureDistance as a, measureLinearProps as c, measureVolumeProps as d, withCompoundOf as f, setCachedMeasurement as h, measureCurvatureAtMid as i, measureSurfaceProps as l, getCachedMeasurement as m, measureArea as n, measureDistanceProps as o, withSubShapes as p, measureCurvatureAt as r, measureLength as s, createDistanceQuery as t, measureVolume as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C06KHgTm.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-BUhKY2Kj.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-Jo9hMVqL.cjs");
|
|
5
5
|
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -30,6 +30,8 @@ function nullShapeErr(fn) {
|
|
|
30
30
|
* Run `fn` on fresh handles to the distinct sub-shapes of `type`, releasing them
|
|
31
31
|
* afterwards. Unlike getFaces and friends this leaves the shape's topology cache
|
|
32
32
|
* alone, so a measurement allocates nothing that outlives it.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
33
35
|
*/
|
|
34
36
|
function withSubShapes(shape, type, fn) {
|
|
35
37
|
const kernel = require_shapeTypes.getKernel();
|
|
@@ -40,7 +42,11 @@ function withSubShapes(shape, type, fn) {
|
|
|
40
42
|
for (const item of items) kernel.dispose(item);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Run `fn` on a throwaway compound of `parts`, releasing the compound afterwards.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
44
50
|
function withCompoundOf(parts, fn) {
|
|
45
51
|
const kernel = require_shapeTypes.getKernel();
|
|
46
52
|
const c = kernel.makeCompound(parts);
|
|
@@ -141,9 +147,9 @@ function measureSurfaceProps(shape) {
|
|
|
141
147
|
/**
|
|
142
148
|
* Measure linear properties of any shape.
|
|
143
149
|
*
|
|
144
|
-
* For edges this is the arc length; for wires
|
|
145
|
-
*
|
|
146
|
-
* their distinct edges, each counted once.
|
|
150
|
+
* For edges this is the arc length; for wires it is the total length of their
|
|
151
|
+
* edges; for faces, shells, solids, and compounds it is the total length of
|
|
152
|
+
* their distinct edges, each counted once (a face's seam edge included).
|
|
147
153
|
*
|
|
148
154
|
* @param shape - Any shape whose linear extent is to be measured.
|
|
149
155
|
* @returns `Result` containing length, center of mass, and raw mass property.
|
|
@@ -164,7 +170,7 @@ function measureLinearProps(shape) {
|
|
|
164
170
|
};
|
|
165
171
|
};
|
|
166
172
|
let result;
|
|
167
|
-
if (type === "vertex" || type === "edge" || type === "wire"
|
|
173
|
+
if (type === "vertex" || type === "edge" || type === "wire") result = linearOf(shape.wrapped);
|
|
168
174
|
else result = withSubShapes(shape, "edge", (edges) => edges.length === 0 ? {
|
|
169
175
|
mass: 0,
|
|
170
176
|
length: 0,
|
|
@@ -367,3 +373,15 @@ Object.defineProperty(exports, "setCachedMeasurement", {
|
|
|
367
373
|
return setCachedMeasurement;
|
|
368
374
|
}
|
|
369
375
|
});
|
|
376
|
+
Object.defineProperty(exports, "withCompoundOf", {
|
|
377
|
+
enumerable: true,
|
|
378
|
+
get: function() {
|
|
379
|
+
return withCompoundOf;
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
Object.defineProperty(exports, "withSubShapes", {
|
|
383
|
+
enumerable: true,
|
|
384
|
+
get: function() {
|
|
385
|
+
return withSubShapes;
|
|
386
|
+
}
|
|
387
|
+
});
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
import { KernelShape, ShapeType } from '../kernel/types.js';
|
|
1
2
|
import { AnyShape, Dimension, Face, OrientedFace, Shape3D } from '../core/shapeTypes.js';
|
|
2
3
|
import { Result } from '../core/result.js';
|
|
3
4
|
import { CurvatureResult } from '../kernel/occt/measureOps.js';
|
|
4
5
|
import { PhysicalProps, VolumeProps, SurfaceProps, LinearProps, DistanceProps } from './measureTypes.js';
|
|
5
6
|
export type { PhysicalProps, VolumeProps, SurfaceProps, LinearProps, DistanceProps };
|
|
7
|
+
/**
|
|
8
|
+
* Run `fn` on fresh handles to the distinct sub-shapes of `type`, releasing them
|
|
9
|
+
* afterwards. Unlike getFaces and friends this leaves the shape's topology cache
|
|
10
|
+
* alone, so a measurement allocates nothing that outlives it.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function withSubShapes<R>(shape: AnyShape<Dimension>, type: ShapeType, fn: (items: KernelShape[]) => R): R;
|
|
15
|
+
/**
|
|
16
|
+
* Run `fn` on a throwaway compound of `parts`, releasing the compound afterwards.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare function withCompoundOf<R>(parts: KernelShape[], fn: (c: KernelShape) => R): R;
|
|
6
21
|
/**
|
|
7
22
|
* Measure volume properties of a 3D shape.
|
|
8
23
|
*
|
|
@@ -22,9 +37,9 @@ export declare function measureSurfaceProps(shape: Face<Dimension> | Shape3D): R
|
|
|
22
37
|
/**
|
|
23
38
|
* Measure linear properties of any shape.
|
|
24
39
|
*
|
|
25
|
-
* For edges this is the arc length; for wires
|
|
26
|
-
*
|
|
27
|
-
* their distinct edges, each counted once.
|
|
40
|
+
* For edges this is the arc length; for wires it is the total length of their
|
|
41
|
+
* edges; for faces, shells, solids, and compounds it is the total length of
|
|
42
|
+
* their distinct edges, each counted once (a face's seam edge included).
|
|
28
43
|
*
|
|
29
44
|
* @param shape - Any shape whose linear extent is to be measured.
|
|
30
45
|
* @returns `Result` containing length, center of mass, and raw mass property.
|
|
@@ -16,7 +16,8 @@ export type { PrincipalBoundingBox };
|
|
|
16
16
|
* Z reports 136.6 x 136.6 x 2, because any in-plane pair of axes is principal
|
|
17
17
|
* for a square plate.
|
|
18
18
|
*
|
|
19
|
-
* @param shape - A solid, compsolid, or compound containing solids.
|
|
19
|
+
* @param shape - A solid, compsolid, or compound containing solids. A compound
|
|
20
|
+
* is measured by its solids alone: loose faces, shells, or wires in it are ignored.
|
|
20
21
|
* @returns `Result` with the box center in world coordinates, orthonormal
|
|
21
22
|
* right-handed axes ordered by decreasing extent, and the full edge lengths
|
|
22
23
|
* along those axes. Fails with `NOT_A_SOLID` for any other shape type
|
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-D8uSDn-8.cjs");
|
|
3
|
+
const require_principalBoxFns = require("./principalBoxFns-Cozj46sS.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--UKrACtx.js";
|
|
2
|
+
import { t as principalBoundingBox } from "./principalBoxFns-C3SQMyG5.js";
|
|
3
3
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-
|
|
2
|
-
import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-
|
|
1
|
+
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-DoPnZHn_.js";
|
|
2
|
+
import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-C-Qi-jxS.js";
|
|
3
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-
|
|
5
|
-
import { d as getFaceOrigins } from "./solidBuilders-
|
|
4
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-yOGEI9hO.js";
|
|
5
|
+
import { d as getFaceOrigins } from "./solidBuilders-ZDGdvaTU.js";
|
|
6
6
|
// src/topology/meshCache.ts
|
|
7
7
|
/**
|
|
8
8
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
|
|
2
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-BK--kx4R.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-Dwm0hXn5.cjs");
|
|
6
6
|
// src/topology/meshCache.ts
|
|
7
7
|
/**
|
|
8
8
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -2350,6 +2350,9 @@ function draftAnglesRad(faces, angleDeg) {
|
|
|
2350
2350
|
function needsOcctWasm59(what) {
|
|
2351
2351
|
return new UnsupportedKernelOperationError(`occt-wasm: ${what} requires occt-wasm >= 5.9.0`);
|
|
2352
2352
|
}
|
|
2353
|
+
function needsOcctWasm510(what) {
|
|
2354
|
+
return new UnsupportedKernelOperationError(`occt-wasm: ${what} requires occt-wasm >= 5.10.0`);
|
|
2355
|
+
}
|
|
2353
2356
|
/**
|
|
2354
2357
|
* Rotate a shape from the kernel's default Z-axis to an arbitrary direction.
|
|
2355
2358
|
* Used by primitives whose creation API only takes a Z-aligned form.
|
|
@@ -4601,6 +4604,17 @@ var MM_PER_UNIT = {
|
|
|
4601
4604
|
uin: 254e-7,
|
|
4602
4605
|
microinch: 254e-7
|
|
4603
4606
|
};
|
|
4607
|
+
var STEP_SCHEMAS = {
|
|
4608
|
+
203: "AP203",
|
|
4609
|
+
214: "AP214",
|
|
4610
|
+
242: "AP242"
|
|
4611
|
+
};
|
|
4612
|
+
function stepSchemaName(schema) {
|
|
4613
|
+
if (schema === void 0) return "";
|
|
4614
|
+
const name = STEP_SCHEMAS[schema];
|
|
4615
|
+
if (name === void 0) throw new Error(`occt-wasm: unknown STEP schema ${schema} (expected 203, 214, or 242)`);
|
|
4616
|
+
return name;
|
|
4617
|
+
}
|
|
4604
4618
|
function mmPerUnit(unit) {
|
|
4605
4619
|
const mm = MM_PER_UNIT[unit.toLowerCase()];
|
|
4606
4620
|
if (mm === void 0) throw new Error(`occt-wasm: unknown STEP length unit '${unit}'`);
|
|
@@ -4616,14 +4630,17 @@ function resolveStepUnits(options) {
|
|
|
4616
4630
|
const write = options?.unit ?? options?.modelUnit ?? "mm";
|
|
4617
4631
|
return {
|
|
4618
4632
|
write,
|
|
4619
|
-
modelScale: mmPerUnit(options?.modelUnit ?? write)
|
|
4633
|
+
modelScale: mmPerUnit(options?.modelUnit ?? write),
|
|
4634
|
+
schema: stepSchemaName(options?.schema)
|
|
4620
4635
|
};
|
|
4621
4636
|
}
|
|
4622
|
-
/**
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4637
|
+
/** The newest writer `units` needs, else an error naming the occt-wasm release that has it. */
|
|
4638
|
+
function stepWriter(writers, units) {
|
|
4639
|
+
const { withOptions, withUnit, inMillimeters } = writers;
|
|
4640
|
+
if (units.schema) {
|
|
4641
|
+
if (!withOptions) throw needsOcctWasm510(`STEP export as ${units.schema}`);
|
|
4642
|
+
return (id) => withOptions(id, units.write, units.schema);
|
|
4643
|
+
}
|
|
4627
4644
|
if (withUnit) return (id) => withUnit(id, units.write);
|
|
4628
4645
|
if (mmPerUnit(units.write) === 1) return inMillimeters;
|
|
4629
4646
|
throw needsOcctWasm59(`STEP export in '${units.write}'`);
|
|
@@ -4640,7 +4657,11 @@ function withScaled(k, id, factor, use) {
|
|
|
4640
4657
|
}
|
|
4641
4658
|
/** One STEP file holding every shape (as a compound when there are several). */
|
|
4642
4659
|
function writeStepShapes(k, makeCompound, shapes, units) {
|
|
4643
|
-
const write = stepWriter(
|
|
4660
|
+
const write = stepWriter({
|
|
4661
|
+
withOptions: k.exportStepWithOptions?.bind(k),
|
|
4662
|
+
withUnit: k.exportStepWithUnit?.bind(k),
|
|
4663
|
+
inMillimeters: (id) => k.exportStep(id)
|
|
4664
|
+
}, units);
|
|
4644
4665
|
if (shapes.length === 1) return withScaled(k, unwrap(shapes[0]), units.modelScale, write);
|
|
4645
4666
|
const compoundId = unwrap(makeCompound(shapes));
|
|
4646
4667
|
try {
|
|
@@ -4834,7 +4855,11 @@ function writeXcafDoc(k, docId, units) {
|
|
|
4834
4855
|
} finally {
|
|
4835
4856
|
roots.delete();
|
|
4836
4857
|
}
|
|
4837
|
-
return stepWriter(
|
|
4858
|
+
return stepWriter({
|
|
4859
|
+
withOptions: k.xcafExportSTEPWithOptions?.bind(k),
|
|
4860
|
+
withUnit: k.xcafExportSTEPWithUnit?.bind(k),
|
|
4861
|
+
inMillimeters: (id) => k.xcafExportSTEP(id)
|
|
4862
|
+
}, units)(docId);
|
|
4838
4863
|
}
|
|
4839
4864
|
/** Write `parts` as one XCAF STEP file, scaling each into millimeters first if needed. */
|
|
4840
4865
|
function writeXcafParts(k, parts, units) {
|
|
@@ -2350,6 +2350,9 @@ function draftAnglesRad(faces, angleDeg) {
|
|
|
2350
2350
|
function needsOcctWasm59(what) {
|
|
2351
2351
|
return new UnsupportedKernelOperationError(`occt-wasm: ${what} requires occt-wasm >= 5.9.0`);
|
|
2352
2352
|
}
|
|
2353
|
+
function needsOcctWasm510(what) {
|
|
2354
|
+
return new UnsupportedKernelOperationError(`occt-wasm: ${what} requires occt-wasm >= 5.10.0`);
|
|
2355
|
+
}
|
|
2353
2356
|
/**
|
|
2354
2357
|
* Rotate a shape from the kernel's default Z-axis to an arbitrary direction.
|
|
2355
2358
|
* Used by primitives whose creation API only takes a Z-aligned form.
|
|
@@ -4601,6 +4604,17 @@ var MM_PER_UNIT = {
|
|
|
4601
4604
|
uin: 254e-7,
|
|
4602
4605
|
microinch: 254e-7
|
|
4603
4606
|
};
|
|
4607
|
+
var STEP_SCHEMAS = {
|
|
4608
|
+
203: "AP203",
|
|
4609
|
+
214: "AP214",
|
|
4610
|
+
242: "AP242"
|
|
4611
|
+
};
|
|
4612
|
+
function stepSchemaName(schema) {
|
|
4613
|
+
if (schema === void 0) return "";
|
|
4614
|
+
const name = STEP_SCHEMAS[schema];
|
|
4615
|
+
if (name === void 0) throw new Error(`occt-wasm: unknown STEP schema ${schema} (expected 203, 214, or 242)`);
|
|
4616
|
+
return name;
|
|
4617
|
+
}
|
|
4604
4618
|
function mmPerUnit(unit) {
|
|
4605
4619
|
const mm = MM_PER_UNIT[unit.toLowerCase()];
|
|
4606
4620
|
if (mm === void 0) throw new Error(`occt-wasm: unknown STEP length unit '${unit}'`);
|
|
@@ -4616,14 +4630,17 @@ function resolveStepUnits(options) {
|
|
|
4616
4630
|
const write = options?.unit ?? options?.modelUnit ?? "mm";
|
|
4617
4631
|
return {
|
|
4618
4632
|
write,
|
|
4619
|
-
modelScale: mmPerUnit(options?.modelUnit ?? write)
|
|
4633
|
+
modelScale: mmPerUnit(options?.modelUnit ?? write),
|
|
4634
|
+
schema: stepSchemaName(options?.schema)
|
|
4620
4635
|
};
|
|
4621
4636
|
}
|
|
4622
|
-
/**
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4637
|
+
/** The newest writer `units` needs, else an error naming the occt-wasm release that has it. */
|
|
4638
|
+
function stepWriter(writers, units) {
|
|
4639
|
+
const { withOptions, withUnit, inMillimeters } = writers;
|
|
4640
|
+
if (units.schema) {
|
|
4641
|
+
if (!withOptions) throw needsOcctWasm510(`STEP export as ${units.schema}`);
|
|
4642
|
+
return (id) => withOptions(id, units.write, units.schema);
|
|
4643
|
+
}
|
|
4627
4644
|
if (withUnit) return (id) => withUnit(id, units.write);
|
|
4628
4645
|
if (mmPerUnit(units.write) === 1) return inMillimeters;
|
|
4629
4646
|
throw needsOcctWasm59(`STEP export in '${units.write}'`);
|
|
@@ -4640,7 +4657,11 @@ function withScaled(k, id, factor, use) {
|
|
|
4640
4657
|
}
|
|
4641
4658
|
/** One STEP file holding every shape (as a compound when there are several). */
|
|
4642
4659
|
function writeStepShapes(k, makeCompound, shapes, units) {
|
|
4643
|
-
const write = stepWriter(
|
|
4660
|
+
const write = stepWriter({
|
|
4661
|
+
withOptions: k.exportStepWithOptions?.bind(k),
|
|
4662
|
+
withUnit: k.exportStepWithUnit?.bind(k),
|
|
4663
|
+
inMillimeters: (id) => k.exportStep(id)
|
|
4664
|
+
}, units);
|
|
4644
4665
|
if (shapes.length === 1) return withScaled(k, unwrap(shapes[0]), units.modelScale, write);
|
|
4645
4666
|
const compoundId = unwrap(makeCompound(shapes));
|
|
4646
4667
|
try {
|
|
@@ -4834,7 +4855,11 @@ function writeXcafDoc(k, docId, units) {
|
|
|
4834
4855
|
} finally {
|
|
4835
4856
|
roots.delete();
|
|
4836
4857
|
}
|
|
4837
|
-
return stepWriter(
|
|
4858
|
+
return stepWriter({
|
|
4859
|
+
withOptions: k.xcafExportSTEPWithOptions?.bind(k),
|
|
4860
|
+
withUnit: k.xcafExportSTEPWithUnit?.bind(k),
|
|
4861
|
+
inMillimeters: (id) => k.xcafExportSTEP(id)
|
|
4862
|
+
}, units)(docId);
|
|
4838
4863
|
}
|
|
4839
4864
|
/** Write `parts` as one XCAF STEP file, scaling each into millimeters first if needed. */
|
|
4840
4865
|
function writeXcafParts(k, parts, units) {
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
3
|
-
const require_loftFns = require("./loftFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-Dq_Gff0C.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-CnerVgTM.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-D7D_qR7t.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-jnQL_zpD.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-lfyOkCQm.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const require_booleanFns = require("./booleanFns-
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-Dwm0hXn5.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-CkcJ8WB7.cjs");
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-D5kFAV1i.cjs");
|
|
9
9
|
// src/topology/transformFns.ts
|
|
10
10
|
/**
|
|
11
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DoPnZHn_.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-CGrEOscY.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-
|
|
7
|
-
import {
|
|
8
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
6
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-ZDGdvaTU.js";
|
|
7
|
+
import { f as collectInputFaceHashes, g as propagateMetadataThroughRelocation, h as propagateMetadataByHash, m as propagateAllMetadata, p as hasAnyMetadata } from "./booleanFns-B9RvEpHB.js";
|
|
8
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-BBs6D6Km.js";
|
|
9
9
|
// src/topology/transformFns.ts
|
|
10
10
|
/**
|
|
11
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|