Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efficient-RANSAC compilation errors #8290

Closed
cejutue opened this issue Jun 18, 2024 · 4 comments · Fixed by #8301
Closed

Efficient-RANSAC compilation errors #8290

cejutue opened this issue Jun 18, 2024 · 4 comments · Fixed by #8301
Assignees

Comments

@cejutue
Copy link

cejutue commented Jun 18, 2024

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
Copy link
Member

MaelRL commented Jun 18, 2024

Do you have some code to reproduce the issue please?

@cejutue
Copy link
Author

cejutue commented Jun 18, 2024

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
Copy link
Member

afabri commented Jun 20, 2024

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

@cejutue
Copy link
Author

cejutue commented Jul 1, 2024

verygood

@cejutue cejutue closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants