Crash when using mesh_plane_detection

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Crash when using mesh_plane_detection

AndrewC
Load the .STL into the "polyhedron" demo , and select the "Mesh Plane Detection" option, accepting  defaults,  results in a crash.
There is an out of bounds on a vector at the line 131 in Mesh_plane_detection_plugin.cpp

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


cylinder.zip (228K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Crash when using mesh_plane_detection

andreas.fabri

Hi Andrew,

Thanks for the bug report.

A trivial fix is to replace if (is_border(*circ, mesh))  by  if (is_border_edge(*circ, mesh))

in the file    demo/Polyhedron/Plugins/Surface_mesh/Mesh_plane_detection_plugin.cpp

and recompile.

But your bug report revealed that in the demo we use some preview-code
instead of the region growing function you can see in this example

https://cgal.geometryfactory.com/CGAL/doc/master/Shape_detection/Shape_detection_2region_growing_on_polygon_mesh_8cpp-example.html

So if you want to evaluate or use the real function we want to  demo you better
started from the above example.

It further showed that your STL file has borders. You can't see them,
but there is a border of  four edges with two extremely close vertices  
in the middle  that is    

u--------v---------w-------v'---------u

We work on mesh repair and fixing these kind of meshes is in the pipeline.
It is obviously trivial to fix for the above scenario, but itcan become arbitrarily complex for more complicated data sets.

Best,

Andreas


On 9/2/2020 11:11 PM, Andrew Cunningham wrote:
Load the .STL into the "polyhedron" demo , and select the "Mesh Plane Detection" option, accepting  defaults,  results in a crash.
There is an out of bounds on a vector at the line 131 in Mesh_plane_detection_plugin.cpp

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss

-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss