naserrishehri@yahoo.com Posted July 27, 2010 Posted July 27, 2010 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? Quote
fuccaro Posted July 27, 2010 Posted July 27, 2010 You try to avoid using Autocad's built-in calculator? Click here and read the post #58, maybe you can get some use from. Quote
naserrishehri@yahoo.com Posted July 28, 2010 Author Posted July 28, 2010 thanks i couldn't finf post 58 please help more Quote
naserrishehri@yahoo.com Posted July 28, 2010 Author Posted July 28, 2010 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 Quote
Ryder76 Posted July 28, 2010 Posted July 28, 2010 (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 July 28, 2010 by Ryder76 After thought... Quote
fuccaro Posted July 29, 2010 Posted July 29, 2010 thanks i couldn't finf post 58 please help more Sorry, it seems that I forgot to post the link. Try this: http://www.cadtutor.net/forum/showthread.php?11722-Contribute-a-tip-become-famous/page2&highlight=density If you can't click it, copy-paste the text in the address bar of your web browser. Quote
naserrishehri@yahoo.com Posted July 29, 2010 Author Posted July 29, 2010 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 Quote
naserrishehri@yahoo.com Posted July 29, 2010 Author Posted July 29, 2010 dear fuccaro i could not find my answer in the link.there was not any thing about mass. Quote
fuccaro Posted July 29, 2010 Posted July 29, 2010 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. Quote
naserrishehri@yahoo.com Posted July 29, 2010 Author Posted July 29, 2010 i think the link that you gave me is wrong because there was not any lisp about mass Quote
Steven Erickson Posted July 29, 2010 Posted July 29, 2010 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. Quote
fuccaro Posted July 30, 2010 Posted July 30, 2010 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 Quote
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.