Subject: CGAL users discussion list
List archive
- From: houssen <>
- To: <>
- Subject: [cgal-discuss] print_polyhedron
- Date: Thu, 19 Nov 2015 12:05:03 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:i6J/tRVeuMLqXsFii1DX/vMHUrjV8LGtZVwlr6E/grcLSJyIuqrYZheFt8tkgFKBZ4jH8fUM07OQ6PC9HzJbqs/f+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8CVPV4D3WT1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GOhTAz0idmw0/8b2rgLrTA2V53JaXH9AwTRSBA2Q7BbnRYz8tGOutu1gwzKXO+X3Vb8sHzq4ufQ4ACT0gTsKYmZquFrcjdZ92fpW
Hello,
I am new to CGAL. I try to write a print_polyhedron method in the same spirit than the print_polygon method one can find here : https://github.com/CGAL/cgal/blob/master/Minkowski_sum_2/examples/Minkowski_sum_2/print_utils.h.
Can't get out of this error :
error: ‘Halfedge_around_facet_const_circulator’ in ‘Polyhedron_3_Facet_iterator {aka class CGAL::internal::In_place_list_const_iterator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Epeck> > > >, std::allocator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Epeck> > > > > >}’ does not name a type
typedef Polyhedron_3_Facet_iterator::Halfedge_around_facet_const_circulator Polyhedron_3_Halfedge_around_facet_circulator;
Could somebody help ? (either on compilation error, or print_polyhedron code)
Franck
Note : I use CGAL-4.7 built from source on Ubuntu-14.04.
#include <iostream> #include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Point_3.h> #include <CGAL/Polyhedron_3.h> typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef CGAL::Point_3<Kernel> Point_3; typedef CGAL::Polyhedron_3<Kernel> Polyhedron_3; typedef Polyhedron_3::Facet_const_iterator Polyhedron_3_Facet_iterator; typedef Polyhedron_3_Facet_iterator::Halfedge_around_facet_const_circulator Polyhedron_3_Halfedge_around_facet_circulator; void print_polyhedron (const Polyhedron_3& P) { std::cout << "[ "; for (Polyhedron_3_Facet_iterator fit = P.facets_begin(); fit != P.facets_end(); ++fit) { // for (Polyhedron_3_Halfedge_around_facet_circulator eit = fit->facet_begin(); eit != fit->facet_begin(); ++eit) { // std::cout << " (" << fit << ')'; // } } std::cout << " ]"; } int main () { Polyhedron_3 P; Point_3 P1 (-1, -1, 0); Point_3 P2 ( 1, -1, 0); Point_3 P3 ( 1, 1, 0); Point_3 P4 (-1, 1, 0); P.make_triangle (P1, P2, P3); P.make_triangle (P1, P3, P4); std::cout << "Polygon P = "; print_polyhedron (P); std::cout << std::endl; return 0; }# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
project( 02.cgal_ )
cmake_minimum_required(VERSION 2.8.10)
find_package(CGAL QUIET COMPONENTS Core )
if ( CGAL_FOUND )
include( ${CGAL_USE_FILE} )
include( CGAL_CreateSingleSourceCGALProgram )
create_single_source_cgal_program( "cgal.cpp" )
else()
message(STATUS "This program requires the CGAL library, and will not be
compiled.")
endif()
- [cgal-discuss] print_polyhedron, houssen, 11/19/2015
- Re: [cgal-discuss] print_polyhedron, Sebastien Loriot (GeometryFactory), 11/20/2015
Archive powered by MHonArc 2.6.18.