Incorrect translation vector comparison for periodic face generation
Hi,
I believe there is an error when determining either translation or rotation for periodic faces. When comparing translation vectors for matched points, an incorrect comparison of absolute norm is made.
Suggested fix - Line 344 of meshGFace.cpp: WAS: if (DX2.norm() > DX.norm() * 1.e-5) translation = false; SHOULD BE: if ((DX2 - DX).norm() > 1.0e-5) translation = false;
This also covers two additional features naturally; (1) It covers the case when norm() returns -0.0 which can occasionally occur. (2) It allows the unusual use of a 'zero translation' case, where periodic faces completely overlap each other in space. I have had to do this for meshing many adjoining parts imported from STEP geometry where the boundaries cannot be edited to remove a slave surface. Periodic faces can then be used to duplicate the mesh at the boundary, followed by Coherence Mesh;
Rotational periodicity should be unaffected.
Best regards, Eric