1
$\begingroup$

How can I extract volume and surface information from objects?

  1. I create an objects (e.g. a monkey).
  2. With a Python command how do I extract an object's information like: volume, surface, location etc.?

enter image description here

$\endgroup$
0

1 Answer 1

2
$\begingroup$

I found that:

import bpy, bmesh
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bm = bmesh.new()
bm.from_mesh( bpy.context.object.data )
ref_obj_name     = bpy.context.object.name
volume = float( bm.calc_volume() )
print(volume)

and zawardo for all...

$\endgroup$