@itwin/core-geometry 5.14.0-dev.1 → 5.14.0-dev.3

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.
@@ -398,9 +398,9 @@ export class PolyfaceQuery {
398
398
  let normalCounter = 0;
399
399
  for (visitor.reset(); visitor.moveToNextFacet();) {
400
400
  const numEdges = visitor.pointCount - 1;
401
- const normal = PolygonOps.centroidAreaNormal(visitor.point);
401
+ const normal = PolygonOps.areaNormalGo(visitor.point);
402
402
  if (normal === undefined)
403
- return -2;
403
+ continue; // skip degenerate facets
404
404
  facetNormals.push(normal);
405
405
  for (let i = 0; i < numEdges; i++) {
406
406
  const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
@@ -433,8 +433,8 @@ export class PolyfaceQuery {
433
433
  else {
434
434
  edgeVector.setFrom(sideA.edgeVector);
435
435
  }
436
- const facetNormalA = facetNormals[sideA.facetIndex].direction;
437
- const facetNormalB = facetNormals[sideB.facetIndex].direction;
436
+ const facetNormalA = facetNormals[sideA.facetIndex];
437
+ const facetNormalB = facetNormals[sideB.facetIndex];
438
438
  const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
439
439
  if (dihedralAngle.isAlmostZero)
440
440
  numPlanar++;