@daniel.c wrote:
Hello,
Im kinda new to scripting with python and I would like to convert my messy GH script into python. What I want to do is to convert truss geometry below into python script.
I’ve spend some time searching and trying but it seems I got stuck pretty much in the first steps
import rhinoscriptsyntax as rs #import start & end point of truss, height of truss, segmentation count pt1 = rs.coerce3dpoint(start) pt2 = rs.coerce3dpoint(end) segments = division height = -height #create bottom chord line line = rs.AddLine(pt1,pt2) #divide bottom chord division_points = rs.DivideCurve(line,segments,True,True) #copy points to defined height of truss height_point = rs.CreatePoint(0,0,height) translation_top = pt1-height_point top_chord = rs.CopyObjects(division_points,translation_top) a = line b = division_points c = top_chordI have no idea how to proceed and I would like to ask you guys for some help. Anybody willing to share some thougths on how to make such geometry? Ive tried to search for references but with no results. Thank to anybody willing to help!
EDIT:
GH files attached. (Original one and python one)
Truss_Python_v00.gh (6.1 KB)
Truss_v04.gh (28.0 KB)Dan.
Posts: 2
Participants: 2


