GEOMETRY (geometry) functions


LIBRARY ROUTINE

lgimpfacet - read a facet file and convert into geometry

LIBRARY CALL

int lgimpfacet(
   kfile  *in,
   char   *geom_name,
   kgeom_object *out)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

This routine will input a file containing facet information into a data object using geometry services.

The file will contain one or more "big parts", with each big part consisting of a list of XYZ points. For each big part, there will be one or more "small parts", with each small part consisting of a number of facets. Each facet is simply a triangle specified by three index numbers into the ver- tices list contained in the big part.

The resulting geometry will consist of a series of disjoint triangle primitives, with one primitive for every small part. Note that each disjoint triangle primitive contains several triangles.

All triangles in the format are specified to be RH. RH nor- mals will be generated for each triangle.

The following example illustrates the format of a facet file. The explanations, separated by '->' should not appear in the facet file.

information line 1 <- 1 big part square with fin <- name of big part 0, 0.00 1.00 0.00 0.00 <- mirror, ax+by+cz-d = 0 5 <- #nodes in big part 0.00 0.00 0.00 <- xyz of node 1 5.00 0.00 0.00 separated by at least 1 space 5.00 5.00 0.00 5.00 0.00 0.00 5.00 5.00 4.00 2 <- number of small parts square <- name of 1st small part 2 <- number of facets in 1st small part 1 2 3 1 0011 1 <- facet 1 has nodes 1,2,3 followed by 1 3 4 1 0011 2 material index, group #, facet # fin <- name of 2nd small part 2 <- number of facets in 2nd small part 1 3 5 1 0011 1

The material index, group #, and facet # are consumed but not used. In the future, the material index may be used to add color to the geometry.

The facet file format is also known as the General Dynamics ACAD format.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$GEOMETRY/objects/library/geometry/src/lgimpfacet.c

SEE ALSO

geometry(3)

COPYRIGHT

Copyright (C) 1996,1997 , The Regents of the University of California. All rights reserved.