formZ SDK | 5.0 API Reference | Project | Modeling | Objects | Analysis
Description
Calculates the center of gravity of an object.
Depending on which topology type is encountered, different
algoritms are used :
POINT : The coordinate
OPEN/CLOSED WIRE : Weighted average of segment midpoints
SINGLE FACE SURFACE : Face cog
SURF SOLID AND
MESHED SURFACE : Weighted average of all face cogs
SOLID : Volumetric cog
MIXED TOPOLOGY : Average of all facetted coordinate points
Plugin Prototype
fzrt_error_td fz_objt_alys_get_objt_cog(
fzrt_int | windex, |
obj, | |
cog ) |
Parameters
windex [Input]
project window index
obj [Input]
object
cog [Result]
center of gravity
Returns
Error codes
Availability
5.0.0.0
Example Files
See Also
fz_objt_alys_get_objt_volume, fz_objt_alys_get_objt_area, fz_objt_alys_get_objt_moments, , fz_objt_alys_get_objt_bbox,, , fz_objt_alys_set_objt_origin,, fz_objt_alys_get_objt_topo_type,, ,
Function Set
Defined in