Python Scripting

Hi guys,

I am new to python scripting for grasshopper so please don’t judge the terrible first time attempt :smiley:

Can somebody have a look at the grasshopper script in the attached picture and explain to me how that can be achieved in python please. The fake script i attempted has also been attached.

I think my main problem at the moment understanding how to use the input and outputs from a component inside of python. It will be really appreciated if someone can explain that to me please. I will also appreciate if someone attempts to write the background script in python so that I can see where I am currently going wrong.

I’ve been fighting with this script for a few days now with no luck whatsoever :sob:

Thank you guys.Python.gh (17.2 KB)

Hello
First thing in the Grasshopper definition, uv coordinates you want to evaluate the surface at are outside the surface, so you need to use surface closest point and input any point you want -center points for example-, then get the uv coordinate to evaluate the surface.


Please confirm if that what you aim, so I try solving the python issue.

Thank you for your reply D.K

I am trying to extract the top or bottom surface of the brep

1 Like

Python1.gh (18.7 KB)
sorry for the delay, here is the code in python, it could be less than this but I tried to be make it more clear, and tell me if you have any concern

1 Like

Thank you very much. You are a legend. You have answered the vital question on how to make use of the output and input of a component in the python script. Thanks a lot.

1 Like