brepjs 20.0.0 → 20.1.0
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-DkWknlaR.js → adjacencyFns-Uvm9NynL.js} +3 -3
- package/dist/{adjacencyFns-Cdat1ofi.cjs → adjacencyFns-jii1IFIG.cjs} +3 -3
- package/dist/{blueprint-DOwwe5gw.cjs → blueprint-D9ZlqUeK.cjs} +5 -5
- package/dist/{blueprint-22kW0ICa.js → blueprint-DILaxgJO.js} +5 -5
- package/dist/{blueprintFns-DRTfqZsZ.cjs → blueprintFns-D4TEbdWz.cjs} +2 -2
- package/dist/{blueprintFns-Bwi75Szr.js → blueprintFns-bY8kvY4_.js} +2 -2
- package/dist/{blueprintSketcher-DW3WMfm2.js → blueprintSketcher-DQ8_jTjB.js} +3 -3
- package/dist/{blueprintSketcher-CxxS52ZI.cjs → blueprintSketcher-Dzt1t42w.cjs} +3 -3
- package/dist/{boolean2D-BYHxSbDH.cjs → boolean2D-B1mwRBqn.cjs} +4 -4
- package/dist/{boolean2D-DLe9jy53.js → boolean2D-Ez4nai3v.js} +4 -4
- package/dist/brepjs.cjs +29 -29
- package/dist/brepjs.js +29 -29
- package/dist/{cameraFns-DCUsH23g.cjs → cameraFns-BPPUjCnt.cjs} +3 -3
- package/dist/{cameraFns-DtaivMYa.js → cameraFns-DVsDrWgy.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-DIewkspO.cjs → cornerFinder-CbsBCk55.cjs} +1 -1
- package/dist/{cornerFinder-B6L3zTOA.js → cornerFinder-D_9RMx6b.js} +1 -1
- package/dist/{curveFns-1e6j5nXW.cjs → curveFns-0ka_F1Qt.cjs} +1 -1
- package/dist/{curveFns-C0zENjCi.js → curveFns-Ci1fc5gO.js} +1 -1
- package/dist/{drawFns-BUB7YeKu.js → drawFns-ClJ3JEQN.js} +12 -12
- package/dist/{drawFns-Cu61XWtX.cjs → drawFns-D9MEpXRq.cjs} +12 -12
- package/dist/{faceFns-Qo7nIMc6.js → faceFns-DCmUSP5s.js} +2 -2
- package/dist/{faceFns-BinRdCKC.cjs → faceFns-DeJ6KX-t.cjs} +2 -2
- package/dist/{healingFns-K2mKlcGA.cjs → healingFns-DKA7ZP2T.cjs} +4 -4
- package/dist/{healingFns--idy5knW.js → healingFns-DLTUch-a.js} +4 -4
- package/dist/{helpers-CavGK8r0.cjs → helpers-C7Dc2kHH.cjs} +6 -6
- package/dist/{helpers-CT29THg0.js → helpers-DptAa1BD.js} +6 -6
- package/dist/{importFns-rCT3bzrO.js → importFns-BPFSXV6z.js} +2 -2
- package/dist/{importFns-B3-31QaN.cjs → importFns-CFIKCNNb.cjs} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/interfaces/evolutionOps.d.ts +7 -0
- package/dist/kernel/occt/booleanOps.d.ts +9 -1
- package/dist/kernel/occtWasm/booleanOps.d.ts +38 -6
- package/dist/kernel/occtWasm/evolutionOps.d.ts +11 -3
- package/dist/kernel/occtWasm/helpers.d.ts +7 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +4 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +2 -0
- package/dist/{loftFns-BigHFXTf.cjs → loftFns-IB4K_Dzv.cjs} +1 -1
- package/dist/{loftFns-ByrWfSBX.js → loftFns-IzkWwK0P.js} +1 -1
- package/dist/{measureFns-CLsw9fTy.cjs → measureFns-Cxk116Fv.cjs} +3 -3
- package/dist/{measureFns-BfkCmmb-.js → measureFns-HcH4fJJE.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CkvvMsIk.js → meshFns-CvqS6edU.js} +3 -3
- package/dist/{meshFns-1SLb656s.cjs → meshFns-zlx99xbI.cjs} +3 -3
- package/dist/{occtWasmAdapter-CIc9I87_.js → occtWasmAdapter-BYziKlFk.js} +215 -76
- package/dist/{occtWasmAdapter-y21xnRNM.cjs → occtWasmAdapter-D6-CUP2V.cjs} +215 -76
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-CLSjfAXP.js → originTrackingFns-B_VM7fiP.js} +2 -2
- package/dist/{originTrackingFns-q7xmSJHd.cjs → originTrackingFns-PUTN7amf.cjs} +2 -2
- package/dist/{primitiveFns-DwuH8FF1.cjs → primitiveFns-C109FiCa.cjs} +4 -4
- package/dist/{primitiveFns-CQy3iiv_.js → primitiveFns-DbZD1Zqf.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-DjmIp8gz.js → refResolveFns-Cr_obR-4.js} +6 -6
- package/dist/{refResolveFns-C16KmO4z.cjs → refResolveFns-DtU3S0qY.cjs} +6 -6
- package/dist/{shapeFns-KcSNOAAv.cjs → shapeFns-BPBLbDjd.cjs} +2 -2
- package/dist/{shapeFns-C3EC8Fqp.js → shapeFns-Dpa19NyE.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-BTaEiG1y.js → shapeTypes-B_ogF-B7.js} +68 -76
- package/dist/{shapeTypes-DweqaALJ.cjs → shapeTypes-DwrDUQPZ.cjs} +68 -76
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-BeumT5UD.cjs → solidBuilders-BNsIlURc.cjs} +31 -7
- package/dist/{solidBuilders-2Ho4kcPL.js → solidBuilders-pibEpGVS.js} +31 -7
- package/dist/{surfaceBuilders-COaytSqx.js → surfaceBuilders-COXjNT6b.js} +3 -3
- package/dist/{surfaceBuilders-DjhGZZvn.cjs → surfaceBuilders-DZU1ttYY.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-I09VlWfS.cjs → textBlueprints-CpPDmfyT.cjs} +7 -7
- package/dist/{textBlueprints-Twdvzb1E.js → textBlueprints-CzC9BOgL.js} +7 -7
- package/dist/{textMetrics-B8De13Tj.cjs → textMetrics-Bjm9jybe.cjs} +1 -1
- package/dist/{textMetrics-H5m5OzGy.js → textMetrics-IF9ktcEi.js} +1 -1
- package/dist/{threadFns-CMhXBzUL.cjs → threadFns-BRB6cpKI.cjs} +7 -7
- package/dist/{threadFns-Wqbi-SRj.js → threadFns-nkBUo5vX.js} +7 -7
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-Dsdk7qnz.js → topologyQueryFns-DPrHRCrr.js} +1 -1
- package/dist/{topologyQueryFns-Cqb0bLW1.cjs → topologyQueryFns-YGvGdGCr.cjs} +1 -1
- package/dist/{validityTypes-DzFB9IQW.js → validityTypes-CBK24R8q.js} +1 -1
- package/dist/{validityTypes-9nuI6V2T.cjs → validityTypes-DUed50G5.cjs} +1 -1
- package/package.json +14 -14
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwrDUQPZ.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-YGvGdGCr.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-DeJ6KX-t.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-BPBLbDjd.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-0ka_F1Qt.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-Cxk116Fv.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 { q as getKernel, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, y as isFace } from "./shapeTypes-B_ogF-B7.js";
|
|
2
2
|
import { E as ok, g as err, o as queryError, x as isOk } from "./errors-CTn8i3lY.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-DPrHRCrr.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-DCmUSP5s.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-Dpa19NyE.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-Ci1fc5gO.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-HcH4fJJE.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 { n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { n as castResultShape, q as getKernel } from "./shapeTypes-B_ogF-B7.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At$1 } from "./bug-BdOHwn_e.js";
|
|
3
3
|
import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-DILaxgJO.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-DwrDUQPZ.cjs");
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
3
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-D9ZlqUeK.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-zlx99xbI.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-CFIKCNNb.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-CvqS6edU.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-BPFSXV6z.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -8,6 +8,13 @@ export interface KernelEvolutionOps {
|
|
|
8
8
|
fuseWithHistory(shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
9
9
|
cutWithHistory(shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
10
10
|
intersectWithHistory(shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
11
|
+
/**
|
|
12
|
+
* N-way fuse with face history across every input. Kernels without it get
|
|
13
|
+
* `fuseAll` plus hash-based origin propagation instead.
|
|
14
|
+
*/
|
|
15
|
+
fuseAllWithHistory?: ((shapes: KernelShape[], inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions) => DiagnosticOperationResult) | undefined;
|
|
16
|
+
/** N-way cut with face history across the base and every tool. */
|
|
17
|
+
cutAllWithHistory?: ((shape: KernelShape, tools: KernelShape[], inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions) => DiagnosticOperationResult) | undefined;
|
|
11
18
|
filletWithHistory(shape: KernelShape, edges: KernelShape[], radius: number | [number, number] | ((edge: KernelShape) => number | [number, number]), inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
12
19
|
chamferWithHistory(shape: KernelShape, edges: KernelShape[], distance: number | [number, number] | ((edge: KernelShape) => number | [number, number]), inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
13
20
|
shellWithHistory(shape: KernelShape, faces: KernelShape[], thickness: number, inputFaceHashes: number[], hashUpperBound: number, tolerance?: number): OperationResult;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { BooleanOpType, CheckBooleanResult, KernelInstance, KernelShape, BooleanOptions } from '../types.js';
|
|
1
|
+
import { BooleanOpType, CheckBooleanResult, KernelInstance, KernelShape, KernelType, BooleanOptions } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Construct a two-operand boolean with its operands set but not yet built.
|
|
4
|
+
*
|
|
5
|
+
* The `BRepAlgoAPI_*_3(shape, tool, progress)` constructors run the boolean
|
|
6
|
+
* immediately, and `Build()` clears and recomputes it, so building one of those
|
|
7
|
+
* again computed every boolean twice. Apply glue/OBB/fuzzy, then build once.
|
|
8
|
+
*/
|
|
9
|
+
export declare function newTwoOperandBoolean(oc: KernelInstance, kind: 'Fuse' | 'Cut' | 'Common', shape: KernelShape, tool: KernelShape): KernelType;
|
|
2
10
|
/**
|
|
3
11
|
* Applies glue optimization to a boolean operation builder.
|
|
4
12
|
*/
|
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
import { BooleanOpType, BooleanOptions, CheckBooleanResult, KernelMeshResult, KernelShape } from '../types.js';
|
|
1
|
+
import { BooleanOpType, BooleanOptions, CheckBooleanResult, KernelMeshResult, KernelShape, ShapeEvolution } from '../types.js';
|
|
2
2
|
import { OcctKernelWasm, OcctWasmModule } from './occtWasmTypes.js';
|
|
3
|
+
declare const BOOLEAN_OP_CODE: {
|
|
4
|
+
readonly fuse: 0;
|
|
5
|
+
readonly cut: 1;
|
|
6
|
+
readonly common: 2;
|
|
7
|
+
};
|
|
8
|
+
type BooleanKind = keyof typeof BOOLEAN_OP_CODE;
|
|
9
|
+
/** Whether this occt-wasm build has the general `booleanOp`. */
|
|
10
|
+
export declare function hasBooleanOp(k: OcctKernelWasm): boolean;
|
|
11
|
+
/** Whether `options` asks for anything only `booleanOp` can honor. */
|
|
12
|
+
export declare function needsBooleanOptions(options?: BooleanOptions): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Run `booleanOp` on raw shape ids, collecting face history when hashes are
|
|
15
|
+
* given. The caller owns the returned id.
|
|
16
|
+
*/
|
|
17
|
+
export declare function runBooleanOp(k: OcctKernelWasm, Module: OcctWasmModule, kind: BooleanKind, argIds: number[], toolIds: number[], options?: BooleanOptions, inputFaceHashes?: number[], hashUpperBound?: number): {
|
|
18
|
+
id: number;
|
|
19
|
+
evolution: ShapeEvolution;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Call `fn` with a tool's solids as separate ids, or with the tool alone when
|
|
23
|
+
* it holds at most one solid, and report whether it was split. Solids are
|
|
24
|
+
* handed to an n-way boolean as separate tools, which OCCT allows to overlap,
|
|
25
|
+
* where one compound of overlapping solids is invalid input.
|
|
26
|
+
*/
|
|
27
|
+
export declare function withToolIds<R>(k: OcctKernelWasm, tool: KernelShape, fn: (ids: number[], split: boolean) => R): R;
|
|
28
|
+
/**
|
|
29
|
+
* {@link withToolIds} over several shapes: each multi-solid shape contributes
|
|
30
|
+
* its solids, every other shape its own id, in order. `split` reports whether
|
|
31
|
+
* any shape was expanded.
|
|
32
|
+
*/
|
|
33
|
+
export declare function withSolidIds<R>(k: OcctKernelWasm, shapes: readonly KernelShape[], fn: (ids: number[], split: boolean) => R): R;
|
|
3
34
|
/**
|
|
4
35
|
* The resolved tool id plus a `dispose` that releases any temporary the
|
|
5
36
|
* resolution allocated. Callers must call `dispose()` after the boolean.
|
|
@@ -16,12 +47,13 @@ export interface ResolvedTool {
|
|
|
16
47
|
* Single-solid (or non-solid) tools pass through untouched.
|
|
17
48
|
*/
|
|
18
49
|
export declare function resolveBooleanTool(k: OcctKernelWasm, tool: KernelShape): ResolvedTool;
|
|
19
|
-
export declare function fuse(k: OcctKernelWasm, shape: KernelShape, tool: KernelShape,
|
|
20
|
-
export declare function cut(k: OcctKernelWasm, shape: KernelShape, tool: KernelShape,
|
|
21
|
-
export declare function intersect(k: OcctKernelWasm, shape: KernelShape, tool: KernelShape,
|
|
50
|
+
export declare function fuse(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, options?: BooleanOptions): KernelShape;
|
|
51
|
+
export declare function cut(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, options?: BooleanOptions): KernelShape;
|
|
52
|
+
export declare function intersect(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, options?: BooleanOptions): KernelShape;
|
|
22
53
|
export declare function section(k: OcctKernelWasm, shape: KernelShape, plane: KernelShape, _approximation?: boolean): KernelShape;
|
|
23
|
-
export declare function fuseAll(k: OcctKernelWasm, Module: OcctWasmModule, shapes: KernelShape[],
|
|
24
|
-
export declare function cutAll(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tools: KernelShape[],
|
|
54
|
+
export declare function fuseAll(k: OcctKernelWasm, Module: OcctWasmModule, shapes: KernelShape[], options?: BooleanOptions): KernelShape;
|
|
55
|
+
export declare function cutAll(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tools: KernelShape[], options?: BooleanOptions): KernelShape;
|
|
25
56
|
export declare function split(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tools: KernelShape[]): KernelShape;
|
|
26
57
|
export declare function checkBoolean(k: OcctKernelWasm, shape: KernelShape, tool: KernelShape, _op: BooleanOpType): CheckBooleanResult;
|
|
27
58
|
export declare function meshBoolean(_positionsA: number[], _indicesA: number[], _positionsB: number[], _indicesB: number[], _op: string, _tolerance: number): KernelMeshResult;
|
|
59
|
+
export {};
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { BooleanOptions, DiagnosticOperationResult, KernelShape, KernelType, OperationResult } from '../types.js';
|
|
2
2
|
import { OcctKernelWasm, OcctWasmModule } from './occtWasmTypes.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parse an EvolutionData result from the WASM kernel into a ShapeEvolution.
|
|
5
|
+
* The C++ facade returns flat vectors of [inputHash, count, out1, out2, ..., inputHash, count, ...].
|
|
6
|
+
*/
|
|
3
7
|
export declare function translateWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, x: number, y: number, z: number, inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
4
8
|
export declare function rotateWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, angle: number, inputFaceHashes: number[], hashUpperBound: number, axis?: readonly [number, number, number], center?: readonly [number, number, number]): OperationResult;
|
|
5
9
|
export declare function mirrorWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, origin: readonly [number, number, number], normal: readonly [number, number, number], inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
6
10
|
export declare function scaleWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, center: readonly [number, number, number], factor: number, inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
7
11
|
export declare function generalTransformWithHistory(generalTransformFn: (shape: KernelShape, linear: readonly [number, number, number, number, number, number, number, number, number], translation: readonly [number, number, number], isOrthogonal: boolean) => KernelShape, shape: KernelShape, linear: readonly [number, number, number, number, number, number, number, number, number], translation: readonly [number, number, number], isOrthogonal: boolean, inputFaceHashes: number[]): OperationResult;
|
|
8
|
-
export declare function fuseWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number,
|
|
9
|
-
export declare function cutWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number,
|
|
10
|
-
export declare function intersectWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number,
|
|
12
|
+
export declare function fuseWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
13
|
+
export declare function cutWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
14
|
+
export declare function intersectWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tool: KernelShape, inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
15
|
+
/** N-way fuse with face history over every input. Needs `booleanOp`. */
|
|
16
|
+
export declare function fuseAllWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shapes: KernelShape[], inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
17
|
+
/** N-way cut with face history over the base and every tool. Needs `booleanOp`. */
|
|
18
|
+
export declare function cutAllWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, tools: KernelShape[], inputFaceHashes: number[], hashUpperBound: number, options?: BooleanOptions): DiagnosticOperationResult;
|
|
11
19
|
export declare function filletWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, edges: KernelShape[], radius: number | [number, number] | ((edge: KernelShape) => number | [number, number]), inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
12
20
|
export declare function chamferWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, edges: KernelShape[], distance: number | [number, number] | ((edge: KernelShape) => number | [number, number]), inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
13
21
|
export declare function shellWithHistory(k: OcctKernelWasm, Module: OcctWasmModule, shape: KernelShape, faces: KernelShape[], thickness: number, inputFaceHashes: number[], hashUpperBound: number, tolerance?: number): OperationResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KernelShape, ShapeType } from '../types.js';
|
|
2
|
-
import { OcctWasmHandle, OcctWasmModule, OcctKernelWasm, EmVectorUint32, EmVectorInt, EmVectorDouble } from './occtWasmTypes.js';
|
|
1
|
+
import { KernelShape, ShapeEvolution, ShapeType } from '../types.js';
|
|
2
|
+
import { EmEvolutionData, OcctWasmHandle, OcctWasmModule, OcctKernelWasm, EmVectorUint32, EmVectorInt, EmVectorDouble } from './occtWasmTypes.js';
|
|
3
3
|
export declare const noop: () => void;
|
|
4
4
|
/** Build an opaque kernel handle for an arena-allocated WASM shape. */
|
|
5
5
|
export declare function handle(type: ShapeType, id: number): OcctWasmHandle;
|
|
@@ -29,3 +29,8 @@ export declare function resolveUniformRadius(edges: KernelShape[], radius: numbe
|
|
|
29
29
|
* Used by primitives whose creation API only takes a Z-aligned form.
|
|
30
30
|
*/
|
|
31
31
|
export declare function rotateZToDirection(k: OcctKernelWasm, shapeId: number, dir: [number, number, number]): number;
|
|
32
|
+
/** Read an evolution result into a shape id and maps, releasing the Embind object. */
|
|
33
|
+
export declare function parseEvolution(evo: EmEvolutionData): {
|
|
34
|
+
id: number;
|
|
35
|
+
evolution: ShapeEvolution;
|
|
36
|
+
};
|
|
@@ -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-D6-CUP2V.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
@@ -26,6 +26,10 @@ export declare class OcctWasmAdapter implements KernelAdapter {
|
|
|
26
26
|
private readonly Module;
|
|
27
27
|
private readonly k;
|
|
28
28
|
private readonly owner;
|
|
29
|
+
/** Present when this occt-wasm build has `booleanOp`. */
|
|
30
|
+
readonly fuseAllWithHistory?: KernelAdapter['fuseAllWithHistory'];
|
|
31
|
+
/** Present when this occt-wasm build has `booleanOp`. */
|
|
32
|
+
readonly cutAllWithHistory?: KernelAdapter['cutAllWithHistory'];
|
|
29
33
|
constructor(module: OcctWasmModule, kernel: OcctKernelWasm, owner?: OcctKernelOwner);
|
|
30
34
|
/**
|
|
31
35
|
* Build an adapter from occt-wasm's `OcctKernel` wrapper, retaining it for the
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-
|
|
1
|
+
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-BYziKlFk.js";
|
|
2
2
|
export { OcctWasmAdapter };
|
|
@@ -136,6 +136,8 @@ export interface OcctKernelWasm {
|
|
|
136
136
|
section(a: number, b: number): number;
|
|
137
137
|
fuseAll(shapeIds: EmVectorUint32): number;
|
|
138
138
|
cutAll(shapeId: number, toolIds: EmVectorUint32): number;
|
|
139
|
+
/** General boolean with glue, fuzzy, simplify and n-way history (occt-wasm 5.6+). */
|
|
140
|
+
booleanOp?(opCode: number, argIds: EmVectorUint32, toolIds: EmVectorUint32, glue: number, fuzzyValue: number, simplifyAngularTolerance: number, inputFaceHashes: EmVectorInt, hashUpperBound: number): EmEvolutionData;
|
|
139
141
|
split(shapeId: number, toolIds: EmVectorUint32): number;
|
|
140
142
|
extrude(shapeId: number, dx: number, dy: number, dz: number): number;
|
|
141
143
|
revolve(shapeId: number, px: number, py: number, pz: number, dx: number, dy: number, dz: number, angleRad: number): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwrDUQPZ.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.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-B_ogF-B7.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-CTn8i3lY.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { c as vecLength, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwrDUQPZ.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-YGvGdGCr.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DeJ6KX-t.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-B_ogF-B7.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { T as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { T as kernelCallRaw } from "./topologyQueryFns-DPrHRCrr.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-DCmUSP5s.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-Cxk116Fv.cjs");
|
|
3
3
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
4
4
|
exports.measureArea = require_measureFns.measureArea;
|
|
5
5
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-HcH4fJJE.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-B_ogF-B7.js";
|
|
2
2
|
import { E as ok, g as err, r as ioError } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { t as getFaceOrigins } from "./originTrackingFns-
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-DPrHRCrr.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-B_VM7fiP.js";
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwrDUQPZ.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-YGvGdGCr.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-PUTN7amf.cjs");
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|