Jump to content

array offset..?


Rainy-Day

Recommended Posts

Hi, I needed to make a bunch of concentric circles (something like 30 or 40), and I used offset command;

I'm wondering if there's a way to 'array offset'? It's already done and wasn't that difficult, but I just

have to know.. thx!

Link to comment
Share on other sites

Hi, I needed to make a bunch of concentric circles (something like 30 or 40), and I used offset command;

I'm wondering if there's a way to 'array offset'? It's already done and wasn't that difficult, but I just

have to know.. thx!

 

Here you have one. It's not perfect by any means but it works. On the prompt "Side to offset", you just have to pick point far enough. Try it, you'll see.

(defun c:ffs (/ a b e d f oecho)
 (initget 7)
 (setq	a (getint "\n Number of offsets: ")
b (getdist "\n Offset distance: ")
e (entsel "\n Select entity to offset: ")
d (getpoint "\n Side to offset: ")
f b
oecho (getvar "cmdecho")
 )
 (setvar "cmdecho" 0)
 (repeat a
   (command "offset" b e d "")
   (setq a  (- a 1)
  b (+ b f)
   )
 )
 (setvar "cmdecho" oecho)
 (princ)
)

Edited by paulmcz
Link to comment
Share on other sites

  • 5 years later...

Try this too...

(defun c:mof()
 (setq enty (car (entsel "\nPick Object:")))
 (setq ofs (getreal "\nOffset Value:"))
 (setq side (getpoint "\nSide to Offset:"))
 (setq reps (getint "\nRepeats:"))
 (setq i 1)
 (setq osm (getvar "OSMODE"))
 (setvar "OSMODE" 0)
 (repeat reps
   (command "_Offset" offset enty side "")
   (setq offset (* ofs i))
   (setq i (1+ i))
 )
 (setvar "OSMODE" osm)
 (command "_REGENALL")
)

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