@itwin/core-geometry 4.0.0-dev.22 → 4.0.0-dev.24

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 (123) hide show
  1. package/lib/cjs/Geometry.d.ts +23 -0
  2. package/lib/cjs/Geometry.d.ts.map +1 -1
  3. package/lib/cjs/Geometry.js +25 -1
  4. package/lib/cjs/Geometry.js.map +1 -1
  5. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +195 -8
  6. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  7. package/lib/cjs/geometry3d/BarycentricTriangle.js +459 -11
  8. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  9. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
  10. package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
  11. package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
  12. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  13. package/lib/cjs/geometry3d/IndexedXYCollection.d.ts +22 -7
  14. package/lib/cjs/geometry3d/IndexedXYCollection.d.ts.map +1 -1
  15. package/lib/cjs/geometry3d/IndexedXYCollection.js +41 -5
  16. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  17. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +58 -4
  18. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  19. package/lib/cjs/geometry3d/IndexedXYZCollection.js +102 -4
  20. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  21. package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts +10 -0
  22. package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
  23. package/lib/cjs/geometry3d/Point2dArrayCarrier.js +14 -0
  24. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  25. package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +0 -6
  26. package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  27. package/lib/cjs/geometry3d/Point3dArrayCarrier.js +0 -6
  28. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  29. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +1 -1
  30. package/lib/cjs/geometry3d/Point3dVector3d.js +2 -2
  31. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  32. package/lib/cjs/geometry3d/PointHelpers.d.ts +14 -1
  33. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  34. package/lib/cjs/geometry3d/PointHelpers.js +33 -1
  35. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  36. package/lib/cjs/geometry3d/PolygonOps.d.ts +120 -10
  37. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  38. package/lib/cjs/geometry3d/PolygonOps.js +412 -12
  39. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  40. package/lib/cjs/polyface/FacetLocationDetail.d.ts +264 -0
  41. package/lib/cjs/polyface/FacetLocationDetail.d.ts.map +1 -0
  42. package/lib/cjs/polyface/FacetLocationDetail.js +378 -0
  43. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -0
  44. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +2 -5
  45. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  46. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +5 -2
  47. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  48. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +20 -14
  49. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  50. package/lib/cjs/polyface/PolyfaceBuilder.js +21 -17
  51. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  52. package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
  53. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  54. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  55. package/lib/cjs/polyface/PolyfaceQuery.d.ts +22 -1
  56. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  57. package/lib/cjs/polyface/PolyfaceQuery.js +52 -2
  58. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  59. package/lib/cjs/solid/Sphere.d.ts +5 -5
  60. package/lib/cjs/solid/Sphere.js +5 -5
  61. package/lib/cjs/solid/Sphere.js.map +1 -1
  62. package/lib/esm/Geometry.d.ts +23 -0
  63. package/lib/esm/Geometry.d.ts.map +1 -1
  64. package/lib/esm/Geometry.js +24 -0
  65. package/lib/esm/Geometry.js.map +1 -1
  66. package/lib/esm/geometry3d/BarycentricTriangle.d.ts +195 -8
  67. package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  68. package/lib/esm/geometry3d/BarycentricTriangle.js +459 -12
  69. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  70. package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
  71. package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
  72. package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
  73. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  74. package/lib/esm/geometry3d/IndexedXYCollection.d.ts +22 -7
  75. package/lib/esm/geometry3d/IndexedXYCollection.d.ts.map +1 -1
  76. package/lib/esm/geometry3d/IndexedXYCollection.js +41 -5
  77. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  78. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +58 -4
  79. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  80. package/lib/esm/geometry3d/IndexedXYZCollection.js +103 -5
  81. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  82. package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts +10 -0
  83. package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
  84. package/lib/esm/geometry3d/Point2dArrayCarrier.js +14 -0
  85. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  86. package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +0 -6
  87. package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  88. package/lib/esm/geometry3d/Point3dArrayCarrier.js +0 -6
  89. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  90. package/lib/esm/geometry3d/Point3dVector3d.d.ts +1 -1
  91. package/lib/esm/geometry3d/Point3dVector3d.js +2 -2
  92. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  93. package/lib/esm/geometry3d/PointHelpers.d.ts +14 -1
  94. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  95. package/lib/esm/geometry3d/PointHelpers.js +33 -1
  96. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  97. package/lib/esm/geometry3d/PolygonOps.d.ts +120 -10
  98. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  99. package/lib/esm/geometry3d/PolygonOps.js +411 -12
  100. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  101. package/lib/esm/polyface/FacetLocationDetail.d.ts +264 -0
  102. package/lib/esm/polyface/FacetLocationDetail.d.ts.map +1 -0
  103. package/lib/esm/polyface/FacetLocationDetail.js +371 -0
  104. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -0
  105. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +2 -5
  106. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  107. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +5 -2
  108. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  109. package/lib/esm/polyface/PolyfaceBuilder.d.ts +20 -14
  110. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  111. package/lib/esm/polyface/PolyfaceBuilder.js +21 -17
  112. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  113. package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
  114. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  115. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  116. package/lib/esm/polyface/PolyfaceQuery.d.ts +22 -1
  117. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  118. package/lib/esm/polyface/PolyfaceQuery.js +52 -2
  119. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  120. package/lib/esm/solid/Sphere.d.ts +5 -5
  121. package/lib/esm/solid/Sphere.js +5 -5
  122. package/lib/esm/solid/Sphere.js.map +1 -1
  123. package/package.json +4 -4
@@ -32,7 +32,7 @@ export declare class PolyfaceData {
32
32
  normalIndex: number[] | undefined;
33
33
  /** Coordinates of uv parameters, packed as numbers in a contiguous array. */
34
34
  param?: GrowableXYArray;
35
- /** Indics of params at facet vertices. */
35
+ /** Indices of params at facet vertices. */
36
36
  paramIndex: number[] | undefined;
37
37
  /** Color values. These are carried around as simple numbers, but are probably
38
38
  * required (by display systems) map exactly to 32 bit integers.
@@ -1 +1 @@
1
- {"version":3,"file":"PolyfaceData.d.ts","sourceRoot":"","sources":["../../../src/polyface/PolyfaceData.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM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AAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;wBAClC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBACpB,MAAM,EAAE,CAAC;qBACV;iBACF;gBACD,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;;AAneD,MAAM;AACN,iFAAiF;AACjF,8CAA8C;AAC9C,oFAAoF;AACpF,qDAAqD;AACrD,2CAA2C;AAC3C,sDAAsD;AACtD,0DAA0D;AAC1D,QAAQ;AACR;;GAEG;AACoB,iCAAoB,GAAG,OAAO,CAAC;AA0dxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GrowableXYArray } from \"../geometry3d/GrowableXYArray\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { NumberArray } from \"../geometry3d/PointHelpers\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { ClusterableArray } from \"../numerics/ClusterableArray\";\r\nimport { PolyfaceAuxData } from \"./AuxData\";\r\nimport { FacetFaceData } from \"./FacetFaceData\";\r\nimport { TaggedNumericData } from \"./TaggedNumericData\";\r\n\r\n/**\r\n * PolyfaceData carries data arrays for point, normal, param, color and their indices.\r\n *\r\n * * IndexedPolyface carries a PolyfaceData as a member. (NOT as a base class -- it already has GeometryQuery as base)\r\n * * IndexedPolyfaceVisitor uses PolyfaceData as a base class. In this use there is only a single facet in the polyfaceData.\r\n * * PolyfaceData does not know (!!!) what indices range constitute a facet. That is managed by derived class or carrier class.\r\n * @public\r\n */\r\nexport class PolyfaceData {\r\n // <ul\r\n // <li>optional arrays (normal, uv, color) must be indicated at constructor time.\r\n // <li>all arrays are (independently) indexed.\r\n // <li>with regret, the point, param, normal, and color arrays are exposed publicly.\r\n // <li>getX methods are \"trusting\" -- no bounds check\r\n // <li>getX methods return references to X.\r\n // <li> EXCEPT -- for optional arrays, the return 000.\r\n // <li>copyX methods move data to caller-supplied result..\r\n // </ul>\r\n /** Relative tolerance used in tests for planar facets\r\n * @internal\r\n */\r\n public static readonly planarityLocalRelTol = 1.0e-13;\r\n /** Coordinate data for points in the facets, packed as numbers in a contiguous array. */\r\n public point: GrowableXYZArray;\r\n /** Indices of points at facet vertices. */\r\n public pointIndex: number[];\r\n /** booleans indicating visibility of corresponding edges */\r\n public edgeVisible: boolean[];\r\n /** Coordinates of normal vectors, packed as numbers in a contiguous array */\r\n public normal: GrowableXYZArray | undefined;\r\n /** indices of normals at facet vertices. */\r\n public normalIndex: number[] | undefined;\r\n /** Coordinates of uv parameters, packed as numbers in a contiguous array. */\r\n public param?: GrowableXYArray;\r\n /** Indics of params at facet vertices. */\r\n public paramIndex: number[] | undefined;\r\n /** Color values. These are carried around as simple numbers, but are probably\r\n * required (by display systems) map exactly to 32 bit integers.\r\n */\r\n public color: number[] | undefined;\r\n /** Indices of colors at facet vertices. */\r\n public colorIndex: number[] | undefined;\r\n /** Face data will remain empty until a face is specified. */\r\n public face: FacetFaceData[];\r\n /** Auxiliary data */\r\n public auxData: PolyfaceAuxData | undefined;\r\n /** Tagged geometry data */\r\n public taggedNumericData: TaggedNumericData | undefined;\r\n private _twoSided: boolean;\r\n /** boolean tag indicating if the facets are viewable from the back */\r\n public get twoSided(): boolean { return this._twoSided; }\r\n public set twoSided(value: boolean) { this._twoSided = value; }\r\n\r\n /** set the `taggedNumericData` member */\r\n public setTaggedNumericData(data: TaggedNumericData | undefined) {\r\n this.taggedNumericData = data;\r\n }\r\n private _expectedClosure: number;\r\n /** boolean tag indicating if the facets are viewable from the back */\r\n public get expectedClosure(): number { return this._expectedClosure; }\r\n public set expectedClosure(value: number) { this._expectedClosure = value; }\r\n /** Constructor for facets.\r\n * * The various params control whether respective arrays are to be allocated.\r\n * * If arrayData is provided, all other params are IGNORED.\r\n * *\r\n */\r\n public constructor(needNormals: boolean = false, needParams: boolean = false, needColors: boolean = false, twoSided: boolean = false) {\r\n this.face = [];\r\n this.point = new GrowableXYZArray();\r\n this.pointIndex = []; this.edgeVisible = [];\r\n if (needNormals) { this.normal = new GrowableXYZArray(); this.normalIndex = []; }\r\n if (needParams) { this.param = new GrowableXYArray(); this.paramIndex = []; }\r\n if (needColors) { this.color = []; this.colorIndex = []; }\r\n this._twoSided = twoSided;\r\n this._expectedClosure = 0;\r\n }\r\n /** Return a depp clone. */\r\n public clone(): PolyfaceData {\r\n const result = new PolyfaceData();\r\n result.point = this.point.clone();\r\n result.pointIndex = this.pointIndex.slice();\r\n result.edgeVisible = this.edgeVisible.slice();\r\n result.face = this.face.slice();\r\n result.twoSided = this.twoSided;\r\n result.expectedClosure = this.expectedClosure;\r\n if (this.normal)\r\n result.normal = this.normal.clone();\r\n if (this.param)\r\n result.param = this.param.clone();\r\n if (this.color)\r\n result.color = this.color.slice();\r\n\r\n if (this.normalIndex)\r\n result.normalIndex = this.normalIndex.slice();\r\n if (this.paramIndex)\r\n result.paramIndex = this.paramIndex.slice();\r\n if (this.colorIndex)\r\n result.colorIndex = this.colorIndex.slice();\r\n if (this.auxData)\r\n result.auxData = this.auxData.clone();\r\n if (this.taggedNumericData){\r\n result.taggedNumericData = this.taggedNumericData.clone();\r\n }\r\n return result;\r\n }\r\n /** Test for equal indices and nearly equal coordinates */\r\n public isAlmostEqual(other: PolyfaceData): boolean {\r\n if (!GrowableXYZArray.isAlmostEqual(this.point, other.point))\r\n return false;\r\n if (!NumberArray.isExactEqual(this.pointIndex, other.pointIndex))\r\n return false;\r\n\r\n if (!GrowableXYZArray.isAlmostEqual(this.normal, other.normal)) return false;\r\n if (!NumberArray.isExactEqual(this.normalIndex, other.normalIndex)) return false;\r\n\r\n if (!GrowableXYArray.isAlmostEqual(this.param, other.param)) return false;\r\n if (!NumberArray.isExactEqual(this.paramIndex, other.paramIndex)) return false;\r\n\r\n if (!NumberArray.isExactEqual(this.color, other.color)) return false;\r\n if (!NumberArray.isExactEqual(this.colorIndex, other.colorIndex)) return false;\r\n\r\n if (!NumberArray.isExactEqual(this.edgeVisible, other.edgeVisible)) return false;\r\n if (!PolyfaceAuxData.isAlmostEqual(this.auxData, other.auxData)) return false;\r\n\r\n if (this.twoSided !== other.twoSided)\r\n return false;\r\n\r\n if (this.expectedClosure !== other.expectedClosure)\r\n return false;\r\n if (!TaggedNumericData.areAlmostEqual(this.taggedNumericData, other.taggedNumericData))\r\n return false;\r\n return true;\r\n }\r\n /** Ask if normals are required in this mesh. */\r\n public get requireNormals(): boolean { return undefined !== this.normal; }\r\n /** Get the point count */\r\n public get pointCount() { return this.point.length; }\r\n /** Get the normal count */\r\n public get normalCount() { return this.normal ? this.normal.length : 0; }\r\n /** Get the param count */\r\n public get paramCount() { return this.param ? this.param.length : 0; }\r\n /** Get the color count */\r\n public get colorCount() { return this.color ? this.color.length : 0; }\r\n /** Get the index count. Note that there is one count, and all index arrays (point, normal, param, color) must match */\r\n public get indexCount() { return this.pointIndex.length; } // ALWAYS INDEXED ... all index vectors must have same length.\r\n /** Get the number of faces.\r\n * * Note that a \"face\" is not a facet.\r\n * * A \"face\" is a subset of facets grouped for application purposes.\r\n */\r\n public get faceCount() { return this.face.length; }\r\n\r\n /** return indexed point. This is a copy of the coordinates, not a reference. */\r\n public getPoint(i: number, out?: Point3d): Point3d | undefined {\r\n return this.point.getPoint3dAtCheckedPointIndex(i, out);\r\n }\r\n /** return indexed normal. This is the COPY to the normal, not a reference. */\r\n public getNormal(i: number): Vector3d | undefined { return this.normal ? this.normal.getVector3dAtCheckedVectorIndex(i) : undefined; }\r\n /** return indexed param. This is the COPY of the coordinates, not a reference. */\r\n public getParam(i: number): Point2d | undefined { return this.param ? this.param.getPoint2dAtCheckedPointIndex(i) : undefined; }\r\n /** return indexed color */\r\n public getColor(i: number): number { return this.color ? this.color[i] : 0; }\r\n /** return indexed visibility */\r\n public getEdgeVisible(i: number): boolean { return this.edgeVisible[i]; }\r\n /** Copy the contents (not pointer) of point[i] into dest. */\r\n public copyPointTo(i: number, dest: Point3d): void { this.point.getPoint3dAtUncheckedPointIndex(i, dest); }\r\n /** Copy the contents (not pointer) of normal[i] into dest. */\r\n public copyNormalTo(i: number, dest: Vector3d): void { if (this.normal) this.normal.getVector3dAtCheckedVectorIndex(i, dest); }\r\n /** Copy the contents (not pointer) of param[i] into dest. */\r\n public copyParamTo(i: number, dest: Point2d): void { if (this.param) this.param.getPoint2dAtCheckedPointIndex(i, dest); }\r\n /** test if normal at a specified index matches uv */\r\n public isAlmostEqualParamIndexUV(index: number, u: number, v: number): boolean {\r\n if (this.param !== undefined && index >= 0 && index < this.param.length)\r\n return Geometry.isSameCoordinate(u, this.param.getXAtUncheckedPointIndex(index))\r\n && Geometry.isSameCoordinate(v, this.param.getYAtUncheckedPointIndex(index));\r\n return false;\r\n }\r\n /**\r\n * * Copy data from other to this.\r\n * * This is the essence of transferring coordinates spread throughout a large polyface into a visitor's single facet.\r\n * * \"other\" is the large polyface\r\n * * \"this\" is the visitor\r\n * * does NOT copy face data - visitors reference the FacetFaceData array for the whole polyface!!\r\n * @param other polyface data being mined.\r\n * @param index0 start index in other's index arrays\r\n * @param index1 end index (one beyond last data accessed0 in other's index arrays\r\n * @param numWrap number of points to replicate as wraparound.\r\n */\r\n public gatherIndexedData(other: PolyfaceData, index0: number, index1: number, numWrap: number) {\r\n const numEdge = index1 - index0;\r\n const numTotal = numEdge + numWrap;\r\n this.resizeAllDataArrays(numTotal);\r\n // copy wrapped points\r\n for (let i = 0; i < numEdge; i++)\r\n this.point.transferFromGrowableXYZArray(i, other.point, other.pointIndex[index0 + i]);\r\n for (let i = 0; i < numWrap; i++)\r\n this.point.transferFromGrowableXYZArray(numEdge + i, this.point, i);\r\n\r\n // copy wrapped pointIndex\r\n for (let i = 0; i < numEdge; i++)\r\n this.pointIndex[i] = other.pointIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.pointIndex[numEdge + i] = this.pointIndex[i];\r\n // copy wrapped edge visibility\r\n for (let i = 0; i < numEdge; i++)\r\n this.edgeVisible[i] = other.edgeVisible[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.edgeVisible[numEdge + i] = this.edgeVisible[i];\r\n\r\n if (this.normal && this.normalIndex && other.normal && other.normalIndex) {\r\n for (let i = 0; i < numEdge; i++)\r\n this.normal.transferFromGrowableXYZArray(i, other.normal, other.normalIndex[index0 + i]);\r\n for (let i = 0; i < numWrap; i++)\r\n this.normal.transferFromGrowableXYZArray(numEdge + i, this.normal, i);\r\n\r\n for (let i = 0; i < numEdge; i++)\r\n this.normalIndex[i] = other.normalIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.normalIndex[numEdge + i] = this.normalIndex[i];\r\n }\r\n\r\n if (this.param && this.paramIndex && other.param && other.paramIndex) {\r\n for (let i = 0; i < numEdge; i++)\r\n this.param.transferFromGrowableXYArray(i, other.param, other.paramIndex[index0 + i]);\r\n for (let i = 0; i < numWrap; i++)\r\n this.param.transferFromGrowableXYArray(numEdge + i, this.param, i);\r\n\r\n for (let i = 0; i < numEdge; i++)\r\n this.paramIndex[i] = other.paramIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.paramIndex[numEdge + i] = this.paramIndex[i];\r\n }\r\n\r\n if (this.color && this.colorIndex && other.color && other.colorIndex) {\r\n for (let i = 0; i < numEdge; i++)\r\n this.color[i] = other.color[other.colorIndex[index0 + i]];\r\n for (let i = 0; i < numWrap; i++)\r\n this.color[numEdge + i] = this.color[i];\r\n\r\n for (let i = 0; i < numEdge; i++)\r\n this.colorIndex[i] = other.colorIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.colorIndex[numEdge + i] = this.colorIndex[i];\r\n }\r\n if (this.auxData && other.auxData && this.auxData.channels.length === other.auxData.channels.length) {\r\n for (let iChannel = 0; iChannel < this.auxData.channels.length; iChannel++) {\r\n const thisChannel = this.auxData.channels[iChannel];\r\n const otherChannel = other.auxData.channels[iChannel];\r\n const blockSize = thisChannel.entriesPerValue;\r\n if (thisChannel.data.length === otherChannel.data.length) {\r\n for (let iData = 0; iData < thisChannel.data.length; iData++) {\r\n const thisData = thisChannel.data[iData];\r\n const otherData = otherChannel.data[iData];\r\n for (let i = 0; i < numEdge; i++)\r\n thisData.copyValues(otherData, i, other.auxData.indices[index0 + i], blockSize);\r\n for (let i = 0; i < numWrap; i++)\r\n thisData.copyValues(thisData, other.auxData.indices[numEdge + i], i, blockSize);\r\n }\r\n }\r\n }\r\n for (let i = 0; i < numEdge; i++)\r\n this.auxData.indices[i] = other.auxData.indices[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.auxData.indices[numEdge + i] = this.auxData.indices[i];\r\n }\r\n }\r\n private static trimArray(data: any[] | undefined, length: number) { if (data && length < data.length) data.length = length; }\r\n /** Trim all index arrays to stated length.\r\n * * This is called by PolyfaceBuilder to clean up after an aborted construction sequence.\r\n */\r\n public trimAllIndexArrays(length: number): void {\r\n PolyfaceData.trimArray(this.pointIndex, length);\r\n PolyfaceData.trimArray(this.paramIndex, length);\r\n PolyfaceData.trimArray(this.normalIndex, length);\r\n PolyfaceData.trimArray(this.colorIndex, length);\r\n PolyfaceData.trimArray(this.edgeVisible, length);\r\n if (this.auxData) {\r\n PolyfaceData.trimArray(this.auxData.indices, length);\r\n for (const channel of this.auxData.channels) {\r\n for (const data of channel.data)\r\n PolyfaceData.trimArray(data.values, channel.entriesPerValue * length);\r\n }\r\n }\r\n }\r\n /** Resize all data arrays to specified length */\r\n public resizeAllDataArrays(length: number): void {\r\n if (length > this.point.length) {\r\n while (this.point.length < length) this.point.push(Point3d.create());\r\n while (this.pointIndex.length < length) this.pointIndex.push(-1);\r\n while (this.edgeVisible.length < length) this.edgeVisible.push(false);\r\n if (this.normal)\r\n while (this.normal.length < length) this.normal.push(Vector3d.create());\r\n if (this.param)\r\n while (this.param.length < length) this.param.push(Point2d.create());\r\n if (this.color)\r\n while (this.color.length < length) this.color.push(0);\r\n if (this.auxData) {\r\n for (const channel of this.auxData.channels) {\r\n for (const channelData of channel.data) {\r\n while (channelData.values.length < length * channel.entriesPerValue) channelData.values.push(0);\r\n }\r\n }\r\n }\r\n } else if (length < this.point.length) {\r\n this.point.resize(length);\r\n this.edgeVisible.length = length;\r\n this.pointIndex.length = length;\r\n if (this.normal) this.normal.resize(length);\r\n if (this.param) this.param.resize(length);\r\n if (this.color) this.color.length = length;\r\n if (this.auxData) {\r\n for (const channel of this.auxData.channels) {\r\n for (const channelData of channel.data) {\r\n channelData.values.length = length * channel.entriesPerValue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n /** Return the range of the point array (optionally transformed) */\r\n public range(result?: Range3d, transform?: Transform): Range3d {\r\n result = result ? result : Range3d.createNull();\r\n result.extendArray(this.point, transform);\r\n return result;\r\n }\r\n /** reverse indices facet-by-facet, with the given facetStartIndex array delimiting faces.\r\n *\r\n * * facetStartIndex[0] == 0 always -- start of facet zero.\r\n * * facet k has indices from facetStartIndex[k] <= i < facetStartIndex[k+1]\r\n * * hence for \"internal\" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.\r\n * *\r\n */\r\n public reverseIndices(facetStartIndex?: number[]) {\r\n if (facetStartIndex && PolyfaceData.isValidFacetStartIndexArray(facetStartIndex)) {\r\n PolyfaceData.reverseIndices(facetStartIndex, this.pointIndex, true);\r\n if (this.normalIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndices(facetStartIndex, this.normalIndex, true);\r\n if (this.paramIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndices(facetStartIndex, this.paramIndex, true);\r\n if (this.colorIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndices(facetStartIndex, this.colorIndex, true);\r\n PolyfaceData.reverseIndices(facetStartIndex, this.edgeVisible, false);\r\n }\r\n }\r\n /** reverse indices facet-by-facet, with the given facetStartIndex array delimiting faces.\r\n *\r\n * * facetStartIndex[0] == 0 always -- start of facet zero.\r\n * * facet k has indices from facetStartIndex[k] <= i < facetStartIndex[k+1]\r\n * * hence for \"internal\" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.\r\n * *\r\n */\r\n public reverseIndicesSingleFacet(facetId: number, facetStartIndex: number[]) {\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.pointIndex, true);\r\n if (this.normalIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.normalIndex, true);\r\n if (this.paramIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.paramIndex, true);\r\n if (this.colorIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.colorIndex, true);\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.edgeVisible, false);\r\n }\r\n\r\n /** Scale all the normals by -1 */\r\n public reverseNormals() {\r\n if (this.normal)\r\n this.normal.scaleInPlace(-1.0);\r\n }\r\n /** Apply `transform` to point and normal arrays and to auxData.\r\n * * IMPORTANT This base class is just a data carrier. It does not know if the index order and normal directions have special meaning.\r\n * * i.e. caller must separately reverse index order and normal direction if needed.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n this.point.multiplyTransformInPlace(transform);\r\n\r\n if (this.normal && !transform.matrix.isIdentity)\r\n this.normal.multiplyAndRenormalizeMatrix3dInverseTransposeInPlace(transform.matrix);\r\n\r\n return undefined === this.auxData || this.auxData.tryTransformInPlace(transform);\r\n }\r\n /**\r\n * * Search for duplicates within points, normals, params, and colors.\r\n * * compress the data arrays.\r\n * * revise all indexing for the relocated data.\r\n */\r\n public compress() {\r\n const packedPoints = ClusterableArray.clusterGrowablePoint3dArray(this.point);\r\n this.point = packedPoints.growablePackedPoints!;\r\n packedPoints.updateIndices(this.pointIndex);\r\n // compressUnusedGrowableXYZArray(this.point, this.pointIndex);\r\n\r\n if (this.normalIndex && this.normal) {\r\n const packedNormals = ClusterableArray.clusterGrowablePoint3dArray(this.normal);\r\n this.normal = packedNormals.growablePackedPoints!;\r\n packedNormals.updateIndices(this.normalIndex);\r\n }\r\n\r\n if (this.paramIndex && this.param) {\r\n const packedParams = ClusterableArray.clusterGrowablePoint2dArray(this.param);\r\n this.param = packedParams.growablePackedPoints;\r\n packedParams.updateIndices(this.paramIndex);\r\n }\r\n\r\n if (this.colorIndex && this.color) {\r\n const packedColors = ClusterableArray.clusterNumberArray(this.color);\r\n this.color = packedColors.packedNumbers;\r\n packedColors.updateIndices(this.colorIndex);\r\n }\r\n }\r\n\r\n /**\r\n * Test if facetStartIndex is (minimally!) valid:\r\n * * length must be nonzero (recall that for \"no facets\" the facetStartIndexArray still must contain a 0)\r\n * * Each entry must be strictly smaller than the one that follows.\r\n * @param facetStartIndex array of facetStart data. facet `i` has indices at `facetsStartIndex[i]` to (one before) `facetStartIndex[i+1]`\r\n */\r\n public static isValidFacetStartIndexArray(facetStartIndex: number[]): boolean {\r\n // facetStartIndex for empty facets has a single entry \"0\" -- empty array is not allowed\r\n if (facetStartIndex.length === 0)\r\n return false;\r\n for (let i = 0; i + 1 < facetStartIndex.length; i++)\r\n if (facetStartIndex[i] >= facetStartIndex[i + 1])\r\n return false;\r\n return true;\r\n }\r\n /** Reverse data in entire facet indexing arrays.\r\n * * parameterized over type T so non-number data -- e.g. boolean visibility flags -- can be reversed.\r\n */\r\n public static reverseIndices<T>(facetStartIndex: number[], indices: T[] | undefined, preserveStart: boolean): boolean {\r\n if (!indices || indices.length === 0)\r\n return true; // empty case\r\n if (indices.length > 0) {\r\n if (facetStartIndex[facetStartIndex.length - 1] === indices.length) {\r\n for (let i = 0; i + 1 < facetStartIndex.length; i++) {\r\n let index0 = facetStartIndex[i];\r\n let index1 = facetStartIndex[i + 1];\r\n if (preserveStart) {\r\n // leave [index0] as is so reversed facet starts at same vertex\r\n while (index1 > index0 + 2) {\r\n index1--; index0++;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n }\r\n } else {\r\n // reverse all\r\n while (index1 > index0 + 1) {\r\n index1--;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n index0++;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /** Reverse data in entire facet indexing arrays.\r\n * * parameterized over type T so non-number data -- e.g. boolean visibility flags -- can be reversed.\r\n */\r\n public static reverseIndicesSingleFacet<T>(facetId: number, facetStartIndex: number[], indices: T[] | undefined, preserveStart: boolean): boolean {\r\n if (!indices || indices.length === 0)\r\n return true; // empty case\r\n if (indices.length > 0) {\r\n if (facetStartIndex[facetStartIndex.length - 1] === indices.length\r\n && facetId >= 0 && facetId + 1 < facetStartIndex.length) {\r\n let index0 = facetStartIndex[facetId];\r\n let index1 = facetStartIndex[facetId + 1];\r\n if (preserveStart) {\r\n // leave [index0] as is so reversed facet starts at same vertex\r\n while (index1 > index0 + 2) {\r\n index1--; index0++;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n }\r\n } else {\r\n // reverse all\r\n while (index1 > index0 + 1) {\r\n index1--;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n index0++;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * pack out data entries that are unreferenced.\r\n * @param data data to pack\r\n * @param indices indices into the data.\r\n\r\nfunction compressUnusedGrowableXYZArray(data: GrowableXYZArray, indices: number[]): boolean {\r\n // 1 entry per data[i]\r\n // pass 0: number of references\r\n // pass 1: post-compression index (or -1)\r\n const n0 = data.length;\r\n const work = new Int32Array(data.length);\r\n for (const k of indices) {\r\n if (k < 0 || k >= n0)\r\n return false;\r\n work[k]++;\r\n }\r\n let n1 = 0;\r\n for (let i = 0; i < n0; i++) {\r\n if (work[i] === 0)\r\n work[i] = -1;\r\n else\r\n work[i] = n1++;\r\n }\r\n const numIndex = indices.length;\r\n for (let i = 0; i < numIndex; i++) {\r\n indices[i] = work[indices[i]];\r\n }\r\n for (let i = 0; i < n0; i++) {\r\n const j = work[i];\r\n if (j >= 0)\r\n data.moveIndexToIndex(i, j);\r\n }\r\n data.length = n1;\r\n return true;\r\n}\r\n*/\r\n"]}
1
+ {"version":3,"file":"PolyfaceData.js","sourceRoot":"","sources":["../../../src/polyface/PolyfaceData.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IAqDvB;;;;OAIG;IACH,YAAmB,cAAuB,KAAK,EAAE,aAAsB,KAAK,EAAE,aAAsB,KAAK,EAAE,WAAoB,KAAK;QAClI,IAAI,CAAC,IAA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M,CAAC,GAAG,CAAC,CAAC;qBACrB;iBACF;qBAAM;oBACL,cAAc;oBACd,OAAO,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE;wBAC1B,MAAM,EAAE,CAAC;wBACT,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;wBAC1B,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;wBAClC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBACpB,MAAM,EAAE,CAAC;qBACV;iBACF;gBACD,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;;AAneD,MAAM;AACN,iFAAiF;AACjF,8CAA8C;AAC9C,oFAAoF;AACpF,qDAAqD;AACrD,2CAA2C;AAC3C,sDAAsD;AACtD,0DAA0D;AAC1D,QAAQ;AACR;;GAEG;AACoB,iCAAoB,GAAG,OAAO,CAAC;AA0dxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GrowableXYArray } from \"../geometry3d/GrowableXYArray\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { NumberArray } from \"../geometry3d/PointHelpers\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { ClusterableArray } from \"../numerics/ClusterableArray\";\r\nimport { PolyfaceAuxData } from \"./AuxData\";\r\nimport { FacetFaceData } from \"./FacetFaceData\";\r\nimport { TaggedNumericData } from \"./TaggedNumericData\";\r\n\r\n/**\r\n * PolyfaceData carries data arrays for point, normal, param, color and their indices.\r\n *\r\n * * IndexedPolyface carries a PolyfaceData as a member. (NOT as a base class -- it already has GeometryQuery as base)\r\n * * IndexedPolyfaceVisitor uses PolyfaceData as a base class. In this use there is only a single facet in the polyfaceData.\r\n * * PolyfaceData does not know (!!!) what indices range constitute a facet. That is managed by derived class or carrier class.\r\n * @public\r\n */\r\nexport class PolyfaceData {\r\n // <ul\r\n // <li>optional arrays (normal, uv, color) must be indicated at constructor time.\r\n // <li>all arrays are (independently) indexed.\r\n // <li>with regret, the point, param, normal, and color arrays are exposed publicly.\r\n // <li>getX methods are \"trusting\" -- no bounds check\r\n // <li>getX methods return references to X.\r\n // <li> EXCEPT -- for optional arrays, the return 000.\r\n // <li>copyX methods move data to caller-supplied result..\r\n // </ul>\r\n /** Relative tolerance used in tests for planar facets\r\n * @internal\r\n */\r\n public static readonly planarityLocalRelTol = 1.0e-13;\r\n /** Coordinate data for points in the facets, packed as numbers in a contiguous array. */\r\n public point: GrowableXYZArray;\r\n /** Indices of points at facet vertices. */\r\n public pointIndex: number[];\r\n /** booleans indicating visibility of corresponding edges */\r\n public edgeVisible: boolean[];\r\n /** Coordinates of normal vectors, packed as numbers in a contiguous array */\r\n public normal: GrowableXYZArray | undefined;\r\n /** indices of normals at facet vertices. */\r\n public normalIndex: number[] | undefined;\r\n /** Coordinates of uv parameters, packed as numbers in a contiguous array. */\r\n public param?: GrowableXYArray;\r\n /** Indices of params at facet vertices. */\r\n public paramIndex: number[] | undefined;\r\n /** Color values. These are carried around as simple numbers, but are probably\r\n * required (by display systems) map exactly to 32 bit integers.\r\n */\r\n public color: number[] | undefined;\r\n /** Indices of colors at facet vertices. */\r\n public colorIndex: number[] | undefined;\r\n /** Face data will remain empty until a face is specified. */\r\n public face: FacetFaceData[];\r\n /** Auxiliary data */\r\n public auxData: PolyfaceAuxData | undefined;\r\n /** Tagged geometry data */\r\n public taggedNumericData: TaggedNumericData | undefined;\r\n private _twoSided: boolean;\r\n /** boolean tag indicating if the facets are viewable from the back */\r\n public get twoSided(): boolean { return this._twoSided; }\r\n public set twoSided(value: boolean) { this._twoSided = value; }\r\n\r\n /** set the `taggedNumericData` member */\r\n public setTaggedNumericData(data: TaggedNumericData | undefined) {\r\n this.taggedNumericData = data;\r\n }\r\n private _expectedClosure: number;\r\n /** boolean tag indicating if the facets are viewable from the back */\r\n public get expectedClosure(): number { return this._expectedClosure; }\r\n public set expectedClosure(value: number) { this._expectedClosure = value; }\r\n /** Constructor for facets.\r\n * * The various params control whether respective arrays are to be allocated.\r\n * * If arrayData is provided, all other params are IGNORED.\r\n * *\r\n */\r\n public constructor(needNormals: boolean = false, needParams: boolean = false, needColors: boolean = false, twoSided: boolean = false) {\r\n this.face = [];\r\n this.point = new GrowableXYZArray();\r\n this.pointIndex = []; this.edgeVisible = [];\r\n if (needNormals) { this.normal = new GrowableXYZArray(); this.normalIndex = []; }\r\n if (needParams) { this.param = new GrowableXYArray(); this.paramIndex = []; }\r\n if (needColors) { this.color = []; this.colorIndex = []; }\r\n this._twoSided = twoSided;\r\n this._expectedClosure = 0;\r\n }\r\n /** Return a depp clone. */\r\n public clone(): PolyfaceData {\r\n const result = new PolyfaceData();\r\n result.point = this.point.clone();\r\n result.pointIndex = this.pointIndex.slice();\r\n result.edgeVisible = this.edgeVisible.slice();\r\n result.face = this.face.slice();\r\n result.twoSided = this.twoSided;\r\n result.expectedClosure = this.expectedClosure;\r\n if (this.normal)\r\n result.normal = this.normal.clone();\r\n if (this.param)\r\n result.param = this.param.clone();\r\n if (this.color)\r\n result.color = this.color.slice();\r\n\r\n if (this.normalIndex)\r\n result.normalIndex = this.normalIndex.slice();\r\n if (this.paramIndex)\r\n result.paramIndex = this.paramIndex.slice();\r\n if (this.colorIndex)\r\n result.colorIndex = this.colorIndex.slice();\r\n if (this.auxData)\r\n result.auxData = this.auxData.clone();\r\n if (this.taggedNumericData){\r\n result.taggedNumericData = this.taggedNumericData.clone();\r\n }\r\n return result;\r\n }\r\n /** Test for equal indices and nearly equal coordinates */\r\n public isAlmostEqual(other: PolyfaceData): boolean {\r\n if (!GrowableXYZArray.isAlmostEqual(this.point, other.point))\r\n return false;\r\n if (!NumberArray.isExactEqual(this.pointIndex, other.pointIndex))\r\n return false;\r\n\r\n if (!GrowableXYZArray.isAlmostEqual(this.normal, other.normal)) return false;\r\n if (!NumberArray.isExactEqual(this.normalIndex, other.normalIndex)) return false;\r\n\r\n if (!GrowableXYArray.isAlmostEqual(this.param, other.param)) return false;\r\n if (!NumberArray.isExactEqual(this.paramIndex, other.paramIndex)) return false;\r\n\r\n if (!NumberArray.isExactEqual(this.color, other.color)) return false;\r\n if (!NumberArray.isExactEqual(this.colorIndex, other.colorIndex)) return false;\r\n\r\n if (!NumberArray.isExactEqual(this.edgeVisible, other.edgeVisible)) return false;\r\n if (!PolyfaceAuxData.isAlmostEqual(this.auxData, other.auxData)) return false;\r\n\r\n if (this.twoSided !== other.twoSided)\r\n return false;\r\n\r\n if (this.expectedClosure !== other.expectedClosure)\r\n return false;\r\n if (!TaggedNumericData.areAlmostEqual(this.taggedNumericData, other.taggedNumericData))\r\n return false;\r\n return true;\r\n }\r\n /** Ask if normals are required in this mesh. */\r\n public get requireNormals(): boolean { return undefined !== this.normal; }\r\n /** Get the point count */\r\n public get pointCount() { return this.point.length; }\r\n /** Get the normal count */\r\n public get normalCount() { return this.normal ? this.normal.length : 0; }\r\n /** Get the param count */\r\n public get paramCount() { return this.param ? this.param.length : 0; }\r\n /** Get the color count */\r\n public get colorCount() { return this.color ? this.color.length : 0; }\r\n /** Get the index count. Note that there is one count, and all index arrays (point, normal, param, color) must match */\r\n public get indexCount() { return this.pointIndex.length; } // ALWAYS INDEXED ... all index vectors must have same length.\r\n /** Get the number of faces.\r\n * * Note that a \"face\" is not a facet.\r\n * * A \"face\" is a subset of facets grouped for application purposes.\r\n */\r\n public get faceCount() { return this.face.length; }\r\n\r\n /** return indexed point. This is a copy of the coordinates, not a reference. */\r\n public getPoint(i: number, out?: Point3d): Point3d | undefined {\r\n return this.point.getPoint3dAtCheckedPointIndex(i, out);\r\n }\r\n /** return indexed normal. This is the COPY to the normal, not a reference. */\r\n public getNormal(i: number): Vector3d | undefined { return this.normal ? this.normal.getVector3dAtCheckedVectorIndex(i) : undefined; }\r\n /** return indexed param. This is the COPY of the coordinates, not a reference. */\r\n public getParam(i: number): Point2d | undefined { return this.param ? this.param.getPoint2dAtCheckedPointIndex(i) : undefined; }\r\n /** return indexed color */\r\n public getColor(i: number): number { return this.color ? this.color[i] : 0; }\r\n /** return indexed visibility */\r\n public getEdgeVisible(i: number): boolean { return this.edgeVisible[i]; }\r\n /** Copy the contents (not pointer) of point[i] into dest. */\r\n public copyPointTo(i: number, dest: Point3d): void { this.point.getPoint3dAtUncheckedPointIndex(i, dest); }\r\n /** Copy the contents (not pointer) of normal[i] into dest. */\r\n public copyNormalTo(i: number, dest: Vector3d): void { if (this.normal) this.normal.getVector3dAtCheckedVectorIndex(i, dest); }\r\n /** Copy the contents (not pointer) of param[i] into dest. */\r\n public copyParamTo(i: number, dest: Point2d): void { if (this.param) this.param.getPoint2dAtCheckedPointIndex(i, dest); }\r\n /** test if normal at a specified index matches uv */\r\n public isAlmostEqualParamIndexUV(index: number, u: number, v: number): boolean {\r\n if (this.param !== undefined && index >= 0 && index < this.param.length)\r\n return Geometry.isSameCoordinate(u, this.param.getXAtUncheckedPointIndex(index))\r\n && Geometry.isSameCoordinate(v, this.param.getYAtUncheckedPointIndex(index));\r\n return false;\r\n }\r\n /**\r\n * * Copy data from other to this.\r\n * * This is the essence of transferring coordinates spread throughout a large polyface into a visitor's single facet.\r\n * * \"other\" is the large polyface\r\n * * \"this\" is the visitor\r\n * * does NOT copy face data - visitors reference the FacetFaceData array for the whole polyface!!\r\n * @param other polyface data being mined.\r\n * @param index0 start index in other's index arrays\r\n * @param index1 end index (one beyond last data accessed0 in other's index arrays\r\n * @param numWrap number of points to replicate as wraparound.\r\n */\r\n public gatherIndexedData(other: PolyfaceData, index0: number, index1: number, numWrap: number) {\r\n const numEdge = index1 - index0;\r\n const numTotal = numEdge + numWrap;\r\n this.resizeAllDataArrays(numTotal);\r\n // copy wrapped points\r\n for (let i = 0; i < numEdge; i++)\r\n this.point.transferFromGrowableXYZArray(i, other.point, other.pointIndex[index0 + i]);\r\n for (let i = 0; i < numWrap; i++)\r\n this.point.transferFromGrowableXYZArray(numEdge + i, this.point, i);\r\n\r\n // copy wrapped pointIndex\r\n for (let i = 0; i < numEdge; i++)\r\n this.pointIndex[i] = other.pointIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.pointIndex[numEdge + i] = this.pointIndex[i];\r\n // copy wrapped edge visibility\r\n for (let i = 0; i < numEdge; i++)\r\n this.edgeVisible[i] = other.edgeVisible[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.edgeVisible[numEdge + i] = this.edgeVisible[i];\r\n\r\n if (this.normal && this.normalIndex && other.normal && other.normalIndex) {\r\n for (let i = 0; i < numEdge; i++)\r\n this.normal.transferFromGrowableXYZArray(i, other.normal, other.normalIndex[index0 + i]);\r\n for (let i = 0; i < numWrap; i++)\r\n this.normal.transferFromGrowableXYZArray(numEdge + i, this.normal, i);\r\n\r\n for (let i = 0; i < numEdge; i++)\r\n this.normalIndex[i] = other.normalIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.normalIndex[numEdge + i] = this.normalIndex[i];\r\n }\r\n\r\n if (this.param && this.paramIndex && other.param && other.paramIndex) {\r\n for (let i = 0; i < numEdge; i++)\r\n this.param.transferFromGrowableXYArray(i, other.param, other.paramIndex[index0 + i]);\r\n for (let i = 0; i < numWrap; i++)\r\n this.param.transferFromGrowableXYArray(numEdge + i, this.param, i);\r\n\r\n for (let i = 0; i < numEdge; i++)\r\n this.paramIndex[i] = other.paramIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.paramIndex[numEdge + i] = this.paramIndex[i];\r\n }\r\n\r\n if (this.color && this.colorIndex && other.color && other.colorIndex) {\r\n for (let i = 0; i < numEdge; i++)\r\n this.color[i] = other.color[other.colorIndex[index0 + i]];\r\n for (let i = 0; i < numWrap; i++)\r\n this.color[numEdge + i] = this.color[i];\r\n\r\n for (let i = 0; i < numEdge; i++)\r\n this.colorIndex[i] = other.colorIndex[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.colorIndex[numEdge + i] = this.colorIndex[i];\r\n }\r\n if (this.auxData && other.auxData && this.auxData.channels.length === other.auxData.channels.length) {\r\n for (let iChannel = 0; iChannel < this.auxData.channels.length; iChannel++) {\r\n const thisChannel = this.auxData.channels[iChannel];\r\n const otherChannel = other.auxData.channels[iChannel];\r\n const blockSize = thisChannel.entriesPerValue;\r\n if (thisChannel.data.length === otherChannel.data.length) {\r\n for (let iData = 0; iData < thisChannel.data.length; iData++) {\r\n const thisData = thisChannel.data[iData];\r\n const otherData = otherChannel.data[iData];\r\n for (let i = 0; i < numEdge; i++)\r\n thisData.copyValues(otherData, i, other.auxData.indices[index0 + i], blockSize);\r\n for (let i = 0; i < numWrap; i++)\r\n thisData.copyValues(thisData, other.auxData.indices[numEdge + i], i, blockSize);\r\n }\r\n }\r\n }\r\n for (let i = 0; i < numEdge; i++)\r\n this.auxData.indices[i] = other.auxData.indices[index0 + i];\r\n for (let i = 0; i < numWrap; i++)\r\n this.auxData.indices[numEdge + i] = this.auxData.indices[i];\r\n }\r\n }\r\n private static trimArray(data: any[] | undefined, length: number) { if (data && length < data.length) data.length = length; }\r\n /** Trim all index arrays to stated length.\r\n * * This is called by PolyfaceBuilder to clean up after an aborted construction sequence.\r\n */\r\n public trimAllIndexArrays(length: number): void {\r\n PolyfaceData.trimArray(this.pointIndex, length);\r\n PolyfaceData.trimArray(this.paramIndex, length);\r\n PolyfaceData.trimArray(this.normalIndex, length);\r\n PolyfaceData.trimArray(this.colorIndex, length);\r\n PolyfaceData.trimArray(this.edgeVisible, length);\r\n if (this.auxData) {\r\n PolyfaceData.trimArray(this.auxData.indices, length);\r\n for (const channel of this.auxData.channels) {\r\n for (const data of channel.data)\r\n PolyfaceData.trimArray(data.values, channel.entriesPerValue * length);\r\n }\r\n }\r\n }\r\n /** Resize all data arrays to specified length */\r\n public resizeAllDataArrays(length: number): void {\r\n if (length > this.point.length) {\r\n while (this.point.length < length) this.point.push(Point3d.create());\r\n while (this.pointIndex.length < length) this.pointIndex.push(-1);\r\n while (this.edgeVisible.length < length) this.edgeVisible.push(false);\r\n if (this.normal)\r\n while (this.normal.length < length) this.normal.push(Vector3d.create());\r\n if (this.param)\r\n while (this.param.length < length) this.param.push(Point2d.create());\r\n if (this.color)\r\n while (this.color.length < length) this.color.push(0);\r\n if (this.auxData) {\r\n for (const channel of this.auxData.channels) {\r\n for (const channelData of channel.data) {\r\n while (channelData.values.length < length * channel.entriesPerValue) channelData.values.push(0);\r\n }\r\n }\r\n }\r\n } else if (length < this.point.length) {\r\n this.point.resize(length);\r\n this.edgeVisible.length = length;\r\n this.pointIndex.length = length;\r\n if (this.normal) this.normal.resize(length);\r\n if (this.param) this.param.resize(length);\r\n if (this.color) this.color.length = length;\r\n if (this.auxData) {\r\n for (const channel of this.auxData.channels) {\r\n for (const channelData of channel.data) {\r\n channelData.values.length = length * channel.entriesPerValue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n /** Return the range of the point array (optionally transformed) */\r\n public range(result?: Range3d, transform?: Transform): Range3d {\r\n result = result ? result : Range3d.createNull();\r\n result.extendArray(this.point, transform);\r\n return result;\r\n }\r\n /** reverse indices facet-by-facet, with the given facetStartIndex array delimiting faces.\r\n *\r\n * * facetStartIndex[0] == 0 always -- start of facet zero.\r\n * * facet k has indices from facetStartIndex[k] <= i < facetStartIndex[k+1]\r\n * * hence for \"internal\" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.\r\n * *\r\n */\r\n public reverseIndices(facetStartIndex?: number[]) {\r\n if (facetStartIndex && PolyfaceData.isValidFacetStartIndexArray(facetStartIndex)) {\r\n PolyfaceData.reverseIndices(facetStartIndex, this.pointIndex, true);\r\n if (this.normalIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndices(facetStartIndex, this.normalIndex, true);\r\n if (this.paramIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndices(facetStartIndex, this.paramIndex, true);\r\n if (this.colorIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndices(facetStartIndex, this.colorIndex, true);\r\n PolyfaceData.reverseIndices(facetStartIndex, this.edgeVisible, false);\r\n }\r\n }\r\n /** reverse indices facet-by-facet, with the given facetStartIndex array delimiting faces.\r\n *\r\n * * facetStartIndex[0] == 0 always -- start of facet zero.\r\n * * facet k has indices from facetStartIndex[k] <= i < facetStartIndex[k+1]\r\n * * hence for \"internal\" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.\r\n * *\r\n */\r\n public reverseIndicesSingleFacet(facetId: number, facetStartIndex: number[]) {\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.pointIndex, true);\r\n if (this.normalIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.normalIndex, true);\r\n if (this.paramIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.paramIndex, true);\r\n if (this.colorIndex !== this.pointIndex)\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.colorIndex, true);\r\n PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.edgeVisible, false);\r\n }\r\n\r\n /** Scale all the normals by -1 */\r\n public reverseNormals() {\r\n if (this.normal)\r\n this.normal.scaleInPlace(-1.0);\r\n }\r\n /** Apply `transform` to point and normal arrays and to auxData.\r\n * * IMPORTANT This base class is just a data carrier. It does not know if the index order and normal directions have special meaning.\r\n * * i.e. caller must separately reverse index order and normal direction if needed.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n this.point.multiplyTransformInPlace(transform);\r\n\r\n if (this.normal && !transform.matrix.isIdentity)\r\n this.normal.multiplyAndRenormalizeMatrix3dInverseTransposeInPlace(transform.matrix);\r\n\r\n return undefined === this.auxData || this.auxData.tryTransformInPlace(transform);\r\n }\r\n /**\r\n * * Search for duplicates within points, normals, params, and colors.\r\n * * compress the data arrays.\r\n * * revise all indexing for the relocated data.\r\n */\r\n public compress() {\r\n const packedPoints = ClusterableArray.clusterGrowablePoint3dArray(this.point);\r\n this.point = packedPoints.growablePackedPoints!;\r\n packedPoints.updateIndices(this.pointIndex);\r\n // compressUnusedGrowableXYZArray(this.point, this.pointIndex);\r\n\r\n if (this.normalIndex && this.normal) {\r\n const packedNormals = ClusterableArray.clusterGrowablePoint3dArray(this.normal);\r\n this.normal = packedNormals.growablePackedPoints!;\r\n packedNormals.updateIndices(this.normalIndex);\r\n }\r\n\r\n if (this.paramIndex && this.param) {\r\n const packedParams = ClusterableArray.clusterGrowablePoint2dArray(this.param);\r\n this.param = packedParams.growablePackedPoints;\r\n packedParams.updateIndices(this.paramIndex);\r\n }\r\n\r\n if (this.colorIndex && this.color) {\r\n const packedColors = ClusterableArray.clusterNumberArray(this.color);\r\n this.color = packedColors.packedNumbers;\r\n packedColors.updateIndices(this.colorIndex);\r\n }\r\n }\r\n\r\n /**\r\n * Test if facetStartIndex is (minimally!) valid:\r\n * * length must be nonzero (recall that for \"no facets\" the facetStartIndexArray still must contain a 0)\r\n * * Each entry must be strictly smaller than the one that follows.\r\n * @param facetStartIndex array of facetStart data. facet `i` has indices at `facetsStartIndex[i]` to (one before) `facetStartIndex[i+1]`\r\n */\r\n public static isValidFacetStartIndexArray(facetStartIndex: number[]): boolean {\r\n // facetStartIndex for empty facets has a single entry \"0\" -- empty array is not allowed\r\n if (facetStartIndex.length === 0)\r\n return false;\r\n for (let i = 0; i + 1 < facetStartIndex.length; i++)\r\n if (facetStartIndex[i] >= facetStartIndex[i + 1])\r\n return false;\r\n return true;\r\n }\r\n /** Reverse data in entire facet indexing arrays.\r\n * * parameterized over type T so non-number data -- e.g. boolean visibility flags -- can be reversed.\r\n */\r\n public static reverseIndices<T>(facetStartIndex: number[], indices: T[] | undefined, preserveStart: boolean): boolean {\r\n if (!indices || indices.length === 0)\r\n return true; // empty case\r\n if (indices.length > 0) {\r\n if (facetStartIndex[facetStartIndex.length - 1] === indices.length) {\r\n for (let i = 0; i + 1 < facetStartIndex.length; i++) {\r\n let index0 = facetStartIndex[i];\r\n let index1 = facetStartIndex[i + 1];\r\n if (preserveStart) {\r\n // leave [index0] as is so reversed facet starts at same vertex\r\n while (index1 > index0 + 2) {\r\n index1--; index0++;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n }\r\n } else {\r\n // reverse all\r\n while (index1 > index0 + 1) {\r\n index1--;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n index0++;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /** Reverse data in entire facet indexing arrays.\r\n * * parameterized over type T so non-number data -- e.g. boolean visibility flags -- can be reversed.\r\n */\r\n public static reverseIndicesSingleFacet<T>(facetId: number, facetStartIndex: number[], indices: T[] | undefined, preserveStart: boolean): boolean {\r\n if (!indices || indices.length === 0)\r\n return true; // empty case\r\n if (indices.length > 0) {\r\n if (facetStartIndex[facetStartIndex.length - 1] === indices.length\r\n && facetId >= 0 && facetId + 1 < facetStartIndex.length) {\r\n let index0 = facetStartIndex[facetId];\r\n let index1 = facetStartIndex[facetId + 1];\r\n if (preserveStart) {\r\n // leave [index0] as is so reversed facet starts at same vertex\r\n while (index1 > index0 + 2) {\r\n index1--; index0++;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n }\r\n } else {\r\n // reverse all\r\n while (index1 > index0 + 1) {\r\n index1--;\r\n const a = indices[index0];\r\n indices[index0] = indices[index1];\r\n indices[index1] = a;\r\n index0++;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * pack out data entries that are unreferenced.\r\n * @param data data to pack\r\n * @param indices indices into the data.\r\n\r\nfunction compressUnusedGrowableXYZArray(data: GrowableXYZArray, indices: number[]): boolean {\r\n // 1 entry per data[i]\r\n // pass 0: number of references\r\n // pass 1: post-compression index (or -1)\r\n const n0 = data.length;\r\n const work = new Int32Array(data.length);\r\n for (const k of indices) {\r\n if (k < 0 || k >= n0)\r\n return false;\r\n work[k]++;\r\n }\r\n let n1 = 0;\r\n for (let i = 0; i < n0; i++) {\r\n if (work[i] === 0)\r\n work[i] = -1;\r\n else\r\n work[i] = n1++;\r\n }\r\n const numIndex = indices.length;\r\n for (let i = 0; i < numIndex; i++) {\r\n indices[i] = work[indices[i]];\r\n }\r\n for (let i = 0; i < n0; i++) {\r\n const j = work[i];\r\n if (j >= 0)\r\n data.moveIndexToIndex(i, j);\r\n }\r\n data.length = n1;\r\n return true;\r\n}\r\n*/\r\n"]}
@@ -12,6 +12,8 @@ import { HalfEdgeGraph } from "../topology/Graph";
12
12
  import { IndexedEdgeMatcher, SortableEdgeCluster } from "./IndexedEdgeMatcher";
13
13
  import { IndexedPolyface, Polyface, PolyfaceVisitor } from "./Polyface";
14
14
  import { RangeLengthData } from "./RangeLengthData";
15
+ import { Ray3d } from "../geometry3d/Ray3d";
16
+ import { FacetIntersectOptions, FacetLocationDetail } from "./FacetLocationDetail";
15
17
  /**
16
18
  * Options carrier for cloneWithHolesFilled
17
19
  * @public
@@ -446,7 +448,7 @@ export declare class PolyfaceQuery {
446
448
  * * Compute simple average of those normals
447
449
  * * Index to the averages
448
450
  * * For typical meshes, this correctly clusters adjacent normals.
449
- * * One cam 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.
451
+ * * 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.
450
452
  * @param polyface polyface to update.
451
453
  * @param toleranceAngle averaging is done between normals up to this angle.
452
454
  */
@@ -459,6 +461,25 @@ export declare class PolyfaceQuery {
459
461
  * @returns shifted mesh.
460
462
  */
461
463
  static cloneOffset(source: IndexedPolyface, signedOffsetDistance: number, offsetOptions?: OffsetMeshOptions): IndexedPolyface;
464
+ private static _workTriangle?;
465
+ private static _workTriDetail?;
466
+ private static _workPolyDetail?;
467
+ private static _workFacetDetail3?;
468
+ private static _workFacetDetailC?;
469
+ private static _workFacetDetailNC?;
470
+ /** Search facets for the first one that intersects the infinite line.
471
+ * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
472
+ * In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
473
+ * * Example callback logic:
474
+ * * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
475
+ * * 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);`
476
+ * @param visitor facet iterator
477
+ * @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`.
478
+ * @param options options for computing and populating an intersection detail, and an optional callback for accepting one
479
+ * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
480
+ * @see PolygonOps.intersectRay3d
481
+ */
482
+ static intersectRay3d(visitor: Polyface | PolyfaceVisitor, ray: Ray3d, options?: FacetIntersectOptions): FacetLocationDetail | undefined;
462
483
  }
463
484
  /** Announce the points on a drape panel.
464
485
  * * The first two points in the array are always along the draped line segment.
@@ -1 +1 @@
1
- {"version":3,"file":"PolyfaceQuery.d.ts","sourceRoot":"","sources":["../../../src/polyface/PolyfaceQuery.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAA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,oBAAoB,EAAE,MAAM,EAC5B,aAAa,GAAE,iBAA8C,GAAG,eAAe;IAOjF,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAsB;IACnD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAyB;IACvD,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAwB;IACvD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAgC;IACjE,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAA4B;IAC7D,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAA+B;IAEjE;;;;;;;;;;;MAWE;WACY,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,eAAe,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,mBAAmB,GAAG,SAAS;CAoChJ;AAED;;;;;;;;;GASG;AACH,oBAAY,kBAAkB,GAAG,CAAC,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAClF,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,GAAG,CAAC"}
@@ -5,7 +5,6 @@
5
5
  /** @packageDocumentation
6
6
  * @module Polyface
7
7
  */
8
- // import { Point2d } from "./Geometry2d";
9
8
  /* eslint-disable @typescript-eslint/naming-convention, no-empty */
10
9
  import { Point3dArray } from "../geometry3d/PointHelpers";
11
10
  import { BagOfCurves } from "../curve/CurveCollection";
@@ -39,6 +38,8 @@ import { RangeLengthData } from "./RangeLengthData";
39
38
  import { SpacePolygonTriangulation } from "../topology/SpaceTriangulation";
40
39
  import { HalfEdgeGraphFromIndexedLoopsContext } from "../topology/HalfEdgeGraphFromIndexedLoopsContext";
41
40
  import { OffsetMeshContext } from "./multiclip/OffsetMeshContext";
41
+ import { ConvexFacetLocationDetail, NonConvexFacetLocationDetail, TriangularFacetLocationDetail } from "./FacetLocationDetail";
42
+ import { BarycentricTriangle } from "../geometry3d/BarycentricTriangle";
42
43
  /**
43
44
  * Options carrier for [[PolyfaceQuery.cloneOffset]].
44
45
  * * Default options are strongly recommended.
@@ -1311,7 +1312,7 @@ export class PolyfaceQuery {
1311
1312
  * * Compute simple average of those normals
1312
1313
  * * Index to the averages
1313
1314
  * * For typical meshes, this correctly clusters adjacent normals.
1314
- * * One cam 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.
1315
+ * * 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.
1315
1316
  * @param polyface polyface to update.
1316
1317
  * @param toleranceAngle averaging is done between normals up to this angle.
1317
1318
  */
@@ -1331,6 +1332,55 @@ export class PolyfaceQuery {
1331
1332
  OffsetMeshContext.buildOffsetMeshWithEdgeChamfers(source, offsetBuilder, signedOffsetDistance, offsetOptions);
1332
1333
  return offsetBuilder.claimPolyface();
1333
1334
  }
1335
+ /** Search facets for the first one that intersects the infinite line.
1336
+ * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
1337
+ * In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
1338
+ * * Example callback logic:
1339
+ * * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
1340
+ * * 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);`
1341
+ * @param visitor facet iterator
1342
+ * @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`.
1343
+ * @param options options for computing and populating an intersection detail, and an optional callback for accepting one
1344
+ * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
1345
+ * @see PolygonOps.intersectRay3d
1346
+ */
1347
+ static intersectRay3d(visitor, ray, options) {
1348
+ if (visitor instanceof Polyface)
1349
+ return PolyfaceQuery.intersectRay3d(visitor.createVisitor(0), ray, options);
1350
+ let detail;
1351
+ visitor.setNumWrap(0);
1352
+ while (visitor.moveToNextFacet()) {
1353
+ const numEdges = visitor.pointCount; // #vertices = #edges since numWrap is zero
1354
+ const vertices = visitor.point;
1355
+ if (3 === numEdges) {
1356
+ const tri = this._workTriangle = BarycentricTriangle.create(vertices.getPoint3dAtUncheckedPointIndex(0), vertices.getPoint3dAtUncheckedPointIndex(1), vertices.getPoint3dAtUncheckedPointIndex(2), this._workTriangle);
1357
+ const detail3 = this._workTriDetail = tri.intersectRay3d(ray, this._workTriDetail);
1358
+ tri.snapLocationToEdge(detail3, options === null || options === void 0 ? void 0 : options.distanceTolerance, options === null || options === void 0 ? void 0 : options.parameterTolerance);
1359
+ detail = this._workFacetDetail3 = TriangularFacetLocationDetail.create(visitor.currentReadIndex(), detail3, this._workFacetDetail3);
1360
+ }
1361
+ else {
1362
+ const detailN = this._workPolyDetail = PolygonOps.intersectRay3d(vertices, ray, options === null || options === void 0 ? void 0 : options.distanceTolerance, this._workPolyDetail);
1363
+ if (PolygonOps.isConvex(vertices))
1364
+ detail = this._workFacetDetailC = ConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailC);
1365
+ else
1366
+ detail = this._workFacetDetailNC = NonConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailNC);
1367
+ }
1368
+ if (detail.isInsideOrOn) { // set optional caches, process the intersection
1369
+ if ((options === null || options === void 0 ? void 0 : options.needNormal) && visitor.normal)
1370
+ detail.getNormal(visitor.normal, vertices, options === null || options === void 0 ? void 0 : options.distanceTolerance);
1371
+ if ((options === null || options === void 0 ? void 0 : options.needParam) && visitor.param)
1372
+ detail.getParam(visitor.param, vertices, options === null || options === void 0 ? void 0 : options.distanceTolerance);
1373
+ if ((options === null || options === void 0 ? void 0 : options.needColor) && visitor.color)
1374
+ detail.getColor(visitor.color, vertices, options === null || options === void 0 ? void 0 : options.distanceTolerance);
1375
+ if (options === null || options === void 0 ? void 0 : options.needBarycentricCoordinates)
1376
+ detail.getBarycentricCoordinates(vertices, options === null || options === void 0 ? void 0 : options.distanceTolerance);
1377
+ if ((options === null || options === void 0 ? void 0 : options.acceptIntersection) && !options.acceptIntersection(detail, visitor))
1378
+ continue;
1379
+ return detail;
1380
+ }
1381
+ }
1382
+ return undefined; // no intersection
1383
+ }
1334
1384
  }
1335
1385
  // amount of computation to do per step of async methods.
1336
1386
  PolyfaceQuery._asyncWorkLimit = 1.e06;