CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.66k stars 1.35k forks source link

Efficient-RANSAC compilation errors #8290

Closed cejutue closed 9 hours ago

cejutue commented 1 week ago

File "cgal/Shape_detection/include/CGAL/Shape_detection/Efficient-RANSAC/Octree. h"

/The 46 to 48 industries should be deleted because the Shape_detection_traits namespace has been changed, which can lead to compilation errors

win64, cgal5.5

MaelRL commented 1 week ago

Do you have some code to reproduce the issue please?

cejutue commented 1 week ago

Complete example program at https://github.com/cejutue/cgal_test

my test code:

#include <fstream>
#include <iostream>  
#include <vector>  
#include <unordered_set>  
#include <algorithm>  
#include "knn/knn_.h"

#include <CGAL/Real_timer.h>
#include <CGAL/Random.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Point_set_2.h>
#include <CGAL/Point_set_3.h>
#include <CGAL/Point_set_3/IO.h>
#include <CGAL/jet_estimate_normals.h>
#include <CGAL/Shape_detection/Region_growing/Region_growing.h>
#include <CGAL/Shape_detection/Region_growing/Region_growing_on_point_set.h>
#include <CGAL/Shape_detection/Efficient_RANSAC.h>
#include <boost/iterator/function_output_iterator.hpp>
#include <CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h>

using Kernel = CGAL::Simple_cartesian<double>;
using Point_3 = Kernel::Point_3;
using Vector_3 = Kernel::Vector_3;
using Point_2 = Kernel::Point_2;
using Vector_2 = Kernel::Vector_2;

using Point_set = CGAL::Point_set_3<Point_3>;
using Point_map = typename Point_set::Point_map;
using Normal_map = typename Point_set::Vector_map;

namespace Shape_detection = CGAL::Shape_detection::Point_set;

using Neighbor_query = Shape_detection::K_neighbor_query
<Kernel, Point_set, Point_map>;

using Region_type_cylinder = Shape_detection::Least_squares_cylinder_fit_region  <Kernel, Point_set, Point_map, Normal_map>;
using Region_type_line = Shape_detection::Least_squares_line_fit_region <Kernel, Point_set, Point_map, Normal_map>;
using Region_type_circle = Shape_detection::Least_squares_circle_fit_region <Kernel, Point_set, Point_map, Normal_map>;
using Region_type_plane = Shape_detection::Least_squares_plane_fit_region <Kernel, Point_set, Point_map, Normal_map>;
using Region_type_sphere = Shape_detection::Least_squares_sphere_fit_region <Kernel, Point_set, Point_map, Normal_map>;

template<typename T>
using Region_growing_run = CGAL::Shape_detection::Region_growing
<Point_set, Neighbor_query, T>;

**using Traits = CGAL::Shape_detection::Efficient_RANSAC_traits< Kernel,
    Point_set,
    Point_map,Normal_map >;**

using Efficient_ransac = CGAL::Shape_detection::Efficient_RANSAC<Traits>;
using Cone = CGAL::Shape_detection::Cone<Traits>             ;
using Cylinder = CGAL::Shape_detection::Cylinder<Traits>     ;
using Plane = CGAL::Shape_detection::Plane<Traits>           ;
using Sphere = CGAL::Shape_detection::Sphere<Traits>         ;
using Torus = CGAL::Shape_detection::Torus<Traits>           ;
...

image

afabri commented 1 week ago

How can a comment lead to a compilation error??? Sorry I just realized that you commented in order to delete.

cejutue commented 9 hours ago

verygood