-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the volume and surface area of a shape? #142
Comments
I would also like to know if this is possible! |
You could use opencascade directly to do this: const { getOC} = replicad;
export function measureVolume(shape) {
const oc = getOC();
const properties = new oc.GProp_GProps_1();
oc.BRepGProp.VolumeProperties_1(
shape.wrapped,
properties,
false,
false,
);
const volume = properties.Mass();
properties.delete();
return volume;
} Not very user friendly. So I added a set of measure helper to do that |
Thanks a lot for implementing this directly! I tried using measureVolume() but the function never returned (maybe I was too impatient and it just takes minutes). |
Hi @sgenoud,
Is there any way to get the volume and surface area of a solid shape with Replicad?
Thanks a lot!
The text was updated successfully, but these errors were encountered: