This is exactly the problem: currently therion is not able to handle attributes individually for shots. But this item is already in the TODO list, I will try to implement is ASAP.
Regards, S. On Sun, Apr 13, 2008 at 9:05 PM, Jonathan Prouty <dormat at gmail.com> wrote: > 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^ > _______________________________________________ > Therion mailing list > Therion at speleo.sk > http://www.speleo.sk/mailman/listinfo/therion >
