Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] On cell deletion, do neighboring cells need neighbors to be specified?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] On cell deletion, do neighboring cells need neighbors to be specified?


Chronological Thread 
  • From: Adam Getchell <>
  • To:
  • Subject: Re: [cgal-discuss] On cell deletion, do neighboring cells need neighbors to be specified?
  • Date: Sat, 22 Oct 2022 16:57:51 -0700
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-data: A9a23:/iv4c6IkpHCp/W3aFE+RAZElxSXFcZb7ZxGr2PjKsXjdYENS1D0Cz DAcDW6GbPjeN2Ojfd8jYNu29E0HuMSDyNBqGgMd+CA2RRqmi+KVXIXDdh+Y0wC6d5CYEho/t 63yTvGacajYm1eF/k/F3oDJ9CU6j+fQLlbFILasEjhrQgN5QzsWhxtmmuoo6qZlmtHR7zml4 LsemOWCfg74s9JIGjhMsfja8Ek15K+aVA4w5zTSW9gb5DcyqFFOVPrzFYnpR1PkT49dGPKNR uqr5NlVKUuEl/uFIorNfofTKiXmcJaKVeS9oiY+t5yZv/R3jndaPpDXmxYrQRw/Zz2hx7idw TjW3HC6YV9B0qbkwIzxX/TEes1zFfUuxVPJHZSwmcO4iBPic1Hz+tVrLG4oEI8Z+uFOC1gbo JT0KBhVBvyCr+e/wbb+U/c1w8p/dY/kO4QQvnwmxjbcZRokacqbEuOauJkChWZ22pkm8fX2P 6L1bRJmYB3FJRJCJlwXBZY6tOitj3j7NTZfrTp5oIJsuDGMnFIui9ABNvLuJe67VZleoXyEm Tz3olbEMzcGKIKQnG/tHnWE37eTx0sXQrk6H7Kx8rtmgUaY23cIIAYHUEOy5/i/kE+3HdxFQ 3H44QIrpKk2sVW1F5zzA0T+r3mDsRoRHdFXFoXW9T1h1ILbyEHHImguUQdhbfwJquI0RDwt7 1WwyoaB6SNUjJWZTneU97GxpDy0ODQIIWJqWcPiZVtbizUEiNFt5i8jXuqPA4bu0YKoQ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WqKXCXhkpTl+uX/2GUqZ5yo4blm Z4HQLtWHFIvEfZSBkNgFd0EaJB5O1Fs2aacl9IN7GGioQP5QcxbutXeSKvXD6m2bjmeirZAa l0Dxra5ZYUfO4vn2lBzP1l3mIOZfiiYFdtJoyBncko1uBAXqCk4HjB1gRu0LF/0sxpxXbauk xU7ixVze7Eo/TbouBIsI0bS4TA3iA83kMnkhjaYdHjwKr2xVMdYEXmR1QB5P5XlTgJydQD3k 1ZjMWKOTr5Yiv1veHxgiALYvbNAHPddSetPZxpalpT1L704lE9RrCmq3xoN/ezeFZ5rjxcna 7appnNEnht9NZs7efWWK61OwVxdwKmJu2X7s4J5iB9bLEEL/mSIfScOs0FdLbgqKR2j+el04 BCDkT9OEIDtf/8jo/Yv711kfurclmTv1LlMLk33POuaffvxU4fomsuBQ1d23UQNxRAtFV1e3 sIqck7SXEcqnuP5Kg==
  • Ironport-sdr: 63548385_5cigX1RfGOScb14rVwbKYlJdZqj2+ih3LFhVBbI1Z03JyU5 G12cmB90DzfZFFSj0XG+zTWLioDGSdtLPbRXwDA==

Hello,

I have investigated further, and it appears I cannot use the tetrahedron_soup_to_triangulation_3 function, even if I manually include all of the files from CGAL.

