My aim is to write a Python program that extracts the volume of the object in a STEP
file. I was able to find that steputils and aoxchange are the two libraries present in Python but neither of them seemed to contain enough documentation about extracting the volume/properties from the file. Is there any document available that can explain this? I tried a similar use-case for STL
files and was able to achieve it successfully using numpy-stl. I'm searching for something like numpy-stl for STEP
files. Below is a sample code of how I achieved it for STL
files.
import numpy
from stl import mesh
your_mesh = mesh.Mesh.from_file('/path/to/myfile.stl')
volume, cog, inertia = your_mesh.get_mass_properties()
print("Volume = {0}".format(volume))