@itwin/core-geometry 4.7.0-dev.6 → 4.7.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.
Files changed (113) hide show
  1. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +7 -1
  2. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  3. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +20 -4
  4. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  5. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +1 -1
  6. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  7. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +1 -1
  8. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  9. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +3 -3
  10. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  11. package/lib/cjs/geometry3d/Point3dVector3d.js +4 -3
  12. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  13. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -0
  14. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  15. package/lib/cjs/geometry3d/PointHelpers.js +19 -0
  16. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  17. package/lib/cjs/polyface/AuxData.d.ts +18 -10
  18. package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
  19. package/lib/cjs/polyface/AuxData.js +24 -12
  20. package/lib/cjs/polyface/AuxData.js.map +1 -1
  21. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
  22. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  23. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +2 -1
  24. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  25. package/lib/cjs/polyface/Polyface.d.ts +10 -2
  26. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  27. package/lib/cjs/polyface/Polyface.js +29 -17
  28. package/lib/cjs/polyface/Polyface.js.map +1 -1
  29. package/lib/cjs/polyface/PolyfaceData.d.ts +10 -9
  30. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  31. package/lib/cjs/polyface/PolyfaceData.js +17 -2
  32. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  33. package/lib/cjs/polyface/PolyfaceQuery.d.ts +302 -251
  34. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  35. package/lib/cjs/polyface/PolyfaceQuery.js +363 -309
  36. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  37. package/lib/cjs/serialization/BGFBReader.d.ts +18 -20
  38. package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
  39. package/lib/cjs/serialization/BGFBReader.js +119 -84
  40. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  41. package/lib/cjs/serialization/BGFBWriter.d.ts +1 -1
  42. package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
  43. package/lib/cjs/serialization/BGFBWriter.js +10 -15
  44. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  45. package/lib/cjs/serialization/IModelJsonSchema.d.ts +52 -7
  46. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  47. package/lib/cjs/serialization/IModelJsonSchema.js +26 -78
  48. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  49. package/lib/cjs/serialization/SerializationHelpers.d.ts +17 -0
  50. package/lib/cjs/serialization/SerializationHelpers.d.ts.map +1 -1
  51. package/lib/cjs/serialization/SerializationHelpers.js +85 -0
  52. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  53. package/lib/cjs/solid/Sphere.d.ts +1 -0
  54. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  55. package/lib/cjs/solid/Sphere.js +4 -2
  56. package/lib/cjs/solid/Sphere.js.map +1 -1
  57. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +7 -1
  58. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  59. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +20 -4
  60. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  61. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +1 -1
  62. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  63. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +1 -1
  64. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  65. package/lib/esm/geometry3d/Point3dVector3d.d.ts +3 -3
  66. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  67. package/lib/esm/geometry3d/Point3dVector3d.js +4 -3
  68. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  69. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -0
  70. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  71. package/lib/esm/geometry3d/PointHelpers.js +19 -0
  72. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  73. package/lib/esm/polyface/AuxData.d.ts +18 -10
  74. package/lib/esm/polyface/AuxData.d.ts.map +1 -1
  75. package/lib/esm/polyface/AuxData.js +24 -12
  76. package/lib/esm/polyface/AuxData.js.map +1 -1
  77. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
  78. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  79. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +2 -1
  80. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  81. package/lib/esm/polyface/Polyface.d.ts +10 -2
  82. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  83. package/lib/esm/polyface/Polyface.js +29 -17
  84. package/lib/esm/polyface/Polyface.js.map +1 -1
  85. package/lib/esm/polyface/PolyfaceData.d.ts +10 -9
  86. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  87. package/lib/esm/polyface/PolyfaceData.js +17 -2
  88. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  89. package/lib/esm/polyface/PolyfaceQuery.d.ts +302 -251
  90. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  91. package/lib/esm/polyface/PolyfaceQuery.js +363 -309
  92. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  93. package/lib/esm/serialization/BGFBReader.d.ts +18 -20
  94. package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
  95. package/lib/esm/serialization/BGFBReader.js +119 -84
  96. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  97. package/lib/esm/serialization/BGFBWriter.d.ts +1 -1
  98. package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
  99. package/lib/esm/serialization/BGFBWriter.js +10 -15
  100. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  101. package/lib/esm/serialization/IModelJsonSchema.d.ts +52 -7
  102. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  103. package/lib/esm/serialization/IModelJsonSchema.js +26 -78
  104. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  105. package/lib/esm/serialization/SerializationHelpers.d.ts +17 -0
  106. package/lib/esm/serialization/SerializationHelpers.d.ts.map +1 -1
  107. package/lib/esm/serialization/SerializationHelpers.js +85 -0
  108. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  109. package/lib/esm/solid/Sphere.d.ts +1 -0
  110. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  111. package/lib/esm/solid/Sphere.js +4 -2
  112. package/lib/esm/solid/Sphere.js.map +1 -1
  113. package/package.json +4 -4
@@ -26,61 +26,69 @@ import { RangeLengthData } from "./RangeLengthData";
26
26
  * @public
27
27
  */
28
28
  export declare class SweepLineStringToFacetsOptions {
29
- /** vector "towards the eye"
30
- * * In the common case of sweeping to an XY (e.g. ground or DTM) mesh,
31
- * use the positive Z vector as an up vector.
29
+ /**
30
+ * Vector towards the eye.
31
+ * * In the common case of sweeping to an XY (e.g., ground or DTM) mesh, use the positive Z vector as an up vector.
32
32
  * * In general case, this is a vector from the mesh towards an eye at infinity.
33
33
  */
34
34
  vectorToEye: Vector3d;
35
- /** true to collect edges from facets that face towards the eye */
35
+ /** True to collect edges from facets that face towards the eye. */
36
36
  collectOnForwardFacets: boolean;
37
- /** true to collect facets that are "on the side", i.e. their outward vector is perpendicular to vectorToEye. */
37
+ /** True to collect facets that are "on the side", i.e., their outward vector is perpendicular to vectorToEye. */
38
38
  collectOnSideFacets: boolean;
39
- /** true to collect facets that face away from the eye */
39
+ /** True to collect facets that face away from the eye. */
40
40
  collectOnRearFacets: boolean;
41
- /** (small) angle to use as tolerance for deciding if a facet is "on the side". Default (if given in degrees) is Geometry.smallAngleDegrees */
41
+ /**
42
+ * (Small) angle to use as tolerance for deciding if a facet is "on the side".
43
+ * * Default (if given in degrees) is `Geometry.smallAngleDegrees`.
44
+ */
42
45
  sideAngle: Angle;
43
- /** option to assemble lines into chains */
46
+ /** Option to assemble lines into chains. */
44
47
  assembleChains: boolean;
45
- /** constructor -- captures fully-checked parameters from static create method.
46
- */
48
+ /** Constructor. Captures fully-checked parameters from static create method. */
47
49
  private constructor();
48
- /** Create an options structure.
49
- * * Default vectorToEye is positive Z
50
- * * Default sideAngle has radians value Geometry.smallAngleRadians
51
- * * Default assembleChains is true
52
- * * Default collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets are all true.
50
+ /**
51
+ * Create an options structure.
52
+ * * Default `vectorToEye` is (0,0,1).
53
+ * * Default `sideAngle` is `Geometry.smallAngleRadians`.
54
+ * * Default `assembleChains` is `true`.
55
+ * * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
53
56
  */
54
57
  static create(vectorToEye?: Vector3d, sideAngle?: Angle, assembleChains?: boolean, collectOnForwardFacets?: boolean, collectOnSideFacets?: boolean, collectOnRearFacets?: boolean): SweepLineStringToFacetsOptions;
55
- /** Return true if all outputs are requested */
58
+ /** Return `true` if all outputs are requested. */
56
59
  get collectAll(): boolean;
57
- /** Decide if the instance flags accept this facet.
58
- * * Facets whose facet normal have positive, zero, or negative dot product with the vectorToEye are forward, side, and rear.
59
- * * Undefined facet normal returns false
60
+ /**
61
+ * Decide if the instance collector flags accept a facet with the given normal.
62
+ * * A facet whose facet normal has a positive, zero, or negative dot product with `vectorToEye` is classified
63
+ * as forward, side, or rear, respectively.
64
+ * * `undefined` facet normal returns `false`.
60
65
  */
61
66
  collectFromThisFacetNormal(facetNormal: Vector3d | undefined): boolean;
62
67
  }
