![]() |
![]() |
![]() |
adg-1 reference manual | ![]() |
---|
Automatic Drawing Generation is GObject-based library that provides a non-interactive cairo canvas specifically designed for generating technical drawings. It can be viewed as a tool for programmatically representing an abstract model into a layout (2D drafting).
If you want to develop an application that needs to show and print drawings where some data change but the overall design is similar, the ADG library can be quite useful. In manufacturing industries this is often the case and an ADG-based application could help to greatly improve the productivity of technical offices.
You could reach similar targets using parametric CADs but a custom application provides the following benefits:
Visit the ADG web site for further details.
The project is based on the GObject library: the ADG canvas is developed in plain C using an object-oriented approach. Applications based on ADG are not expected to be developed in C, though: the basic idea is to have a set of language bindings for higher level languages (the garbage-collected ones, above all). An application can then be developed using any specific language available, much in the same way as GNOME applications are conceived. Lua bindings based on LGI are yet availables and effectively used upstream to test the APIs. The adg-lua project provides code examples on how to use them.
The mathematical and geometrical algorithms, together with a bunch of other useful functions for manipulating cairo paths, are kept in a separated library called CPML (Cairo Path Manipulation Library). Although actually embedded into the ADG project, this library can be easily splitted on its own, if needed.
The rendering leverages cairo, so the ADG canvas fully shares strong and weak points of that library. Most notably, the availables export formats include PostScript, SVG, PDF, PNG but no CAD specific ones (such as DXF). A complete list can be browsed online.
The ADG library has the following dependencies:
The required packages must be installed prior the ADG building: they should be availables on nearly every decent unix-like system.
The ADG is mainly developed on GNU/Linux but its dependecies are known to be cross platform so a porting should be quite easy, if not automatic. Anyway, the cross-compilation of a Windows installer is supported upstream and it is based on the ArchLinux Fedora mingw port.
The ADG build system is based on GNU autotools, the de-facto
standard for handling free software projects. The following
step-by-step instructions are included only for reference: you are
free to install ADG in the way you prefer. Just remember if you
are copying and pasting to put the proper package version instead
of the 0.6.0
placeholder used in the examples.
cd $HOME wget http://sourceforge.net/projects/adg/files/adg/0.6.0/adg-0.6.0.tar.bz2
tar xjvf adg-0.6.0.tar.bz2
./configure --help
to get a
list of all the available customizations.
cd adg-0.6.0 ./configure
make
demo/adg-demo-uninstalled
--prefix
option in the
configuration step.
sudo make install
Further details on the installation are availables in the INSTALL
text file distributed within the tarball.