PDA

View Full Version : Calculating Volume of a Solid in a Block



c_c_hogan
2009-07-17, 10:24 PM
I am creating a warehouse model. The model consists of several rectangular, named, locations. I thought AutoCAD's box solid would be perfect for this project. I was hoping to define a location block with a location ID attribute. I'd then be able to pick a location, read the location ID, and calculate the available volume.

Now that I've started building the model, MASSPROP won't tell me the volume of the solid inside a block. I also thought I'd be able to scale the block to different dimensions as I inserted it. However, the INSERT dialog box won't let me scale X, Y, and Z independently for this block.

At this point, I'm thinking that I would be better off using a 2D polyline that has Thickness set to simulate a 3D object. Then I would be able to use good old-fashioned math to calculate the volume.

Is there a way to work with solids that are inside a block? Or would the 2D method be a better solution?

Thanks for any input!

Chris

(PS: AutoCAD 2010)

nextvkin
2009-07-23, 03:48 AM
Why not just use a box (3dsolid) & make copies, then use press/pull to change the size of each one, that way you can use massprop to id each one - no maths required.

BTW you should be able to insert independently in the x,y,& z directions - maybe you had uniform scale and/or explode checked in the insert dialog box.

c_c_hogan
2009-07-23, 07:36 AM
Thanks for the suggestion. However, I am identifying each location via block attributes. If I just make a box and copy it, I'd have no way of identifying what location it is.

I solved the problem by using a 2D polyline with width and thickness set. It makes a nice box that can be used in a block. I set the dimensions to 1" for length, width, and thickness. I can then insert the block to my needed dimension via x, y, and z scale. A simple entget retrieves these values for volume calculation.

As for problems inserting blocks with independent x, y, and z scales, I found I have the same problem with this block. However, I only have the problem when using the insert dialog box. If I use -insert, I have no problem inserting with independent scales. The explode and Uniform Scale check-boxes are not set. I'm wondering if there is a bug in the dialog box. No big deal though, I've used the command line for years longer than dialog boxes. I started out on r10. The first time I remember a dialog box for insert was r13.

Thanks,

Chris