.. auto-generated by script ../../../../utils/nxdl2rst.py from the NXDL source NXcg_polyline_set.nxdl.xml

.. index::
    ! NXcg_polyline_set (base class)
    ! cg_polyline_set (base class)
    see: cg_polyline_set (base class); NXcg_polyline_set

.. _NXcg_polyline_set:

=================
NXcg_polyline_set
=================

**Status**:

  base class, extends :ref:`NXobject`

**Description**:

  Computational geometry description of a set of polylines in Euclidean space.

  Each polyline is built from a sequence of vertices (points with identifiers).
  Each polyline must have a start and an end point.
  The sequence describes the positive traversal along the polyline when walking
  from the start vertex to the end/last vertex.

**Symbols**:

  The symbols used in the schema to specify e.g. dimensions of arrays.

  **d**: The dimensionality, which has to be at least 1.

  **c**: The cardinality of the set, i.e. the number of polylines.

  **n_v**: The number of vertices, supporting the polylines.

  **n_total**: The total number of vertices traversed when visiting every polyline.

**Groups cited**:
  :ref:`NXcg_unit_normal_set`, :ref:`NXtransformations`

.. index:: NXtransformations (base class); used in base class, NXcg_unit_normal_set (base class); used in base class

**Structure**:

  .. _/NXcg_polyline_set/dimensionality-field:

  .. index:: dimensionality (field)

  **dimensionality**: (optional) :ref:`NX_POSINT <NX_POSINT>` {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}


  .. _/NXcg_polyline_set/cardinality-field:

  .. index:: cardinality (field)

  **cardinality**: (optional) :ref:`NX_POSINT <NX_POSINT>` {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}


  .. _/NXcg_polyline_set/number_of_total_vertices-field:

  .. index:: number_of_total_vertices (field)

  **number_of_total_vertices**: (optional) :ref:`NX_POSINT <NX_POSINT>` {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}

    The total number of vertices, irrespective of their eventual uniqueness,
    i.e. the total number of vertices that have to be visited when walking
    along each polyline.

  .. _/NXcg_polyline_set/number_of_vertices-field:

  .. index:: number_of_vertices (field)

  **number_of_vertices**: (optional) :ref:`NX_POSINT <NX_POSINT>` (Rank: 1, Dimensions: [c]) {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}

    Array which specifies of how many vertices each polyline is built.
    The number of vertices represent the total number of vertices for
    each polyline, irrespectively whether vertices are shared or not.
    See the docstring for polylines for further details about how
    a set with different polyline members should be stored.

  .. _/NXcg_polyline_set/identifier_offset-field:

  .. index:: identifier_offset (field)

  **identifier_offset**: (optional) :ref:`NX_INT <NX_INT>` {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}

    Integer which specifies the first index to be used for distinguishing
    polylines. 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_polyline_set/identifier-field:

  .. index:: identifier (field)

  **identifier**: (optional) :ref:`NX_INT <NX_INT>` (Rank: 1, Dimensions: [c]) {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}

    Integer used to distinguish polylines for explicit indexing.

  .. _/NXcg_polyline_set/vertices-field:

  .. index:: vertices (field)

  **vertices**: (optional) :ref:`NX_NUMBER <NX_NUMBER>` (Rank: 2, Dimensions: [n_v, d]) {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

    Positions of the vertices which support the members of the polyline set.

    Users are encouraged to reduce the vertices to unique set of positions
    and vertices as this supports a more efficient storage of the geometry data.
    It is also possible though to store the vertex positions naively in which
    case vertices_are_unique is likely False.
    Naively here means that one for example stores each vertex of a triangle
    mesh even though many vertices are shared between triangles and thus
    the positions of these vertices do not have to be duplicated.

  .. _/NXcg_polyline_set/vertices_are_unique-field:

  .. index:: vertices_are_unique (field)

  **vertices_are_unique**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>`

    If true indicates that the vertices are all placed at different
    positions and have different identifiers, i.e. no points overlap
    or are counted twice.

  .. _/NXcg_polyline_set/polylines-field:

  .. index:: polylines (field)

  **polylines**: (optional) :ref:`NX_INT <NX_INT>` (Rank: 1, Dimensions: [n_total]) {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}

    Sequence of vertex identifiers which describe each polyline.

    A trivial example is a set with two polylines with three vertices each.
    If the polylines meet in a junction, say the second vertex is shared
    and marking the junction between the two polylines, it is possible that
    there are only five unique positions suggesting five unique vertices.

    A non-trivial example is a set with several polylines, each of which with
    eventually different number of vertices. The array stores the vertex
    identifiers in the order how the polylines are visited:

    The first entry is the identifier of the start vertex of the first polyline,
    followed by the second vertex of the first polyline, until the last vertex
    of the polyline. Thereafter, the start vertex of the second polyline, and
    so on and so forth. Using the (cumulated) counts in number_of_vertices,
    the vertices of the n-th polyline can be accessed on the following 
    array index interval:
    :math:`$[\sum_i = 0}^{i = N-1}, \sum_{i=0}^{i=N}]$`.

  .. _/NXcg_polyline_set/length-field:

  .. index:: length (field)

  **length**: (optional) :ref:`NX_NUMBER <NX_NUMBER>` (Rank: 1, Dimensions: [c]) {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

    The length of each polyline.

  .. _/NXcg_polyline_set/is_closed-field:

  .. index:: is_closed (field)

  **is_closed**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>` (Rank: 1, Dimensions: [c])

    If true specifies that a polyline is closed, i.e.
    its end point is connected to the start point.

  .. _/NXcg_polyline_set/TRANSFORMATIONS-group:

  **TRANSFORMATIONS**: (optional) :ref:`NXtransformations`

    Reference to or definition of a coordinate system with
    which the qualifiers and polyline data are interpretable.

  .. _/NXcg_polyline_set/vertex_normal-group:

  **vertex_normal**: (optional) :ref:`NXcg_unit_normal_set`


  .. _/NXcg_polyline_set/edge_normal-group:

  **edge_normal**: (optional) :ref:`NXcg_unit_normal_set`



Hypertext Anchors
-----------------

List of hypertext anchors for all groups, fields,
attributes, and links defined in this class.


* :ref:`/NXcg_polyline_set/cardinality-field </NXcg_polyline_set/cardinality-field>`
* :ref:`/NXcg_polyline_set/dimensionality-field </NXcg_polyline_set/dimensionality-field>`
* :ref:`/NXcg_polyline_set/edge_normal-group </NXcg_polyline_set/edge_normal-group>`
* :ref:`/NXcg_polyline_set/identifier-field </NXcg_polyline_set/identifier-field>`
* :ref:`/NXcg_polyline_set/identifier_offset-field </NXcg_polyline_set/identifier_offset-field>`
* :ref:`/NXcg_polyline_set/is_closed-field </NXcg_polyline_set/is_closed-field>`
* :ref:`/NXcg_polyline_set/length-field </NXcg_polyline_set/length-field>`
* :ref:`/NXcg_polyline_set/number_of_total_vertices-field </NXcg_polyline_set/number_of_total_vertices-field>`
* :ref:`/NXcg_polyline_set/number_of_vertices-field </NXcg_polyline_set/number_of_vertices-field>`
* :ref:`/NXcg_polyline_set/polylines-field </NXcg_polyline_set/polylines-field>`
* :ref:`/NXcg_polyline_set/TRANSFORMATIONS-group </NXcg_polyline_set/TRANSFORMATIONS-group>`
* :ref:`/NXcg_polyline_set/vertex_normal-group </NXcg_polyline_set/vertex_normal-group>`
* :ref:`/NXcg_polyline_set/vertices-field </NXcg_polyline_set/vertices-field>`
* :ref:`/NXcg_polyline_set/vertices_are_unique-field </NXcg_polyline_set/vertices_are_unique-field>`

**NXDL Source**:
  https://github.com/nexusformat/definitions/blob/main/base_classes/NXcg_polyline_set.nxdl.xml