Skip to content

Commit

Permalink
weird if
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Oct 29, 2024
1 parent aa8e893 commit 0ad2c07
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/polygonal_surface_reconstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
#include <CGAL/Surface_mesh.h>
#include <CGAL/Shape_detection/Efficient_RANSAC.h>
#include <CGAL/Polygonal_surface_reconstruction.h>

#define CGAL_USE_SCIP

#include <CGAL/SCIP_mixed_integer_program_traits.h>
typedef CGAL::SCIP_mixed_integer_program_traits<double> MIP_Solver;

#include <CGAL/Timer.h>
#include <fstream>

Expand All @@ -22,8 +27,6 @@ typedef CGAL::Shape_detection::Point_to_shape_index_map<Traits> Point_to_shape_i
typedef CGAL::Polygonal_surface_reconstruction<compas::Kernel> Polygonal_surface_reconstruction;
typedef CGAL::Surface_mesh<compas::Point> Surface_mesh;

typedef CGAL::SCIP_mixed_integer_program_traits<double> MIP_Solver;

// Function for polygonal surface reconstruction using RANSAC
std::tuple<compas::RowMatrixXd, std::vector<std::vector<int>>>
polygonal_surface_reconstruction_ransac(
Expand All @@ -36,7 +39,8 @@ polygonal_surface_reconstruction_ransac(

for (int i = 0; i < p; i++)
{
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));
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));
}

std::cout << "Done. " << points.size() << " points loaded." << std::endl;
Expand Down

0 comments on commit 0ad2c07

Please sign in to comment.