https://gist.github.com/acgetchell/4737c3bd4c8db622b352ab828622c6e5#file-tetrahedron_soup

There also appear to be complications in using Remeshing_triangulation_3 with my Delaunay triangulation, as Remeshing_cell_base_3 seems incompatible with Triangulation_cell_base_with_info_3 and likewise for the Vertex concepts.

I will look closely at your function and adapt it for my Delaunay triangulation as defined by:

using K   = CGAL::Exact_predicates_inexact_constructions_kernel;
using Vb = CGAL::Triangulation_vertex_base_with_info_3<int, K>;
using Cb = CGAL::Triangulation_cell_base_with_info_3<int, K>;
using Tds = CGAL::Triangulation_data_structure_3<Vb, Cb, CGAL::Sequential_tag>;
using Delaunay = CGAL::Delaunay_triangulation_3<K, Tds>;
using Cell_handle = Delaunay::Cell_handle;
using Edge_handle = CGAL::Triple<Cell_handle, int, int>;
using Vertex_handle = Delaunay::Vertex_handle;
using Point = Delaunay::Point;
Thank you,
Adam
-- 
Adam Getchell
https://adamgetchell.org

On Oct 21, 2022, at 10:35 PM, Adam Getchell <> wrote:

Hi Jane,

Thank you very much for your reply! It was very helpful!

Is there a way to construct a Remeshing_triangulation_3 from a Delaunay_triangulation_3? And thence construct a C3T3 from a Delaunay triangulation thereby?

The example https://cgal.geometryfactory.com/CGAL/doc/master/SMDS_3/SMDS_3_2tetrahedron_soup_to_c3t3_example_8cpp-example.html does not work for me, because the line:

#include <CGAL/tetrahedron_soup_to_triangulation_3.h>

Does not find a file. I did find the file in the repository here:

https://github.com/CGAL/cgal/blob/15238156b9b10d88eac7d08f9b13c6e17fe1c12f/SMDS_3/include/CGAL/tetrahedron_soup_to_triangulation_3.h

However, for whatever reason, the example include statement does not resolve.

I’m wondering if the SMDS directory is not defined someplace in CMakeLists for CGAL.

Here’s my test case:

https://github.com/acgetchell/bistellar-flip/blob/1f415126c794ebfcbc44c7b6c7de1cb7871a13dc/tests/delaunay_to_remeshing_test.cpp

Also, it seems as if the MeshVertexBase_3 is incompatible with a Triangulation_vertex_base_with_info_3 and MeshCellBase_3 is incompatible with Triangulation_cell_base_with_info_3. If so, I have to recalculate and store values once I convert from a C3T3 back to a Delaunay Triangulation (hopefully using the convert_to_triangulation_3() function).

Thanks again for your help.

-- 
Adam Getchell
https://adamgetchell.org



On Oct 18, 2022, at 2:35 AM, Jane Tournois <> wrote:

Hello Adam,

you'd better use the other `flip_n_to_m()` internal function, that is actually calling the one you mention.

See https://github.com/CGAL/cgal/blob/c1c7f4ad9a4cd669e33ca07a299062a461581812/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h#L1013

The parameters are the following :

* edge : is the edge to be flipped

* c3t3 : the Mesh_complex_3_in_triangulation_3 containing the triangulation
* boundary_vertices : a std::vector containing the vertices that share a cell with `edge` and are on a boundary (with respect to subdomains indices)

* criterion = CGAL::Tetrahedral_remeshing::internal::MIN_ANGLE_BASED

* inc_cells : its internal type is a `std::unordered_map<Vertex_handle,
    boost::optional<boost::container::small_vector<Cell_handle, 64> > > `
It contains for each vertex of the triangulation (or at least the vertices that take part into the flip) a container of its incident cells (to avoid computing it too many times)

* visitor : you can stick to the default `CGAL::Tetrahedral_remeshing::internal::Default_remeshing_visitor()` defined in `CGAL\Tetrahedral_remeshing\internal\tetrahedral_adaptive_remeshing_impl.h`

Hope it helps!

Best,

Jane.

-- 
Jane Tournois, PhD
R&D Engineer at GeometryFactory

http://www.geometryfactory.com/
Le 18/10/2022 à 02:16, Adam Getchell ( via cgal-discuss Mailing List) a écrit :
">Hello Sebastien,

Thank you for this response.

I have attempted to use this function directly as suggested, however it is not documented and I’m unable to determine the parameters from reading the source code alone.

My function call looks like:

auto const 
result = CGAL::Tetrahedral_remeshing::internal::
    flip_n_to_m(triangulation
, pivot_edge.value(), top
,

    incident_cells, visitor);

I’ve looked at the code here:

https://github.com/CGAL/cgal/blob/c1c7f4ad9a4cd669e33ca07a299062a461581812/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h#L707

The first parameter I’ve inferred is the triangulation upon which to make the flip.

The second parameter is an edge, which I’ve inferred is the existing edge in the 4-cell complex.

The third parameter is a Vertex_handle, which I’ve inferred is a non-participatory vertex in the flip. That is, the edge plus this vertex form a facet, and opposite the facet on both sides are the Vertex_handles that the flip will use as the new internal edge when completed. However, I do not know if this is correct.

The fourth parameter is named inc_cells, so I infer these are the incident cells around the given edge. Again, not sure if this is correct.

The fifth parameter is a template type Visitor, and I’m entirely unsure what needs to be provided there.

Any insights would be appreciated. I have an incomplete test case here:

https://github.com/acgetchell/bistellar-flip/blob/master/tests/flip_n_to_m_test.cpp

Thanks,
-- 
Adam Getchell
https://adamgetchell.org



On Jul 5, 2022, at 1:37 AM, Sebastien Loriot ( via cgal-discuss Mailing List) <> wrote:

Hello Adam,

did you already have a look at CGAL/Tetrahedral_remeshing/internal/flip_edges.h

flip_n_to_m() seems to be what you are looking for.

Jane is not around for a few weeks. I'm sure she will get back to
you when she's back.

Best,

Sebastien.

On 6/29/22 22:52, Adam Getchell ( via cgal-discuss Mailing List) wrote:
Hello all,
I’m working on a bistellar flip for 3D triangulations, briefly as follows:
Step 1: Find a candidate edge for which a circulator around that edge obtains 4 incident cells.
Step 2: Get the 2 vertices comprising the candidate edge.
Step 3: Get the remaining 4 vertices in the 4-cell complex (there are 6 vertices in the cell complex).
Step 4: Obtain a new pivot edge between 2 different vertices for which a circulator around that pivot edge would obtain 4 new incident cells comprised of the 6 vertices.
Step 5: Find the 8 neighboring cells of the original 4-cell complex.
Step 6: Delete the old cells.
Step 7: Create the new cells using the same 6 vertices.
Step 8: Assign the 8 neighboring cells to the cells in the new 4-cell complex.
Details here: https://github.com/acgetchell/bistellar-flip <https://github.com/acgetchell/bistellar-flip>
The issue is at the conclusion of Step 8, all cells have been verified as valid, cell orientations have been verified/reoriented, but the triangulation itself is not valid.
The error is: “neighbor of c has not c as neighbor”
My question is, do I also need to track the 32 neighboring cells of the 8 neighbors of the 4-cell complex being flipped? (And in my test case, the 8 neighbors are all infinite.)
Is there some other mistake?
Thanks for your advice,
Adam
P.S. I have looked at the Tetrahedral Remeshing package at Sebastien Loriot’s suggestion. I’m presently unsure if any of those functions (e.g. construct_opposite_vector_3_object()) are relevant.
-- 
Adam Getchell
https://adamgetchell.org <https://adamgetchell.org>
-- 
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










Archive powered by MHonArc 2.6.19+.

Top of Page