VasileiosBouzas / MeshPolygonization

70 stars 17 forks source link

CGAL ERROR #8

Closed Cariggy closed 3 years ago

Cariggy commented 3 years ago

Hi,Sorry for bothering you. I'm running your code on the linux, I didn't change anything just compile it, and the code terminate by an instance of 'CGAL::Precondition_exception', just like below results

Distance threshold: 0.21 Importance threshold (default: 1.0): 1 Planarity: 3 secs Number of planes: 358 Segmentation: 1e+02 secs Structure Graph: 4 secs terminate called after throwing an instance of 'CGAL::Precondition_exception' what(): CGAL ERROR: precondition violation! Expr: (m_traits.compare_y_at_x_2_object()(p, cv1) == EQUAL) && (m_traits.compare_y_at_x_2_object()(p, cv2) == EQUAL) File: /usr/include/CGAL/Arr_segment_traits_2.h Line: 577 Aborted (core dumped)

I change the data but didn't change anything. I try to fix it but I'm not good at CGAL, I use "sudo apt-get install libcgal-dev" to install cgal and it shows "libcgal-dev is already the newest version (5.0.2-3)"

what should I do to fix this exception?

LiangliangNan commented 3 years ago

Which data did you use? Can you send the data here?

Cariggy commented 3 years ago

I use the data provided by you, such as block.off

LiangliangNan commented 3 years ago

I work without any issue with my machine. I am using CGAL-5.1.0. Can you update CGAL to this version and try again? (CGAL is not header-only and you just download the source code and in your cmake cache you simply provide the path for CGAL_DIR)

Cariggy commented 3 years ago

OK, I'll try this version. Thank you so much!

Cariggy commented 3 years ago

It's working! Thanks!