@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.
@@ -403,9 +403,9 @@ class PolyfaceQuery {
403
403
  let normalCounter = 0;
404
404
  for (visitor.reset(); visitor.moveToNextFacet();) {
405
405
  const numEdges = visitor.pointCount - 1;
406
- const normal = PolygonOps_1.PolygonOps.centroidAreaNormal(visitor.point);
406
+ const normal = PolygonOps_1.PolygonOps.areaNormalGo(visitor.point);
407
407
  if (normal === undefined)
408
- return -2;
408
+ continue; // skip degenerate facets
409
409
  facetNormals.push(normal);
410
410
  for (let i = 0; i < numEdges; i++) {
411
411
  const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
@@ -438,8 +438,8 @@ class PolyfaceQuery {
438
438
  else {
439
439
  edgeVector.setFrom(sideA.edgeVector);
440
440
  }
441
- const facetNormalA = facetNormals[sideA.facetIndex].direction;
442
- const facetNormalB = facetNormals[sideB.facetIndex].direction;
441
+ const facetNormalA = facetNormals[sideA.facetIndex];
442
+ const facetNormalB = facetNormals[sideB.facetIndex];
443
443
  const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
444
444
  if (dihedralAngle.isAlmostZero)
445
445
  numPlanar++;