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