Detect and split multiple parts contained in one mesh

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

Detect and split multiple parts contained in one mesh

Grimm, Raphael (IAR)

Hi,

i am new to CGAL and have a question.

I have a reconstructed mesh.

This mesh may consist of multiple unconnected parts.

Sometimes these parts are single points or triangles and sometimes they are complete meshes.

Is there a fast way to detect this and split the mesh into multiple meshes each containing one part?


I am grateful for all hints.

Best Regards

Raphael


Reply | Threaded
Open this post in threaded view
|

Re: Detect and split multiple parts contained in one mesh

Panagiotis Zestanakis
Cgal Meshes are models of the Boost graph concept. 
You might want to try out  Boost graph's connected_components() function. 


On Tue, May 15, 2018 at 9:52 AM, Grimm, Raphael (IAR) <[hidden email]> wrote:

Hi,

i am new to CGAL and have a question.

I have a reconstructed mesh.

This mesh may consist of multiple unconnected parts.

Sometimes these parts are single points or triangles and sometimes they are complete meshes.

Is there a fast way to detect this and split the mesh into multiple meshes each containing one part?


I am grateful for all hints.

Best Regards

Raphael



Reply | Threaded
Open this post in threaded view
|

Re: Detect and split multiple parts contained in one mesh

Sebastien Loriot (GeometryFactory)
In reply to this post by Grimm, Raphael (IAR)
See the following example:

https://doc.cgal.org/latest/BGL/Polygon_mesh_processing_2face_filtered_graph_example_8cpp-example.html

Sebastien.

On 05/15/2018 08:52 AM, Grimm, Raphael (IAR) wrote:

> Hi,
>
> i am new to CGAL and have a question.
>
> I have a reconstructed mesh.
>
> This mesh may consist of multiple unconnected parts.
>
> Sometimes these parts are single points or triangles and sometimes they
> are complete meshes.
>
> Is there a fast way to detect this and split the mesh into multiple
> meshes each containing one part?
>
>
> I am grateful for all hints.
>
> Best Regards
>
> Raphael
>
>

--
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: Detect and split multiple parts contained in one mesh

Sebastien Loriot (GeometryFactory)
See also this example using copy_face_graph() for how to copy each
component into a new mesh:

https://doc.cgal.org/latest/Surface_mesh_segmentation/Surface_mesh_segmentation_2extract_segmentation_into_mesh_example_8cpp-example.html

Sebastien.

On 05/15/2018 09:56 AM, Sebastien Loriot (GeometryFactory) wrote:

> See the following example:
>
> https://doc.cgal.org/latest/BGL/Polygon_mesh_processing_2face_filtered_graph_example_8cpp-example.html 
>
>
> Sebastien.
>
> On 05/15/2018 08:52 AM, Grimm, Raphael (IAR) wrote:
>> Hi,
>>
>> i am new to CGAL and have a question.
>>
>> I have a reconstructed mesh.
>>
>> This mesh may consist of multiple unconnected parts.
>>
>> Sometimes these parts are single points or triangles and sometimes
>> they are complete meshes.
>>
>> Is there a fast way to detect this and split the mesh into multiple
>> meshes each containing one part?
>>
>>
>> I am grateful for all hints.
>>
>> Best Regards
>>
>> Raphael
>>
>>

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