Surface Mesh Shortest Path: Assertion error with custom .off file

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

Surface Mesh Shortest Path: Assertion error with custom .off file

sindhu r
Hello,
I'm very new to the vastness of CGAL and have a question about the Surface Mesh Shortest Path (SMSP) package. I am also new to a discussion forum, so please let me know if I'm not following any convention on posting questions/code etc.

What I want to do: Using an .off file of the desired shape, find the shortest path on the shape. I provide the coordinates of the source and target locations and use the "locate" function to determine the face locations (face descriptor and barycentric coordinates). These are then fed to the "shortest_path_points_to_source_points" function. The final output path is written to a file.

What I have done: All of the above (minimal working code is provided here). I have tested my code with success on .off files from the web (elephant.off at https://github.com/CGAL/cgal/blob/master/Mesh_3/examples/Mesh_3/data/elephant.off, kitten_poisson-20-30-0.375.off (attached)). But I'm unable to get it to work on my custom .off file (generated using Polyhedron and Poisson reconstruction, also attached). The following error is what I get with my custom .off file:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()
File: /home/sin/lib/libigl/external/cgal/install/include/CGAL/Surface_mesh/Properties.h
Line: 195

I don't understand what the difference is between my .off file and the ones that are used as part of examples. Any help is dearly appreciated!

Regards,
Sindhu R

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


cgal_discuss_minimal_working_code.cpp (4K) Download Attachment
kitten_poisson-20-30-0.375.off (47K) Download Attachment
cgal_discuss_custom_off_file.off (81K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Surface Mesh Shortest Path: Assertion error with custom .off file

Maxime Gimeno
Hi,
Your custom .off file does not contain any face. That must be what's wrong.

Regards,
Maxime Gimeno

Le lun. 31 août 2020 à 22:33, sindhu r <[hidden email]> a écrit :
Hello,
I'm very new to the vastness of CGAL and have a question about the Surface Mesh Shortest Path (SMSP) package. I am also new to a discussion forum, so please let me know if I'm not following any convention on posting questions/code etc.

What I want to do: Using an .off file of the desired shape, find the shortest path on the shape. I provide the coordinates of the source and target locations and use the "locate" function to determine the face locations (face descriptor and barycentric coordinates). These are then fed to the "shortest_path_points_to_source_points" function. The final output path is written to a file.

What I have done: All of the above (minimal working code is provided here). I have tested my code with success on .off files from the web (elephant.off at https://github.com/CGAL/cgal/blob/master/Mesh_3/examples/Mesh_3/data/elephant.off, kitten_poisson-20-30-0.375.off (attached)). But I'm unable to get it to work on my custom .off file (generated using Polyhedron and Poisson reconstruction, also attached). The following error is what I get with my custom .off file:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()
File: /home/sin/lib/libigl/external/cgal/install/include/CGAL/Surface_mesh/Properties.h
Line: 195

I don't understand what the difference is between my .off file and the ones that are used as part of examples. Any help is dearly appreciated!

Regards,
Sindhu R

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


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

Reply | Threaded
Open this post in threaded view
|

Re: Surface Mesh Shortest Path: Assertion error with custom .off file

Maxime Gimeno
Could you provide the poisson reconstructed version of your custom file ? I suspect problems due to small islands and different components. 

Le mar. 1 sept. 2020 à 08:25, Maxime Gimeno <[hidden email]> a écrit :
Hi,
Your custom .off file does not contain any face. That must be what's wrong.

Regards,
Maxime Gimeno

Le lun. 31 août 2020 à 22:33, sindhu r <[hidden email]> a écrit :
Hello,
I'm very new to the vastness of CGAL and have a question about the Surface Mesh Shortest Path (SMSP) package. I am also new to a discussion forum, so please let me know if I'm not following any convention on posting questions/code etc.

What I want to do: Using an .off file of the desired shape, find the shortest path on the shape. I provide the coordinates of the source and target locations and use the "locate" function to determine the face locations (face descriptor and barycentric coordinates). These are then fed to the "shortest_path_points_to_source_points" function. The final output path is written to a file.

What I have done: All of the above (minimal working code is provided here). I have tested my code with success on .off files from the web (elephant.off at https://github.com/CGAL/cgal/blob/master/Mesh_3/examples/Mesh_3/data/elephant.off, kitten_poisson-20-30-0.375.off (attached)). But I'm unable to get it to work on my custom .off file (generated using Polyhedron and Poisson reconstruction, also attached). The following error is what I get with my custom .off file:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()
File: /home/sin/lib/libigl/external/cgal/install/include/CGAL/Surface_mesh/Properties.h
Line: 195

I don't understand what the difference is between my .off file and the ones that are used as part of examples. Any help is dearly appreciated!

Regards,
Sindhu R

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


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

Reply | Threaded
Open this post in threaded view
|

Re: Surface Mesh Shortest Path: Assertion error with custom .off file

sindhu r
Hi Maxime,
Thank you for your reply and my apologies, I attached the wrong .off file. 

I do have faces in my .off file (this time correctly attached!); this .off file was generated using the points and normals from a .xyz file (also attached). The xyz file represents points that span the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have any holes or islands; it looks like a blanket. My final test case will involve holes and/or islands, but for the moment even this simple example shows something strange about the .off file that I generate using the Poisson reconstruction method.

While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 7, 9, 12 etc..) to have vertices with x,y,z locations that are way off my points specified in the .xyz file. I think I'm using the Poisson reconstruction incorrectly (minimal working code attached). 

Thank you for your time!

Regards,
Sindhu R


On Tue, Sep 1, 2020 at 2:41 AM Maxime Gimeno <[hidden email]> wrote:
Could you provide the poisson reconstructed version of your custom file ? I suspect problems due to small islands and different components. 

Le mar. 1 sept. 2020 à 08:25, Maxime Gimeno <[hidden email]> a écrit :
Hi,
Your custom .off file does not contain any face. That must be what's wrong.

Regards,
Maxime Gimeno

Le lun. 31 août 2020 à 22:33, sindhu r <[hidden email]> a écrit :
Hello,
I'm very new to the vastness of CGAL and have a question about the Surface Mesh Shortest Path (SMSP) package. I am also new to a discussion forum, so please let me know if I'm not following any convention on posting questions/code etc.

What I want to do: Using an .off file of the desired shape, find the shortest path on the shape. I provide the coordinates of the source and target locations and use the "locate" function to determine the face locations (face descriptor and barycentric coordinates). These are then fed to the "shortest_path_points_to_source_points" function. The final output path is written to a file.

What I have done: All of the above (minimal working code is provided here). I have tested my code with success on .off files from the web (elephant.off at https://github.com/CGAL/cgal/blob/master/Mesh_3/examples/Mesh_3/data/elephant.off, kitten_poisson-20-30-0.375.off (attached)). But I'm unable to get it to work on my custom .off file (generated using Polyhedron and Poisson reconstruction, also attached). The following error is what I get with my custom .off file:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()
File: /home/sin/lib/libigl/external/cgal/install/include/CGAL/Surface_mesh/Properties.h
Line: 195

I don't understand what the difference is between my .off file and the ones that are used as part of examples. Any help is dearly appreciated!

Regards,
Sindhu R

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


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


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


cgal_custom_poisson_points_with_normals.off (1K) Download Attachment
cgal_custom_points_with_normals.xyz (2K) Download Attachment
cgal_discuss_minimal_working_code.cpp (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Surface Mesh Shortest Path: Assertion error with custom .off file

Maxime Gimeno
Hi,
Your file contains 13 isolated vertices. After removing them, I was able to successfully compute shortest paths on it. 

For the poisson part, I'm sorry but I am not an expert at all in reconstruction, I can't help you.

Le mar. 1 sept. 2020 à 23:16, sindhu r <[hidden email]> a écrit :
Hi Maxime,
Thank you for your reply and my apologies, I attached the wrong .off file. 

I do have faces in my .off file (this time correctly attached!); this .off file was generated using the points and normals from a .xyz file (also attached). The xyz file represents points that span the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have any holes or islands; it looks like a blanket. My final test case will involve holes and/or islands, but for the moment even this simple example shows something strange about the .off file that I generate using the Poisson reconstruction method.

While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 7, 9, 12 etc..) to have vertices with x,y,z locations that are way off my points specified in the .xyz file. I think I'm using the Poisson reconstruction incorrectly (minimal working code attached). 

Thank you for your time!

Regards,
Sindhu R


On Tue, Sep 1, 2020 at 2:41 AM Maxime Gimeno <[hidden email]> wrote:
Could you provide the poisson reconstructed version of your custom file ? I suspect problems due to small islands and different components. 

Le mar. 1 sept. 2020 à 08:25, Maxime Gimeno <[hidden email]> a écrit :
Hi,
Your custom .off file does not contain any face. That must be what's wrong.

Regards,
Maxime Gimeno

Le lun. 31 août 2020 à 22:33, sindhu r <[hidden email]> a écrit :
Hello,
I'm very new to the vastness of CGAL and have a question about the Surface Mesh Shortest Path (SMSP) package. I am also new to a discussion forum, so please let me know if I'm not following any convention on posting questions/code etc.

What I want to do: Using an .off file of the desired shape, find the shortest path on the shape. I provide the coordinates of the source and target locations and use the "locate" function to determine the face locations (face descriptor and barycentric coordinates). These are then fed to the "shortest_path_points_to_source_points" function. The final output path is written to a file.

What I have done: All of the above (minimal working code is provided here). I have tested my code with success on .off files from the web (elephant.off at https://github.com/CGAL/cgal/blob/master/Mesh_3/examples/Mesh_3/data/elephant.off, kitten_poisson-20-30-0.375.off (attached)). But I'm unable to get it to work on my custom .off file (generated using Polyhedron and Poisson reconstruction, also attached). The following error is what I get with my custom .off file:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()
File: /home/sin/lib/libigl/external/cgal/install/include/CGAL/Surface_mesh/Properties.h
Line: 195

I don't understand what the difference is between my .off file and the ones that are used as part of examples. Any help is dearly appreciated!

Regards,
Sindhu R

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


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


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


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

Reply | Threaded
Open this post in threaded view
|

Re: Surface Mesh Shortest Path: Assertion error with custom .off file

sindhu r
Hi Maxime,
Sorry about the late reply and thank you very much for the suggestion- it certainly works now! You are awesome :)

@ Poisson reconstruction- thank you for letting me know; if I have a question about, I'll open a separate thread for that.

Thanks again!
Regards,
Sindhu R


On Wed, Sep 2, 2020 at 3:55 AM Maxime Gimeno <[hidden email]> wrote:
Hi,
Your file contains 13 isolated vertices. After removing them, I was able to successfully compute shortest paths on it. 

For the poisson part, I'm sorry but I am not an expert at all in reconstruction, I can't help you.

Le mar. 1 sept. 2020 à 23:16, sindhu r <[hidden email]> a écrit :
Hi Maxime,
Thank you for your reply and my apologies, I attached the wrong .off file. 

I do have faces in my .off file (this time correctly attached!); this .off file was generated using the points and normals from a .xyz file (also attached). The xyz file represents points that span the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have any holes or islands; it looks like a blanket. My final test case will involve holes and/or islands, but for the moment even this simple example shows something strange about the .off file that I generate using the Poisson reconstruction method.

While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 7, 9, 12 etc..) to have vertices with x,y,z locations that are way off my points specified in the .xyz file. I think I'm using the Poisson reconstruction incorrectly (minimal working code attached). 

Thank you for your time!

Regards,
Sindhu R


On Tue, Sep 1, 2020 at 2:41 AM Maxime Gimeno <[hidden email]> wrote:
Could you provide the poisson reconstructed version of your custom file ? I suspect problems due to small islands and different components. 

Le mar. 1 sept. 2020 à 08:25, Maxime Gimeno <[hidden email]> a écrit :
Hi,
Your custom .off file does not contain any face. That must be what's wrong.

Regards,
Maxime Gimeno

Le lun. 31 août 2020 à 22:33, sindhu r <[hidden email]> a écrit :
Hello,
I'm very new to the vastness of CGAL and have a question about the Surface Mesh Shortest Path (SMSP) package. I am also new to a discussion forum, so please let me know if I'm not following any convention on posting questions/code etc.

What I want to do: Using an .off file of the desired shape, find the shortest path on the shape. I provide the coordinates of the source and target locations and use the "locate" function to determine the face locations (face descriptor and barycentric coordinates). These are then fed to the "shortest_path_points_to_source_points" function. The final output path is written to a file.

What I have done: All of the above (minimal working code is provided here). I have tested my code with success on .off files from the web (elephant.off at https://github.com/CGAL/cgal/blob/master/Mesh_3/examples/Mesh_3/data/elephant.off, kitten_poisson-20-30-0.375.off (attached)). But I'm unable to get it to work on my custom .off file (generated using Polyhedron and Poisson reconstruction, also attached). The following error is what I get with my custom .off file:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()
File: /home/sin/lib/libigl/external/cgal/install/include/CGAL/Surface_mesh/Properties.h
Line: 195

I don't understand what the difference is between my .off file and the ones that are used as part of examples. Any help is dearly appreciated!

Regards,
Sindhu R

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


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


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


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


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