Skip to content

unify length scales in Intersection2DPolygon - #230

Open
ebchin wants to merge 2 commits into
bugfix/ebchin/submesh-dual-xferfrom
bugfix/ebchin/intersection-length-scales
Open

unify length scales in Intersection2DPolygon#230
ebchin wants to merge 2 commits into
bugfix/ebchin/submesh-dual-xferfrom
bugfix/ebchin/intersection-length-scales

Conversation

@ebchin

@ebchin ebchin commented Aug 3, 2026

Copy link
Copy Markdown
Member

Fixes the cause of #229 for the geometry identified. Tolerances in Intersection2DPolygon() are used inconsistently. Specifically for the geometry identified, this causes a tolerance for determining if one polygon is not contained another to not be triggered, but a similar tolerance checking if the points should be collapsed to be triggered down the line. Between the two checks, PolyReorderConvex() is called, but since the geometry contains non-collapsed points, it is not convex, causing the routine to fail.

This PR includes 2 fixes:

  • makes the use of tolerances in Intersection2DPolygon() consistent
  • merge near-identical points before calling PolyReorderConvex()

@ebchin
ebchin requested review from srwopschall and white238 August 3, 2026 23:27
@ebchin ebchin self-assigned this Aug 3, 2026
* \param [in] numVertexB number of vertices in polygon B
* \param [in] posTol position tolerance to collapse segment-segment intersection points
* \param [in] lenTol length tolerance to collapse short intersection edges
* \param [in] lengthTol nondimensional length tolerance used directly for point-in-face barycentric checks and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on the longest parameter description I've seen!

@white238 white238 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this what was exposed by the submodule PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants