Jump to content

Recommended Posts

Posted

I was looking around and did not know if there was a routine that could unmirror selected blocks then possibly rotate them back to 0?

 

I have been inserting the blocks that have been mirrored for a long time. lol

 

Thanks for any help.

Posted

Here is a simple bit of code that will do it.

(defun c:UnmirrorBlock (/ ss en xscl yscl zscl)
  (if (setq ss (ssget '((0 . "INSERT"))))
     (progn
        (repeat (setq cnt (sslength ss))
           (setq en   (entget (ssname ss (setq cnt (1- cnt))))
                 xscl (abs (cdr (assoc 41 en)))
                 yscl (abs (cdr (assoc 42 en)))
                 zscl (abs (cdr (assoc 43 en)))
                 en   (subst (cons 41 xscl) (assoc 41 en) en)
                 en   (subst (cons 42 yscl) (assoc 42 en) en)
                 en   (subst (cons 43 zscl) (assoc 43 en) en)
                 en   (subst (cons 50 0.0)  (assoc 50 en) en)
           )
           (entmod en)
        )
     )
  )
)

 

  • Like 2

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