To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 9467
9466  |  9468
Subject: 
Re: [LSC] Colour Definition meta-statement
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 28 Jan 2004 18:11:26 GMT
Viewed: 
1754 times
  
In lugnet.cad.dev, Steve Bliss wrote:
Scope.  A color definition will affect colors from the point it first appears,
continuing through the end of the file.  Commands preceding a colour definition
will not be affected by the definition.  Color definitions will expire at the
end of the file in which they appear, effectively going out of scope.  Color
definitions will be passed to subfiles.

The configuration file, ldconfig.ldr, is not affected by the scoping rules, in
the sense that the definitions in ldconfig.ldr remain in effect after the
renderer is finished processing ldconfig.ldr.

When I first read, this, it seemed reasonable, but probably difficult to
implement in a renderer.  The more I think about it, though, the more I think
the difficulty outweighs the niceness.

Specifically, I think it would be a royal pain to support color scoping on a
line-by-line basis in a file.  And to be perfectly honest, it doesn't really buy
you anything in real life.  How many people are going to use a color number
early in the file and expect one color, and then re-define that number later in
the file and then use it to represent a different color?

Having said that, the stated scoping could be easier to implement, depending on
how the parser works.  If the colors are evaluated immediately upon loading a
particular line, the the stated rules would be the easiest to implement.  If, on
the other hand, the entire model is loaded, and the colors are evaluated later,
the stated rules would be difficult.

My personal vote would be to require all !COLOUR meta-commands to precede all
geometry lines (line type 1, 2, 3, 4, 5).

I also have a question.  How do the scoping rules interact with color 16 and
color 24?  Specifically, if you define color 42 to be green in file A and file A
is drawn in color 42 from file B, does the color definition hold if file A
contains items drawn in color 16 or 24?  I would say that it shouldn't, because
the file B has no way of knowing that color 42 is going to be re-defined, and
the file A has no way of knowing that it is going to be rendered with color 42.

--Travis Cobbs



Message has 1 Reply:
  Re: [LSC] Colour Definition meta-statement
 
(...) Actually, I was considering the possibility of (patterned) parts including custom color definitions, which would only apply to that part. (...) That's a good question. Think about this: what if file A also has some surfaces hard-coded to color (...) (20 years ago, 6-Feb-04, to lugnet.cad.dev)

Message is in Reply To:
  [LSC] Colour Definition meta-statement
 
Here's the initial write up for a color definition meta-statement, to be used in ldconfig.ldr and in any model file. The LSC has a couple of outstanding issues with this spec, let's discuss those in follow-up messages. Please respond with any (...) (20 years ago, 21-Jan-04, to lugnet.cad.dev)

28 Messages in This Thread:











Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR