brepjs 18.5.3 → 18.6.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 +5 -5
- package/dist/2d.js +5 -5
- package/dist/{blueprint-DXNeal2M.js → blueprint-BCoJbaQN.js} +5 -5
- package/dist/{blueprint-BKo2Z5P_.cjs → blueprint-CscZ0-wr.cjs} +5 -5
- package/dist/{blueprintFns-DwKTTALX.js → blueprintFns-BZlx6BjG.js} +2 -2
- package/dist/{blueprintFns-DLmNAtH4.cjs → blueprintFns-DQP4KQHE.cjs} +2 -2
- package/dist/{boolean2D-C8DlibdA.js → boolean2D-JvgjbESt.js} +7 -7
- package/dist/{boolean2D-CvirfeVA.cjs → boolean2D-k1AJmCMp.cjs} +7 -7
- package/dist/{booleanFns-BvRK1Oi2.js → booleanFns-D13Pb-NO.js} +4 -4
- package/dist/{booleanFns-BTmOI2IT.cjs → booleanFns-DQW4lt7H.cjs} +4 -4
- package/dist/brepjs.cjs +19 -19
- package/dist/brepjs.js +19 -19
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-D3eGMa24.cjs → cornerFinder-5BYE2cbd.cjs} +1 -1
- package/dist/{cornerFinder-BwE0co98.js → cornerFinder-Zg7pf2s0.js} +1 -1
- package/dist/{curveFns-DOtvwQN1.js → curveFns-DhqUp0EI.js} +1 -1
- package/dist/{curveFns-CkhBj1Ot.cjs → curveFns-DrT54cm8.cjs} +1 -1
- package/dist/{drawFns-CFqr2BFZ.cjs → drawFns-DmP2o1oF.cjs} +10 -10
- package/dist/{drawFns-ChZrX59C.js → drawFns-lUXjhTYL.js} +10 -10
- package/dist/{extrudeFns-9m-r4epC.js → extrudeFns-B9bVCt3C.js} +1 -1
- package/dist/{extrudeFns-sFXnQ0GR.cjs → extrudeFns-BtblHdaJ.cjs} +1 -1
- package/dist/{faceFns-9yuvhlzD.cjs → faceFns-22idS-ht.cjs} +1 -1
- package/dist/{faceFns-CoVqCTcx.js → faceFns-NbWd8-iR.js} +1 -1
- package/dist/{helpers-BPqm4AyF.cjs → helpers-BpXNcxuJ.cjs} +5 -5
- package/dist/{helpers-thCB-5I7.js → helpers-S_Ht6gwX.js} +5 -5
- package/dist/{historyFns-DlyOFijD.js → historyFns-B01hrkcJ.js} +4 -4
- package/dist/{historyFns-C8RKuoZR.cjs → historyFns-RHO-QvEZ.cjs} +4 -4
- package/dist/{importFns-TsXZed73.js → importFns-C0tUyeiW.js} +2 -2
- package/dist/{importFns-C9KoV6Q2.cjs → importFns-CG49lyTm.cjs} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/constructionOps.d.ts +3 -2
- package/dist/kernel/brepkit/constructionOps.d.ts.map +1 -1
- package/dist/{measureFns-CkhDfqzu.js → measureFns-B8C85hbT.js} +2 -2
- package/dist/{measureFns-DXLTUwTN.cjs → measureFns-C751QGI1.cjs} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CAUI3r1d.js → meshFns-BgvsA-xA.js} +2 -2
- package/dist/{meshFns-DzGr_wxJ.cjs → meshFns-Cdhtbrhm.cjs} +2 -2
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-ClBrBsj6.cjs → primitiveFns-BLxaJ40A.cjs} +5 -5
- package/dist/{primitiveFns-DEIibX8G.js → primitiveFns-fR9sWOEb.js} +5 -5
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-c2eak2sT.cjs → shapeFns-183zCtMc.cjs} +2 -2
- package/dist/{shapeFns-Cwt0CMNm.js → shapeFns-2X3VOi1a.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-D-JLpn7D.cjs → shapeRefFns-CFyv5cdW.cjs} +3 -3
- package/dist/{shapeRefFns-Cx61pDhQ.js → shapeRefFns-CU1Jwq9C.js} +3 -3
- package/dist/{shapeTypes-Xnk670Cd.cjs → shapeTypes-C0MDggKf.cjs} +61 -49
- package/dist/{shapeTypes-uibK1QHY.js → shapeTypes-CN0GUoHr.js} +61 -49
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{solidBuilders-BnTtq4g1.js → solidBuilders-BuS5ByIl.js} +2 -2
- package/dist/{solidBuilders-23LDxzEn.cjs → solidBuilders-DACzFqvX.cjs} +2 -2
- package/dist/{surfaceBuilders-DeNnAJb3.js → surfaceBuilders-BVH2SL-z.js} +2 -2
- package/dist/{surfaceBuilders-CUn-cmah.cjs → surfaceBuilders-CbH4FIW5.cjs} +2 -2
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/dist/utils/vec3.d.ts +24 -0
- package/dist/utils/vec3.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BrepkitKernel } from './brepkitWasmTypes.js';
|
|
2
2
|
import { KernelShape, KernelType } from '../types.js';
|
|
3
|
+
import { Vec3 } from '../../utils/vec3.js';
|
|
3
4
|
export declare function makeVertex(bk: BrepkitKernel, x: number, y: number, z: number): KernelShape;
|
|
4
5
|
export declare function makeEdge(bk: BrepkitKernel, curve: KernelType, start?: number, end?: number): KernelShape;
|
|
5
6
|
export declare function makeWire(bk: BrepkitKernel, edges: KernelShape[]): KernelShape;
|
|
@@ -11,7 +12,7 @@ export declare function makeSphere(bk: BrepkitKernel, radius: number, center?: [
|
|
|
11
12
|
export declare function makeCone(bk: BrepkitKernel, radius1: number, radius2: number, height: number, center?: [number, number, number], direction?: [number, number, number]): KernelShape;
|
|
12
13
|
export declare function makeTorus(bk: BrepkitKernel, majorRadius: number, minorRadius: number, center?: [number, number, number], direction?: [number, number, number]): KernelShape;
|
|
13
14
|
export declare function makeEllipsoid(bk: BrepkitKernel, aLength: number, bLength: number, cLength: number): KernelShape;
|
|
14
|
-
export declare function makeLineEdge(bk: BrepkitKernel, p1:
|
|
15
|
+
export declare function makeLineEdge(bk: BrepkitKernel, p1: Vec3, p2: Vec3): KernelShape;
|
|
15
16
|
export declare function makeCircleEdge(bk: BrepkitKernel, center: [number, number, number], normal: [number, number, number], radius: number): KernelShape;
|
|
16
17
|
export declare function makeCircleArc(bk: BrepkitKernel, center: [number, number, number], normal: [number, number, number], radius: number, startAngle: number, endAngle: number): KernelShape;
|
|
17
18
|
/**
|
|
@@ -35,7 +36,7 @@ export declare function removeHolesFromFace(bk: BrepkitKernel, face: KernelShape
|
|
|
35
36
|
export declare function makeFaceOnSurface(bk: BrepkitKernel, _surface: KernelType, wire: KernelShape): KernelShape;
|
|
36
37
|
export declare function bsplineSurface(bk: BrepkitKernel, points: [number, number, number][], rows: number, cols: number): KernelShape;
|
|
37
38
|
export declare function triangulatedSurface(bk: BrepkitKernel, points: [number, number, number][], rows: number, cols: number): KernelShape;
|
|
38
|
-
export declare function buildTriFace(bk: BrepkitKernel, a:
|
|
39
|
+
export declare function buildTriFace(bk: BrepkitKernel, a: Vec3, b: Vec3, c: Vec3): KernelShape | null;
|
|
39
40
|
export declare function sewAndSolidify(bk: BrepkitKernel, faces: KernelShape[], tolerance: number): KernelShape;
|
|
40
41
|
export declare function interpolatePoints(bk: BrepkitKernel, points: [number, number, number][], options?: {
|
|
41
42
|
periodic?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructionOps.d.ts","sourceRoot":"","sources":["../../../src/kernel/brepkit/constructionOps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"constructionOps.d.ts","sourceRoot":"","sources":["../../../src/kernel/brepkit/constructionOps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,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AAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,CAAC,EAAE,MAAM,EACX,EAAE,CAAC,EAAE,MAAM,EACX,EAAE,CAAC,EAAE,MAAM,GACV,UAAU,CAMZ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { X as getKernel } from "./shapeTypes-
|
|
1
|
+
import { X as getKernel } from "./shapeTypes-CN0GUoHr.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DboJwVCf.js";
|
|
3
|
-
import { p as uvBounds, z as kernelCallRaw } from "./faceFns-
|
|
3
|
+
import { p as uvBounds, z as kernelCallRaw } from "./faceFns-NbWd8-iR.js";
|
|
4
4
|
//#region src/measurement/measureCache.ts
|
|
5
5
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
6
6
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0MDggKf.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-22idS-ht.cjs");
|
|
4
4
|
//#region src/measurement/measureCache.ts
|
|
5
5
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
6
6
|
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-C751QGI1.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-B8C85hbT.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { X as getKernel } from "./shapeTypes-
|
|
1
|
+
import { X as getKernel } from "./shapeTypes-CN0GUoHr.js";
|
|
2
2
|
import { A as ok, b as err, r as ioError } from "./errors-DboJwVCf.js";
|
|
3
|
-
import { O as getFaceOrigins } from "./shapeFns-
|
|
3
|
+
import { O as getFaceOrigins } from "./shapeFns-2X3VOi1a.js";
|
|
4
4
|
//#region src/topology/meshCache.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0MDggKf.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_shapeFns = require("./shapeFns-
|
|
3
|
+
const require_shapeFns = require("./shapeFns-183zCtMc.cjs");
|
|
4
4
|
//#region src/topology/meshCache.ts
|
|
5
5
|
/**
|
|
6
6
|
* 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_historyFns = require("./historyFns-
|
|
3
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
2
|
+
const require_historyFns = require("./historyFns-RHO-QvEZ.cjs");
|
|
3
|
+
const require_extrudeFns = require("./extrudeFns-BtblHdaJ.cjs");
|
|
4
4
|
exports.addChild = require_historyFns.addChild;
|
|
5
5
|
exports.addStep = require_historyFns.addStep;
|
|
6
6
|
exports.circularPattern = require_historyFns.circularPattern;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-
|
|
2
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-
|
|
1
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-B01hrkcJ.js";
|
|
2
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-B9bVCt3C.js";
|
|
3
3
|
export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0MDggKf.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-22idS-ht.cjs");
|
|
4
4
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
7
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-183zCtMc.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CbH4FIW5.cjs");
|
|
7
|
+
const require_solidBuilders = require("./solidBuilders-DACzFqvX.cjs");
|
|
8
8
|
//#region src/topology/threeHelpers.ts
|
|
9
9
|
/**
|
|
10
10
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { X as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { X as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-CN0GUoHr.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DboJwVCf.js";
|
|
3
|
-
import { N as downcast, S as getOrCreateCache, T as invalidateShapeCache, b as getEdges, v as getCachedIsValid, w as getWires, x as getFaces } from "./faceFns-
|
|
3
|
+
import { N as downcast, S as getOrCreateCache, T as invalidateShapeCache, b as getEdges, v as getCachedIsValid, w as getWires, x as getFaces } from "./faceFns-NbWd8-iR.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
5
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-
|
|
6
|
-
import { a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeEllipse, f as makeEllipseArc, g as makeThreePointArc, h as makeTangentArc, i as makeNewFaceWithinFace, l as makeBezierCurve, m as makeLine, o as makePolygon, p as makeHelix, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeCircle } from "./surfaceBuilders-
|
|
7
|
-
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-
|
|
5
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-2X3VOi1a.js";
|
|
6
|
+
import { a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeEllipse, f as makeEllipseArc, g as makeThreePointArc, h as makeTangentArc, i as makeNewFaceWithinFace, l as makeBezierCurve, m as makeLine, o as makePolygon, p as makeHelix, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeCircle } from "./surfaceBuilders-BVH2SL-z.js";
|
|
7
|
+
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-BuS5ByIl.js";
|
|
8
8
|
//#region src/topology/threeHelpers.ts
|
|
9
9
|
/**
|
|
10
10
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
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-BpXNcxuJ.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-5BYE2cbd.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-S_Ht6gwX.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-Zg7pf2s0.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0MDggKf.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-22idS-ht.cjs");
|
|
4
4
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { X as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { X as getKernel, t as castShape } from "./shapeTypes-CN0GUoHr.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DboJwVCf.js";
|
|
3
|
-
import { R as kernelCall, S as getOrCreateCache, _ as getCacheEntry, x as getFaces, z as kernelCallRaw } from "./faceFns-
|
|
3
|
+
import { R as kernelCall, S as getOrCreateCache, _ as getCacheEntry, x as getFaces, z as kernelCallRaw } from "./faceFns-NbWd8-iR.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-csSEYddm.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-CFyv5cdW.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-CU1Jwq9C.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_faceFns = require("./faceFns-
|
|
2
|
-
const require_shapeFns = require("./shapeFns-
|
|
3
|
-
const require_measureFns = require("./measureFns-
|
|
1
|
+
const require_faceFns = require("./faceFns-22idS-ht.cjs");
|
|
2
|
+
const require_shapeFns = require("./shapeFns-183zCtMc.cjs");
|
|
3
|
+
const require_measureFns = require("./measureFns-C751QGI1.cjs");
|
|
4
4
|
//#region src/topology/shapeRef/scoring.ts
|
|
5
5
|
/**
|
|
6
6
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as normalAt, n as faceCenter, r as faceGeomType, x as getFaces } from "./faceFns-
|
|
2
|
-
import { n as getHashCode } from "./shapeFns-
|
|
3
|
-
import { n as measureArea } from "./measureFns-
|
|
1
|
+
import { c as normalAt, n as faceCenter, r as faceGeomType, x as getFaces } from "./faceFns-NbWd8-iR.js";
|
|
2
|
+
import { n as getHashCode } from "./shapeFns-2X3VOi1a.js";
|
|
3
|
+
import { n as measureArea } from "./measureFns-B8C85hbT.js";
|
|
4
4
|
//#region src/topology/shapeRef/scoring.ts
|
|
5
5
|
/**
|
|
6
6
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -6912,6 +6912,16 @@ function extractNurbsFromEdge(bk, shape) {
|
|
|
6912
6912
|
};
|
|
6913
6913
|
}
|
|
6914
6914
|
//#endregion
|
|
6915
|
+
//#region src/utils/vec3.ts
|
|
6916
|
+
/**
|
|
6917
|
+
* Index into a typed/regular array at a position the caller has structurally
|
|
6918
|
+
* guaranteed (WASM ABI fixed-length arrays, post-bounds-check loops, etc.).
|
|
6919
|
+
* Equivalent to `arr[i]!` but typed as `T` directly — no eslint-disable needed.
|
|
6920
|
+
*/
|
|
6921
|
+
function wasmIndex(arr, i) {
|
|
6922
|
+
return arr[i];
|
|
6923
|
+
}
|
|
6924
|
+
//#endregion
|
|
6915
6925
|
//#region src/kernel/brepkit/constructionOps.ts
|
|
6916
6926
|
function makeVertex(bk, x, y, z) {
|
|
6917
6927
|
return vertexHandle(bk.makeVertex(x, y, z));
|
|
@@ -7081,8 +7091,8 @@ function makeBezierEdge(bk, points) {
|
|
|
7081
7091
|
y,
|
|
7082
7092
|
z
|
|
7083
7093
|
]);
|
|
7084
|
-
const startPt = points
|
|
7085
|
-
const endPt = points
|
|
7094
|
+
const startPt = wasmIndex(points, 0);
|
|
7095
|
+
const endPt = wasmIndex(points, n - 1);
|
|
7086
7096
|
return edgeHandle(bk.makeNurbsEdge(startPt[0], startPt[1], startPt[2], endPt[0], endPt[1], endPt[2], degree, knots, flatCp, weights));
|
|
7087
7097
|
}
|
|
7088
7098
|
function makeTangentArc(bk, startPoint, startTangent, endPoint) {
|
|
@@ -7176,31 +7186,21 @@ function triangulatedSurface(bk, points, rows, cols) {
|
|
|
7176
7186
|
const i10 = (r + 1) * cols + c;
|
|
7177
7187
|
const i01 = r * cols + (c + 1);
|
|
7178
7188
|
const i11 = (r + 1) * cols + (c + 1);
|
|
7179
|
-
const f1 = buildTriFace(bk, points
|
|
7189
|
+
const f1 = buildTriFace(bk, wasmIndex(points, i00), wasmIndex(points, i10), wasmIndex(points, i01));
|
|
7180
7190
|
if (f1) faces.push(f1);
|
|
7181
|
-
const f2 = buildTriFace(bk, points
|
|
7191
|
+
const f2 = buildTriFace(bk, wasmIndex(points, i10), wasmIndex(points, i11), wasmIndex(points, i01));
|
|
7182
7192
|
if (f2) faces.push(f2);
|
|
7183
7193
|
}
|
|
7184
7194
|
if (faces.length === 0) throw new Error("brepkit: no valid faces in surface grid");
|
|
7185
7195
|
return sew(bk, faces, 1e-6);
|
|
7186
7196
|
}
|
|
7187
7197
|
function buildTriFace(bk, a, b, c) {
|
|
7188
|
-
const
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
c[0] - a[0],
|
|
7195
|
-
c[1] - a[1],
|
|
7196
|
-
c[2] - a[2]
|
|
7197
|
-
];
|
|
7198
|
-
const cross = [
|
|
7199
|
-
ab[1] * ac[2] - ab[2] * ac[1],
|
|
7200
|
-
ab[2] * ac[0] - ab[0] * ac[2],
|
|
7201
|
-
ab[0] * ac[1] - ab[1] * ac[0]
|
|
7202
|
-
];
|
|
7203
|
-
if (Math.sqrt(cross[0] ** 2 + cross[1] ** 2 + cross[2] ** 2) < 1e-12) return null;
|
|
7198
|
+
const abx = b[0] - a[0], aby = b[1] - a[1], abz = b[2] - a[2];
|
|
7199
|
+
const acx = c[0] - a[0], acy = c[1] - a[1], acz = c[2] - a[2];
|
|
7200
|
+
const cx = aby * acz - abz * acy;
|
|
7201
|
+
const cy = abz * acx - abx * acz;
|
|
7202
|
+
const cz = abx * acy - aby * acx;
|
|
7203
|
+
if (Math.sqrt(cx * cx + cy * cy + cz * cz) < 1e-12) return null;
|
|
7204
7204
|
try {
|
|
7205
7205
|
return makeFace(bk, makeWire(bk, [
|
|
7206
7206
|
makeLineEdge(bk, a, b),
|
|
@@ -7219,7 +7219,7 @@ function sewAndSolidify(bk, faces, tolerance) {
|
|
|
7219
7219
|
function interpolatePoints(bk, points, options) {
|
|
7220
7220
|
if (options?.tolerance !== void 0) warnOnce("interpolate-tolerance", "interpolatePoints() tolerance parameter is not supported; brepkit uses chord-length parameterisation.");
|
|
7221
7221
|
if (points.length < 2) throw new Error("brepkit: need at least 2 points");
|
|
7222
|
-
if (points.length === 2) return makeLineEdge(bk, points
|
|
7222
|
+
if (points.length === 2) return makeLineEdge(bk, wasmIndex(points, 0), wasmIndex(points, 1));
|
|
7223
7223
|
const degree = Math.min(3, points.length - 1);
|
|
7224
7224
|
const coords = points.flatMap(([x, y, z]) => [
|
|
7225
7225
|
x,
|
|
@@ -7311,11 +7311,11 @@ function createAxis3(_bk, ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
|
7311
7311
|
};
|
|
7312
7312
|
}
|
|
7313
7313
|
function makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle) {
|
|
7314
|
-
const
|
|
7314
|
+
const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
|
|
7315
7315
|
const nz = [
|
|
7316
|
-
normal[0] /
|
|
7317
|
-
normal[1] /
|
|
7318
|
-
normal[2] /
|
|
7316
|
+
normal[0] / nLen,
|
|
7317
|
+
normal[1] / nLen,
|
|
7318
|
+
normal[2] / nLen
|
|
7319
7319
|
];
|
|
7320
7320
|
const ref = Math.abs(nz[0]) < .9 ? [
|
|
7321
7321
|
1,
|
|
@@ -7326,15 +7326,17 @@ function makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle) {
|
|
|
7326
7326
|
1,
|
|
7327
7327
|
0
|
|
7328
7328
|
];
|
|
7329
|
-
const
|
|
7329
|
+
const xRaw = [
|
|
7330
7330
|
nz[1] * ref[2] - nz[2] * ref[1],
|
|
7331
7331
|
nz[2] * ref[0] - nz[0] * ref[2],
|
|
7332
7332
|
nz[0] * ref[1] - nz[1] * ref[0]
|
|
7333
7333
|
];
|
|
7334
|
-
const xLen = Math.sqrt(
|
|
7335
|
-
xAxis
|
|
7336
|
-
|
|
7337
|
-
|
|
7334
|
+
const xLen = Math.sqrt(xRaw[0] ** 2 + xRaw[1] ** 2 + xRaw[2] ** 2);
|
|
7335
|
+
const xAxis = [
|
|
7336
|
+
xRaw[0] / xLen,
|
|
7337
|
+
xRaw[1] / xLen,
|
|
7338
|
+
xRaw[2] / xLen
|
|
7339
|
+
];
|
|
7338
7340
|
const yAxis = [
|
|
7339
7341
|
nz[1] * xAxis[2] - nz[2] * xAxis[1],
|
|
7340
7342
|
nz[2] * xAxis[0] - nz[0] * xAxis[2],
|
|
@@ -7369,18 +7371,22 @@ function makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle) {
|
|
|
7369
7371
|
const knots = Array(degree + 1).fill(0);
|
|
7370
7372
|
for (let i = 1; i < nSegments; i++) knots.push(i, i);
|
|
7371
7373
|
knots.push(...Array(degree + 1).fill(nSegments));
|
|
7372
|
-
const kMax = knots
|
|
7373
|
-
for (let i = 0; i < knots.length; i++) knots[i] = knots
|
|
7374
|
-
const
|
|
7375
|
-
const
|
|
7376
|
-
|
|
7374
|
+
const kMax = wasmIndex(knots, knots.length - 1);
|
|
7375
|
+
for (let i = 0; i < knots.length; i++) knots[i] = wasmIndex(knots, i) / kMax;
|
|
7376
|
+
const sx = wasmIndex(controlPoints, 0);
|
|
7377
|
+
const sy = wasmIndex(controlPoints, 1);
|
|
7378
|
+
const sz = wasmIndex(controlPoints, 2);
|
|
7379
|
+
const ex = wasmIndex(controlPoints, controlPoints.length - 3);
|
|
7380
|
+
const ey = wasmIndex(controlPoints, controlPoints.length - 2);
|
|
7381
|
+
const ez = wasmIndex(controlPoints, controlPoints.length - 1);
|
|
7382
|
+
return edgeHandle(bk.makeNurbsEdge(sx, sy, sz, ex, ey, ez, degree, knots, controlPoints, weights));
|
|
7377
7383
|
}
|
|
7378
7384
|
function makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir) {
|
|
7379
|
-
const
|
|
7385
|
+
const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
|
|
7380
7386
|
const nz = [
|
|
7381
|
-
normal[0] /
|
|
7382
|
-
normal[1] /
|
|
7383
|
-
normal[2] /
|
|
7387
|
+
normal[0] / nLen,
|
|
7388
|
+
normal[1] / nLen,
|
|
7389
|
+
normal[2] / nLen
|
|
7384
7390
|
];
|
|
7385
7391
|
let xAxis;
|
|
7386
7392
|
if (xDir) {
|
|
@@ -7400,15 +7406,17 @@ function makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAng
|
|
|
7400
7406
|
1,
|
|
7401
7407
|
0
|
|
7402
7408
|
];
|
|
7403
|
-
|
|
7409
|
+
const xRaw = [
|
|
7404
7410
|
nz[1] * ref[2] - nz[2] * ref[1],
|
|
7405
7411
|
nz[2] * ref[0] - nz[0] * ref[2],
|
|
7406
7412
|
nz[0] * ref[1] - nz[1] * ref[0]
|
|
7407
7413
|
];
|
|
7408
|
-
const
|
|
7409
|
-
xAxis
|
|
7410
|
-
|
|
7411
|
-
|
|
7414
|
+
const xLen = Math.sqrt(xRaw[0] ** 2 + xRaw[1] ** 2 + xRaw[2] ** 2);
|
|
7415
|
+
xAxis = [
|
|
7416
|
+
xRaw[0] / xLen,
|
|
7417
|
+
xRaw[1] / xLen,
|
|
7418
|
+
xRaw[2] / xLen
|
|
7419
|
+
];
|
|
7412
7420
|
}
|
|
7413
7421
|
const yAxis = [
|
|
7414
7422
|
nz[1] * xAxis[2] - nz[2] * xAxis[1],
|
|
@@ -7444,11 +7452,15 @@ function makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAng
|
|
|
7444
7452
|
const knots = Array(degree + 1).fill(0);
|
|
7445
7453
|
for (let i = 1; i < nSegments; i++) knots.push(i, i);
|
|
7446
7454
|
knots.push(...Array(degree + 1).fill(nSegments));
|
|
7447
|
-
const kMax = knots
|
|
7448
|
-
for (let i = 0; i < knots.length; i++) knots[i] = knots
|
|
7449
|
-
const
|
|
7450
|
-
const
|
|
7451
|
-
|
|
7455
|
+
const kMax = wasmIndex(knots, knots.length - 1);
|
|
7456
|
+
for (let i = 0; i < knots.length; i++) knots[i] = wasmIndex(knots, i) / kMax;
|
|
7457
|
+
const sx = wasmIndex(controlPoints, 0);
|
|
7458
|
+
const sy = wasmIndex(controlPoints, 1);
|
|
7459
|
+
const sz = wasmIndex(controlPoints, 2);
|
|
7460
|
+
const ex = wasmIndex(controlPoints, controlPoints.length - 3);
|
|
7461
|
+
const ey = wasmIndex(controlPoints, controlPoints.length - 2);
|
|
7462
|
+
const ez = wasmIndex(controlPoints, controlPoints.length - 1);
|
|
7463
|
+
return edgeHandle(bk.makeNurbsEdge(sx, sy, sz, ex, ey, ez, degree, knots, controlPoints, weights));
|
|
7452
7464
|
}
|
|
7453
7465
|
//#endregion
|
|
7454
7466
|
//#region src/kernel/brepkit/booleanOps.ts
|
|
@@ -6908,6 +6908,16 @@ function extractNurbsFromEdge(bk, shape) {
|
|
|
6908
6908
|
};
|
|
6909
6909
|
}
|
|
6910
6910
|
//#endregion
|
|
6911
|
+
//#region src/utils/vec3.ts
|
|
6912
|
+
/**
|
|
6913
|
+
* Index into a typed/regular array at a position the caller has structurally
|
|
6914
|
+
* guaranteed (WASM ABI fixed-length arrays, post-bounds-check loops, etc.).
|
|
6915
|
+
* Equivalent to `arr[i]!` but typed as `T` directly — no eslint-disable needed.
|
|
6916
|
+
*/
|
|
6917
|
+
function wasmIndex(arr, i) {
|
|
6918
|
+
return arr[i];
|
|
6919
|
+
}
|
|
6920
|
+
//#endregion
|
|
6911
6921
|
//#region src/kernel/brepkit/constructionOps.ts
|
|
6912
6922
|
function makeVertex(bk, x, y, z) {
|
|
6913
6923
|
return vertexHandle(bk.makeVertex(x, y, z));
|
|
@@ -7077,8 +7087,8 @@ function makeBezierEdge(bk, points) {
|
|
|
7077
7087
|
y,
|
|
7078
7088
|
z
|
|
7079
7089
|
]);
|
|
7080
|
-
const startPt = points
|
|
7081
|
-
const endPt = points
|
|
7090
|
+
const startPt = wasmIndex(points, 0);
|
|
7091
|
+
const endPt = wasmIndex(points, n - 1);
|
|
7082
7092
|
return edgeHandle(bk.makeNurbsEdge(startPt[0], startPt[1], startPt[2], endPt[0], endPt[1], endPt[2], degree, knots, flatCp, weights));
|
|
7083
7093
|
}
|
|
7084
7094
|
function makeTangentArc(bk, startPoint, startTangent, endPoint) {
|
|
@@ -7172,31 +7182,21 @@ function triangulatedSurface(bk, points, rows, cols) {
|
|
|
7172
7182
|
const i10 = (r + 1) * cols + c;
|
|
7173
7183
|
const i01 = r * cols + (c + 1);
|
|
7174
7184
|
const i11 = (r + 1) * cols + (c + 1);
|
|
7175
|
-
const f1 = buildTriFace(bk, points
|
|
7185
|
+
const f1 = buildTriFace(bk, wasmIndex(points, i00), wasmIndex(points, i10), wasmIndex(points, i01));
|
|
7176
7186
|
if (f1) faces.push(f1);
|
|
7177
|
-
const f2 = buildTriFace(bk, points
|
|
7187
|
+
const f2 = buildTriFace(bk, wasmIndex(points, i10), wasmIndex(points, i11), wasmIndex(points, i01));
|
|
7178
7188
|
if (f2) faces.push(f2);
|
|
7179
7189
|
}
|
|
7180
7190
|
if (faces.length === 0) throw new Error("brepkit: no valid faces in surface grid");
|
|
7181
7191
|
return sew(bk, faces, 1e-6);
|
|
7182
7192
|
}
|
|
7183
7193
|
function buildTriFace(bk, a, b, c) {
|
|
7184
|
-
const
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
c[0] - a[0],
|
|
7191
|
-
c[1] - a[1],
|
|
7192
|
-
c[2] - a[2]
|
|
7193
|
-
];
|
|
7194
|
-
const cross = [
|
|
7195
|
-
ab[1] * ac[2] - ab[2] * ac[1],
|
|
7196
|
-
ab[2] * ac[0] - ab[0] * ac[2],
|
|
7197
|
-
ab[0] * ac[1] - ab[1] * ac[0]
|
|
7198
|
-
];
|
|
7199
|
-
if (Math.sqrt(cross[0] ** 2 + cross[1] ** 2 + cross[2] ** 2) < 1e-12) return null;
|
|
7194
|
+
const abx = b[0] - a[0], aby = b[1] - a[1], abz = b[2] - a[2];
|
|
7195
|
+
const acx = c[0] - a[0], acy = c[1] - a[1], acz = c[2] - a[2];
|
|
7196
|
+
const cx = aby * acz - abz * acy;
|
|
7197
|
+
const cy = abz * acx - abx * acz;
|
|
7198
|
+
const cz = abx * acy - aby * acx;
|
|
7199
|
+
if (Math.sqrt(cx * cx + cy * cy + cz * cz) < 1e-12) return null;
|
|
7200
7200
|
try {
|
|
7201
7201
|
return makeFace(bk, makeWire(bk, [
|
|
7202
7202
|
makeLineEdge(bk, a, b),
|
|
@@ -7215,7 +7215,7 @@ function sewAndSolidify(bk, faces, tolerance) {
|
|
|
7215
7215
|
function interpolatePoints(bk, points, options) {
|
|
7216
7216
|
if (options?.tolerance !== void 0) warnOnce("interpolate-tolerance", "interpolatePoints() tolerance parameter is not supported; brepkit uses chord-length parameterisation.");
|
|
7217
7217
|
if (points.length < 2) throw new Error("brepkit: need at least 2 points");
|
|
7218
|
-
if (points.length === 2) return makeLineEdge(bk, points
|
|
7218
|
+
if (points.length === 2) return makeLineEdge(bk, wasmIndex(points, 0), wasmIndex(points, 1));
|
|
7219
7219
|
const degree = Math.min(3, points.length - 1);
|
|
7220
7220
|
const coords = points.flatMap(([x, y, z]) => [
|
|
7221
7221
|
x,
|
|
@@ -7307,11 +7307,11 @@ function createAxis3(_bk, ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
|
7307
7307
|
};
|
|
7308
7308
|
}
|
|
7309
7309
|
function makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle) {
|
|
7310
|
-
const
|
|
7310
|
+
const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
|
|
7311
7311
|
const nz = [
|
|
7312
|
-
normal[0] /
|
|
7313
|
-
normal[1] /
|
|
7314
|
-
normal[2] /
|
|
7312
|
+
normal[0] / nLen,
|
|
7313
|
+
normal[1] / nLen,
|
|
7314
|
+
normal[2] / nLen
|
|
7315
7315
|
];
|
|
7316
7316
|
const ref = Math.abs(nz[0]) < .9 ? [
|
|
7317
7317
|
1,
|
|
@@ -7322,15 +7322,17 @@ function makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle) {
|
|
|
7322
7322
|
1,
|
|
7323
7323
|
0
|
|
7324
7324
|
];
|
|
7325
|
-
const
|
|
7325
|
+
const xRaw = [
|
|
7326
7326
|
nz[1] * ref[2] - nz[2] * ref[1],
|
|
7327
7327
|
nz[2] * ref[0] - nz[0] * ref[2],
|
|
7328
7328
|
nz[0] * ref[1] - nz[1] * ref[0]
|
|
7329
7329
|
];
|
|
7330
|
-
const xLen = Math.sqrt(
|
|
7331
|
-
xAxis
|
|
7332
|
-
|
|
7333
|
-
|
|
7330
|
+
const xLen = Math.sqrt(xRaw[0] ** 2 + xRaw[1] ** 2 + xRaw[2] ** 2);
|
|
7331
|
+
const xAxis = [
|
|
7332
|
+
xRaw[0] / xLen,
|
|
7333
|
+
xRaw[1] / xLen,
|
|
7334
|
+
xRaw[2] / xLen
|
|
7335
|
+
];
|
|
7334
7336
|
const yAxis = [
|
|
7335
7337
|
nz[1] * xAxis[2] - nz[2] * xAxis[1],
|
|
7336
7338
|
nz[2] * xAxis[0] - nz[0] * xAxis[2],
|
|
@@ -7365,18 +7367,22 @@ function makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle) {
|
|
|
7365
7367
|
const knots = Array(degree + 1).fill(0);
|
|
7366
7368
|
for (let i = 1; i < nSegments; i++) knots.push(i, i);
|
|
7367
7369
|
knots.push(...Array(degree + 1).fill(nSegments));
|
|
7368
|
-
const kMax = knots
|
|
7369
|
-
for (let i = 0; i < knots.length; i++) knots[i] = knots
|
|
7370
|
-
const
|
|
7371
|
-
const
|
|
7372
|
-
|
|
7370
|
+
const kMax = wasmIndex(knots, knots.length - 1);
|
|
7371
|
+
for (let i = 0; i < knots.length; i++) knots[i] = wasmIndex(knots, i) / kMax;
|
|
7372
|
+
const sx = wasmIndex(controlPoints, 0);
|
|
7373
|
+
const sy = wasmIndex(controlPoints, 1);
|
|
7374
|
+
const sz = wasmIndex(controlPoints, 2);
|
|
7375
|
+
const ex = wasmIndex(controlPoints, controlPoints.length - 3);
|
|
7376
|
+
const ey = wasmIndex(controlPoints, controlPoints.length - 2);
|
|
7377
|
+
const ez = wasmIndex(controlPoints, controlPoints.length - 1);
|
|
7378
|
+
return edgeHandle(bk.makeNurbsEdge(sx, sy, sz, ex, ey, ez, degree, knots, controlPoints, weights));
|
|
7373
7379
|
}
|
|
7374
7380
|
function makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir) {
|
|
7375
|
-
const
|
|
7381
|
+
const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
|
|
7376
7382
|
const nz = [
|
|
7377
|
-
normal[0] /
|
|
7378
|
-
normal[1] /
|
|
7379
|
-
normal[2] /
|
|
7383
|
+
normal[0] / nLen,
|
|
7384
|
+
normal[1] / nLen,
|
|
7385
|
+
normal[2] / nLen
|
|
7380
7386
|
];
|
|
7381
7387
|
let xAxis;
|
|
7382
7388
|
if (xDir) {
|
|
@@ -7396,15 +7402,17 @@ function makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAng
|
|
|
7396
7402
|
1,
|
|
7397
7403
|
0
|
|
7398
7404
|
];
|
|
7399
|
-
|
|
7405
|
+
const xRaw = [
|
|
7400
7406
|
nz[1] * ref[2] - nz[2] * ref[1],
|
|
7401
7407
|
nz[2] * ref[0] - nz[0] * ref[2],
|
|
7402
7408
|
nz[0] * ref[1] - nz[1] * ref[0]
|
|
7403
7409
|
];
|
|
7404
|
-
const
|
|
7405
|
-
xAxis
|
|
7406
|
-
|
|
7407
|
-
|
|
7410
|
+
const xLen = Math.sqrt(xRaw[0] ** 2 + xRaw[1] ** 2 + xRaw[2] ** 2);
|
|
7411
|
+
xAxis = [
|
|
7412
|
+
xRaw[0] / xLen,
|
|
7413
|
+
xRaw[1] / xLen,
|
|
7414
|
+
xRaw[2] / xLen
|
|
7415
|
+
];
|
|
7408
7416
|
}
|
|
7409
7417
|
const yAxis = [
|
|
7410
7418
|
nz[1] * xAxis[2] - nz[2] * xAxis[1],
|
|
@@ -7440,11 +7448,15 @@ function makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAng
|
|
|
7440
7448
|
const knots = Array(degree + 1).fill(0);
|
|
7441
7449
|
for (let i = 1; i < nSegments; i++) knots.push(i, i);
|
|
7442
7450
|
knots.push(...Array(degree + 1).fill(nSegments));
|
|
7443
|
-
const kMax = knots
|
|
7444
|
-
for (let i = 0; i < knots.length; i++) knots[i] = knots
|
|
7445
|
-
const
|
|
7446
|
-
const
|
|
7447
|
-
|
|
7451
|
+
const kMax = wasmIndex(knots, knots.length - 1);
|
|
7452
|
+
for (let i = 0; i < knots.length; i++) knots[i] = wasmIndex(knots, i) / kMax;
|
|
7453
|
+
const sx = wasmIndex(controlPoints, 0);
|
|
7454
|
+
const sy = wasmIndex(controlPoints, 1);
|
|
7455
|
+
const sz = wasmIndex(controlPoints, 2);
|
|
7456
|
+
const ex = wasmIndex(controlPoints, controlPoints.length - 3);
|
|
7457
|
+
const ey = wasmIndex(controlPoints, controlPoints.length - 2);
|
|
7458
|
+
const ez = wasmIndex(controlPoints, controlPoints.length - 1);
|
|
7459
|
+
return edgeHandle(bk.makeNurbsEdge(sx, sy, sz, ex, ey, ez, degree, knots, controlPoints, weights));
|
|
7448
7460
|
}
|
|
7449
7461
|
//#endregion
|
|
7450
7462
|
//#region src/kernel/brepkit/booleanOps.ts
|