63
68
  /**
64
- * Options carrier for [[fillSimpleHoles]]
69
+ * Options carrier for [[PolyfaceQuery.fillSimpleHoles]].
65
70
  * @public
66
71
  */
67
72
  export interface HoleFillOptions {
68
- /** REJECT hole candidates if its boundary chain is longer than this limit. */
73
+ /** Reject hole candidates if its boundary chain is longer than this limit. */
69
74
  maxPerimeter?: number;
70
- /** REJECT hole candidates if they have more than this number of edges */
75
+ /** Reject hole candidates if they have more than this number of edges. */
71
76
  maxEdgesAroundHole?: number;
72
- /** REJECT hole candidates if their orientation is not COUNTERCLOCKWISE around this vector.
73
- * * For instance, use an upward Z vector for a DTM whose facets face upward. This suppresses incorrectly treating the outer boundary as a hole.
77
+ /**
78
+ * Reject hole candidates if their orientation is not COUNTERCLOCKWISE around this vector.
79
+ * * For instance, use an upward Z vector for a DTM whose facets face upward. This suppresses incorrectly
80
+ * treating the outer boundary as a hole.
74
81
  */
75
82
  upVector?: Vector3d;
76
- /** requests that all content from the original mesh be copied to the mesh with filled holes. */
83
+ /** Requests that all content from the original mesh be copied to the mesh with filled holes. */
77
84
  includeOriginalMesh?: boolean;
78
85
  }
