BREP and friends:
Implementation of a topological data structure similar to the WINGED EDGE data
structure, representing the boundary of a polyhedral solid. A core layer on
top of which e.g. CSG operations or 3D model topology fixers can be build.
This package contains:
- BREP: a Boundary Representation Library
documentation in BREP/README and BREP/brep.h
- GDT: Generic Data Types Library - needed by BREP and CSG
documentation: GDT/README
- POOLS: Memory Management on top of malloc/free
documentation: POOLS/README
- MGF: Greg W. Larsons Material and Geometry Format library, adapted for
this project
see: MGF/README, http://radsite.lbl.gov/mgf/HOME.html
- CSG: sample application program using the BREP library - computes the
CSG union/difference/intersection of two solid objects described in
MGF files.
COMPILATION:
- Edit the Config file in this directory. It contains the compiler to use,
compilation flags etc...
- type 'make depend' (optional)
- type 'make'
The libraries are compiled in their directories. In CSG, you end up with an
executable called 'csg'.
USAGE:
Usage (csg -h):
Usage: csg [options] fileA.mgf fileB.mgf
Options:
-q n: nr. quart circle divisions (n = positive integer, default = 5)
-t x: vertex tolerance (x = positive real number, default = 1e-6)
-p x: min. coplanarity factor (x = positive real number, default = 500)
-v: verbose mode
-d: compute CSG difference
-u: compute CSG union
-i: compute CSG intersection
-I: ignore normals in input file
-W: write faces without making separate faces for outer contours contained in holes
-M: don't write materials
-h: print usage
The Test/ directory contains an example. The files 'union.mgf', 'aminb.mgf',
'bmina.mgf' and 'isect.mgf' have been generating using
csg -u Test/a.mgf Test/b.mgf > union.mgf
csg -d Test/a.mgf Test/b.mgf > aminb.mgf
csg -d Test/b.mgf Test/a.mgf > bmina.mgf
csg -i Test/a.mgf Test/b.mgf > isect.mgf
The corresponding GIF files show how they look.
VERSION:
Initial version (build upon older material dating back to summer 1996) - April, 12 2000.
TO DO/BUGS:
- Convert everything to nice C++
- CSG program does not yet properly handle coplanar faces.
LICENSE:
Distributed under the terms of the GNU Library Public License.
AUTHOR:
Philippe Bekaert
Computer Graphics Research Group
Department of Computer Science - K.U.Leuven
Celestijnenlaan, 200A - B3001 Leuven (Heverlee) - Belgium
Tel: +32 16 32 76 67
Fax: +32 16 32 79 96
http://www.cs.kuleuven.ac.be/cwis/research/graphics/graphics-E.shtml
mailto:Philippe.Bekaert@cs.kuleuven.ac.be
|