brepjs 18.100.1 → 18.100.3
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/README.md +6 -0
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-BhCha_8H.cjs → blueprint-1x01ITBT.cjs} +7 -7
- package/dist/{blueprint-Bqmxcyfd.js → blueprint-DZB6Drrd.js} +7 -7
- package/dist/{blueprintFns-DKmyNVyL.cjs → blueprintFns-DkmuKpz6.cjs} +2 -2
- package/dist/{blueprintFns-_emMJGKf.js → blueprintFns-o4dhTIZQ.js} +2 -2
- package/dist/{blueprintSketcher-DwL9iPAG.cjs → blueprintSketcher-BoHwuwaU.cjs} +3 -3
- package/dist/{blueprintSketcher-B5XBXgri.js → blueprintSketcher-C5Q-JLEK.js} +3 -3
- package/dist/{boolean2D-BJ6MwGgV.cjs → boolean2D-C1Akp29q.cjs} +4 -4
- package/dist/{boolean2D-DiQyJiA-.js → boolean2D-DV642GXt.js} +4 -4
- package/dist/brepjs.cjs +26 -26
- package/dist/brepjs.js +26 -26
- package/dist/{cameraFns-BjcKjYpw.cjs → cameraFns-B-T9D-ie.cjs} +2 -2
- package/dist/{cameraFns-BCLtAeFB.js → cameraFns-B62EdiYs.js} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-B-zZ2G9-.js → cornerFinder-Bmjk2BOw.js} +1 -1
- package/dist/{cornerFinder-DyYE74wI.cjs → cornerFinder-CqSNuWBI.cjs} +1 -1
- package/dist/{curveFns-DwBW-FmM.cjs → curveFns-BIlzT4bO.cjs} +1 -1
- package/dist/{curveFns-BKpLwUdG.js → curveFns-CaEoZJFJ.js} +1 -1
- package/dist/{drawFns-SFAjbxKc.js → drawFns-BVVGRW0h.js} +12 -12
- package/dist/{drawFns-BDPAuKxN.cjs → drawFns-Dwq6JHbb.cjs} +12 -12
- package/dist/{faceFns-DrBS1FKx.cjs → faceFns-B7yceDjt.cjs} +4 -4
- package/dist/{faceFns-B642NCgD.js → faceFns-CFvc_qXI.js} +4 -4
- package/dist/{healingFns-CWicvCr2.js → healingFns-BY6Q9gge.js} +5 -5
- package/dist/{healingFns-CA_Pxs_R.cjs → healingFns-CEzX-45q.cjs} +5 -5
- package/dist/{helpers-BVwuuo7f.cjs → helpers-A0a3O6af.cjs} +6 -6
- package/dist/{helpers-VUDxsMV6.js → helpers-BamnXOMX.js} +6 -6
- package/dist/{importFns-CPEC-mu2.js → importFns-Cfe_tEh_.js} +8 -8
- package/dist/{importFns-D7CBrzdj.cjs → importFns-Dj107tFY.cjs} +8 -8
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +14 -6
- package/dist/{loftFns-BG5aCsSy.cjs → loftFns-CFyOO359.cjs} +1 -1
- package/dist/{loftFns-6LL25A5A.js → loftFns-D5rQxNOI.js} +1 -1
- package/dist/{measureFns-o-fR5CV_.js → measureFns-Bb0Do7in.js} +3 -3
- package/dist/{measureFns-CMzOaAYQ.cjs → measureFns-Cmc_y0WE.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-DoqRG8XQ.cjs → meshFns-BKBGgLB4.cjs} +3 -3
- package/dist/{meshFns-k2Bsp0Xp.js → meshFns-Bkcg1u5D.js} +3 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-jeA2auqw.cjs → primitiveFns-B898KlXM.cjs} +4 -4
- package/dist/{primitiveFns-CPbjoGeA.js → primitiveFns-DS7-3evP.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/{shapeFns-eQx9e6lo.cjs → shapeFns-B3GP-0FJ.cjs} +2 -2
- package/dist/{shapeFns-FrRtxWiz.js → shapeFns-D-4StVDd.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-D1WVYLvG.cjs → shapeRefFns-C6L7KhTi.cjs} +4 -4
- package/dist/{shapeRefFns-C2oR3Cid.js → shapeRefFns-DzVlxDhd.js} +4 -4
- package/dist/{shapeTypes-DplVM8Fy.cjs → shapeTypes-DQfoZt_L.cjs} +32 -0
- package/dist/{shapeTypes-D9XYNPBs.js → shapeTypes-z5bfGPVI.js} +32 -0
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-CxJJkiPi.js → solidBuilders-8H08aDto.js} +5 -5
- package/dist/{solidBuilders-DI4CSKe-.cjs → solidBuilders-B0Uyvvyy.cjs} +5 -5
- package/dist/{surfaceBuilders-Cf3c00zK.js → surfaceBuilders-BYopOndo.js} +10 -10
- package/dist/{surfaceBuilders-CDrFrFBH.cjs → surfaceBuilders-zGpnLDxz.cjs} +10 -10
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-ypK-L96F.cjs → textBlueprints-B8cDsSHe.cjs} +7 -7
- package/dist/{textBlueprints-DbLlIr5s.js → textBlueprints-ziKppdNm.js} +7 -7
- package/dist/{textMetrics-CMXyoBtR.cjs → textMetrics-B8qEy3dh.cjs} +1 -1
- package/dist/{textMetrics-BWST-GMU.js → textMetrics-CP-jrZ98.js} +1 -1
- package/dist/{threadFns-BcgGRuMg.js → threadFns-7jlwHbES.js} +6 -6
- package/dist/{threadFns-CvjUrsgG.cjs → threadFns-B_8tna0V.cjs} +6 -6
- package/dist/topology.cjs +8 -8
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-Dzw_tis6.cjs → topologyQueryFns-BLkQkExs.cjs} +1 -1
- package/dist/{topologyQueryFns-jDWO6A94.js → topologyQueryFns-De27Nxmf.js} +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BLkQkExs.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-B7yceDjt.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-B3GP-0FJ.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_solidBuilders = require("./solidBuilders-B0Uyvvyy.cjs");
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BLkQkExs.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-B7yceDjt.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-B3GP-0FJ.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-BIlzT4bO.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-Cmc_y0WE.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 { Z as getKernel, p as isFace } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, p as isFace } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-De27Nxmf.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-CFvc_qXI.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-D-4StVDd.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-CaEoZJFJ.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-Bb0Do7in.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 { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-DZB6Drrd.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) {
|
|
@@ -1295,8 +1295,8 @@ async function importSTEP(blob) {
|
|
|
1295
1295
|
const shapes = getKernel().importSTEP(data);
|
|
1296
1296
|
if (shapes.length === 0) return err(ioError("STEP_IMPORT_FAILED", "STEP file contains no valid geometry"));
|
|
1297
1297
|
return ok(castShape(shapes[0]));
|
|
1298
|
-
} catch {
|
|
1299
|
-
return err(ioError("STEP_IMPORT_FAILED", "Failed to load STEP file"));
|
|
1298
|
+
} catch (e) {
|
|
1299
|
+
return err(ioError("STEP_IMPORT_FAILED", "Failed to load STEP file", e));
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
1302
|
/**
|
|
@@ -1321,8 +1321,8 @@ async function importSTL(blob) {
|
|
|
1321
1321
|
const shape = getKernel().importSTL(data);
|
|
1322
1322
|
if (shape.IsNull()) return err(ioError("STL_IMPORT_FAILED", "Failed to create solid from STL mesh"));
|
|
1323
1323
|
return ok(castShape(shape));
|
|
1324
|
-
} catch {
|
|
1325
|
-
return err(ioError("STL_IMPORT_FAILED", "Failed to load STL file"));
|
|
1324
|
+
} catch (e) {
|
|
1325
|
+
return err(ioError("STL_IMPORT_FAILED", "Failed to load STL file", e));
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
/**
|
|
@@ -1344,8 +1344,8 @@ async function importIGES(blob) {
|
|
|
1344
1344
|
const shapes = getKernel().importIGES(data);
|
|
1345
1345
|
if (shapes.length === 0) return err(ioError("IGES_IMPORT_FAILED", "IGES file contains no valid geometry"));
|
|
1346
1346
|
return ok(castShape(shapes[0]));
|
|
1347
|
-
} catch {
|
|
1348
|
-
return err(ioError("IGES_IMPORT_FAILED", "Failed to load IGES file"));
|
|
1347
|
+
} catch (e) {
|
|
1348
|
+
return err(ioError("IGES_IMPORT_FAILED", "Failed to load IGES file", e));
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-1x01ITBT.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) {
|
|
@@ -1295,8 +1295,8 @@ async function importSTEP(blob) {
|
|
|
1295
1295
|
const shapes = require_shapeTypes.getKernel().importSTEP(data);
|
|
1296
1296
|
if (shapes.length === 0) return require_errors.err(require_errors.ioError("STEP_IMPORT_FAILED", "STEP file contains no valid geometry"));
|
|
1297
1297
|
return require_errors.ok(require_shapeTypes.castShape(shapes[0]));
|
|
1298
|
-
} catch {
|
|
1299
|
-
return require_errors.err(require_errors.ioError("STEP_IMPORT_FAILED", "Failed to load STEP file"));
|
|
1298
|
+
} catch (e) {
|
|
1299
|
+
return require_errors.err(require_errors.ioError("STEP_IMPORT_FAILED", "Failed to load STEP file", e));
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
1302
|
/**
|
|
@@ -1321,8 +1321,8 @@ async function importSTL(blob) {
|
|
|
1321
1321
|
const shape = require_shapeTypes.getKernel().importSTL(data);
|
|
1322
1322
|
if (shape.IsNull()) return require_errors.err(require_errors.ioError("STL_IMPORT_FAILED", "Failed to create solid from STL mesh"));
|
|
1323
1323
|
return require_errors.ok(require_shapeTypes.castShape(shape));
|
|
1324
|
-
} catch {
|
|
1325
|
-
return require_errors.err(require_errors.ioError("STL_IMPORT_FAILED", "Failed to load STL file"));
|
|
1324
|
+
} catch (e) {
|
|
1325
|
+
return require_errors.err(require_errors.ioError("STL_IMPORT_FAILED", "Failed to load STL file", e));
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
/**
|
|
@@ -1344,8 +1344,8 @@ async function importIGES(blob) {
|
|
|
1344
1344
|
const shapes = require_shapeTypes.getKernel().importIGES(data);
|
|
1345
1345
|
if (shapes.length === 0) return require_errors.err(require_errors.ioError("IGES_IMPORT_FAILED", "IGES file contains no valid geometry"));
|
|
1346
1346
|
return require_errors.ok(require_shapeTypes.castShape(shapes[0]));
|
|
1347
|
-
} catch {
|
|
1348
|
-
return require_errors.err(require_errors.ioError("IGES_IMPORT_FAILED", "Failed to load IGES file"));
|
|
1347
|
+
} catch (e) {
|
|
1348
|
+
return require_errors.err(require_errors.ioError("IGES_IMPORT_FAILED", "Failed to load IGES file", e));
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
//#endregion
|
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-BKBGgLB4.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-Dj107tFY.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-Bkcg1u5D.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-Cfe_tEh_.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type-safe interface for the brepkit WASM kernel (`BrepKernel`).
|
|
3
3
|
*
|
|
4
4
|
* AUTO-GENERATED by `npm run sync:brepkit-types`.
|
|
5
|
-
* Synced against `brepkit-wasm@2.
|
|
5
|
+
* Synced against `brepkit-wasm@2.115.8`.
|
|
6
6
|
*
|
|
7
7
|
* Methods not yet referenced in the adapter layer are tagged `@unwired`.
|
|
8
8
|
*
|
|
@@ -295,9 +295,13 @@ export interface BrepkitKernel {
|
|
|
295
295
|
convertToElementary(solid: number): number;
|
|
296
296
|
copyFace(face: number): number;
|
|
297
297
|
/** @unwired */
|
|
298
|
+
deserializeSolid(data: Uint8Array): number;
|
|
299
|
+
/** @unwired */
|
|
298
300
|
detectCoincidentFaces(a: number, b: number): string;
|
|
299
301
|
/** @unwired */
|
|
300
302
|
filletWithEvolution(solid: number, edgeHandles: Uint32Array | number[], radius: number): string;
|
|
303
|
+
/** @unwired */
|
|
304
|
+
fuseAll(solidHandles: Uint32Array | number[]): number;
|
|
301
305
|
getNurbsCurveData(edge: number): string;
|
|
302
306
|
/** @unwired */
|
|
303
307
|
getNurbsSurfaceData(face: number): string;
|
|
@@ -308,6 +312,8 @@ export interface BrepkitKernel {
|
|
|
308
312
|
makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
|
|
309
313
|
/** @unwired */
|
|
310
314
|
makeCircleEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, rx: number, ry: number, rz: number): number;
|
|
315
|
+
/** @unwired */
|
|
316
|
+
makeEllipseArc3d(startX: number, startY: number, startZ: number, endX: number, endY: number, endZ: number, centerX: number, centerY: number, centerZ: number, axisX: number, axisY: number, axisZ: number, refX: number, refY: number, refZ: number, semiMajor: number, semiMinor: number): number;
|
|
311
317
|
makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number): number;
|
|
312
318
|
makeEllipseEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number, rx: number, ry: number, rz: number): number;
|
|
313
319
|
makePlanarFaceFromWire(wire: number): number;
|
|
@@ -318,19 +324,21 @@ export interface BrepkitKernel {
|
|
|
318
324
|
offsetWire2DWithJoin(wire: number, distance: number, joinType: string): number;
|
|
319
325
|
projectEdges(solid: number, originX: number, originY: number, originZ: number, dirX: number, dirY: number, dirZ: number, xAxisX: number, xAxisY: number, xAxisZ: number, hiddenLines: boolean, deflection: number): string;
|
|
320
326
|
/** @unwired */
|
|
327
|
+
serializeSolid(solid: number): Uint8Array;
|
|
328
|
+
/** @unwired */
|
|
321
329
|
sketchAddCircle(sketch: number, centerIdx: number, radius: number): number;
|
|
322
330
|
/** @unwired */
|
|
323
331
|
toBrepJson(solid: number): string;
|
|
324
332
|
transformFace(face: number, matrix: Float64Array | number[]): void;
|
|
325
|
-
/** @future Not in brepkit-wasm 2.
|
|
333
|
+
/** @future Not in brepkit-wasm 2.115.8. Referenced with feature detection in adapter. */
|
|
326
334
|
chamferAsymmetric?(solid: number, edgeHandles: Uint32Array | number[], d1: number, d2: number): number;
|
|
327
|
-
/** @future Not in brepkit-wasm 2.
|
|
335
|
+
/** @future Not in brepkit-wasm 2.115.8. Referenced with feature detection in adapter. */
|
|
328
336
|
compoundFuse?(solidIds: Uint32Array | number[]): number;
|
|
329
|
-
/** @future Not in brepkit-wasm 2.
|
|
337
|
+
/** @future Not in brepkit-wasm 2.115.8. Referenced with feature detection in adapter. */
|
|
330
338
|
copyEdge?(edge: number): number;
|
|
331
|
-
/** @future Not in brepkit-wasm 2.
|
|
339
|
+
/** @future Not in brepkit-wasm 2.115.8. Referenced with feature detection in adapter. */
|
|
332
340
|
transformEdge?(edge: number, matrix: Float64Array | number[]): void;
|
|
333
|
-
/** @future Not in brepkit-wasm 2.
|
|
341
|
+
/** @future Not in brepkit-wasm 2.115.8. Referenced with feature detection in adapter. */
|
|
334
342
|
validateSolidDetails?(solid: number): string;
|
|
335
343
|
/** Release the entire arena. */
|
|
336
344
|
free(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.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 { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Z as getKernel } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { w as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { w as kernelCallRaw } from "./topologyQueryFns-De27Nxmf.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-CFvc_qXI.js";
|
|
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
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BLkQkExs.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-B7yceDjt.cjs");
|
|
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-Cmc_y0WE.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-Bb0Do7in.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BLkQkExs.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-B3GP-0FJ.cjs");
|
|
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
|
-
import { Z as getKernel, gt as qualityDeflection } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, gt as qualityDeflection } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { A as ok, b as err, r as ioError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { O as getFaceOrigins } from "./shapeFns-
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-De27Nxmf.js";
|
|
4
|
+
import { O as getFaceOrigins } from "./shapeFns-D-4StVDd.js";
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
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-B_8tna0V.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-CFyOO359.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 findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as gridPattern, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, O as prismaticJoint, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ 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, q as exportAssemblySTEP, 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 createAssemblyNode } from "./threadFns-
|
|
2
|
-
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as gridPattern, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, O as prismaticJoint, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ 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, q as exportAssemblySTEP, 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 createAssemblyNode } from "./threadFns-7jlwHbES.js";
|
|
2
|
+
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-D5rQxNOI.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,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
4
|
+
const require_shapeFns = require("./shapeFns-B3GP-0FJ.cjs");
|
|
5
|
+
const require_surfaceBuilders = require("./surfaceBuilders-zGpnLDxz.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-B0Uyvvyy.cjs");
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Z as getKernel, c as createSolid, x as isClosedWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, c as createSolid, x as isClosedWire } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
|
-
import { h as translate } from "./shapeFns-
|
|
5
|
-
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-
|
|
4
|
+
import { h as translate } from "./shapeFns-D-4StVDd.js";
|
|
5
|
+
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-BYopOndo.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-8H08aDto.js";
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-B-T9D-ie.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-B62EdiYs.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-A0a3O6af.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CqSNuWBI.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BamnXOMX.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-Bmjk2BOw.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BLkQkExs.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-
|
|
3
|
+
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-De27Nxmf.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
2
|
+
const require_shapeRefFns = require("./shapeRefFns-C6L7KhTi.cjs");
|
|
3
3
|
exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_shapeRefFns.captureHint;
|
|
5
5
|
exports.createRef = require_shapeRefFns.createRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
1
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-DzVlxDhd.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BLkQkExs.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-B7yceDjt.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-B3GP-0FJ.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-Cmc_y0WE.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea } from "./measureFns-
|
|
2
|
+
import { c as getFaces } from "./topologyQueryFns-De27Nxmf.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-CFvc_qXI.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-D-4StVDd.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-Bb0Do7in.js";
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -9152,6 +9152,38 @@ function liftCurve2dToPlane(bk, curve, origin, planeZ, planeX) {
|
|
|
9152
9152
|
if (edgeIds.length === 1) return edgeHandle(require_vec3.wasmIndex(edgeIds, 0));
|
|
9153
9153
|
return wireHandle(bk.makeWire(edgeIds, false));
|
|
9154
9154
|
}
|
|
9155
|
+
if (basis.__bk2d === "ellipse") {
|
|
9156
|
+
const ell = basis;
|
|
9157
|
+
const center3d = lift(ell.cx, ell.cy);
|
|
9158
|
+
const cosA = Math.cos(ell.xDirAngle);
|
|
9159
|
+
const sinA = Math.sin(ell.xDirAngle);
|
|
9160
|
+
const refDir = [
|
|
9161
|
+
cosA * planeX[0] + sinA * y[0],
|
|
9162
|
+
cosA * planeX[1] + sinA * y[1],
|
|
9163
|
+
cosA * planeX[2] + sinA * y[2]
|
|
9164
|
+
];
|
|
9165
|
+
const bounds = require_occtWasmAdapter.curveBounds(c);
|
|
9166
|
+
const span = bounds.last - bounds.first;
|
|
9167
|
+
const eps = span * 1e-4;
|
|
9168
|
+
const [p0u, p0v] = require_occtWasmAdapter.evaluateCurve2d(c, bounds.first);
|
|
9169
|
+
const [p1u, p1v] = require_occtWasmAdapter.evaluateCurve2d(c, bounds.first + eps);
|
|
9170
|
+
const axis = (p0u - ell.cx) * (p1v - ell.cy) - (p0v - ell.cy) * (p1u - ell.cx) >= 0 ? planeZ : [
|
|
9171
|
+
-planeZ[0],
|
|
9172
|
+
-planeZ[1],
|
|
9173
|
+
-planeZ[2]
|
|
9174
|
+
];
|
|
9175
|
+
const angularSpan = c.__bk2d === "trimmed" ? Math.abs(c.tEnd - c.tStart) : 2 * Math.PI;
|
|
9176
|
+
const nSegments = angularSpan > Math.PI ? 4 : angularSpan > Math.PI / 2 ? 2 : 1;
|
|
9177
|
+
const segmentSpan = span / nSegments;
|
|
9178
|
+
const edgeIds = [];
|
|
9179
|
+
for (let seg = 0; seg < nSegments; seg++) {
|
|
9180
|
+
const [su, sv] = require_occtWasmAdapter.evaluateCurve2d(c, bounds.first + seg * segmentSpan);
|
|
9181
|
+
const [eu, ev] = require_occtWasmAdapter.evaluateCurve2d(c, bounds.first + (seg + 1) * segmentSpan);
|
|
9182
|
+
edgeIds.push(bk.makeEllipseArc3d(...lift(su, sv), ...lift(eu, ev), ...center3d, ...axis, ...refDir, ell.majorRadius, ell.minorRadius));
|
|
9183
|
+
}
|
|
9184
|
+
if (edgeIds.length === 1) return edgeHandle(require_vec3.wasmIndex(edgeIds, 0));
|
|
9185
|
+
return wireHandle(bk.makeWire(edgeIds, false));
|
|
9186
|
+
}
|
|
9155
9187
|
}
|
|
9156
9188
|
if (c.__bk2d === "bezier" || c.__bk2d === "bspline") {
|
|
9157
9189
|
const points3d = c.poles.map(([u, v]) => lift(u, v));
|
|
@@ -9146,6 +9146,38 @@ function liftCurve2dToPlane(bk, curve, origin, planeZ, planeX) {
|
|
|
9146
9146
|
if (edgeIds.length === 1) return edgeHandle(wasmIndex(edgeIds, 0));
|
|
9147
9147
|
return wireHandle(bk.makeWire(edgeIds, false));
|
|
9148
9148
|
}
|
|
9149
|
+
if (basis.__bk2d === "ellipse") {
|
|
9150
|
+
const ell = basis;
|
|
9151
|
+
const center3d = lift(ell.cx, ell.cy);
|
|
9152
|
+
const cosA = Math.cos(ell.xDirAngle);
|
|
9153
|
+
const sinA = Math.sin(ell.xDirAngle);
|
|
9154
|
+
const refDir = [
|
|
9155
|
+
cosA * planeX[0] + sinA * y[0],
|
|
9156
|
+
cosA * planeX[1] + sinA * y[1],
|
|
9157
|
+
cosA * planeX[2] + sinA * y[2]
|
|
9158
|
+
];
|
|
9159
|
+
const bounds = curveBounds(c);
|
|
9160
|
+
const span = bounds.last - bounds.first;
|
|
9161
|
+
const eps = span * 1e-4;
|
|
9162
|
+
const [p0u, p0v] = evaluateCurve2d$2(c, bounds.first);
|
|
9163
|
+
const [p1u, p1v] = evaluateCurve2d$2(c, bounds.first + eps);
|
|
9164
|
+
const axis = (p0u - ell.cx) * (p1v - ell.cy) - (p0v - ell.cy) * (p1u - ell.cx) >= 0 ? planeZ : [
|
|
9165
|
+
-planeZ[0],
|
|
9166
|
+
-planeZ[1],
|
|
9167
|
+
-planeZ[2]
|
|
9168
|
+
];
|
|
9169
|
+
const angularSpan = c.__bk2d === "trimmed" ? Math.abs(c.tEnd - c.tStart) : 2 * Math.PI;
|
|
9170
|
+
const nSegments = angularSpan > Math.PI ? 4 : angularSpan > Math.PI / 2 ? 2 : 1;
|
|
9171
|
+
const segmentSpan = span / nSegments;
|
|
9172
|
+
const edgeIds = [];
|
|
9173
|
+
for (let seg = 0; seg < nSegments; seg++) {
|
|
9174
|
+
const [su, sv] = evaluateCurve2d$2(c, bounds.first + seg * segmentSpan);
|
|
9175
|
+
const [eu, ev] = evaluateCurve2d$2(c, bounds.first + (seg + 1) * segmentSpan);
|
|
9176
|
+
edgeIds.push(bk.makeEllipseArc3d(...lift(su, sv), ...lift(eu, ev), ...center3d, ...axis, ...refDir, ell.majorRadius, ell.minorRadius));
|
|
9177
|
+
}
|
|
9178
|
+
if (edgeIds.length === 1) return edgeHandle(wasmIndex(edgeIds, 0));
|
|
9179
|
+
return wireHandle(bk.makeWire(edgeIds, false));
|
|
9180
|
+
}
|
|
9149
9181
|
}
|
|
9150
9182
|
if (c.__bk2d === "bezier" || c.__bk2d === "bspline") {
|
|
9151
9183
|
const points3d = c.poles.map(([u, v]) => lift(u, v));
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
4
|
-
const require_drawFns = require("./drawFns-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-B8cDsSHe.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BoHwuwaU.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-Dwq6JHbb.cjs");
|
|
5
5
|
//#region src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-C5Q-JLEK.js";
|
|
2
|
+
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-BVVGRW0h.js";
|
|
3
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-ziKppdNm.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-z5bfGPVI.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-De27Nxmf.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
7
|
-
import { _ as cast, v as downcast } from "./faceFns-
|
|
8
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-
|
|
7
|
+
import { _ as cast, v as downcast } from "./faceFns-CFvc_qXI.js";
|
|
8
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-D-4StVDd.js";
|
|
9
9
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
10
|
+
import { r as makeFace } from "./surfaceBuilders-BYopOndo.js";
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DQfoZt_L.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BLkQkExs.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_shapeFns = require("./shapeFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-B7yceDjt.cjs");
|
|
8
|
+
const require_shapeFns = require("./shapeFns-B3GP-0FJ.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-zGpnLDxz.cjs");
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|