Subject: CGAL users discussion list
List archive
- From: J_Young <>
- To:
- Subject: [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?
- Date: Tue, 28 Feb 2012 11:39:19 -0800 (PST)
Sebastien,
Yes, the outputs in the example are General_polygon_2, but not the input.
I tried the following, but I don't know how to add an arc to the polygon.
#include <CGAL/Exact_circular_kernel_2.h>
#include <CGAL/approximated_offset_2.h>
typedef CGAL::Exact_circular_kernel_2 Kernel;
typedef CGAL::Polygon_2<Kernel> Polygon_2;
typedef CGAL::Gps_circle_segment_traits_2<Kernel> Gps_traits_2;
typedef Gps_traits_2::Polygon_2 Offset_polygon_2;
typedef Gps_traits_2::Polygon_with_holes_2 Offset_polygon_with_holes_2;
typedef CGAL::Gps_circle_segment_traits_2<Kernel> Gps_traits_2;
typedef Gps_traits_2::Polygon_2 Offset_polygon_2;
typedef Gps_traits_2::Polygon_with_holes_2 Offset_polygon_with_holes_2;
void approximateInset( )
{
Polygon_2 P; // how to add an arc into this polygon on the circular kernel?
Kernel::FT radius = 2;
const double err_bound = 0.00001;
std::list<Offset_polygon_2> inset_polygons;
CGAL::approximated_inset_2(P, radius, err_bound, std::back_inserter(inset_polygons));
Kernel::FT radius = 2;
const double err_bound = 0.00001;
std::list<Offset_polygon_2> inset_polygons;
CGAL::approximated_inset_2(P, radius, err_bound, std::back_inserter(inset_polygons));
}
From: Sebastien Loriot (GeometryFactory) [via cgal-discuss] <[hidden email]>
To: J_Young <[hidden email]>
Sent: Monday, February 27, 2012 11:26 PM
Subject: Re: How to offset/inset a general polygon by a certain values?
In the first example here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_2/Chapter_main.html#Subsection_24.3.3
the nested type Gps_traits_2::Polygon_2 is
General_polygon_2<Arr_circle_segment_traits_2<Kernel> >
Sebastien.
On 02/28/2012 12:16 AM, J_Young wrote:
> Sebastien,
>
> The examples in the following chapter does not work either.
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_2/Chapter_main.html
>
> offset_polygon_2 takes in a Polygon_2 object, not a General_polygon_2 object
> which is what I need.
>
> Are there other ways?
>
> Thanks,
> Jay
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/How-to-offset-inset-a-general-polygon-by-a-certain-values-tp4414852p4426420.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_2/Chapter_main.html#Subsection_24.3.3
the nested type Gps_traits_2::Polygon_2 is
General_polygon_2<Arr_circle_segment_traits_2<Kernel> >
Sebastien.
On 02/28/2012 12:16 AM, J_Young wrote:
> Sebastien,
>
> The examples in the following chapter does not work either.
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_2/Chapter_main.html
>
> offset_polygon_2 takes in a Polygon_2 object, not a General_polygon_2 object
> which is what I need.
>
> Are there other ways?
>
> Thanks,
> Jay
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/How-to-offset-inset-a-general-polygon-by-a-certain-values-tp4414852p4426420.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
If you reply to this email, your message will be added to the discussion below:
http://cgal-discuss.949826.n4.nabble.com/How-to-offset-inset-a-general-polygon-by-a-certain-values-tp4414852p4427297.html
View this message in context: Re: How to offset/inset a general polygon by a certain values?
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] How to offset/inset a general polygon by a certain values?, J_Young, 02/23/2012
- Re: [cgal-discuss] How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/23/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, J_Young, 02/23/2012
- Re: [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/24/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, J_Young, 02/24/2012
- Re: [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/24/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, J_Young, 02/28/2012
- Re: [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/28/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, J_Young, 02/28/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, cnng0315, 02/29/2012
- Re: [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/29/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, J_Young, 02/28/2012
- Re: [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/24/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, J_Young, 02/24/2012
- Re: [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/24/2012
- [cgal-discuss] Re: How to offset/inset a general polygon by a certain values?, J_Young, 02/23/2012
- Re: [cgal-discuss] How to offset/inset a general polygon by a certain values?, Sebastien Loriot (GeometryFactory), 02/23/2012
Archive powered by MHonArc 2.6.16.