LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Automatic diagram generator software (https://www.linuxquestions.org/questions/linux-software-2/automatic-diagram-generator-software-780229/)

synss 01-06-2010 05:28 AM

Automatic diagram generator software
 
Hello. I am looking for an automatic diagram generator. I want to design a chart for vacuum equipment (i.e., expensive plumbing) using DIN 28401 symbols. In other words, I need a program that is flexible enough to let me draw these symbols as I do not expect them to be present in some library. But I do not want to use an SVG software, I would rather write simple code telling the software what goes where. Dia is not an option either as it is more a special purposed SVG drawing software than anything else.

The closest I found so far is TikZ (a LaTeX package), which would do everything I want, but it is a rather complex tool. I would appreciate if somebody could point me to something simpler.

Example pseudo code for what I would like to do
Code:

define "hand valve"
define "rotary pump"
define "gas bottle"
define "T connection"

# Comment: simple fork -> union -> pump
gas bottle;
hand valve;
T connection;
    hand valve;
    hand valve;
T connection;
rotary pump;


Simon Bridge 01-06-2010 06:41 AM

y'know, I cannot find DIN 2841 anywhere - can you give a pointer to the specification? [edit]scratch that - found DIN 28401 :)

It looks like you want to make a library of the symbols then use another tool to manipulate them - like dia. That's what we'd normally do, rather than use a complex but powerful package like latex.BRL-CAD would also be way overkill - though you could visualise your pipes in 3D ;)

Nah - take an existing symbolic diagramming tool and add the symbols you want to it. Faster, simpler. XFig, for eg, has a DIN library, dunno if it includes 28401 though. Dia also has a large collection of symbols.

synss 01-07-2010 07:18 AM

Thank you. For the 3D visualization, I use AutoCAD, not for any other reason than that's what my boss wants. But I would like a simpler and more schematic representation of the pipes, maybe Dia is the fastest and simplest tool as you said. I was just thinking that maybe, starting with a descriptive language and letting some other software actually do the drawing would be easier to maintain, but as you mentioned, everything that does that seems to be way too complicated.

Simon Bridge 01-07-2010 05:48 PM

Quote:

I was just thinking that maybe, starting with a descriptive language and letting some other software actually do the drawing would be easier to maintain, but as you mentioned, everything that does that seems to be way too complicated.
Well, you have to define the descriptions somehow - and the program has to be generic enough to accept this.

Drawing all the symbols to vector-graphics then adding them to something else will be simpler than describing them, and it is the same thing only letting the computer do the donkey work. Add that it looks like many DIN symbos are already available, then it is likely that someone else has already addressed your problem.

synss 01-08-2010 06:20 AM

That is all right. I will follow your recommendation. And what would you recommend as a symbolic diagramming software?

Simon Bridge 01-08-2010 09:47 PM

- the diagram software tends to be light, so what I'd do in your place is download the main ones for your distr (Xfig and dia and anything that takes your fancy) and see what they do already. Add to the one that almost does what you want.

Note - for others:
DIN = German Industrial Standards (Deutsche Industrienorm) - the symbol set used a lot in AutoCAD packages. If the set you want are also ISO/IEC (like DIN 476 --> ISO 216 - paper sizes) then there should be a diagram package implementing them.

Simon Bridge 01-08-2010 11:06 PM

You mentioned LaTeX - the picture environment is mostly annoying to use because it requires absolute coordinates. However, there are diagram drawers which work with LaTeX as well, then you need only specify the macros.

eg. xy-pic works inside LaTeX, and uses a matrix-style layout. You'd add your macro names to places in the matrix and define their connections.

Also the PIC engine can be used to specify the digram in a manner close to what you described in your first post, and the pic commands converted to LaTeX picture environment commands using dpic or gpic utilities, or you can just compile it to postscript.
http://floppsie.comp.glam.ac.uk/Glam...s/web/pic.html

The pic representation of your example would look something like:
Code:

.PS

# Use block composites for each symbol
hand_valve: []
rotary_pump: []
gas_bottle: []
T_connection: []

#simple fork -> union -> pump

gas_bottle; line; hand_valve; line; T_connection;

line right up; hand_valve; line right down;

move to last T-connection;

line right down; hand_valve; line right up;

T_connection; line; rotary_pump;

.PE

The block composites can define connection points and default lines etc as complicated as you want. eg, you may prefer to use a macro for the t-junction to allow for orientation.

This looks very close to what you imagined.

synss 01-09-2010 02:30 AM

Nice! thank you again for your time.


All times are GMT -5. The time now is 03:09 PM.