Instead of specifying all the vertices for a three-dimensional rectangle (a polygon in the shape of rectangle in three-dimensional space), you can represent the rectangle by specifying just the two corners corresponding to the minimum ordinate values (min-corner) and the maximum ordinate values (max-corner) for the X, Y, and Z dimensions.
The orientation of a three-dimensional rectangle defined in this way is as follows:
If the rectangle is specified as <min-corner, max-corner>, the normal points in the positive direction of the perpendicular third dimension.
If the rectangle is specified as <max-corner, min-corner>, the normal points in the negative direction of the perpendicular third dimension.
For example, if the rectangle is in the XY plane and the order of the vertices is <min-corner, max-corner>, the normal is along the positive Z-axis; but if the order is <max-corner, min-corner>, the normal is along the negative Z-axis.
Using these orientation rules for rectangles, you can specify the order of the min-corner and max-corner vertices for a rectangle appropriately so that the following requirements are met:
The normal for each polygon in a solid always points outward from the solid when the rectangle is part of the solid.
An inner rectangle polygon is oriented in the reverse direction as its outer when the rectangle is part of a surface.