In principle, I understand that the Srf Normal is the result of the vector product between the tangents in U- and V-direction. But I am looking to flip the normal without swaping the UVs and swaping the UVs without affecting the Normal dir.
I want to achieve a similar approach like the Dir command were the user can independently modify Normal dir with out swaping UVs, U dir, V dir, and swap UV without affecting the normal .
In c# I am using as an input a Surface - Pass as Brep in order to access the Brep.flip name space, but every time the Brep is flipped the UVs Swap and also when convert the Brep to Surface to implement the transpose() normal is flipped following the principle mentioned above.
I found that BrepFaceList.Flip Method - If true, clears all BrepFace.OrientationIsReversed flags by calling BrepFace.Transpose() on each face with a true OrientationIsReversed setting. If false, all of the faces are flipped regardless of their orientation. Which I assume is the same thing is happening with Brep.Flip.
Can any one help or shine a light on this, how should I approach this? Thanks in advance
Here is the function I made after converting the Brep to a Surface.
public Surface UnifyUVs(bool u, bool v, bool swap, Surface iSrf)
Interval uDomain = iSrf.Domain(0);
Interval vDomain = iSrf.Domain(1);
Interval uDomainNeg = new Interval (-vDomain, -vDomain);
Interval vDomainNeg = new Interval (-uDomain, -uDomain);
Interval vDomainNeg = new Interval (-vDomain, -vDomain);
Surface newSrf = iSrf;
BrepFaces have a reverse orientation flag, which allows you to flip the normal without affecting the underlying surface. This is an important optimisation because half the time a brep-face needs to be flipped when it is joined with other faces, so this flipping needs to be as minimal an intervention as possible.
Surfaces do not have this. The normal direction of a surface is determine by the right-hand-rule and the UV directions. When you convert a BrepFace into a Surface, you lose the OrientationIsReversed information.