C19 Tutorial- Winnatts, discussion board

alastairgott

Well-known member
Sounds great, there?s probably other caves in Derbyshire which we could digitise. And I left winnatts in October without properly joining the upper part of the cave and the bottom, so some work to be done there through the first boulder choke.

Are you back in Spain, or will we lose you to Austria? :/
 

Logismos

New member
I'm somewhat familiar with the Wigwam-NCC connection (though I haven't done it) and I'd be very keen for the task. As soon as we can get underground (and I can travel out from Sheffield), I'll be eager to get underground and surveying. I'm currently making sure that I'll be fit enough when the time comes!

@Gott Sprits willing, I'll be able to get out to both! I'm working on making sure a contingent of SUSS get out to Spain if we can though, so that's my priority.
 

alastairgott

Well-known member
Spirits for a start, yes, they?re easier to carry up the hill. ;)

Joking aside, be great if you could get suss and friends out. Some leads up on that hill.
 

Logismos

New member
So, I've put something together (attached) - and would appreciate any feedback.

I've also assembled a list of questions, should anyone/Gott feel like answering  :sneaky:

1) Is there any advantage to attaching the edges of areas/lines/points to the cave walls, or can you happily just draw all about the place?

2) Does it matter if elements like rocks are a fully enclosed space or not?

3) Is it possible to combine multiple areas? (ie. making The Sewer water and sand)

4) Is there any way to make the detail in the areas "denser"? (ie. the rocky areas in the middle, so that they look closer to the sketch)
I tried changing the scale to xs, but that made minimal difference.

5) How would I go about reformatting the title ("Winnats head cave: plan beyond the sewer") so that it looks nicer?

6) Is there a way to prevent the legend from showing certain symbols? (wall, rock border and edges in this case)
In the config file maybe?
 

Attachments

  • WinnattsBeyondtheSewer_MhVer_A.pdf
    50.8 KB · Views: 178

alastairgott

Well-known member
Damn, I opened another tab and all my answers disappeared... a lot of the answers are (helpfully) yes, except no 1. Let me post some photos up tomorrow. Especially of 1 and 2.

For 4) there's metapost, but let's get a zoom call on for that M, as there's some explaining to do... https://therion.speleo.sk/wiki/metapost?s[]=blocks
"Customisable Area Blocks with Different Number of Sides"

5 I was looking at some other surveys and that's why I lost my answers, I'll come back to you on that.

6) probably...
 

alastairgott

Well-known member
1) as my post yesterday, the underlying data which the drawing uses is the survex model, which the drawings are essentially draped over. if the drawing you give it is slightly different to the data, then you will see a transformation (or a warp) in the final result. In these cases it's critical you join the lines to the wall. I have included a picture of a part of a cave, which has a slight transformation in it, which illustates the difference between attaching to points and not attaching to wall points.
Notice the gap which creeps inbetween the arrow and the wall when you don't attach the arrow to the wall.


This case is rather extreme, but a good illustation of why using the points on the wall is important.


However in some cases the reverse is also true, it doesn't really matter. See below sump drawing, where the area for the sump has just been ringed around the passage, there is a shared "line border" between the area of the sump and the area of the airbell. Looking back, I think I could split the rock at the start of the sump and attach the line borders to it so the area of sump and the little pool are right up against the rock. but sometimes, theres far too much else to be getting on with to split hairs/rocks like that...
 

Attachments

  • Snapped to points.png
    Snapped to points.png
    448 KB · Views: 196
  • Without snapping to points.png
    Without snapping to points.png
    449.6 KB · Views: 199
  • sump no attaching to points.png
    sump no attaching to points.png
    1.2 MB · Views: 201

alastairgott

Well-known member
2) it depends on what rocks you want to achieve, some rocks receive more attention than others, I quite like these arty rocks from a Sheffield Uni art student. which I traced with rock edges. rock borders however create the slightly shaded area in the middle of them, and this is written into the code, so I believe that shade can be changed (if you wanted to do this) [Therion] Different Color for Rocks? (speleo.sk)



 

