Subject: CGAL users discussion list
List archive
- From: Efi Fogel <>
- To:
- Subject: Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel
- Date: Sat, 28 Apr 2018 16:45:23 +0300
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:OmsL1BKDkL/QYHWONtmcpTZWNBhigK39O0sv0rFitYgeKvXxwZ3uMQTl6Ol3ixeRBMOHs6kC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwtFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhyUJNzA5/m/ZidF+grxHrx+6vRNz35TZbZuJOPZifK7Qe84RS2pbXsZWUixMGoyyb4UOD+EcPehYqIb9qEUKrRCjAgSjGu3vyj5Ghn/x0q01zeAhHBrJ3AwlBd0OsXDUoM/pO6cVVOC41a/FxijNYfNR3Dfy8onIchY5rPGKR71/atHeyU0xGA/fklqQronlMyuU1uQLqWib7vBvWfihi249sw1+vD2vxsA2iojJnI4a1E3L9Th/zY0oJtO4UFZ2bNyrHZdKqi2WKYt7TtkhTmxmoio3xbkLtJimdyYQ0psn3QTQa/mffoiI/B3jUOGRLC99hH1/ebK/gw++8VCvyuHgT8W03llHoy5fntnDsXAN0BPT6syZRfdn4kih3jOP2xjS6uFCP080ibLWJpwuz7Iqi5Yfr0TOEjX1lUj4lqObeUEp9vCt6+v9Y7XmopGcN5VzigH7KqkhhMK/AeU2MggJUGiU5+C82abs/U38WrpKj/k2nrPFv5DdIMQXvrS5DBNN0oY/9xa/CC+r38gXnXYdKFJJYQ+Ij4nyO17SPfD4Fuy/jk+3kDZrwvDGJqfuDo/MLnjFirfhfKxy51RSyAopnphi4YlJAOQBPO7rQR2288fJCwcwdQ2y2efuTttnkZgPXHqGRa6fPqSVulCB4qcjIvKHeZQO6wr6fvMq7vqrgX4ikkIGZoGo24EWYTa2BKdIOUKcNFfig58vFmgHukJqQeLrhlqNXDp7aHO7XqZ67TY+XtH1RbzfT5yg1eTSlBywGYdbMzgfWwK8VEzwfoDBYM8iLSebI8tviDsBDOHzRIoo1BXovwj/meM+crjkvxYAvJem7+BbovXJnEhrpzNxBsWZlWqKSjMsxz5ad3oNxKl65HdF5BKD3Kx/2aEKENVS47ZRXV9/O8KNieN9DN/2V0TKedLbEFs=
What are you trying to do?
Why have you chosen to use 2D Nef to start with? ____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
On 28 April 2018 at 16:10, Adrien Lefieux <> wrote:
Dear Houes,I spent a couple of hours on this one.The good news is that Nef_2 are not restricted to integers but it is not as straightforward as with Nef_3. You have to define the kernel yourself.What I did was, something of the sort:#include <CGAL/Gmpq.h>#include <CGAL/Lazy_exact_nt.h>#include <CGAL/Extended_cartesian.h>#include <CGAL/Nef_polyhedron_2.h>typedef CGAL::Extended_cartesian< CGAL::Lazy_exact_nt<CGAL::Gmpq> > Kernel;//typedef CGAL::Extended_cartesian< CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float> > > Kernel; // CGAL alternative without GMPtypedef CGAL::Nef_polyhedron_2<Kernel> Nef_polyhedron;...Point p1(0.0,0.0), p2(0.5,0.0), p3(0.0,0.5);Point triangle[3] = { p1, p2, p3 };Nef_polyhedron N(triangle, triangle+3);...I do not know if it is the most efficient method though, but it worked for me so far.Best,AdrienAdrien Lefieux, PhD
Postdoctoral Fellow,
School of Medicine,
Department of Mathematics and Computer Science,
Emory University, Atlanta, USA
E-mail: adrien.lefieux@emory.eduOn Fri, Apr 27, 2018 at 8:37 PM, houes <> wrote:Hello. I encountered 2D polygons that are not closed. These polygons are
formed by the intersection of a set of oriented lines. And I want to
construct Nef_polyhedron_2 to represent them. So I can use the new
representation to do union operations among open/closed polygons.
The problem I found with Nef_polyhedron_2 is that it only support *integer*
construction.
What I want to do is define two lines, and define two Nef_Polygons using
these two lines, and do the intersection, just as in the sample
nef_2_intersection.cpp, but with *double number type*.
Suppose my lines are l1=(1.5, 2.4 , 3.1), l2=(-1.1, 2.3, 5.7). I have found
no way to represent them using Nef_polyhedron_2::Line, since in the example:
typedef CGAL::*Exact_integer *RT;
typedef CGAL::Filtered_extended_homogeneous<RT> Extended_kernel;
typedef CGAL::Nef_polyhedron_2<Extended_kernel> Nef_polyhedron;
only Exact_integer seems to work. I change this to CGAL::Gmpq,
CGAL::M_float, etc. all gives compiling error.
So is it that Nef_polygon only work with integer number type? Since all my
lines, planes using Epick kernel, I really want Nef_polygon to work with
double coordinates.
I also checked the sample code in Nef_3/handling_double_coordinates.cpp,
however it needs to first define a CGAL::Polyhedron_3<Epeck>. In my case,
the intersections of my planes are open, I cannot obtain a Polyhedron_3
first, so this does not solve my problem.
Hope some one could help me.
Thank you very much.
--
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
- [cgal-discuss] Nef_polyhedron_2 with Epick kernel, houes, 04/28/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, Adrien Lefieux, 04/28/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, Efi Fogel, 04/28/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, houes, 04/29/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, Efi Fogel, 04/29/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, houes, 04/30/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, Efi Fogel, 04/29/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, houes, 04/29/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, houes, 04/29/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, Efi Fogel, 04/28/2018
- Re: [cgal-discuss] Nef_polyhedron_2 with Epick kernel, Adrien Lefieux, 04/28/2018
Archive powered by MHonArc 2.6.18.