Make code fully parametric by being able to add an input node like the merge component

rhino
grasshopper
python
list
data-tree

(Cubsfan685) #1

My problem is a bit complex.

To explain what I am doing first:
The goal is to take vertices from rhino or grasshopper geometry and use it to tell a drawing robot car where to go. I already have the code written for the robot to draw. This script will convert the vertices to the commands in the python script for the car. The python script contains the definitions goto() which makes it move to a point, and penUp()/penDown() which moves the pen up and down.

My code successfully turns the points into those commands and orders them correctly, but in order to add a polyline to the list of lines to draw I have to add input nodes to all the explode trees, entwines, and a merge and copy a cluster for it to work again.

Does anyone know of a way to incorporate the “add input node” idea into the beginning of the script to make adding polylines easier?

My grasshopper code is attached below and includes internalized rhino geometry

Thanks

Combine lists3.gh (26.0 KB)


(Michael Pryor) #2

You will have to make a compiled component for that I believe, like with visual studio.


(Cubsfan685) #3

Do you have any suggestions on where to start or what to do for something like that? I have never done that before.

Thanks!


(David Rutten) #4

@Michael_Pryor is right. You can start by downloading the SDK documentation from the help menu. It has examples for custom made components.


(j porral) #5

Like a more advanced version of this? I’ve never used it, but always thought it could come in handy… (If I remember correctly the blog has other entries with similar examples)