• Advertisement
Sign in to follow this  

Algorithm for merging split polygons

This topic is 2931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Suppose I have a polygon which lies in the plane and may be concave or convex, and I split that polygon up into many different pieces. I then pick certain pieces and discard them, leaving me with a number of smaller polygons. Now I would like to recombine the left over polygons into a single polygon, where possible. Removing polygons may result in sets which are disjoint, in which case there will be more than one resulting polygon after they are recombined. Basically adjacent polygons are merged until there are no adjacent polygons left. The purpose of this is to merge polygons after they have been split up during constructive solid geometry operations. (My CSG algorithm splits polygons more than necessary) The main reason to merge split faces after each boolean op is so the wireframe render of the geometry doesn't look like a complete mess. There are also performance and floating point stability benefits. I'm trying to come up with an algorithm but it appears to be very complicated. Does anyone have the solution already?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement