Multi-domain mesh generation with sharp edges

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

Multi-domain mesh generation with sharp edges

imperin
Hello everybody,

Does anybody know how to make mesh generation for multiple domains from 3D
Polyhedral Domains with sharp edges. Is there an example of it?

Thanks a lot!



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
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: Multi-domain mesh generation with sharp edges

Jane Tournois
Hello,

if you want to mesh a multi-domain with features, you should use the
`CGAL::Polyhedral_mesh_domain_with_features_3` [1], and can follow the
example "Mesh_3/mesh_polyhedral_domain_with_features.cpp" [2].

If you have several polyhedra and want to create a domain from them,
there is an undocumented constructor in
Polyhedral_mesh_domain_with_features_3.h that you can use :

```

   /**
    * Constructor from a sequence of polyhedral surfaces, and a bounding
    * polyhedral surface.
    *
    * @param InputPolyhedraPtrIterator must an iterator of a sequence of
    * pointers to polyhedra
    * @param bounding_polyhedron reference to the bounding surface
    */
   template <typename InputPolyhedraPtrIterator>
   Polyhedral_mesh_domain_with_features_3(InputPolyhedraPtrIterator begin,
                                          InputPolyhedraPtrIterator end,
                                          const Polyhedron&
bounding_polyhedron,
                                          CGAL::Random* p_rng = nullptr)

```

It is still a Polyhedral_mesh_domain_with_features_3 but is built from
more than 1 polyhedral surface.

Then, you can use the automatic `detect_features()` or the API of
`CGAL::Mesh_domain_with_polyline_features_3` to set your sharp edges
before meshing.

Does it help?

Best regards,

Jane.



[1]
https://doc.cgal.org/latest/Mesh_3/classCGAL_1_1Polyhedral__mesh__domain__with__features__3.html

[2]
https://doc.cgal.org/latest/Mesh_3/Mesh_3_2mesh_polyhedral_domain_with_features_8cpp-example.html

[3]
https://doc.cgal.org/latest/Mesh_3/classCGAL_1_1Mesh__domain__with__polyline__features__3.html


--
Jane Tournois, PhD
R&D Engineer at GeometryFactory
http://www.geometryfactory.com/


Le 20/08/2019 à 19:54, imperin a écrit :

> Hello everybody,
>
> Does anybody know how to make mesh generation for multiple domains from 3D
> Polyhedral Domains with sharp edges. Is there an example of it?
>
> Thanks a lot!
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
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: Multi-domain mesh generation with sharp edges

