tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tips [2019/10/05 22:49]
brucemutton XTherion - Finding objects
tips [2020/01/13 16:32] (current)
tarquinwj clip also affects layering
Line 131: Line 131:
 As described in the Therion Book, __How the map is put together__, the layers are '​default-bottom',​ '​default'​ and '​default-top'​. ​ '​Default',​ as you might guess is in the middle. Areas go to the bottom, ceiling-step and chimney go to the top, everything else is somewhere in the middle. As described in the Therion Book, __How the map is put together__, the layers are '​default-bottom',​ '​default'​ and '​default-top'​. ​ '​Default',​ as you might guess is in the middle. Areas go to the bottom, ceiling-step and chimney go to the top, everything else is somewhere in the middle.
  
-Now if you find that you have not drawn an entity in exactly the right order to get that special effect you were after, there is an over-ride. ​ There are two more '​layers',​ '​top',​ and '​bottom'​ and these are placed by Therion above '​default-top'​ and below '​default-bottom'​ respectively. ​ To put an entity in either of these layers, add the option -place top or -place bottom. ​ If using -place for an area it is probably a good idea to use -place for its defining border as well.+Now if you find that you have not drawn an entity in exactly the right order to get that special effect you were after, there is an over-ride. ​ There are two more '​layers',​ '​top',​ and '​bottom'​ and these are placed by Therion above '​default-top'​ and below '​default-bottom'​ respectively. ​ To put an entity in either of these layers, add the option -place top or -place bottom. ​ If using -place for an area it is probably a good idea to use -place for its defining border as well. There is then an upper layer on top of '​top',​ which is the layer containing any items that have '-clip off', since these are rendered after all items that take part in normal clipping. If you have an entity without '-clip off' that needs to be rendered on top of an entity that has '-clip off' (eg. a ceiling step that must appear on top of a boulder when the boulder-edge has '-clip off'), then you will need to give the first entity (the ceiling step in the example) '-clip off' as well. These non-clipped entities are then layered with respect to each other respecting the usual -place and stacking orders.
  
 Fifthly, transparency and opacity settings come into it, as well as the particular viewer or printer driver you are using, as indicated in the first paragraph above. Fifthly, transparency and opacity settings come into it, as well as the particular viewer or printer driver you are using, as indicated in the first paragraph above.
Line 184: Line 184:
  
 One of Therion'​s key features is that drawings are created in small pieces - scraps. A scrap is the smallest indivisible part of the drawing that can exported to create an output.\\ One of Therion'​s key features is that drawings are created in small pieces - scraps. A scrap is the smallest indivisible part of the drawing that can exported to create an output.\\
-Most maps contain many scraps, and if they don't happen to appear perfectly joined by coincidence,​ then you should "​join"​ these individual scraps to get Therion to morph them together. ​There are three ways to do it; fully automatically in *.th2 file, semi-automatically scrap by scrap, and manually line by line (if you must specify exactly which lines and points join). The last two are described in Thbook;+Most maps contain many scraps, and if they don't happen to appear perfectly joined by coincidence,​ then you should "​join"​ these individual scraps to get Therion to morph them together. ​\\
  
-Join commands ​are put directly into the survey section, not inside ​any scrap or map definitions ​- lines are joined ​independentlyignoring whatever scraps ​and maps they are defined ​or included in.+''​**Important:​** Only use the **join** command if it is necessary to do so. ie when there are open passage ends or drawing lines that should be joined in the final outputbut are not. \\ 
 + 
 +**Do not use** the **join** command if your adjacent scraps do not have any lines that need to be joined. ​ An example of this would be a higher passage approaching the top of a pitch, and a lower passage that continues from the bottom of the pitch. ​ Both the upper scrap and the lower scrap might be drawn with closed ends around the top and bottom of the shaft respectively. ​ These overlapping scraps would not normally need to be joined, and using the semi-automatic approach described below will guarantee extreme distortion!''​\\ 
 + 
 +**How to join scraps** 
 + 
 +There are three ways to join scraps, ​or components of scraps;  
 +  * fully automatically in *.th2 file,  
 +  * semi-automatically scrap by scrap, and  
 +  * manually line or point by point (if you must specify exactly which lines and points join).  
 + 
 +For any particular pair of lines or points to be joined, ​you should only use one of these methods. ​ Multiple joins of the same set of objects is likely to give unpredictable results! The last two methods are described in Thbook ​and all three are described below.\\ 
 + 
 +Join commands can be put directly into a survey definition, but not usually inside scrap or map definitions.
  
 **Fully automatic in *.th2 file** **Fully automatic in *.th2 file**
  
