Skip to content

Commit 75e465b

Browse files
committed
remove weird if from polygonal surface reconstruction
1 parent 79a0c5c commit 75e465b

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/polygonal_surface_reconstruction.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,7 @@
55
#include <CGAL/Surface_mesh.h>
66
#include <CGAL/Shape_detection/Efficient_RANSAC.h>
77
#include <CGAL/Polygonal_surface_reconstruction.h>
8-
9-
#define CGAL_USE_SCIP
10-
#ifdef CGAL_USE_SCIP
118
#include <CGAL/SCIP_mixed_integer_program_traits.h>
12-
typedef CGAL::SCIP_mixed_integer_program_traits<double> MIP_Solver;
13-
#elif defined(CGAL_USE_GLPK)
14-
#include <CGAL/GLPK_mixed_integer_program_traits.h>
15-
typedef CGAL::GLPK_mixed_integer_program_traits<double> MIP_Solver;
16-
#endif
17-
18-
#if defined(CGAL_USE_GLPK) || defined(CGAL_USE_SCIP)
199
#include <CGAL/Timer.h>
2010
#include <fstream>
2111

@@ -32,6 +22,8 @@ typedef CGAL::Shape_detection::Point_to_shape_index_map<Traits> Point_to_shape_i
3222
typedef CGAL::Polygonal_surface_reconstruction<compas::Kernel> Polygonal_surface_reconstruction;
3323
typedef CGAL::Surface_mesh<compas::Point> Surface_mesh;
3424

25+
typedef CGAL::SCIP_mixed_integer_program_traits<double> MIP_Solver;
26+
3527
// Function for polygonal surface reconstruction using RANSAC
3628
std::tuple<compas::RowMatrixXd, std::vector<std::vector<int>>>
3729
polygonal_surface_reconstruction_ransac(
@@ -44,8 +36,7 @@ polygonal_surface_reconstruction_ransac(
4436

4537
for (int i = 0; i < p; i++)
4638
{
47-
points.push_back(boost::tuple<compas::Point, compas::Vector, int>(compas::Point(P.row(i)[0], P.row(i)[1], P.row(i)[2]),
48-
compas::Vector(N.row(i)[0], N.row(i)[1], N.row(i)[2]), -1));
39+
points.push_back(boost::tuple<compas::Point, compas::Vector, int>(compas::Point(P.row(i)[0], P.row(i)[1], P.row(i)[2]), compas::Vector(N.row(i)[0], N.row(i)[1], N.row(i)[2]), -1));
4940
}
5041

5142
std::cout << "Done. " << points.size() << " points loaded." << std::endl;
@@ -135,4 +126,3 @@ void init_polygonal_surface_reconstruction(pybind11::module &m)
135126
pybind11::arg("P").noconvert(),
136127
pybind11::arg("N").noconvert());
137128
};
138-
#endif // defined(CGAL_USE_GLPK) || defined(CGAL_USE_SCIP)

0 commit comments

Comments
 (0)