Subject: CGAL users discussion list
List archive
- From: Shriramana Sharma <>
- To:
- Subject: [cgal-discuss] Sequence of boolops on general polygons
- Date: Tue, 5 Feb 2013 16:36:58 +0530
Hello. First may I clearly admit that all the multiple levels of
template instantiation in CGAL is quite intimidating to a non-expert
programmer like me, so I'm trying to toe the line of the examples to
extract my (minimum) required functionality from CGAL viz boolops on
glyph contours which are bezier polygons.
I have a series of bezier polygons and I have to union some of them
and difference some of them to get my required result (i.e. font
contours are not supposed to have intersections so I have to union all
the filled areas and difference all the unfilled areas to get "clean"
contours).
Now
doc_html/cgal_manual/Boolean_set_operations_2/Chapter_main.html#Subsection_19.3.2
says:
"""Thus, when several operations are performed in a sequence, it is
much more efficient to use the member functions of the
General_polygon_set_2 type directly, as the extraction of the polygons
from the internal representation for some operation, and the
reconstruction of the internal representation for the succeeding
operation could be time consuming."""
The bezier example however does not give indication of how to use
General_polygon_set_2 with bezier traits, and only gives example of
the top-level overload CGAL::intersection (P1, P2,
std::back_inserter(R)) but since at each successive step I have a set
of bezier polygons with holes with which to join/difference a new
contour (to get the final cumulative effect) I cannot use this
overload effectively and require the use of
General_polygon_set_2::join/difference.
My question is how to instantiate the General_polygon_set_2 template.
In the bezier example the traits class seems to be defined at:
typedef CGAL::Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
Traits_2;
In the General_polygon_set example I see the line:
typedef CGAL::General_polygon_set_2<Traits_2> Polygon_set_2;
Should I simply use this line with the above Traits_2 and I will get a
type I can use for multiple successive operations as described above?
Thank you!
--
Shriramana Sharma
- [cgal-discuss] Sequence of boolops on general polygons, Shriramana Sharma, 02/05/2013
- [cgal-discuss] Re: Sequence of boolops on general polygons, Shriramana Sharma, 02/05/2013
- [cgal-discuss] Re: Sequence of boolops on general polygons, Shriramana Sharma, 02/05/2013
- Re: [cgal-discuss] Re: Sequence of boolops on general polygons, Efi Fogel, 02/11/2013
- Re: [cgal-discuss] Re: Sequence of boolops on general polygons, Efi Fogel, 02/11/2013
- [cgal-discuss] Re: Sequence of boolops on general polygons, Shriramana Sharma, 02/05/2013
- [cgal-discuss] Re: Sequence of boolops on general polygons, Shriramana Sharma, 02/05/2013
- Re: [cgal-discuss] Re: Sequence of boolops on general polygons, Ophir Setter, 02/05/2013
- Re: [cgal-discuss] Re: Sequence of boolops on general polygons, Efi Fogel, 02/11/2013
- Re: [cgal-discuss] Re: Sequence of boolops on general polygons, Shriramana Sharma, 02/12/2013
- [cgal-discuss] Re: Sequence of boolops on general polygons, Shriramana Sharma, 02/05/2013
Archive powered by MHonArc 2.6.18.