Hi,
I'm working with cubic Bezier curves as defined in CGAL::Arr_Bezier_curve_traits_2, the Curve_2 class. Can I confirm there's no equality operator for these curves? (I know I can test the equality of the four control points myself but this seems like functionality that belongs in the class). Can I confirm there's no bounding box function for these curves? (I know I can get a non-minimal AABB from the bounding polygon, but a minimal AABB is trickier and it seems like functionality that belongs in the class. It looks like the implementation classes have some kind of bounds stored too?). Can I confirm there's no affine transform function for these curves? (I know I can transform the four control points myself but this seems like functionality that belongs in the class). Thanks, Stu -- Sent from: http://cgal-discuss.949826.n4.nabble.com/ -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss |
Hi Stu, First, I'm glad that you are using it and finding out all kind of missing features.The operations you mention could definitely be implemented within the traits class. In other words, if we implement an operation in one traits class, we would implement it in all (or at least several). This way the implementation is more complex (see algorithm below) and gets even more complex when 2D arrangements embedded on non-planar surfaces are taken in account, but more is gained. Input: C1, C2, intersections = empty Compare the left-most point. ------------------------------ If not equal return the comparison result. Otherwise (the left-most points are equal) Compare to the right of the point. If not equal return the comparison result. Otherwise (they overlap) If intersection is empty, compute the intersections Remove the first overlapping section from c1, c2, and intersections. If intersections is empty Compare the right-most point and return the result call recursively with c1, c2, and intersections, and return the result.
On 17 March 2018 at 23:14, stu002 <[hidden email]> wrote: Hi, |
On Mon, Mar 19, 2018 at 7:40 AM, Efi Fogel <[hidden email]> wrote:
> First, I'm glad that you are using it and finding out all kind of missing > features. > > I can confirm that non of the operations you mention are supported. > > The operations you mention could definitely be implemented within the traits > class. > [...] Thanks for summarizing that Efi. CGAL is an impressive project that obviously has had a huge amount of R&D put into it. I'm starting to think my use cases may not be in the intended uses for CGAL as I need a comprehensive collection of 2D geometric entities with equality, affine transforms and AABB bounds for each. I also need offsetting of polygons, circles and ellipses (although I understand these are far from simple operations). > BW, I'm currently implementing a generic operation that lexicographically > compares 2 curves. > It is generic (applicable to all traits) in the sense that it is implemented > in terms of other existing operations. > This way the implementation is more complex (see algorithm below) and gets > even more complex when 2D arrangements embedded on non-planar surfaces are > taken in account, but more is gained. Looking forward to this functionality too. Thanks, Stu -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss |
Free forum by Nabble | Edit this page |