General Description of the Edit3D program, Version 1.0, November 2004

Edit3D source files are included in two directories. One contains a 2D editor
template called basicgui and a sister directory contains the 3d editor itself.
The basicgui source files which are utilised by the edit3d program but are too junky and 
unstable to turn into a library.

Compiling.

I have only compiled and run successfully under Windows 98 using DJGPP on a Pentium 133 
with 48MB of RAM.

A DJGPP generated make file is included. Also RHIDE project and desktop files
for use under Windows are included.  I used RHIDE V1.4.7.8 and DJGPP V2.03.  I
had some bad experience using a latter DJGPP (it's much fussier and some things
just didn't seem to work any more).  I also used Allegro 4.0 and Bgui2.  The Allegro web
site should be able to help you find all these items.

The following links may still be current:
http://www.delorie.com/djgpp/ for DJGPP
http://www.tu-chemnitz.de/~sho/rho/rhide.html for RHIDE
http://sunsite.dk/allegro/ for ALLEGRO
http://www.rit.edu/~jpw9607 for BGUI2

An attempt to compile under Linux eventually succeeded but would not run past
the first line due to some UNPACK error???? Help?

Program Description.

A first step to understanding the program might be to read some of the help
file edit3d.hlp which is in plain text format.

Edit3D makes extensive use of linked lists derived from ListClass in
linklist.cpp which is found in the the basicgui directory.
A link in a ListClass contains only an object of objectclass. Derived from
linklist is VisualListClass (visulist.cpp) which has links which also reference
an ObjectControlClass control which can do several standard things with an
object such as create, destroy, draw and indicate.  It also allows a gui system
to list and display properties (edit.cpp).

Moving to the edit3d directory, VisualList3dClass(vislst3d.cpp) is derived from 
VisualListClass and includes a few more parameters to cope with finding objects 
in the Z dimension.

Drawing of objects begins with ViewClass which controls up to four views on the 
screen. Each view is controlled by a VisualClass.  For normal drawing, the 
objects are referenced from within the DrawVisu function in findvisu.cpp. For 
render drawings (texturing is not yet fully implemented), the object is not 
called until after all vertex points are mapped in render.cpp.

At the moment, there are these objects:

VertexClass - a 3D point with fixed type precision and a block and layer 
              attribute.
LineClass   - referring to two VertexClass points but allowing extension to a
              previous and next line in a poly line sequence.  Also allowing
              lateral lines for a future mesh type implementation.
SplineClass - derived from LineClass with vectors for Benzier curve splines.
              Currently utilises Allegro's native spline draw function so is
              limited to 2D axises.
ArcClass -    derived from LineClass but with a center point and lateral point
              added. While the lateral point provides a plain of reference, at
              the moment the drawing software can only cope with circles on axis
              and planer to the screen.  More math required here as it's even
              harder that the spline problem.
FaceClass -   referring to three or four Vertex points plus colour information
              and a texture class (texture not yet fully implemented).
InsertClass - refering to one or two vertex and a BlockClass containing a group
              of objects.
SolidClass -  reference two 3D points describing the bounds of a ...(what is
              that word) space which can be sculpted for NC machining simulation
              (not yet implemented but the main focus of this whole project).

Mentioned in there is the block and layer attributes which are actually 
references to BlockClass (block.cpp) and LayerClass (layer.cpp). These are
changed in the gui in the blockset.cpp and layerset.cpp files and make further
use of ListClass.

Vector objects can be loaded or saved as *.dxf files (somewhat compatible to 
AutoCad binary and text type formats) or to my own *.a3d format which will hold
all the information for all object types. See a3d_fmat.txt if you intend to use the
data from the *.a3d files, though a3dsave.cpp and a3dload.cpp may be more up to date.
Also look at each of the object type source files, eg. vertex.cpp, face.cpp, line.cpp,
arc.cpp and spline.cpp.  There is no intention to save solidclass objects, but I must do
something about at least saving their bounds.  Also I must do something about saving
project information, such as preferences, views etc. So much to do, so little time.

I got keen on analysing video film at one stage, so it is possible to load *.avi
format and bitmap formats (those supported by allegro) as backings for the
drawings.  This can be used to digitise pictures or motion in 3D.  There is also
provision to log points taken (see help file).

The help system (help.cpp) is a bit clunky, particularly the method for linking.

Hope this helps.  I might write more description if there is interest.

At the moment, my email address is r <dot> p  (the AT symbol) webone <dot>
com <dot> au.  Hopefully that cyfer will keep the junk mail trawlers away from me.

WHY DID I START THIS PROJECT?

I haven't done much looking, but I suspect there are much better open source
systems out there.  I think there was a good looking Linux system based on GTK. Still,
if I don't like something about my own system, I've only got myself to blame.
The main goal is to link this to my G&M code reader to control my 3D mill for
contoured surfaces.  Will it ever happen?  Not at the rate I'm going, but
who knows.

Maybe you can find something usefull here. Good luck.

Robert Parker 30 November 2004



