Sign in to follow this  
taz0010

Algorithm for merging split polygons

Recommended Posts

taz0010    277
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this