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: Fri, 21 Oct 2022 22:35:43 -0700
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-data: A9a23:5KgzQK7qpnv+QtULw1gseAxRtOnDchMFZxGqfqrLsTDasY5as4F+v mZLWzuHP/2JZmv9LoonPd+09UsD75WDy4NmGlFv/i09Zn8b8sCt6faxfh6hZXvKRiHgZBs6t JtGMoGowOQcFCK0SsKFa+C5xZVE/fjUAOC6UIYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE0 T/Ii5S31GSNhnglbwr414rZ8Ek15ayo4mtB1rADTakjUGH2xyF94K03fvnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFV7tJOp6iGqE7aua60Tqm0hK6aID+6vR2nRHe545gXBYqhei7vB3S9zx54 I0lWZVd0m7FNIWU8AgWe0Ew/y2TocSq9ZefSUVTv/B/wGXbdyXm89R0XX1mErYl3dhXDl9C9 uExfWVlghCr34pawZq+Q+how909dYzlYN9ZtXZnwjXUS/0hRPgvQY2QvY4ejGp23JkfW6qCD yYaQWIHgBDoahFGPxEYBY41nOqsglHwdjRZrBSeoq9fD237l1YhjuKxYIG9ltqiVMlNzkeHl Ez/9XnbDxBKc/LOxzvV7Sf57gPItXqjBNh6+KeD3vVliVnWym0IAwANTnOgsPyhgwi/XcheI goa4EITQbMa8UWqSpzkQUT9riLY+BEbXNVUHqsx7wTlJrfoDxixG2xaRA5gco0a5OANeBsU9 lC3k9D0LGk62FGKck61+rCRpDK0HCEaK24eeCMJJTfpBfGz/+nfaTqfEL5e/L6JYs7dQm6vn mjbxMQqr/BC0p5RjvTTEUX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93ubqYI/o4Ttn 5xGQ6FSVVg8HPcXQkp/G9lKLJByVzIi2bmV6axArWK5twXUTd5Gs4rvU/uTBbD2Nm/cg+UYI RQPxrz8IMIYMYi6k01uZ19mnZjbTkrdWdcex08pJgQwoUhL7D1/VjhpgxOjOl7ruiZCU6Loz XtUwkNkbO8g9Snh+QIyL1vO/24rlVUp3M7imXaXeSLwK6G5WcdXDTD1vg4/KMCeIU49YAusk EhjLDqBSahWiu4qfGxijUnTtIdEGfNYSYVLZRYRwbecYPBigjE+4m23gFRK4+fIE84ojAwxb ZultG5NwSpmZd8xYLXOfe9HkgQWiaWJsSulkOs2xUVNQiRFuHPXcykOtksSM7AgLCf95e1g5 zuJnD5bcXQNXf4nyhqL3kY0OuDF1jy5lrAfdga+MOuQK67fsG/Fx5bgqrYY2UYBlk0D9r9zg 59Lm6W8WEUmzb/XHBMMZ5OqFA==
  • Ironport-sdr: 63538134_AiRZDpONIx9vO+VTc0btG5u+GGZ5QZXONUrSjDr1yJlPgSN h8WTZBjMuRVheTdsWdU5phSaUssu7Tkh1mPQ6GQ==

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.

-- 

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:


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:


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