On Thu 19-Aug-2004 at 10:36 -0500, Eric Wilhelm wrote: > > >2. Specify the layer of each element as an attribute and have a > >separate "layer" type of element that describes each layer. > > Right, this is the current aim. > > > The problem this raises is that it isn't 'normalised' in a > > database sense - What do you do with objects that refer to > > non-existing layers? How do you rename a layer? > > How about using a 'name:' attribute in the layer entity? The > geometric entities then refer to a layer by ID. That's like my 'description' attribute below, the ID (and presumably the filename also) should be the alphanumeric "name" of the layer: > > ID: doors > > description: All the doors in my house > So, I refer back to the reason that lines are given equal > importance to circles in the flat structure. The layer property > should be next to the type property (which is next to the style > property, and so forth.) Linetypes do not contain objects, colors > do not contain objects, etc. and therefore layers do not contain > objects. Ok you convinced me. > When you look at the implications of keeping geometric entities in > the same (flat) structure, doesn't this preclude the use of > different structures for each kind of logical-property element? Maybe you are right, my 'layer' element containing a list of other elements is somewhat like a cache and so you could consider it premature optimisation. > Note also that the layerID attribute of each entity under model #2 > could in fact be a list. There are a lot of other things that are not obviously 'lists' that could be lists with just one entry - This would make scripting easier. For instance a line has a 'points' list and a circle has a 'point' entry - If I wanted to write a script that accessed the files directly (say to apply a 'move' translation), it would be easier if it didn't have to know that a circle has only one point - A dumb tool should just rewrite everything in the 'points' list and get it right for all kinds of element. > However, since layers are primarily used for visibility control, > how would this work? [A slight digression here] In the mutt mailer, there is a syntax to only display messages that match particular criteria: such as date-range, size, sender, body-text or any complex combination of patterns. It would be great to have a CAD tool that I could ask to show only circles on layer 'columns' that arn't red that were last-modified on a Sunday and have a radius less than 800 or greater than 1000 - This would be so much more powerful than just turning layers on and off. -- Bruno