Jump to content

Recommended Posts

Posted (edited)

Just sharing a simple script I just wrote, I don't have a question

 

When drawing the hidden lines of stairs steps (the overlap of the lower step hidden under the step above) I thought:

I would like to select all the steps; multi offset them; the offset lines should be selected and gripped, so that I can set them in a different layer (a layer with LType Hidden)

...

 

But feel free to comment, improve, ...

 

;; Multi Offset.  New objects get selected and gripped.
;; For example to make the hidden stairs steps... Select all 

(defun c:moff ( / sel ss pt3 i off_dst obj elast pickset1)
	(setq off_dst (getdist "\nOffset Distanct: "))
	(setq pt3 (getpoint "\nOffset point: "))
    (setq pickset1 (ssadd))
	(princ "\nSelect objects: ")
	(setq ss (ssget))
	
	(setq i 0)
	(repeat (sslength ss)
		(setq obj (ssname ss i))
		(command "offset" off_dst obj pt3 "")
		(setq elast (entlast))
		;;
		(ssadd elast pickset1)
		(setq i (+ i 1))
	)
	;; now grip the pickset (the newly made objects)
	(sssetfirst nil pickset1)
)

 

image.thumb.png.86e2c88ecfa6a93448cbbbc940bf2834.png

 

Edited by Emmanuel Delay

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