Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Volume of Solids

  1. #1
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Question Volume of Solids

    Hey everyone,

    Anyone know of a command that can calculate volumes of 3d shapes?

    Thanks for any help!

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Volume of Solids

    Try this:

    Code:
    (defun c:3DVOL (/ eName 3dObj)
      (vl-load-com)
      (if (and (setq eName (car (entsel "\n  >>  Select 3D Object for Current Volume: ")))
               (= "3DSOLID" (cdr (assoc 0 (entget eName))))
               (vlax-property-available-p
                 (setq 3dObj (vlax-ename->vla-object eName))
                 'volume))
        (princ
          (strcat
            "\n  <!>  3D Volume = "
            (rtos (vla-get-volume 3dObj) 2 2)
            "  <!> ")))
      (princ))
    Last edited by RenderMan; 2010-09-28 at 04:31 PM. Reason: Renamed the command from c:FOO to c:3DVOL
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Question Re: Volume of Solids

    So....anyone know of another way to find the volume of 3D shapes!?

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Volume of Solids

    Quote Originally Posted by William.Gares View Post
    So....anyone know of another way to find the volume of 3D shapes!?
    Did you try the command I provided you?
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Question Re: Volume of Solids

    No, what exactly are you recommending I type in the command box????

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Volume of Solids

    Quote Originally Posted by William.Gares View Post
    No, what exactly are you recommending I type in the command box????
    I've provided you a LISP routine, which when loaded into AutoCAD provides you a keyboard command that does exactly what you want.

    To make this a little easier for you, I've uploaded a .LSP file that you can download, and have renamed the command from FOO (a common test function name) to 3DVOL (what you should enter at the command line shortly).

    For starters, I'd like you to test the routine to make sure you understand it's use, and if you want to keep it (this is your decision), I'll gladly help you make it available to you at all times.

    So to make the 3DVOL command available, open AutoCAD, and drag the downloaded file (from Windows Explorer) into your drawing area (either in Modelspace, or Paperspace, i.e., Not on a toolbar, etc.). Then enter 3DVOL at the command line and hit Enter... follow the prompts.
    Attached Files Attached Files
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  7. #7
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Default Re: Volume of Solids

    Ok, I drug the file from my desktop into the model space. It verified it was loaded in the command box. Once I typed "3DVOL" it prompted me to "select 3D object for current volume". Once I selected the object no other prompts were given.

  8. #8
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Volume of Solids

    Quote Originally Posted by William.Gares View Post
    Ok, I drug the file from my desktop into the model space. It verified it was loaded in the command box. Once I typed "3DVOL" it prompted me to "select 3D object for current volume". Once I selected the object no other prompts were given.
    OK, that mean that either the object you selected is not a "3DSOLID" or the property test failed.

    Would you be willing to post a sample drawing for the object you selected for me (save as 2007 File format)? Then I can see exactly what entity you're working with.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  9. #9
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Default Re: Volume of Solids

    Sure...hope this helps. It gave me some trouble saving to 07, not sure how much of this is compatible. I am working with Civ 3D 2010.
    Attached Files Attached Files

  10. #10
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Volume of Solids

    The routine works for me, William.

    I've revised the code to permit selecting multiple 3DSOLID's, and returning a Total Volume.

    Enjoy!
    Attached Files Attached Files
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Page 1 of 2 12 LastLast

Similar Threads

  1. Select/Delete solids by volume.
    By p.bakardjiev in forum AutoLISP
    Replies: 6
    Last Post: 2023-06-29, 02:08 PM
  2. Volume from solids
    By Wish List System in forum NavisWorks - Wish List
    Replies: 2
    Last Post: 2016-12-07, 11:25 AM
  3. 2015: Répercussion d'un paramètre partagé de matériaux d'un volume vers ses sols de volume
    By eric.lehy-meira695599 in forum Revit Architecture - General
    Replies: 2
    Last Post: 2015-04-22, 10:25 AM
  4. Volume of solids?
    By patricks in forum Revit Architecture - Families
    Replies: 0
    Last Post: 2006-08-24, 02:31 PM
  5. Fields for mass and/or volume of 3D Solids
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-02-07, 07:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •