[Therion] color centerlines by map?
Jonathan Prouty
dormat at gmail.com
Sun Apr 13 21:05:45 CEST 2008
I've made some progress in my attempt at having splay legs be colored
differently from regular survey legs, but I'm afraid I've hit a wall.
I've added "-attr splay on" to all surveys that consist of nothing but
splay legs. This makes it necessary that I record splay legs and
regular legs in different surveys within therion. This is a bit of a
pain, but it will work for now.
In order to take advantage of the "splay" custom attribute, I've also
redefined the metapost macro responsible for drawing centerlines:
def l_survey_cave(expr p) =
pickup PenD;
if known ATTR_splay:
draw p withcolor green;
else:
draw p withcolor red;
fi;
enddef;
The macro works as it should. If a survey has the "splay" custom
attribute (value doesn't matter), the survey will be colored green.
Unfortunately, ALL survey lines are colored green, not just the ones
with the "splay" attribute.
I think this is because internally, therion combines all surveys into
a single object to draw them. Therefore, if any survey has the "splay"
attribute, "if known ATTR_splay:" will return true for the entire
thing. If this is the case, is there any way to limit the scope of the
"splay" custom attribute?
I think using this splay attribute is a nasty hack, considering
therion already maintains meta data that determines whether a given
survey leg is a splay shot or not. Is there a way to check what flags
a station/leg has set from within metapost? Something similar to the
following:
def l_survey_cave(expr p) =
pickup PenD;
if splay_flag_set:
draw p withcolor green;
else:
draw p withcolor red;
fi;
enddef;
--
-Jonny ^v^
More information about the Therion
mailing list