CALL PCFAN3 ( NFAS, IXA, PXA, PYA, PZA, ERRIND, NX, NY, NZ )
This function returns the unit geometric normal to the given Fill Area Set.
The input data structure contains a list of vertex points which are used for the unit geometric normal calculation.
Calculating the Normal
The first three non-collinear points in the data structure, as determined below, are designated A, B, and C. The geometric normal is computed as the cross product of two vectors: the vector from A to B, and the vector from A to C; it is then reduced to unit length.
When calculating the normal for a fill area set, point A is the first point in the first fill area set boundary, point B is the first point in the fill area set boundary which is not identical to point A, and point C is the first point in the fill area set boundary which is not collinear with points A and B. This process is applied to each successive boundary in the set until a triplet is found or all boundaries have been exhausted. If no such triplet exists, Error Indicator is set to a non-zero value, and Geometric Unit Normal is undefined.
Error Indicator will return one of the following values:
The normal returned may be combined with the existing vertices to create a more complete specification for a Fill Area Set 3 With Data. See Fill Area Set 3 With Data (routine PFAS3D) for details.
Fill area set 3 with data, see PFAS3D