brepjs 18.100.3 → 18.101.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/{blueprint-DZB6Drrd.js → blueprint-CF12Nceg.js} +5 -5
- package/dist/{blueprint-1x01ITBT.cjs → blueprint-D5ArjKiA.cjs} +5 -5
- package/dist/{blueprintFns-o4dhTIZQ.js → blueprintFns-BuPAK4OB.js} +2 -2
- package/dist/{blueprintFns-DkmuKpz6.cjs → blueprintFns-CcCfkbyd.cjs} +2 -2
- package/dist/{blueprintSketcher-C5Q-JLEK.js → blueprintSketcher-CEQ8s7TD.js} +3 -3
- package/dist/{blueprintSketcher-BoHwuwaU.cjs → blueprintSketcher-DCttG3KS.cjs} +3 -3
- package/dist/{boolean2D-DV642GXt.js → boolean2D-8rB2sUzj.js} +4 -4
- package/dist/{boolean2D-C1Akp29q.cjs → boolean2D-BCqDjg0y.cjs} +4 -4
- package/dist/brepjs.cjs +94 -39
- package/dist/brepjs.js +94 -39
- package/dist/{cameraFns-B62EdiYs.js → cameraFns-Bu6jgTKc.js} +2 -2
- package/dist/{cameraFns-B-T9D-ie.cjs → cameraFns-S7YbAxfg.cjs} +2 -2
- package/dist/core/kernelBoundary.d.ts +1 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-Bmjk2BOw.js → cornerFinder-COqoeY--.js} +1 -1
- package/dist/{cornerFinder-CqSNuWBI.cjs → cornerFinder-Ci2NbbAW.cjs} +1 -1
- package/dist/csg/evaluate.d.ts +29 -6
- package/dist/{curveFns-CaEoZJFJ.js → curveFns-CG05Jygr.js} +1 -1
- package/dist/{curveFns-BIlzT4bO.cjs → curveFns-Dx7_wMut.cjs} +1 -1
- package/dist/{drawFns-BVVGRW0h.js → drawFns-CsXPFyDe.js} +12 -12
- package/dist/{drawFns-Dwq6JHbb.cjs → drawFns-DYkjT_hx.cjs} +12 -12
- package/dist/{faceFns-B7yceDjt.cjs → faceFns-DKg2St8b.cjs} +4 -7
- package/dist/{faceFns-CFvc_qXI.js → faceFns-mo4ThIHz.js} +4 -7
- package/dist/{healingFns-BY6Q9gge.js → healingFns-Bb3eEBNm.js} +5 -5
- package/dist/{healingFns-CEzX-45q.cjs → healingFns-CM5mVMow.cjs} +5 -5
- package/dist/{helpers-A0a3O6af.cjs → helpers-8zxf2gkc.cjs} +6 -6
- package/dist/{helpers-BamnXOMX.js → helpers-DT44wBAD.js} +6 -6
- package/dist/{importFns-Dj107tFY.cjs → importFns-B6hw9Nhx.cjs} +3 -3
- package/dist/{importFns-Cfe_tEh_.js → importFns-CEczwPdN.js} +3 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +6 -7
- package/dist/kernel/brepkit/kernel2dOps.d.ts +3 -4
- package/dist/kernel/geometry2d.d.ts +2 -0
- package/dist/kernel/occt/kernel2dOps.d.ts +3 -4
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/{loftFns-CFyOO359.cjs → loftFns-DaRDYpfB.cjs} +11 -1
- package/dist/{loftFns-D5rQxNOI.js → loftFns-DyNuD9XL.js} +11 -1
- package/dist/{measureFns-Bb0Do7in.js → measureFns-Dkh_DmrE.js} +3 -3
- package/dist/{measureFns-Cmc_y0WE.cjs → measureFns-Q2dnokUU.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-Bkcg1u5D.js → meshFns-CAAarhVm.js} +3 -3
- package/dist/{meshFns-BKBGgLB4.cjs → meshFns-DeKdpmu7.cjs} +3 -3
- package/dist/{occtWasmAdapter-D7mOxU0Q.js → occtWasmAdapter-BDEPveZs.js} +82 -14
- package/dist/{occtWasmAdapter-Bv2OTOX9.cjs → occtWasmAdapter-DDZELjlB.cjs} +93 -13
- package/dist/operations/extrudeUtils.d.ts +1 -6
- package/dist/operations/sweepFns.d.ts +1 -7
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DS7-3evP.js → primitiveFns-62SO4ti5.js} +4 -4
- package/dist/{primitiveFns-B898KlXM.cjs → primitiveFns-BAWtMd9H.cjs} +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-D-4StVDd.js → shapeFns-DyBbhU30.js} +2 -2
- package/dist/{shapeFns-B3GP-0FJ.cjs → shapeFns-L4a8kH_A.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-DzVlxDhd.js → shapeRefFns-Cn4WNb3q.js} +4 -4
- package/dist/{shapeRefFns-C6L7KhTi.cjs → shapeRefFns-Dij41NuC.cjs} +4 -4
- package/dist/{shapeTypes-DQfoZt_L.cjs → shapeTypes-Bwgm5N6R.cjs} +5 -133
- package/dist/{shapeTypes-z5bfGPVI.js → shapeTypes-C4lPfrc2.js} +3 -131
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-8H08aDto.js → solidBuilders-Biwv2cW3.js} +5 -5
- package/dist/{solidBuilders-B0Uyvvyy.cjs → solidBuilders-CgRmJEdn.cjs} +5 -5
- package/dist/{surfaceBuilders-BYopOndo.js → surfaceBuilders-Bww4jhBo.js} +2 -2
- package/dist/{surfaceBuilders-zGpnLDxz.cjs → surfaceBuilders-FLnYYA70.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-B8cDsSHe.cjs → textBlueprints-08NcMO9T.cjs} +7 -7
- package/dist/{textBlueprints-ziKppdNm.js → textBlueprints-CEzTC9vX.js} +7 -7
- package/dist/{textMetrics-CP-jrZ98.js → textMetrics-CBbDQ5QW.js} +1 -1
- package/dist/{textMetrics-B8qEy3dh.cjs → textMetrics-W-H6jUDj.cjs} +1 -1
- package/dist/{threadFns-7jlwHbES.js → threadFns-8rKpQXiR.js} +6 -6
- package/dist/{threadFns-B_8tna0V.cjs → threadFns-DGYdomjN.cjs} +6 -6
- package/dist/topology.cjs +8 -8
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-De27Nxmf.js → topologyQueryFns-Do8E4EXj.js} +1 -1
- package/dist/{topologyQueryFns-BLkQkExs.cjs → topologyQueryFns-ygBBXxnP.cjs} +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vec3 } from './types.js';
|
|
2
|
-
|
|
2
|
+
import { KernelType } from '../kernel/types.js';
|
|
3
3
|
/** Convert Vec3 to a kernel 3D vector. Caller must call .delete() when done. */
|
|
4
4
|
export declare function toKernelVec(v: Vec3): KernelType;
|
|
5
5
|
/** Convert Vec3 to a kernel 3D point. Caller must call .delete() when done. */
|
|
@@ -33,4 +33,3 @@ export declare function makeKernelAx2(origin: Vec3, zDir: Vec3, xDir?: Vec3): Ke
|
|
|
33
33
|
* @testOnly Exercised by tests/occtBoundary.test.ts.
|
|
34
34
|
*/
|
|
35
35
|
export declare function makeKernelAx3(origin: Vec3, zDir: Vec3, xDir?: Vec3): KernelType;
|
|
36
|
-
export {};
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-C4lPfrc2.js";
|
|
2
2
|
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
4
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
3
|
-
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-
|
|
3
|
+
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-DT44wBAD.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-8zxf2gkc.cjs");
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
package/dist/csg/evaluate.d.ts
CHANGED
|
@@ -9,6 +9,18 @@ export interface EvaluatorOptions {
|
|
|
9
9
|
readonly tolerance?: number | undefined;
|
|
10
10
|
/** Optional callback fired after every node visit, including cache hits (`info.cacheHit` discriminates). */
|
|
11
11
|
readonly onStep?: ((info: StepInfo) => void) | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Upper bound on the number of materialized entries kept in the content
|
|
14
|
+
* cache. When the cache exceeds this after a top-level evaluate(), the
|
|
15
|
+
* least-recently-used entries are evicted and their kernel handles disposed
|
|
16
|
+
* (a handle shared by several entries is freed only when its last entry is
|
|
17
|
+
* evicted). Defaults to unbounded — entries live for the Evaluator's
|
|
18
|
+
* lifetime. With a bound set, a returned shape is only guaranteed valid
|
|
19
|
+
* until the next successful evaluate() call; a failed or thrown evaluate() is
|
|
20
|
+
* transactional (the cache is left unchanged), and evaluate() is non-reentrant
|
|
21
|
+
* (calling it from an onStep callback throws). Must be a positive integer.
|
|
22
|
+
*/
|
|
23
|
+
readonly maxCacheEntries?: number | undefined;
|
|
12
24
|
}
|
|
13
25
|
export interface StepInfo {
|
|
14
26
|
readonly node: IRNode;
|
|
@@ -19,26 +31,37 @@ export interface CacheStats {
|
|
|
19
31
|
readonly hits: number;
|
|
20
32
|
readonly misses: number;
|
|
21
33
|
readonly entries: number;
|
|
34
|
+
/** Number of entries evicted by the LRU bound over this Evaluator's life. */
|
|
35
|
+
readonly evictions: number;
|
|
22
36
|
}
|
|
23
37
|
export declare class Evaluator implements Disposable {
|
|
24
|
-
private readonly scope;
|
|
25
38
|
private readonly cache;
|
|
26
|
-
private readonly
|
|
39
|
+
private readonly refCounts;
|
|
40
|
+
private evaluating;
|
|
41
|
+
private readonly pendingKeys;
|
|
27
42
|
private readonly kernelId;
|
|
28
43
|
private readonly defaultTolerance;
|
|
44
|
+
private readonly maxCacheEntries;
|
|
29
45
|
private readonly onStep?;
|
|
30
46
|
private hits;
|
|
31
47
|
private misses;
|
|
48
|
+
private evictions;
|
|
32
49
|
constructor(options?: EvaluatorOptions);
|
|
33
50
|
/**
|
|
34
51
|
* Materialize a CSG IR tree against the given parameter environment.
|
|
35
|
-
* The returned shape is borrowed —
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
52
|
+
* The returned shape is borrowed — callers must NOT call `.delete()` /
|
|
53
|
+
* `[Symbol.dispose]()` on it; that would invalidate the cache entry for
|
|
54
|
+
* every future call returning the same handle. By default it stays valid
|
|
55
|
+
* until the Evaluator is disposed; if `maxCacheEntries` is set, only until
|
|
56
|
+
* the next successful evaluate() call (LRU eviction may free older entries),
|
|
57
|
+
* and evaluate() is then non-reentrant — calling it from an onStep callback
|
|
58
|
+
* throws.
|
|
39
59
|
*/
|
|
40
60
|
evaluate(node: IRNode, env?: Env): Result<AnyShape<Dimension>>;
|
|
41
61
|
private evaluateInner;
|
|
62
|
+
private releaseShape;
|
|
63
|
+
private trimCache;
|
|
64
|
+
private rollbackPending;
|
|
42
65
|
cacheStats(): CacheStats;
|
|
43
66
|
resetStats(): void;
|
|
44
67
|
[Symbol.dispose](): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-C4lPfrc2.js";
|
|
2
2
|
import { A as ok, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-C4lPfrc2.js";
|
|
2
2
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-Do8E4EXj.js";
|
|
5
5
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
6
6
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
8
8
|
import { a as planeToWorld, o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as downcast } from "./faceFns-
|
|
10
|
-
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as downcast } from "./faceFns-mo4ThIHz.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-CG05Jygr.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
12
|
-
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
13
|
-
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-
|
|
14
|
-
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-
|
|
15
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-
|
|
16
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
17
|
-
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
18
|
-
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-
|
|
19
|
-
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-
|
|
12
|
+
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-Bww4jhBo.js";
|
|
13
|
+
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-CEQ8s7TD.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-DT44wBAD.js";
|
|
15
|
+
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-CF12Nceg.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-COqoeY--.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-8rB2sUzj.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-CEzTC9vX.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-Bu6jgTKc.js";
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-08NcMO9T.cjs");
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
|
|
3
3
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
4
4
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
5
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
5
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ygBBXxnP.cjs");
|
|
6
6
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
7
7
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
8
8
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
9
9
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
10
|
-
const require_faceFns = require("./faceFns-
|
|
11
|
-
const require_curveFns = require("./curveFns-
|
|
10
|
+
const require_faceFns = require("./faceFns-DKg2St8b.cjs");
|
|
11
|
+
const require_curveFns = require("./curveFns-Dx7_wMut.cjs");
|
|
12
12
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
13
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
14
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
15
|
-
const require_helpers = require("./helpers-
|
|
16
|
-
const require_blueprint = require("./blueprint-
|
|
17
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
18
|
-
const require_boolean2D = require("./boolean2D-
|
|
19
|
-
const require_cameraFns = require("./cameraFns-
|
|
13
|
+
const require_surfaceBuilders = require("./surfaceBuilders-FLnYYA70.cjs");
|
|
14
|
+
const require_blueprintSketcher = require("./blueprintSketcher-DCttG3KS.cjs");
|
|
15
|
+
const require_helpers = require("./helpers-8zxf2gkc.cjs");
|
|
16
|
+
const require_blueprint = require("./blueprint-D5ArjKiA.cjs");
|
|
17
|
+
const require_cornerFinder = require("./cornerFinder-Ci2NbbAW.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-BCqDjg0y.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-S7YbAxfg.cjs");
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ygBBXxnP.cjs");
|
|
4
4
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -35,11 +35,8 @@ var TOPO_TO_SHAPE_TYPE = {
|
|
|
35
35
|
shape: "compound"
|
|
36
36
|
};
|
|
37
37
|
var iterTopo = function* iterTopo(shape, topo) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const shapes = require_shapeTypes.getKernel().iterShapes(shape, shapeType);
|
|
41
|
-
for (const s of shapes) yield s;
|
|
42
|
-
}
|
|
38
|
+
const shapes = require_shapeTypes.getKernel().iterShapes(shape, TOPO_TO_SHAPE_TYPE[topo]);
|
|
39
|
+
for (const s of shapes) yield s;
|
|
43
40
|
};
|
|
44
41
|
/** Get the TopAbs_ShapeEnum type of an kernel shape, returning Err for null shapes. */
|
|
45
42
|
var shapeType = (shape) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-C4lPfrc2.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { a as getCachedSurfaceType } from "./topologyQueryFns-
|
|
3
|
+
import { a as getCachedSurfaceType } from "./topologyQueryFns-Do8E4EXj.js";
|
|
4
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -35,11 +35,8 @@ var TOPO_TO_SHAPE_TYPE = {
|
|
|
35
35
|
shape: "compound"
|
|
36
36
|
};
|
|
37
37
|
var iterTopo = function* iterTopo(shape, topo) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const shapes = getKernel().iterShapes(shape, shapeType);
|
|
41
|
-
for (const s of shapes) yield s;
|
|
42
|
-
}
|
|
38
|
+
const shapes = getKernel().iterShapes(shape, TOPO_TO_SHAPE_TYPE[topo]);
|
|
39
|
+
for (const s of shapes) yield s;
|
|
43
40
|
};
|
|
44
41
|
/** Get the TopAbs_ShapeEnum type of an kernel shape, returning Err for null shapes. */
|
|
45
42
|
var shapeType = (shape) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, y as isWire } from "./shapeTypes-C4lPfrc2.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, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-Do8E4EXj.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { v as downcast } from "./faceFns-
|
|
6
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes } from "./shapeFns-
|
|
5
|
+
import { v as downcast } from "./faceFns-mo4ThIHz.js";
|
|
6
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes } from "./shapeFns-DyBbhU30.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
|
-
import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-
|
|
8
|
+
import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-Biwv2cW3.js";
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ygBBXxnP.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-DKg2St8b.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-L4a8kH_A.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_solidBuilders = require("./solidBuilders-CgRmJEdn.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-Bwgm5N6R.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ygBBXxnP.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-DKg2St8b.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-L4a8kH_A.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-Dx7_wMut.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-Q2dnokUU.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-C4lPfrc2.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-Do8E4EXj.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-mo4ThIHz.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-DyBbhU30.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-CG05Jygr.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-Dkh_DmrE.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
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.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-D5ArjKiA.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) {
|
|
@@ -619,7 +619,7 @@ for (let i = 0; i < 256; i++) {
|
|
|
619
619
|
}
|
|
620
620
|
function crc32(data) {
|
|
621
621
|
let crc = 4294967295;
|
|
622
|
-
for (const byte of data) crc = crcTable[(crc ^ byte) & 255] ^ crc >>> 8;
|
|
622
|
+
for (const byte of data) crc = (crcTable[(crc ^ byte) & 255] ?? 0) ^ crc >>> 8;
|
|
623
623
|
return (crc ^ 4294967295) >>> 0;
|
|
624
624
|
}
|
|
625
625
|
function writeLocalHeader(view, bytes, pos, entry) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-C4lPfrc2.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-CF12Nceg.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) {
|
|
@@ -619,7 +619,7 @@ for (let i = 0; i < 256; i++) {
|
|
|
619
619
|
}
|
|
620
620
|
function crc32(data) {
|
|
621
621
|
let crc = 4294967295;
|
|
622
|
-
for (const byte of data) crc = crcTable[(crc ^ byte) & 255] ^ crc >>> 8;
|
|
622
|
+
for (const byte of data) crc = (crcTable[(crc ^ byte) & 255] ?? 0) ^ crc >>> 8;
|
|
623
623
|
return (crc ^ 4294967295) >>> 0;
|
|
624
624
|
}
|
|
625
625
|
function writeLocalHeader(view, bytes, pos, entry) {
|
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-DeKdpmu7.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-B6hw9Nhx.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-CAAarhVm.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-CEczwPdN.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.116.1`.
|
|
6
6
|
*
|
|
7
7
|
* Methods not yet referenced in the adapter layer are tagged `@unwired`.
|
|
8
8
|
*
|
|
@@ -312,7 +312,6 @@ export interface BrepkitKernel {
|
|
|
312
312
|
makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
|
|
313
313
|
/** @unwired */
|
|
314
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
315
|
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;
|
|
317
316
|
makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number): number;
|
|
318
317
|
makeEllipseEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number, rx: number, ry: number, rz: number): number;
|
|
@@ -330,15 +329,15 @@ export interface BrepkitKernel {
|
|
|
330
329
|
/** @unwired */
|
|
331
330
|
toBrepJson(solid: number): string;
|
|
332
331
|
transformFace(face: number, matrix: Float64Array | number[]): void;
|
|
333
|
-
/** @future Not in brepkit-wasm 2.
|
|
332
|
+
/** @future Not in brepkit-wasm 2.116.1. Referenced with feature detection in adapter. */
|
|
334
333
|
chamferAsymmetric?(solid: number, edgeHandles: Uint32Array | number[], d1: number, d2: number): number;
|
|
335
|
-
/** @future Not in brepkit-wasm 2.
|
|
334
|
+
/** @future Not in brepkit-wasm 2.116.1. Referenced with feature detection in adapter. */
|
|
336
335
|
compoundFuse?(solidIds: Uint32Array | number[]): number;
|
|
337
|
-
/** @future Not in brepkit-wasm 2.
|
|
336
|
+
/** @future Not in brepkit-wasm 2.116.1. Referenced with feature detection in adapter. */
|
|
338
337
|
copyEdge?(edge: number): number;
|
|
339
|
-
/** @future Not in brepkit-wasm 2.
|
|
338
|
+
/** @future Not in brepkit-wasm 2.116.1. Referenced with feature detection in adapter. */
|
|
340
339
|
transformEdge?(edge: number, matrix: Float64Array | number[]): void;
|
|
341
|
-
/** @future Not in brepkit-wasm 2.
|
|
340
|
+
/** @future Not in brepkit-wasm 2.116.1. Referenced with feature detection in adapter. */
|
|
342
341
|
validateSolidDetails?(solid: number): string;
|
|
343
342
|
/** Release the entire arena. */
|
|
344
343
|
free(): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BrepkitKernel } from './brepkitWasmTypes.js';
|
|
2
2
|
import { KernelShape, KernelType } from '../types.js';
|
|
3
3
|
import { Curve2dHandle, BBox2dHandle } from '../kernel2dTypes.js';
|
|
4
|
+
import { Curve2dObj } from '../geometry2d.js';
|
|
4
5
|
export declare function createPoint2d(x: number, y: number): KernelType;
|
|
5
6
|
export declare function createDirection2d(x: number, y: number): KernelType;
|
|
6
7
|
export declare function createVector2d(x: number, y: number): KernelType;
|
|
@@ -9,8 +10,6 @@ export declare function wrapCurve2dHandle(handle: KernelType): Curve2dHandle;
|
|
|
9
10
|
export declare function createCurve2dAdaptor(handle: Curve2dHandle): KernelType;
|
|
10
11
|
export declare function makeLine2d(x1: number, y1: number, x2: number, y2: number): Curve2dHandle;
|
|
11
12
|
export declare function makeCircle2d(cx: number, cy: number, radius: number, sense?: boolean): Curve2dHandle;
|
|
12
|
-
export declare function makeArc2dThreePoints(x1: number, y1: number, xm: number, ym: number, x2: number, y2: number): Curve2dHandle;
|
|
13
|
-
export declare function makeArc2dTangent(sx: number, sy: number, tx: number, ty: number, ex: number, ey: number): Curve2dHandle;
|
|
14
13
|
export declare function makeEllipse2d(cx: number, cy: number, major: number, minor: number, xDirX?: number, xDirY?: number, sense?: boolean): Curve2dHandle;
|
|
15
14
|
export declare function makeEllipseArc2d(cx: number, cy: number, major: number, minor: number, start: number, end: number, xDirX?: number, xDirY?: number, sense?: boolean): Curve2dHandle;
|
|
16
15
|
export declare function makeBezier2d(points: [number, number][]): Curve2dHandle;
|
|
@@ -107,8 +106,8 @@ export declare function makeKernel2dOps(bk: BrepkitKernel): {
|
|
|
107
106
|
createCurve2dAdaptor: (handle: any) => any;
|
|
108
107
|
makeLine2d: (x1: number, y1: number, x2: number, y2: number) => any;
|
|
109
108
|
makeCircle2d: (cx: number, cy: number, radius: number, sense: boolean | undefined) => any;
|
|
110
|
-
makeArc2dThreePoints: (x1: number, y1: number, xm: number, ym: number, x2: number, y2: number) =>
|
|
111
|
-
makeArc2dTangent: (sx: number, sy: number, tx: number, ty: number, ex: number, ey: number) =>
|
|
109
|
+
makeArc2dThreePoints: (x1: number, y1: number, xm: number, ym: number, x2: number, y2: number) => Curve2dObj;
|
|
110
|
+
makeArc2dTangent: (sx: number, sy: number, tx: number, ty: number, ex: number, ey: number) => Curve2dObj;
|
|
112
111
|
makeEllipse2d: (cx: number, cy: number, major: number, minor: number, xDirX: number | undefined, xDirY: number | undefined, sense: boolean | undefined) => any;
|
|
113
112
|
makeEllipseArc2d: (cx: number, cy: number, major: number, minor: number, start: number, end: number, xDirX: number | undefined, xDirY: number | undefined, sense: boolean | undefined) => any;
|
|
114
113
|
makeBezier2d: (points: [number, number][]) => any;
|
|
@@ -71,6 +71,8 @@ export declare function curveBounds(c: Curve2dObj): {
|
|
|
71
71
|
export declare function curveTypeName(c: Curve2dObj): string;
|
|
72
72
|
export declare function makeLine2d(x1: number, y1: number, x2: number, y2: number): Line2d;
|
|
73
73
|
export declare function makeCircle2d(cx: number, cy: number, radius: number, sense?: boolean): Circle2d;
|
|
74
|
+
export declare function makeArc2dThreePoints(x1: number, y1: number, xm: number, ym: number, x2: number, y2: number): Curve2dObj;
|
|
75
|
+
export declare function makeArc2dTangent(sx: number, sy: number, tx: number, ty: number, ex: number, ey: number): Curve2dObj;
|
|
74
76
|
export declare function makeEllipse2d(cx: number, cy: number, majorRadius: number, minorRadius: number, xDirX?: number, xDirY?: number, sense?: boolean): Ellipse2d;
|
|
75
77
|
export declare function makeBezier2d(poles: [number, number][]): Bezier2d;
|
|
76
78
|
export declare function translateCurve2d(c: Curve2dObj, dx: number, dy: number): Curve2dObj;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KernelInstance, KernelShape, KernelType } from '../types.js';
|
|
2
2
|
import { Curve2dHandle, BBox2dHandle } from '../kernel2dTypes.js';
|
|
3
|
+
import { Curve2dObj } from '../geometry2d.js';
|
|
3
4
|
export declare function createPoint2d(x: number, y: number): KernelType;
|
|
4
5
|
export declare function createDirection2d(x: number, y: number): KernelType;
|
|
5
6
|
export declare function createVector2d(x: number, y: number): KernelType;
|
|
@@ -8,8 +9,6 @@ export declare function wrapCurve2dHandle(handle: KernelType): Curve2dHandle;
|
|
|
8
9
|
export declare function createCurve2dAdaptor(handle: Curve2dHandle): KernelType;
|
|
9
10
|
export declare function makeLine2d(x1: number, y1: number, x2: number, y2: number): Curve2dHandle;
|
|
10
11
|
export declare function makeCircle2d(cx: number, cy: number, radius: number, sense?: boolean): Curve2dHandle;
|
|
11
|
-
export declare function makeArc2dThreePoints(x1: number, y1: number, xm: number, ym: number, x2: number, y2: number): Curve2dHandle;
|
|
12
|
-
export declare function makeArc2dTangent(sx: number, sy: number, tx: number, ty: number, ex: number, ey: number): Curve2dHandle;
|
|
13
12
|
export declare function makeEllipse2d(cx: number, cy: number, major: number, minor: number, xDirX?: number, xDirY?: number, sense?: boolean): Curve2dHandle;
|
|
14
13
|
export declare function makeEllipseArc2d(cx: number, cy: number, major: number, minor: number, start: number, end: number, xDirX?: number, xDirY?: number, sense?: boolean): Curve2dHandle;
|
|
15
14
|
export declare function makeBezier2d(points: [number, number][]): Curve2dHandle;
|
|
@@ -114,8 +113,8 @@ export declare function makeKernel2dOps(oc: KernelInstance): {
|
|
|
114
113
|
createAxis2d: (px: number, py: number, dx: number, dy: number) => any;
|
|
115
114
|
makeLine2d: (x1: number, y1: number, x2: number, y2: number) => any;
|
|
116
115
|
makeCircle2d: (cx: number, cy: number, radius: number, sense: boolean | undefined) => any;
|
|
117
|
-
makeArc2dThreePoints: (x1: number, y1: number, xm: number, ym: number, x2: number, y2: number) =>
|
|
118
|
-
makeArc2dTangent: (startX: number, startY: number, tangentX: number, tangentY: number, endX: number, endY: number) =>
|
|
116
|
+
makeArc2dThreePoints: (x1: number, y1: number, xm: number, ym: number, x2: number, y2: number) => Curve2dObj;
|
|
117
|
+
makeArc2dTangent: (startX: number, startY: number, tangentX: number, tangentY: number, endX: number, endY: number) => Curve2dObj;
|
|
119
118
|
makeEllipse2d: (cx: number, cy: number, majorRadius: number, minorRadius: number, xDirX: number | undefined, xDirY: number | undefined, sense: boolean | undefined) => any;
|
|
120
119
|
makeEllipseArc2d: (cx: number, cy: number, majorRadius: number, minorRadius: number, startAngle: number, endAngle: number, xDirX: number | undefined, xDirY: number | undefined, sense: boolean | undefined) => any;
|
|
121
120
|
makeBezier2d: (points: [number, number][]) => any;
|
|
@@ -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-DDZELjlB.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-
|
|
1
|
+
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-BDEPveZs.js";
|
|
2
2
|
export { OcctWasmAdapter };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.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");
|
|
5
5
|
//#region src/operations/extrudeUtils.ts
|
|
6
6
|
/**
|
|
7
|
+
* Shared utilities for extrusion operations.
|
|
8
|
+
* Used by both class-based (extrude.ts) and functional (extrudeFns.ts) APIs.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
7
11
|
* Build an kernel scaling law from an extrusion profile configuration.
|
|
8
12
|
*
|
|
9
13
|
* The law defines how the cross-section scales along the extrusion path.
|
|
@@ -22,6 +26,12 @@ function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
|
22
26
|
}
|
|
23
27
|
//#endregion
|
|
24
28
|
//#region src/operations/sweepFns.ts
|
|
29
|
+
/**
|
|
30
|
+
* Sweep operations — generic sweep, support extrude, complex extrude,
|
|
31
|
+
* twist extrude, multi-section sweep, and guided sweep.
|
|
32
|
+
*
|
|
33
|
+
* Consolidated from extrudeFns, multiSweepFns, and guidedSweepFns.
|
|
34
|
+
*/
|
|
25
35
|
/** Build a wire spine from start to end point (line segment). */
|
|
26
36
|
function makeSpineWire(start, end) {
|
|
27
37
|
const kernel = require_shapeTypes.getKernel();
|
|
@@ -1,9 +1,13 @@
|
|
|
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-C4lPfrc2.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";
|
|
5
5
|
//#region src/operations/extrudeUtils.ts
|
|
6
6
|
/**
|
|
7
|
+
* Shared utilities for extrusion operations.
|
|
8
|
+
* Used by both class-based (extrude.ts) and functional (extrudeFns.ts) APIs.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
7
11
|
* Build an kernel scaling law from an extrusion profile configuration.
|
|
8
12
|
*
|
|
9
13
|
* The law defines how the cross-section scales along the extrusion path.
|
|
@@ -22,6 +26,12 @@ function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
|
22
26
|
}
|
|
23
27
|
//#endregion
|
|
24
28
|
//#region src/operations/sweepFns.ts
|
|
29
|
+
/**
|
|
30
|
+
* Sweep operations — generic sweep, support extrude, complex extrude,
|
|
31
|
+
* twist extrude, multi-section sweep, and guided sweep.
|
|
32
|
+
*
|
|
33
|
+
* Consolidated from extrudeFns, multiSweepFns, and guidedSweepFns.
|
|
34
|
+
*/
|
|
25
35
|
/** Build a wire spine from start to end point (line segment). */
|
|
26
36
|
function makeSpineWire(start, end) {
|
|
27
37
|
const kernel = getKernel();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Z as getKernel } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-C4lPfrc2.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-Do8E4EXj.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-mo4ThIHz.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-Bwgm5N6R.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-ygBBXxnP.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DKg2St8b.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-Q2dnokUU.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-Dkh_DmrE.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|