Extrude Points?

Is there any way to extrude points to create lines?

I have sets of hundreds of coplanar points that I would like to create lines radiating from in the same direction.

If you are familiar with grasshopper there is a component that does exactly what you want:

‘Line SDL’ asks for a point, a direction vector and the desired linelength and generates lines from that.

https://rhino.github.io/components/curve/lineSDL.html

Someone wrote a script to do this… I think @vittorio? or maybe @clement?

Try the attached Python Script.

import rhinoscriptsyntax as rs
def estrudi_punti():

rs.Command("_line")    #draw the line you want
line=rs.LastCreatedObjects()
ps=rs.CurveStartPoint(line)
print "ps"+str(ps)
points=rs.GetObjects("Select points",1)
rs.EnableRedraw(False)
print points
for point in points:
    vect=rs.VectorCreate(point,ps)
    rs.CopyObject(line,vect)
rs.EnableRedraw(True)

estrudi_punti()

Vittorio

@bigjimslade, here is another one: ExtrudePoints.py (1.3 KB)
_
c.

btw @all, i totaly forgot this, in V6 you can extrude points into lines by using the gumball.

_
c.

heh heh - yeah, I was holding that back so as not to stress mac users with things they can’t have! (yet, of course)

-Pascal

Oh, are there more goodies hidden under the hood for that reason we don’t know yet ?

You can tell us everything, we keep it a secret :crossed_fingers:

_
c.

1 Like

Well, you know how Rhino 6 for Windows lets you know when it’s 10 minutes to 5 and pours you a drink? Rhino Mac does not have that yet but I didn’t want anyone to feel bad.

-Pascal

4 Likes

Thanks all for the help. I’ll try these scripts out.

I have people anxiously waiting for me to draw some plans which has me waiting for the new Make2d which has me waiting for V6.

Hi, I am using this script at the moment, I have added _SelGroup to the start so I can auto select a group and extrude the points.

Can anyone tell me what would I would need to change/add to the script to automatically select the base point and move down the Z axis a set distance, eg. base point 0,0,0 and move along Z by 50mm?

Thanks,

Hi @jedhammerman, easiest is to create a button having this button command:

_Select _Pause
_-RunPythonScript ExtrudePoints.py 0,0,0 0,0,50

Note that you need to either provide the full path to the script or set a searchpath under:

_EditPythonScript > Tools > Options > Module search paths

_
c.

Thanks Clement, that did the trick,

Although for some reason to move down Z 50 I had to use 0,0,0, 0,-50,0 ,
(I would have expected it to be 0,0,-50)

not sure why, but it’s working.

Jed