hello christophe,
sorry for bothering,
first of all, the partition_3 in your fille looks ‘wrong’ for me in salome.

for you question,
well, currently, I have developed a complete script that, takes as input a blocked and not blocked geometry (ie cad for structured meshing). it mesh the blocked geometry and then it smooth it out in volumetric (so 3D) this work great, i also identified the nodes with each feature of the blocked geometry. then the idea (which is the last step of this workflow) is from the nodes positions recreate the blocked geometry but smoothed (so a cad for structured meshing BUT smoothed), so then one can use this cad model and get smoothed meshes.
this works until this problematic surfaces (torus), i can rotate the torus using (at least what i found possible a reconstructed axis from geompy.KindOfShape data, but this gives issues as i imagine that are the numerical errors (slight different decimal points) that make that the edges are not directly overlapsed with the original face (that was rotated) so i would like to ‘not recreate the original face and use the original one’ as i have spended almost a week trying that way and it gave a lot of problems. the vertexes (points) are also projected over the surface before creating the edges, the workflow is:
create vertexes (corners of blocks) if they are associated with an edge or a face they are projected
create edges that uses the previously created vertexes and also project them to a face if they are associated and if they are ‘over’ an original edge simply get the new edge by partition (as i mentionned previously ‘with the problematic edge’)
and then create the faces if they are external ones, using the faces of the not blocked geometry and ‘cuts it using the edges created’ if they are internal it fills them using the edges.
right now, i could do what you mention, but this is because it is the before smoothed blocking, so it is a simple rotation the face, but after smoothed out the face could take another form and therefore this would not be possible.
i am at more than 2.5k lines, and this is the only blocking point. even if the blocked geometry does not have torus this would not be an issue. I would like to solve it specially when i clearly see that in the GUI it works as expected.