I'm quite new to blender so please, any help you can give is much appreciated.

I am trying to measure the volume of an irregular object (e.g. a mold of clay) on either a concave or convex surface (such as the back of a hand).

The file is .stl and is a non-solid mesh.

I know that Blender comes with 3D printing tools to take these measurements but I am having problems making the object solid (taking into account the curvature of the surface) to take this volume.

Unfortunately, the surface cannot be scanned alone beforehand to subtract from the surface+clay image.

The ultimate dream is to write a python script to take a user defined area (e.g. the borders of the clay mold) and somehow measure the volume taking the curved surface into account. But at the moment, any advice on how to go about this with blender would be great.

EDIT: Here are some images of the file and what I am trying to achieve. I am trying to measure the indented suface in the 2nd image, taking into account the curvature shown by the side on profile in image 1. (Thanks).

side on profile of clay on back of hand undersurface of the stl file

  • $\begingroup$ What do you exacltly mean by saying "non solid mesh"? May you post an image of the .stl? Till the mesh is watertight there should be no issue with the curvature in volume calculation. $\endgroup$
    – Carlo
    Aug 25, 2015 at 22:30
  • $\begingroup$ Hi Carlo - thanks for your comment - I have uploaded some images to try and clarify the point. Sorry if any terms I am using are unclear. Thanks for your help. $\endgroup$
    – Cato
    Sep 6, 2015 at 21:19
  • $\begingroup$ To get the volume of a mesh you'll need to define a closed surface. Cut away the parts of the surface that you are not interest in and close the holes with faces (you can remove them after the calculation). Than use the script below or the dedicated button in the 3D print toolbox add-on. If it doesn't work, maybe your mesh has some peculiarities that we can't see from the screenshot. In this case, I'll suggest to uplad it to blend-exchange.giantcowfilms.com so we can inspect it deeply $\endgroup$
    – Carlo
    Sep 6, 2015 at 22:25

1 Answer 1


The quick and dirty way would be this:

  1. First use a remesh modifier with a fairly high number of iterations (at least 7), to keep a the fidelity high. The remesh modifier will automatically close off your mesh and make it watertight.

  2. Use bmesh to calculate the volume:

import bpy, bmesh

o = bpy.context.object

bpy.ops.object.modifier_add( type = 'REMESH' )

remesh = o.modifiers[ len( o.modifiers ) - 1 ]
remesh.mode         = 'SMOOTH'   # Remesh type smooth
remesh.octree_depth = 7          # 7 subdivision levels

d   = o.to_mesh() # Create a temporary mesh with modifiers applied
bm  = bmesh.from_edit_mesh( d )
vol = bm.calc_volume()
  • 1
    $\begingroup$ Even easier than the python script, enable the 3d printing toolbox addon and it has a button to calculate the volume. $\endgroup$
    – sambler
    Aug 26, 2015 at 4:19
  • $\begingroup$ Actually that't true, if you don't want to use a script, just apply the remesh modifier and then use the 3D printing toolbox to get the volume. $\endgroup$
    – TLousky
    Aug 26, 2015 at 12:33
  • $\begingroup$ Hi TLousky - many thanks for your post. In response to Carlo I have posted some images to try and clarify what I am trying to achieve. I need to somehow measure the indent shown in the 2nd image in my post alone. I tried seperating the clay mold as a seperate object then solidfying the clay object. I then "remeshed" the surface it was on, hoping it would repair the hole in the mesh and create a curved surface that I could then apply a Boolean to and end up with a solid mold of clay with a curved base. But this didn't work (the surface created with the remesh wasn't curved). $\endgroup$
    – Cato
    Sep 6, 2015 at 21:21
  • $\begingroup$ Thanks also for using the code - ideally this is something that I want to keep as simple as possible. Which would allow people with very little computer experience to follow some simple steps. If there was a solution to make the whole process code and the user could just run the script, it would be ideal. $\endgroup$
    – Cato
    Sep 6, 2015 at 21:29
  • $\begingroup$ If I run this , I am getting error "scene not specified" . d = o.to_mesh() in this line.please tell me what to do .@TLousky $\endgroup$
    – kpdkps
    Mar 23, 2016 at 6:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .