Import Polyline / Polyface

 

 

Import Polyline / Polyface

Polylines (consisting of an array of points) and polyfaces (consisting of an array of rectangular faces) can be imported from text files.  Select insert-import and then polyline or polyface.  You will then be prompted for the text file name.  This file should have an extension of "txt".  Once you have imported a polyline or polyface, the coordinates and other attributes are stored in the xml or viz extension file rather than the original txt file.

Polyline - The first line of the polyline file contains the number of points.  The remainder of the file contains the point coordinates as triplets of x, y and z.  The following are records from a sample polyline file.

6
0.0 0.0 0.0
0.0 1.0 0.0
1.0 1.0 0.0
1.0 0.0 0.0
0.0 1.0 0.5
1.0 1.0 0.5
 

Polyface - The first line of the polyface file contains the number of nodes and the number of defined faces.  The node coordinates are then listed as triplets of x, y and z, followed by the four individual face corner numbers and the color index for each face.  In the text below from a polyface datafile, six corner points have been defined and two faces.  The first face corner points are 1, 2, 3 and 4 the second face corner points are 5, 2, 3 and 6.  The color index for both faces is 1.

6 2
0.0 0.0 0.0
0.0 1.0 0.0
1.0 1.0 0.0
1.0 0.0 0.0
0.0 1.0 0.5
1.0 1.0 0.5
1 2 3 4 1
5 2 3 6 1