[cad-linux] Re: database access methods

G'Day !

Remember I said I developed what I called design modes, which are 
special plug-ins for engineering disiplines.  Well the theory is that 
the Naval Architecture plug-in would handle the special tables needed 
by naval architecture module plug-ins.  So in effect GtkCAD extends the 
generic model by the use of design modes.

For example:  When you launch GtkCAD, you can specify on the cmd line 
which mode to start (it will also be handled by an rc file).  So lets 
say we specify the Naval Architecture mode.  At launch GtkCAD parses 
the cmdline switches and loads the Naval Architecture plug-in.  This 
allows the appropiate dialogs to be displayed when menu items are 
chosen.  So when you create a new hull design the extended tables 
needed are created in the DB and populated appropiately, by the Naval 
Architecture plug-in.  The naval mode then handles the extended API 
needed for the analysis modules.  For example when I calculate the 
static properties using the hydrostatics module.

Hope this explanation helps.

cheers,
Jim Parker


On 2003.05.16 11:22 Eric Wilhelm wrote:
> 
> > The following was supposedly scribed by
> > Jim Parker
> > on Friday 16 May 2003 10:03 am:
> 
> >G'Day !
> >
> >GtkCAD does it this way.  There is a standard Library API that covers
> >all normal geometric entities.  So if a function needs the location
> of
> >a vertex, it uses this API.
> >
> >But lets say a module needs to know the Over all length of a ship
> >hull.  Generic GtkCAD does not know what a ship is let along it's
> >length (after all civil engineers have no need for this table.)  So
> >GtkCAD allows the module to add a table to the database and
> manipulate
> >the info in the new table, but it uses the standard library for
> generic
> >model information.
> 
> Would parts of the naval module be usable by other programs/modules
> which
> would require access to the hull information for other tasks?
> 
> Could these parts be a well-defined group of functions specific to
> accessing
> that data?
> 
> If so, would it over-complicate the development to make these
> functions into a
> library intended for allowing access to the ship data?
> 
> --Eric
> 
> 

Other related posts: