/
NXcg_polyline_set.nxdl.xml
183 lines (177 loc) · 8.41 KB
/
NXcg_polyline_set.nxdl.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# For further information, see http://www.nexusformat.org
-->
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" name="NXcg_polyline_set" extends="NXobject" type="group" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<symbols>
<doc>
The symbols used in the schema to specify e.g. dimensions of arrays.
</doc>
<symbol name="d">
<doc>
The dimensionality, which has to be at least 1.
</doc>
</symbol>
<symbol name="c">
<doc>
The cardinality of the set, i.e. the number of polylines.
</doc>
</symbol>
<!--n_unique: The number of unique vertices supporting the polyline.
multiple vertices possible with the same point coordinates but different names.-->
<symbol name="n_v">
<doc>
The number of vertices, supporting the polylines.
</doc>
</symbol>
<symbol name="n_total">
<doc>
The total number of vertices traversed when visiting every polyline.
</doc>
</symbol>
</symbols>
<doc>
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.
</doc>
<field name="dimensionality" type="NX_POSINT" units="NX_UNITLESS"/>
<field name="cardinality" type="NX_POSINT" units="NX_UNITLESS"/>
<!--number_of_unique_vertices(NX_POSINT):
unit: NX_UNITLESS-->
<field name="number_of_total_vertices" type="NX_POSINT" units="NX_UNITLESS">
<doc>
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.
</doc>
</field>
<field name="number_of_vertices" type="NX_POSINT" units="NX_UNITLESS">
<doc>
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.
</doc>
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<group type="NXtransformations">
<doc>
Reference to or definition of a coordinate system with
which the qualifiers and polyline data are interpretable.
</doc>
</group>
<field name="identifier_offset" type="NX_INT" units="NX_UNITLESS">
<doc>
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.
</doc>
</field>
<field name="identifier" type="NX_INT" units="NX_UNITLESS">
<doc>
Integer used to distinguish polylines for explicit indexing.
</doc>
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<!--Users are encouraged to reduce the vertex set to the unique vertices.
Unique means not necessarily unique in position only but also unique in
identifier. In fact, it is possible to distinguish two vertices as two when
they share the same position in space but have different identifiers.-->
<field name="vertices" type="NX_NUMBER" units="NX_LENGTH">
<doc>
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.
</doc>
<dimensions rank="2">
<dim index="1" value="n_v"/>
<dim index="2" value="d"/>
</dimensions>
</field>
<field name="vertices_are_unique" type="NX_BOOLEAN">
<doc>
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.
</doc>
</field>
<field name="polylines" type="NX_INT" units="NX_UNITLESS">
<doc>
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}]`.
</doc>
<dimensions rank="1">
<dim index="1" value="n_total"/>
</dimensions>
</field>
<!--properties of the polyline primitives-->
<field name="length" type="NX_NUMBER" units="NX_LENGTH">
<doc>
The length of each polyline.
</doc>
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<field name="is_closed" type="NX_BOOLEAN">
<doc>
If true specifies that a polyline is closed, i.e.
its end point is connected to the start point.
</doc>
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<group name="vertex_normal" type="NXcg_unit_normal_set"/>
<group name="edge_normal" type="NXcg_unit_normal_set"/>
</definition>