-If you draw two or more scraps adjacent to each other in your drawing *.th2 file, and make sure the adjacent line wall ends snap to each other, then Therion will automatically morph them, if necessary, to create a perfect join.  A morph might be necessary, if for example survey closure or other drawing distortions might tend to separate the scraps you have drawn as touching.+If you draw two or more scraps adjacent to each other in your drawing *.th2 file, and make sure the adjacent line wall ends snap to each other, then Therion will automatically morph them, if necessary, to create a perfect join.  A morph might be necessary, if for example survey closure or other drawing distortions might tend to separate the scraps you have drawn as touching.\\ 
 +This is really just an automatic implementation of the '​Manual line or point by point' method described below.
  
 **Semi-automatic scrap by scrap** **Semi-automatic scrap by scrap**
Line 196: Line 210:
     join scrap1 scrap2 [-count <number of passage (not line) joins for Therion to look for>]     join scrap1 scrap2 [-count <number of passage (not line) joins for Therion to look for>]
  
-Note that this works using passages defined by lines of "​wall"​ type (even if their "​-outline"​ is set to "​none"​). It does not join other types of line. It normally expects to find pairs of lines, one on each side of the passage. If there are multiple ​passages that need to be joined between pairs of scraps, you can normally use the "​-count"​ option to say how many possible passage joins Therion should search for.+The method can only join two scraps at a time.  ​Note that it only works using passages defined by lines of "​wall"​ type (even if their "​-outline"​ is set to "​none"​). It does not join other types of line. It normally expects to find pairs of lines, one on each side of the passage ​opening. If there are multiple ​places where the two scraps ​join, you can normally use the "​-count"​ option to say how many possible passage joins Therion should search for and join in the two scraps.
  
-**Manual line by line**+**Manual line or point by point**
  
