PLC Files


PLC is a data directory which contains examples of PLC files, a format used to store piecewise linear complex data.

The PLC file format is used to store data intended as input to the DIR3 (Delaunay Incremental Refinement) meshing program. The data describes the surface that bounds a 3D region to be meshed.

The PLC File Format

The .plc file format is used for defining a piecewise linear complex (PLC). The goal of this format is to fully specify a PLC and not require any additional intersection checks between features.

A .plc file consists of 5 sections.

  1. PLC
  2. Dimension
  3. Points
  4. Segments
  5. Faces (omitted if dimension is 2)

1: The PLC Section

This section identifies the file type.

First line: PLC

2: The Dimension Section

This section specifies the dimension of the PLC: either 2 or 3.

First line: DIMENSION dim

3: The Points Section

This section gives the coordinates of all the points in the PLC.

First line: POINTS number of points

Remaining lines: (point id) (x coord) (y coord) (z coord)

The point id should be a unique integer identifier. The z coord is omitted if the dimension is 2.

4: The Segments Section

This section defines all of the segments.

First Line: SEGMENTS (number of segments)

Remaining lines: (segment id) (end point 1) (end point 2)

Here segment id is a unique integer identifier.

5: The Faces Section

This section defines all of the faces.

First Line: FACES (number of faces)

Remaining lines: (face id) (# boundary segments) (#interior segments) (# interior points) (N/C) (boundary segment list) (interior segment list) (interior point list)

Each face id should be a unique integer identifier.

The boundary segment list must be a sequence of segments in a consistent order so that the boundary is always on the same side. Holes are also specified an oriented list of segments included in the list of boundary segments. The interior segment list is a list of segments which are contained in the face.

Using the flag N or C tells the code to use simplifications in the convex case (the C option) or not (the N option). In the convex case, the list of boundary segments do not need to be given in order.

Example

PLC
DIMENSION 3
POINTS 10
0 -4 -4 0
1 4 -4 0
2 4 4 0
3 -4 4 0
4 0 2 0 
5 2 0 0
6 0 -2 0
7 -2 0 0
8 0 0 1
9 0 0 -1
SEGMENTS 20
100     0 1
101     1 2
102     2 3
103     3 0
104     4 5
105     5 6
106     6 7
107     7 4
108     0 6
109     1 5
110     2 4
111     3 7
112     4 8
113     5 8
114     6 8
115     7 8
116     4 9
117     5 9
118     6 9
119     7 9
FACES 9
200 8 4 0 N    100 101 102 103 104 105 106 107 108 109 110 111
201 3 0 0 C    104 112 113
202 3 0 0 C    105 113 114
203 3 0 0 C    106 114 115
204 3 0 0 C    107 115 112
205 3 0 0 C    104 116 117
206 3 0 0 C    105 117 118
207 3 0 0 C    106 118 119
208 3 0 0 C    107 119 116

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

OFF2PLC, a C++ program which reads an OFF file describing a surface in 3D, and creates an equivalent PLC file, by Alex Rand.

Sample Files:

You can go up one level to the DATA page.


Last revised on 12 June 2012.