Jump to content

Set UCS & Dimensioning 3d solids


Sekar

Recommended Posts

Maybe useful is to get a bounding box of the 3d block or solid.

 

(setq obj (vlax-ename->vla-object (car (entsel "pick object "))))

(vla-GetBoundingBox obj 'minpoint 'maxpoint)
(setq pointmin (vlax-safearray->list minpoint))
(setq pointmax (vlax-safearray->list maxpoint))
;minpoint contains the minimum point of the bounding box
;maxpoint contains the maximum point of the bounding box

You can work backwards with this to get X, Y & Z.

 

(setq x (abs (- (car pointmax)(car pointmin))))
(setq y (abs (- (cadr pointmax)(cadr pointmin))))
(setq z (abs (- (caddr pointmax)(caddr pointmin))))

This will give box dimensions.

Edited by BIGAL
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...