00001 #include "poly_cut.h"
00002 #include "Hexahedron_3.h"
00003 #include "hexa_poly_intersect.h"
00004
00005 #include <list>
00006 #include <string>
00007
00008
00009
00010 typedef CGAL::Point_3<Exact_rep> ExactPoint;
00011 typedef Polyhedron::Point Point;
00012 typedef CGAL::Plane_3<Exact_rep> Plane;
00013 typedef Polyhedron::Facet Facet;
00014 typedef Polyhedron::Halfedge Halfedge;
00015
00016
00017 int main()
00018 {
00019 CGAL::set_pretty_mode( cout );
00020
00021 Point a(16.5017, 53.2673, 36.8459);
00022 Point b(18.1625, 63.7217, 20.7484);
00023 Point c(1.33142, 50.8225, 22.3321);
00024
00025 Polyhedron poly;
00026 poly.make_triangle(a,b,c);
00027 Facet& facet = *(poly.facets_begin());
00028
00029 cout << "Polyhedron (before): " << endl
00030 << poly << endl;
00031
00032 Hexahedron_3 hexa( Point(12,20,0),
00033 Point(13,20,0),
00034 Point(13,300,0),
00035 Point(12,300,0),
00036 Point(12,20,50),
00037 Point(12,300,50),
00038 Point(13,20,50),
00039 Point(13,300,50) );
00040
00041 slice_poly_with_hexa( poly, facet, hexa );
00042
00043 cout << "Polyhedron (after): " << endl
00044 << poly << endl;
00045
00046 Polyhedron::Facet_const_iterator f_iter = poly.facets_begin();
00047 while ( f_iter != poly.facets_end() ) {
00048 cout << "Facet inside hexa: " << is_inside( *f_iter, hexa ) << endl;
00049 ++f_iter;
00050 }
00051
00052 return 0;
00053 }
00054
00055
00056 #ifdef _CORE_H
00057 void switchon()
00058 {
00059 CORE::Expr e(3.3);
00060 e.approx();
00061 }
00062 #endif