An XYZ file is either an ASCII file or a binary file that contains
a set of vertices and no other data unless an optional AccuTrans 3D header
is used. When reading a XYZ file, if the optional header is not used, a dialog
box will appear so that required information can be entered by the user.
A set of three floating point numbers represents the X,
Y and Z coordinates of a vertex. In an ASCII file,
the decimal point only has to be written if it is necessary.
A binary file can be in either Intel or Motorola
format and the floating point numbers can be either floats
(4 bytes) or doubles (8 bytes).
There are two types or categories of XYZ files called
Mesh and Scan.
|
XYZ Type 1: Mesh
The vertices of the mesh are arranged in
an M by N array.
- M is the number of columns of data
- N is the number of rows of data. Each
row of data must contain M sample points.
- The sample interval (row or column) between
any two points is variable.
- Elevations can be either positive or negative.
- The coordinates can be stored using one
of the three supported coordinate systems.
- Think of this mesh as a section of screen
removed from a screen window. The screen is bent and
twisted as it is molded around some real world 3D object.
- The vertices can be anywhere in 3D space
and the only way of knowing how they relate to one another
is by the values assigned to the M and N variables.
- The coordinates can be written to the
ASCII file with just a single space between the coordinates
or the data can be formatted with user specified delimiters
and any number of line terminators (carriage return or
line feed or carriage return and line feed pair).
After the data has been read by AccuTrans
3D from a file without the optional header, it can be written
as a polyline mesh to a DXF file before it is converted to
a 3D object that can be saved to any supported file format.
The data is not sorted after it is read. The data can be stored by
either row or by column. Example: If storing by row all the
data should be stored for the first row, then the second
row, etc.
|
Mesh Type Example File 1:
|
|
This example uses an array that has three rows and four columns
for a total of twelve vertices. The rows are numbered R1, R2
and R3. The columns are numbered C1, C2, C3 and C4. The array
is a simple rectangular grid that has 10 units of spacing in
both the X and Y directions. The grid is flat and all Z coordinates
are set at 0 units. The vertex in the lower left corner of
the grid has X, Y, Z coordinates of 0, 0, 0. The vertex in
the top left corner of the grid has X, Y, Z coordinates of
30, 20, 0. The twelve vertices can be saved by row or by column
as shown in the following table. A decimal point only has to
be written if it is necessary. The optional header is also
used.
|
Saved By Row
AT3D_XYZ V01.00 Mesh A
Rows 3
Columns 4
Order By_Row
Data
0 0 0
10 0 0
20 0 0
30 0 0
0 10 0
10 10 0
20 10 0
30 10 0
0 20 0
10 20 0
20 20 0
30 20 0
|
Saved By Column
AT3D_XYZ V01.00 Mesh A
Rows 3
Columns 4
Order By_Column
Data
0 0 0
0 10 0
0 20 0
10 0 0
10 10 0
10 20 0
20 0 0
20 10 0
20 20 0
30 0 0
30 10 0
30 20 0
|
|
Mesh Type Example File 2:
|
|
This example uses an array that has six rows and four
columns for a total of twenty-four vertices. The rows
are numbered R1, R2, R3, R4, R5 and R6. The columns are
numbered C1, C2, C3 and C4. The twenty-four vertices
are saved by row in the following table. The optional
header is also used.
|
Saved By Row
AT3D_XYZ V01.00 Mesh A
Rows 6
Columns 4
Order By_Row
Data
-7.430273 -6.964596 8.349577
1.189729 13.366331 15.433069
25.109549 24.411971 16.577943
39.351235 49.752780 24.915375
-8.720664 -3.218530 -0.832028
-0.100661 17.112397 6.251463
23.819158 28.158037 7.396338
38.060845 53.498846 15.733769
-5.455669 -2.441387 -7.035792
2.511309 16.349330 -0.488925
26.247655 27.218608 0.609780
41.202636 53.828611 9.364791
4.778216 -6.023531 -9.208138
11.081533 8.843318 -4.028384
34.350458 19.263292 -3.047302
51.122642 49.106718 6.771544
9.993981 -10.177027 -3.633978
15.597628 3.039597 0.970822
38.669975 13.270611 1.902436
56.206403 44.473888 12.168690
11.180504 -13.377381 4.107729
16.768603 -0.197428 8.699752
39.836581 10.029387 9.630267
57.389993 41.262883 19.906463
|
|
|
Mesh Type Example File 3:
|
|
A mesh can be closed in either the M direction or the N direction
or both the M and N directions.
If the coordinates of the first vertex on a row are identical
to the coordinates of the last vertex on the row, the mesh
will be closed in that direction.
If the coordinates of the first vertex in a column are
identical to the coordinates of the last vertex in the column,
the mesh will be closed in that direction.
|
XYZ Type 2: Probe Scan
|
|
A Probe Scan XYZ file is generated under certain conditions.
- Some type of scanner (probe) is placed above
the real world 3D object.
- The scanner will move in an XY plane that remains
a fixed height (Z) above the object.
- For each scanning pass the probe will travel
parallel to the X axis (all samples will be taken
at a constant Y and only the X and Z coordinates
will change).
- At the end of the scanning pass the probe will
move to a new Y position and the scanning pass
will be repeated.
- The number of samples taken per pass is variable
and determined by the design conditions for the
probe.
- The sampling passes can be either unidirectional
or bidirectional.
- AccuTrans 3D determines whether the XYZ file
meets the conditions to be considered a Scan type
and whether the sampling was unidirectional or
bidirectional.
|
|
A DXF Point Cloud file is identical to a XYZ file of
type 'Scan' except that each vertex has been stored as
a POINT entity in the DXF file. The DXF Point Cloud file
is read using the 'File-> Open-> DXF Point Cloud' menu
command.
|
|
XYZ Type 3: Double Z Scan
|
|
A Double Z Scan type is the same as a Probe
Scan type except for each sample point instead
of there just being 3 values representing XYZ
there are 4 values representing XYZZ.
The first Z is the height of the top surface
and the second Z is the height of the bottom
surface.
An XYZZ file automatically creates
a watertight mesh.
When the first and second Z
have the same value and all three vertices
of a triangle satisfy this condition, the triangle
will be considered a hole and will not
be created in the mesh. To create a properly shaped
hole the sample distance between sample points for
the hole should be the same as for the rest of the
model.
|
|