brepjs 9.6.4 → 10.0.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/blueprints/Blueprint.d.ts +3 -3
- package/dist/2d/blueprints/Blueprint.d.ts.map +1 -1
- package/dist/2d/blueprints/Blueprints.d.ts +3 -3
- package/dist/2d/blueprints/Blueprints.d.ts.map +1 -1
- package/dist/2d/blueprints/CompoundBlueprint.d.ts +3 -3
- package/dist/2d/blueprints/CompoundBlueprint.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-D73qryz7.cjs → Blueprint-B6UDSVJN.cjs} +5 -5
- package/dist/{Blueprint-DebTNazC.js → Blueprint-QlgNyzP7.js} +5 -5
- package/dist/{boolean2D-Die5sMjA.cjs → boolean2D-DZxTrl9x.cjs} +7 -7
- package/dist/{boolean2D-Dg9wSxP6.js → boolean2D-Gr-OYFsO.js} +7 -7
- package/dist/{booleanFns-D3QHXA3L.js → booleanFns-BEIrQNUH.js} +3 -3
- package/dist/{booleanFns-uwsn5G2P.cjs → booleanFns-CR6vk8qv.cjs} +3 -3
- package/dist/brepjs.cjs +22 -17
- package/dist/brepjs.js +47 -42
- package/dist/core/shapeTypes.d.ts +84 -33
- package/dist/core/shapeTypes.d.ts.map +1 -1
- package/dist/core/typeErrors.d.ts +17 -0
- package/dist/core/typeErrors.d.ts.map +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-DvYYBvKj.js → cornerFinder-Bh_jsF_w.js} +1 -1
- package/dist/{cornerFinder-BcA7Chiv.cjs → cornerFinder-DlwI0iHu.cjs} +1 -1
- package/dist/{curveFns-DY55OAr3.js → curveFns-CNkC51il.js} +1 -1
- package/dist/{curveFns-BAXBhYiR.cjs → curveFns-jnEgxP5N.cjs} +1 -1
- package/dist/{drawFns-a74YTSws.cjs → drawFns-D0Wg1cy7.cjs} +10 -10
- package/dist/{drawFns-Diysw_m4.js → drawFns-Ex_DyuI1.js} +10 -10
- package/dist/{faceFns-CjRZGka6.cjs → faceFns-B10DQksf.cjs} +1 -1
- package/dist/{faceFns-BQ26A_zd.js → faceFns-DKkW12_x.js} +1 -1
- package/dist/{helpers-D2N1HNiK.cjs → helpers-4kc7odPn.cjs} +4 -4
- package/dist/{helpers-TF7WTmKB.js → helpers-BPzEhlP8.js} +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/io/importFns.d.ts +4 -4
- package/dist/io/importFns.d.ts.map +1 -1
- package/dist/io/objImportFns.d.ts +2 -2
- package/dist/io/objImportFns.d.ts.map +1 -1
- package/dist/io/threemfImportFns.d.ts +2 -2
- package/dist/io/threemfImportFns.d.ts.map +1 -1
- package/dist/io.cjs +3 -3
- package/dist/io.js +3 -3
- package/dist/{loft-C55d1XrF.cjs → loft-ByirrIHz.cjs} +3 -3
- package/dist/{loft-DK0_xi5M.js → loft-CfNUe13X.js} +3 -3
- package/dist/measurement/interferenceFns.d.ts +3 -3
- package/dist/measurement/interferenceFns.d.ts.map +1 -1
- package/dist/measurement/measureFns.d.ts +10 -10
- package/dist/measurement/measureFns.d.ts.map +1 -1
- package/dist/{measurement-DQWf2-IP.js → measurement-BMfzcJ2H.js} +2 -2
- package/dist/{measurement-BF_JvjuA.cjs → measurement-CpWygrRd.cjs} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CmZM1bAd.js → meshFns-CbuZpQmE.js} +2 -2
- package/dist/{meshFns-DYdC0ztK.cjs → meshFns-DRZcKqgZ.cjs} +2 -2
- package/dist/operations/api.d.ts +4 -4
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/exporterFns.d.ts +2 -2
- package/dist/operations/exporterFns.d.ts.map +1 -1
- package/dist/operations/exporters.d.ts +2 -2
- package/dist/operations/exporters.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +7 -7
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/guidedSweepFns.d.ts +2 -2
- package/dist/operations/guidedSweepFns.d.ts.map +1 -1
- package/dist/operations/historyFns.d.ts +6 -6
- package/dist/operations/historyFns.d.ts.map +1 -1
- package/dist/operations/loftFns.d.ts +2 -2
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/operations/multiSweepFns.d.ts +3 -3
- package/dist/operations/multiSweepFns.d.ts.map +1 -1
- package/dist/operations/roofFns.d.ts +2 -2
- package/dist/operations/roofFns.d.ts.map +1 -1
- package/dist/{operations-CMcb2KJ3.cjs → operations-DAt3B8iS.cjs} +5 -5
- package/dist/{operations-DhgY338f.js → operations-DBJ9dkjD.js} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query/finderCore.d.ts +5 -5
- package/dist/query/finderCore.d.ts.map +1 -1
- package/dist/query/helpers.d.ts +2 -2
- package/dist/query/helpers.d.ts.map +1 -1
- package/dist/query/shapeDistanceFilter.d.ts +2 -2
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
- package/dist/query/vertexFinder.d.ts.map +1 -1
- package/dist/query.cjs +4 -4
- package/dist/query.js +5 -5
- package/dist/{shapeFns-DBSqO7QJ.js → shapeFns-BrfVnd9Q.js} +2 -2
- package/dist/{shapeFns-D6qzq_Cu.cjs → shapeFns-vPR93KGT.cjs} +2 -2
- package/dist/{shapeTypes-BHy5rqqk.cjs → shapeTypes-BxAzFSfl.cjs} +25 -1
- package/dist/{shapeTypes-1WVcBBn_.js → shapeTypes-C1z8HWJf.js} +29 -5
- package/dist/sketching/CompoundSketch.d.ts +1 -1
- package/dist/sketching/draw.d.ts +3 -3
- package/dist/sketching/draw.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-C_UpU97c.js → surfaceBuilders-B-yoDL2e.js} +2 -2
- package/dist/{surfaceBuilders-DU6Pq2ju.cjs → surfaceBuilders-BkTPbZFl.cjs} +2 -2
- package/dist/topology/adjacencyFns.d.ts +7 -7
- package/dist/topology/adjacencyFns.d.ts.map +1 -1
- package/dist/topology/api.d.ts +24 -24
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/apiTypes.d.ts +7 -7
- package/dist/topology/apiTypes.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts +7 -7
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/cast.d.ts +6 -6
- package/dist/topology/cast.d.ts.map +1 -1
- package/dist/topology/colorFns.d.ts +7 -7
- package/dist/topology/colorFns.d.ts.map +1 -1
- package/dist/topology/curveFns.d.ts +14 -14
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/faceTagFns.d.ts +8 -8
- package/dist/topology/faceTagFns.d.ts.map +1 -1
- package/dist/topology/healingFns.d.ts +7 -7
- package/dist/topology/healingFns.d.ts.map +1 -1
- package/dist/topology/hullFns.d.ts +2 -2
- package/dist/topology/hullFns.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts +6 -6
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +2 -2
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +29 -29
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeUtils.d.ts +2 -2
- package/dist/topology/shapeUtils.d.ts.map +1 -1
- package/dist/topology/solidBuilders.d.ts +2 -2
- package/dist/topology/solidBuilders.d.ts.map +1 -1
- package/dist/topology/surfaceBuilders.d.ts +5 -5
- package/dist/topology/surfaceBuilders.d.ts.map +1 -1
- package/dist/{topology-B-UCQkll.js → topology-Bt4qS8pS.js} +6 -6
- package/dist/{topology-BrCU7nI6.cjs → topology-CBZcJ5pS.cjs} +6 -6
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyShape, Face, Shape3D } from '../core/shapeTypes.js';
|
|
1
|
+
import { AnyShape, Dimension, Face, Shape3D } from '../core/shapeTypes.js';
|
|
2
2
|
import { Result } from '../core/result.js';
|
|
3
3
|
import { PlaneInput } from '../core/planeTypes.js';
|
|
4
4
|
import { BooleanOptions } from '../kernel/types.js';
|
|
@@ -79,16 +79,16 @@ export declare function cutAll(base: Shape3D, tools: Shape3D[], { optimisation,
|
|
|
79
79
|
* @param options.planeSize Half-size of the cutting plane (default 1e4)
|
|
80
80
|
* @returns The section result as a shape (typically containing wires/edges)
|
|
81
81
|
*/
|
|
82
|
-
export declare function section(shape: AnyShape
|
|
82
|
+
export declare function section(shape: AnyShape<Dimension>, plane: PlaneInput, { approximation, planeSize }?: {
|
|
83
83
|
approximation?: boolean;
|
|
84
84
|
planeSize?: number;
|
|
85
|
-
}): Result<AnyShape
|
|
85
|
+
}): Result<AnyShape<Dimension>>;
|
|
86
86
|
/**
|
|
87
87
|
* Section a shape with a plane and return a filled Face.
|
|
88
88
|
* The outermost wire (largest bounding-box area) becomes the outer boundary;
|
|
89
89
|
* any remaining wires are treated as holes.
|
|
90
90
|
*/
|
|
91
|
-
export declare function sectionToFace(shape: AnyShape
|
|
91
|
+
export declare function sectionToFace(shape: AnyShape<Dimension>, plane: PlaneInput, options?: {
|
|
92
92
|
approximation?: boolean;
|
|
93
93
|
planeSize?: number;
|
|
94
94
|
}): Result<Face>;
|
|
@@ -96,13 +96,13 @@ export declare function sectionToFace(shape: AnyShape, plane: PlaneInput, option
|
|
|
96
96
|
* Split a shape with one or more tool shapes using BRepAlgoAPI_Splitter.
|
|
97
97
|
* Returns all pieces from the split as a compound.
|
|
98
98
|
*/
|
|
99
|
-
export declare function split(shape: AnyShape
|
|
99
|
+
export declare function split(shape: AnyShape<Dimension>, tools: AnyShape<Dimension>[]): Result<AnyShape<Dimension>>;
|
|
100
100
|
/**
|
|
101
101
|
* Slice a shape with multiple planes, returning one cross-section per plane.
|
|
102
102
|
* Each result entry corresponds to the input plane at the same index.
|
|
103
103
|
*/
|
|
104
|
-
export declare function slice(shape: AnyShape
|
|
104
|
+
export declare function slice(shape: AnyShape<Dimension>, planes: PlaneInput[], options?: {
|
|
105
105
|
approximation?: boolean;
|
|
106
106
|
planeSize?: number;
|
|
107
|
-
}): Result<AnyShape[]>;
|
|
107
|
+
}): Result<AnyShape<Dimension>[]>;
|
|
108
108
|
//# sourceMappingURL=booleanFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAQ,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAQ,MAAM,uBAAuB,CAAC;AAEtF,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAkCxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,CAAC;AAyD/B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAClB,CAAC,EAAE,OAAO,EACV,CAAC,EAAE,OAAO,EACV,EAAE,YAAqB,EAAE,QAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,GAAE,cAAmB,GACnF,MAAM,CAAC,OAAO,CAAC,CAqBjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,EACb,EAAE,YAAqB,EAAE,QAAgB,EAAE,MAAM,EAAE,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EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,GAC3B,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAiC7B;AAMD;;;GAGG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,MAAM,EAAE,UAAU,EAAE,EACpB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAQ/B"}
|
package/dist/topology/cast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KernelShape, KernelType } from '../kernel/types.js';
|
|
2
|
-
import { AnyShape, CompSolid, Shape3D, Wire } from '../core/shapeTypes.js';
|
|
2
|
+
import { AnyShape, CompSolid, Dimension, Shape3D, Wire } from '../core/shapeTypes.js';
|
|
3
3
|
import { Result } from '../core/result.js';
|
|
4
4
|
/** String literal identifying a topological entity type for TopExp_Explorer iteration. */
|
|
5
5
|
export type TopoEntity = 'vertex' | 'edge' | 'wire' | 'face' | 'shell' | 'solid' | 'solidCompound' | 'compound' | 'shape';
|
|
@@ -24,18 +24,18 @@ export declare function downcast(shape: KernelShape): Result<GenericTopo>;
|
|
|
24
24
|
*
|
|
25
25
|
* @returns Ok with a typed AnyShape, or Err if the shape type is unknown.
|
|
26
26
|
*/
|
|
27
|
-
export declare function cast(shape: KernelShape): Result<AnyShape
|
|
27
|
+
export declare function cast(shape: KernelShape): Result<AnyShape<Dimension>>;
|
|
28
28
|
/** Type guard: return true if the shape is a 3D body (Shell, Solid, CompSolid, or Compound). */
|
|
29
|
-
export declare function isShape3D(shape: AnyShape): shape is Shape3D;
|
|
29
|
+
export declare function isShape3D(shape: AnyShape<Dimension>): shape is Shape3D;
|
|
30
30
|
/** Type guard: return true if the shape is a Wire. */
|
|
31
|
-
export declare function isWire(shape: AnyShape): shape is Wire;
|
|
31
|
+
export declare function isWire(shape: AnyShape<Dimension>): shape is Wire;
|
|
32
32
|
/** Type guard: return true if the shape is a CompSolid. */
|
|
33
|
-
export declare function isCompSolid(shape: AnyShape): shape is CompSolid;
|
|
33
|
+
export declare function isCompSolid(shape: AnyShape<Dimension>): shape is CompSolid;
|
|
34
34
|
/**
|
|
35
35
|
* Deserialize a shape from a BREP string representation.
|
|
36
36
|
*
|
|
37
37
|
* @param data - BREP string produced by toBREP().
|
|
38
38
|
* @returns Ok with the deserialized shape, or Err if parsing fails.
|
|
39
39
|
*/
|
|
40
|
-
export declare function fromBREP(data: string): Result<AnyShape
|
|
40
|
+
export declare function fromBREP(data: string): Result<AnyShape<Dimension>>;
|
|
41
41
|
//# sourceMappingURL=cast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cast.d.ts","sourceRoot":"","sources":["../../src/topology/cast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"cast.d.ts","sourceRoot":"","sources":["../../src/topology/cast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAI3F,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAEzD,0FAA0F;AAC1F,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,eAAe,GACf,UAAU,GACV,OAAO,CAAC;AAEZ,+EAA+E;AAC/E,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AAetC,wEAAwE;AACxE,eAAO,MAAM,MAAM,GAAI,QAAQ,UAAU,KAAG,UAE3C,CAAC;AAoBF,eAAO,MAAM,QAAQ,GACnB,OAAO,WAAW,EAClB,MAAM,UAAU,KACf,gBAAgB,CAAC,WAAW,CAO9B,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,SAAS,GAAI,OAAO,WAAW,KAAG,MAAM,CAAC,UAAU,CAI/D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAShE;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAKpE;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,KAAK,IAAI,OAAO,CAEtE;AAED,sDAAsD;AACtD,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,KAAK,IAAI,IAAI,CAEhE;AAED,2DAA2D;AAC3D,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,KAAK,IAAI,SAAS,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAElE"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { ShapeEvolution } from '../kernel/types.js';
|
|
2
|
-
import { AnyShape, Face } from '../core/shapeTypes.js';
|
|
2
|
+
import { AnyShape, Dimension, Face } from '../core/shapeTypes.js';
|
|
3
3
|
/** RGBA color as 0-1 floats. */
|
|
4
4
|
export type Color = [number, number, number, number];
|
|
5
5
|
/** Accepted color inputs: hex string, RGB tuple, or RGBA tuple. */
|
|
6
6
|
export type ColorInput = string | [number, number, number] | [number, number, number, number];
|
|
7
7
|
/** O(1) check whether a shape has any color metadata (shape or face level). */
|
|
8
|
-
export declare function hasColorMetadata(shape: AnyShape): boolean;
|
|
8
|
+
export declare function hasColorMetadata(shape: AnyShape<Dimension>): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Set a whole-shape color (stored externally via WeakMap).
|
|
11
11
|
* Returns the same shape reference.
|
|
12
12
|
*/
|
|
13
|
-
export declare function colorShape<T extends AnyShape
|
|
13
|
+
export declare function colorShape<T extends AnyShape<Dimension>>(shape: T, color: ColorInput): T;
|
|
14
14
|
/**
|
|
15
15
|
* Set per-face colors on a shape.
|
|
16
16
|
* Returns the same shape reference.
|
|
17
17
|
*/
|
|
18
|
-
export declare function colorFaces<T extends AnyShape
|
|
18
|
+
export declare function colorFaces<T extends AnyShape<Dimension>>(shape: T, faces: Face<Dimension>[], color: ColorInput): T;
|
|
19
19
|
/**
|
|
20
20
|
* Get the whole-shape color, or undefined if none set.
|
|
21
21
|
*/
|
|
22
|
-
export declare function getShapeColor(shape: AnyShape): Color | undefined;
|
|
22
|
+
export declare function getShapeColor(shape: AnyShape<Dimension>): Color | undefined;
|
|
23
23
|
/**
|
|
24
24
|
* Get the color of a specific face, or undefined if none set.
|
|
25
25
|
*/
|
|
26
|
-
export declare function getFaceColor(shape: AnyShape
|
|
26
|
+
export declare function getFaceColor(shape: AnyShape<Dimension>, face: Face<Dimension>): Color | undefined;
|
|
27
27
|
/**
|
|
28
28
|
* Propagate colors from input shapes to a result shape using a
|
|
29
29
|
* kernel-provided ShapeEvolution record (no direct kernel op access needed).
|
|
30
30
|
*/
|
|
31
|
-
export declare function propagateColorsFromEvolution(evolution: ShapeEvolution, inputs: readonly AnyShape[], result: AnyShape): void;
|
|
31
|
+
export declare function propagateColorsFromEvolution(evolution: ShapeEvolution, inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
32
32
|
//# sourceMappingURL=colorFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorFns.d.ts","sourceRoot":"","sources":["../../src/topology/colorFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"colorFns.d.ts","sourceRoot":"","sources":["../../src/topology/colorFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAOvE,gCAAgC;AAChC,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAErD,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAY9F,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,OAAO,CAEpE;AA0CD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,CAGxF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,QAAQ,CAAC,SAAS,CAAC,EACtD,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EACxB,KAAK,EAAE,UAAU,GAChB,CAAC,CAOH;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,KAAK,GAAG,SAAS,CAE3E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK,GAAG,SAAS,CAIjG;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,SAAS,QAAQ,CAAC,SAAS,CAAC,EAAE,EACtC,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,GAC1B,IAAI,CA+BN"}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { Vec3 } from '../core/types.js';
|
|
2
|
-
import { Edge, Wire } from '../core/shapeTypes.js';
|
|
2
|
+
import { Dimension, Edge, Wire } from '../core/shapeTypes.js';
|
|
3
3
|
import { CurveType } from '../core/definitionMaps.js';
|
|
4
4
|
import { Result } from '../core/result.js';
|
|
5
5
|
/**
|
|
6
6
|
* Get the geometric curve type of an edge or wire (LINE, CIRCLE, BSPLINE, etc.).
|
|
7
7
|
*/
|
|
8
|
-
export declare function getCurveType(shape: Edge | Wire): CurveType;
|
|
8
|
+
export declare function getCurveType(shape: Edge<Dimension> | Wire<Dimension>): CurveType;
|
|
9
9
|
/** Get the start point of a curve. */
|
|
10
|
-
export declare function curveStartPoint(shape: Edge | Wire): Vec3;
|
|
10
|
+
export declare function curveStartPoint(shape: Edge<Dimension> | Wire<Dimension>): Vec3;
|
|
11
11
|
/** Get the end point of a curve. */
|
|
12
|
-
export declare function curveEndPoint(shape: Edge | Wire): Vec3;
|
|
12
|
+
export declare function curveEndPoint(shape: Edge<Dimension> | Wire<Dimension>): Vec3;
|
|
13
13
|
/**
|
|
14
14
|
* Get a point at a normalized parameter position on the curve.
|
|
15
15
|
* @param shape - Edge or wire to evaluate.
|
|
16
16
|
* @param position - Normalized parameter (0 = start, 0.5 = midpoint, 1 = end).
|
|
17
17
|
*/
|
|
18
|
-
export declare function curvePointAt(shape: Edge | Wire
|
|
18
|
+
export declare function curvePointAt(shape: Edge<Dimension> | Wire<Dimension>, position?: number): Vec3;
|
|
19
19
|
/**
|
|
20
20
|
* Get the tangent vector at a normalized parameter position on the curve.
|
|
21
21
|
* @param shape - Edge or wire to evaluate.
|
|
22
22
|
* @param position - Normalized parameter (0 = start, 0.5 = midpoint, 1 = end).
|
|
23
23
|
*/
|
|
24
|
-
export declare function curveTangentAt(shape: Edge | Wire
|
|
24
|
+
export declare function curveTangentAt(shape: Edge<Dimension> | Wire<Dimension>, position?: number): Vec3;
|
|
25
25
|
/** Get the arc length of an edge or wire. */
|
|
26
|
-
export declare function curveLength(shape: Edge | Wire): number;
|
|
26
|
+
export declare function curveLength(shape: Edge<Dimension> | Wire<Dimension>): number;
|
|
27
27
|
/** Check if the curve is closed. */
|
|
28
|
-
export declare function curveIsClosed(shape: Edge | Wire): boolean;
|
|
28
|
+
export declare function curveIsClosed(shape: Edge<Dimension> | Wire<Dimension>): boolean;
|
|
29
29
|
/** Check if the curve is periodic. */
|
|
30
|
-
export declare function curveIsPeriodic(shape: Edge | Wire): boolean;
|
|
30
|
+
export declare function curveIsPeriodic(shape: Edge<Dimension> | Wire<Dimension>): boolean;
|
|
31
31
|
/** Get the period of a periodic curve. */
|
|
32
|
-
export declare function curvePeriod(shape: Edge | Wire): number;
|
|
32
|
+
export declare function curvePeriod(shape: Edge<Dimension> | Wire<Dimension>): number;
|
|
33
33
|
/** Get the topological orientation of an edge or wire. */
|
|
34
|
-
export declare function getOrientation(shape: Edge | Wire): 'forward' | 'backward';
|
|
35
|
-
/** Flip the orientation of an edge or wire. Returns a new shape. */
|
|
36
|
-
export declare function flipOrientation(shape: Edge | Wire): Edge | Wire
|
|
34
|
+
export declare function getOrientation(shape: Edge<Dimension> | Wire<Dimension>): 'forward' | 'backward';
|
|
35
|
+
/** Flip the orientation of an edge or wire. Returns a new shape with the same dimension. */
|
|
36
|
+
export declare function flipOrientation<D extends Dimension>(shape: Edge<D> | Wire<D>): Edge<D> | Wire<D>;
|
|
37
37
|
/** Options for BSpline interpolation through points. */
|
|
38
38
|
export interface InterpolateCurveOptions {
|
|
39
39
|
/** If true, create a periodic (closed) BSpline. */
|
|
@@ -76,5 +76,5 @@ export declare function approximateCurve(points: Vec3[], options?: ApproximateCu
|
|
|
76
76
|
* @param kind - Join type for offset corners ('arc', 'intersection', or 'tangent').
|
|
77
77
|
* @returns Ok with the offset wire, or Err if the operation fails.
|
|
78
78
|
*/
|
|
79
|
-
export declare function offsetWire2D(wire: Wire
|
|
79
|
+
export declare function offsetWire2D(wire: Wire<Dimension>, offset: number, kind?: 'arc' | 'intersection' | 'tangent' | 'chamfer'): Result<Wire>;
|
|
80
80
|
//# sourceMappingURL=curveFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curveFns.d.ts","sourceRoot":"","sources":["../../src/topology/curveFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"curveFns.d.ts","sourceRoot":"","sources":["../../src/topology/curveFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAQzD;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,SA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js';
|
|
2
|
+
import { AnyShape, Dimension, Face } from '../core/shapeTypes.js';
|
|
3
3
|
/** O(1) check whether a shape has any face tags attached. */
|
|
4
|
-
export declare function hasFaceTags(shape: AnyShape): boolean;
|
|
4
|
+
export declare function hasFaceTags(shape: AnyShape<Dimension>): boolean;
|
|
5
5
|
/**
|
|
6
6
|
* Tag selected faces with a string name.
|
|
7
7
|
*
|
|
@@ -10,29 +10,29 @@ export declare function hasFaceTags(shape: AnyShape): boolean;
|
|
|
10
10
|
* @param tag - The tag name to assign.
|
|
11
11
|
* @returns The same shape (tags are stored externally).
|
|
12
12
|
*/
|
|
13
|
-
export declare function tagFaces(shape: AnyShape
|
|
13
|
+
export declare function tagFaces(shape: AnyShape<Dimension>, selector: Face<Dimension>[] | ((face: Face<Dimension>) => boolean), tag: string): AnyShape<Dimension>;
|
|
14
14
|
/**
|
|
15
15
|
* Find all faces on a shape that have the given tag.
|
|
16
16
|
*
|
|
17
17
|
* Checks both direct tags and propagated origins (for faces that
|
|
18
18
|
* survived boolean/modifier operations).
|
|
19
19
|
*/
|
|
20
|
-
export declare function findFacesByTag(shape: AnyShape
|
|
20
|
+
export declare function findFacesByTag(shape: AnyShape<Dimension>, tag: string): Face<Dimension>[];
|
|
21
21
|
/**
|
|
22
22
|
* Get all tags and their associated faces on a shape.
|
|
23
23
|
*/
|
|
24
|
-
export declare function getFaceTags(shape: AnyShape): Map<string, Face[]>;
|
|
24
|
+
export declare function getFaceTags(shape: AnyShape<Dimension>): Map<string, Face<Dimension>[]>;
|
|
25
25
|
/**
|
|
26
26
|
* Store arbitrary metadata for a tag on a shape.
|
|
27
27
|
*/
|
|
28
|
-
export declare function setTagMetadata(shape: AnyShape
|
|
28
|
+
export declare function setTagMetadata(shape: AnyShape<Dimension>, tag: string, metadata: Record<string, unknown>): AnyShape<Dimension>;
|
|
29
29
|
/**
|
|
30
30
|
* Retrieve metadata for a tag on a shape.
|
|
31
31
|
*/
|
|
32
|
-
export declare function getTagMetadata(shape: AnyShape
|
|
32
|
+
export declare function getTagMetadata(shape: AnyShape<Dimension>, tag: string): Record<string, unknown> | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* Propagate face tags from input shapes to a result shape using a
|
|
35
35
|
* kernel-provided ShapeEvolution record (no direct kernel op access needed).
|
|
36
36
|
*/
|
|
37
|
-
export declare function propagateFaceTagsFromEvolution(evolution: ShapeEvolution, inputs: readonly AnyShape[], result: AnyShape): void;
|
|
37
|
+
export declare function propagateFaceTagsFromEvolution(evolution: ShapeEvolution, inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
38
38
|
//# sourceMappingURL=faceTagFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faceTagFns.d.ts","sourceRoot":"","sources":["../../src/topology/faceTagFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"faceTagFns.d.ts","sourceRoot":"","sources":["../../src/topology/faceTagFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAcvE,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,OAAO,CAE/D;AAwBD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,EAClE,GAAG,EAAE,MAAM,GACV,QAAQ,CAAC,SAAS,CAAC,CAYrB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAezF;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAuBtF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,QAAQ,CAAC,SAAS,CAAC,CAIrB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,GAAG,EAAE,MAAM,GACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAErC;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,SAAS,QAAQ,CAAC,SAAS,CAAC,EAAE,EACtC,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,GAC1B,IAAI,CAmDN"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AnyShape, Face, Wire, Solid } from '../core/shapeTypes.js';
|
|
1
|
+
import { AnyShape, Dimension, Face, Wire, Solid } from '../core/shapeTypes.js';
|
|
2
2
|
import { Result } from '../core/result.js';
|
|
3
3
|
/**
|
|
4
4
|
* Check if a shape is valid according to kernel geometry and topology checks.
|
|
5
5
|
*/
|
|
6
|
-
export declare function isValid(shape: AnyShape): boolean;
|
|
6
|
+
export declare function isValid(shape: AnyShape<Dimension>): boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Attempt to heal/fix a solid shape.
|
|
9
9
|
*
|
|
@@ -15,21 +15,21 @@ export declare function healSolid(solid: Solid): Result<Solid>;
|
|
|
15
15
|
*
|
|
16
16
|
* Uses ShapeFix_Face to repair wire ordering, orientation, and geometry issues.
|
|
17
17
|
*/
|
|
18
|
-
export declare function healFace(face: Face): Result<Face
|
|
18
|
+
export declare function healFace<D extends Dimension>(face: Face<D>): Result<Face<D>>;
|
|
19
19
|
/**
|
|
20
20
|
* Attempt to heal/fix a wire.
|
|
21
21
|
*
|
|
22
22
|
* Uses ShapeFix_Wire to repair edge connectivity, gaps, and self-intersections.
|
|
23
23
|
* Requires a face for surface context; pass `undefined` to use a default planar context.
|
|
24
24
|
*/
|
|
25
|
-
export declare function healWire(wire: Wire
|
|
25
|
+
export declare function healWire<D extends Dimension>(wire: Wire<D>, face?: Face<D>): Result<Wire<D>>;
|
|
26
26
|
/**
|
|
27
27
|
* Attempt to heal any shape by dispatching to the appropriate fixer.
|
|
28
28
|
*
|
|
29
29
|
* Supports solids, faces, and wires. For other shape types, returns the
|
|
30
30
|
* input unchanged.
|
|
31
31
|
*/
|
|
32
|
-
export declare function heal<T extends AnyShape
|
|
32
|
+
export declare function heal<T extends AnyShape<Dimension>>(shape: T): Result<T>;
|
|
33
33
|
/** Diagnostic for a single healing step. */
|
|
34
34
|
export interface HealingStepDiagnostic {
|
|
35
35
|
readonly name: string;
|
|
@@ -68,8 +68,8 @@ export interface HealingReport {
|
|
|
68
68
|
* Uses ShapeFix_Solid/Face/Wire depending on shape type, which internally
|
|
69
69
|
* handles sub-shape healing and reconstruction.
|
|
70
70
|
*/
|
|
71
|
-
export declare function autoHeal(shape: AnyShape
|
|
72
|
-
shape: AnyShape
|
|
71
|
+
export declare function autoHeal(shape: AnyShape<Dimension>, options?: AutoHealOptions): Result<{
|
|
72
|
+
shape: AnyShape<Dimension>;
|
|
73
73
|
report: HealingReport;
|
|
74
74
|
}>;
|
|
75
75
|
//# sourceMappingURL=healingFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healingFns.d.ts","sourceRoot":"","sources":["../../src/topology/healingFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"healingFns.d.ts","sourceRoot":"","sources":["../../src/topology/healingFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,mBAAmB,CAAC;AAQ/D;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,OAAO,CAE3D;AAMD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CA8BrD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAe5E;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAe5F;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAYvE;AAMD,4CAA4C;AAC5C,MAAM,WAAW,qBAAqB;IACpC,Q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} from '../core/shapeTypes.js';
|
|
2
2
|
import { Result } from '../core/result.js';
|
|
3
3
|
export interface HullOptions {
|
|
4
4
|
/** Meshing / sewing tolerance (default: 0.1). */
|
|
@@ -12,5 +12,5 @@ export interface HullOptions {
|
|
|
12
12
|
* @param shapes - One or more 3D shapes to hull.
|
|
13
13
|
* @param options - Optional tolerance settings.
|
|
14
14
|
*/
|
|
15
|
-
export declare function hull(shapes: ReadonlyArray<AnyShape
|
|
15
|
+
export declare function hull(shapes: ReadonlyArray<AnyShape<Dimension>>, options?: HullOptions): Result<Solid>;
|
|
16
16
|
//# sourceMappingURL=hullFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hullFns.d.ts","sourceRoot":"","sources":["../../src/topology/hullFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"hullFns.d.ts","sourceRoot":"","sources":["../../src/topology/hullFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAExE,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAOhE,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiBD;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAC1C,OAAO,GAAE,WAAgB,GACxB,MAAM,CAAC,KAAK,CAAC,CA8Cf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyShape } from '../core/shapeTypes.js';
|
|
1
|
+
import { AnyShape, Dimension } from '../core/shapeTypes.js';
|
|
2
2
|
import { Result } from '../core/result.js';
|
|
3
3
|
/** Triangle mesh data extracted from a shape, ready for GPU rendering. */
|
|
4
4
|
export interface ShapeMesh {
|
|
@@ -47,7 +47,7 @@ export interface MeshOptions {
|
|
|
47
47
|
* @returns A ShapeMesh containing typed arrays ready for GPU upload.
|
|
48
48
|
* @see toBufferGeometryData — convert to Three.js BufferGeometry format
|
|
49
49
|
*/
|
|
50
|
-
export declare function mesh(shape: AnyShape
|
|
50
|
+
export declare function mesh(shape: AnyShape<Dimension>, { tolerance, angularTolerance, skipNormals, includeUVs, cache, signal, }?: MeshOptions & {
|
|
51
51
|
skipNormals?: boolean;
|
|
52
52
|
includeUVs?: boolean;
|
|
53
53
|
cache?: boolean;
|
|
@@ -60,7 +60,7 @@ export declare function mesh(shape: AnyShape, { tolerance, angularTolerance, ski
|
|
|
60
60
|
* @returns An EdgeMesh containing line vertex positions and per-edge groups.
|
|
61
61
|
* @see toLineGeometryData — convert to Three.js LineSegments format
|
|
62
62
|
*/
|
|
63
|
-
export declare function meshEdges(shape: AnyShape
|
|
63
|
+
export declare function meshEdges(shape: AnyShape<Dimension>, { tolerance, angularTolerance, cache }?: MeshOptions & {
|
|
64
64
|
cache?: boolean;
|
|
65
65
|
}): EdgeMesh;
|
|
66
66
|
/**
|
|
@@ -68,13 +68,13 @@ export declare function meshEdges(shape: AnyShape, { tolerance, angularTolerance
|
|
|
68
68
|
*
|
|
69
69
|
* @returns Ok with a Blob (MIME type `application/STEP`), or Err on failure.
|
|
70
70
|
*/
|
|
71
|
-
export declare function exportSTEP(shape: AnyShape): Result<Blob>;
|
|
71
|
+
export declare function exportSTEP(shape: AnyShape<Dimension>): Result<Blob>;
|
|
72
72
|
/**
|
|
73
73
|
* Export a shape as an STL file Blob.
|
|
74
74
|
*
|
|
75
75
|
* @returns Ok with a Blob (MIME type `application/sla`), or Err on failure.
|
|
76
76
|
*/
|
|
77
|
-
export declare function exportSTL(shape: AnyShape
|
|
77
|
+
export declare function exportSTL(shape: AnyShape<Dimension>, { tolerance, angularTolerance, binary, }?: MeshOptions & {
|
|
78
78
|
binary?: boolean;
|
|
79
79
|
}): Result<Blob>;
|
|
80
80
|
/**
|
|
@@ -82,5 +82,5 @@ export declare function exportSTL(shape: AnyShape, { tolerance, angularTolerance
|
|
|
82
82
|
*
|
|
83
83
|
* @returns Ok with a Blob (MIME type `application/iges`), or Err on failure.
|
|
84
84
|
*/
|
|
85
|
-
export declare function exportIGES(shape: AnyShape): Result<Blob>;
|
|
85
|
+
export declare function exportIGES(shape: AnyShape<Dimension>): Result<Blob>;
|
|
86
86
|
//# sourceMappingURL=meshFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meshFns.d.ts","sourceRoot":"","sources":["../../src/topology/meshFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"meshFns.d.ts","sourceRoot":"","sources":["../../src/topology/meshFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAiBzD,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,SAAS,EAAE,WAAW,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,EAAE,YAAY,CAAC;IACvB,wDAAwD;IACxD,OAAO,EAAE,YAAY,CAAC;IACtB,8EAA8E;IAC9E,GAAG,EAAE,YAAY,CAAC;IAClB,mEAAmE;IACnE,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChF;AAED,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACvB,uFAAuF;IACvF,KAAK,EAAE,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CAcd;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAOnE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vec3 } from '../core/types.js';
|
|
2
2
|
import { Result } from '../core/result.js';
|
|
3
|
-
import { Edge, Wire, Face, Solid, Vertex, Shell, Compound, AnyShape, Shape3D } from '../core/shapeTypes.js';
|
|
3
|
+
import { Edge, Wire, Face, Solid, Vertex, Shell, Compound, AnyShape, Dimension, Shape3D } from '../core/shapeTypes.js';
|
|
4
4
|
import { BSplineApproximationOptions } from './shapeHelpers.js';
|
|
5
5
|
export type { BSplineApproximationOptions } from './shapeHelpers.js';
|
|
6
6
|
/** Options for {@link box}. */
|
|
@@ -185,7 +185,7 @@ export declare function vertex(point: Vec3): Vertex;
|
|
|
185
185
|
/**
|
|
186
186
|
* Build a compound from multiple shapes.
|
|
187
187
|
*/
|
|
188
|
-
export declare function compound(shapeArray: AnyShape[]): Compound;
|
|
188
|
+
export declare function compound(shapeArray: AnyShape<Dimension>[]): Compound;
|
|
189
189
|
/**
|
|
190
190
|
* Weld faces and shells into a single solid.
|
|
191
191
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitiveFns.d.ts","sourceRoot":"","sources":["../../src/topology/primitiveFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAQL,KAAK,2BAA2B,EAoBjC,MAAM,mBAAmB,CAAC;AAM3B,YAAY,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types.js';
|
|
2
2
|
import { Vec3, MatrixInput } from '../core/types.js';
|
|
3
|
-
import { AnyShape, Edge, Face, Wire, Vertex, ShapeKind } from '../core/shapeTypes.js';
|
|
3
|
+
import { AnyShape, Dimension, Edge, Face, Wire, Vertex, ShapeKind } from '../core/shapeTypes.js';
|
|
4
4
|
/** Clone a shape (deep copy via kernel topology downcast). */
|
|
5
|
-
export declare function clone<T extends AnyShape
|
|
5
|
+
export declare function clone<T extends AnyShape<Dimension>>(shape: T): T;
|
|
6
6
|
/** Serialize a shape to BREP string format. */
|
|
7
|
-
export declare function toBREP(shape: AnyShape): string;
|
|
7
|
+
export declare function toBREP(shape: AnyShape<Dimension>): string;
|
|
8
8
|
/** Get the topology hash code of a shape. */
|
|
9
|
-
export declare function getHashCode(shape: AnyShape): number;
|
|
9
|
+
export declare function getHashCode(shape: AnyShape<Dimension>): number;
|
|
10
10
|
/** Check if a shape is null. */
|
|
11
|
-
export declare function isEmpty(shape: AnyShape): boolean;
|
|
11
|
+
export declare function isEmpty(shape: AnyShape<Dimension>): boolean;
|
|
12
12
|
/** Check if two shapes are the same topological entity. */
|
|
13
|
-
export declare function isSameShape(a: AnyShape
|
|
13
|
+
export declare function isSameShape(a: AnyShape<Dimension>, b: AnyShape<Dimension>): boolean;
|
|
14
14
|
/** Check if two shapes are geometrically equal. */
|
|
15
|
-
export declare function isEqualShape(a: AnyShape
|
|
15
|
+
export declare function isEqualShape(a: AnyShape<Dimension>, b: AnyShape<Dimension>): boolean;
|
|
16
16
|
/** Simplify a shape by merging same-domain faces/edges. Returns a new shape. */
|
|
17
|
-
export declare function simplify<T extends AnyShape
|
|
17
|
+
export declare function simplify<T extends AnyShape<Dimension>>(shape: T): T;
|
|
18
18
|
/** Translate a shape by a vector. Returns a new shape. */
|
|
19
|
-
export declare function translate<T extends AnyShape
|
|
19
|
+
export declare function translate<T extends AnyShape<Dimension>>(shape: T, v: Vec3): T;
|
|
20
20
|
/** Rotate a shape around an axis. Angle is in degrees. Returns a new shape. */
|
|
21
|
-
export declare function rotate<T extends AnyShape
|
|
21
|
+
export declare function rotate<T extends AnyShape<Dimension>>(shape: T, angle: number, position?: Vec3, direction?: Vec3): T;
|
|
22
22
|
/** Mirror a shape through a plane defined by origin and normal. Returns a new shape. */
|
|
23
|
-
export declare function mirror<T extends AnyShape
|
|
23
|
+
export declare function mirror<T extends AnyShape<Dimension>>(shape: T, planeNormal?: Vec3, planeOrigin?: Vec3): T;
|
|
24
24
|
/** Scale a shape uniformly. Returns a new shape. */
|
|
25
|
-
export declare function scale<T extends AnyShape
|
|
25
|
+
export declare function scale<T extends AnyShape<Dimension>>(shape: T, factor: number, center?: Vec3): T;
|
|
26
26
|
/** Resize a shape to exact target dimensions with optional auto-proportional scaling. */
|
|
27
|
-
export declare function resize<T extends AnyShape
|
|
27
|
+
export declare function resize<T extends AnyShape<Dimension>>(shape: T, dimensions: [number | undefined, number | undefined, number | undefined], options?: {
|
|
28
28
|
auto?: boolean;
|
|
29
29
|
}): T;
|
|
30
30
|
/**
|
|
@@ -34,7 +34,7 @@ export declare function resize<T extends AnyShape>(shape: T, dimensions: [number
|
|
|
34
34
|
* Uses the fast `kernel transform` path for orthogonal matrices (rotation, uniform scale, mirror)
|
|
35
35
|
* and the general `gp_GTrsf` path for non-orthogonal transforms (shear, non-uniform scale).
|
|
36
36
|
*/
|
|
37
|
-
export declare function applyMatrix<T extends AnyShape
|
|
37
|
+
export declare function applyMatrix<T extends AnyShape<Dimension>>(shape: T, matrix: MatrixInput): T;
|
|
38
38
|
/** A single transform operation: translate or rotate. */
|
|
39
39
|
export type TransformOp = {
|
|
40
40
|
readonly type: 'translate';
|
|
@@ -60,43 +60,43 @@ export declare function composeTransforms(ops: readonly TransformOp[]): Composed
|
|
|
60
60
|
* Clone a shape and apply a pre-composed transform in a single kernel operation.
|
|
61
61
|
* Much faster than separate clone() + translate() + rotate() calls.
|
|
62
62
|
*/
|
|
63
|
-
export declare function transformCopy<T extends AnyShape
|
|
63
|
+
export declare function transformCopy<T extends AnyShape<Dimension>>(shape: T, composed: ComposedTransform): T;
|
|
64
64
|
/** Get all edges of a shape as branded Edge handles. Results are cached per shape. */
|
|
65
|
-
export declare function getEdges(shape: AnyShape): Edge[];
|
|
65
|
+
export declare function getEdges<D extends Dimension>(shape: AnyShape<D>): Edge<D>[];
|
|
66
66
|
/** Get all faces of a shape as branded Face handles. Results are cached per shape. */
|
|
67
|
-
export declare function getFaces(shape: AnyShape): Face[];
|
|
67
|
+
export declare function getFaces<D extends Dimension>(shape: AnyShape<D>): Face<D>[];
|
|
68
68
|
/** Get all wires of a shape as branded Wire handles. Results are cached per shape. */
|
|
69
|
-
export declare function getWires(shape: AnyShape): Wire[];
|
|
69
|
+
export declare function getWires<D extends Dimension>(shape: AnyShape<D>): Wire<D>[];
|
|
70
70
|
/**
|
|
71
71
|
* Tag all faces of a shape with an opaque integer origin.
|
|
72
72
|
* Consumers assign meaning (e.g., source line number).
|
|
73
73
|
*/
|
|
74
|
-
export declare function setShapeOrigin(shape: AnyShape
|
|
74
|
+
export declare function setShapeOrigin(shape: AnyShape<Dimension>, origin: number): void;
|
|
75
75
|
/**
|
|
76
76
|
* Get the face origin map for a shape (faceHash → originTag).
|
|
77
77
|
* Returns undefined if no origins have been set or propagated.
|
|
78
78
|
*/
|
|
79
|
-
export declare function getFaceOrigins(shape: AnyShape): Map<number, number> | undefined;
|
|
79
|
+
export declare function getFaceOrigins(shape: AnyShape<Dimension>): Map<number, number> | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* Propagate face origins using a kernel-provided ShapeEvolution record.
|
|
82
82
|
*/
|
|
83
|
-
export declare function propagateOriginsFromEvolution(evolution: ShapeEvolution, inputs: AnyShape[], result: AnyShape): void;
|
|
83
|
+
export declare function propagateOriginsFromEvolution(evolution: ShapeEvolution, inputs: AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
84
84
|
/**
|
|
85
85
|
* Fallback origin propagation when no kernel op object is available.
|
|
86
86
|
* Matches result faces to input faces by hash code first; if no hash matches
|
|
87
87
|
* are found, falls back to geometric matching (normal + centroid comparison).
|
|
88
88
|
*/
|
|
89
|
-
export declare function propagateOriginsByHash(inputs: AnyShape[], result: AnyShape): void;
|
|
89
|
+
export declare function propagateOriginsByHash(inputs: AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
90
90
|
/** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
|
|
91
|
-
export declare function getVertices(shape: AnyShape): Vertex[];
|
|
91
|
+
export declare function getVertices<D extends Dimension>(shape: AnyShape<D>): Vertex<D>[];
|
|
92
92
|
/** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
|
|
93
|
-
export declare function iterEdges(shape: AnyShape): Generator<Edge
|
|
93
|
+
export declare function iterEdges<D extends Dimension>(shape: AnyShape<D>): Generator<Edge<D>>;
|
|
94
94
|
/** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
|
|
95
|
-
export declare function iterFaces(shape: AnyShape): Generator<Face
|
|
95
|
+
export declare function iterFaces<D extends Dimension>(shape: AnyShape<D>): Generator<Face<D>>;
|
|
96
96
|
/** Lazily iterate wires of a shape, yielding branded Wire handles one at a time. */
|
|
97
|
-
export declare function iterWires(shape: AnyShape): Generator<Wire
|
|
97
|
+
export declare function iterWires<D extends Dimension>(shape: AnyShape<D>): Generator<Wire<D>>;
|
|
98
98
|
/** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
|
|
99
|
-
export declare function iterVertices(shape: AnyShape): Generator<Vertex
|
|
99
|
+
export declare function iterVertices<D extends Dimension>(shape: AnyShape<D>): Generator<Vertex<D>>;
|
|
100
100
|
/** Bounding box as a plain object. */
|
|
101
101
|
export interface Bounds3D {
|
|
102
102
|
readonly xMin: number;
|
|
@@ -107,7 +107,7 @@ export interface Bounds3D {
|
|
|
107
107
|
readonly zMax: number;
|
|
108
108
|
}
|
|
109
109
|
/** Get the axis-aligned bounding box of a shape. Cached per shape. */
|
|
110
|
-
export declare function getBounds(shape: AnyShape): Bounds3D;
|
|
110
|
+
export declare function getBounds(shape: AnyShape<Dimension>): Bounds3D;
|
|
111
111
|
/** A summary of a shape's topology, geometry, and validity. */
|
|
112
112
|
export interface ShapeDescription {
|
|
113
113
|
readonly kind: ShapeKind;
|
|
@@ -119,7 +119,7 @@ export interface ShapeDescription {
|
|
|
119
119
|
readonly bounds: Bounds3D;
|
|
120
120
|
}
|
|
121
121
|
/** Get a quick summary of a shape for debugging and inspection. */
|
|
122
|
-
export declare function describe(shape: AnyShape): ShapeDescription;
|
|
122
|
+
export declare function describe(shape: AnyShape<Dimension>): ShapeDescription;
|
|
123
123
|
/** Get the position of a vertex as a Vec3 tuple. */
|
|
124
124
|
export declare function vertexPosition(vertex: Vertex): Vec3;
|
|
125
125
|
//# sourceMappingURL=shapeFns.d.ts.map
|