/
NXcg_parallelogram_set.nxdl.xml
183 lines (175 loc) · 8.5 KB
/
NXcg_parallelogram_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_parallelogram_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="c">
<doc>
The cardinality of the set, i.e. the number of parallelograms.
</doc>
</symbol>
</symbols>
<doc>
Computational geometry description of a set of parallelograms in Euclidean space.
The parallelograms do not have to be connected, can have different size,
can intersect, and be rotated.
This class can also be used to describe rectangles or squares, axis-aligned or not.
The class represents different access and description levels to offer both
applied scientists and computational geometry experts to use the same
base class but rather their specific view on the data:
* Most simple many experimentalists wish to communicate dimensions/the size
of e.g. a region of interest in the 2D plane. In this case the alignment
with axes is not relevant as eventually relevant is only the area of the ROI.
* In other cases the extent of the parallelogram is relevant though.
* Finally in CAD models we would like to specify the polygon
which is parallelogram represents.
Parallelograms are important geometrical primitives. Not so much because of their
uses in nowadays, thanks to improvements in computing power, not so frequently
any longer performed 2D simulation. Many scanning experiments probe though
parallelogram-shaped ROIs on the surface of samples.
Parallelograms have to be non-degenerated, closed, and built of polygons
which are not self-intersecting.
The term parallelogram will be used throughout this base class but includes
the especially in engineering and more commonly used special cases,
rectangle, square, 2D box, axis-aligned bounding box (AABB), or
optimal bounding box (OBB) but here the analogous 2D cases.
An axis-aligned bounding box is a common data object in computational science
and codes to represent a rectangle whose edges are aligned with the axes
of a coordinate system. As a part of binary trees these are important data
objects for time- as well as space-efficient queries
of geometric primitives in techniques like kd-trees.
An optimal bounding box is a common data object which provides the best
tight fitting box about an arbitrary object. In general such boxes are
rotated. Other than in 3D dimensions the rotation calipher method offers
a rigorous approach to compute optimal bounding boxes in 2D.
</doc>
<field name="dimensionality" type="NX_POSINT" units="NX_UNITLESS">
<enumeration>
<item value="2"/>
</enumeration>
</field>
<field name="cardinality" type="NX_POSINT" units="NX_UNITLESS"/>
<!--qualifiers and properties of parallelograms-->
<field name="shape" type="NX_NUMBER" units="NX_LENGTH">
<doc>
A qualitative description of each parallelogram/rectangle/square/box.
</doc>
<dimensions rank="2">
<dim index="1" value="c"/>
<dim index="2" value="2"/>
</dimensions>
</field>
<field name="length" type="NX_NUMBER" units="NX_LENGTH">
<doc>
Qualifier how one edge is longer than all the other edge of the parallelogam.
Often the term length is associated with one edge being parallel to
an axis of the coordinate system.
</doc>
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<field name="width" type="NX_NUMBER" units="NX_LENGTH">
<doc>
Qualifier often used to describe the length of an edge within
a specific coordinate system.
</doc>
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<field name="center" type="NX_NUMBER" units="NX_LENGTH">
<doc>
Position of the geometric center, which often is but not necessarily
has to be the center_of_mass of the parallelogram.
</doc>
<dimensions rank="2">
<dim index="1" value="c"/>
<dim index="2" value="2"/>
</dimensions>
</field>
<field name="surface_area" type="NX_NUMBER" units="NX_AREA">
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<field name="is_axis_aligned" type="NX_BOOLEAN">
<doc>
Only to be used if is_box is present. In this case, this field describes
whether parallelograms are rectangles/squares whose primary edges
are parallel to the axes of the Cartesian coordinate system.
</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 mesh 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
parallelograms. 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 parallelograms for explicit indexing.
</doc>
<dimensions rank="1">
<dim index="1" value="c"/>
</dimensions>
</field>
<!--substantially more detailed descriptors of the shape, the mesh-->
<group name="orientation" type="NXorientation_set"/>
<group name="vertex_normal" type="NXcg_unit_normal_set"/>
<group name="edge_normal" type="NXcg_unit_normal_set"/>
<group name="face_normal" type="NXcg_unit_normal_set"/>
<!--detailed mesh-based representation-->
<group name="parallelograms" type="NXcg_face_list_data_structure">
<!--exists: [min, 0, max, 1]-->
<doc>
A simple approach to describe the entire set of parallelograms when the
main intention is to store the shape of the parallelograms for visualization.
</doc>
</group>
<group name="parallelogram" type="NXcg_face_list_data_structure">
<!--exists: [min, 0, max, infty] # can this be max, c?-->
<doc>
Disentangled representations of the mesh of specific parallelograms.
</doc>
</group>
<!--##MK::a half-edge structure would be overkill as this is a simple primitive-->
</definition>