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