formZ SDK | 5.0 API Reference | Project | Modeling | Objects | Editing Operations
Description
Decomposes all faces of an object into simple polygonal faces.
Four level of decomposition are available :
Level 1 : Removing holes. All faces, which have holes
connect the holes to the outer boundary of the face.
Level 2 : Removing concavities. Same as level 1, plus concave
corners are removed.
Level 3 : Creating quadrangles. Same as level 2, plus all faces
which have more then 4 sides are split into quadrangles
and possibly triangles.
Level 4 : Creating triangles. Same as level 3, plus all faces
are split into triangles.
Open wire faces that may be part of the object are ignored. The number
of decomposed faces is returned in the argument num_faces. The face
topology is returned in the pindx_list argument. It is a list which
contains integer values. The first value is a counter "n". It indicates
how many sides the first face has. The next "n" values in the list are point
indices which reference the points of the facetted topology of the object.
The next value in the list is again the counter "n", now for the second
face. etc. The counter "n" show up exactly num_faces times in the pindx_list
argument.
n1
pindx(0)
pindx(1)
...
pindx(n1-1)
n2
pindx(0)
pindx(1)
...
pindx(n2-1)
.
.
.
nm
pindx(0)
pindx(1)
...
pindx(nm-1)
When the all triangles level is selected, the counter is obviously redundant, but
it is still included in the pindx_list, for consistency purpose.
The optional findx_list argument contains the index of the original face
of the object. Note, that if the object is a smooth object, the face index
references a face in the smooth topology, not the facetted topology. (unlike the indices in the
pindx_list, which always reference the facetted points).
Plugin Prototype
fzrt_error_td fz_objt_decompose_simple(
fzrt_int | windex, |
obj, | |
decomp_type, | |
fzrt_int * | num_faces, |
pindx_list, | |
findx_list ) |
Parameters
windex [Input]
project window index
obj [Input]
object
decomp_type [Input]
The type of decomposition requested
num_faces [Result]
The number of faces resulting from the decomposition
pindx_list [Result]
The list with point indices of the facetted topology
findx_list [Result, Optional]
The list with indices of the original face
Returns
Error codes
Availability
5.0.0.0
Example Files
Function Set
Defined in