Closed andrewfu77 closed 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
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.
Resolved by #46
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.