diff --git a/Packages/Arrangement/examples/Sweep_line/example1.C b/Packages/Arrangement/examples/Sweep_line/example1.C deleted file mode 100644 index 81e61fcbb37..00000000000 --- a/Packages/Arrangement/examples/Sweep_line/example1.C +++ /dev/null @@ -1,71 +0,0 @@ -// examples/Sweep_line/example1.C -// ------------------------------ -#include -#include - -#include -#include - -#include - -#include - -#include - -#include -#include - -//uncomment if you have LEDA installed. -//#include -//#include //used for visualization. - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian R; - -typedef CGAL::Arr_segment_exact_traits Traits; - -typedef Traits::Point Point; -typedef Traits::X_curve X_curve; -typedef Traits::Curve Curve; - -typedef CGAL::Pm_default_dcel Dcel; -typedef CGAL::Planar_map_2 PM; -typedef CGAL::Pm_file_writer Pm_writer; - -using std::cout; -using std::cin; -using std::endl; -using std::vector; - -int main() -{ - PM pm; - int num_segments; - vector segments; - - cout << " * * * Demonstrating a trivial use of the sweep line algorithm" << endl <> num_segments; - - NT x1, y1, x2, y2; - - while (num_segments--) { - cin >> x1 >> y1 >> x2 >> y2; - - segments.push_back(Curve(Point(x1,y1), Point(x2,y2))); - } - - CGAL::sweep_to_construct_planar_map(segments.begin(),segments.end(), pm); - - cout << " * * * Printing list of all halfedges of the resulting Planar map" << endl; - Pm_writer verbose_writer(cout, pm, true); - verbose_writer.write_halfedges(pm.halfedges_begin(), pm.halfedges_end()); - - //CGAL::Window_stream W(700, 700); - //W.init(-10, 10, -10); - //W.set_mode(leda_src_mode); - //W.set_node_width(3); - //W.display(); - //W << pm; -} - diff --git a/Packages/Arrangement/examples/Sweep_line/example1.cin b/Packages/Arrangement/examples/Sweep_line/example1.cin deleted file mode 100644 index 20678dc2b2f..00000000000 --- a/Packages/Arrangement/examples/Sweep_line/example1.cin +++ /dev/null @@ -1,5 +0,0 @@ -4 -0 0 1 1 -0 1 1 0 -0 0 1 0 -0 1 1 1 \ No newline at end of file diff --git a/Packages/Arrangement/examples/Sweep_line/example1.cout b/Packages/Arrangement/examples/Sweep_line/example1.cout deleted file mode 100644 index 7574ee2ec1d..00000000000 --- a/Packages/Arrangement/examples/Sweep_line/example1.cout +++ /dev/null @@ -1,27 +0,0 @@ - * * * Demonstrating a trivial use of the sweep line algorithm - - * * * Printing list of all halfedges of the resulting Planar map --1/-2 -1/-2 -0/1 1/1 -1/-2 -1/-2 -0/1 1/1 -0/1 1/1 -1/-2 -1/-2 --1/-2 -1/-2 -0/1 0/1 -1/-2 -1/-2 -0/1 0/1 -0/1 0/1 -1/-2 -1/-2 --1/-2 -1/-2 --1/-2 -1/-2 1/1 0/1 -1/1 0/1 --1/-2 -1/-2 1/1 0/1 -0/1 0/1 -0/1 0/1 1/1 0/1 -1/1 0/1 -0/1 0/1 1/1 0/1 -0/1 1/1 -0/1 1/1 1/1 1/1 -1/1 1/1 -0/1 1/1 1/1 1/1 --1/-2 -1/-2 --1/-2 -1/-2 1/1 1/1 -1/1 1/1 --1/-2 -1/-2 1/1 1/1 diff --git a/Packages/Arrangement/examples/Sweep_line/example2.C b/Packages/Arrangement/examples/Sweep_line/example2.C deleted file mode 100644 index 7287fc4fd5b..00000000000 --- a/Packages/Arrangement/examples/Sweep_line/example2.C +++ /dev/null @@ -1,123 +0,0 @@ -// examples/Sweep_line/example2.C -// ------------------------------ -#include -#include - -#include -#include - -#include - -#include - -#include - -#include -#include - -//uncomment if you have LEDA installed. -//#ifndef CGAL_IO_PM_WINDOW_STREAM_H -//#include -//#endif -//#ifndef CGAL_ARR_POLYLINE_TRAITS_WINDOW_STREAM_H -//#include -//#endif -//#include //used for visualization. - -using namespace CGAL; - - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian R; -typedef CGAL::Arr_polyline_traits Traits; - -typedef Traits::Point Point; -typedef Traits::X_curve X_curve; -typedef Traits::Curve Curve; - -typedef CGAL::Pm_default_dcel Dcel; -typedef CGAL::Planar_map_2 PM; -typedef CGAL::Pm_file_writer Pm_writer; - - -CGAL_BEGIN_NAMESPACE - -std::ostream& operator<<(std::ostream& os, - const Curve& cv) -{ - typedef Curve::const_iterator Points_iterator; - - os<>(std::istream& in, - Curve& cv) -{ - std::size_t size; - - in >> size; - - for (unsigned int i = 0; i < size; i++){ - Point p; - - in >> p; - - cv.push_back(p); - } - - return in; -} - -CGAL_END_NAMESPACE - -template -void read_polylines(Container& curves) -{ - int num_polylines = 0; - - std::cin >> num_polylines; - std::cout << "number of polylines is : " << num_polylines << std::endl; - - while (num_polylines--) { - Curve polyline; - - std::cin>>polyline; - curves.push_back(polyline); - } -} - -int main() -{ - PM pm; - std::vector polylines; - - read_polylines(polylines); - - CGAL::sweep_to_construct_planar_map(polylines.begin(),polylines.end(), pm); - - std::cout << " * * * Printing list of all halfedges of the resulting Planar map" << std::endl; - - Pm_writer verbose_writer(std::cout, pm, true); - - verbose_writer.write_halfedges(pm.halfedges_begin(), pm.halfedges_end()); - - - //CGAL::Window_stream W(700, 700); - //W.init(-10, 10, -10); - //W.set_mode(leda_src_mode); - //W.set_node_width(3); - //W.button("finish",2); - //W.display(); - //W << pm; -} - - - - - diff --git a/Packages/Arrangement/examples/Sweep_line/example2.cin b/Packages/Arrangement/examples/Sweep_line/example2.cin deleted file mode 100755 index f1f99fbb62d..00000000000 --- a/Packages/Arrangement/examples/Sweep_line/example2.cin +++ /dev/null @@ -1,7 +0,0 @@ -3 -4 -0 100 70 140 140 100 0 100 -4 -40 0 40 60 60 60 60 0 -5 -20 0 20 100 120 100 120 0 20 0 diff --git a/Packages/Arrangement/examples/Sweep_line/example3.C b/Packages/Arrangement/examples/Sweep_line/example3.C deleted file mode 100644 index 946e11dc249..00000000000 --- a/Packages/Arrangement/examples/Sweep_line/example3.C +++ /dev/null @@ -1,54 +0,0 @@ -// examples/Sweep_line/example3.C -// ------------------------------ -#include -#include - -#include -#include - -#include -#include - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian R; - -typedef CGAL::Arr_segment_exact_traits Traits; - -typedef Traits::Point Point; -typedef Traits::X_curve X_curve; -typedef Traits::Curve Curve; - - -using namespace std; - - -int main() -{ - int num_segments; - list segments; - - cin >> num_segments; - - NT x1, y1, x2, y2; - - while (num_segments--) { - cin >> x1 >> y1 >> x2 >> y2; - - segments.push_back(Curve(Point(x1,y1), Point(x2,y2))); - } - - Traits traits; - list subcurves; - CGAL::sweep_to_produce_planar_map_subcurves(segments.begin(), - segments.end(), - traits, - subcurves); - - cout<<"The number of disjoint interior sub segments is "<< subcurves.size(); - cout<::iterator scv_iter = subcurves.begin(); - scv_iter != subcurves.end(); - scv_iter++) - cout<<*scv_iter< -#include - -#include -#include - -#include - -#include -//#include - -#include -#include - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian R; -typedef CGAL::Arr_polyline_traits Traits; - -typedef Traits::Point Point; -typedef Traits::X_curve X_curve; -typedef Traits::Curve Curve; - -using namespace CGAL; - - -CGAL_BEGIN_NAMESPACE - -std::ostream& operator<<(std::ostream& os, - const Curve& cv) -{ - typedef Curve::const_iterator Points_iterator; - - os<>(std::istream& in, - Curve& cv) -{ - std::size_t size; - - in >> size; - - for (unsigned int i = 0; i < size; i++){ - Point p; - - in >> p; - - cv.push_back(p); - } - - return in; -} - -CGAL_END_NAMESPACE - - -template -void read_polylines(Container& curves) -{ - int num_polylines = 0; - - std::cin >> num_polylines; - std::cout<<"number of polylines is : " << num_polylines<>polyline; - - curves.push_back(polyline); - - polyline.clear(); - } -} - -int main() -{ - std::list polylines; - - read_polylines(polylines); - - Traits traits; - std::list subcurves; - CGAL::sweep_to_produce_planar_map_subcurves(polylines.begin(),polylines.end(), traits, subcurves); - - for (std::list::iterator scv_iter = subcurves.begin(); scv_iter != subcurves.end(); scv_iter++) - std::cout<<*scv_iter<