Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert ( ps > 0. || ps2 > 0. && "Unexpected case") in mmg3dBezierCP / surface degeneracy #167

Open
Algiane opened this issue Oct 17, 2022 · 2 comments · May be fixed by #172
Open

assert ( ps > 0. || ps2 > 0. && "Unexpected case") in mmg3dBezierCP / surface degeneracy #167

Algiane opened this issue Oct 17, 2022 · 2 comments · May be fixed by #172
Labels
kind: bug error or fault kind: enhancement enhancement to an existing feature part: mmg3d mmg3d specific

Comments

@Algiane
Copy link
Member

Algiane commented Oct 17, 2022

Commit f57b861 adds an assertion on the fact that at least one of the projections of the 2 normals at a ridge point onto the normal at triangle is positive. This assertion fails on the attached mesh (where .txtextension has to be replaced by .mesh one) with commit 4883d1a and following command line :

mmg3d_debug -v 5 -noswap -nomove temp-with-ridges.mesh

temp-with-ridges.txt

@Algiane Algiane added kind: bug error or fault part: mmg3d mmg3d specific labels Oct 17, 2022
@Algiane
Copy link
Member Author

Algiane commented Oct 17, 2022

First attempt to solve this issue shows that the bug is reproductible without collapses.
In this case, we see surface approximation degeneracy: triangle 12207 with vertices 15103 15104 15105 is splitted by surface patterns (anatets_iso) and point 23015 is inserted at an unexpected position.

Following picture shows initial mesh and some of inserted nodes (from left to right, nodes 23016 23015 23017). The shadows linked to the normals are disabled because smoothing hides the splitting issue (normals have probably suitable values).
Capture d’écran 2022-10-17 à 11 25 49

Next picture shows a more global vue of the mesh with input ridges (mesh has been generated from structural optimization and level-set discretization with ridge detection, which has produces some artifacts).
Capture d’écran 2022-10-17 à 11 26 09. The triangle that creates the issue has 1 regular point (15103) with one normal, 1 ridge point (15104) with 2 normals and one corner/required point (15105) without any normal.

Last picture shows normal at vertices (only the right mesh should be considered as input normals are erased along ridges). We can note that normals seems to have suitable values and that n1 should be used at point 15104 (it has been added by hand from gdb info inside this mesh for visualization purpose).
Capture d’écran 2022-10-17 à 12 39 39

@Algiane
Copy link
Member Author

Algiane commented Oct 17, 2022

Finally :

  • surface point 23015 can't be inserted along the built bezier edge because it creates bad oriented tetra (due to the ridge presence);
  • thus, point coordinates are computed using a dichotomy (see MMG3D_dichoto1) between "ideal point" and point at the middle of edge 15104 - 15103. Last valid parameter computed is t=0.4375.

Algiane added a commit that referenced this issue Nov 19, 2022
…points to non conformal splits to avoid projection issues (when ware are not anymore able to find a positive projection) in mmg3dBezierCP. It fixes issue #167.
@Algiane Algiane added the kind: enhancement enhancement to an existing feature label Nov 19, 2022
@Algiane Algiane linked a pull request Nov 19, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug error or fault kind: enhancement enhancement to an existing feature part: mmg3d mmg3d specific
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant