[cad-linux-dev] Re: variably formatted text (now with references:)

  • From: Eric Wilhelm <ewilhelm@xxxxxxxxxxxxx>
  • To: cad-linux-dev@xxxxxxxxxxxxx
  • Date: Sun, 7 Dec 2003 13:58:27 -0600

> The following was supposedly scribed by
> cr88192
> on Sunday 07 December 2003 01:36 pm:

>not everything will be annonymous, just most things don't need a name...
>naming is useful for things accessible from elsewhere, or for the sake of
>users (they may want to name parts of the models).
>if you say, have a chair, most of the geometry does not need names, but some
>groups of geometry (eg: the seat or back) may usefully have names...
>

I don't see it as a question of whether the names are useful to the user
or not.  It is more a matter of whether they facilitate the
extensibility of the format.

>for parts that are used as functions it may be quite useful to have names,
>eg, so one can be like:
>(office-chair origin: #(0 0 0) height: 2 appolstery: (color #(1 0 0 1))
>metal: (color #(0.25 0.25 0.1 1)))

If we are just going to render the chair, then the upholstery and metal
metal would be named for color and texture purposes.  But what if we
want to load-test the chair or calculate the weight of all of the office
furniture on a floor?  Also, to allow the chair design to be easily
modified, we might wish for the legs to be instances of a "master" leg
or for the front legs to be mirror images of each other and to know what
sort of fasteners are used to attach them.

Maybe your modeler is not this complicated or someone's drafting program
is not nearly so complicated.  Does this prevent you from using a format
where everything has a name?  If the stored model is accessed through a
library which implements the names automagically, you would be loading a
named union which contains some named entities.  If you can manage to
allow just one pointer to tag-along with the entities through all
operations, the API would pick-up the name out of this pointer in the
save functions and handle all of the naming for you.

From another approach, maybe one of the "modes" of this library is the
fully-anonymous mode, where the items are stored with names, but the
program doesn't even attempt to track them and they are all re-named
(possibly) on each save operation.  This requires some clean-up to
happen via the library, but still uses a format with everything named
and linked.

--Eric
-- 
"Politics is not a bad profession. If you succeed there are many 
rewards, if you disgrace yourself you can always write a book."
                                        --Ronald Reagan



Other related posts: