TECHNICAL NOTES

Here we present technical information about the internals of the program, the source, etc. We also have listed here the future plans and ideas for gCAD.



MODULES

gCAD code is divided into different modules, each one only doing some concrete tasks; thus we have UI (User Interface), GR (GRaphics), DB (DataBase) and other modules. Each module has been written as an isolated part (this has two meanings: each module has its own directory in the source tree and besides its relationship with other modules is intended to be minimal, making as few dependencies as possible).

Only the needed functions and data of a module have to be accesible to others; this access has to be made via a well defined API. This API can be seen in the sources as a file named module.h (DB.h for DB, GE.h for GE...) in that module directory. Other modules calling our module will need to include this header file defining these public entry-points and datastructures.

Also, all public functions (entrypoints that will be called by gCAD) should have names beginning with the name of the module. Same for public datastructures. Internal functions and datastructures can be named as coder wish. In DB sources we can find an example of this:

DBstatus         Is a public simple type 1:s letter 's' lower case
DBPoint          Is a public struct 1:st letter 'P' upper case
DBinsert_point() Is a public function

Using this design, each module appears to others as an abstract layer and when it needs some service (data or actions) from other (or vice versa, when there is it who have to do that) only a few well defined functions and data should be used. Doing this way we avoid some inherent common problems huge projects always have.

These are the modules we have currently, and next it is some info about them:

Module

Prefix

Purpose

Needs

Status

Coders

USER INTERFACE UI Responsible for the interaction with the user. Manages windows, dialogs, keyboard and mouse entries sending them to Command Interpreter, etc. GNOME 1.0, Gtk+ 1.2, X libraries ... Need to be rewritten for GNOME 1.0, and then the rest! Iņigo Serna
GRAPHICS GR Manages all the GL stuff: objects visualization and handling, etc. Gtk+ 1.2, Gtkglarea 1.2.1, Mesa 3.0, X libraries ... Much work done Franz Reiter
DATABASE DB Store and handle graphical and non graphical objects. / Almost finished, waiting to be integrated Johan Kjellander
GEOMETRIC GE Geometric and Algebraic functions. Calculates intersections, if some point belongs or not to that circle ... and all those funny mathematical questions / Now it is been adapted from Varkon Johan Kjellander
COMMAND INTERPRETER CI Responsible for commands. Calls UI for input or takes input from text based command line. Calls EX for execution. / Just started Franz Reiter
EXECUTE EX / / / ?
DOCUMENTATION DO Documentation of gCAD: User Guide, Tutorials, Specifications Papers, Web Pages, ... / A lot of work and I am too lazy ... Iņigo Serna, but I hope only by the moment ;-)
SAMPLES SA Samples (examples) of gCAD drawings for test and tutorial purposes. / Not started ?

Other future planned modules are CAM/CAE (Computer Aided Machinering / Engineering), NC (Numeric Control), FEM (Finite Elements Method), a scripting language to automatize some tasks (possible SCHEME/GUILE will be the adopted).


SPECIFICATIONS

  • Coding Style Guide

  • gCAD File Format

  • (NOT YET WRITTEN)

  • Error Handling

  • (NOT YET WRITTEN)



    [ Introduction ] [ News ] [ Project History ]
    [ Technical Info ] [ Documentation ]
    [ Screenshots ] [ Download ] [ Resources ]


    Comments: inigo@gaztelan.bi.ehu.es