Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Suggestion/How to output a unique polyhedron after boolean operation?

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Suggestion/How to output a unique polyhedron after boolean operation?


Chronological Thread 
  • From: tang <>
  • To:
  • Subject: [cgal-discuss] Re: Suggestion/How to output a unique polyhedron after boolean operation?
  • Date: Fri, 19 Jul 2013 04:21:17 -0700 (PDT)

Dear Sebastien,

Thank you very much for your kindly reply. I modified the code as you
suggested, however, there are still some errors when compiling, could you
please help me to take a look at it?


Thanks,
Zhanghong Tang

#include <CGAL/Polyhedron_incremental_builder_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polyhedron_items_with_id_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Nef_polyhedron_3.h>

#include "math.h"
#include <iostream>
#include <istream>
#include <fstream>

using namespace std;
class MyPolyhedron_items_with_id_3 {
public:
template < class Refs, class Traits>
struct Vertex_wrapper {
typedef typename Traits::Point_3 Point;
typedef HalfedgeDS_vertex_max_base_with_id< Refs,
Point,std::size_t> Vertex;
};
template < class Refs, class Traits>
struct Halfedge_wrapper {
typedef HalfedgeDS_halfedge_max_base_with_id<Refs, std::size_t>
Halfedge;
};
template < class Refs, class Traits>
struct Face_wrapper {
typedef HalfedgeDS_face_max_base_with_id< Refs,
Tag_true,std::size_t> Face;
};
};

typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point_3;
typedef Kernel::Line_3 Line_3;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
typedef CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_with_id_3>
Polyhedron;
typedef Polyhedron::HalfedgeDS HalfedgeDS;
typedef Kernel::Plane_3 Plane_3;
typedef Polyhedron::Vertex Vertex;
typedef Polyhedron::Vertex_iterator Vertex_iterator;
typedef Polyhedron::Vertex_handle Vertex_handle ;
typedef Polyhedron::Facet_iterator Facet_iterator;
typedef Polyhedron::Halfedge_handle Halfedge_handle;
typedef Polyhedron::Halfedge_around_vertex_circulator
Halfedge_vertex_circulator;
typedef Polyhedron::Halfedge_around_facet_circulator
Halfedge_facet_circulator;
typedef Nef_polyhedron::Aff_transformation_3 Aff_transformation_3;
typedef Nef_polyhedron::Vector_3 Vector_3;


The errors are as follows:
2>CSGlib.cpp(37): error C2143: syntax error : missing ';' before '<'
2> CSGlib.cpp(38) : see reference to class template instantiation
'MyPolyhedron_items_with_id_3::Vertex_wrapper<Refs,Traits>' being compiled
2>CSGlib.cpp(37): error C4430: missing type specifier - int assumed. Note:
C++ does not support default-int
2>CSGlib.cpp(37): error C2238: unexpected token(s) preceding ';'
2>CSGlib.cpp(41): error C2143: syntax error : missing ';' before '<'
2> CSGlib.cpp(42) : see reference to class template instantiation
'MyPolyhedron_items_with_id_3::Halfedge_wrapper<Refs,Traits>' being compiled
2>CSGlib.cpp(41): error C4430: missing type specifier - int assumed. Note:
C++ does not support default-int
2>CSGlib.cpp(41): error C2238: unexpected token(s) preceding ';'
2>CSGlib.cpp(45): error C2143: syntax error : missing ';' before '<'
2> CSGlib.cpp(46) : see reference to class template instantiation
'MyPolyhedron_items_with_id_3::Face_wrapper<Refs,Traits>' being compiled
2>CSGlib.cpp(45): error C4430: missing type specifier - int assumed. Note:
C++ does not support default-int
2>CSGlib.cpp(45): error C2238: unexpected token(s) preceding ';'





--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Suggestion-How-to-output-a-unique-polyhedron-after-boolean-operation-tp4657807p4657820.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page