Subject: CGAL users discussion list
List archive
- From: Guillaume Damiand <>
- To:
- Subject: Re: [cgal-discuss] Re: union two polyhedron_3
- Date: Thu, 04 Apr 2013 13:30:23 +0200
Hi,
Polyhedron must use a kernel as template argument; and linear_cell_complex must be templated with a lcc traits class.
Here the correct code (which compile for me)
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Linear_cell_complex.h>
#include <CGAL/Linear_cell_complex_constructors.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point_3;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef CGAL::Linear_cell_complex<3,3,CGAL::Linear_cell_complex_traits<3, Kernel> > LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
int main()
{
Point_3 p(1.0, 0.0, 0.0);
Point_3 q(0.0, 1.0, 0.0);
Point_3 r(0.0, 0.0, 1.0);
Point_3 s(0.0, 0.0, 0.0);
Polyhedron P;
LCC_3 lcc;
P.make_tetrahedron(p, q, r, s);
CGAL::import_from_polyhedron_3<LCC_3, Polyhedron>(lcc, P);
lcc.display_characteristics(std::cout);
return 1;
}
Guillaume
Le 04/04/2013 11:38, sdg a écrit :
I read this package and found this function "import_from_polyhedron_3" may
change Polyhedron_3 to LCC.
Questions:
1. Do I have to change kernel from
Exact_predicates_exact_constructions_kernel to LCC::Traits?
2. I tried to make a small program, but it failed. The following is my code.
typedef CGAL::Linear_cell_complex<3> LCC_3;
typedef LCC_3::Traits Kernel;
typedef LCC_3::Dart_handle Dart_handle;
typedef Kernel::Point_3 Point_3;
int main(){
Point_3 p(1.0, 0.0, 0.0);
Point_3 q(0.0, 1.0, 0.0);
Point_3 r(0.0, 0.0, 1.0);
Point_3 s(0.0, 0.0, 0.0);
CGAL::Polyhedron_3<Kernel> P;
LCC_3 lcc;
P.make_tetrahedron(p, q, r, s);
CGAL::import_from_polyhedron_3<LCC_3, CGAL::Polyhedron_3<Kernel>
(lcc, P);lcc.display_characteristics(std::cout);
}
The error message is "Combinatorial_map_constructors.h:52: error: there are
no arguments to 'CGAL_assertion' that depend on a template parameter, so a
declaration of 'CGAL_assertion' must be available". What's wrong?
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/union-two-polyhedron-3-tp4657092p4657115.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
--
===================================================================
Guillaume DAMIAND
CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.26.62 Fax: +33 (0)4.72.43.15.36
Mail:
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================
Attachment:
smime.p7s
Description: Signature cryptographique S/MIME
- [cgal-discuss] union two polyhedron_3, sdg, 04/01/2013
- Re: [cgal-discuss] union two polyhedron_3, Sebastien Loriot (GeometryFactory), 04/02/2013
- [cgal-discuss] Re: union two polyhedron_3, sdg, 04/04/2013
- Re: [cgal-discuss] Re: union two polyhedron_3, Guillaume Damiand, 04/04/2013
- [cgal-discuss] Re: union two polyhedron_3, sdg, 04/04/2013
- Re: [cgal-discuss] Re: union two polyhedron_3, Guillaume Damiand, 04/04/2013
- [cgal-discuss] Re: union two polyhedron_3, sdg, 04/04/2013
- Re: [cgal-discuss] Re: union two polyhedron_3, Guillaume Damiand, 04/05/2013
- [cgal-discuss] Re: union two polyhedron_3, sdg, 04/04/2013
- Re: [cgal-discuss] Re: union two polyhedron_3, Guillaume Damiand, 04/04/2013
- [cgal-discuss] Re: union two polyhedron_3, sdg, 04/04/2013
- Re: [cgal-discuss] Re: union two polyhedron_3, Guillaume Damiand, 04/04/2013
- [cgal-discuss] Re: union two polyhedron_3, sdg, 04/04/2013
- Re: [cgal-discuss] union two polyhedron_3, Sebastien Loriot (GeometryFactory), 04/02/2013
Archive powered by MHonArc 2.6.18.