Jump to content

Rectangle around an object


Recommended Posts

Here is a good one, does anyone know how to draw a rectangle around the an object such as a spline or is there a way to find the edge of an object on the top bottom and sides, i know snapping to the object works but on complex objects you have to zoom in alot to find the farthest edge on an object, is there a command to find this

Link to comment
Share on other sites

It sounds like you are looking for the minimum enclosing rectangle required to surround an object. Is that correct?

 

What version of AutoCAD are you using? I know of one lisp routine that will work in older releases of AutoCAD (ex. - AutoCAD 2007). It might work in newer versions too but I know it needs an additional line of code, which I have seen mentioned here, but at the moment I can't recall what it is.

 

UPDATE.

 

I do believe I found the answer for making the routine work in a newer release of AutoCAD such as 2012 where I tested it this morning. All I had to do was add one line: (vl-load-com).

 

I'll post the lisp routine momentarily. But first I must give credit where it is due. The lisp routine BBOX was written by forum member R.K.McSwain and posted to the AutoCAD 2007 Discussion forum on 12-06-2006. I did not write it. With the exception of the one line I mentioned the code is in its original form. I named the lisp routine MinEncBox.lsp (Minimum Enclosing Box). Use the APPLOAD command to load it and type BBOX at the command line to start it.

 

MinEncBox.lsp.txt

 

Note: You'll have to edit the name of the file that I uploaded by removing the .txt file extension first.

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