SGweight

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Mechanical function
Introduced first in SolidGeometry 2.4, Creation date: 2015-08-26, Last change: 2025-09-14

returns the estimated weight of a solid

Description

Calculated by counting the volume elements that are included by the solid body.
Faster than slicing using SGweight, SGvolume, SGisInterior, VMofSG

See Also: SGweight , SGvolume , SGisInterior , VMofSG

Example Illustration

 missing image of SGweight(SG,sw,res)

Syntax

[W,VM,nd]=SGweight(SG,[sw,res])

Input Parameter

SG: Solid Geoemtry
sw: specific weight; default is 1.15g/cm^3 (Nylon)
res: resolution; default is 2x2x2 mm^3

Output Parameter

W: Estimated weight in gramm
VM: Logical Voxel model
nd: dimensions of VM, same as size(VM)

Examples


loadweb JACO_robot.mat
[W,VM,nd]=SGweight(JC0,'',2); W
SGfigure; VMplot(VM*2000)




Copyright 2015-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21