Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Re: Identify each face in an Arrangement if the input is a polygonal mesh?
Chronological Thread
- From: Ben Supnik <>
- To:
- Subject: Re: [cgal-discuss] Re: Identify each face in an Arrangement if the input is a polygonal mesh?
- Date: Fri, 11 Nov 2011 11:59:32 -0500
Hi,
The observer is used to construct the first 2 arrangements.
I can't quite see how the observer can keep track of the original
face, as
when the time when I input the arrangement, I don't input in the original
face information. Mind to be more explicit about it?
Right - if your arrangement isn't _already_ tagged on a per face basis, there's nothing you can do. If it is tagged, the overlay traits make tracking easy, because the overlay gets a call for every face, and its inputs are the two faces in the two original arrangements that cover this face. (And by definition of the overlay, each overlay face is small enough that it will overlap exactly one face in each of the source arrangements.)
So the real question is how to capture face information when you construct your original arrangement.
If you create your arrangement with piece-wise construction (e.g. inserting individual curves, possibly with the helpers that let you accelerate) the observer will get called when you add a segment that creates a face.
If you create your arrangement by inserting a whole pile of curves at once then the observer won't help - in that case you have to somehow recover the polygon information in some other way. I do this by tagging data on my curve type - this lets me look at a face and pull meta data out of its boundary. Note that in this case (inserting lots of curves) if your data is junk the set of faces you get out might be surprising, e.g. if there were intersecting curves. I use different algorithms to interpret the curve data depending on how I want to cope with bogus input.
Whether bulk insert or piece-wise construction is fastest is pretty dependent on your data.
cheers
ben
- [cgal-discuss] Identify each face in an Arrangement if the input is a polygonal mesh?, Graviton, 11/04/2011
- Re: [cgal-discuss] Identify each face in an Arrangement if the input is a polygonal mesh?, Efraim Fogel, 11/08/2011
- [cgal-discuss] Re: Identify each face in an Arrangement if the input is a polygonal mesh?, Graviton, 11/11/2011
- Re: [cgal-discuss] Re: Identify each face in an Arrangement if the input is a polygonal mesh?, efif, 11/11/2011
- Re: [cgal-discuss] Re: Identify each face in an Arrangement if the input is a polygonal mesh?, Ben Supnik, 11/11/2011
- Re: [cgal-discuss] Re: Identify each face in an Arrangement if the input is a polygonal mesh?, efif, 11/11/2011
- [cgal-discuss] Re: Identify each face in an Arrangement if the input is a polygonal mesh?, Graviton, 11/11/2011
- Re: [cgal-discuss] Identify each face in an Arrangement if the input is a polygonal mesh?, Efraim Fogel, 11/08/2011
Archive powered by MHonArc 2.6.16.