Attachments

  • Rock edges VS Rock border.png
    Rock edges VS Rock border.png
    415.1 KB · Views: 203

alastairgott

Well-known member
3) Possibly you could combine areas, but I would ask why?

If your thinking your cave will be more than say 50-200m, then the more areas your adding in, the higher the processing time therion will take, try using area blocks and generating the PDF a couple of times. the blocks are never quite in the same place, so the software if recomputing the block locations every time you run the model.

For this reason, people tend to advise using the following order for drawing things.
Use points first, if it can't be drawn with a point, then try a line, and as a last resort an area.

PS Sand in therion looks rubbish, a smattering of dots, making a piece of toast creates more crumbs!
 

alastairgott

Well-known member
4) yes, as I already alluded to there are ways of using metapost to change the way the area blocks and area debris behave, but this is by defining your own symbol (I'm unsure, but this may have been actually implemented in a later version of Therion so blocks and debris can now be defined).

Irrespective, it's good to know how to define your own should you wish.


The three things you will need to do is to set up a layout in the config file to disrupt the standard generation of the pdf. see the addition of the "layout local" to the pdf export command.


Then you need to assign some symbols (in the layout), in the below case we have used "symbol-assign area debris TEST"

This tells the software to look for this when generating an area debris, rather than using the standard "factory settings".

Before I move on, it's important that you notice that all of these commands are between a "layout local" and endlayout command. the same is true when we come onto the metapost, which has a "code metapost" and endcode command wrapping it.
With the layout, you can call it anything, layout smallcave, layout Matrixmansmells.
eg. export map -layout Matrixmansmells -o tinycave.pdf
layout Matrixmansmells

scale 1 100
symbol-set NZSS
symbol-hide group cave-centreline
endlayout
#####

once you've included the code metapost command, you can initiate your symbol using

initsymbol ("a_debris_TEST");

and then defining all the below guff (probably best to copy and paste it). all the numbers mean something, but have a play and see what you can come up with. There is probably the perfect block and the perfect debris. but god knows if we can agree on that. If you want to have a play with adding in other things using metapost, there's a lot there on the webpage I posted up yesterday, I don't really think you'll get bored...


ps. i'm not clever enough to come up with the below code, so don't give me any credit for the debris/blocks but we all share ideas :hug:
Code:
source testrocks.th2
 export map -layout local -o testrocks.pdf 
 
 #input blocks_AUT 
 #input blocks_SKBB
 
 layout local
 scale 1 100
 symbol-set NZSS
 symbol-hide group cave-centreline
 #copy blocksAUT
 #copy blocksSKBB
 symbol-assign area debris TEST
 symbol-assign area blocks TEST
 #symbol-assign area blocks AUT
 #symbol-assign area blocks SKBB
 
 code metapost
 
 initsymbol ("a_debris_TEST");
 initsymbol ("a_blocks_TEST");
 
 def a_blocks_TEST (expr p) = T:=identity; symbol_distance:=1; scale_factor:= 0.8; pickup PenC; path q, qq; q = bbox p; pair outside; outside:= ulcorner q + up; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); tmp_pic := image( for i = xpart llcorner q step symbol_distance*uu until xpart urcorner q: for j = ypart llcorner q step symbol_distance*uu until ypart urcorner q: qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(1.05uu,0.05uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) randomized (uu/2)) scaled (uniformdeviate(0.7)+scale_factor ) rotated uniformdeviate(360) shifted ((i,j) randomized 0.75uu); if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; else: qq:= qq scaled (uniformdeviate(.2)+.5 ) if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; fi; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef;
 
 def a_debris_TEST (expr p) = T:=identity; pickup PenC; path q, qq; q = bbox p; picture tmp_pic; tmp_pic := image( for i = xpart llcorner q step u until xpart urcorner q: for j = ypart llcorner q step u until ypart urcorner q: qq := punked (((-.2u,-.2u)--(.2u,-.2u)--(.2u,.2u)--(-.2u,.2u)--cycle) randomized (u/2)) rotated uniformdeviate(360) shifted ((i,j) randomized u); if xpart (p intersectiontimes qq) < 0: thclean qq; thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; draw tmp_pic; enddef;
 
 endcode
 endlayout
 

Attachments

  • testrocks.png
    testrocks.png
    245.3 KB · Views: 193

alastairgott

Well-known member
5) i'd use italics and breaks in your .th file,
introduces a break, and <it> makes it italics afterwards.
such as -title "Winnatts head cave
<it>Beyond the sewer"

6) https://therion.speleo.sk/wiki/tips#hiding_particular_symbols_from_legend
 

Logismos

New member
Thanks a bunch for the detailed answers! (I've attached my latest version)
Don't feel like I'm demanding your time to write all this out, a lot of this is mostly sting my curiosity (at least, until we're underground again).

For some reason, I'm particularly interested in custom symbols. I think I have some understanding of how the custom symbols work, after some reading - or at least the bits that matter to me right now.

The only additional part of that code I'd like to understand more is where-abouts it overwrites the existing symbol.
This is tied to the possibility to add symbols, as I think is described here: http://marcocorvi.altervista.org/caving/tbe/m_07/m_074.htm

Worded a different way: I'm not sure where the example code in 4) redefines the two area types native to Therion, and if it's possible to write metapost to make new symbols without overwriting existing.

I assume my answers lie somewhere within https://therion.speleo.sk/wiki/metapost?s[ but I've not had luck finding them yet.


PS. It was interesting to note that my version_A was 51kB, whereas my (only slightly different) version_B is 70kB.
 

Attachments

  • WinnattsBeyondtheSewer_MhVer_B.pdf
    69.3 KB · Views: 175

andrew

Member
Matrixman355 said:
Thanks a bunch for the detailed answers! (I've attached my latest version)
Don't feel like I'm demanding your time to write all this out, a lot of this is mostly sting my curiosity (at least, until we're underground again).

For some reason, I'm particularly interested in custom symbols. I think I have some understanding of how the custom symbols work, after some reading - or at least the bits that matter to me right now.

The only additional part of that code I'd like to understand more is where-abouts it overwrites the existing symbol.
This is tied to the possibility to add symbols, as I think is described here: http://marcocorvi.altervista.org/caving/tbe/m_07/m_074.htm

Worded a different way: I'm not sure where the example code in 4) redefines the two area types native to Therion, and if it's possible to write metapost to make new symbols without overwriting existing.

I assume my answers lie somewhere within https://therion.speleo.sk/wiki/metapost?s[ but I've not had luck finding them yet.


PS. It was interesting to note that my version_A was 51kB, whereas my (only slightly different) version_B is 70kB.

I'd like to answer your question, however your question is a little unclear, but I'll try my best

Maybe all you are looking for is that the symbol is overridden in the layout nest.

Each symbol can really only have one definition per plan or elevation in a survey, there are certain things you can change like the size or the text of a label for each use of a symbol. It would be strange if a wall in one part of a survey was different from a wall in a different part. That said For the symbol wall there are other options like wall that is made of mud, really a rock wall and a mud wall are different symbols, Wall just defaults to rock. It is possible to do very complex things, for example at the last CSG advanced survey meeting we looked at the possibility of having different. For boulder types in the same survey rather than a generic type. Contained in the link given earlier is the outcome Customisable Area Blocks with Different Number of Sides , you'll need to search or scroll as the link is not to the sub sections. This definition lets you define blocks and then some parameters to control how those block look.

When you define your own symbol and initiate it, you override the symbol that would have been used, there are different sets of symbol that can be used, or mixed if you want, Therion is very powerful, but that inevitably makes some of the more advanced features complex. This sort of question is probably best asked on the mailing list, which is likely to be the most friendly mailing list/forum you'll ever find.
 
Hey everyone, I've recently started (attempting) to learn Therion and have followed the Winnatts example through. I had the chance to get into Agen Allwedd yesterday and take some data of my own which was good fun, although not super accurate data as it was more of a 'get as much as I can' kind of thing. Have been working on the survey today though and have something that I'm happy to show to people.

I've found it difficult to add the authors name to the pdf for some reason, as well as changing the scale of the title. If anyone could give me a hint as to how to go about that that would be amazing? Also any general feedback on style, things to improve, ect. would be greatly appreciated too. Thanks : )
 

Attachments

  • Aggy-plan.pdf
    45.9 KB · Views: 138

Babyhagrid

Well-known member
Hey everyone, I've recently started (attempting) to learn Therion and have followed the Winnatts example through. I had the chance to get into Agen Allwedd yesterday and take some data of my own which was good fun, although not super accurate data as it was more of a 'get as much as I can' kind of thing. Have been working on the survey today though and have something that I'm happy to show to people.

I've found it difficult to add the authors name to the pdf for some reason, as well as changing the scale of the title. If anyone could give me a hint as to how to go about that that would be amazing? Also any general feedback on style, things to improve, ect. would be greatly appreciated too. Thanks :)
Looks like a nice survey. Just a few more meters to go before a full copy 😂
 

Steve Clark

Well-known member
Hey everyone, I've recently started (attempting) to learn Therion and have followed the Winnatts example through. I had the chance to get into Agen Allwedd yesterday and take some data of my own which was good fun, although not super accurate data as it was more of a 'get as much as I can' kind of thing. Have been working on the survey today though and have something that I'm happy to show to people.

I've found it difficult to add the authors name to the pdf for some reason, as well as changing the scale of the title. If anyone could give me a hint as to how to go about that that would be amazing? Also any general feedback on style, things to improve, ect. would be greatly appreciated too. Thanks : )

Looks good.

Right then, adding author :

If you add this to layout.....endlayout section of thconfig :

doc-author "i think it goes"

Then that will set the author the pdf. So if you open the pdf in adobe acrobat and go to properties it will have this metadata in there.



However you probably want to do this :

If you want to add stuff to the legend box, you need a bit of code and it's a bit of a pain if you want to customise it heavily. As a simple starter, put this in the layout.....endlayout section of thconfig :

code tex-map

\cartotitle={Drawn by}
\cartoteam={i think it goes}

endcode


You can find more examples of what you can change in the section of the therion book called 'Changing layout of PDF maps', sub section 'Page layout in the map mode', Page 70 in my version

As for changing the title size, you can do that with code, but first I'd encourage you to look at the size of the actual drawn survey. Currently your pdf is only actually about 6" x 9" in total when printed. If the survey gets bigger then the title will actually probably be in proportion to the page

If you need to change it, I think this works (but I haven't tested it) :

code tex-map

\legendtextheadersize={\size[60]}

endcode
 
Looks good.

Right then, adding author :

If you add this to layout.....endlayout section of thconfig :

doc-author "i think it goes"

Then that will set the author the pdf. So if you open the pdf in adobe acrobat and go to properties it will have this metadata in there.



However you probably want to do this :

If you want to add stuff to the legend box, you need a bit of code and it's a bit of a pain if you want to customise it heavily. As a simple starter, put this in the layout.....endlayout section of thconfig :

code tex-map

\cartotitle={Drawn by}
\cartoteam={i think it goes}

endcode


You can find more examples of what you can change in the section of the therion book called 'Changing layout of PDF maps', sub section 'Page layout in the map mode', Page 70 in my version

As for changing the title size, you can do that with code, but first I'd encourage you to look at the size of the actual drawn survey. Currently your pdf is only actually about 6" x 9" in total when printed. If the survey gets bigger then the title will actually probably be in proportion to the page

If you need to change it, I think this works (but I haven't tested it) :

code tex-map

\legendtextheadersize={\size[60]}

endcode
Thanks Steve! The therion book somehow slipped my mind(?) and I went through an interesting rabbit hole of uk caving forum posts and metpost blogs...

All your code works perfectly thanks! I'm not particularly planning on surveying any more of Aggy in the near future so just wanted to mess about with some fine-tuning details and see what the possibilities were.
 
Top