.. auto-generated by script ../../../../utils/nxdl2rst.py from the NXDL source NXcg_polygon_set.nxdl.xml .. index:: ! NXcg_polygon_set (base class) ! cg_polygon_set (base class) see: cg_polygon_set (base class); NXcg_polygon_set .. _NXcg_polygon_set: ================ NXcg_polygon_set ================ **Status**: base class, extends :ref:`NXobject` **Description**: Computational geometry description of a set of polygons in Euclidean space. Polygons are related are specialized polylines: * A polygon is a geometric primitive that is bounded by a closed polyline * All vertices of this polyline lay in the d-1 dimensional plane. whereas vertices of a polyline do not necessarily lay on a plane. * A polygon has at least three vertices. Each polygon is built from a sequence of vertices (points with identifiers). The members of a set of polygons may have a different number of vertices. Sometimes a collection/set of polygons is referred to as a soup of polygons. As three-dimensional objects, a set of polygons can be used to define the hull of what is effectively a polyhedron; however users are advised to use the specific NXcg_polyhedron_set base class if they wish to describe closed polyhedra. Even more general complexes can be thought, for instance piecewise-linear complexes, as these can have holes though, polyhedra without holes are one subclass of such complexes, users should rather design an own base class e.g. NXcg_polytope_set to describe such even more complex primitives. **Symbols**: The symbols used in the schema to specify e.g. dimensions of arrays. **d**: The dimensionality, which has to be either 2 or 3. **c**: The cardinality of the set, i.e. the number of polygons. **n_total**: The total number of vertices when visiting every polygon. **Groups cited**: :ref:`NXcg_face_list_data_structure`, :ref:`NXcg_hexahedron_set`, :ref:`NXcg_unit_normal_set` .. index:: NXcg_face_list_data_structure (base class); used in base class, NXcg_unit_normal_set (base class); used in base class, NXcg_hexahedron_set (base class); used in base class **Structure**: .. _/NXcg_polygon_set/dimensionality-field: .. index:: dimensionality (field) **dimensionality**: (optional) :ref:`NX_POSINT ` {units=\ :ref:`NX_UNITLESS `} Any of these values: ``2`` | ``3`` .. _/NXcg_polygon_set/cardinality-field: .. index:: cardinality (field) **cardinality**: (optional) :ref:`NX_POSINT ` {units=\ :ref:`NX_UNITLESS `} .. _/NXcg_polygon_set/number_of_total_vertices-field: .. index:: number_of_total_vertices (field) **number_of_total_vertices**: (optional) :ref:`NX_POSINT ` {units=\ :ref:`NX_UNITLESS `} .. _/NXcg_polygon_set/identifier_offset-field: .. index:: identifier_offset (field) **identifier_offset**: (optional) :ref:`NX_INT ` {units=\ :ref:`NX_UNITLESS `} Integer which specifies the first index to be used for distinguishing polygons. Identifiers are defined either implicitly or explicitly. For implicit indexing the identifiers are defined on the interval [identifier_offset, identifier_offset+c-1]. For explicit indexing the identifier array has to be defined. The identifier_offset field can for example be used to communicate if the identifiers are expected to start from 1 (referred to as Fortran-/Matlab-) or from 0 (referred to as C-, Python-style index notation) respectively. .. _/NXcg_polygon_set/identifier-field: .. index:: identifier (field) **identifier**: (optional) :ref:`NX_INT ` (Rank: 1, Dimensions: [c]) {units=\ :ref:`NX_UNITLESS `} Integer used to distinguish polygons for explicit indexing. .. _/NXcg_polygon_set/area-field: .. index:: area (field) **area**: (optional) :ref:`NX_NUMBER ` (Rank: 1, Dimensions: [c]) {units=\ :ref:`NX_AREA `} .. _/NXcg_polygon_set/edge_length-field: .. index:: edge_length (field) **edge_length**: (optional) :ref:`NX_NUMBER ` (Rank: 1, Dimensions: [c]) {units=\ :ref:`NX_LENGTH `} The accumulated length of the polygon edge. .. _/NXcg_polygon_set/interior_angle-field: .. index:: interior_angle (field) **interior_angle**: (optional) :ref:`NX_NUMBER ` (Rank: 1, Dimensions: [n_total]) {units=\ :ref:`NX_ANGLE `} Array of interior angles. There are many values per polygon as number_of_vertices. The angle is the angle at the specific vertex, i.e. between the adjoining edges of the vertex according to the sequence in the polygons array. Usually, the winding_order field is required to interpret the value. .. _/NXcg_polygon_set/shape-field: .. index:: shape (field) **shape**: (optional) :ref:`NX_INT ` (Rank: 1, Dimensions: [c]) {units=\ :ref:`NX_UNITLESS `} Curvature type: * 0 - unspecified, * 1 - convex, * 2 - concave .. _/NXcg_polygon_set/center-field: .. index:: center (field) **center**: (optional) :ref:`NX_NUMBER ` (Rank: 2, Dimensions: [c, d]) {units=\ :ref:`NX_LENGTH `} The center of mass of each polygon. .. _/NXcg_polygon_set/polygons-group: **polygons**: (optional) :ref:`NXcg_face_list_data_structure` A simple approach to describe the entire set of polygons when the main intention is to store the shape of the polygons for visualization. .. _/NXcg_polygon_set/vertex_normal-group: **vertex_normal**: (optional) :ref:`NXcg_unit_normal_set` .. _/NXcg_polygon_set/edge_normal-group: **edge_normal**: (optional) :ref:`NXcg_unit_normal_set` .. _/NXcg_polygon_set/face_normal-group: **face_normal**: (optional) :ref:`NXcg_unit_normal_set` .. _/NXcg_polygon_set/bounding_box-group: **bounding_box**: (optional) :ref:`NXcg_hexahedron_set` Axis-aligned or (approximate) (optimal) bounding boxes to each polygon. Hypertext Anchors ----------------- List of hypertext anchors for all groups, fields, attributes, and links defined in this class. * :ref:`/NXcg_polygon_set/area-field ` * :ref:`/NXcg_polygon_set/bounding_box-group ` * :ref:`/NXcg_polygon_set/cardinality-field ` * :ref:`/NXcg_polygon_set/center-field ` * :ref:`/NXcg_polygon_set/dimensionality-field ` * :ref:`/NXcg_polygon_set/edge_length-field ` * :ref:`/NXcg_polygon_set/edge_normal-group ` * :ref:`/NXcg_polygon_set/face_normal-group ` * :ref:`/NXcg_polygon_set/identifier-field ` * :ref:`/NXcg_polygon_set/identifier_offset-field ` * :ref:`/NXcg_polygon_set/interior_angle-field ` * :ref:`/NXcg_polygon_set/number_of_total_vertices-field ` * :ref:`/NXcg_polygon_set/polygons-group ` * :ref:`/NXcg_polygon_set/shape-field ` * :ref:`/NXcg_polygon_set/vertex_normal-group ` **NXDL Source**: https://github.com/nexusformat/definitions/blob/main/base_classes/NXcg_polygon_set.nxdl.xml