user294664
user294664

Reputation: 127

Removing sliver regions from a 2d point loop

I want to remove sliver regions from a loop of closed points in 2D. After removal of sliver nodes, I should get closed good area region so that my meshing software can mesh it.

For example, here are my points in the loop

Boundary Nodes Data:

Node_ID    U_param    V_param
298        -1.570694  1.933077
859        -1.570804  1.637394
860        -1.570801  1.331141
861        -1.570797  1.047667
862        -1.570806  0.775248
863        -1.570798  0.502410
864        -1.570798  0.217605
865        -1.570806 -0.089721
866        -1.570797 -0.383541
867        -1.570801 -0.659983
868        -1.570804 -0.931217
133        -1.570796 -1.208516
763        -1.355953 -1.208516
134        -1.141109 -1.208516
963        -1.141265 -0.968128
962        -1.141443 -0.732077
961        -1.141122 -0.491922
960        -1.141160 -0.250871
959        -1.140885  0.013409
309        -1.141109  0.276746
1527       -1.345324  0.430356
212        -1.491354  0.602793
211        -1.570592  0.855809
1079       -1.570592  1.109513
1078       -1.570592  1.375016
1077       -1.570592  1.660328
298        -1.570694  1.933077

the loop containing sliver region

How do I remove the sliver region efficiently?

EDIT: Sliver regions are narrow near zero area regions.

Upvotes: 1

Views: 81

Answers (1)

ravenspoint
ravenspoint

Reputation: 20596

Your question does not define a "sliver"

My best guess is that you mean the region circled in red:

enter image description here

So we need to define this formally. My suggestion:

Two points in an ordered list of points around a closed loop that are closer together than a small specified distance but are not adjacent to each other in the ordered list define the beginning and end of a "sliver".

Visualizing that:

enter image description here

Now, I hope, you can see the value of formally defining your terms. With this definition the algorithm is obvious.

  • Arrange the points in order around the loop.
  • Loop P over points
    • Loop Q over points starting from P+2
      • IF dist(P,Q) < Dmin
        • IF area enclosed by P, P+1, ... Q-1, Q, P < Amin
          • remove points from P+1 to Q

Upvotes: 0

Related Questions