Hi Martin - Thanks! Just one error ... The definition is p_u_stalagmaflat_AMER. You got the u and p reversed. Took me a couple of hours to figure that one out today, but I eventually got it. The new symbol is working for me. It goes on the map like it should. I have two followup questions: 1) The map legend labels the symbol as "point u:stalagmaflat_AMER". I tried to use a text line in the thconfig file, but it has no apparent effect. If I put it inside the layout/endlayout pair, therion throws an error. If I put it outside the layout/endlayout section, then no error - and no change. 2) It would be handy to split the Metapost code out to an include file. I tried to use both source and input to read a file, but therion did not like them. Is there a way to do this? The only example I found in the Wiki has the entire layout section in a separate file. I just want to split the Metapost code out. Bill Gee On Sunday, February 02, 2014 23:06:21 Martin Sluka wrote:
Bill, There are two kinds of symbols in Therion - first one are symbols which are included to Therion in time of compilation - like symbol "stalagmite". Second kind are user symbols. The definition of user symbol should be like:
def u_p_stalagmaflat_AMER (expr pos,theta,sc,al) =
In XTherion you call it as:
point u:stalagmaflat_AMER
Red are symbols which definition is not known.
M.
Odesláno z iPhonu
2. 2. 2014 v 22:00, Bill Gee <bgee@campercaver.net>:
Hello everyone -
I have been struggling for the last several days trying to figure out how to build and use my own symbols. I need a symbol for two kinds of formations - Stalactiflats and Stalagmaflats. These are basically stalagmites which are fat (several feet diameter) and flat on top like a table (or flat on the bottom).
It appears there are two problems to solve. The first, which I address in this question, is how to get xTherion to use a custom symbol. The second is to figure out how to draw the symbol in Metapost. For now I am ignoring the second problem. One step at a time!
After spending several hours going through Therion By Example, I was able to get a custom symbol to work, but only by replacing an existing symbol. I used the NSS "gradient point" example.
Changing the Metapost code as shown does not produce any error messages. However, it also does not produce a symbol in the PDF output. All I get is a red dot.
===============
code metapost
def p_stalagmaflat_AMER (expr pos,theta,sc,al) =
U:=(.15u, .4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC;
#Left Hand side thdraw (-.3u, -.2u) -- (-.7u, .1u); thdraw (-.2u, -.1u) -- (-.4u, .6u);
#Centerline thdraw (0u, 0u) -- (0u, .9u);
#Right side thdraw (.3u, -.2u) -- (.7u, .1u); thdraw (.2u, -.1u) -- (.4u, .6u);
enddef;
initsymbol ("p_stalagmaflat_AMER");
endcode
==================
Since I am not replacing an existing symbol, I leave out the "symbol-assign" line.
In xTherion I try to use this by inserting a point of type "u" and adding an option "-subtype stalagmaflat".
I think this is where I am missing something ... How to call the custom symbol with a "u" point. Is this the right syntax?
In the worst case I suppose I could set it up to replace a symbol that I won't use for this cave - a ladder, for example. That would probably cause quite a bit of confusion down the road, so I would much prefer to avoid it.
I am using Therion 5.3.13 on 64-bit Fedora 20.
Thanks - Bill Gee _______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion