Jump to content

Find the mass of an object


Recommended Posts

Posted

Dear friends

i have modelled a 3d object and i have it s density.i want to calculate

it s mass.i can get volume by massprop command but i don't want to use calculator to multiply volume and density.

 

Is there any way to get the real mass by massprop command or other command?

Posted

You try to avoid using Autocad's built-in calculator?

Click here and read the post #58, maybe you can get some use from.

Posted

thanks

i couldn't finf post 58 please help more

Posted

i didn,t mean the acad calculator.i mean i don,t want to use a windows calculator.

if you can find a simple way by acad calculator please tell me

Posted (edited)

If you want to calculate mass with volume density it is easy. There is this thing called the magic triangle. It goes mass over volume beside density:

 

mass=volume x density

volume= mass/density density= mass/volume

 

I don't understand what is so difficult about the math that using a calculator of any kind would be a problem. Your ACAD calculator should be on your standard toolbar. If not go to the customize user interface and put it there.

 

Solid Works can calculated mass automatically, but that won't really help you unless someone has modeled this in SW and sent you a dxf or dwg file.

Edited by Ryder76
After thought...
Posted

dear friend

thanks a lot for your comment.really i know the formula of calculating mass.i want to calculate

the mass for many pieces may be 1000 pieces so it takes long time to calculate by calculator.

i need a command or lisp that help me insert the density as input and then get the mass from

massprop command.

kind regards

Posted

dear fuccaro

i could not find my answer in the link.there was not any thing about mass.

Posted

Select some solids and run that lisp routine. You will got a list: If the selected objects are made from steel, the mass is .... If they are made of brass, the mass is...

Something like this:

--------------------
OL   (7.85): 951436421644.514
Cu   (8.96): 1085970743685.968
Al   (2.70): 327245648208.941
CuSn (8.15): 987797049223.285
CuZn (8.35): 1012037467609.133
--------------------

On each line, first there is the material name, the density and the nameYou can edit the list to add the names and densities for the materials you use.

Posted

i think the link that you gave me is wrong because there was not any lisp about mass

Posted

Check out post #58 of that thread. He has a lisp that has what you want. I would have included the link here, but I don't have enough posts.

Posted

Here is the code again. Edit the list at the end to suit your needs.

(defun SumVolume ( / getvolume volume ss i ) 
   (defun getvolume ( object / area ) 
       (vl-catch-all-apply 
          '(lambda () 
               (setq volume 
                   (vla-get-volume 
                       object 
                   ) 
               ) 
           )    
       ) 
       (if volume volume 0.0) 
   ) 
   (if (setq volume 0.0 ss (ssget)) 
       (repeat (setq i (sslength ss)) 
           (setq volume 
               (+ volume 
                   (getvolume 
                       (vlax-ename->vla-object 
                           (ssname ss 
                               (setq i (1- i)) 
                           ) 
                       )    
                   ) 
               ) 
           ) 
       ) 
   ) 
   (if volume volume 0.0)
 (princ
   (strcat "\nMAT.  DENS.    Kg \n--------------------"
    "\n" "OL   (7.85): " (rtos (* volume 785e-)
    "\n" "Cu   (8.96): " (rtos (* volume 896e-)
    "\n" "Al   (2.70): " (rtos (* volume 270e-)
    "\n" "CuSn (8.15): " (rtos (* volume 815e-)
    "\n" "CuZn (8.35): " (rtos (* volume 835e-)
    "\n--------------------\n"
    )
   )
 (textscr)
 (princ)
 )

To start the program, enter (sumvolume) in the command line

Posted

I should try this too.. thanks!:)

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