C# Scripting

Hi All,

I’m new to C# sharp scripting, i am developing a simple plugin that outputs the top and bottom surface of a geometry but i seems there’s an error somewhere in the code that i haven’t managed to locate. When the plug in is brought into Grasshopper and i plug a brep in it, i get the error in the image bellow. Can someone please help me out. I’m also attaching the script for the plug in. I’m working in VisualStudio 2022 btw.

Thank you

TopBottomSelectoSelector.cs (4.3 KB)

You’re selecting a brepface, but the component expects a brep.

I can see that in the error as well, I’m not just sure which part of the script needs to be modified

I hate that thing like my sins (a lot).

Anyway see attached.

BrepFace_GetParToVector_V1.gh (134.6 KB)