imperin
Hello Jane,
Thank you for your answer. But it does not work :(
I am trying to mesh intersecting domains with detect_features(), but the
output mesh includes: bounding box mesh and  sub-domains meshes without
detect_features(when On can not mesh).(See Pic.1)

I found out an example for meshing Hybrid domain[1], changed it for
Polyhedrons and it works for several Polyhedrons and saves mesh for each sub
domain(Pic.2), but I can not use detect_features() function because it does
not support it and I do not know polylines of input files.
 
[1]
https://doc.cgal.org/latest/Mesh_3/Mesh_3_2mesh_hybrid_mesh_domain_8cpp-example.html

Could you please tell me what to do?
Thanks
<http://cgal-discuss.949826.n4.nabble.com/file/t376139/bounding_sub_domains.png>
<http://cgal-discuss.949826.n4.nabble.com/file/t376139/without_features_detection.png>




--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
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: Multi-domain mesh generation with sharp edges

Jane Tournois
Hello,

you can adapt the hybrid domain example by replacing the
CGAL::Polyhedral_mesh_domain by a
CGAL::Polyhedral_mesh_domain_with_features_3.

Then you should be able to use detect_features().

If you knew the polylines a priori, and regarding the images you sent, I
think the most adequate mesh domain would be the
Polyhedral_complex_mesh_domain_3 [1]

Jane.


[1]
https://doc.cgal.org/latest/Mesh_3/classCGAL_1_1Polyhedral__complex__mesh__domain__3.html


Le 22/08/2019 à 20:36, imperin a écrit :

> Hello Jane,
> Thank you for your answer. But it does not work :(
> I am trying to mesh intersecting domains with detect_features(), but the
> output mesh includes: bounding box mesh and  sub-domains meshes without
> detect_features(when On can not mesh).(See Pic.1)
>
> I found out an example for meshing Hybrid domain[1], changed it for
> Polyhedrons and it works for several Polyhedrons and saves mesh for each sub
> domain(Pic.2), but I can not use detect_features() function because it does
> not support it and I do not know polylines of input files.
>  
> [1]
> https://doc.cgal.org/latest/Mesh_3/Mesh_3_2mesh_hybrid_mesh_domain_8cpp-example.html
>
> Could you please tell me what to do?
> Thanks
> <http://cgal-discuss.949826.n4.nabble.com/file/t376139/bounding_sub_domains.png>
> <http://cgal-discuss.949826.n4.nabble.com/file/t376139/without_features_detection.png>
>
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>
--
Jane Tournois, PhD
R&D Engineer at GeometryFactory
http://www.geometryfactory.com/


--
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: Multi-domain mesh generation with sharp edges

imperin
Hello Jane,
1.I tried to adapt the hybrid domain example , and did what you said , but I
can use detect_features only inside struct for
Polyhedral_mesh_domain_with_features_3, and nothing happens when i do it.
2. I also tried Polyhedral_complex_mesh_domain_3, but I need to make pairs
of surfaces i do not know the numbers. Is there automatic tool for finding
intersecting surfaces of multiple Polyhedrons?

Thanks a lot.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
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: Multi-domain mesh generation with sharp edges

Jane Tournois
Hello,

Le 26/08/2019 à 07:42, imperin a écrit :
> Hello Jane,
> 1.I tried to adapt the hybrid domain example , and did what you said , but I
> can use detect_features only inside struct for
> Polyhedral_mesh_domain_with_features_3, and nothing happens when i do it.

right, you need to adapt your Hybdrid mesh domain so that it is able to
detect once and only once each feature polyline.

> 2. I also tried Polyhedral_complex_mesh_domain_3, but I need to make pairs
> of surfaces i do not know the numbers. Is there automatic tool for finding
> intersecting surfaces of multiple Polyhedrons?

I don't think we have an automatic tool for that. You can use AABB_tree
to detect collisions between polyhedra, and then put it together with
the info you have (like knowing that polyhedra do not intersect but are
adjacent, etc)


>
> Thanks a lot.
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>
--
Jane Tournois, PhD
R&D Engineer at GeometryFactory
http://www.geometryfactory.com/


--
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: Multi-domain mesh generation with sharp edges

Sebastien Loriot (GeometryFactory)


On 8/26/19 2:29 PM, Jane Tournois wrote:

> Hello,
>
> Le 26/08/2019 à 07:42, imperin a écrit :
>> Hello Jane,
>> 1.I tried to adapt the hybrid domain example , and did what you said ,
>> but I
>> can use detect_features only inside struct for
>> Polyhedral_mesh_domain_with_features_3, and nothing happens when i do it.
>
> right, you need to adapt your Hybdrid mesh domain so that it is able to
> detect once and only once each feature polyline.
>
>> 2. I also tried Polyhedral_complex_mesh_domain_3, but I need to make
>> pairs
>> of surfaces i do not know the numbers. Is there automatic tool for
>> finding
>> intersecting surfaces of multiple Polyhedrons?
>
> I don't think we have an automatic tool for that. You can use AABB_tree
> to detect collisions between polyhedra, and then put it together with
> the info you have (like knowing that polyhedra do not intersect but are
> adjacent, etc)
>
Polygon_mesh_processing::intersecting_meshes() might help (if I
understand correctly what you want).

https://doc.cgal.org/latest/Polygon_mesh_processing/group__PMP__predicates__grp.html#ga1ff63ec6e762d45ea5775bf7b49f9270

Sebastien.

>
>>
>> Thanks a lot.
>>
>>
>>
>> --
>> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>>

--
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: Multi-domain mesh generation with sharp edges

imperin
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Multi-domain mesh generation with sharp edges

Sebastien Loriot (GeometryFactory)
You can see how it is used in this function:

https://github.com/CGAL/cgal/blob/master/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_do_intersect_test.cpp#L362

HTH,

Sebastien.

On 9/23/19 9:11 AM, imperin wrote:

> Hello Sebastien,
> Could you please show me an example how to use
> Polygon_mesh_processing::intersecting_meshes() ?
> Thanks a lot!
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

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