mirror of https://github.com/CGAL/cgal
Also disable WKT if gcc version is <4.5
This commit is contained in:
parent
3b1b6e2401
commit
743569f854
|
|
@ -6,7 +6,7 @@
|
||||||
#include <CGAL/Alpha_shape_2.h>
|
#include <CGAL/Alpha_shape_2.h>
|
||||||
#include <CGAL/Alpha_shape_face_base_2.h>
|
#include <CGAL/Alpha_shape_face_base_2.h>
|
||||||
#include <CGAL/Alpha_shape_vertex_base_2.h>
|
#include <CGAL/Alpha_shape_vertex_base_2.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
#include <CGAL/point_generators_2.h>
|
#include <CGAL/point_generators_2.h>
|
||||||
|
|
@ -252,7 +252,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wktk *.WKT);;"
|
"WKT files (*.wktk *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -273,7 +273,7 @@ MainWindow::open(QString fileName)
|
||||||
std::ifstream ifs(qPrintable(fileName));
|
std::ifstream ifs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::read_multi_point_WKT(ifs, points);
|
CGAL::read_multi_point_WKT(ifs, points);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <CGAL/Apollonius_graph_hierarchy_2.h>
|
#include <CGAL/Apollonius_graph_hierarchy_2.h>
|
||||||
#include <CGAL/Apollonius_graph_filtered_traits_2.h>
|
#include <CGAL/Apollonius_graph_filtered_traits_2.h>
|
||||||
#include <CGAL/point_generators_2.h>
|
#include <CGAL/point_generators_2.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -219,7 +219,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.wpts.cgal);;"
|
tr("CGAL files (*.wpts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -240,7 +240,7 @@ MainWindow::open(QString fileName)
|
||||||
std::vector<Apollonius_site_2> points;
|
std::vector<Apollonius_site_2> points;
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<K::Point_3> point_3_s;
|
std::vector<K::Point_3> point_3_s;
|
||||||
CGAL::read_multi_point_WKT(ifs, point_3_s);
|
CGAL::read_multi_point_WKT(ifs, point_3_s);
|
||||||
BOOST_FOREACH(const K::Point_3& point_3, point_3_s)
|
BOOST_FOREACH(const K::Point_3& point_3, point_3_s)
|
||||||
|
|
@ -269,7 +269,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".reg.cgal",
|
".reg.cgal",
|
||||||
tr("Weighted Points (*.wpts.cgal);;"
|
tr("Weighted Points (*.wpts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files(*.wkt *.WKT);;"
|
"WKT files(*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All (*)"));
|
"All (*)"));
|
||||||
|
|
@ -277,7 +277,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
std::ofstream ofs(qPrintable(fileName));
|
std::ofstream ofs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<K::Point_3> points;
|
std::vector<K::Point_3> points;
|
||||||
for(Apollonius::Sites_iterator
|
for(Apollonius::Sites_iterator
|
||||||
vit = ag.sites_begin(),
|
vit = ag.sites_begin(),
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
#include <CGAL/Polygon_2.h>
|
#include <CGAL/Polygon_2.h>
|
||||||
#include <CGAL/min_quadrilateral_2.h>
|
#include <CGAL/min_quadrilateral_2.h>
|
||||||
#include <CGAL/rectangular_p_center_2.h>
|
#include <CGAL/rectangular_p_center_2.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -477,7 +477,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.WKT *.wkt);;"
|
"WKT files (*.WKT *.wkt);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -495,7 +495,7 @@ MainWindow::open(QString fileName)
|
||||||
std::ifstream ifs(qPrintable(fileName));
|
std::ifstream ifs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::read_multi_point_WKT(ifs, points);
|
CGAL::read_multi_point_WKT(ifs, points);
|
||||||
BOOST_FOREACH(K::Point_2 p, points)
|
BOOST_FOREACH(K::Point_2 p, points)
|
||||||
{
|
{
|
||||||
|
|
@ -530,7 +530,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.WKT *.wkt);;"
|
"WKT files (*.WKT *.wkt);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -538,7 +538,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
std::ofstream ofs(qPrintable(fileName));
|
std::ofstream ofs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<K::Point_2> out_pts;
|
std::vector<K::Point_2> out_pts;
|
||||||
out_pts.reserve(std::distance(mc.points_begin(),
|
out_pts.reserve(std::distance(mc.points_begin(),
|
||||||
mc.points_end()));
|
mc.points_end()));
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#include <CGAL/intersections.h>
|
#include <CGAL/intersections.h>
|
||||||
#include <CGAL/Circular_kernel_2.h>
|
#include <CGAL/Circular_kernel_2.h>
|
||||||
#include <CGAL/Object.h>
|
#include <CGAL/Object.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -215,7 +215,7 @@ MainWindow::on_actionLoadLineAndCircularArcs_triggered()
|
||||||
tr("Open Line and Circular Arc File"),
|
tr("Open Line and Circular Arc File"),
|
||||||
".",
|
".",
|
||||||
tr("Edge files (*.arc)\n"
|
tr("Edge files (*.arc)\n"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT)\n"
|
"WKT files (*.wkt *.WKT)\n"
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
@ -235,7 +235,7 @@ MainWindow::open(QString fileName)
|
||||||
double x,y;
|
double x,y;
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
//read pairs as Line_arc_2 and triplets as circular_arc_2
|
//read pairs as Line_arc_2 and triplets as circular_arc_2
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
#include <QActionGroup>
|
#include <QActionGroup>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -282,7 +282,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -302,7 +302,7 @@ MainWindow::open(QString fileName)
|
||||||
std::ifstream ifs(qPrintable(fileName));
|
std::ifstream ifs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::read_multi_point_WKT(ifs, m_sites);
|
CGAL::read_multi_point_WKT(ifs, m_sites);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -329,14 +329,14 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
if(! fileName.isEmpty()) {
|
if(! fileName.isEmpty()) {
|
||||||
std::ofstream ofs(qPrintable(fileName));
|
std::ofstream ofs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive)){
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive)){
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::write_multi_point_WKT(ofs, m_sites);
|
CGAL::write_multi_point_WKT(ofs, m_sites);
|
||||||
#endif
|
#endif
|
||||||
}else
|
}else
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
|
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
|
||||||
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
|
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
|
||||||
#include <CGAL/point_generators_2.h>
|
#include <CGAL/point_generators_2.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -353,7 +353,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -374,7 +374,7 @@ MainWindow::open(QString fileName)
|
||||||
std::vector<Point_2> points;
|
std::vector<Point_2> points;
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::read_multi_point_WKT(ifs, points);
|
CGAL::read_multi_point_WKT(ifs, points);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -402,7 +402,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -410,7 +410,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
std::ofstream ofs(qPrintable(fileName));
|
std::ofstream ofs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<Point_2> points;
|
std::vector<Point_2> points;
|
||||||
points.reserve(std::distance(triang.unique_vertices_begin(),
|
points.reserve(std::distance(triang.unique_vertices_begin(),
|
||||||
triang.unique_vertices_end()));
|
triang.unique_vertices_end()));
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#include <CGAL/linear_least_squares_fitting_2.h>
|
#include <CGAL/linear_least_squares_fitting_2.h>
|
||||||
#include <CGAL/extremal_polygon_2.h>
|
#include <CGAL/extremal_polygon_2.h>
|
||||||
#include <CGAL/minkowski_sum_2.h>
|
#include <CGAL/minkowski_sum_2.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -232,7 +232,7 @@ MainWindow::on_actionLoadPolygon_triggered()
|
||||||
".",
|
".",
|
||||||
tr( "Polyline files (*.polygons.cgal);;"
|
tr( "Polyline files (*.polygons.cgal);;"
|
||||||
"WSL files (*.wsl);;"
|
"WSL files (*.wsl);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All file (*)"));
|
"All file (*)"));
|
||||||
|
|
@ -249,7 +249,7 @@ MainWindow::open(QString fileName)
|
||||||
poly.clear();
|
poly.clear();
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::Polygon_with_holes_2<K> P;
|
CGAL::Polygon_with_holes_2<K> P;
|
||||||
CGAL::read_polygon_WKT(ifs, P);
|
CGAL::read_polygon_WKT(ifs, P);
|
||||||
poly = Polygon2(P.outer_boundary().begin(),
|
poly = Polygon2(P.outer_boundary().begin(),
|
||||||
|
|
@ -274,7 +274,7 @@ MainWindow::on_actionSavePolygon_triggered()
|
||||||
tr("Save Polygon"),
|
tr("Save Polygon"),
|
||||||
".",
|
".",
|
||||||
tr( "Polyline files (*.polygons.cgal);;"
|
tr( "Polyline files (*.polygons.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All file (*)"));
|
"All file (*)"));
|
||||||
|
|
@ -282,7 +282,7 @@ MainWindow::on_actionSavePolygon_triggered()
|
||||||
std::ofstream ofs(qPrintable(fileName));
|
std::ofstream ofs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::Polygon_2<K> P(poly.begin(),
|
CGAL::Polygon_2<K> P(poly.begin(),
|
||||||
poly.end());
|
poly.end());
|
||||||
CGAL::Polygon_with_holes_2<K> Pwh(P);
|
CGAL::Polygon_with_holes_2<K> Pwh(P);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
|
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
|
||||||
#include <CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h>
|
#include <CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h>
|
||||||
#include <CGAL/Constraints_loader.h>
|
#include <CGAL/Constraints_loader.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
//#include <CGAL/Qt/Converter.h>
|
//#include <CGAL/Qt/Converter.h>
|
||||||
|
|
@ -247,7 +247,7 @@ MainWindow::open(QString fileName)
|
||||||
loadEdgConstraints(fileName);
|
loadEdgConstraints(fileName);
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
} else if(fileName.endsWith(".wkt", Qt::CaseInsensitive)){
|
} else if(fileName.endsWith(".wkt", Qt::CaseInsensitive)){
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
loadWKTConstraints(fileName);
|
loadWKTConstraints(fileName);
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -263,7 +263,7 @@ MainWindow::on_actionLoadSegments_triggered()
|
||||||
".",
|
".",
|
||||||
tr("Edge files (*.edg);;"
|
tr("Edge files (*.edg);;"
|
||||||
"Polyline files (*.polygons.cgal);;"
|
"Polyline files (*.polygons.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT)"
|
"WKT files (*.wkt *.WKT)"
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
@ -341,12 +341,12 @@ MainWindow::loadEdgConstraints(QString fileName)
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::loadWKTConstraints(QString
|
MainWindow::loadWKTConstraints(QString
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
fileName
|
fileName
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
typedef CGAL::Polygon_with_holes_2<K> Polygon;
|
typedef CGAL::Polygon_with_holes_2<K> Polygon;
|
||||||
typedef std::vector<K::Point_2> LineString;
|
typedef std::vector<K::Point_2> LineString;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
|
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
|
||||||
#include <CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h>
|
#include <CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h>
|
||||||
#include <CGAL/Constraints_loader.h>
|
#include <CGAL/Constraints_loader.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
//#include <CGAL/Qt/Converter.h>
|
//#include <CGAL/Qt/Converter.h>
|
||||||
|
|
@ -271,7 +271,7 @@ MainWindow::open(QString fileName)
|
||||||
loadSitesInput(fileName);
|
loadSitesInput(fileName);
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
} else if(fileName.endsWith(".wkt", Qt::CaseInsensitive)){
|
} else if(fileName.endsWith(".wkt", Qt::CaseInsensitive)){
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
loadWKT(fileName);
|
loadWKT(fileName);
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -292,7 +292,7 @@ MainWindow::on_actionLoadSegments_triggered()
|
||||||
"Pts files (*.pts);;"
|
"Pts files (*.pts);;"
|
||||||
"Edge files (*.edg);;"
|
"Edge files (*.edg);;"
|
||||||
"Polylines files (*.polygons.cgal);;"
|
"Polylines files (*.polygons.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.WKT *.wkt)"
|
"WKT files (*.WKT *.wkt)"
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
@ -390,12 +390,12 @@ MainWindow::loadPoints(QString fileName)
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::loadWKT(QString
|
MainWindow::loadWKT(QString
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
fileName
|
fileName
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::ifstream ifs(qPrintable(fileName));
|
std::ifstream ifs(qPrintable(fileName));
|
||||||
//Points
|
//Points
|
||||||
do
|
do
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#include <CGAL/Qt/SegmentsGraphicsItem.h>
|
#include <CGAL/Qt/SegmentsGraphicsItem.h>
|
||||||
#include <CGAL/Qt/PolylinesGraphicsItem.h>
|
#include <CGAL/Qt/PolylinesGraphicsItem.h>
|
||||||
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
|
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -250,7 +250,7 @@ MainWindow::on_actionLoadSegments_triggered()
|
||||||
tr("Open segment file"),
|
tr("Open segment file"),
|
||||||
".",
|
".",
|
||||||
tr("Edge files (*.edg);;"
|
tr("Edge files (*.edg);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -268,7 +268,7 @@ MainWindow::open(QString fileName)
|
||||||
std::ifstream ifs(qPrintable(fileName));
|
std::ifstream ifs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<std::vector<Point_2> > mls;
|
std::vector<std::vector<Point_2> > mls;
|
||||||
CGAL::read_multi_linestring_WKT(ifs, mls);
|
CGAL::read_multi_linestring_WKT(ifs, mls);
|
||||||
BOOST_FOREACH(const std::vector<Point_2>& ls, mls)
|
BOOST_FOREACH(const std::vector<Point_2>& ls, mls)
|
||||||
|
|
@ -302,7 +302,7 @@ MainWindow::on_actionSaveSegments_triggered()
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".",
|
".",
|
||||||
tr("Edge files (*.edg);;"
|
tr("Edge files (*.edg);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -311,7 +311,7 @@ MainWindow::on_actionSaveSegments_triggered()
|
||||||
ofs.precision(12);
|
ofs.precision(12);
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<std::vector<Point_2> >mls;
|
std::vector<std::vector<Point_2> >mls;
|
||||||
BOOST_FOREACH(const Segment_2& seg, input)
|
BOOST_FOREACH(const Segment_2& seg, input)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
// GraphicsView items and event filters (input classes)
|
// GraphicsView items and event filters (input classes)
|
||||||
#include <CGAL/Qt/PointsInKdTreeGraphicsItem.h>
|
#include <CGAL/Qt/PointsInKdTreeGraphicsItem.h>
|
||||||
#include <CGAL/Qt/utility.h>
|
#include <CGAL/Qt/utility.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -247,7 +247,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -269,7 +269,7 @@ MainWindow::open(QString fileName)
|
||||||
std::vector<K::Point_2> points;
|
std::vector<K::Point_2> points;
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::read_multi_point_WKT(ifs, points);
|
CGAL::read_multi_point_WKT(ifs, points);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
// for viewportsBbox
|
// for viewportsBbox
|
||||||
#include <CGAL/Qt/utility.h>
|
#include <CGAL/Qt/utility.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
// the two base classes
|
// the two base classes
|
||||||
|
|
@ -166,12 +166,12 @@ MainWindow::generate()
|
||||||
void
|
void
|
||||||
MainWindow::on_actionLoadPoints_triggered()
|
MainWindow::on_actionLoadPoints_triggered()
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#endif
|
#endif
|
||||||
QString fileName = QFileDialog::getOpenFileName(this,
|
QString fileName = QFileDialog::getOpenFileName(this,
|
||||||
tr("Open grid file"),
|
tr("Open grid file"),
|
||||||
"."
|
"."
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
,tr("WKT files (*.wkt *.WKT)")
|
,tr("WKT files (*.wkt *.WKT)")
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
@ -193,7 +193,7 @@ MainWindow::open(QString fileName)
|
||||||
iXSize = iYSize = 512;
|
iXSize = iYSize = 512;
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<std::vector<Point_2> > mp;
|
std::vector<std::vector<Point_2> > mp;
|
||||||
int size= -1;
|
int size= -1;
|
||||||
do
|
do
|
||||||
|
|
@ -247,7 +247,7 @@ MainWindow::open(QString fileName)
|
||||||
void
|
void
|
||||||
MainWindow::on_actionSavePoints_triggered()
|
MainWindow::on_actionSavePoints_triggered()
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
QString fileName = QFileDialog::getSaveFileName(this,
|
QString fileName = QFileDialog::getSaveFileName(this,
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".",
|
".",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <CGAL/Random.h>
|
#include <CGAL/Random.h>
|
||||||
#include <CGAL/point_generators_2.h>
|
#include <CGAL/point_generators_2.h>
|
||||||
#include <CGAL/Timer.h>
|
#include <CGAL/Timer.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -525,7 +525,7 @@ MainWindow::open(QString fileName)
|
||||||
} else if(fileName.endsWith(".poly")){
|
} else if(fileName.endsWith(".poly")){
|
||||||
loadPolyConstraints(fileName);
|
loadPolyConstraints(fileName);
|
||||||
} else if(fileName.endsWith(".wkt")){
|
} else if(fileName.endsWith(".wkt")){
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
loadWKT(fileName);
|
loadWKT(fileName);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -545,7 +545,7 @@ MainWindow::on_actionLoadConstraints_triggered()
|
||||||
"Polyline files (*.polygons.cgal);;"
|
"Polyline files (*.polygons.cgal);;"
|
||||||
"Poly files (*.poly);;"
|
"Poly files (*.poly);;"
|
||||||
"CGAL files (*.cpts.cgal);;"
|
"CGAL files (*.cpts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.WKT *.wkt);;"
|
"WKT files (*.WKT *.wkt);;"
|
||||||
#endif
|
#endif
|
||||||
"All (*)"));
|
"All (*)"));
|
||||||
|
|
@ -554,12 +554,12 @@ MainWindow::on_actionLoadConstraints_triggered()
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::loadWKT(QString
|
MainWindow::loadWKT(QString
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
filename
|
filename
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
//Polygons todo : make it multipolygons
|
//Polygons todo : make it multipolygons
|
||||||
std::ifstream ifs(qPrintable(filename));
|
std::ifstream ifs(qPrintable(filename));
|
||||||
do
|
do
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include "TriangulationPointInputAndConflictZone.h"
|
#include "TriangulationPointInputAndConflictZone.h"
|
||||||
#include <CGAL/Qt/TriangulationGraphicsItem.h>
|
#include <CGAL/Qt/TriangulationGraphicsItem.h>
|
||||||
#include <CGAL/Qt/VoronoiGraphicsItem.h>
|
#include <CGAL/Qt/VoronoiGraphicsItem.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -320,7 +320,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.WKT *.wkt);;"
|
"WKT files (*.WKT *.wkt);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -341,7 +341,7 @@ MainWindow::open(QString fileName)
|
||||||
std::vector<K::Point_2> points;
|
std::vector<K::Point_2> points;
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
CGAL::read_multi_point_WKT(ifs, points);
|
CGAL::read_multi_point_WKT(ifs, points);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -368,7 +368,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".",
|
".",
|
||||||
tr("CGAL files (*.pts.cgal);;"
|
tr("CGAL files (*.pts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.WKT *.wkt);;"
|
"WKT files (*.WKT *.wkt);;"
|
||||||
#endif
|
#endif
|
||||||
"All files (*)"));
|
"All files (*)"));
|
||||||
|
|
@ -376,7 +376,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
std::ofstream ofs(qPrintable(fileName));
|
std::ofstream ofs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<K::Point_2> points;
|
std::vector<K::Point_2> points;
|
||||||
points.reserve(dt.number_of_vertices());
|
points.reserve(dt.number_of_vertices());
|
||||||
for(Delaunay::Finite_vertices_iterator
|
for(Delaunay::Finite_vertices_iterator
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
// CGAL headers
|
// CGAL headers
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Regular_triangulation_2.h>
|
#include <CGAL/Regular_triangulation_2.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -245,7 +245,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
tr("Open Points file"),
|
tr("Open Points file"),
|
||||||
".",
|
".",
|
||||||
tr("Weighted Points (*.wpts.cgal);;"
|
tr("Weighted Points (*.wpts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All (*)"));
|
"All (*)"));
|
||||||
|
|
@ -255,7 +255,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
std::vector<Weighted_point_2> points;
|
std::vector<Weighted_point_2> points;
|
||||||
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<K::Point_3> points_3;
|
std::vector<K::Point_3> points_3;
|
||||||
CGAL::read_multi_point_WKT(ifs, points_3);
|
CGAL::read_multi_point_WKT(ifs, points_3);
|
||||||
BOOST_FOREACH(const K::Point_3& p, points_3)
|
BOOST_FOREACH(const K::Point_3& p, points_3)
|
||||||
|
|
@ -286,7 +286,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
tr("Save points"),
|
tr("Save points"),
|
||||||
".reg.cgal",
|
".reg.cgal",
|
||||||
tr("Weighted Points (*.wpts.cgal);;"
|
tr("Weighted Points (*.wpts.cgal);;"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
"WKT files (*.wkt *.WKT);;"
|
"WKT files (*.wkt *.WKT);;"
|
||||||
#endif
|
#endif
|
||||||
"All (*)"));
|
"All (*)"));
|
||||||
|
|
@ -294,7 +294,7 @@ MainWindow::on_actionSavePoints_triggered()
|
||||||
std::ofstream ofs(qPrintable(fileName));
|
std::ofstream ofs(qPrintable(fileName));
|
||||||
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
if(fileName.endsWith(".wkt",Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::vector<K::Point_3> points_3;
|
std::vector<K::Point_3> points_3;
|
||||||
for(Regular::Finite_vertices_iterator
|
for(Regular::Finite_vertices_iterator
|
||||||
vit = dt.finite_vertices_begin(),
|
vit = dt.finite_vertices_begin(),
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#include <CGAL/assertions_behaviour.h>
|
#include <CGAL/assertions_behaviour.h>
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Timer.h>
|
#include <CGAL/Timer.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -343,7 +343,7 @@ MainWindow::open(QString fileName)
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
}
|
}
|
||||||
else if(fileName.endsWith(".wkt")){
|
else if(fileName.endsWith(".wkt")){
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
loadWKT(fileName);
|
loadWKT(fileName);
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -357,7 +357,7 @@ MainWindow::on_actionLoadConstraints_triggered()
|
||||||
QString fileName = QFileDialog::getOpenFileName(this,
|
QString fileName = QFileDialog::getOpenFileName(this,
|
||||||
tr("Open Constraint File"),
|
tr("Open Constraint File"),
|
||||||
"../data"
|
"../data"
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
,tr("Polylines (*.osm *.wkt);;")
|
,tr("Polylines (*.osm *.wkt);;")
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
@ -377,12 +377,12 @@ std::string trim_right ( std::string str )
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::loadWKT(QString
|
void MainWindow::loadWKT(QString
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
fileName
|
fileName
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
typedef std::vector<Point_2> MultiPoint;
|
typedef std::vector<Point_2> MultiPoint;
|
||||||
|
|
||||||
typedef std::vector<Point_2> LineString;
|
typedef std::vector<Point_2> LineString;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||||
#include <CGAL/Constrained_triangulation_plus_2.h>
|
#include <CGAL/Constrained_triangulation_plus_2.h>
|
||||||
#include <CGAL/Polyline_simplification_2/simplify.h>
|
#include <CGAL/Polyline_simplification_2/simplify.h>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ void print(const CT& ct, Constraint_id cid)
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
|
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
const bool remove_points = false;
|
const bool remove_points = false;
|
||||||
CT ct;
|
CT ct;
|
||||||
Polygon_with_holes_2 P;
|
Polygon_with_holes_2 P;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
|
@ -17,7 +17,7 @@ typedef PS::Squared_distance_cost Cost;
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
|
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
|
||||||
Polygon_with_holes_2 polygon;
|
Polygon_with_holes_2 polygon;
|
||||||
CGAL::read_polygon_WKT(ifs, polygon);
|
CGAL::read_polygon_WKT(ifs, polygon);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
|
@ -17,7 +17,7 @@ typedef PS::Squared_distance_cost Cost;
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
Polyline_2 polyline;
|
Polyline_2 polyline;
|
||||||
std::ifstream ifs( (argc==1)?"data/polyline.wkt":argv[1]);
|
std::ifstream ifs( (argc==1)?"data/polyline.wkt":argv[1]);
|
||||||
CGAL::read_linestring_WKT(ifs, polyline);
|
CGAL::read_linestring_WKT(ifs, polyline);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#include <CGAL/Polygon_2.h>
|
#include <CGAL/Polygon_2.h>
|
||||||
#include <CGAL/Polygon_with_holes_2.h>
|
#include <CGAL/Polygon_with_holes_2.h>
|
||||||
|
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
//
|
//
|
||||||
// Author(s) : Maxime Gimeno
|
// Author(s) : Maxime Gimeno
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
|
|
||||||
#ifndef CGAL_IO_TRAITS_LINESTRING_H
|
#ifndef CGAL_IO_TRAITS_LINESTRING_H
|
||||||
#define CGAL_IO_TRAITS_LINESTRING_H
|
#define CGAL_IO_TRAITS_LINESTRING_H
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifndef CGAL_IO_TRAITS_MULTILINESTRING_H
|
#ifndef CGAL_IO_TRAITS_MULTILINESTRING_H
|
||||||
#define CGAL_IO_TRAITS_MULTILINESTRING_H
|
#define CGAL_IO_TRAITS_MULTILINESTRING_H
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/internal/Geometry_container.h>
|
#include <CGAL/internal/Geometry_container.h>
|
||||||
#include <boost/geometry/io/wkt/write.hpp>
|
#include <boost/geometry/io/wkt/write.hpp>
|
||||||
#include <boost/geometry/io/wkt/read.hpp>
|
#include <boost/geometry/io/wkt/read.hpp>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifndef CGAL_IO_TRAITS_MULTIPOINT_H
|
#ifndef CGAL_IO_TRAITS_MULTIPOINT_H
|
||||||
#define CGAL_IO_TRAITS_MULTIPOINT_H
|
#define CGAL_IO_TRAITS_MULTIPOINT_H
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/internal/Geometry_container.h>
|
#include <CGAL/internal/Geometry_container.h>
|
||||||
#include <boost/geometry/io/wkt/write.hpp>
|
#include <boost/geometry/io/wkt/write.hpp>
|
||||||
#include <boost/geometry/io/wkt/read.hpp>
|
#include <boost/geometry/io/wkt/read.hpp>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifndef CGAL_IO_TRAITS_MULTIPOLYGON_H
|
#ifndef CGAL_IO_TRAITS_MULTIPOLYGON_H
|
||||||
#define CGAL_IO_TRAITS_MULTIPOLYGON_H
|
#define CGAL_IO_TRAITS_MULTIPOLYGON_H
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/internal/Geometry_container.h>
|
#include <CGAL/internal/Geometry_container.h>
|
||||||
#include <boost/geometry/io/wkt/write.hpp>
|
#include <boost/geometry/io/wkt/write.hpp>
|
||||||
#include <boost/geometry/io/wkt/read.hpp>
|
#include <boost/geometry/io/wkt/read.hpp>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifndef CGAL_IO_TRAITS_POINT_H
|
#ifndef CGAL_IO_TRAITS_POINT_H
|
||||||
#define CGAL_IO_TRAITS_POINT_H
|
#define CGAL_IO_TRAITS_POINT_H
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
#include <boost/geometry/io/wkt/write.hpp>
|
#include <boost/geometry/io/wkt/write.hpp>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifndef CGAL_IO_TRAITS_POINT_3_H
|
#ifndef CGAL_IO_TRAITS_POINT_3_H
|
||||||
#define CGAL_IO_TRAITS_POINT_3_H
|
#define CGAL_IO_TRAITS_POINT_3_H
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Point_3.h>
|
#include <CGAL/Point_3.h>
|
||||||
#include <boost/geometry/io/wkt/write.hpp>
|
#include <boost/geometry/io/wkt/write.hpp>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifndef CGAL_IO_TRAITS_POLYGON_H
|
#ifndef CGAL_IO_TRAITS_POLYGON_H
|
||||||
#define CGAL_IO_TRAITS_POLYGON_H
|
#define CGAL_IO_TRAITS_POLYGON_H
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/Polygon_2.h>
|
#include <CGAL/Polygon_2.h>
|
||||||
#include <CGAL/Polygon_with_holes_2.h>
|
#include <CGAL/Polygon_with_holes_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifndef GEOMETRY_CONTAINER_H
|
#ifndef GEOMETRY_CONTAINER_H
|
||||||
#define GEOMETRY_CONTAINER_H
|
#define GEOMETRY_CONTAINER_H
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <boost/geometry/io/wkt/write.hpp>
|
#include <boost/geometry/io/wkt/write.hpp>
|
||||||
#include <boost/geometry/io/wkt/read.hpp>
|
#include <boost/geometry/io/wkt/read.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <CGAL/IO/WKT.h>
|
#include <CGAL/IO/WKT.h>
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#if BOOST_VERSION >= 105600
|
#if BOOST_VERSION >= 105600 || BOOST_GCC < 40500
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue