brepjs 20.1.4 → 20.2.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 +7 -7
- package/dist/2d.js +7 -7
- package/dist/{adjacencyFns-C_ZNyZRx.cjs → adjacencyFns-DZsPfYIq.cjs} +2 -2
- package/dist/{adjacencyFns-A1SikG3N.js → adjacencyFns-k4GWh4n7.js} +2 -2
- package/dist/{blueprint-BsaJ4TJW.cjs → blueprint-CJuRunkd.cjs} +7 -7
- package/dist/{blueprint-CAg8eRRu.js → blueprint-Dsp4t2ul.js} +7 -7
- package/dist/{blueprintFns-CCVf2Yat.cjs → blueprintFns-BRceCeZp.cjs} +3 -3
- package/dist/{blueprintFns-BRXgJCA2.js → blueprintFns-DNyUtopT.js} +3 -3
- package/dist/{blueprintSketcher-DobJgYX3.cjs → blueprintSketcher-DRXOTYuD.cjs} +4 -4
- package/dist/{blueprintSketcher-CNbOLihr.js → blueprintSketcher-kV7aFwRS.js} +4 -4
- package/dist/{boolean2D-CB3xwM21.cjs → boolean2D-DmPqFj_V.cjs} +5 -5
- package/dist/{boolean2D-C-TdmZUJ.js → boolean2D-TdJfMS8F.js} +5 -5
- package/dist/brepjs.cjs +300 -79
- package/dist/brepjs.js +300 -79
- package/dist/{cameraFns-BSHErz3i.cjs → cameraFns-B8Ai6b3Q.cjs} +4 -4
- package/dist/{cameraFns-CdtviYur.js → cameraFns-u08iOn7p.js} +4 -4
- package/dist/core/errors.d.ts +1 -0
- package/dist/core.cjs +4 -4
- package/dist/core.js +4 -4
- package/dist/{cornerFinder-BdK6e9T-.cjs → cornerFinder-BVUuCBX-.cjs} +1 -1
- package/dist/{cornerFinder-DCXsZzIe.js → cornerFinder-DfoRecV-.js} +1 -1
- package/dist/csg/builders.d.ts +13 -1
- package/dist/csg/evaluate.d.ts +10 -1
- package/dist/csg/evaluators/context.d.ts +2 -1
- package/dist/csg/evaluators/extension.d.ts +5 -0
- package/dist/csg/hash.d.ts +1 -0
- package/dist/csg/index.d.ts +2 -2
- package/dist/csg/jsonData.d.ts +8 -0
- package/dist/csg/serialize.d.ts +1 -1
- package/dist/csg/types.d.ts +50 -1
- package/dist/{curveFns-D_xfC1HQ.js → curveFns-D5V4jm7S.js} +2 -2
- package/dist/{curveFns-BXGE1xHa.cjs → curveFns-DciWOppG.cjs} +2 -2
- package/dist/{drawFns-CIfCWrWw.js → drawFns-BzuxoLHh.js} +14 -14
- package/dist/{drawFns-B9JThnjT.cjs → drawFns-DeUXFpjR.cjs} +14 -14
- package/dist/{errors-CTn8i3lY.js → errors-CDSezF9z.js} +1 -0
- package/dist/{errors-DWezb9DI.cjs → errors-gG-7hA7k.cjs} +1 -0
- package/dist/{faceFns-CGXvMjno.cjs → faceFns-DaXVpMr5.cjs} +3 -3
- package/dist/{faceFns-CwweiLRC.js → faceFns-DhdweJGk.js} +3 -3
- package/dist/{healingFns-D8_IZ8LC.cjs → healingFns-C_f03IV6.cjs} +5 -5
- package/dist/{healingFns-DVH0JBpC.js → healingFns-HekFOO_s.js} +5 -5
- package/dist/{helpers-jV94RJf1.js → helpers-BWNXoJz0.js} +7 -7
- package/dist/{helpers-BjKe6-M-.cjs → helpers-Dh4qTGcQ.cjs} +7 -7
- package/dist/{importFns-C0WKTbbQ.cjs → importFns-CKfKRdiq.cjs} +3 -3
- package/dist/{importFns-8OY0H66Q.js → importFns-DGnmgb9G.js} +3 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loftFns-B3aEz87L.cjs → loftFns-CI8uJc1D.cjs} +2 -2
- package/dist/{loftFns-CS0JYNr4.js → loftFns-DE1GYW9g.js} +2 -2
- package/dist/{measureFns-CyU-fOaZ.cjs → measureFns-B8Yj_BMz.cjs} +4 -4
- package/dist/{measureFns-LkW9r9Dm.js → measureFns-BoA-Fmwy.js} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-vO9xsIlB.cjs → meshFns-BT7W4b1c.cjs} +4 -4
- package/dist/{meshFns-BI_fEj-T.js → meshFns-o9MnZeir.js} +4 -4
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-CuCeiMNZ.cjs → originTrackingFns-B3-1bBED.cjs} +2 -2
- package/dist/{originTrackingFns-BTBemULp.js → originTrackingFns-BFmhk_Up.js} +2 -2
- package/dist/{planeOps-CkpMeheg.js → planeOps-BO6nvRja.js} +1 -1
- package/dist/{planeOps-CpupTCRM.cjs → planeOps-DqGSxcMr.cjs} +1 -1
- package/dist/{primitiveFns-CfxGT0nf.js → primitiveFns-DfhjU_X9.js} +5 -5
- package/dist/{primitiveFns-DSUL72Md.cjs → primitiveFns-Ke-n8Bib.cjs} +5 -5
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-BleIGUVN.cjs → refResolveFns-BPqbBoxy.cjs} +6 -6
- package/dist/{refResolveFns-BuS72b11.js → refResolveFns-C-6Xa_8k.js} +6 -6
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-DTZ96dTc.js → shapeFns-CUTM2ZDR.js} +3 -3
- package/dist/{shapeFns-BsuUPJR3.cjs → shapeFns-CmJNoPsh.cjs} +3 -3
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-CACpB7r3.cjs → shapeTypes-BWsKDxzf.cjs} +7 -5
- package/dist/{shapeTypes-CEFHrXNb.js → shapeTypes-DVpJHhgk.js} +7 -5
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-BdKU5bQ9.cjs → solidBuilders-B8t5h68e.cjs} +7 -7
- package/dist/{solidBuilders-De11-Gp-.js → solidBuilders-p_ppeTkc.js} +7 -7
- package/dist/{surfaceBuilders-BaVNAtRf.cjs → surfaceBuilders-Bn-c9xVR.cjs} +4 -4
- package/dist/{surfaceBuilders-QGhgel6X.js → surfaceBuilders-Dccm2kQX.js} +4 -4
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BHOADZSh.cjs → textBlueprints-DQi920gG.cjs} +9 -9
- package/dist/{textBlueprints-B_yfJn3S.js → textBlueprints-bFsyNLkO.js} +9 -9
- package/dist/{textMetrics-C4I5t9jZ.js → textMetrics-CvTwh4tR.js} +2 -2
- package/dist/{textMetrics-DHWYuTUK.cjs → textMetrics-DhysRMr7.cjs} +2 -2
- package/dist/{threadFns-P682L-Kg.cjs → threadFns-DAKMitvE.cjs} +8 -8
- package/dist/{threadFns-BVwQUwRJ.js → threadFns-DlGXBSK7.js} +8 -8
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-Cp390rTF.cjs → topologyQueryFns-CI4j3NTE.cjs} +2 -2
- package/dist/{topologyQueryFns-CFfTw0pA.js → topologyQueryFns-fNWsM4Lr.js} +2 -2
- package/dist/{validityTypes-Biiyb5lR.js → validityTypes-2DNKAPEw.js} +2 -2
- package/dist/{validityTypes-DtfxKjGs.cjs → validityTypes-D9oxhu4U.cjs} +2 -2
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +1 -1
|
@@ -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 { p as distance2d, u as angle2d, v as samePoint } from "./helpers-
|
|
3
|
+
import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-BWNXoJz0.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
package/dist/csg/builders.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Contour, Segment2D } from './segments.js';
|
|
|
3
3
|
import { Matrix4x4 } from '../core/types.js';
|
|
4
4
|
import { ColorInput } from '../topology/metadata/colorFns.js';
|
|
5
5
|
import { EdgeRef, ShapeRef } from '../topology/shapeRef/shapeRefTypes.js';
|
|
6
|
-
import { BoxNode, SphereNode, CylinderNode, ConeNode, TorusNode, PolygonNode, CircleNode, LineNode, VertexLitNode, EmptyNode, FuseNode, CutNode, IntersectNode, FuseAllNode, CutAllNode, TranslateNode, RotateNode, ScaleNode, MirrorNode, ExtrudeNode, RevolveNode, LoftNode, SweepNode, ProfileNode, PathNode, ColorNode, ShellNode, FilletNode, ChamferNode, CompoundNode, InstanceNode, IRNode, SolidNode, FaceNode, EdgeNode, VertexNode } from './types.js';
|
|
6
|
+
import { BoxNode, SphereNode, CylinderNode, ConeNode, TorusNode, PolygonNode, CircleNode, LineNode, VertexLitNode, EmptyNode, FuseNode, CutNode, IntersectNode, FuseAllNode, CutAllNode, TranslateNode, RotateNode, ScaleNode, MirrorNode, ExtrudeNode, RevolveNode, LoftNode, SweepNode, ProfileNode, PathNode, ColorNode, ShellNode, FilletNode, ChamferNode, CompoundNode, InstanceNode, ExtensionNode, IRNode, JsonValue, OutputKind, SolidNode, FaceNode, EdgeNode, VertexNode } from './types.js';
|
|
7
7
|
export declare function box(x: ScalarInput, y: ScalarInput, z: ScalarInput): BoxNode;
|
|
8
8
|
export declare function sphere(radius: ScalarInput): SphereNode;
|
|
9
9
|
export declare function cylinder(radius: ScalarInput, height: ScalarInput): CylinderNode;
|
|
@@ -83,4 +83,16 @@ export interface RevolveOptions {
|
|
|
83
83
|
export declare function revolve(profile: FaceNode, angle?: ScalarInput, options?: RevolveOptions): RevolveNode;
|
|
84
84
|
export declare function compound(children: ReadonlyArray<IRNode>): CompoundNode;
|
|
85
85
|
export declare function instance(source: IRNode, placements: ReadonlyArray<Matrix4x4>, fuse?: boolean): InstanceNode;
|
|
86
|
+
export interface ExtensionOptions {
|
|
87
|
+
readonly children?: ReadonlyArray<IRNode> | undefined;
|
|
88
|
+
readonly params?: Readonly<Record<string, ScalarInput>> | undefined;
|
|
89
|
+
/** Must be JSON-safe; defaults to `null`. */
|
|
90
|
+
readonly data?: JsonValue | undefined;
|
|
91
|
+
}
|
|
92
|
+
/** A caller-defined operation, materialized at evaluation by the
|
|
93
|
+
* `ExtensionEvaluator` registered under `name` in
|
|
94
|
+
* `EvaluatorOptions.extensions`. Unlike the other builders this one validates
|
|
95
|
+
* eagerly and throws a TypeError: a node whose data cannot be hashed
|
|
96
|
+
* canonically has no content address. */
|
|
97
|
+
export declare function extension(name: string, output: OutputKind, options?: ExtensionOptions): ExtensionNode;
|
|
86
98
|
export type { FaceNode, EdgeNode, VertexNode, SolidNode };
|
package/dist/csg/evaluate.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Result } from '../core/result.js';
|
|
|
2
2
|
import { AnyShape, Dimension } from '../core/shapeTypes.js';
|
|
3
3
|
import { ShapeMesh, MeshOptions } from '../topology/meshFns.js';
|
|
4
4
|
import { Env } from './expressions.js';
|
|
5
|
-
import { IRNode } from './types.js';
|
|
5
|
+
import { IRNode, ExtensionEvaluator } from './types.js';
|
|
6
6
|
export interface EvaluatorOptions {
|
|
7
7
|
/** Kernel id to materialize against. Defaults to the currently-active kernel. */
|
|
8
8
|
readonly kernel?: string | undefined;
|
|
@@ -30,6 +30,14 @@ export interface EvaluatorOptions {
|
|
|
30
30
|
* positive integer.
|
|
31
31
|
*/
|
|
32
32
|
readonly maxMeshCacheEntries?: number | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Evaluators for `Extension` nodes, keyed by node name. The registry is
|
|
35
|
+
* copied at construction (the cache key does not include it, so it must not
|
|
36
|
+
* change under a live cache). An Extension whose name is not registered
|
|
37
|
+
* evaluates to an Err with code `CSG_EXTENSION_UNKNOWN`. See
|
|
38
|
+
* {@link ExtensionEvaluator} for the ownership contract.
|
|
39
|
+
*/
|
|
40
|
+
readonly extensions?: Readonly<Record<string, ExtensionEvaluator>> | undefined;
|
|
33
41
|
}
|
|
34
42
|
export interface StepInfo {
|
|
35
43
|
readonly node: IRNode;
|
|
@@ -54,6 +62,7 @@ export declare class Evaluator implements Disposable {
|
|
|
54
62
|
private readonly maxMeshCacheEntries;
|
|
55
63
|
private readonly meshCache;
|
|
56
64
|
private readonly onStep?;
|
|
65
|
+
private readonly extensions;
|
|
57
66
|
private hits;
|
|
58
67
|
private misses;
|
|
59
68
|
private evictions;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AnyShape, Dimension } from '../../core/shapeTypes.js';
|
|
2
2
|
import { Result } from '../../core/result.js';
|
|
3
3
|
import { Env } from '../expressions.js';
|
|
4
|
-
import { IRNode } from '../types.js';
|
|
4
|
+
import { ExtensionEvaluator, IRNode } from '../types.js';
|
|
5
5
|
export interface EvalContext {
|
|
6
6
|
readonly env: Env;
|
|
7
7
|
readonly tolerance: number | undefined;
|
|
8
8
|
readonly evalNode: (node: IRNode) => Result<AnyShape<Dimension>>;
|
|
9
|
+
readonly extensions: ReadonlyMap<string, ExtensionEvaluator>;
|
|
9
10
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Result } from '../../core/result.js';
|
|
2
|
+
import { AnyShape, Dimension } from '../../core/shapeTypes.js';
|
|
3
|
+
import { ExtensionNode } from '../types.js';
|
|
4
|
+
import { EvalContext } from './context.js';
|
|
5
|
+
export declare function evalExtension(node: ExtensionNode, ctx: EvalContext): Result<AnyShape<Dimension>>;
|
package/dist/csg/hash.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export declare function fnvMixString(h: bigint, s: string): bigint;
|
|
|
5
5
|
export declare function fnvMixNumber(h: bigint, n: number): bigint;
|
|
6
6
|
export declare function fnvMixHash(h: bigint, child: bigint): bigint;
|
|
7
7
|
export declare function fnvMixInt32(h: bigint, n: number): bigint;
|
|
8
|
+
export declare function fnvMixText(h: bigint, s: string): bigint;
|
|
8
9
|
export declare function fnvMixBool(h: bigint, b: boolean): bigint;
|
|
9
10
|
export declare function toHex(h: bigint): string;
|
package/dist/csg/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* parameterize via named expression bindings; evaluate against the active
|
|
6
6
|
* kernel with subtree-level cache reuse for incremental parametric edits.
|
|
7
7
|
*/
|
|
8
|
-
export { box, sphere, cylinder, cone, torus, polygon, circle, line, vertex, emptySolid, emptyFace, emptyWire, fuse, cut, intersect, fuseAll, cutAll, translate, rotate, scale, mirror, extrude, revolve, loft, sweep, profile, path, color, fillet, chamfer, shell, compound, instance, type RevolveOptions, type LoftOptions, type SweepNodeOptions, type RotateOptions, type ScaleOptions, type MirrorOptions, } from './builders.js';
|
|
8
|
+
export { box, sphere, cylinder, cone, torus, polygon, circle, line, vertex, emptySolid, emptyFace, emptyWire, fuse, cut, intersect, fuseAll, cutAll, translate, rotate, scale, mirror, extrude, revolve, loft, sweep, profile, path, color, fillet, chamfer, shell, compound, instance, extension, type ExtensionOptions, type RevolveOptions, type LoftOptions, type SweepNodeOptions, type RotateOptions, type ScaleOptions, type MirrorOptions, } from './builders.js';
|
|
9
9
|
export { numLit, vec3Lit, vec2Lit, param, binOp, unaryOp, component, buildVec, add, mul, asScalarExpr, asVec3Expr, asVec2Expr, type Expr, type ExprValue, type Env, type ScalarInput, type Vec3Input, type Vec2Input, type BinaryOp, type UnaryOp, } from './expressions.js';
|
|
10
|
-
export type { IRNode, NodeKind, OutputKind, PrimitiveNode, BooleanNode, TransformIRNode, ExtrudeNode, RevolveNode, LoftNode, SweepNode, ProfileNode, PathNode, ColorNode, FilletNode, ChamferNode, ShellNode, InstanceNode, SolidNode, FaceNode, EdgeNode, VertexNode, AnyNode, } from './types.js';
|
|
10
|
+
export type { IRNode, NodeKind, OutputKind, PrimitiveNode, BooleanNode, TransformIRNode, ExtrudeNode, RevolveNode, LoftNode, SweepNode, ProfileNode, PathNode, ColorNode, FilletNode, ChamferNode, ShellNode, InstanceNode, ExtensionNode, ExtensionEvaluator, ExtensionInput, JsonValue, SolidNode, FaceNode, EdgeNode, VertexNode, AnyNode, } from './types.js';
|
|
11
11
|
export { outputKindOf } from './types.js';
|
|
12
12
|
export { lineTo, arcTo, bezierTo, ellipseArcTo, contour, type Contour, type Segment2D, type SegmentOptions, type EllipseArcOptions, } from './segments.js';
|
|
13
13
|
export { rectangularProfile, circularProfile, iBeamProfile, asymmetricIProfile, lShapeProfile, tShapeProfile, uShapeProfile, zShapeProfile, cShapeProfile, ellipseProfile, trapeziumProfile, rectangleHollowProfile, circleHollowProfile, arbitraryClosedProfile, arbitraryProfileWithVoids, type IBeamParams, type AsymmetricIParams, type LShapeParams, type TShapeParams, type UShapeParams, type ZShapeParams, type CShapeParams, type TrapeziumParams, type RectangleHollowParams, type CircleHollowParams, } from './profiles.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Result } from '../core/result.js';
|
|
2
|
+
import { JsonValue } from './types.js';
|
|
3
|
+
/** Validate `value` as JSON-safe and return its canonical frozen copy, or a
|
|
4
|
+
* message naming the first offending path (rooted at `path`). */
|
|
5
|
+
export declare function canonicalJson(value: unknown, path: string): Result<JsonValue, string>;
|
|
6
|
+
/** Type-tagged, length-prefixed Merkle mix of a JSON value; object keys are
|
|
7
|
+
* hashed in sorted order, so key order never changes the result. */
|
|
8
|
+
export declare function hashJson(h: bigint, v: JsonValue): bigint;
|
package/dist/csg/serialize.d.ts
CHANGED
package/dist/csg/types.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ import { Expr } from './expressions.js';
|
|
|
2
2
|
import { Contour, Segment2D } from './segments.js';
|
|
3
3
|
import { EdgeRef, ShapeRef } from '../topology/shapeRef/shapeRefTypes.js';
|
|
4
4
|
import { Matrix4x4 } from '../core/types.js';
|
|
5
|
+
import { AnyShape, Dimension } from '../core/shapeTypes.js';
|
|
6
|
+
import { Result } from '../core/result.js';
|
|
5
7
|
export type OutputKind = 'Solid' | 'Face' | 'Wire' | 'Edge' | 'Vertex' | 'Compound';
|
|
8
|
+
export declare function isOutputKind(v: unknown): v is OutputKind;
|
|
6
9
|
/** Output kinds that have a corresponding empty-shape builder + serializer. */
|
|
7
10
|
export type EmptyOutputKind = 'Solid' | 'Face' | 'Wire';
|
|
8
11
|
export interface IRNodeBase {
|
|
@@ -198,10 +201,56 @@ export interface InstanceNode extends IRNodeBase {
|
|
|
198
201
|
/** Fuse the placed copies into one solid; otherwise a Compound. */
|
|
199
202
|
readonly fuse: boolean;
|
|
200
203
|
}
|
|
204
|
+
/** A value `JSON.stringify` / `JSON.parse` round-trips exactly. */
|
|
205
|
+
export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
|
|
206
|
+
readonly [key: string]: JsonValue;
|
|
207
|
+
};
|
|
208
|
+
/** An operation the IR has no built-in kind for, materialized by the
|
|
209
|
+
* {@link ExtensionEvaluator} registered under `name` in
|
|
210
|
+
* `EvaluatorOptions.extensions`. `optimize` treats it as opaque: its
|
|
211
|
+
* children and params are optimized, the node itself is never folded. */
|
|
212
|
+
export interface ExtensionNode extends IRNodeBase {
|
|
213
|
+
readonly kind: 'Extension';
|
|
214
|
+
readonly name: string;
|
|
215
|
+
/** Declared at build time for `outputKindOf`; evaluation does not check the
|
|
216
|
+
* materialized shape against it. */
|
|
217
|
+
readonly output: OutputKind;
|
|
218
|
+
readonly children: readonly IRNode[];
|
|
219
|
+
/** Scalar inputs, resolved to numbers against the env before the evaluator
|
|
220
|
+
* runs, so they take part in param invalidation. */
|
|
221
|
+
readonly params: Readonly<Record<string, Expr>>;
|
|
222
|
+
/** Frozen canonical copy of the builder input; neither key order nor `-0`
|
|
223
|
+
* changes the hash. */
|
|
224
|
+
readonly data: JsonValue;
|
|
225
|
+
}
|
|
226
|
+
export interface ExtensionInput {
|
|
227
|
+
readonly params: Readonly<Record<string, number>>;
|
|
228
|
+
readonly data: JsonValue;
|
|
229
|
+
/** The node's children, materialized in order. */
|
|
230
|
+
readonly children: readonly AnyShape<Dimension>[];
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Materializes an {@link ExtensionNode}; registered by name through
|
|
234
|
+
* `EvaluatorOptions.extensions` and called under the Evaluator's kernel.
|
|
235
|
+
*
|
|
236
|
+
* The Evaluator caches the result by the node's content address, so it must
|
|
237
|
+
* depend only on `input`.
|
|
238
|
+
*
|
|
239
|
+
* Ownership: `children` are borrowed from the Evaluator's cache. Do not
|
|
240
|
+
* dispose them or keep them past the call (a bounded cache may evict them).
|
|
241
|
+
* Return either a fresh shape or one of `children` unchanged; the Evaluator
|
|
242
|
+
* owns and disposes the result, and reference-counts handles so a returned
|
|
243
|
+
* child is freed once. Never return a handle owned elsewhere, such as a
|
|
244
|
+
* borrowed sub-shape from `getFaces`.
|
|
245
|
+
*
|
|
246
|
+
* Return an `Err` for expected failures; a throw escapes `evaluate()` like a
|
|
247
|
+
* throw from any built-in evaluator.
|
|
248
|
+
*/
|
|
249
|
+
export type ExtensionEvaluator = (input: ExtensionInput) => Result<AnyShape<Dimension>>;
|
|
201
250
|
export type PrimitiveNode = BoxNode | SphereNode | CylinderNode | ConeNode | TorusNode | PolygonNode | CircleNode | LineNode | VertexLitNode | EmptyNode;
|
|
202
251
|
export type BooleanNode = FuseNode | CutNode | IntersectNode | FuseAllNode | CutAllNode;
|
|
203
252
|
export type TransformIRNode = TranslateNode | RotateNode | ScaleNode | MirrorNode;
|
|
204
|
-
export type IRNode = PrimitiveNode | BooleanNode | TransformIRNode | ExtrudeNode | RevolveNode | LoftNode | SweepNode | ProfileNode | PathNode | ColorNode | FilletNode | ChamferNode | ShellNode | CompoundNode | InstanceNode;
|
|
253
|
+
export type IRNode = PrimitiveNode | BooleanNode | TransformIRNode | ExtrudeNode | RevolveNode | LoftNode | SweepNode | ProfileNode | PathNode | ColorNode | FilletNode | ChamferNode | ShellNode | CompoundNode | InstanceNode | ExtensionNode;
|
|
205
254
|
export type NodeKind = IRNode['kind'];
|
|
206
255
|
export type AnyNode = IRNode;
|
|
207
256
|
/** Nodes that produce a 3D solid. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-
|
|
2
|
-
import { E as ok, g as err, l as typeCastError } from "./errors-
|
|
1
|
+
import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { E as ok, g as err, l as typeCastError } from "./errors-CDSezF9z.js";
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Curve and 1D shape functions — functional replacements for _1DShape/Curve methods.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Curve and 1D shape functions — functional replacements for _1DShape/Curve methods.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-DVpJHhgk.js";
|
|
2
2
|
import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
|
|
3
|
-
import { P as unwrap, s as safeIndex } from "./errors-
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { P as unwrap, s as safeIndex } from "./errors-CDSezF9z.js";
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-fNWsM4Lr.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
|
-
import { a as planeToWorld, o as resolvePlane } from "./planeOps-
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-
|
|
10
|
-
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-
|
|
8
|
+
import { a as planeToWorld, o as resolvePlane } from "./planeOps-BO6nvRja.js";
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-DhdweJGk.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-D5V4jm7S.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 { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-
|
|
15
|
-
import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } 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-Dccm2kQX.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-kV7aFwRS.js";
|
|
14
|
+
import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-BWNXoJz0.js";
|
|
15
|
+
import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-Dsp4t2ul.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-DfoRecV-.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-TdJfMS8F.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-bFsyNLkO.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-u08iOn7p.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_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
|
-
const require_errors = require("./errors-
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CI4j3NTE.cjs");
|
|
5
5
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
6
6
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
7
7
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
8
|
-
const require_planeOps = require("./planeOps-
|
|
9
|
-
const require_faceFns = require("./faceFns-
|
|
10
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
+
const require_planeOps = require("./planeOps-DqGSxcMr.cjs");
|
|
9
|
+
const require_faceFns = require("./faceFns-DaXVpMr5.cjs");
|
|
10
|
+
const require_curveFns = require("./curveFns-DciWOppG.cjs");
|
|
11
11
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
12
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
13
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
14
|
-
const require_helpers = require("./helpers-
|
|
15
|
-
const require_blueprint = require("./blueprint-
|
|
16
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
17
|
-
const require_boolean2D = require("./boolean2D-
|
|
18
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
19
|
-
const require_cameraFns = require("./cameraFns-
|
|
12
|
+
const require_surfaceBuilders = require("./surfaceBuilders-Bn-c9xVR.cjs");
|
|
13
|
+
const require_blueprintSketcher = require("./blueprintSketcher-DRXOTYuD.cjs");
|
|
14
|
+
const require_helpers = require("./helpers-Dh4qTGcQ.cjs");
|
|
15
|
+
const require_blueprint = require("./blueprint-CJuRunkd.cjs");
|
|
16
|
+
const require_cornerFinder = require("./cornerFinder-BVUuCBX-.cjs");
|
|
17
|
+
const require_boolean2D = require("./boolean2D-DmPqFj_V.cjs");
|
|
18
|
+
const require_textBlueprints = require("./textBlueprints-DQi920gG.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-B8Ai6b3Q.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.
|
|
@@ -215,6 +215,7 @@ var BrepErrorCode = {
|
|
|
215
215
|
DRAFT_INVALID_ANGLE: "DRAFT_INVALID_ANGLE",
|
|
216
216
|
DRAFT_NOT_3D: "DRAFT_NOT_3D",
|
|
217
217
|
DRAFT_FAILED: "DRAFT_FAILED",
|
|
218
|
+
CSG_EXTENSION_UNKNOWN: "CSG_EXTENSION_UNKNOWN",
|
|
218
219
|
FUSE_NOT_3D: "FUSE_NOT_3D",
|
|
219
220
|
CUT_NOT_3D: "CUT_NOT_3D",
|
|
220
221
|
INTERSECT_NOT_3D: "INTERSECT_NOT_3D",
|
|
@@ -215,6 +215,7 @@ var BrepErrorCode = {
|
|
|
215
215
|
DRAFT_INVALID_ANGLE: "DRAFT_INVALID_ANGLE",
|
|
216
216
|
DRAFT_NOT_3D: "DRAFT_NOT_3D",
|
|
217
217
|
DRAFT_FAILED: "DRAFT_FAILED",
|
|
218
|
+
CSG_EXTENSION_UNKNOWN: "CSG_EXTENSION_UNKNOWN",
|
|
218
219
|
FUSE_NOT_3D: "FUSE_NOT_3D",
|
|
219
220
|
CUT_NOT_3D: "CUT_NOT_3D",
|
|
220
221
|
INTERSECT_NOT_3D: "INTERSECT_NOT_3D",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CI4j3NTE.cjs");
|
|
4
4
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as castShape, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { E as ok, P as unwrap, g as err, l as typeCastError } from "./errors-
|
|
3
|
-
import { a as getCachedSurfaceType } from "./topologyQueryFns-
|
|
1
|
+
import { i as castShape, q as getKernel } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { E as ok, P as unwrap, g as err, l as typeCastError } from "./errors-CDSezF9z.js";
|
|
3
|
+
import { a as getCachedSurfaceType } from "./topologyQueryFns-fNWsM4Lr.js";
|
|
4
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CI4j3NTE.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
5
|
+
const require_faceFns = require("./faceFns-DaXVpMr5.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-B8t5h68e.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
8
|
//#region src/topology/threeHelpers.ts
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as isSolid, D as getShapeKind, T as isWire, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, x as isShape3D, y as isFace } from "./shapeTypes-
|
|
2
|
-
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, x as isOk } from "./errors-
|
|
3
|
-
import { c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { C as isSolid, D as getShapeKind, T as isWire, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, x as isShape3D, y as isFace } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, x as isOk } from "./errors-CDSezF9z.js";
|
|
3
|
+
import { c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-fNWsM4Lr.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { y as downcast } from "./faceFns-
|
|
6
|
-
import { C as propagateAllMetadata, f as cut, h as fuseAll, m as fuse, p as cutAll, x as collectInputFaceHashes } from "./solidBuilders-
|
|
5
|
+
import { y as downcast } from "./faceFns-DhdweJGk.js";
|
|
6
|
+
import { C as propagateAllMetadata, f as cut, h as fuseAll, m as fuse, p as cutAll, x as collectInputFaceHashes } from "./solidBuilders-p_ppeTkc.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
8
|
//#region src/topology/threeHelpers.ts
|
|
9
9
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { q as getKernel, y as isFace } from "./shapeTypes-
|
|
2
|
-
import { E as ok, g as err, o as queryError, x as isOk } from "./errors-
|
|
3
|
-
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { q as getKernel, y as isFace } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { E as ok, g as err, o as queryError, x as isOk } from "./errors-CDSezF9z.js";
|
|
3
|
+
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-fNWsM4Lr.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-DhdweJGk.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-CUTM2ZDR.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-D5V4jm7S.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-BoA-Fmwy.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,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CI4j3NTE.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-DaXVpMr5.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-CmJNoPsh.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-DciWOppG.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-B8Yj_BMz.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,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
|
-
const require_errors = require("./errors-
|
|
3
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-CJuRunkd.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) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { n as castResultShape, q as getKernel } from "./shapeTypes-DVpJHhgk.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At$1 } from "./bug-BdOHwn_e.js";
|
|
3
|
-
import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-
|
|
3
|
+
import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-CDSezF9z.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-Dsp4t2ul.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) {
|
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-BT7W4b1c.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-CKfKRdiq.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-o9MnZeir.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-DGnmgb9G.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_errors = require("./errors-gG-7hA7k.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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
2
|
-
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-
|
|
1
|
+
import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-CDSezF9z.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { c as vecLength, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
//#region src/operations/extrudeUtils.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CI4j3NTE.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DaXVpMr5.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { T as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CDSezF9z.js";
|
|
3
|
+
import { T as kernelCallRaw } from "./topologyQueryFns-fNWsM4Lr.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-DhdweJGk.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-B8Yj_BMz.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-BoA-Fmwy.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_errors = require("./errors-gG-7hA7k.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CI4j3NTE.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-B3-1bBED.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 { q as getKernel, ut as qualityDeflection } from "./shapeTypes-
|
|
2
|
-
import { E as ok, g as err, r as ioError } from "./errors-
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { t as getFaceOrigins } from "./originTrackingFns-
|
|
1
|
+
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { E as ok, g as err, r as ioError } from "./errors-CDSezF9z.js";
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-fNWsM4Lr.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-BFmhk_Up.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-DAKMitvE.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-CI8uJc1D.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-DlGXBSK7.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-DE1GYW9g.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,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CI4j3NTE.cjs");
|
|
3
3
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
4
4
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DVpJHhgk.js";
|
|
2
|
+
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-fNWsM4Lr.js";
|
|
3
3
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
4
4
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-
|
|
1
|
+
import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-CDSezF9z.js";
|
|
2
2
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { d as vecNormalize, h as vecScale, m as vecRotate, r as vecCross, s as vecIsZero, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|