description: |
figbuild reads xfig files (Version 3.x , tested with 3.1 , 3.2) plus its own config file for heights and generates 3d input files for Radiance, Rayshade or, by extending the underlaying GGW library, other formats.
figbuild is useful for fast shading analysis in daylight calculations, to hack
lower Manhatten into RADIANCE or to model your favorite ASIC as 3d structure.
You may find it faster and cheaper than a full blown CAD program for simple geometries.
Note Jan 2005:
On the other hand, figbuild was started half a dozen year ago, and CAD programs are now available in the public domain.
Frankly I don't see much use in pushing this further, - consider it historic unless you are explicitly in need for a xfig -> 3D converter.
Example input: (click to download this xfig file and height file)
download |
This code of figbuild is copyrighted by Peter Apian-Bennewitz. You may use the program for any work, but you may not sell it. By downloading you agree to this and the disclaimer below.
The binary should run on a veriety of Linux distibutions. To compile an ANSI-C compiler and (optionally) yacc/lex are needed. Download the ggw library, unpack it and run make. Download the figbuild.tgz file, unpack it, edit the makefile and compile. Have fun. Let me know about problems or if you have a nice application using figbuild and a picture to share.
Note: My qqw
library is currently not made public, mostly since that needs some docu and cross-checking. Contact me if you're
interested.
Linux 2.4.17/ Slackware 8 | figbuild.Linux_2.4.tgz |
source | figbuild.tgz |
syntax of height file |
{ figseg-Red-Dashed 2.0 radmat1 1.3 radmat2 0.2 radmat3 } |
A lower edge maybe given as:
{ figseg-Red-Solid 4.0 radmat1 2.0 ground } |
Extrusions:
{figseg-Yellow-Dashed # "pipeline" extrude cyl pipes 0.05 3.9 ground } |
Comments:
# one-line comments /* multiline comments */ |
Any lines (including comments) in the height file between
quote on this text is directly copied quote off |
ceilmat radmat floormat radmat |
figseg-color-linestyle
. Example: A blue, dashed line in the fig
drawing has a segment-name attached: figseg-Blue-Dashed
. The naming scheme follows the names displayed
in xfig's popup menues (and not those given in the FORMAT3.2 doc of xfig).
More complex geometry (e.g. windows, ceiling with overhangs etc.) may be generated by combining polylines and polygons in xfig.
As mentioned, floors and ceilings are generated for filled or tiled polygons.
figbuild reads and converts these fig primitives: polyline, polygon, box, compound, circle, text
.
Currently not supported are: splines, ellipse, arc
, since they require tesselation into polygons, which might be
added later.
All standard (31) colors may be used, whereas user defined colors are ignored.
Text with the 'special' flag set is converted to instances. The text consists of instance name and optional Radiance-style transformation
parameters. To convert all text ('special' flag set or cleared) use the '-t' option.
Xfig's displayed coordinates (inch or metric) are used to export to RADIANCE: A box extending from 10 to 20 [cm] in xfig will extend from 10 to 20 RADIANCE units. The same holds true for [inch] units in xfig. The Y-axis in xfig extends along the negative y-axis in RADIANCE, as xfig's origin is fixed to the upper left corner of the 2d drawing. This is compatible with 'North' being 'up' on most drawings and the coordinate system used by gensky/gendaylit
Notes:
figbuild [-f radiance|rayshade] [-i] [-n] -h demo.height -g demo.figwrites RADIANCE geometry to stdout. Optional errors and logging infos are sent to stderr.
-f format | Radiance | Rayshade |
---|---|
-i | generate geometry with normals facing inward |
-n | don't re-orient polygons, take orientation as defined in xfig |
-V | display version and exit |
-d | turn on debugging |