@itwin/core-geometry 4.0.0-dev.6 → 4.0.0-dev.8
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/lib/cjs/Geometry.d.ts +3 -3
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +27 -11
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +11 -8
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +16 -12
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +5 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js +11 -10
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +18 -0
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +38 -0
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +1 -0
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js +3 -0
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +171 -118
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +448 -417
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +12 -13
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +15 -13
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.d.ts +1 -1
- package/lib/cjs/geometry3d/Segment1d.js +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +12 -0
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +14 -0
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -0
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +46 -6
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +54 -0
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +71 -1
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts +202 -0
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -0
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +1038 -0
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -0
- package/lib/cjs/serialization/GeometrySamples.d.ts +4 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +14 -6
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +113 -7
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +185 -7
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +38 -0
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -0
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +82 -0
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -0
- package/lib/esm/Geometry.d.ts +3 -3
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +27 -11
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +11 -8
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +16 -12
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts +5 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js +11 -10
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +18 -0
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +38 -0
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +1 -0
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js +3 -0
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +171 -118
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +448 -417
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +12 -13
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +15 -13
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.d.ts +1 -1
- package/lib/esm/geometry3d/Segment1d.js +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +12 -0
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +14 -0
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -0
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +46 -6
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +54 -0
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +69 -0
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts +202 -0
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -0
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js +1032 -0
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -0
- package/lib/esm/serialization/GeometrySamples.d.ts +4 -1
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +14 -6
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +113 -7
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +185 -7
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +38 -0
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -0
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +78 -0
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -0
- package/package.json +4 -4
|
@@ -66,6 +66,32 @@ export declare type HalfEdgeAndMaskToBooleanFunction = (node: HalfEdge, mask: Ha
|
|
|
66
66
|
* @internal
|
|
67
67
|
*/
|
|
68
68
|
export declare type GraphNodeFunction = (graph: HalfEdgeGraph, node: HalfEdge) => boolean;
|
|
69
|
+
/** Non-topological data members in a half edge.
|
|
70
|
+
* These are not part of adjacency and masking logic.
|
|
71
|
+
*/
|
|
72
|
+
/** member fields for a half edge (which is also commonly called a node)
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
export interface HalfEdgeUserData {
|
|
76
|
+
/** Vertex x coordinate */
|
|
77
|
+
x: number;
|
|
78
|
+
/** Vertex y coordinate */
|
|
79
|
+
y: number;
|
|
80
|
+
/** Vertex z coordinate */
|
|
81
|
+
z: number;
|
|
82
|
+
/** angle used for sort-around-vertex */
|
|
83
|
+
sortAngle?: number;
|
|
84
|
+
/** numeric value for application-specific tagging (e.g. sorting) */
|
|
85
|
+
sortData?: number;
|
|
86
|
+
/** application-specific data for the edge identifier.
|
|
87
|
+
* * edge split operations are expected to copy this to new sub-edges.
|
|
88
|
+
*/
|
|
89
|
+
edgeTag?: any;
|
|
90
|
+
/** application-specific data for the face loop
|
|
91
|
+
* * edge split operations are expected to copy this to new sub-edges.
|
|
92
|
+
*/
|
|
93
|
+
faceTag?: any;
|
|
94
|
+
}
|
|
69
95
|
/**
|
|
70
96
|
*
|
|
71
97
|
* * A HalfEdge is "one side of an edge" in a structure of faces, edges and vertices. From a node there are navigational links to:
|
|
@@ -82,7 +108,7 @@ export declare type GraphNodeFunction = (graph: HalfEdgeGraph, node: HalfEdge) =
|
|
|
82
108
|
* of graph manipulation.
|
|
83
109
|
* @internal
|
|
84
110
|
*/
|
|
85
|
-
export declare class HalfEdge {
|
|
111
|
+
export declare class HalfEdge implements HalfEdgeUserData {
|
|
86
112
|
/** Vertex index in some parent object's numbering. */
|
|
87
113
|
i: number;
|
|
88
114
|
/** bitmask bits, used to mark nodes as part of a triangle(idx 0) or visited when flipping(idx 1) */
|
|
@@ -101,6 +127,10 @@ export declare class HalfEdge {
|
|
|
101
127
|
* * edge split operations are expected to copy this to new sub-edges.
|
|
102
128
|
*/
|
|
103
129
|
edgeTag?: any;
|
|
130
|
+
/** application-specific data for the face loop
|
|
131
|
+
* * edge split operations are expected to copy this to new sub-edges.
|
|
132
|
+
*/
|
|
133
|
+
faceTag?: any;
|
|
104
134
|
private _id;
|
|
105
135
|
/** id assigned sequentially during construction --- useful for debugging. */
|
|
106
136
|
get id(): any;
|
|
@@ -156,6 +186,18 @@ export declare class HalfEdge {
|
|
|
156
186
|
* @returns Returns the reference to the half edge created.
|
|
157
187
|
*/
|
|
158
188
|
static splitEdge(baseA: undefined | HalfEdge, xA: number | undefined, yA: number | undefined, zA: number | undefined, iA: number | undefined, heArray: HalfEdge[] | undefined): HalfEdge;
|
|
189
|
+
/**
|
|
190
|
+
* * Create a new sliver face "inside" an existing edge.
|
|
191
|
+
* * Insert it "within" the base edge.
|
|
192
|
+
* * This requires two new half edges.
|
|
193
|
+
* * if the base is undefined, create a single-edge loop.
|
|
194
|
+
* * This (unlike pinch) breaks the edgeMate pairing of the base edge.
|
|
195
|
+
* * This preserves xyz and i properties at all existing vertices.
|
|
196
|
+
* * The two new half edges are a sliver face (via their predecessor and successor)
|
|
197
|
+
* * Each new edge mates to one existing edge.
|
|
198
|
+
* @returns Returns the reference to the half edge created.
|
|
199
|
+
*/
|
|
200
|
+
static splitEdgeCreateSliverFace(baseA: HalfEdge, heArray: HalfEdge[] | undefined): HalfEdge;
|
|
159
201
|
private static _edgePropertyMasks;
|
|
160
202
|
/**
|
|
161
203
|
* Copy "edge based" content of fromNode to toNode
|
|
@@ -238,6 +280,12 @@ export declare class HalfEdge {
|
|
|
238
280
|
countMaskAroundFace(mask: HalfEdgeMask, value?: boolean): number;
|
|
239
281
|
/** Returns the number of nodes found with the given mask value around this vertex loop. */
|
|
240
282
|
countMaskAroundVertex(mask: HalfEdgeMask, value?: boolean): number;
|
|
283
|
+
/** Returns the first node with given mask value around this vertex loop. */
|
|
284
|
+
findMaskAroundVertex(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
|
|
285
|
+
/** Returns the first node with given mask value around this face loop. */
|
|
286
|
+
findMaskAroundFace(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
|
|
287
|
+
/** Returns the first node with given mask value on this edge (i.e. examining this and this.mate) */
|
|
288
|
+
findMaskAroundEdge(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
|
|
241
289
|
/** Set a mask, and return prior value.
|
|
242
290
|
* @param mask mask to apply
|
|
243
291
|
*/
|
|
@@ -247,6 +295,11 @@ export declare class HalfEdge {
|
|
|
247
295
|
* @param node node containing xyz
|
|
248
296
|
*/
|
|
249
297
|
setXYZFrom(node: HalfEdge): void;
|
|
298
|
+
/**
|
|
299
|
+
* Set (copy) the this.x, this.y, this.z from xyz.x, xyz.y, xyz.z
|
|
300
|
+
* @param node source with x,y,z properties
|
|
301
|
+
*/
|
|
302
|
+
setXYZ(xyz: XYAndZ): void;
|
|
250
303
|
/**
|
|
251
304
|
* Test if mask bits are set in the node's bitMask.
|
|
252
305
|
* @return Return true (as a simple boolean, not a mask) if any bits of the mask parameter match bits of the node's bitMask
|
|
@@ -304,6 +357,8 @@ export declare class HalfEdge {
|
|
|
304
357
|
};
|
|
305
358
|
/** Return the [id, [x,y]] of a node. Useful for collector methods. */
|
|
306
359
|
static nodeToIdXYString(node: HalfEdge): string;
|
|
360
|
+
/** Return the [id, [x,y],z] of a node. Useful for collector methods. */
|
|
361
|
+
static nodeToIdXYZString(node: HalfEdge): string;
|
|
307
362
|
/** Create a string representation of the mask
|
|
308
363
|
* * Null mask is empty string.
|
|
309
364
|
* * Appended characters B,P,X for Boundary, Primary, Exterior mask bits.
|
|
@@ -315,6 +370,8 @@ export declare class HalfEdge {
|
|
|
315
370
|
vectorToFaceSuccessorXY(result?: Vector2d): Vector2d;
|
|
316
371
|
/** Return Vector3d to face successor */
|
|
317
372
|
vectorToFaceSuccessor(result?: Vector3d): Vector3d;
|
|
373
|
+
/** Return Vector3d to face successor */
|
|
374
|
+
vectorToFacePredecessor(result?: Vector3d): Vector3d;
|
|
318
375
|
/** test if spaceNode is in the sector at sectorNode */
|
|
319
376
|
static isNodeVisibleInSector(spaceNode: HalfEdge, sectorNode: HalfEdge): boolean;
|
|
320
377
|
/** Returns Return cross product (2d) of vectors from baseA to targetA and baseB to targetB */
|
|
@@ -350,6 +407,10 @@ export declare class HalfEdge {
|
|
|
350
407
|
static testNodeMaskNotExterior(node: HalfEdge): boolean;
|
|
351
408
|
/** Returns Returns true if the node does NOT have Mask.EXTERIOR_MASK set. */
|
|
352
409
|
static testMateMaskExterior(node: HalfEdge): boolean;
|
|
410
|
+
/** Returns radians between this edge and its face predecessor edge, using all three coordinates x,y,z and given normal to resolve sweep direction.
|
|
411
|
+
* * The returned angle is positive, i.e. may be larger than PI radians.
|
|
412
|
+
*/
|
|
413
|
+
static sectorSweepRadiansXYZ(node: HalfEdge, normal: Vector3d): number;
|
|
353
414
|
/** Returns Returns true if the face has positive area in xy parts. */
|
|
354
415
|
static testFacePositiveAreaXY(node: HalfEdge): boolean;
|
|
355
416
|
/** Return true if x and y coordinates of this and other are exactly equal */
|
|
@@ -365,6 +426,14 @@ export declare class HalfEdge {
|
|
|
365
426
|
* @returns Return the array of function values.
|
|
366
427
|
*/
|
|
367
428
|
collectAroundFace(f?: NodeFunction): any[];
|
|
429
|
+
/**
|
|
430
|
+
* search around a vertex for nodes that have a specified mask setting.
|
|
431
|
+
* @param vertexSeed first node to search
|
|
432
|
+
* @param mask target mask
|
|
433
|
+
* @param value target value for mask on half edges.
|
|
434
|
+
* @param collectedNodes optional array to be cleared and receive masked nodes
|
|
435
|
+
*/
|
|
436
|
+
collectMaskedEdgesAroundVertex(mask: HalfEdgeMask, value?: boolean, result?: HalfEdge[]): HalfEdge[];
|
|
368
437
|
/**
|
|
369
438
|
*
|
|
370
439
|
* * Evaluate f(node) at each outbound node around this node's vertex loop.
|
|
@@ -460,18 +529,25 @@ export declare class HalfEdge {
|
|
|
460
529
|
* * If the edge is horizontal with (approximate) identical y, return the node.
|
|
461
530
|
* * If the edge is horizontal with different y, return undefined.
|
|
462
531
|
* * If the edge is not horizontal, return the fractional position (possibly outside 0..1) of the intersection.
|
|
463
|
-
* @param
|
|
464
|
-
* @param result optional preallocated result
|
|
532
|
+
* @param node0 Base node of edge
|
|
465
533
|
*/
|
|
466
534
|
static horizontalScanFraction(node0: HalfEdge, y: number): number | undefined | HalfEdge;
|
|
467
535
|
/**
|
|
468
536
|
* * Compute fractional coordinates of the intersection of a horizontal line with an edge.
|
|
469
537
|
* * If the edge is horizontal return undefined (no test for horizontal at y!!!)
|
|
470
538
|
* * If the edge is not horizontal and y is between its end y's, return the fraction
|
|
471
|
-
* @param
|
|
472
|
-
* @param result optional preallocated result
|
|
539
|
+
* @param node0 Base node of edge
|
|
473
540
|
*/
|
|
474
541
|
static horizontalScanFraction01(node0: HalfEdge, y: number): number | undefined;
|
|
542
|
+
/**
|
|
543
|
+
* Copy various data from source to this.
|
|
544
|
+
* @param source other half edge.
|
|
545
|
+
* @param XYZ copy simple coordinates
|
|
546
|
+
* @param copyVertexData true to copy data belonging to the vertex. (i.e. the "i" member)
|
|
547
|
+
* @param copyVertexData true to copy data belonging to the edge. (i.e. call transferEdgeData)
|
|
548
|
+
* @param copyFaceData true to copy faceTag
|
|
549
|
+
*/
|
|
550
|
+
copyDataFrom(source: HalfEdge, copyXYZ: boolean, copyVertexData: boolean, copyEdgeData: boolean, copyFaceData: boolean): void;
|
|
475
551
|
}
|
|
476
552
|
/**
|
|
477
553
|
* A HalfEdgeGraph has:
|
|
@@ -501,6 +577,16 @@ export declare class HalfEdgeGraph {
|
|
|
501
577
|
* @returns Return pointer to the first half edge created.
|
|
502
578
|
*/
|
|
503
579
|
createEdgeXYZXYZ(xA?: number, yA?: number, zA?: number, iA?: number, xB?: number, yB?: number, zB?: number, iB?: number): HalfEdge;
|
|
580
|
+
/**
|
|
581
|
+
* * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
|
|
582
|
+
* * The two edges are joined as edgeMate pair.
|
|
583
|
+
* * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
|
|
584
|
+
* * The two edges are added to the graph's HalfEdge set
|
|
585
|
+
* * Coordinates are set to zero.
|
|
586
|
+
* * ids are installed in the two half edges.
|
|
587
|
+
* @returns Return pointer to the first half edge created. (This has idA as its id.)
|
|
588
|
+
*/
|
|
589
|
+
createEdgeIdId(iA?: number, iB?: number): HalfEdge;
|
|
504
590
|
/**
|
|
505
591
|
* * create an edge from coordinates x,y,z to (the tail of) an existing half edge.
|
|
506
592
|
* @returns Return pointer to the half edge with tail at x,y,z
|
|
@@ -528,6 +614,17 @@ export declare class HalfEdgeGraph {
|
|
|
528
614
|
* @returns Returns the reference to the half edge created.
|
|
529
615
|
*/
|
|
530
616
|
splitEdge(base: undefined | HalfEdge, xA?: number, yA?: number, zA?: number, iA?: number): HalfEdge;
|
|
617
|
+
/**
|
|
618
|
+
* * Create a sliver face "within" an edge.
|
|
619
|
+
* * this creates two half edges.
|
|
620
|
+
* * The existing edges both stay in their same face loops and retain coordinates and i value.
|
|
621
|
+
* * Each existing edge's mate is a new edge (rather than original mate)
|
|
622
|
+
* * Coordinates are copied to the new edges at respective vertices.
|
|
623
|
+
* * New faceTag and edgeTag undefined.
|
|
624
|
+
* * i members are copied around their respective vertices.
|
|
625
|
+
* @returns Returns the reference to the half edge created.
|
|
626
|
+
*/
|
|
627
|
+
splitEdgeCreateSliverFace(base: HalfEdge): HalfEdge;
|
|
531
628
|
/**
|
|
532
629
|
* * Insert a vertex in the edge beginning at base, with coordinates specified as a fraction along the existing edge.
|
|
533
630
|
* * this creates two half edges.
|
|
@@ -585,6 +682,15 @@ export declare class HalfEdgeGraph {
|
|
|
585
682
|
* @param announceFace function to apply at one node of each face.
|
|
586
683
|
*/
|
|
587
684
|
announceFaceLoops(announceFace: GraphNodeFunction): void;
|
|
685
|
+
/**
|
|
686
|
+
* * Visit each edge of the graph once.
|
|
687
|
+
* * Call the announceEdge function.
|
|
688
|
+
* * the edge mate will NOT appear in an announceEdge call.
|
|
689
|
+
* * continue search if announceEdge(graph, node) returns true
|
|
690
|
+
* * terminate search if announceEdge (graph, node) returns false
|
|
691
|
+
* @param announceEdge function to apply at one node of each edge.
|
|
692
|
+
*/
|
|
693
|
+
announceEdges(announceEdge: GraphNodeFunction): void;
|
|
588
694
|
/**
|
|
589
695
|
* * Visit each vertex loop of the graph once.
|
|
590
696
|
* * Call the announceVertex function
|
|
@@ -594,8 +700,8 @@ export declare class HalfEdgeGraph {
|
|
|
594
700
|
*/
|
|
595
701
|
announceVertexLoops(announceVertex: GraphNodeFunction): void;
|
|
596
702
|
/**
|
|
597
|
-
* * Visit each
|
|
598
|
-
* * Call the
|
|
703
|
+
* * Visit each half edge (node) of the graph once.
|
|
704
|
+
* * Call the announceNode function
|
|
599
705
|
* * continue search if announceNode(graph, node) returns true
|
|
600
706
|
* * terminate search if announce face (graph, node) returns false
|
|
601
707
|
* @param announceNode function to apply at one node of each face.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../../src/topology/Graph.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AASvD;;;;;;;;;;GAUG;AACH,oBAAY,YAAY;IACtB;;;;OAIG;IACH,QAAQ,IAAa;IACrB;;;OAGG;IACH,aAAa,IAAa;IAS1B;;OAEG;IACH,YAAY,IAAa;IAEzB,4EAA4E;IAC5E,OAAO,KAAY;IAEnB,uDAAuD;IACvD,iBAAiB,MAAa;IAC9B,2CAA2C;IAC3C,SAAS,MAAa;IAEtB,mBAAmB;IACnB,SAAS,IAAa;IACtB,8CAA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} from "../curve/LineSegment3d";
|
|
9
9
|
import { Geometry } from "../Geometry";
|
|
10
|
+
import { Angle } from "../geometry3d/Angle";
|
|
10
11
|
import { Point2d, Vector2d } from "../geometry3d/Point2dVector2d";
|
|
11
12
|
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
12
13
|
import { SmallSystem } from "../numerics/Polynomials";
|
|
@@ -98,6 +99,7 @@ export class HalfEdge {
|
|
|
98
99
|
this.sortAngle = undefined;
|
|
99
100
|
this.sortData = undefined;
|
|
100
101
|
this.edgeTag = undefined;
|
|
102
|
+
this.faceTag = undefined;
|
|
101
103
|
// Always created in pairs, init here to make TS compiler and JS runtime happy
|
|
102
104
|
this._facePredecessor = this;
|
|
103
105
|
this._faceSuccessor = this;
|
|
@@ -218,6 +220,36 @@ export class HalfEdge {
|
|
|
218
220
|
}
|
|
219
221
|
return newA;
|
|
220
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* * Create a new sliver face "inside" an existing edge.
|
|
225
|
+
* * Insert it "within" the base edge.
|
|
226
|
+
* * This requires two new half edges.
|
|
227
|
+
* * if the base is undefined, create a single-edge loop.
|
|
228
|
+
* * This (unlike pinch) breaks the edgeMate pairing of the base edge.
|
|
229
|
+
* * This preserves xyz and i properties at all existing vertices.
|
|
230
|
+
* * The two new half edges are a sliver face (via their predecessor and successor)
|
|
231
|
+
* * Each new edge mates to one existing edge.
|
|
232
|
+
* @returns Returns the reference to the half edge created.
|
|
233
|
+
*/
|
|
234
|
+
static splitEdgeCreateSliverFace(baseA, heArray) {
|
|
235
|
+
// raw edges ...
|
|
236
|
+
const newA = new HalfEdge();
|
|
237
|
+
const newB = new HalfEdge();
|
|
238
|
+
const baseB = baseA.edgeMate;
|
|
239
|
+
if (heArray) {
|
|
240
|
+
heArray.push(newA);
|
|
241
|
+
heArray.push(newB);
|
|
242
|
+
}
|
|
243
|
+
newA._faceSuccessor = newA._facePredecessor = newB;
|
|
244
|
+
newB._faceSuccessor = newB._facePredecessor = newA;
|
|
245
|
+
// newA is in vertex loop with baseA etc.
|
|
246
|
+
// newA mates to baseB
|
|
247
|
+
HalfEdge.setEdgeMates(newA, baseB);
|
|
248
|
+
HalfEdge.setEdgeMates(newB, baseA);
|
|
249
|
+
newA.copyDataFrom(baseA, true, true, false, false);
|
|
250
|
+
newB.copyDataFrom(baseB, true, true, false, false);
|
|
251
|
+
return newA;
|
|
252
|
+
}
|
|
221
253
|
/**
|
|
222
254
|
* Copy "edge based" content of fromNode to toNode
|
|
223
255
|
* * edgeTag
|
|
@@ -428,6 +460,35 @@ export class HalfEdge {
|
|
|
428
460
|
}
|
|
429
461
|
return count;
|
|
430
462
|
}
|
|
463
|
+
/** Returns the first node with given mask value around this vertex loop. */
|
|
464
|
+
findMaskAroundVertex(mask, value = true) {
|
|
465
|
+
let node = this;
|
|
466
|
+
do {
|
|
467
|
+
if (node.isMaskSet(mask) === value)
|
|
468
|
+
return node;
|
|
469
|
+
node = node.vertexSuccessor;
|
|
470
|
+
} while (node !== this);
|
|
471
|
+
return undefined;
|
|
472
|
+
}
|
|
473
|
+
/** Returns the first node with given mask value around this face loop. */
|
|
474
|
+
findMaskAroundFace(mask, value = true) {
|
|
475
|
+
let node = this;
|
|
476
|
+
do {
|
|
477
|
+
if (node.isMaskSet(mask) === value)
|
|
478
|
+
return node;
|
|
479
|
+
node = node.faceSuccessor;
|
|
480
|
+
} while (node !== this);
|
|
481
|
+
return undefined;
|
|
482
|
+
}
|
|
483
|
+
/** Returns the first node with given mask value on this edge (i.e. examining this and this.mate) */
|
|
484
|
+
findMaskAroundEdge(mask, value = true) {
|
|
485
|
+
if (this.isMaskSet(mask) === value)
|
|
486
|
+
return this;
|
|
487
|
+
const mate = this.edgeMate;
|
|
488
|
+
if (mate.isMaskSet(mask) === value)
|
|
489
|
+
return mate;
|
|
490
|
+
return undefined;
|
|
491
|
+
}
|
|
431
492
|
/** Set a mask, and return prior value.
|
|
432
493
|
* @param mask mask to apply
|
|
433
494
|
*/
|
|
@@ -445,6 +506,15 @@ export class HalfEdge {
|
|
|
445
506
|
this.y = node.y;
|
|
446
507
|
this.z = node.z;
|
|
447
508
|
}
|
|
509
|
+
/**
|
|
510
|
+
* Set (copy) the this.x, this.y, this.z from xyz.x, xyz.y, xyz.z
|
|
511
|
+
* @param node source with x,y,z properties
|
|
512
|
+
*/
|
|
513
|
+
setXYZ(xyz) {
|
|
514
|
+
this.x = xyz.x;
|
|
515
|
+
this.y = xyz.y;
|
|
516
|
+
this.z = xyz.z;
|
|
517
|
+
}
|
|
448
518
|
/**
|
|
449
519
|
* Test if mask bits are set in the node's bitMask.
|
|
450
520
|
* @return Return true (as a simple boolean, not a mask) if any bits of the mask parameter match bits of the node's bitMask
|
|
@@ -534,6 +604,10 @@ export class HalfEdge {
|
|
|
534
604
|
const s = `${node.id.toString()}+${HalfEdge.nodeToMaskString(node)}[${node.x},${node.y}]`;
|
|
535
605
|
return s;
|
|
536
606
|
}
|
|
607
|
+
/** Return the [id, [x,y],z] of a node. Useful for collector methods. */
|
|
608
|
+
static nodeToIdXYZString(node) {
|
|
609
|
+
return `[${node.id.toString()}: ${node.x},${node.y},${node.z}]`;
|
|
610
|
+
}
|
|
537
611
|
/** Create a string representation of the mask
|
|
538
612
|
* * Null mask is empty string.
|
|
539
613
|
* * Appended characters B,P,X for Boundary, Primary, Exterior mask bits.
|
|
@@ -558,7 +632,13 @@ export class HalfEdge {
|
|
|
558
632
|
}
|
|
559
633
|
/** Return Vector3d to face successor */
|
|
560
634
|
vectorToFaceSuccessor(result) {
|
|
561
|
-
|
|
635
|
+
const other = this.faceSuccessor;
|
|
636
|
+
return Vector3d.create(other.x - this.x, other.y - this.y, other.z - this.z, result);
|
|
637
|
+
}
|
|
638
|
+
/** Return Vector3d to face successor */
|
|
639
|
+
vectorToFacePredecessor(result) {
|
|
640
|
+
const other = this.facePredecessor;
|
|
641
|
+
return Vector3d.create(other.x - this.x, other.y - this.y, other.z - this.z, result);
|
|
562
642
|
}
|
|
563
643
|
/** test if spaceNode is in the sector at sectorNode */
|
|
564
644
|
static isNodeVisibleInSector(spaceNode, sectorNode) {
|
|
@@ -682,6 +762,14 @@ export class HalfEdge {
|
|
|
682
762
|
static testNodeMaskNotExterior(node) { return !node.isMaskSet(HalfEdgeMask.EXTERIOR); }
|
|
683
763
|
/** Returns Returns true if the node does NOT have Mask.EXTERIOR_MASK set. */
|
|
684
764
|
static testMateMaskExterior(node) { return node.edgeMate.isMaskSet(HalfEdgeMask.EXTERIOR); }
|
|
765
|
+
/** Returns radians between this edge and its face predecessor edge, using all three coordinates x,y,z and given normal to resolve sweep direction.
|
|
766
|
+
* * The returned angle is positive, i.e. may be larger than PI radians.
|
|
767
|
+
*/
|
|
768
|
+
static sectorSweepRadiansXYZ(node, normal) {
|
|
769
|
+
const nodeB = node.faceSuccessor;
|
|
770
|
+
const nodeC = node.facePredecessor;
|
|
771
|
+
return Angle.orientedRadiansBetweenVectorsXYZ(nodeB.x - node.x, nodeB.y - node.y, nodeB.z - node.z, nodeC.x - node.x, nodeC.y - node.y, nodeC.z - node.z, normal.x, normal.y, normal.z, true);
|
|
772
|
+
}
|
|
685
773
|
/** Returns Returns true if the face has positive area in xy parts. */
|
|
686
774
|
static testFacePositiveAreaXY(node) {
|
|
687
775
|
return node.countEdgesAroundFace() > 2 && node.signedFaceArea() > 0.0;
|
|
@@ -713,6 +801,26 @@ export class HalfEdge {
|
|
|
713
801
|
} while (node !== this);
|
|
714
802
|
return nodes;
|
|
715
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* search around a vertex for nodes that have a specified mask setting.
|
|
806
|
+
* @param vertexSeed first node to search
|
|
807
|
+
* @param mask target mask
|
|
808
|
+
* @param value target value for mask on half edges.
|
|
809
|
+
* @param collectedNodes optional array to be cleared and receive masked nodes
|
|
810
|
+
*/
|
|
811
|
+
collectMaskedEdgesAroundVertex(mask, value = true, result) {
|
|
812
|
+
if (result === undefined)
|
|
813
|
+
result = [];
|
|
814
|
+
else
|
|
815
|
+
result.length = 0;
|
|
816
|
+
let node = this;
|
|
817
|
+
do {
|
|
818
|
+
if (node.isMaskSet(mask) === value)
|
|
819
|
+
result.push(node);
|
|
820
|
+
node = node.vertexSuccessor;
|
|
821
|
+
} while (node !== this);
|
|
822
|
+
return result;
|
|
823
|
+
}
|
|
716
824
|
/**
|
|
717
825
|
*
|
|
718
826
|
* * Evaluate f(node) at each outbound node around this node's vertex loop.
|
|
@@ -905,8 +1013,7 @@ export class HalfEdge {
|
|
|
905
1013
|
* * If the edge is horizontal with (approximate) identical y, return the node.
|
|
906
1014
|
* * If the edge is horizontal with different y, return undefined.
|
|
907
1015
|
* * If the edge is not horizontal, return the fractional position (possibly outside 0..1) of the intersection.
|
|
908
|
-
* @param
|
|
909
|
-
* @param result optional preallocated result
|
|
1016
|
+
* @param node0 Base node of edge
|
|
910
1017
|
*/
|
|
911
1018
|
static horizontalScanFraction(node0, y) {
|
|
912
1019
|
const node1 = node0.faceSuccessor;
|
|
@@ -921,8 +1028,7 @@ export class HalfEdge {
|
|
|
921
1028
|
* * Compute fractional coordinates of the intersection of a horizontal line with an edge.
|
|
922
1029
|
* * If the edge is horizontal return undefined (no test for horizontal at y!!!)
|
|
923
1030
|
* * If the edge is not horizontal and y is between its end y's, return the fraction
|
|
924
|
-
* @param
|
|
925
|
-
* @param result optional preallocated result
|
|
1031
|
+
* @param node0 Base node of edge
|
|
926
1032
|
*/
|
|
927
1033
|
static horizontalScanFraction01(node0, y) {
|
|
928
1034
|
const node1 = node0.faceSuccessor;
|
|
@@ -936,6 +1042,31 @@ export class HalfEdge {
|
|
|
936
1042
|
return fraction;
|
|
937
1043
|
return undefined;
|
|
938
1044
|
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Copy various data from source to this.
|
|
1047
|
+
* @param source other half edge.
|
|
1048
|
+
* @param XYZ copy simple coordinates
|
|
1049
|
+
* @param copyVertexData true to copy data belonging to the vertex. (i.e. the "i" member)
|
|
1050
|
+
* @param copyVertexData true to copy data belonging to the edge. (i.e. call transferEdgeData)
|
|
1051
|
+
* @param copyFaceData true to copy faceTag
|
|
1052
|
+
*/
|
|
1053
|
+
copyDataFrom(source, copyXYZ, copyVertexData, copyEdgeData, copyFaceData) {
|
|
1054
|
+
if (copyXYZ) {
|
|
1055
|
+
this.x = source.x;
|
|
1056
|
+
this.y = source.y;
|
|
1057
|
+
this.z = source.z;
|
|
1058
|
+
}
|
|
1059
|
+
if (copyVertexData) {
|
|
1060
|
+
this.i = source.i;
|
|
1061
|
+
}
|
|
1062
|
+
if (copyEdgeData) {
|
|
1063
|
+
HalfEdge.transferEdgeProperties(source, this);
|
|
1064
|
+
this.edgeTag = source.edgeTag;
|
|
1065
|
+
}
|
|
1066
|
+
if (copyFaceData) {
|
|
1067
|
+
this.faceTag = source.faceTag;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
939
1070
|
}
|
|
940
1071
|
HalfEdge._edgePropertyMasks = [HalfEdgeMask.BOUNDARY_EDGE, HalfEdgeMask.EXTERIOR, HalfEdgeMask.PRIMARY_EDGE, HalfEdgeMask.NULL_FACE];
|
|
941
1072
|
HalfEdge._totalNodesCreated = 0;
|
|
@@ -976,6 +1107,19 @@ export class HalfEdgeGraph {
|
|
|
976
1107
|
const a = HalfEdge.createHalfEdgePairWithCoordinates(xA, yA, zA, iA, xB, yB, zB, iB, this.allHalfEdges);
|
|
977
1108
|
return a;
|
|
978
1109
|
}
|
|
1110
|
+
/**
|
|
1111
|
+
* * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
|
|
1112
|
+
* * The two edges are joined as edgeMate pair.
|
|
1113
|
+
* * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
|
|
1114
|
+
* * The two edges are added to the graph's HalfEdge set
|
|
1115
|
+
* * Coordinates are set to zero.
|
|
1116
|
+
* * ids are installed in the two half edges.
|
|
1117
|
+
* @returns Return pointer to the first half edge created. (This has idA as its id.)
|
|
1118
|
+
*/
|
|
1119
|
+
createEdgeIdId(iA = 0, iB = 0) {
|
|
1120
|
+
const a = HalfEdge.createHalfEdgePairWithCoordinates(0.0, 0.0, 0.0, iA, 0.0, 0.0, 0.0, iB, this.allHalfEdges);
|
|
1121
|
+
return a;
|
|
1122
|
+
}
|
|
979
1123
|
/**
|
|
980
1124
|
* * create an edge from coordinates x,y,z to (the tail of) an existing half edge.
|
|
981
1125
|
* @returns Return pointer to the half edge with tail at x,y,z
|
|
@@ -1020,6 +1164,20 @@ export class HalfEdgeGraph {
|
|
|
1020
1164
|
const he = HalfEdge.splitEdge(base, xA, yA, zA, iA, this.allHalfEdges);
|
|
1021
1165
|
return he;
|
|
1022
1166
|
}
|
|
1167
|
+
/**
|
|
1168
|
+
* * Create a sliver face "within" an edge.
|
|
1169
|
+
* * this creates two half edges.
|
|
1170
|
+
* * The existing edges both stay in their same face loops and retain coordinates and i value.
|
|
1171
|
+
* * Each existing edge's mate is a new edge (rather than original mate)
|
|
1172
|
+
* * Coordinates are copied to the new edges at respective vertices.
|
|
1173
|
+
* * New faceTag and edgeTag undefined.
|
|
1174
|
+
* * i members are copied around their respective vertices.
|
|
1175
|
+
* @returns Returns the reference to the half edge created.
|
|
1176
|
+
*/
|
|
1177
|
+
splitEdgeCreateSliverFace(base) {
|
|
1178
|
+
const he = HalfEdge.splitEdgeCreateSliverFace(base, this.allHalfEdges);
|
|
1179
|
+
return he;
|
|
1180
|
+
}
|
|
1023
1181
|
/**
|
|
1024
1182
|
* * Insert a vertex in the edge beginning at base, with coordinates specified as a fraction along the existing edge.
|
|
1025
1183
|
* * this creates two half edges.
|
|
@@ -1157,6 +1315,26 @@ export class HalfEdgeGraph {
|
|
|
1157
1315
|
break;
|
|
1158
1316
|
}
|
|
1159
1317
|
}
|
|
1318
|
+
/**
|
|
1319
|
+
* * Visit each edge of the graph once.
|
|
1320
|
+
* * Call the announceEdge function.
|
|
1321
|
+
* * the edge mate will NOT appear in an announceEdge call.
|
|
1322
|
+
* * continue search if announceEdge(graph, node) returns true
|
|
1323
|
+
* * terminate search if announceEdge (graph, node) returns false
|
|
1324
|
+
* @param announceEdge function to apply at one node of each edge.
|
|
1325
|
+
*/
|
|
1326
|
+
announceEdges(announceEdge) {
|
|
1327
|
+
this.clearMask(HalfEdgeMask.VISITED);
|
|
1328
|
+
for (const node of this.allHalfEdges) {
|
|
1329
|
+
if (node.getMask(HalfEdgeMask.VISITED))
|
|
1330
|
+
continue;
|
|
1331
|
+
const mate = node.edgeMate;
|
|
1332
|
+
node.setMask(HalfEdgeMask.VISITED);
|
|
1333
|
+
mate.setMask(HalfEdgeMask.VISITED);
|
|
1334
|
+
if (!announceEdge(this, node))
|
|
1335
|
+
break;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1160
1338
|
/**
|
|
1161
1339
|
* * Visit each vertex loop of the graph once.
|
|
1162
1340
|
* * Call the announceVertex function
|
|
@@ -1175,8 +1353,8 @@ export class HalfEdgeGraph {
|
|
|
1175
1353
|
}
|
|
1176
1354
|
}
|
|
1177
1355
|
/**
|
|
1178
|
-
* * Visit each
|
|
1179
|
-
* * Call the
|
|
1356
|
+
* * Visit each half edge (node) of the graph once.
|
|
1357
|
+
* * Call the announceNode function
|
|
1180
1358
|
* * continue search if announceNode(graph, node) returns true
|
|
1181
1359
|
* * terminate search if announce face (graph, node) returns false
|
|
1182
1360
|
* @param announceNode function to apply at one node of each face.
|