16horse Posted November 6, 2010 Share Posted November 6, 2010 Is there a command or Lisp routine that creates a 3dbox which sides are adjacent to a drawing? Something like a 3d boundary-space that contains everything you might have created.. Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 7, 2010 Share Posted November 7, 2010 It doesn't sound familiar. Quote Link to comment Share on other sites More sharing options...
CALCAD Posted November 7, 2010 Share Posted November 7, 2010 16horse, you might try asking this question in the Autolisp forum. I'm pretty sure there is a lisp solution for it. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 8, 2010 Share Posted November 8, 2010 EXTMAX & EXTMIN are the values of your drawing in a plan view not sure if theres extz (setq pt1 (getvar "extmin") (setq pt1 (getvar 'extmax") (command "rectang" pt1 pt2) then extrude or thickness Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 9, 2010 Share Posted November 9, 2010 Extmax & extmin gives you the bounding box values including z's -20,-20,-10 821,574,50 (setq pt1 (getvar "extmax")) (setq pt1x (car pt1)) (setq pt1y (cadr pt1)) (setq pt1z (caddr pt1)) (setq pt1new (list pt1x pt1y)) (setq pt2new (list pt2x pt2y)) rectang 2d points then extrude z height. can be done easy Quote Link to comment Share on other sites More sharing options...
CALCAD Posted November 9, 2010 Share Posted November 9, 2010 Based on BIGAL's idea, here's a simple lisp : ; 3dbe.lsp - 3D bounding box using Extrude command (defun c:3dbe (/ osave ce pmax pmin pmaxx pmaxy pmaxz pminx pminy pminz) (setq osave (getvar "OSMODE")) (setvar "OSMODE" 0) (setq ce (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setq pmax (getvar "EXTMAX")) (setq pmin (getvar "EXTMIN")) (setq pmaxx (car pmax) pmaxy (cadr pmax) pmaxz (caddr pmax)) (setq pminx (car pmin) pminy (cadr pmin) pminz (caddr pmin)) (command "._RECTANGLE" (list pminx pminy pminz) (list pmaxx pmaxy pminz)) (command "._EXTRUDE" (entlast) "" (abs (- pmaxz pminz)) 0) (setvar "CMDECHO" ce) (setvar "OSMODE" osave) (princ) ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.