[cad-linux] Re: An open CAD file format, and a tool to draw with it

  • From: Janek Kozicki <janek_listy@xxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Sun, 7 Sep 2003 20:37:03 +0200

Massimiliano Mirra said:     (by the date of Sun, 07 Sep 2003 05:51:19 +0200)

> astrojanek@xxxxxxxxxx writes: (I changed my mail account, now it's
> configured correctly)

> Janek Kozicki writes:
> > Indeed the most important thing we have to develop is a very precise and 
> > also very open to extending (but still following the specification) data
> > format.
> I fully agree on openness, and I think precision will come, at the
> right rate.  For now it would be nice for the system to enjoy a
> healthy wave of stimuli and ideas; it will settle on the best ones
> spontaneously.

that's it. We should check as many options as possible to find the right one

> > ah, well. the only thing I personally miss the most is my autocad style of 
> > drawing... with command line, just some command <space> <space> <click>
> > <click> <space> m <space> <click> (another two-letter command)... that's
> > very fast method to work. And yet there are no opensourde cad
> > applications that allow that. Perhaps one based on this file format will
> > be made?
> >
> > As a intermediate linux C++ programmer I'm eager to help.
> One thing there's no lack of is areas in need of development. :-) 

One thing sparked to my mind - as I'm currently learning Xlib, and wrote
some simple programs that do graphics under X (previously I was writing
c++ programs for windows, and I'll never do that again) - maybe such a
tool could be devloped - imagine such behaviour:

(from bash command line)
~$ cd drawings/airport/
~/drawings/airport/$ display

now the display program located in some ~/bin/ path starts and displays
the content of directory (that is very similar to what is currently

but here. You can start work from two interfaces. the display interface,
and the bash command line interace. every action makes modification in
files. Currently I'm thinking about only one capability - communication
between "display" and bash programs.

~/drawings/airport/$ w 

(zoom window - execute bash command line program that needs two
arguments from "display" - two points clicked on the display (bottom
right, and top left corner for example). To communicate with "display"
program the `w` program should read from some socket type file located
in this directory, or in /tmp/ , or in any other possible way)

I think It could be made in a client <-> server way ( w <-> display )

* now you click two points on "display" which are passed to "w" program
which processes them and updates file ./viewport located in current
directory, then - "display" updates display - because it discovered that
./viewport file changed.

(notice how easily you can create, copy, rename, store somewhere else 

~/drawings/airport/$ m

* now `m` program expects a list of objects from the server.

So you select the objects by clicking. Each click causes the "display"
program to write a line "_tag" into the file that describes the clicked
object. When you finished object selection you do right-click (or press
space) while focus on "display". `m` program recevies only one signal
from the server - "_selection_finished."

Note - by this way you can automatically select files by adding a line
"_tag" into all files that passed this filter (for example) 
`grep "circle" ./*`
After this selection done by some coplicated bash program, you only send
"_selection_finished" signal from the "display" server.

* now `m` program expects two points (to move the selection a specified vector)

You click those two points, `m` program reads them from "display"
server, then moves all selected objects by specified vector..
and so on.

of course a matter of "display"-server should be thinked a lot. To avoid
some strange problems - like 10 "display"-server programs launched to
work on two different drawings (5 views for each drawing). What then?
Surely to be solved :)

> For discussion about the nitty-gritty implementation details you're
> welcome to join the devel mailing list
> (http://lists.sourceforge.net/lists/listinfo/xspace-devel).

I checked the list - unfortunately I don't understand italian (not even
sure if that's italian ;)

# Janek Kozicki

Other related posts: