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.
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.
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 
_
c.
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
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
@clement my scripting is a bit dusty, so thought Iād request: Any chance you have/could make a version that would be more like, āExtrude Point(s) Along Curve(s)ā for when you have, say, the outline of a long piece of trim and you want the pts to fill in the interior linework?
Extrude Pts Along Crvs-Option to boundary crv.3dm (2.6 MB)
Note that in V8 you can extrude points with the Extrude command as well as with the Gumball extrude tool.
@Alan_Farkas, can you provide a before and after of what youāre trying to build ? It is not clear from your example file.
_
c.
Note that in V8 you can extrude points with the Extrude command as well as with the Gumball extrude tool.
that does not seem to work here, are you using windows or mac
Sorry, it only works with the Gumball extrude tool. I thought it had also been added to the Extrude command, but I guess not.
Apologies for the delayed response, and thanks for the interest in helping. Hereās what Iām going after:
Could even be a neat option if a script could create the points nec and assign to existing layers (per line thickness) based on thresholds of the (green) profileās crv angles. But thatās a little over-the-top maybe ![]()
Altho it occurs to me maybe the points would want to align vertically upon execution as they would in an elevation, like this:
maybe Offset and Extend