Skip to content

NurbsSurface.GetSimpleSurface infinite loop #347

Description

@davidebazzi

Importing the step file 2527918_01_P_1_10_E31.stp I encountered an infinite loop when the triangulation tries to simplify a NurbsSurface.
The problem occurs because the face 6138_NurbsSurface_FullSurface.zip is very small and there is a singularity exactly at the max parameter.

Gemini suggested three possible solutions:

  1. "Adaptive tolerance": compute tolerance based on the size of the domain, and add safetyCounter to break if the loop gets trapped trying to find a missing point.
    I also added an out ok parameter to know then not all the reguired points were found.
  2. "Offsetting Near Singularities": Instead of deleting a point when it hits a singularity, you nudge it slightly away (just outside the tolerance zone). This allows you to evaluate infinitely close to the pole without triggering a crash or division-by-zero, keeping your total count intact.
  3. "Gap Interpolation": standard sampling to collect all safe, non-singular points, if we didn't find the number of required points, add middle points of the largest gaps until the required number of points is reached.

I Implemented 1, because is the one that doesn't change to much the actual concept.

@SOFAgh what do you think?

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions