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

  • From: Massimiliano Mirra <mmirra@xxxxxxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Sun, 07 Sep 2003 22:34:35 +0200

Janek Kozicki <janek_listy@xxxxx> writes:

> 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 )

That would be good.

> * 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.

So ./viewport is the file describing the viewport metadata, such as
selections and such?

> (notice how easily you can create, copy, rename, store somewhere else 
> viewports!)
> ~/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.

Cool!  I really like this!

The xlib road might be steep.  Consider also using an existing object
oriented canvas such as the GNOME canvas or the Tk canvas (have a look
at viewport-tk.rb and viewport-gtk.rb in the xSpace lib/ dir): they
store the drawing as structures rather than pixels, and provide
methods for getting from a screen position (click) to the
corresponding structure.

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

No problem, the messages are in italian only because the subscribers
all happen to be italian at the moment.  Just drop a mail so that we
know when it's time to switch to English.

>But bear one thing I mind - I want interactive working to be easy.
>(clicking, writing commands, clicking again)

I agree.  We can't do without that in the long run.

Other related posts:

  • » [cad-linux] Re: An open CAD file format, and a tool to drawwith it