Jump to content

Create polylines with the starting point selected at the end of the program


Isaac26a

Recommended Posts

Hi friends, I hope you can help me to solve this question that I have, I want to create a polyline or a line with entmake but, let's say I want to create a the next polyline with the following points ( (1,1,0) (2,2,0) (6,5,0)) that is kind of simple, but I want this polyline start from a selected point at the end of the program, I mean is like a polyline created like a ghost, and defined at the end when you pick the starting point, so if I pick the point (10,10,0) the polyline becomes ((10,10,0) (11,11,0) (15,14,0)). I have seen programs that do that but I still don't know how to, thanks in advance for your help

Link to comment
Share on other sites

Alright... so then I'm assuming that ((1,1,0) (2,2,0) (6,5,0)) are the "vectors" of the polyline indicating the direction of where the polyline shall be drawn... and then you want to click a point somewhere to draw the polyline in that exact direction from the picked point.

 

Assuming that you already obtained vec = ((1,1,0) (2,2,0) (6,5,0)) and pt = (10,10,0), you can get the list of points of your polyline using the below:

(mapcar '(lambda (x) (mapcar '+ x pt)) vec)

 

Hopefully that will give you a start and then be able to make your 'ghost' polyline.

Link to comment
Share on other sites

11 hours ago, Jonathan Handojo said:

Hopefully that will give you a start and then be able to make your 'ghost' polyline.

Thank you Jonathan Handojo, didn't know about grvecs, I think now I have homework to do.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...