Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Mesh_3 -> Triangulation_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Mesh_3 -> Triangulation_3


Chronological Thread 
  • From: Marc Alexa <>
  • To:
  • Subject: Re: [cgal-discuss] Mesh_3 -> Triangulation_3
  • Date: Wed, 9 Jan 2019 22:25:45 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:ZKXT1Byv691dvTnXCy+O+j09IxM/srCxBDY+r6Qd2+keIJqq85mqBkHD//Il1AaPAd2Lraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HQbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHolCgJODE2/nzZhMx+kqxUohGvqRtkzo7IeYGVMeZyfqPBcd4YQ2dKQ8ZfVzZGAoO5d4YBCPAOPfxEoILgu1YOqQWxBAa2C+jyzTJIg2X53bcm3Og7Cw7G2BIvHt0Uv3nPo9X1Mb0dUeGxzKXS0TrDaPZW1C775YPVfB4hpvSMUqhxccrX0UQvFgXFjk+RqYP/JT+V2P4Nv3CH4OpvT+2vj3QrqwZrojigwMonl4rHhpoNx1za6Sl0xJw5KN64RUJhfNKoDphduzuVOoZ2Ws8vQG5ltDwnxrAEpZK3ZjYGxZokyhLFdvCKcoyF7xT+X+iLOzh4nmhqeLenihay70egzur8W9Gx0FlQrypFlsDAt34I1xDO88SHRPRw80e71TaA0ADT7e5EIUQqmqbBN5EhxbswmoISsUTFACD2hF37gLGKekgg4OSl6OTqbq/7qpOCNIJ4kA7zP6Q2lsy6G+s4MwwOX2aB+eS70b3u5Uj5T69QjvIqiKXWqpTaKtoUp6GjGAJV3YMj5Ay+DzeiytgXgX4HLFdddBKdk4fpI03OIOz/Dfqnn1usny1kx/TfMrL8A5XNNWTMkKr6fbZm8ENc0woyzdVH551OEL0BIfTzWlXwtNPCFBM5PRa0kK7aDs5g3NYeRX6XGf3ed7jDtEeBoOMpOeiFIoEP/y3sLuAsoP/og3h+klAUeeyl3IAcdWujTchhdk6WaH6pjtYaGnoRpSI/SvbrgRuMS219fXG3Coc1/DpzIYarHY6LEoWkmrfH1SO2DpR+aWVPC1TKGnDtIdbXE8wQYT6fd5cy2gcPUqKsHtd4hEOe8TTiwr8iFdL6vygRtJbtzt9wvrSBmhQ79DgyBMOYgTjUEzNE21gQTjpz55hR5FRnww7ag6d9iv1cU9dU4qERC1poBdvn1+V/TuvKdEfBc9OOEgv0R9ynBXQuS4t0zYNTJUl6HNqmg1bI2C/4W7I=

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
>
>




Archive powered by MHonArc 2.6.18.

Top of Page