[cad-linux] Re: CAD format, virtual filesystem, editing

  • From: Janek Kozicki <janek_listy@xxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Mon, 8 Sep 2003 00:13:02 +0200

Massimiliano Mirra said:     (by the date of Sun, 07 Sep 2003 22:34:35 +0200)

> Janek Kozicki <janek_listy@xxxxx> writes:
> 
> > 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?

as written below - selections are written inside a file. ./viewport file
contains only information relative to viewport. Such as coordinates of
central point of view, and zoom factor. Or FOV, or anything relevant.

But - you said very important thing - I wanted to place selection in
files, adding a "_tag" line inside them. But what if we want to remember
selections? To make a group of files a selection? there is a solution :)
Suppose we want to create a new group. 

~/drawings/airport/$ cg    (create group)

We select all files (by clicking on objects in the drawing, or by adding
a line "_tag" inside them (in any of dozens of possible ways). then
"_selection_finished". The bash program `cg` now asks for a gruop name,
we give one, and then all _filenames_ with "_tag" inside are written into
this file. Simple.

Note that group will be reffered by filenames. So if filename changes
then it leaves that group. hmm no _simple_ solution to this yet. 
(complicated is to keep Bruno's filename 
<HOSTNAME>-<UNIX_DATE>-<PID>-<INODE>.<OBJECT_TYPE> forewer. 
and to add more descriptions to it - like I mentioned in post 
"[cad-linux] Re: Design methodology for an open geometric data management 
standard"
as to add attributes to filename)
 
> > (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 sterted learning gtk, then discovered there are two versions of it.
and got scared, because new one (2.2 or 2.0) is worse (!) than older one
1.x

I haven't tried tk. But xlib appeals to me by it's simplicity. I
(personnaly) don't want cute icons, big menus/whatever I prefer command
line <-> point'n'click work. No need of icons and menus at all.

But. Those are two different things the "display"-server is a separate
tool. It should talk with the rest of the system by a well known
interafce. So - if anybody decides to do so - he could write more
bloated wersion of a "display" interaface.

When I work with autocad - I don't use icons. but I use layer manager.
That's another important idea - why not make a tool to manage
attributes (stored in the filename) - to look like a midnight
commander? Or better - like the 'attribute manager' that will separate
real name of an object from an attributes of that object and display
them idn correct way? 

like this:

+----------------------------------------------------+
| layer   | color   | linetype  |  name              |
+----------------------------------------------------+
| road    | red     | - - -     |  stripe            |
.
.
.

here is displayed a single filename. Like in midnight commander, but
the real filename is:

<layer> <color>      <name>     <unique number> 
            <linetype>                        <contents type>
l#road-c#red-l#=.=.=-stripe-1045317918-1278-225423.line

(that's just an example)
the numer is used to refer the object, no matter how we change it's name

Then in such a tool you could select different views - 

* to see all objects, (as in example above - each filename is an object
here) 

* to see layers (insted of files) - you will see only layers in a
midnight commander-style, and they will be regarded as 'directories'
upon entering such directory - only files that belong to this layer will
be displayed

* to see everything that has "red" color - so the 'directory category'
will be a color

* and so on with all possible attributes.
 
> > 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.

ok :) by now, discussion on this list is so interesting, that I cannot
allow myself to read more mailing lists ;) but I'll remeber the
invitation ;) We have to join our forces
 
> >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.

[will not delete what's said above - it's so important ;)]

-- 
# Janek Kozicki

Other related posts: