@itwin/core-geometry 4.5.0-dev.4 → 4.5.0-dev.7

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 (41) hide show
  1. package/lib/cjs/curve/CoordinateXYZ.d.ts +10 -13
  2. package/lib/cjs/curve/CoordinateXYZ.d.ts.map +1 -1
  3. package/lib/cjs/curve/CoordinateXYZ.js +16 -15
  4. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  5. package/lib/cjs/curve/GeometryQuery.d.ts +17 -17
  6. package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
  7. package/lib/cjs/curve/GeometryQuery.js +16 -15
  8. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  9. package/lib/cjs/curve/PointString3d.d.ts +17 -13
  10. package/lib/cjs/curve/PointString3d.d.ts.map +1 -1
  11. package/lib/cjs/curve/PointString3d.js +35 -20
  12. package/lib/cjs/curve/PointString3d.js.map +1 -1
  13. package/lib/cjs/polyface/Polyface.d.ts +155 -118
  14. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  15. package/lib/cjs/polyface/Polyface.js +244 -162
  16. package/lib/cjs/polyface/Polyface.js.map +1 -1
  17. package/lib/cjs/polyface/PolyfaceData.d.ts +12 -7
  18. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  19. package/lib/cjs/polyface/PolyfaceData.js +13 -6
  20. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  21. package/lib/esm/curve/CoordinateXYZ.d.ts +10 -13
  22. package/lib/esm/curve/CoordinateXYZ.d.ts.map +1 -1
  23. package/lib/esm/curve/CoordinateXYZ.js +16 -15
  24. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  25. package/lib/esm/curve/GeometryQuery.d.ts +17 -17
  26. package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
  27. package/lib/esm/curve/GeometryQuery.js +16 -15
  28. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  29. package/lib/esm/curve/PointString3d.d.ts +17 -13
  30. package/lib/esm/curve/PointString3d.d.ts.map +1 -1
  31. package/lib/esm/curve/PointString3d.js +35 -20
  32. package/lib/esm/curve/PointString3d.js.map +1 -1
  33. package/lib/esm/polyface/Polyface.d.ts +155 -118
  34. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  35. package/lib/esm/polyface/Polyface.js +244 -162
  36. package/lib/esm/polyface/Polyface.js.map +1 -1
  37. package/lib/esm/polyface/PolyfaceData.d.ts +12 -7
  38. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  39. package/lib/esm/polyface/PolyfaceData.js +13 -6
  40. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  41. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"PointString3d.js","sourceRoot":"","sources":["../../../src/curve/PointString3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAwD;AAGxD,mEAAwD;AACxD,6DAA0D;AAI1D,mDAAgD;AAEhD,mEAAmE;AAEnE;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,6BAAa;IAI9C,yCAAyC;IAClC,mBAAmB,CAAC,KAAoB,IAAa,OAAO,KAAK,YAAY,aAAa,CAAC,CAAC,CAAC;IAEpG,0CAA0C;IAC1C,IAAW,MAAM,KAAgB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD;QACE,KAAK,EAAE,CAAC;QATV,wCAAwC;QACxB,qBAAgB,GAAG,iBAAiB,CAAC;QASnD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IACD,mCAAmC;IAC5B,gBAAgB,CAAC,SAAoB;QAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,CAAC;IACX,CAAC;IACO,MAAM,CAAC,YAAY,CAAC,GAAQ;QACl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------------------------------------------------------\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 Curve\r\n */\r\n\r\nimport { BeJSONFunctions, Geometry } from \"../Geometry\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Point3dArray } from \"../geometry3d/PointHelpers\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { XYZProps } from \"../geometry3d/XYZProps\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n\r\n/**\r\n * A PointString3d is an array of points.\r\n * * PointString3D is first class (displayable, possibly persistent) geometry derived from the GeometryQuery base class.\r\n * * The various points in the PointString3d are NOT connected by line segments for display or other calculations.\r\n * @public\r\n */\r\nexport class PointString3d extends GeometryQuery implements BeJSONFunctions {\r\n /** String name for schema properties */\r\n public readonly geometryCategory = \"pointCollection\";\r\n\r\n /** Test if `other` is a PointString3d */\r\n public isSameGeometryClass(other: GeometryQuery): boolean { return other instanceof PointString3d; }\r\n private _points: Point3d[];\r\n /** return a clone of the points array. */\r\n public get points(): Point3d[] { return this._points; }\r\n private constructor() {\r\n super();\r\n this._points = [];\r\n }\r\n /** Clone and apply a transform. */\r\n public cloneTransformed(transform: Transform): PointString3d { // we know tryTransformInPlace succeeds.\r\n const c = this.clone();\r\n c.tryTransformInPlace(transform);\r\n return c;\r\n }\r\n private static flattenArray(arr: any): any {\r\n return arr.reduce((flat: any, toFlatten: any) => {\r\n return flat.concat(Array.isArray(toFlatten) ? PointString3d.flattenArray(toFlatten) : toFlatten);\r\n }, []);\r\n }\r\n /** Create a PointString3d from points. */\r\n public static create(...points: any[]): PointString3d {\r\n const result = new PointString3d();\r\n result.addPoints(points);\r\n return result;\r\n }\r\n\r\n /** Add multiple points to the PointString3d */\r\n public addPoints(...points: any[]) {\r\n const toAdd: any[] = PointString3d.flattenArray(points);\r\n for (const p of toAdd) {\r\n if (p instanceof Point3d)\r\n this._points.push(p);\r\n }\r\n }\r\n /** Add a single point to the PointString3d */\r\n public addPoint(point: Point3d) {\r\n this._points.push(point);\r\n }\r\n /** Remove the last point added to the PointString3d */\r\n public popPoint() {\r\n this._points.pop();\r\n }\r\n\r\n /** Replace this PointString3d's point array by a clone of the array in `other` */\r\n public setFrom(other: PointString3d) {\r\n this._points = Point3dArray.clonePoint3dArray(other._points);\r\n }\r\n /** Create from an array of Point3d */\r\n public static createPoints(points: Point3d[]): PointString3d {\r\n const ps = new PointString3d();\r\n ps._points = Point3dArray.clonePoint3dArray(points);\r\n return ps;\r\n }\r\n /** Create a PointString3d from xyz coordinates packed in a Float64Array */\r\n public static createFloat64Array(xyzData: Float64Array): PointString3d {\r\n const ps = new PointString3d();\r\n for (let i = 0; i + 3 <= xyzData.length; i += 3)\r\n ps._points.push(Point3d.create(xyzData[i], xyzData[i + 1], xyzData[i + 2]));\r\n return ps;\r\n }\r\n /** Return a deep clone. */\r\n public clone(): PointString3d {\r\n const retVal = new PointString3d();\r\n retVal.setFrom(this);\r\n return retVal;\r\n }\r\n /** Replace this instance's points by those from a json array, e.g. `[[1,2,3], [4,2,2]]` */\r\n public setFromJSON(json?: any) {\r\n this._points.length = 0;\r\n if (Array.isArray(json)) {\r\n let xyz;\r\n for (xyz of json)\r\n this._points.push(Point3d.fromJSON(xyz));\r\n }\r\n }\r\n /**\r\n * Convert an PointString3d to a JSON object.\r\n * @return {*} [[x,y,z],...[x,y,z]]\r\n */\r\n public toJSON(): XYZProps[] {\r\n const value = [];\r\n for (const p of this._points) value.push(p.toJSON());\r\n return value;\r\n }\r\n /** Create a PointString3d from a json array, e.g. `[[1,2,3], [4,2,2]]` */\r\n public static fromJSON(json?: any): PointString3d {\r\n const ps = new PointString3d(); ps.setFromJSON(json); return ps;\r\n }\r\n /** Access a single point by index. */\r\n public pointAt(i: number, result?: Point3d): Point3d | undefined {\r\n if (i >= 0 && i < this._points.length) {\r\n if (result) { result.setFrom(this._points[i]); return result; }\r\n return this._points[i].clone();\r\n }\r\n return undefined;\r\n }\r\n /** Return the number of points. */\r\n public numPoints(): number { return this._points.length; }\r\n\r\n /** Reverse the point order */\r\n public reverseInPlace(): void {\r\n if (this._points.length >= 2) {\r\n let i0 = 0;\r\n let i1 = this._points.length - 1;\r\n while (i0 < i1) {\r\n const a = this._points[i0];\r\n this._points[i1] = this._points[i0];\r\n this._points[i0] = a;\r\n i0++;\r\n i1--;\r\n }\r\n }\r\n }\r\n /** Return the number of points. */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n transform.multiplyPoint3dArrayInPlace(this._points);\r\n return true;\r\n }\r\n /** Return the index and coordinates of the closest point to spacePoint. */\r\n public closestPoint(spacePoint: Point3d): { index: number, xyz: Point3d } {\r\n const result = { index: -1, xyz: Point3d.create() };\r\n const index = Point3dArray.closestPointIndex(this._points, spacePoint);\r\n if (index >= 0) {\r\n result.index = index;\r\n result.xyz.setFrom(this._points[index]);\r\n }\r\n return result;\r\n }\r\n /** Return true if all points are in the given plane. */\r\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\r\n return Point3dArray.isCloseToPlane(this._points, plane, Geometry.smallMetricDistance);\r\n }\r\n /** Extend a range to include the points in this PointString3d. */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n rangeToExtend.extendArray(this._points, transform);\r\n }\r\n /** Return true if corresponding points are almost equal. */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (!(other instanceof PointString3d))\r\n return false;\r\n return Point3dArray.isAlmostEqual(this._points, other._points);\r\n }\r\n /** Reduce to empty set of points. */\r\n public clear() { this._points.length = 0; }\r\n /** Second step of double dispatch: call `handler.handlePointString(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handlePointString3d(this);\r\n }\r\n\r\n}\r\n"]}
1
+ {"version":3,"file":"PointString3d.js","sourceRoot":"","sources":["../../../src/curve/PointString3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAwD;AAGxD,mEAAwD;AACxD,6DAA0D;AAI1D,mDAAgD;AAEhD,mEAAmE;AAEnE;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,6BAAa;IAG9C,yCAAyC;IAClC,mBAAmB,CAAC,KAAoB;QAC7C,OAAO,KAAK,YAAY,aAAa,CAAC;IACxC,CAAC;IAED,0CAA0C;IAC1C,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD;QACE,KAAK,EAAE,CAAC;QAZV,wCAAwC;QACxB,qBAAgB,GAAG,iBAAiB,CAAC;QAYnD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IACD,mCAAmC;IAC5B,gBAAgB,CAAC,SAAoB;QAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,uCAAuC;QACzE,OAAO,CAAC,CAAC;IACX,CAAC;IACD;;;OAGG;IACK,MAAM,CAAC,YAAY,CAAC,GAAQ;QAClC,OAAO,GAAG,CAAC,MAAM;QACf,yFAAyF;QACzF,qFAAqF;QACrF,CAAC,IAAS,EAAE,SAAc,EAAE,EAAE;YAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACnG,CAAC,EACD,EAAE,CACH,CAAC;IACJ,CAAC;IACD,0CAA0C;IACnC,MAAM,CAAC,MAAM,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GAAG,KAAK,CAAC;YACrB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;SACzC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,wDAAwD;IACjD,SAAS,CAAC,KAAmC;QAClD,OAAO,2BAAY,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,mBAAQ,CAAC,mBAAmB,CAAC,CAAC;IACxF,CAAC;IACD,2FAA2F;IACpF,WAAW,CAAC,aAAsB,EAAE,SAAqB;QAC9D,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IACD,4DAA4D;IAC5C,aAAa,CAAC,KAAoB;QAChD,IAAI,CAAC,CAAC,KAAK,YAAY,aAAa,CAAC;YACnC,OAAO,KAAK,CAAC;QACf,OAAO,2BAAY,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;IACD,qCAAqC;IAC9B,KAAK;QACV,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,6EAA6E;IACtE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF;AA5KD,sCA4KC","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 Curve\r\n */\r\n\r\nimport { BeJSONFunctions, Geometry } from \"../Geometry\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Point3dArray } from \"../geometry3d/PointHelpers\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { XYZProps } from \"../geometry3d/XYZProps\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n\r\n/**\r\n * A PointString3d is an array of points.\r\n * * PointString3D is first class (displayable, possibly persistent) geometry derived from the GeometryQuery base class.\r\n * * The various points in the PointString3d are NOT connected by line segments for display or other calculations.\r\n * @public\r\n */\r\nexport class PointString3d extends GeometryQuery implements BeJSONFunctions {\r\n /** String name for schema properties */\r\n public readonly geometryCategory = \"pointCollection\";\r\n /** Test if `other` is a PointString3d */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof PointString3d;\r\n }\r\n private _points: Point3d[];\r\n /** Return a clone of the points array. */\r\n public get points(): Point3d[] {\r\n return this._points;\r\n }\r\n private constructor() {\r\n super();\r\n this._points = [];\r\n }\r\n /** Clone and apply a transform. */\r\n public cloneTransformed(transform: Transform): PointString3d {\r\n const c = this.clone();\r\n c.tryTransformInPlace(transform); // we know tryTransformInPlace succeeds\r\n return c;\r\n }\r\n /**\r\n * Turn any array (possibly nested) into a \"flat\" array of objects that are not arrays. This allows processing\r\n * the objects without recursion into nested arrays.\r\n */\r\n private static flattenArray(arr: any): any {\r\n return arr.reduce(\r\n // a callback function to execute for each element in the array. Its return value becomes\r\n // the value of the \"flat\" parameter on the next invocation of the callback function.\r\n (flat: any, toFlatten: any) => {\r\n return flat.concat(Array.isArray(toFlatten) ? PointString3d.flattenArray(toFlatten) : toFlatten);\r\n },\r\n [], // initial value (empty array)\r\n );\r\n }\r\n /** Create a PointString3d from points. */\r\n public static create(...points: any[]): PointString3d {\r\n const result = new PointString3d();\r\n result.addPoints(points);\r\n return result;\r\n }\r\n /** Add multiple points to the PointString3d. */\r\n public addPoints(...points: any[]) {\r\n const toAdd: any[] = PointString3d.flattenArray(points);\r\n for (const p of toAdd) {\r\n if (p instanceof Point3d)\r\n this._points.push(p);\r\n }\r\n }\r\n /** Add a single point to the PointString3d. */\r\n public addPoint(point: Point3d) {\r\n this._points.push(point);\r\n }\r\n /** Remove the last point added to the PointString3d. */\r\n public popPoint() {\r\n this._points.pop();\r\n }\r\n /** Replace this PointString3d's point array by a clone of the array in `other`. */\r\n public setFrom(other: PointString3d) {\r\n this._points = Point3dArray.clonePoint3dArray(other._points);\r\n }\r\n /** Create from an array of Point3d. */\r\n public static createPoints(points: Point3d[]): PointString3d {\r\n const ps = new PointString3d();\r\n ps._points = Point3dArray.clonePoint3dArray(points);\r\n return ps;\r\n }\r\n /** Create a PointString3d from xyz coordinates packed in a Float64Array. */\r\n public static createFloat64Array(xyzData: Float64Array): PointString3d {\r\n const ps = new PointString3d();\r\n for (let i = 0; i + 3 <= xyzData.length; i += 3)\r\n ps._points.push(Point3d.create(xyzData[i], xyzData[i + 1], xyzData[i + 2]));\r\n return ps;\r\n }\r\n /** Return a deep clone. */\r\n public clone(): PointString3d {\r\n const retVal = new PointString3d();\r\n retVal.setFrom(this);\r\n return retVal;\r\n }\r\n /** Replace this instance's points by those from a json array, e.g. `[[1,2,3], [4,5,6]]`. */\r\n public setFromJSON(json?: any) {\r\n this._points.length = 0;\r\n if (Array.isArray(json)) {\r\n let xyz;\r\n for (xyz of json)\r\n this._points.push(Point3d.fromJSON(xyz));\r\n }\r\n }\r\n /**\r\n * Convert an PointString3d to a JSON object.\r\n * @return {*} e.g., `[[1,2,3], [4,5,6]]`.\r\n */\r\n public toJSON(): XYZProps[] {\r\n const value = [];\r\n for (const p of this._points)\r\n value.push(p.toJSON());\r\n return value;\r\n }\r\n /** Create a PointString3d from a json array, e.g. `[[1,2,3], [4,5,6]]`. */\r\n public static fromJSON(json?: any): PointString3d {\r\n const ps = new PointString3d();\r\n ps.setFromJSON(json);\r\n return ps;\r\n }\r\n /** Access a single point by index. */\r\n public pointAt(i: number, result?: Point3d): Point3d | undefined {\r\n if (i >= 0 && i < this._points.length) {\r\n if (result) {\r\n result.setFrom(this._points[i]);\r\n return result;\r\n }\r\n return this._points[i].clone();\r\n }\r\n return undefined;\r\n }\r\n /** Return the number of points. */\r\n public numPoints(): number {\r\n return this._points.length;\r\n }\r\n /** Reverse the point order */\r\n public reverseInPlace(): void {\r\n if (this._points.length >= 2) {\r\n let i0 = 0;\r\n let i1 = this._points.length - 1;\r\n while (i0 < i1) {\r\n const a = this._points[i1];\r\n this._points[i1] = this._points[i0];\r\n this._points[i0] = a;\r\n i0++;\r\n i1--;\r\n }\r\n }\r\n }\r\n /** Apply transform on points in place. */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n transform.multiplyPoint3dArrayInPlace(this._points);\r\n return true;\r\n }\r\n /** Return the index and coordinates of the closest point to spacePoint. */\r\n public closestPoint(spacePoint: Point3d): { index: number, xyz: Point3d } {\r\n const result = { index: -1, xyz: Point3d.create() };\r\n const index = Point3dArray.closestPointIndex(this._points, spacePoint);\r\n if (index >= 0) {\r\n result.index = index;\r\n result.xyz.setFrom(this._points[index]);\r\n }\r\n return result;\r\n }\r\n /** Return true if all points are in the given plane. */\r\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\r\n return Point3dArray.isCloseToPlane(this._points, plane, Geometry.smallMetricDistance);\r\n }\r\n /** Extend a range to include the points in this PointString3d (optionally transformed). */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n rangeToExtend.extendArray(this._points, transform);\r\n }\r\n /** Return true if corresponding points are almost equal. */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (!(other instanceof PointString3d))\r\n return false;\r\n return Point3dArray.isAlmostEqual(this._points, other._points);\r\n }\r\n /** Reduce to empty set of points. */\r\n public clear() {\r\n this._points.length = 0;\r\n }\r\n /** Second step of double dispatch: call `handler.handlePointString(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handlePointString3d(this);\r\n }\r\n}\r\n"]}
@@ -19,240 +19,277 @@ export declare abstract class Polyface extends GeometryQuery {
19
19
  readonly geometryCategory = "polyface";
20
20
  /** Underlying polyface data. */
21
21
  data: PolyfaceData;
22
+ /** Constructor */
22
23
  protected constructor(data: PolyfaceData);
23
- /** create and return a visitor for this concrete polyface. */
24
+ /**
25
+ * Create and return a visitor for this concrete polyface.
26
+ * @param numWrap the number of vertices to replicate in visitor arrays.
27
+ */
24
28
  abstract createVisitor(numWrap: number): PolyfaceVisitor;
25
29
  /** Flag indicating if the mesh display must assume both sides are visible. */
26
30
  get twoSided(): boolean;
27
31
  set twoSided(value: boolean);
28
- /** Flag indicating if the mesh closure is unknown (0), open sheet (1), closed (2) */
32
+ /**
33
+ * Flag indicating if the mesh closure is unknown (0), open sheet (1), closed solid (2).
34
+ * * A boundary edge of a mesh is defined as an edge with only one connected facet.
35
+ * * Closed solid is a mesh with no boundary edge. Open sheet is a mesh that has boundary edge(s).
36
+ */
29
37
  get expectedClosure(): number;
30
38
  set expectedClosure(value: number);
31
39
  /**
32
- * Check validity of indices into a data array.
33
- * * It is valid to have both indices and data undefined.
34
- * * It is NOT valid for just one to be defined.
35
- * * Index values at indices[indexPositionA <= i < indexPositionB] must be valid indices to the data array.
36
- * @param indices array of indices.
37
- * @param indexPositionA first index to test
38
- * @param indexPositionB one past final index to test
39
- * @param data data array
40
- * @param dataLength length of data array
41
- */
42
- static areIndicesValid(indices: number[] | undefined, indexPositionA: number, indexPositionB: number, data: any | undefined, dataLength: number): boolean;
43
- /**
44
- * Returns true if this polyface has no facets.
40
+ * Check validity of indices into a data array.
41
+ * * It is valid to have both indices and data undefined.
42
+ * * It is NOT valid for just one to be defined.
43
+ * * Index values at indices[indexPositionA <= i < indexPositionB] must be valid indices to the data array.
44
+ * @param indices array of indices.
45
+ * @param indexPositionA first index to test.
46
+ * @param indexPositionB one past final index to test.
47
+ * @param data data array.
48
+ * @param dataLength length of data array.
45
49
  */
50
+ static areIndicesValid(indices: number[] | undefined, indexPositionA: number, indexPositionB: number, data: any | undefined, dataLength: number): boolean;
51
+ /** Returns true if this polyface has no facets. */
46
52
  abstract get isEmpty(): boolean;
47
- /**
48
- * Returns the number of facets of this polyface. Subclasses should override.
49
- */
53
+ /** Returns the number of facets of this polyface. Subclasses should override. */
50
54
  get facetCount(): number | undefined;
51
55
  }
52
56
  /**
53
- * An `IndexedPolyface` is a set of facets which can have normal, param, and color arrays with independent point, normal, param, and color indices.
57
+ * An `IndexedPolyface` is a set of facets which can have normal, param, and color arrays with independent point,
58
+ * normal, param, and color indices.
54
59
  * @public
55
60
  */
56
61
  export declare class IndexedPolyface extends Polyface {
62
+ /**
63
+ * Index to the `this.data.pointIndex` array entry for a specific facet.
64
+ * * The facet count is `facetStart.length - 1`.
65
+ * * The face loop for the i_th facet consists of the entries in `this.data.pointIndex` at indices `_facetStart[i]`
66
+ * up to (but not including) `_facetStart[i + 1]`.
67
+ * * Note the array is initialized with one entry (value 0).
68
+ */
69
+ protected _facetStart: number[];
70
+ /**
71
+ * Index to the `this.data.face` array entry for a specific facet.
72
+ * * `_facetToFaceData` has one entry per facet.
73
+ */
74
+ protected _facetToFaceData: number[];
75
+ /**
76
+ * Constructor for a new polyface.
77
+ * @param data PolyfaceData arrays to capture.
78
+ * @param facetStart optional array of facet start indices (e.g. known during clone)
79
+ * @param facetToFacetData optional array of face identifiers (e.g. known during clone)
80
+ */
81
+ protected constructor(data: PolyfaceData, facetStart?: number[], facetToFaceData?: number[]);
57
82
  /** Test if other is an instance of `IndexedPolyface` */
58
83
  isSameGeometryClass(other: any): boolean;
59
84
  /** Tests for equivalence between two IndexedPolyfaces. */
60
85
  isAlmostEqual(other: any): boolean;
61
- /**
62
- * Returns true if either the point array or the point index array is empty.
63
- */
86
+ /** Returns true if either the point array or the point index array is empty. */
64
87
  get isEmpty(): boolean;
65
88
  /**
66
- * * apply the transform to points
67
- * * apply the (inverse transpose of) the matrix part to normals
68
- * * If determinant is negative, also
89
+ * Transform the mesh.
90
+ * * Apply the transform to points.
91
+ * * Apply the (inverse transpose of the) matrix part to normals.
92
+ * * If determinant of the transform matrix is negative, also
69
93
  * * negate normals
70
94
  * * reverse index order around each facet.
71
- * @param transform
72
95
  */
73
96
  tryTransformInPlace(transform: Transform): boolean;
74
97
  /** Reverse indices for a single facet. */
75
98
  reverseSingleFacet(facetId: number): void;
76
99
  /** Return a deep clone. */
77
100
  clone(): IndexedPolyface;
78
- /** Return a deep clone with transformed points and normals */
101
+ /**
102
+ * Return a deep clone with transformed points and normals.
103
+ * @see [[IndexedPolyface.tryTransformInPlace]] for details of how transform is done.
104
+ */
79
105
  cloneTransformed(transform: Transform): IndexedPolyface;
80
106
  /** Reverse the order of indices around all facets. */
81
107
  reverseIndices(): void;
82
108
  /** Reverse the direction of all normal vectors. */
83
109
  reverseNormals(): void;
84
110
  /**
85
- * * index to the index array entries for a specific facet.
86
- * * the facet count is facetStart.length - 1
87
- * * facet [f] indices run from facetStart[f] to upper limit facetStart[f+1].
88
- * * Note the array is initialized with one entry.
89
- */
90
- protected _facetStart: number[];
91
- /**
92
- * * For facet i, _facetToFaceData[i] is the index of the faceData entry for the facet.
93
- * * _facetToFaceData has one entry per facet.
111
+ * Return face data using a facet index.
112
+ * * Returns `undefined` if none found.
113
+ * * This is the REFERENCE to the FacetFaceData not a copy.
94
114
  */
95
- protected _facetToFaceData: number[];
96
- /** return face data using a facet index. This is the REFERENCE to the FacetFaceData, not a copy. Returns undefined if none found. */
97
115
  tryGetFaceData(i: number): FacetFaceData | undefined;
98
116
  /**
99
- * Constructor for a new polyface.
100
- * @param data PolyfaceData arrays to capture.
101
- * @param facetStart optional array of facet start indices (e.g. known during clone)
102
- * @param facetToFacetData optional array of face identifiers (e.g. known during clone)
103
- */
104
- protected constructor(data: PolyfaceData, facetStart?: number[], facetToFaceData?: number[]);
105
- /**
106
- * * Add facets from source to this polyface.
107
- * * Optionally reverse facet indices as per PolyfaceData.reverseIndicesSingleFacet() with preserveStart = false, and invert source normals.
108
- * * Optionally apply a transform to points and normals.
117
+ * Add facets from `source` to `this` polyface.
118
+ * * Optionally reverse facet indices as per `PolyfaceData.reverseIndicesSingleFacet()` with `preserveStart = false` and
119
+ * invert source normals.
120
+ * * Optionally apply a `transform` to points and normals.
109
121
  * * Will only copy param, normal, color, and face data if we are already tracking them AND/OR the source contains them.
110
122
  */
111
123
  addIndexedPolyface(source: IndexedPolyface, reversed: boolean, transform: Transform | undefined): void;
112
- /** Return the total number of param indices in zero-terminated style, which includes
113
- * * all the indices in the packed zero-based table
124
+ /**
125
+ * Return the total number of indices in zero-terminated style, which includes
126
+ * * all the indices in the packed zero-based table.
114
127
  * * one additional index for the zero-terminator of each facet.
115
- * @note Note that all index arrays (point, normal, param, color) have the same counts, so there
128
+ * @note Note that all index arrays (pointIndex, normalIndex, paramIndex, colorIndex) have the same counts, so there
116
129
  * is not a separate query for each of them.
117
130
  */
118
131
  get zeroTerminatedIndexCount(): number;
119
- /** Create an empty facet set, with coordinate and index data to be supplied later.
120
- * @param needNormals true if normals will be constructed
121
- * @param needParams true if uv parameters will be constructed
122
- * @param needColors true if colors will e constructed.
132
+ /**
133
+ * Create an empty facet set with coordinate and index data to be supplied later.
134
+ * @param needNormals true if normals will be constructed.
135
+ * @param needParams true if uv parameters will be constructed.
136
+ * @param needColors true if colors will be constructed.
137
+ * @param twoSided true if the facets are to be considered viewable from the back.
123
138
  */
124
139
  static create(needNormals?: boolean, needParams?: boolean, needColors?: boolean, twoSided?: boolean): IndexedPolyface;
125
- /** add (a clone of ) a point. return its 0 based index.
126
- * @param point point coordinates
127
- * @param priorIndex optional index of prior point to check for repeated coordinates
128
- * @returns Returns the zero-based index of the added or reused point.
140
+ /**
141
+ * Add (a clone of) a point to point array.
142
+ * @param point the point.
143
+ * @param priorIndex (optional) index of prior point to check for possible duplicate value.
144
+ * @returns the zero-based index of the added or duplicate point.
129
145
  */
130
146
  addPoint(point: Point3d, priorIndex?: number): number;
131
- /** add a point.
132
- * @returns Returns the zero-based index of the added point.
147
+ /**
148
+ * Add a point to point array.
149
+ * @param x the x coordinate of point.
150
+ * @param y the y coordinate of point.
151
+ * @param z the z coordinate of point.
152
+ * @returns the zero-based index of the added point.
133
153
  */
134
154
  addPointXYZ(x: number, y: number, z: number): number;
135
- /** Add a uv param.
136
- * @returns 0-based index of the added param.
155
+ /**
156
+ * Add (a clone of) a uv parameter to the parameter array.
157
+ * @param param the parameter.
158
+ * @returns zero-based index of the added param.
137
159
  */
138
160
  addParam(param: Point2d): number;
139
- /** Add a uv parameter to the parameter array.
161
+ /**
162
+ * Add a uv parameter to the parameter array.
163
+ * @param u the u part of parameter.
164
+ * @param v the v part of parameter.
140
165
  * @param priorIndexA first index to check for possible duplicate value.
141
166
  * @param priorIndexB second index to check for possible duplicate value.
142
- * @returns 0-based index of the added or reused param.
167
+ * @returns zero-based index of the added or duplicate parameter.
143
168
  */
144
169
  addParamUV(u: number, v: number, priorIndexA?: number, priorIndexB?: number): number;
145
- /** Add a normal vector
170
+ /**
171
+ * Add (a clone of) a normal vector to the normal array.
172
+ * @param normal the normal vector.
146
173
  * @param priorIndexA first index to check for possible duplicate value.
147
174
  * @param priorIndexB second index to check for possible duplicate value.
148
- * @returns 0-based index of the added or reused normal.
175
+ * @returns zero-based index of the added or duplicate normal.
149
176
  */
150
177
  addNormal(normal: Vector3d, priorIndexA?: number, priorIndexB?: number): number;
151
- /** Add a normal vector given by direct coordinates
152
- * @returns 0-based index of the added or reused param.
178
+ /**
179
+ * Add a normal vector to the normal array.
180
+ * @param x the x coordinate of normal.
181
+ * @param y the y coordinate of normal.
182
+ * @param z the z coordinate of normal.
183
+ * @returns zero-based index of the added normal vector.
153
184
  */
154
185
  addNormalXYZ(x: number, y: number, z: number): number;
155
- /** Add a color
156
- * @returns 0-based index of the added or reused color.
186
+ /**
187
+ * Add a color to the color array
188
+ * @param color the color.
189
+ * @returns zero-based index of the added color.
157
190
  */
158
191
  addColor(color: number): number;
159
192
  /** Add a point index with edge visibility flag. */
160
193
  addPointIndex(index: number, visible?: boolean): void;
161
- /** Add a normal index */
194
+ /** Add a normal index. */
162
195
  addNormalIndex(index: number): void;
163
- /** Add a param index */
196
+ /** Add a param index. */
164
197
  addParamIndex(index: number): void;
165
- /** Add a color index */
198
+ /** Add a color index. */
166
199
  addColorIndex(index: number): void;
167
- /** clean up the open facet. return the returnValue (so caller can easily return cleanupOpenFacet("message")) */
168
- cleanupOpenFacet(): void;
169
- /** announce the end of construction of a facet.
170
- *
171
- * * The "open" facet is checked for:
172
- *
173
- * ** Same number of indices among all active index arrays -- point, normal, param, color
174
- * ** All indices are within bounds of the respective data arrays.
175
- * * in error cases, all index arrays are trimmed back to the size when previous facet was terminated.
176
- * * "undefined" return is normal. Any other return is a description of an error.
200
+ /**
201
+ * Clean up the open facet.
202
+ * @deprecated in 4.x to remove nebulous "open facet" concept from the API. Call [[PolyfaceData.trimAllIndexArrays]]
203
+ * instead.
177
204
  */
178
- terminateFacet(validateAllIndices?: boolean): any;
205
+ cleanupOpenFacet(): void;
179
206
  /**
180
- * All terminated facets added since the declaration of the previous face
181
- * will be grouped into a new face with their own 2D range.
207
+ * Announce the end of construction of a facet.
208
+ * * Optionally check for:
209
+ * * Same number of indices among all active index arrays -- point, normal, param, color
210
+ * * All indices are within bounds of the respective data arrays.
211
+ * * In error cases, all index arrays are trimmed back to the size when previous facet was terminated.
212
+ * * A return value of `undefined` is normal. Otherwise, a string array of error messages is returned.
182
213
  */
183
- /** (read-only property) number of facets */
214
+ terminateFacet(validateAllIndices?: boolean): String[] | undefined;
215
+ /** Number of facets (read-only property). */
184
216
  get facetCount(): number;
185
- /** (read-only property) number of faces */
217
+ /** Number of faces (read-only property). */
186
218
  get faceCount(): number;
187
- /** (read-only property) number of points */
219
+ /** Number of points (read-only property). */
188
220
  get pointCount(): number;
189
- /** (read-only property) number of colors */
221
+ /** Number of colors (read-only property). */
190
222
  get colorCount(): number;
191
- /** (read-only property) number of parameters */
223
+ /** Number of parameters (read-only property). */
192
224
  get paramCount(): number;
193
- /** (read-only property) number of normals */
225
+ /** Number of normals (read-only property). */
194
226
  get normalCount(): number;
227
+ /** Test if `index` is a valid facet index. */
228
+ isValidFacetIndex(index: number): boolean;
195
229
  /** Return the number of edges in a particular facet. */
196
230
  numEdgeInFacet(facetIndex: number): number;
197
- /** test if `index` is a valid facet index. */
198
- isValidFacetIndex(index: number): boolean;
199
- /** ASSUME valid facet index . .. return its start index in index arrays. */
231
+ /** ASSUME valid facet index. Return start index of facet in pointIndex arrays. */
200
232
  facetIndex0(index: number): number;
201
- /** ASSUME valid facet index . .. return its end index in index arrays. */
233
+ /** ASSUME valid facet index. Return one past end index of facet in pointIndex arrays. */
202
234
  facetIndex1(index: number): number;
203
- /** create a visitor for this polyface */
235
+ /** Create a visitor for this polyface */
204
236
  createVisitor(numWrap?: number): PolyfaceVisitor;
205
237
  /** Return the range of (optionally transformed) points in this mesh. */
206
238
  range(transform?: Transform, result?: Range3d): Range3d;
207
- /** Extend `range` with coordinates from this mesh */
239
+ /** Extend `range` with coordinates from this mesh. */
208
240
  extendRange(range: Range3d, transform?: Transform): void;
209
- /** Given the index of a facet, return the data pertaining to the face it is a part of. */
241
+ /**
242
+ * Given the index of a facet, return the data pertaining to the face it is a part of.
243
+ * @deprecated in 4.x. Use [[IndexedPolyface.tryGetFaceData]], which verifies the index is in range.
244
+ */
210
245
  getFaceDataByFacetIndex(facetIndex: number): FacetFaceData;
211
246
  /**
212
- * All terminated facets since the last face declaration will be mapped to a single new FacetFaceData object
213
- * using facetToFaceData[]. FacetFaceData holds the 2D range of the face. Returns true if successful, false otherwise.
247
+ * Set new FacetFaceData.
248
+ * * All terminated facets since the last face declaration will be mapped to a single new FacetFaceData object using
249
+ * facetToFaceData[]. FacetFaceData holds the 2D range of the face. Returns `true` if successful, `false` otherwise.
214
250
  */
215
251
  setNewFaceData(endFacetIndex?: number): boolean;
216
- /** Second step of double dispatch: call `handler.handleIndexedPolyface(this)` */
252
+ /** Second step of double dispatch: call `handler.handleIndexedPolyface(this)`. */
217
253
  dispatchToGeometryHandler(handler: GeometryHandler): any;
218
254
  }
219
255
  /**
220
256
  * A PolyfaceVisitor manages data while walking through facets.
221
- *
222
257
  * * The polyface visitor holds data for one facet at a time.
223
- * * The caller can request the position in the addressed facets as a "readIndex."
224
- * * The readIndex value (as a number) is not promised to be sequential. (I.e. it might be a simple facet count or might be
258
+ * * The caller can request the position in the addressed polyfaceData as a "readIndex."
259
+ * * The readIndex values (as numbers) are not promised to be sequential. (I.e. it might be a simple facet count
260
+ * or might have "gaps" at the whim of the particular PolyfaceVisitor implementation).
225
261
  * @public
226
262
  */
227
263
  export interface PolyfaceVisitor extends PolyfaceData {
228
264
  /** Load data for the facet with given index. */
229
265
  moveToReadIndex(index: number): boolean;
230
- /** Return the readIndex of the currently loaded facet */
266
+ /** Return the readIndex of the currently loaded facet. */
231
267
  currentReadIndex(): number;
232
268
  /** Load data for the next facet. */
233
269
  moveToNextFacet(): boolean;
234
- /** Reset to initial state for reading all facets sequentially with moveToNextFacet */
270
+ /** Reset to initial state for reading all facets sequentially with moveToNextFacet. */
235
271
  reset(): void;
236
- /** Return the point index of vertex i within the currently loaded facet */
272
+ /** Return the point index of vertex i within the currently loaded facet. */
237
273
  clientPointIndex(i: number): number;
238
- /** Return the param index of vertex i within the currently loaded facet */
274
+ /** Return the param index of vertex i within the currently loaded facet. */
239
275
  clientParamIndex(i: number): number;
240
- /** Return the normal index of vertex i within the currently loaded facet */
276
+ /** Return the normal index of vertex i within the currently loaded facet. */
241
277
  clientNormalIndex(i: number): number;
242
- /** Return the color index of vertex i within the currently loaded facet */
278
+ /** Return the color index of vertex i within the currently loaded facet. */
243
279
  clientColorIndex(i: number): number;
244
- /** Return the aux data index of vertex i within the currently loaded facet */
280
+ /** Return the aux data index of vertex i within the currently loaded facet. */
245
281
  clientAuxIndex(i: number): number;
246
- /** return the client polyface */
282
+ /** Return the client polyface. */
247
283
  clientPolyface(): Polyface | undefined;
248
284
  /** Set the number of vertices to replicate in visitor arrays. */
249
285
  setNumWrap(numWrap: number): void;
250
- /** clear the contents of all arrays. Use this along with `pushDataFrom` to build up new facets. */
286
+ /** Clear the contents of all arrays. Use this along with `pushDataFrom` to build up new facets. */
251
287
  clearArrays(): void;
252
- /** transfer data from a specified index of the other visitor as new data in this visitor. */
288
+ /** Transfer data from a specified index of the other visitor as new data in this visitor. */
253
289
  pushDataFrom(other: PolyfaceVisitor, index: number): void;
254
- /** transfer interpolated data from the other visitor.
255
- * * all data values are interpolated at `fraction` between `other` values at index0 and index1.
290
+ /**
291
+ * Transfer interpolated data from the other visitor.
292
+ * * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.
256
293
  */
257
294
  pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void;
258
295
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Polyface.d.ts","sourceRoot":"","sources":["../../../src/polyface/Polyface.ts"],"names":[],"mappings":"AAKA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,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;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,8BAAsB,QAAS,SAAQ,aAAa;IAClD,wCAAwC;IACxC,SAAgB,gBAAgB,cAAc;IAE9C,gCAAgC;IACzB,IAAI,EAAE,YAAY,CAAC;IAC1B,SAAS,aAAa,IAAI,EAAE,YAAY;IAIxC,8DAA8D;aAC9C,aAAa,CAAC,OA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