79
- /** Selective output options for PolyfaceQuery.cloneOffset:
80
- * * undefined means the usual facets in the expected offset mesh.
81
- * * if present as a json object, the various booleans select respective outputs.
82
- * * @public
83
- */
86
+ /**
87
+ * Selective output options for [[PolyfaceQuery.cloneOffset]]:
88
+ * * `undefined` means the usual facets in the expected offset mesh.
89
+ * * If present as a json object, the various booleans select respective outputs.
90
+ * * @public
91
+ */
84
92
  export interface OffsetMeshSelectiveOutputOptions {
85
93
  outputOffsetsFromFacesBeforeChamfers?: boolean;
86
94
  outputOffsetsFromFaces?: boolean;
@@ -90,212 +98,252 @@ export interface OffsetMeshSelectiveOutputOptions {
90
98
  /**
91
99
  * Options carrier for [[PolyfaceQuery.cloneOffset]].
92
100
  * * Default options are strongly recommended.
93
- * * The option most likely to be changed is chamferTurnAngle
101
+ * * The option most likely to be changed is `chamferAngleBetweenNormals`.
94
102
  * @public
95
103
  */
96
104
  export declare class OffsetMeshOptions {
97
- /** max angle between normals to be considered smooth */
105
+ /** Max angle between normals to be considered smooth. */
98
106
  smoothSingleAngleBetweenNormals: Angle;
99
- /** max accumulation of angle between normals to be considered smooth */
107
+ /** Max accumulation of angle between normals to be considered smooth. */
100
108
  smoothAccumulatedAngleBetweenNormals: Angle;
101
- /** When crossing an edge, this turn angle (typically 120 degrees) triggers a chamfer */
109
+ /**
110
+ * When facets meet and the turn angle (i.e., angle between facet normals) is larger than
111
+ * `chamferTurnAngleBetweenNormals`, a chamfer edge may be added to prevent offset mesh from having
112
+ * facets that extend out too far away from the source mesh.
113
+ */
102
114
  chamferAngleBetweenNormals: Angle;
103
- /** optional control structure for selective output.
104
- * * If undefined, output all expected offset facets.
115
+ /**
116
+ * Optional control structure for selective output.
117
+ * * If `undefined`, output all expected offset facets.
105
118
  */
106
119
  outputSelector?: OffsetMeshSelectiveOutputOptions;
107
- /** Constructor -- CAPTURE parameters ... */
120
+ /** Constructor -- CAPTURE parameters. */
108
121
  private constructor();
109
- /** construct and return an OffsetMeshOptions with given parameters.
122
+ /**
123
+ * Construct and return an `OffsetMeshOptions` with given parameters.
110
124
  * * Angles are forced to minimum values.
111
125
  * * Clones of the angles are given to the constructor.
112
- * @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge
113
- * @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal
114
- * @param chamferTurnAngleBetweenNormals when facets meet with larger angle, a chamfer edge may be added if the angle between facet normals is larger than this.
126
+ * @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge.
127
+ * Default value is `25` degrees.
128
+ * @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal.
129
+ * Default value is `60` degrees.
130
+ * @param chamferTurnAngleBetweenNormals when facets meet and the turn angle (i.e., angle between facet normals)
131
+ * is larger than `chamferTurnAngleBetweenNormals`, a chamfer edge may be added to prevent offset mesh from having
132
+ * facets that extend out too far away from the source mesh. Default value is `120` degrees.
115
133
  */
116
134
  static create(smoothSingleAngleBetweenNormals?: Angle, smoothAccumulatedAngleBetweenNormals?: Angle, chamferTurnAngleBetweenNormals?: Angle): OffsetMeshOptions;
117
135
  }
118
136
  /**
119
- * Structure to return multiple results from volume between facets and plane
137
+ * Structure to return multiple results from volume between facets and plane.
120
138
  * @public
121
139
  */
122
140
  export interface FacetProjectedVolumeSums {
123
- /** Summed (signed) volume */
141
+ /** Summed (signed) volume. */
124
142
  volume: number;
125
- /** summed area moments for positive contributions */
143
+ /** Summed area moments for positive contributions. */
126
144
  positiveProjectedFacetAreaMoments?: MomentData;
127
- /** summed area moments for negative contributions */
145
+ /** Summed area moments for negative contributions. */
128
146
  negativeProjectedFacetAreaMoments?: MomentData;
129
147
  }
130
148
  /**
131
- * Enumeration of cases for retaining facets among duplicates
149
+ * Enumeration of cases for retaining facets among duplicates.
132
150
  * @public
133
151
  */
134
152
  export declare enum DuplicateFacetClusterSelector {
135
- /** retain none of the duplicates */
153
+ /** Retain none of the duplicates. */
136
154
  SelectNone = 0,
137
- /** retain any one member among duplicates */
155
+ /** Retain any one member among duplicates. */
138
156
  SelectAny = 1,
139
- /** retain all members among duplicates */
157
+ /** Retain all members among duplicates. */
140
158
  SelectAll = 2,
141
- /** retain one from any cluster with an odd number of faces */
159
+ /** Retain one from any cluster with an odd number of faces. */
142
160
  SelectOneByParity = 3
143
161
  }
144
- /** PolyfaceQuery is a static class whose methods implement queries on a polyface or polyface visitor provided as a parameter to each method.
162
+ /**
163
+ * PolyfaceQuery is a static class whose methods implement queries on a `Polyface` or `PolyfaceVisitor` provided as a
164
+ * parameter to each method.
145
165
  * @public
146
166
  */
147
167
  export declare class PolyfaceQuery {
148
- /** copy the points from a visitor into a Linestring3d in a Loop object */
168
+ /** Copy the points from a visitor into a linestring loop. */
149
169
  static visitorToLoop(visitor: PolyfaceVisitor): Loop;
150
170
  /** Create a linestring loop for each facet of the polyface. */
151
171
  static indexedPolyfaceToLoops(polyface: Polyface): BagOfCurves;
152
- /** Return the sum of all facet areas.
153
- * @param vectorToEye compute sum of *signed* facet areas projected to a view plane perpendicular to this vector
154
- */
172
+ /**
173
+ * Sum all facet areas.
174
+ * @param source polyface or visitor.
175
+ * @param vectorToEye compute sum of (signed) facet areas projected to a view plane perpendicular to `vectorToEye`.
176
+ * If `vectorToEye` is not provided, actual facet areas are calculated (without any projection).
177
+ * @returns the sum of all facet areas. Return 0 if `source` is `undefined`.
178
+ */
155
179
  static sumFacetAreas(source: Polyface | PolyfaceVisitor | undefined, vectorToEye?: Vector3d): number;
156
- /** sum volumes of tetrahedra from origin to all facets.
157
- * * if origin is omitted, the first point encountered (by the visitor) is used as origin.
180
+ /**
181
+ * Sum volumes of tetrahedra from origin to all facets.
182
+ * * If origin is `undefined`, the first point encountered (by the visitor) is used as origin.
158
183
  * * If the mesh is closed, this sum is the volume.
159
- * * If the mesh is not closed, this sum is the volume of a mesh with various additional facets
160
- * from the origin to facets.
161
- */
184
+ * * If the mesh is not closed, this sum is the volume of a mesh with various additional facets from the origin
185
+ * to facets.
186
+ */
162
187
  static sumTetrahedralVolumes(source: Polyface | PolyfaceVisitor, origin?: Point3d): number;
163
- /** sum (signed) volumes between facets and a plane.
188
+ /**
189
+ * Sum (signed) volumes between facets and a plane.
164
190
  * Return a structure with multiple sums:
165
191
  * * volume = the sum of (signed) volumes between facets and the plane.
166
- * * positiveAreaMomentData, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second moments with respect to the centroid.
167
- *
168
- */
192
+ * * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second
193
+ * moments with respect to the centroid.
194
+ */
169
195
  static sumVolumeBetweenFacetsAndPlane(source: Polyface | PolyfaceVisitor, plane: Plane3dByOriginAndUnitNormal): FacetProjectedVolumeSums;
170
- /** Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all all facets, as viewed from origin. */
196
+ /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
171
197
  static sumFacetSecondAreaMomentProducts(source: Polyface | PolyfaceVisitor, origin: Point3d): Matrix4d;
172
- /** Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all tetrahedral volumes from origin */
198
+ /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all tetrahedral volumes from origin. */
173
199
  static sumFacetSecondVolumeMomentProducts(source: Polyface | PolyfaceVisitor, origin: Point3d): Matrix4d;
174
- /** Compute area moments for the mesh. In the returned MomentData:
175
- * * origin is the centroid.
176
- * * localToWorldMap has the origin and principal directions
177
- * * radiiOfGyration radii for rotation around the x,y,z axes.
200
+ /**
201
+ * Compute area moments for the mesh. In the returned `MomentData`:
202
+ * * `origin` is the centroid.
203
+ * * `localToWorldMap` has the origin and principal directions.
204
+ * * `radiiOfGyration` radii for rotation around the x,y,z axes.
178
205
  */
179
206
  static computePrincipalAreaMoments(source: Polyface): MomentData | undefined;
180
- /** Compute area moments for the mesh. In the returned MomentData:
181
- * * origin is the centroid.
182
- * * localToWorldMap has the origin and principal directions
183
- * * radiiOfGyration radii for rotation around the x,y,z axes.
207
+ /**
208
+ * Compute area moments for the mesh. In the returned MomentData:
209
+ * * `origin` is the centroid.
210
+ * * `localToWorldMap` has the origin and principal directions.
211
+ * * `radiiOfGyration` radii for rotation around the x,y,z axes.
184
212
  * * The result is only valid if the mesh is closed.
185
- * * There is no test for closure. Use `PolyfaceQuery.isPolyfaceClosedByEdgePairing(polyface)` to test for closure.
213
+ * * There is no test for closure. Use `PolyfaceQuery.isPolyfaceClosedByEdgePairing(polyface)` to test for closure.
186
214
  */
187
215
  static computePrincipalVolumeMoments(source: Polyface): MomentData | undefined;
188
- /** Determine whether all facets are convex.
189
- * @param source mesh to examine
216
+ /**
217
+ * Determine whether all facets are convex.
218
+ * @param source polyface or visitor.
219
+ * @returns `true` if all facets are convex; `false` otherwise.
190
220
  */
191
221
  static areFacetsConvex(source: Polyface | PolyfaceVisitor): boolean;
192
222
  /**
193
223
  * Test for convex volume by dihedral angle tests on all edges.
194
- * * This tests if all dihedral angles are positive.
195
- * * In a closed solid, this is a strong test for overall convexity.
196
- * * With `ignoreBoundaries` true, this may be a useful test when all the facets are in a single edge-connected component, such as a pyramid with no underside.
224
+ * * This tests if all dihedral angles of the mesh are positive.
225
+ * * In a closed solid, this is a strong test for overall mesh convexity with outward facing normals.
226
+ * * See [[dihedralAngleSummary]] for the definition of "dihedral angle".
227
+ * * With `ignoreBoundaries` true, this may be a useful test when all the facets are in a single edge-connected
228
+ * component, such as a pyramid with no underside.
197
229
  * * It is not a correct test if there are multiple, disjoint components.
198
- * * Take the above-mentioned pyramid with no underside.
199
- * * Within the same mesh, have a second pyramid placed to the side, still facing upward.
200
- * * The angles will pass the dihedral convexity test, but the composite thing surely is not convex.
201
- * @param source mesh to examine
202
- * @param ignoreBoundaries if true, ignore simple boundary edges, i.e. allow unclosed meshes.
203
- * @returns true if the mesh is closed and has all dihedral angles (angle across edge) positive
230
+ * * Take the above-mentioned pyramid with no underside.
231
+ * * Within the same mesh, have a second pyramid placed to the side, still facing upward.
232
+ * * The angles will pass the dihedral convexity test, but the composite thing surely is not convex.
233
+ * @param source mesh.
234
+ * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
235
+ * @returns true if all dihedral angles of the mesh are positive.
204
236
  */
205
237
  static isConvexByDihedralAngleCount(source: Polyface, ignoreBoundaries?: boolean): boolean;
206
238
  /**
207
239
  * Compute a number summarizing the dihedral angles in the mesh.
208
- * @see [[isConvexByDihedralAngleCount]] for comments about ignoreBoundaries===true when there are multiple connected components.
209
- * @param source mesh to examine
210
- * @param ignoreBoundaries if true, ignore simple boundary edges, i.e. allow unclosed meshes.
211
- * @returns a number summarizing the dihedral angles in the mesh.
212
- * * Return 1 if all angles are positive or planar. The mesh is probably convex with outward normals.
213
- * * Return -1 if all angles are negative or planar. The mesh is probably convex with inward normals.
214
- * * Return 0 if
215
- * * angles area mixed
216
- * * any edge has other than 1 incident facet or more than 2 incident facets.
217
- * * (but null edges are permitted -- These occur naturally at edges of quads at north or south pole)
240
+ * * A dihedral angle is the signed angle between adjacent facets' normals. This angle is positive when the cross
241
+ * product `normalA x normalB` has the same direction as facetA's traversal of the facets' shared edge.
242
+ * @param source mesh.
243
+ * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
244
+ * See [[isConvexByDihedralAngleCount]] for comments about passing true when there are multiple
245
+ * connected components.
246
+ * * Return `0` if all dihedral angles are zero (and `ignoreBoundaries === true`). The mesh is planar.
247
+ * * Otherwise, return `1` if all dihedral angles are non-negative. The mesh probably encloses a convex volume and
248
+ * has outward normals.
249
+ * * Otherwise, return `-1` if all dihedral angles are non-positive. The mesh probably encloses a convex volume and
250
+ * has inward normals.
251
+ * * Otherwise, return `-2`. Also return `-2` if a non-manifold condition was detected, or a facet normal could not
252
+ * be computed. A non-manifold condition is a positive-length edge adjacent to more than 2 facets or (if
253
+ * `ignoreBoundaries` is false) adjacent to exactly one facet.
218
254
  */
219
255
  static dihedralAngleSummary(source: Polyface, ignoreBoundaries?: boolean): number;
220
- /**
221
- * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
222
- */
256
+ /** Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume. */
223
257
  static isPolyfaceClosedByEdgePairing(source: Polyface): boolean;
224
- /** Test edges pairing in `source` mesh.
225
- * * for `allowSimpleBoundaries === false` true return means this is a closed 2-manifold surface
226
- * * for `allowSimpleBoundaries === true` true means this is a 2-manifold surface which may have boundary, but is still properly matched internally.
227
- * * Any edge with 3 or more incident facets triggers `false` return.
228
- * * Any edge with 2 incident facets in the same direction triggers a `false` return.
258
+ /**
259
+ * Test edges pairing in `source` mesh.
260
+ * * For `allowSimpleBoundaries === false` true return means this is a closed 2-manifold surface.
261
+ * * For `allowSimpleBoundaries === true` true means this is a 2-manifold surface which may have boundary, but is
262
+ * still properly matched internally.
263
+ * * Any edge with 3 or more adjacent facets triggers `false` return.
264
+ * * Any edge with 2 adjacent facets in the same direction triggers a `false` return.
229
265
  */
230
266
  static isPolyfaceManifold(source: Polyface, allowSimpleBoundaries?: boolean): boolean;
231
267
  /**
232
- * construct a CurveCollection containing boundary edges.
233
- * * each edge is a LineSegment3d
234
- * @param source polyface or visitor
235
- * @param includeTypical true to in include typical boundary edges with a single incident facet
236
- * @param includeMismatch true to include edges with more than 2 incident facets
268
+ * Construct a CurveCollection containing boundary edges.
269
+ * * Each edge is a LineSegment3d.
270
+ * @param source polyface or visitor.
271
+ * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
272
+ * @param includeMismatch true to include edges with more than 2 adjacent facets.
237
273
  * @param includeNull true to include edges with identical start and end vertex indices.
238
274
  */
239
275
  static boundaryEdges(source: Polyface | PolyfaceVisitor | undefined, includeTypical?: boolean, includeMismatch?: boolean, includeNull?: boolean): CurveCollection | undefined;
240
276
  /**
241
277
  * Collect boundary edges.
242
278
  * * Return the edges as the simplest collection of chains of line segments.
243
- * @param source facets
244
- * @param includeTypical true to in include typical boundary edges with a single incident facet
245
- * @param includeMismatch true to include edges with more than 2 incident facets
279
+ * @param source polyface or visitor.
280
+ * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
281
+ * @param includeMismatch true to include edges with more than 2 adjacent facets.
246
282
  * @param includeNull true to include edges with identical start and end vertex indices.
247
283
  */
248
284
  static collectBoundaryEdges(source: Polyface | PolyfaceVisitor, includeTypical?: boolean, includeMismatch?: boolean, includeNull?: boolean): AnyChain | undefined;
249
285
  /**
250
286
  * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
251
287
  * If not, extract the boundary edges as lines.
252
- * @param source polyface or visitor
253
- * @param announceEdge function to be called with each boundary edge. The announcement is start and end points, start and end indices, and facet index.
254
- * @param includeTypical true to announce typical boundary edges with a single incident facet
255
- * @param includeMismatch true to announce edges with more than 2 incident facets
288
+ * @param source polyface or visitor.
289
+ * @param announceEdge function to be called with each boundary edge. The announcement is start and end points,
290
+ * start and end indices, and facet index.
291
+ * @param includeTypical true to announce typical boundary edges with a single adjacent facet.
292
+ * @param includeMismatch true to announce edges with more than 2 adjacent facets.
256
293
  * @param includeNull true to announce edges with identical start and end vertex indices.
257
294
  */
258
295
  static announceBoundaryEdges(source: Polyface | PolyfaceVisitor | undefined, announceEdge: (pointA: Point3d, pointB: Point3d, indexA: number, indexB: number, facetIndex: number) => void, includeTypical?: boolean, includeMismatch?: boolean, includeNull?: boolean): void;
259
296
  /**
260
- * Invoke the callback on each manifold edge whose adjacent facet normals form vectorToEye dot products with opposite sign.
297
+ * Load all half edges from a mesh to an IndexedEdgeMatcher.
298
+ * @param polyface a mesh or a visitor assumed to have numWrap === 1.
299
+ */
300
+ static createIndexedEdges(polyface: Polyface | PolyfaceVisitor): IndexedEdgeMatcher;
301
+ /**
302
+ * Invoke the callback on each manifold edge whose adjacent facet normals form vectorToEye dot products
303
+ * with opposite sign.
261
304
  * * The callback is not called on boundary edges.
262
- * @param source facets
263
- * @param announce callback function invoked on manifold silhouette edges
264
- * @param vectorToEye normal of plane in which to compute silhouette edges
265
- * @param sideAngle angular tolerance for perpendicularity test
305
+ * @param source polyface or visitor.
306
+ * @param announce callback function invoked on manifold silhouette edges.
307
+ * @param vectorToEye normal of plane in which to compute silhouette edges.
308
+ * @param sideAngle angular tolerance for perpendicularity test.
266
309
  */
267
310
  static announceSilhouetteEdges(source: Polyface | PolyfaceVisitor, announce: (pointA: Point3d, pointB: Point3d, vertexIndexA: number, vertexIndexB: number, facetIndex: number) => void, vectorToEye: Vector3d, sideAngle?: Angle): void;
268
311
  /**
269
312
  * Collect manifold edges whose adjacent facet normals form vectorToEye dot products with opposite sign.
270
313
  * * Does not return boundary edges.
271
314
  * * Return the edges as chains of line segments.
272
- * @param source facets
273
- * @param vectorToEye normal of plane in which to compute silhouette edges
274
- * @param sideAngle angular tolerance for perpendicularity test
315
+ * @param source polyface or visitor.
316
+ * @param vectorToEye normal of plane in which to compute silhouette edges.
317
+ * @param sideAngle angular tolerance for perpendicularity test.
275
318
  */
276
319
  static collectSilhouetteEdges(source: Polyface | PolyfaceVisitor, vectorToEye: Vector3d, sideAngle?: Angle): AnyChain | undefined;
277
- /** Find segments (within the linestring) which project to facets.
320
+ /**
321
+ * Find segments (within the linestring) which project to facets.
278
322
  * * Announce each pair of linestring segment and on-facet segment through a callback.
279
323
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
280
324
  */
281
325
  static announceSweepLinestringToConvexPolyfaceXY(linestringPoints: GrowableXYZArray, polyface: Polyface, announce: AnnounceDrapePanel): any;
282
- /** Execute context.projectToPolygon until its work estimates accumulate to workLimit */
283
- private static continueAnnounceSweepLinestringToConvexPolyfaceXY;
284
326
  private static _asyncWorkLimit;
285
- /** Set the limit on work during an async time blocks, and return the old value.
327
+ /**
328
+ * Set the limit on work during an async time blocks, and return the old value.
286
329
  * * This should be a large number -- default is 1.0e6
287
330
  * @internal
288
331
  */
289
332
  static setAsyncWorkLimit(value: number): number;
290
- /** Query the current limit on work during an async time block.
333
+ /**
334
+ * Query the current limit on work during an async time block.
291
335
  * @internal
292
336
  */
293
337
  static get asyncWorkLimit(): number;
294
- /** Number of "await" steps executed in recent async calls.
338
+ /**
339
+ * Number of "await" steps executed in recent async calls.
295
340
  * @internal
296
341
  */
297
342
  static awaitBlockCount: number;
298
- /** Find segments (within the linestring) which project to facets.
343
+ /** Execute `context.projectToPolygon` until its work estimates accumulate to workLimit. */
344
+ private static continueAnnounceSweepLinestringToConvexPolyfaceXY;
345
+ /**
346
+ * Find segments (within the linestring) which project to facets.
299
347
  * * Announce each pair of linestring segment and on-facet segment through a callback.
300
348
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
301
349
  * * REMARK: Although this is public, the usual use is via slightly higher level public methods, viz:
@@ -303,44 +351,44 @@ export declare class PolyfaceQuery {
303
351
  * @internal
304
352
  */
305
353
  static asyncAnnounceSweepLinestringToConvexPolyfaceXY(linestringPoints: GrowableXYZArray, polyface: Polyface, announce: AnnounceDrapePanel): Promise<number>;
306
- /** Search the facets for facet subsets that are connected with at least vertex contact.
354
+ /**
355
+ * Search the facets for facet subsets that are connected with at least vertex contact.
307
356
  * * Return array of arrays of facet indices.
308
357
  */
309
358
  static partitionFacetIndicesByVertexConnectedComponent(polyface: Polyface | PolyfaceVisitor): number[][];
310
359
  /**
311
360
  * * Examine the normal orientation for each faces.
312
361
  * * Separate to 3 partitions:
313
- * * facets with normal in the positive direction of the vectorToEye (partition 0)
314
- * * facets with normal in the negative direction of the vectorToEye (partition 1)
315
- * * facets nearly perpendicular to the view vector (partition 2)
362
+ * * Facets with normal in the positive direction of the vectorToEye (partition 0).
363
+ * * Facets with normal in the negative direction of the vectorToEye (partition 1).
364
+ * * Facets nearly perpendicular to the view vector (partition 2).
316
365
  * * Return array of arrays of facet indices.
317
366
  */
318
367
  static partitionFacetIndicesByVisibilityVector(polyface: Polyface | PolyfaceVisitor, vectorToEye: Vector3d, sideAngleTolerance: Angle): number[][];
319
368
  /**
320
369
  * Return the boundary of facets that are facing the eye.
321
- * @param polyface
370
+ * @param polyface the indexed polyface
322
371
  * @param visibilitySubset selector among the visible facet sets extracted by partitionFacetIndicesByVisibilityVector
323
372
  * * 0 ==> forward facing
324
373
  * * 1 ==> rear facing
325
374
  * * 2 ==> side facing
326
- * @param vectorToEye
327
- * @param sideAngleTolerance
375
+ * @param vectorToEye the vector to eye
376
+ * @param sideAngleTolerance the tolerance of side angle
328
377
  */
329
378
  static boundaryOfVisibleSubset(polyface: IndexedPolyface, visibilitySelect: 0 | 1 | 2, vectorToEye: Vector3d, sideAngleTolerance?: Angle): CurveCollection | undefined;
330
379
  /**
331
- * Search for edges with only 1 incident facet.
332
- * * chain them into loops
333
- * * emit the loops to the announceLoop function
334
- * @param mesh
380
+ * Search for edges with only 1 adjacent facet.
381
+ * * Chain them into loops.
382
+ * * Emit the loops to the announceLoop function.
335
383
  */
336
384
  static announceBoundaryChainsAsLineString3d(mesh: Polyface | PolyfaceVisitor, announceLoop: (points: LineString3d) => void): void;
337
385
  /**
338
386
  * Return a mesh with
339
387
  * * clusters of adjacent, coplanar facets merged into larger facets.
340
388
  * * other facets included unchanged.
341
- * @param mesh existing mesh or visitor
342
- * @param maxSmoothEdgeAngle maximum dihedral angle across an edge between facets deemed coplanar. If undefined, uses `Geometry.smallAngleRadians`.
343
- * @returns
389
+ * @param mesh existing mesh or visitor.
390
+ * @param maxSmoothEdgeAngle maximum dihedral angle across an edge between facets deemed coplanar. If undefined,
391
+ * uses `Geometry.smallAngleRadians`.
344
392
  */
345
393
  static cloneWithMaximalPlanarFacets(mesh: Polyface | PolyfaceVisitor, maxSmoothEdgeAngle?: Angle): IndexedPolyface | undefined;
346
394
  /**
@@ -349,50 +397,49 @@ export declare class PolyfaceQuery {
349
397
  * * Unclosed chains are rejected.
350
398
  * * Closed chains are triangulated and returned as a mesh.
351
399
  * * The options structure enforces restrictions on how complicated the hole filling can be:
352
- * * maxEdgesAroundHole -- holes with more edges are skipped
400
+ * * maxEdgesAroundHole -- holes with more edges are skipped.
353
401
  * * maxPerimeter -- holes with larger summed edge lengths are skipped.
354
402
  * * upVector -- holes that do not have positive area along this view are skipped.
355
- * * includeOriginalMesh -- includes the original mesh in the output mesh, so the composite mesh is a clone with holes filled
356
- * @param mesh existing mesh
403
+ * * includeOriginalMesh -- includes the original mesh in the output mesh, so the composite mesh is a
404
+ * clone with holes filled.
405
+ * @param mesh existing mesh.
357
406
  * @param options options controlling the hole fill.
358
407
  * @param unfilledChains optional array to receive the points around holes that were not filled.
359
- * @returns
360
408
  */
361
409
  static fillSimpleHoles(mesh: Polyface | PolyfaceVisitor, options: HoleFillOptions, unfilledChains?: LineString3d[]): IndexedPolyface | undefined;
362
- /** Clone the facets in each partition to a separate polyface.
363
- *
364
- */
410
+ /** Clone the facets in each partition to a separate polyface. */
365
411
  static clonePartitions(polyface: Polyface | PolyfaceVisitor, partitions: number[][]): Polyface[];
366
- /** Clone facets that pass a filter function */
412
+ /** Clone facets that pass a filter function. */
367
413
  static cloneFiltered(source: Polyface | PolyfaceVisitor, filter: (visitor: PolyfaceVisitor) => boolean): IndexedPolyface;
368
414
  /** Clone the facets with in-facet dangling edges removed. */
369
415
  static cloneWithDanglingEdgesRemoved(source: Polyface | PolyfaceVisitor): IndexedPolyface;
370
- /** If the visitor's client is a polyface, simply return its point array length.
371
- * If not a polyface, visit all facets to find the largest index.
372
- */
373
- static visitorClientPointCount(visitor: Polyface | PolyfaceVisitor): number;
374
- /** If the visitor's client is a polyface, simply return its facet count.
375
- * If not a polyface, visit all facets to accumulate a count.
376
- */
377
- static visitorClientFacetCount(visitor: Polyface | PolyfaceVisitor): number;
378
- /** Partition the facet set into connected components such that two adjacent facets are in the same component if and only if they are adjacent across a clustered edge.
416
+ /** Return the point count of the `source`. */
417
+ static visitorClientPointCount(source: Polyface | PolyfaceVisitor): number;
418
+ /** Return the facet count of the `source`. */
419
+ static visitorClientFacetCount(source: Polyface | PolyfaceVisitor): number;
420
+ /**
421
+ * Partition the facet set into connected components such that two adjacent facets are in the same component if and
422
+ * only if they are adjacent across a clustered edge.
379
423
  * @param edgeClusters sorted and clustered edges (cf. `IndexedEdgeMatcher.sortAndCollectClusters`).
380
424
  * @param numFacets facet count in the parent mesh. In particular, `edge.facetIndex < numFacets` for every input edge.
381
- * @return collection of facet index arrays, one array per connected component
425
+ * @return collection of facet index arrays, one array per connected component.
382
426
  */
383
427
  private static partitionFacetIndicesBySortableEdgeClusters;
384
- /** Partition the facet set into connected components. Each facet in a given component shares an edge only with other facets in the component (or is a boundary edge).
385
- * @param polyface facets to partition
386
- * @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface
387
- * @return collection of facet index arrays, one per connected component
428
+ /**
429
+ * Partition the facet set into connected components. Each facet in a given component shares an edge only with
430
+ * other facets in the component (or is a boundary edge).
431
+ * @param polyface facets to partition.
432
+ * @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface.
433
+ * @return collection of facet index arrays, one per connected component.
388
434
  */
389
435
  static partitionFacetIndicesByEdgeConnectedComponent(polyface: Polyface | PolyfaceVisitor, stopAtVisibleEdges?: boolean): number[][];
390
- /** Find segments (within the line string) which project to facets.
436
+ /**
437
+ * Find segments (within the line string) which project to facets.
391
438
  * * Assemble each input segment paired with its projected segment/point as a quad/triangle facet in a new polyface.
392
439
  * * Input facets are ASSUMED to be convex and planar, and not overlap in the z direction.
393
440
  */
394
441
  static sweepLineStringToFacetsXYReturnSweptFacets(lineStringPoints: GrowableXYZArray, polyface: Polyface): Polyface;
395
- /** @deprecated in 4.x. Use sweepLineStringToFacetsXYReturnSweptFacets instead. */
442
+ /** @deprecated in 4.x. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
396
443
  static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints: GrowableXYZArray, polyface: Polyface): Polyface;
397
444
  /**
398
445
  * Sweep the line string to intersections with a mesh.
@@ -404,9 +451,9 @@ export declare class PolyfaceQuery {
404
451
  static sweepLineStringToFacets(linestringPoints: GrowableXYZArray, polyfaceOrVisitor: Polyface | PolyfaceVisitor, options?: SweepLineStringToFacetsOptions): LinearCurvePrimitive[];
405
452
  /**
406
453
  * Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.
407
- * @param lineStringPoints input line string to drape on the mesh
408
- * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh
409
- * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index
454
+ * @param lineStringPoints input line string to drape on the mesh.
455
+ * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh.
456
+ * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index.
410
457
  * @example Using a 5x5 indexed search grid:
411
458
  * ```
412
459
  * const xyRange = Range2d.createFrom(myPolyface.range());
@@ -416,160 +463,157 @@ export declare class PolyfaceQuery {
416
463
  * }
417
464
  * const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);
418
465
  * ```
419
- * @returns collected line strings
466
+ * @returns the collected line strings.
420
467
  */
421
468
  static sweepLineStringToFacetsXY(lineStringPoints: GrowableXYZArray | Point3d[], polyfaceOrVisitor: Polyface | PolyfaceVisitor, searchByReadIndex: Range2dSearchInterface<number>): LineString3d[];
422
- /** Find segments (within the linestring) which project to facets.
469
+ /**
470
+ * Find segments (within the linestring) which project to facets.
423
471
  * * Return collected line segments.
424
472
  * * This calls [[sweepLineStringToFacets]] with options created by
425
- * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),false, true, true, true);`
426
- * @deprecated in 4.x. Use [[sweepLineStringToFacets]] to get further options.
473
+ * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
474
+ * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
427
475
  */
428
476
  static sweepLinestringToFacetsXYReturnLines(linestringPoints: GrowableXYZArray, polyface: Polyface): LineSegment3d[];
429
- /** Find segments (within the linestring) which project to facets.
477
+ /**
478
+ * Find segments (within the linestring) which project to facets.
430
479
  * * Return chains.
431
480
  * * This calls [[sweepLineStringToFacets]] with options created by
432
481
  * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),true, true, true, true);`
433
- * @deprecated in 4.x. Use [[sweepLineStringToFacets]] to get further options.
482
+ * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
434
483
  */
435
484
  static sweepLinestringToFacetsXYReturnChains(linestringPoints: GrowableXYZArray, polyface: Polyface): LineString3d[];
436
- /** Find segments (within the linestring) which project to facets.
485
+ /**
486
+ * Find segments (within the linestring) which project to facets.
437
487
  * * This is done as a sequence of "await" steps.
438
- * * Each "await" step deals with approximately PolyfaceQuery.asyncWorkLimit pairings of (linestring edge) with (facet edge)
439
- * * PolyfaceQuery.setAsyncWorkLimit() to change work blocks from default
488
+ * * Each "await" step deals with approximately PolyfaceQuery.asyncWorkLimit pairings of "linestring edge"
489
+ * with "facet edge".
490
+ * * PolyfaceQuery.setAsyncWorkLimit() to change work blocks from default.
440
491
  * * Return chains.
441
492
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
442
493
  */
443
494
  static asyncSweepLinestringToFacetsXYReturnChains(linestringPoints: GrowableXYZArray, polyface: Polyface): Promise<LineString3d[]>;
444
495
  /**
445
- * * Examine ranges of facets.
496
+ * Examine ranges of facets.
446
497
  * * Return statistical summary of x,y,z ranges.
447
498
  */
448
499
  static collectRangeLengthData(polyface: Polyface | PolyfaceVisitor): RangeLengthData;
449
- /** Clone the facets, inserting vertices (within edges) where points not part of each facet's vertex indices impinge within edges.
450
- *
500
+ /**
501
+ * Clone the facets, inserting vertices (within edges) where points not part of each facet's vertex indices
502
+ * impinge within edges.
451
503
  */
452
504
  static cloneWithTVertexFixup(polyface: Polyface): IndexedPolyface;
453
505
  /**
506
+ * Compare index arrays formatted as follows. Return 0 if arrays are the same.
454
507
  * * Each array input structure is: [facetIndex, vertexIndex0, vertexIndex1, ....]
455
- * * Vertex indices assumed reversed so it
456
- * * vertexIndex0 is the lowest index on the facet
457
- * * vertexIndex1 is the lowest neighbor of vertex0
508
+ * * Vertex indices assumed reversed so:
509
+ * * vertexIndex0 is the lowest index on the facet.
510
+ * * vertexIndex1 is the lowest neighbor of vertex0.
458
511
  * * first different entry among vertex indices determines lexical result.
459
- * * Hence facets with duplicate indices (whether forward or reversed) are considered equal.
460
- * @param arrayA
461
- * @param arrayB
512
+ * * hence facets with duplicate indices (whether forward or reversed) are considered equal.
462
513
  */
463
514
  private static compareFacetIndexAndVertexIndices;
464
515
  /**
465
- * * Return an array of arrays describing facet duplication.
516
+ * Collect facet duplicates.
517
+ * @param polyface the polyface.
466
518
  * @param includeSingletons if true, non-duplicated facets are included in the output.
467
- * * Each array `entry` in the output contains read indices of a cluster of facets with the same vertex indices.
519
+ * @returns an array of arrays describing facet duplication. Each array `entry` in the output contains read
520
+ * indices of a cluster of facets with the same vertex indices.
468
521
  */
469
522
  static collectDuplicateFacetIndices(polyface: Polyface, includeSingletons?: boolean): number[][];
470
523
  /**
471
- * * Return an array of arrays describing facet duplication.
472
- * @param includeSingletons if true, non-duplicated facets are included in the output.
473
- * * Each array `entry` in the output contains read indices of a cluster of facets with the same vertex indices.
524
+ * Announce facet duplicates.
525
+ * @returns an array of arrays describing facet duplication. Each array `entry` in the output contains read
526
+ * indices of a cluster of facets with the same vertex indices.
474
527
  */
475
528
  static announceDuplicateFacetIndices(polyface: Polyface, announceCluster: (clusterFacetIndices: number[]) => void): void;
476
- /** Return a new facet set with a subset of facets in source
529
+ /**
530
+ * Return a new facet set with a subset of facets in polyface.
531
+ * @param source the polyface.
477
532
  * @param includeSingletons true to copy facets that only appear once
478
- * @param clusterSelector indicates whether duplicate clusters are to have 0, 1, or all facets included
533
+ * @param clusterSelector indicates whether duplicate clusters are to have 0, 1, or all facets included.
479
534
  */
480
535
  static cloneByFacetDuplication(source: Polyface, includeSingletons: boolean, clusterSelector: DuplicateFacetClusterSelector): Polyface;
481
- /** Clone the facets, inserting removing points that are simply within colinear edges.
482
- *
483
- */
536
+ /** Clone the facets, removing points that are simply within colinear edges. */
484
537
  static cloneWithColinearEdgeFixup(polyface: Polyface): Polyface;
485
538
  /**
486
539
  * Set the edge visibility for specified edges in the polyface.
487
- * @param polyface mesh to be edited
488
- * @param clusters array of edge references
489
- * @param value visibility value (true or false)
540
+ * @param polyface mesh to be edited.
541
+ * @param clusters array of edge references.
542
+ * @param value visibility value (true or false).
490
543
  */
491
544
  private static setEdgeVisibility;
492
545
  /**
493
546
  * Set the visibility of a particular edge of a particular facet.
494
- * @param polyface containing polyface
495
- * @param facetIndex facet index
496
- * @param vertexIndex vertex index (in vertex array) at which the edge starts
547
+ * @param polyface containing polyface.
548
+ * @param facetIndex facet index.
549
+ * @param vertexIndex vertex index (in vertex array) at which the edge starts.
497
550
  * @param value visibility value.
498
551
  */
499
552
  static setSingleEdgeVisibility(polyface: IndexedPolyface, facetIndex: number, vertexIndex: number, value: boolean): void;
500
553
  /**
501
554
  * Get the visibility of a particular edge of a particular facet.
502
- * @param polyface containing polyface
503
- * @param facetIndex facet index
504
- * @param vertexIndex vertex index (in vertex array) at which the edge starts
555
+ * @param polyface containing polyface.
556
+ * @param facetIndex facet index.
557
+ * @param vertexIndex vertex index (in vertex array) at which the edge starts.
505
558
  */
506
559
  static getSingleEdgeVisibility(polyface: IndexedPolyface, facetIndex: number, vertexIndex: number): boolean | undefined;
507
- /** Load all half edges from a mesh to an IndexedEdgeMatcher.
508
- * @param polyface a mesh, or a visitor assumed to have numWrap === 1
509
- */
510
- static createIndexedEdges(polyface: Polyface | PolyfaceVisitor): IndexedEdgeMatcher;
511
560
  /**
512
561
  * Return manifold edge pairs whose dihedral angle is bounded by the given angle.
513
562
  * * The dihedral angle of a manifold edge is measured between the normals of its two adjacent faces.
514
563
  * * Boundary edges are not returned as they are not manifold.
515
- * @param mesh existing polyface or visitor
516
- * @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If undefined, uses `Geometry.smallAngleRadians`.
517
- * @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default)
564
+ * @param mesh existing polyface or visitor.
565
+ * @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If `undefined`, uses `Geometry.smallAngleRadians`.
566
+ * @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default).
518
567
  */
519
568
  static collectEdgesByDihedralAngle(mesh: Polyface | PolyfaceVisitor, maxSmoothEdgeAngle?: Angle, sharpEdges?: boolean): SortableEdgeCluster[];
520
569
  /**
570
+ * Make paired edges invisible.
521
571
  * * Find mated pairs among facet edges.
522
572
  * * Mated pairs have the same vertex indices appearing in opposite order.
523
573
  * * Mark all non-mated pairs visible.
524
574
  * * At mated pairs
525
575
  * * if angle across the edge is larger than `sharpEdgeAngle`, mark visible
526
576
  * * otherwise mark invisible.
527
- * @param mesh mesh to be marked
528
577
  */
529
578
  static markPairedEdgesInvisible(mesh: IndexedPolyface, sharpEdgeAngle?: Angle): void;
530
- /** Try to compute a unit normal for a facet accessible through a visitor.
579
+ /**
580
+ * Try to compute a unit normal for a facet accessible through a visitor.
531
581
  * * Unit normal is computed by `PolygonOps.unitNormal` with the points around the facet.
532
582
  */
533
583
  static computeFacetUnitNormal(visitor: PolyfaceVisitor, facetIndex: number, result?: Vector3d): Vector3d | undefined;
534
584
  /**
535
- * * Mark all edge visibilities in the IndexedPolyface
536
- * @param mesh mesh to be marked
537
- * @param value true for visible, false for hidden
538
- */
585
+ * * Mark all edge visibilities in the IndexedPolyface.
586
+ * @param mesh mesh to be marked.
587
+ * @param value true for visible, false for hidden.
588
+ */
539
589
  static markAllEdgeVisibility(mesh: IndexedPolyface, value: boolean): void;
540
590
  /**
541
- * Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface
542
- * @param mesh mesh to convert
591
+ * Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface.
592
+ * @param mesh mesh to convert.
543
593
  * @internal
544
594
  */
545
595
  static convertToHalfEdgeGraph(mesh: IndexedPolyface): HalfEdgeGraph;
546
- /**
547
- * * Examine adjacent facet orientations throughout the mesh
548
- * * If possible, reverse a subset to achieve proper pairing.
549
- * @param mesh
550
- */
596
+ /** Examine adjacent facet orientations throughout the mesh. If possible, reverse a subset to achieve proper pairing. */
551
597
  static reorientVertexOrderAroundFacetsForConsistentOrientation(mesh: IndexedPolyface): boolean;
552
- /**
553
- * Set up indexed normals with one normal in the plane of each facet of the mesh.
554
- * @param polyface
555
- */
598
+ /** Set up indexed normals with one normal in the plane of each facet of the mesh. */
556
599
  static buildPerFaceNormals(polyface: IndexedPolyface): void;
557
600
  /**
558
- * * At each vertex of the mesh
559
- * * Find clusters of almost parallel normals
560
- * * Compute simple average of those normals
561
- * * Index to the averages
601
+ * * At each vertex of the mesh:
602
+ * * Find clusters of almost parallel normals.
603
+ * * Compute simple average of those normals.
604
+ * * Index to the averages.
562
605
  * * For typical meshes, this correctly clusters adjacent normals.
563
- * * One can imagine a vertex with multiple "smooth cone-like" sets of incident facets such that averaging occurs among two nonadjacent cones. But this does not seem to be a problem in practice.
606
+ * * One can imagine a vertex with multiple "smooth cone-like" sets of adjacent facets such that averaging occurs
607
+ * among two nonadjacent cones. But this does not seem to be a problem in practice.
564
608
  * @param polyface polyface to update.
565
609
  * @param toleranceAngle averaging is done between normals up to this angle.
566
610
  */
567
611
  static buildAverageNormals(polyface: IndexedPolyface, toleranceAngle?: Angle): void;
568
612
  /**
569
613
  * Offset the faces of the mesh.
570
- * @param source original mesh
614
+ * @param source original mesh.
571
615
  * @param signedOffsetDistance distance to offset
572
- * @param offsetOptions angle options. The default options are recommended.
616
+ * @param offsetOptions angle options. The default options are recommended.
573
617
  * @returns shifted mesh.
574
618
  */
575
619
  static cloneOffset(source: IndexedPolyface, signedOffsetDistance: number, offsetOptions?: OffsetMeshOptions): IndexedPolyface;
@@ -579,28 +623,35 @@ export declare class PolyfaceQuery {
579
623
  private static _workFacetDetail3?;
580
624
  private static _workFacetDetailC?;
581
625
  private static _workFacetDetailNC?;
582
- /** Search facets for the first one that intersects the infinite line.
583
- * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
584
- * In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
626
+ /**
627
+ * Search facets for the first one that intersects the infinite line.
628
+ * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always
629
+ * returns `false`.
630
+ * In this case, `intersectRay3d` will return `undefined`, but the callback will be invoked for each intersection.
585
631
  * * Example callback logic:
586
632
  * * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
587
- * * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d` returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
588
- * @param visitor facet iterator
589
- * @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
590
- * @param options options for computing and populating an intersection detail, and an optional callback for accepting one
591
- * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
633
+ * * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d`
634
+ * returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
635
+ * @param visitor facet iterator.
636
+ * @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the
637
+ * ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
638
+ * @param options options for computing and populating an intersection detail, and an optional callback for
639
+ * accepting one.
640
+ * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no
641
+ * (accepted) intersection.
592
642
  * @see PolygonOps.intersectRay3d
593
643
  */
594
644
  static intersectRay3d(visitor: Polyface | PolyfaceVisitor, ray: Ray3d, options?: FacetIntersectOptions): FacetLocationDetail | undefined;
595
645
  }
596
- /** Announce the points on a drape panel.
646
+ /**
647
+ * Announce the points on a drape panel.
597
648
  * * The first two points in the array are always along the draped line segment.
598
649
  * * The last two are always on the facet.
599
650
  * * If there are 4 points, those two pairs are distinct, i.e. both segment points are to the same side of the facet.
600
651
  * * If there are 3 points, those two pairs share an on-facet point.
601
652
  * * The panel is ordered so the outward normal is to the right of the draped segment.
602
- * @param indexAOnFacet index (in points) of the point that is the first facet point for moving forward along the linestring
603
- * @param indexBOnFacet index (in points) of the point that is the second facet point for moving forward along the linestring
653
+ * @param indexAOnFacet index (in points) of the point that is the first facet point for moving forward along the linestring.
654
+ * @param indexBOnFacet index (in points) of the point that is the second facet point for moving forward along the linestring.
604
655
  * @public
605
656
  */
606
657
  export type AnnounceDrapePanel = (linestring: GrowableXYZArray, segmentIndex: number, polyface: Polyface, facetIndex: number, points: Point3d[], indexAOnFacet: number, indexBOnFacet: number) => any;