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);
if(swap)
iSrf.Transpose(true);
if (u)
{
Interval uDomainNeg = new Interval (-vDomain[1], -vDomain[0]);
iSrf.SetDomain(0, uDomainNeg);
iSrf.Reverse(0, true);
Interval vDomainNeg = new Interval (-uDomain[0], -uDomain[1]);
iSrf.SetDomain(1, vDomainNeg);
}
if (v)
{
Interval vDomainNeg = new Interval (-vDomain[1], -vDomain[0]);
iSrf.SetDomain(1, vDomainNeg);
iSrf.Reverse(1, true);
}
Surface newSrf = iSrf;
return newSrf;
}