Subject: CGAL users discussion list
List archive
- From: ochyomdu <>
- To:
- Subject: [cgal-discuss] Re: Create Polyhedron from given Planes
- Date: Thu, 19 Apr 2012 04:44:47 -0700 (PDT)
Hello dimitris!
You should look into CGAL examples.
After You have installed CGAL You can find in installed folder of CGAL the
folder /examples/Nef_3
in this folder You can look e.g into the files
interface_polyhedron.cpp and nef_3_construction.cpp
You can do e.g. following operations:
Creation of Nef_polyhedron, e.g.:
Nef_polyhedron N0;
Nef_polyhedron N1( Nef_polyhedron::EMPTY);
Nef_polyhedron N2( Nef_polyhedron::COMPLETE);
Nef_polyhedron N3( Plane_3( 1, 2, 5,-1));
Nef_polyhedron N4( Plane_3( 1, 2, 5,-1), Nef_polyhedron::INCLUDED);
Nef_polyhedron N5( Plane_3( 1, 2, 5,-1), Nef_polyhedron::EXCLUDED);
You can make * (intersection), + (union), - (difference), ^ (symmetric
difference) operations on Nef_polyhedrons:
N6 += N3;
N0 = N6 * N3;
Look into documentation
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Nef_3_ref/Class_Nef_polyhedron_3.html#Cross_link_anchor_1174
Converting polyhedron into nef_polyhedron:
Polyhedron P;
...
if(P.is_closed()) {
Nef_polyhedron N6(P);
}
Converting nef_polyhedron into polyhedron:
if(N6.is_simple()) {
N6.convert_to_polyhedron(P);
}
I wish You much success!
Best regards
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Create-Polyhedron-from-given-Planes-tp4568074p4570619.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Create Polyhedron from given Planes, sgdimitris, 04/18/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, sgdimitris, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, ochyomdu, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, sgdimitris, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, ochyomdu, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, sgdimitris, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, ochyomdu, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, sgdimitris, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, ochyomdu, 04/19/2012
- [cgal-discuss] Re: Create Polyhedron from given Planes, sgdimitris, 04/19/2012
Archive powered by MHonArc 2.6.16.