-From time to time the semi-automatic way does not work, or you want more refined control. ​ Then you should join each line to the other line (usually, but not only walls) ​or to point. Every point on a line has a mark according its sequence from beginning of line (yellow tick). The first one has mark 0, next one 1, etc., last one is mark "​end"​. So the join command will be:\\+From time to time the semi-automatic way does not work, or you want more refined control. ​ Then you should join each line or point to the other line or point (usually, but not only walls). If you have several objects ​to join at one point, then unlike the scrap by scrap join above, you should use one join statement to join them all in one go (see bottom of this topic) Every point on a line has a mark according its sequence from beginning of line (yellow tick). The first one has mark 0, next one 1, etc., last one is mark "​end"​. So the join command will be:\\
  
  
Line 233: Line 247:
  
 For more detail see [[tbe:​wiki3#​joining_scraps|Therion by Examples, chapter 3]] and [[faq#​how_do_i_join_three_scraps_in_a_y-shape]] For more detail see [[tbe:​wiki3#​joining_scraps|Therion by Examples, chapter 3]] and [[faq#​how_do_i_join_three_scraps_in_a_y-shape]]
- 
 ====How to export correct extended elevation from zig-zag centerline==== ====How to export correct extended elevation from zig-zag centerline====
  
Line 269: Line 282:
 {{:​tips:​zig-zag_map.png?​150|map}} {{:​tips:​zig-zag_extended.png?​150|extended}}\\ {{:​tips:​zig-zag_map.png?​150|map}} {{:​tips:​zig-zag_extended.png?​150|extended}}\\
 See also [[extend|Extended Elevations]] page for comprehensive extended elevation guidance. See also [[extend|Extended Elevations]] page for comprehensive extended elevation guidance.
 +
 +====Showing centreline for parts of a cave, and passage walls for others====
 +
 +Sometimes you might have full survey data and drawings for some parts of a cave, while other parts might have only centreline data. It is possible to combine these in the same PDF output, using a map consisting of other maps, and other surveys:
 +
 +  map allcave
 +    subsection_map@subsection #the part with walls drawn
 +    othersubsection_survey ​   #the survey containing a part without wall drawings
 +  endmap
 +
 +Note that you now cannot use "​symbol-hide group centreline"​ or any equivalents to hide the centreline in your scraps, since it will also hide these centrelines that do not have any wall drawings. Instead, you need to [[metapost#​Centreline that is only visible when not in a scrap|hide it within the scraps using metapost]].
 +
 +====Making a subset of the cave take its altitude colours from a larger part of the cave====
 +
 +When rendering a map (map-endmap),​ with "color map-fg altitude"​ enabled, the default automatic altitude colour bands take their highest and lowest values from the highest and lowest survey stations for the parts of the survey that are used in the rendering. It takes all the survey stations within the "​cave"​ (ie. not in a "flags surface"​ section), from whichever surveys and subsurveys have some of their parts included in the map, and finds the highest and lowest station. This happens even if the highest and lowest stations within those surveys are not even rendered because they are not included in a scrap.
 +
 +When you want to render a subset of that cave, such as a map showing only the entrance series of a cave, you might want to have the colours match the colours that were used in the overall map, so that the parts of the cave are recognisable. One way is to use an [[examples#​colour_palette_scales_-_lookups|altitude lookup]].
 +
 +Another approach, which allows Therion to continue using automatic altitude colours, is to [[#Showing centreline for parts of a cave, and passage walls for others|include the highest and lowest surveys/​subsurveys in your map]], and then use symbol-hide to hide those surveys. If you don't know which part of the cave will be the highest or lowest, just include all of them, to be on the safe side.
 +
 +  map foo
 +    subsection_map@subsection #the part you actually want to render
 +    othersubsection_survey ​   #the survey containing the highest part of the cave
 +    anothersubsection_survey ​ #the survey containing the lowest part of the cave
 +  endmap
 +
 +Your layout would then include this:
 +
 +  color map-fg altitude
 +  symbol-hide group centreline
 +
 +By hiding the centreline, you cause the unwanted surveys not to render at all, so the output acts like they were never included (it is cropped accordingly to show only the rendered part).
 +
 +===Including some centreline data===
 +
 +If you need to include a centreline-only section of the cave in your rendering, then you cannot use "​symbol-hide group centreline"​. However, the same basic approach for getting the correct vertical range works, but it is a little more convoluted. Create a scrap in the highest and lowest parts of the cave. Those scraps should contain only a single station point. It doesn'​t have to be the highest or lowest station, since simply including any station causes all of them within that survey to be considered for the highest and lowest points. Give that station the "​-visibility off" option:
 +
 +  scrap emptySP -projection plan -scale [1 10 1 10 0.0 0.0 10 10 m]
 +    point 1 1 station -name 2 -visibility off
 +  endscrap
 +
 +Include that scrap instead of including the survey itself. You will then also need to [[metapost#​Centreline that is only visible when not in a scrap|use MetaPost to hide the tiny bit of centreline]] that Therion will try to show at that hidden station. Unfortunately,​ Therion will still leave the space for that centreline even though you asked it not to draw anything, so it will not crop the survey to the appropriate size. To solve this, you need to include the scrap within a map:
 +
 +  map othersubsection_one_station_map
 +    emptySP
 +  endmap
 +
 +Then include that map with an offset, pushing it into the normally visible area of the survey (the same position as the passages that you want to show). This seems convoluted and takes a little time to set up perfectly, but it works.
 +
 +  map foo
 +    subsection_map@subsection #the part you actually want to render
 +    centreline_only_survey #the survey that contains only centreline data without any passage drawings
 +    othersubsection_one_station_map@othersubsection [123 456 m] none #the survey containing the highest part of the cave
 +    anothersubsection_one_station_map@anothersubsection [-23 12 m] none #the survey containing the lowest part of the cave
 +  endmap
 =====Map Layout===== =====Map Layout=====
  
  • tips.1570308560.txt.gz
  • Last modified: 8 months ago
  • by brucemutton