Jump to content

offset multiple polylines from one segment


handasa

Recommended Posts

Greetings everybody

i want a routine lisp or a method to make these polylines equally spaced as show in the attached image

hoping some one to help me saving alot of time of redrawing these polylines which i have alot of them in my drawings

thanks in advance

sorry for my bad English as it's not first language

 

attachment.php?attachmentid=56368&cid=1&stc=1

Capture.PNG

Link to comment
Share on other sites

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • handasa

    9

  • BIGAL

    7

  • YZ

    1

  • TheCADnoob

    1

Top Posters In This Topic

Posted Images

Greetings everybody

i want a routine lisp or a method to make these polylines equally spaced as show in the attached image

hoping some one to help me saving alot of time of redrawing these polylines which i have alot of them in my drawings

thanks in advance

sorry for my bad English as it's not first language

 

attachment.php?attachmentid=56368&cid=1&stc=1

 

i would be tempted to just make a block of the new ones and replace the old ones. I think this would probably be about the same amount of time consumed as i assume the call for the script would be per instance of the geometry. Are there aspects of the drawing which would make this not possible?

Link to comment
Share on other sites

Do you know what the equal distance needs to be? Is it the same every group? Or will some sets have a different equal distance to another set?

 

I could think of a way to write code but you'd still have to click once on each polyline... How many times does the process need to be repeated?

Link to comment
Share on other sites

i will be very grateful if you do ...

if there is a lisp i suggest to ask the user for the offset between lines and ask the user to select the lines/polylines to make them spaced by equal distance acquired in the first step

Link to comment
Share on other sites

Do you know what the equal distance needs to be? Is it the same every group? Or will some sets have a different equal distance to another set?

 

I could think of a way to write code but you'd still have to click once on each polyline... How many times does the process need to be repeated?

 

i will be very grateful if you do ...

if there is a lisp i suggest to ask the user for the offset between lines and ask the user to select the lines/polylines to make them spaced by equal distance acquired in the first step

Link to comment
Share on other sites

You will likely find the following http://www.lee-mac.com/dynamicoffset.html

 

helpful. I haven't used this one, but am quite sure there will be something here that will help you.

This is just one of the great many wonderful lisps made available, quite generously, to the global cad community on Lee's

outstanding site.

 

Thanks Lee! :beer:

Edited by Dadgad
Link to comment
Share on other sites

you will likely find the following http://www.lee-mac.com/dynamicoffset.html

 

helpful. I haven't used this one, but am quite sure there will be something here that will help you.

This is just one of the great many wonderful lisps made available, quite generously, to the global cad community on lee's

outstanding site.

 

Thanks lee! :beer:

 

it didsn't help much ... Thanks though for your reply

this lisp make a copy of the selected lines and offset them as is without offsetting them in between

Link to comment
Share on other sites

I gave YZ a hint on how to pick multiple objects ssget "f" I am out of the office else would have a go at doing something, post a dwg with before and after.

 

YZ. I have a multi fillet lsp any number of lines will post soon on holidays limited internet.

Link to comment
Share on other sites

That will show you equal distances. It will do nothing for assigning or maintaining those distances. The OP is looking for an automated way to move those lines and maintain connectivity. It's gonna require some nifty code.

Link to comment
Share on other sites

You can use divide command (Draw>Point>Divide) for maintaining equal distance.

Let me know if it helps!!

thanks for interesting... But it seems it won't help much as these lines sre already drawn... All what I need is to offset them by equal distance

Link to comment
Share on other sites

Hang in there the answer maybe very easy but I am on holidays and will post a multi fillet lsp that can be modified to do offsets 1st then redo all the line fillets in one go. It really is not that hard if you a re using lines plines will be a problem.

 

As I am moving every day I have limited internet for my laptop.

Link to comment
Share on other sites

Here is the multi fillet as many as you like pick the 3 points as a L will try soon to add the new lines at an offset.

; Multi fillet of multiple lines in one go 
; By Alan H DEC 2015
(defun AH:Fmulti ( / ss fpts num num2 x y)
(alert "pick outside-inside-outside")
(setq fpts '())

(setq fpts (cons (getpoint "Pick outside")fpts))
(setq fpts (cons (getpoint "Pick inside") fpts))
(setq fpts (cons (getpoint "Pick outside") fpts))

(setq ss (ssget "F" fpts (list (cons 0 "LINE"))))
(setq num (sslength ss))
(setq num2 (/ num 2.0))
(if (= (- (fix num2) num2) 0.5)
(progn
(Alert "you have an odd number of lines please check")
(exit)
)
)

(setq x 0)
(setq y (- num 1))
(setvar "filletrad" 0.0)
(repeat (fix num2) ; not a real
(setq obj1 (ssname ss x))
(setq obj2 (ssname ss y))
(command "fillet" obj1 obj2)
(setq x (+ x 1))
(setq y (- y 1))
)

) ; defun
(AH:fmulti)

Link to comment
Share on other sites

Ok part 2 now a multi offset that replaces the number of existing lines with same number of fixed offset lines.

ps next post is answer to original post

 

; change offset lines to fixed spacing
; by Alan H Dec 2015
(defun aH:mulfrom1 ( / pt1 pt2 pt3 num fpts ss1 inc dist)
(setq pt1 (getpoint "\nPick outside"))
(setq pt2 (getpoint "\nPick inside"))
(setq pt3 (getpoint "\nPick outside"))

(setq fpts '())
(setq fpts (cons pt1 fpts))
(setq fpts (cons pt2 fpts))
(setq ss1 (ssget "F" fpts))

(setq num (sslength ss1))
(setq y -1)
(repeat (- num 1)
(command "erase" (ssname ss1 (setq y (+ y 1))) "")
)

(setq dist 0)
(setq inc (getreal "\nEnter offset distance"))

(setq obj (ssname ss1 (- num 1)))
(repeat (- num 1)
(setq dist (+ dist inc))
(command "_.offset" dist obj pt2 "")
)
)
(Ah:mulfrom1)

Link to comment
Share on other sites

Part 3 original request combine the two.

 

Handasa please try to make new lisp only way to learn.

 

Note the Pt3 request in second code. We are here to help so have a go.

Link to comment
Share on other sites

  • 4 weeks later...
Part 3 original request combine the two.

 

Handasa please try to make new lisp only way to learn.

 

Note the Pt3 request in second code. We are here to help so have a go.

 

 

MANY MANY THANKS , Bigal

this helped me alot

... if u can modify the previous lisps to run with commands as every time i need to call them i write in autocad

(Ah:mulfrom1) or (AH:fmulti) which is sort of hard...

 

and many thanks again this is a great idea :)

Link to comment
Share on other sites

@Bigal

if you can modify these lisps to select lines instead of choosing three points this will be a great ... thanks for your interesting and for everything though 8):)

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...