Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Mesh_3 -> Triangulation_3
- Date: Thu, 10 Jan 2019 07:16:57 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:Uev5rx1UKDaEeC5tsmDT+DRfVm0co7zxezQtwd8ZseMVLPad9pjvdHbS+e9qxAeQG9mDu7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPYAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLmlTkJNzA5/m/UhMJ/gq1UrxC9qBJw2IPUfIKYOeBicq/Bc94XR2xMVdtRWSxbBYO8apMCA+QcM+lGtIbyvUAOrQe/BQayAuPk1zlGhnjs3a071OQhDRzN0AghEd0Qt3TUqcv6NLsIUeG1zKfH1ynMb+9R2Tfn6InEdx4tquyLULJrdcrRzlMvFwLCjlWMs4DlOjeV2/8Cs2ie9eVgVOavh3Q7pAF2pzii38EhgZTHiIISz1DL7yR5wIAtKN25Tk57e9+kH4FKuyGULYt6WswiQ2B0uCY6170JooS3czQNyJQi3xLQd/OHfJKM4h75U+aROzh4iXR4c7y8nxa/6VasxvH4W8Wu01tHrjBJnsfSunwQzRDe5cuKRuN/80qiwzqDyQ/e5+BeLUwpkafWJYQtz7wwm5cVrE/NBDX5mF/sg6+Tbkgk+van6+DgYrj+o5+TLY50igXnPqUggMyzHP00MgYBUmWY4+i827rj/Ur2QLVOkPI6iLXWsJffJcgDp665BRFa0po75hqhEzur1M4UkHoHIV5fZh6LkZXlN0vBLf37Ffu/hk6jkDZvx/DIJL3hBZDNI2DYkLflerZ98U9cyA0vzdxF4pJUDqoMIP32WkDrtdzYCgU1PBCzw+biENl9zJ8RWXqTAq+FN6PfqUOH5u01LOmIfYMapTf9K+M56P7zln85gkQQfbKp3JsScHC3BO5qI0SfYXr2g9cOC30GvgQkTL+itVuZTDQGZ2quR7luoXYgGYe+BMHCQJqsifqPxmCgD5hObydHDF6LVnznfoHBV/YXYz+JOZxdlWkPWrGlDoMgzhqzrxTSyrx9L+OS9DdLm4jk0Y0/3ODZnAou9DFyR+CayWCKUyk0sW4PQjIqxrFRqEdhzU2SkOIw1+dcEsZS4O8PVwMSOpvVzug8ANf3DFGSNuyVQUqrF431SQo6Scg8lodXMhRNXu66hxWG5BKERroclriFHpsxq/uO0H34JsI7wHHDhvB40wsWB/BXPGjjvZZRshDJDteQwUqcnqeuM68b2XyVrTrR/S+1pEhdFTVIf+DFUHQYPBaEqN344gbdVebrB+h3dARGzsGGJ+1Bbdi71Vg=
Here is an example of usage of copy_tds():
https://gist.github.com/sloriot/f9f929ce2e30b59f1b63a3cf3780159e
Are talking of filtering infinite cells?
Sebastien.
On 01/09/2019 10:25 PM, Marc Alexa wrote:
Hi Sebastian,
Thanks for your answer. I use the stream operator on both, c3t3 and
c3t3.triangulation and the result is identical.
I was never able to downcast. I somehow don’t manage to use types that CGAL
understand to cast. The copy_tds function looks interesting. For now I solved
my problem in a more ugly way by directly filtering the stream generated by
c3t3.
My other problem remains. c3t3 uses some peeling, but the peeled tets are
part of the triangulation so they still get exported.
I guess, fundamentally I need to solve the following problem: given a
collection of tets that form a valid tet mesh with boundary. How can I
generate the ‘outside’ tets that CGAL expects for Triangulation 3, i.e. the
tets connected to the infinite vertex. Is there a simple way in CGAL to do
this?
Thanks!
-Marc
On 7. Jan 2019, at 08:47, Sebastien Loriot (GeometryFactory)
<>
wrote:
Hi Marc,
Did you try to dump c3t3.triangulation()? AFAIK, this should directly
call the operator<<() from Regular_triangulation_3 and gives you what
you need. I guess you could even down cast it to a given Triangulation_3
class.
If you need to import it into a different triangulation type, you have
to do it at the TDS level by using the function copy_tds() for example.
See here:
https://doc.cgal.org/latest/TDS_3/classTriangulationDataStructure__3.html#aac784b676421bd590612bb08c0a84f89
HTH,
Sebastien.
On 01/05/2019 01:53 PM, Marc Alexa wrote:
Dear all,
I am generating a tetrahedral mesh using the suite of algorithms in Mesh_3. I
want to use the resulting mesh in my code, which is based on Triangulation_3.
The vertex and cell base classes are incompatible. My preferred way for doing
this would be writing the mesh to a file. Unfortunately, the formats of the
stream operators are different. Is there an easy way to “reduce” what is
being written by Mesh_3 to what is being expected by Triangulation_3?
On a side note: I understand that if I am not using sliver exudation, the
triangulation generated by Mesh_3 will be Delaunay. This means I could export
the points only (and then reconstruct the tetrahedra). Then I only need
information on which tetrahedra are in the interior of the meshed surface. I
tried to circumvent this by using a simple convex surface, namely a sphere.
Yet even for the sphere some tetrahedra are excluded, despite clearly lying
in the interior. I do understand that the excluded tetrahedra are slivers,
but wouldn’t it make sense that a tetrahedral mesh with the boundary vertices
on the sphere contained everything inside the sphere?
Best,
Marc
--
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] Mesh_3 -> Triangulation_3, Marc Alexa, 01/05/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Sebastien Loriot (GeometryFactory), 01/07/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/09/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Sebastien Loriot (GeometryFactory), 01/10/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/10/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/10/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Mael, 01/10/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Laurent Rineau (CGAL/GeometryFactory), 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Laurent Rineau (CGAL/GeometryFactory), 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/10/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/10/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Sebastien Loriot (GeometryFactory), 01/10/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/09/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Laurent Rineau (CGAL/GeometryFactory), 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Laurent Rineau (CGAL/GeometryFactory), 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Marc Alexa, 01/11/2019
- Re: [cgal-discuss] Mesh_3 -> Triangulation_3, Sebastien Loriot (GeometryFactory), 01/07/2019
Archive powered by MHonArc 2.6.18.