FEATool
v1.8 Finite Element Analysis Toolbox |

gobj_decompose.m File Reference

GOBJ_DECOMPOSE Analyze and decompose geometry object.

[P,E,F,V] = GOBJ_DECOMPOSE( GOBJ, TOL ) Decomposes the geometry object GOBJ into unique points/vertices P, edges/line segments E, faces/surfaces F, and volumes V (for 3D objects). The optional input argument TOL defines the tolerance for vertex deduplication and zeroing vertex coordinates (default eps*1e3).

The output argument P is a array of unique points/vertices of size (n_p,n_sdim).

The two last columns of the edge/line segment array E (size (n_e,3)) contains start and end indices to vertices in P that make up the edges. The first column indicates edge segment groupings (corresponding to boundaries in 2D and geometry edges in 3D). No defined edge grouping is indicated with zeros.

The face/surface array F of size (n_v,2+n_max_e) consists of indices to edges that make up the faces (a negative entry indicates reversed edge direction). Similar to the first column of E, the first column of F also indicates face groupings (integer > 0). The second boolean column indicates if each face is an outer boundary (0) or a hole (1). For faces with less than n_max_edges (the maximum number edges in any face) the extra entries are padded with zeros.

The volume array V (for 3D) indicates which faces F constitutes the volumes (size n_v,2+n_max_f) where a negative entry also here indicates reversed face direction. Similarly to F, the first column specifies the volume group, and the second if the entry volume describes the outer (external) or inner volume boundary (hole).

- See also
- geom_decompose