I know on the Python component input you can set the data input type from surface to Brep if the code in your python such as BrepFace.IsPointOnFace but you are inputting a surface but how to you do change the type from a surface to Brep with Rhino common code. As i need my input to stay as a surface for most of the code but just change to a brep to check if the Closest point on a surface is within the trim boundary using BrepFace.IsPointOnFace.
I know I can use Gh components in python code so could call the Point In Trim Component, but as this is not the first time I have come up against this issue I though I would ask.
Following on from this is it possible for this new Brep to keep the trim boundaries of the original input surface as currently it untrims the surface so when your trying to find if a point is inside a trim boundary on the brep it always is as the surface becomes untrimmed
If you have a surface, that you obtained from a Brep (or BrepFace) and then call Brep.CreateFromSurface, then your new Brep will not contain the trimming information from the original Brep.
If maintaining the trimming information is important, than perhaps using Brep.CopyTrimCurves is a better approach.
Just to be clear, if your input type is surface it will always lose trim data because as @dale said, surfaces don’t have trim data. If you want to get the trim data through the input you need to use brep, because a trimmed surface is a brep.
Ah ok, so my issue is now in the other direction. Brep > Surface. As if I set it as Brep all the surface commands in my code break. I only need it to be a Brep for one line of code.
UPDATE: Found the Answer, this gives me back the untrimmed surface I can use on the rest of the code.