Thanks for your response Andrew! Good to know regarding Breps, this leads me to a few more questions.
For this I am not concerned with trimming, and would prefer to use the Surface data type as an input. I am still not sure why, for instance: if my surface input is faced one direction, that when I output that same surface with no modification through the c# editor, the surface becomes flipped.
EDIT: Never mind, I think you answered this. Just for my clarity: Why would the Surface data type be handled with an underlying brep that has a different normal direction than the Surface? Is there an advantage to this?
I have found that it is not just with the c# editor either, it is true for other components that use the Surface data type as input, and output a surface. The Isotrim component also outputs the subdivisions as flipped. I am working on some dynamic subdivision components in VS and this is true for them as well.
Though, since I want to work with surface direction - and flipping - there has to be a Brep conversion in there.
So, I’m sure you have a solution for this, I noticed that in your Wombat SrfDirection component that you input a Surface data type parameter and output a brep. I tried to replicate this to learn from, however my surfaces are still flipped on the output. Otherwise, it functions the same. What I am finding is that if I input as a Surface type hint, and do something like:
private void RunScript(Surface iSrf, ref object A)
{
Brep brepSrf = iSrf.ToBrep();
Brep newSrf = brepSrf.Faces.ExtractFace(0);
newSrf.Faces.Flip(true);
A = newSrf;
}
the output Brep is still flipped because the input surface is flipped upon input. How else would this be handled? Setting flip to false, because surface input flipping is known to occur? I learned to set Flip to true when dealing with exploding breps and doing things with them, because ExtractFace() does strange things to the Normal directions. If the input data type hint is a brep, I don’t have an issue with the normal flipping. But I would rather it be a surface.
On the other hand, if I use Brep.Faces[0], the face is a tiny version of the original surface. Is there another method to call here that deals with this?
private void RunScript(Surface iSrf, ref object A)
{
Brep brepSrf = iSrf.ToBrep();
BrepFace newSrf = brepSrf.Faces[0];
A = newSrf;
}
Gives this result:
c#_NeedlessSurfaceFlipping_V2.gh (23.9 KB)