formZ SDK | 4.0 Call Back Reference | Object Type

fz_otyp_cbak_cvsl

Description

Object type cvsl function (Optional). This function is called to retrieve extended geometric information about the object : center of gravity, volume, surface area and perimeter length (hence the abbreviation cvsl). Since not all of these properties can be calculated for an object, the result parameter returned to formZ tells which properties were calculated by the function, by setting certain bits to on.


bit 0 : center of gravity was calculated
bit 1 : volume was calculated
bit 2 : surface area was calculated
bit 3 : perimeter length was calculated


For example, the perimeter length can only be calculated for curve like objects but not for solids. Therefore, for solids, bit #3 should not be set. For convenience, both the object and a pointer to the parameter block are passed in.

Plugin Prototype

fzrt_error_td fz_otyp_cbak_cvsl(

fzrt_int

windex,

fz_objt_ptr

obj,

fzrt_ptr

parm,

fz_xyz_td *

cog,

double *

volume,

double *

surf_area,

double *

length,

fzrt_int *

result )

Parameters

windex [Input]

project window index

obj [Input]

object

parm [Input]

generic pointer to the parameter block

cog [Input, Optional]

the object's center of gravity

volume [Input, Optional]

the object's volume

surf_area [Input, Optional]

the object's surface area

length [Input, Optional]

the object's perimeter length

result [Input]

bits, indicating which parameters were actually calculated.

Returns

Error codes

Availability

5.0.0.0

Function Set

fz_otyp_cbak_fset


Defined in

fz_otyp_api.h