trelau / SMESH

Mesh module from the Salome Platform
GNU Lesser General Public License v2.1
50 stars 31 forks source link

MEFISTO2 trte.f/.c #45

Closed andrewfu77 closed 3 years ago

andrewfu77 commented 3 years ago

In extra/MEFISTO2/trte.c, these lines: 1925 and 1968 don't seem to match the original source, trte.f line 1297. I believe this is a mistake, because, as far as I can tell, it looks like the upstream developers mean to invoke this version of the function defined in aptrte.cxx which returns a value as opposed to modifying an out-parameter. They seem to also be relying on undefined behavior, passing extra parameters that are not in the declaration.

looooo commented 3 years ago

In freecad meshing with mefisto fails with:

th. 140131097933056 - Trace ../src/SMESH/src/SMESH/SMESH_subMesh.cxx [2005] : MEFISTO_2D failed on sub-shape #33 with error 2 "Error in Triangulation (aptrte())"

not sure if this is related

trelau commented 3 years ago

The trte.c file I grabbed from FreeCAD repo. At first I tried to implement my own Fortran to C conversion during the build process, but after some attempts it didn't seem work the effort, so just grabbed the file from FreeCAD.

trelau commented 3 years ago

Resolved by #46