faq

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
Next revisionBoth sides next revision
faq [2019/05/01 14:26] – More causes for self-intersecting scrap outlines tarquinwjfaq [2019/11/04 07:16] – [How do I find miss-drawn holes in scraps?] clarify does not check -reverse brucemutton
Line 563: Line 563:
 If you create an object outside the //scrap ... endscrap// construction, you can use //Move up, Move down// or //Move to// buttons in the map editor window to move the object to the desired place. See the attached picture.\\ {{therion:move_object_to_scrap.gif?120}} //Click on image to see original size// If you create an object outside the //scrap ... endscrap// construction, you can use //Move up, Move down// or //Move to// buttons in the map editor window to move the object to the desired place. See the attached picture.\\ {{therion:move_object_to_scrap.gif?120}} //Click on image to see original size//
  
-====How do I use Debug Mode in Layout?====+====How do I use Debug Mode in Layout?  Visualising drawing errors and distortion====
  
 If your map is coming out distorted or joins are not connecting in the right place then debug mode is a very useful way to see what is going on. Indeed it is generally useful to get a visual display of the distortions in the map. If your map is coming out distorted or joins are not connecting in the right place then debug mode is a very useful way to see what is going on. Indeed it is generally useful to get a visual display of the distortions in the map.
Line 621: Line 621:
   colour preview-below 80    colour preview-below 80 
   colour preview-above 80     colour preview-above 80  
 +  ## Consider invoking 'maps off' in your thconfig file to suppress offsets and previews due to map definitions
   opacity 10 #mostly transparent   opacity 10 #mostly transparent
      
Line 660: Line 661:
  
 TO DO: Add some pictures TO DO: Add some pictures
 +
 +See also [[faq#how_to_solve_the_incorrectly_determined_interior_of_the_scrap]] below
 +
 +====How do I find miss-drawn holes in scraps?====
 +Each scrap defines a piece of cave passage, which (almost) always is defined by walls, being the boundary between a rock mass and the open space of the passage.  There will be open ends of scraps, with no walls, where the open space (passage) continues beyond the scrap.
 +
 +If these openings are very wide, then you may have to close the opening with a wall line with ''-visibility off'' or ''-subtype invisible''.\\
 +If you want to draw a wall 'inside' a scrap, you must disable its passage defining properties, by setting ''-outline none''.\\
 +If you have an oxbow, or large pillar, then you need to set ''-outline in''.\\
 +
 +If you follow these rules, Therion can correctly determine what is 'cave' and what is 'rock', at least for pdf outputs.  Sometimes it is a bit tricky, especially if adjacent scraps are 'joined' and as drawn they overlap or have significant gaps (you should never do this intentionally).
 +
 +And beyond this, if you want your kml __maps__ and 3d outputs to be generated correctly, you will also need to get the wall line orientations correct.  The yellow tick mark on the left of the line as you draw it must point towards the passage side of the line.  More on this on the [[drawingchecklist#wall|drawing checklist]] page.  You can adjust it with ''-reverse on|off''.
 +
 +If you get it wrong, you can get significant distortion and incorrect colouring in your 2d and 3d outputs. 
 +
 +Here is a layout that you can apply to your export statement. ie ''export map -output cave.pdf ... -layout LayoutCheckScrapsForHoles''
 +
 +  layout LayoutCheckScrapsForHoles
 +  ## Martin Sluka Nov2019
 +  ## Hides most objects and emphasises passage interiors and walls
 +  ## Does not check for correct line orientation (-reverse on|off). You need to export a map to kml to check line wall orientations
 +    symbol-hide group all
 +    symbol-show line wall
 +    debug station-names
 +    debug scrap-names
 +    colour map-bg 85
 +  endlayout LayoutCheckScrapsForHoles
 +  
 + Here is what it looks like.  Grey areas inside or between scraps mean there is a problem that you need to fix.\\
 +{{therion:LayoutCheckScrapsForHoles.png?120}} //Click on picture to see original size//
 +
 +====How to solve the incorrectly determined interior of the scrap====
 +
 +  Warning: scrap outline intersects itself in bmb3_s3@fake. 
 +
 +//I have this warning in a few scraps in that survey - I wondered how serious it was, and what I should do about it. But without more details of _where_ it intersects itself (and why this is a problem), I could not do anything but ignore it.//
 +
 +The only information we can give here is the scrap name. There is no way how to find out in MetaPost where exactly the closed path intersects itself :-(
 +
 +//I have several more scraps which I cannot include in the overall survey at the moment because if I do I get cryptic metapost errors. We have to work out a way of getting better feedback to the user about _where_ the problem lies as it is currently extremely difficult to fix as you don't know which of many lines is at fault.//
 +
 +We think it's doable to give a line number in th2 file where the error occurs. It would be perhaps possible to also identify area border lines which don't intersect.
 +
 +//How did you find the above problem. If I understood the process you used to find this it might help me next time.//
 +
 +We got this error (incorrectly determined interior of the scrap) long time ago in Dead Bats Cave map. There was some strange clipping by the scrap border, which we couldn't explain. In that time there was no MP warning, no map colouring. We don't remember exactly but it took quite long till we identified that the problem is in the border and than what is wrong with the border. After reading thoroughly the appropriate chapter of the Metafont book we knew that problem is in the loop -- but even than we couldn't find any -- so small it was, in fact very similar to yours.
 +
 +We added the MP warning to point to this problem. When we see it now, we first check scrap ends if something could cause the problem. The biggest problem is if the loop is introduced only after morphing the scrap ends before joining scraps. We can only recommend to move control point in the last bezier arc of wall just before the scrap end, run therion, undo the change by pressing Ctrl+Z and repeat with other walls until the problem remains.
 +
 +The loop may occur also in the middle of the wall, but it should be visible, at least in 400% zoom.
 +
 +We are sorry that there is no cleverer algorithm to find the loop :(
 +
 +see also [[faq#What_constitutes_a_"pillar"_in_therion?|What constitutes a "pillar" in therion?]]
 +
 +(There are some other scrap drawing tips in [[tips#avoiding_invisible_or_misshapen_scraps_in_loch_and_google_earth|Avoiding Invisible or Misshapen Scraps in Loch and Google Earth]])
 +
 +This warning can sometimes happen if you have two wall lines joining on a single point, where Bézier curve controls pull the lines into a very acute angle (where the "back" facing Bézier controls are pulled beyond the arc of the other line). The solution is to reduce the angle of the join, or insert more linepoints so that the angle can be produced without needing to use Bézier controls to pull the lines so far that Metapost thinks they overlap. Check any such places in your scrap outline, and test whether removing the Bézier back or forward controls fixes it. If so, then this is the location of your error.
 +
 +It can also happen if you have inserted a point along a wall line, with its Bézier controls oriented backwards compared with the rest of the line, so that the backwards one points forwards, or vice versa. The rendering looks normal, but Metapost has had to flip the orientation of the line twice, so it complains.
 +
 +It can also happen if you have accidentally added two linepoints at the same location - this also causes Metapost to flip directions in order to get from one point to the next. Step through each linepoint in turn (in the "Lines" section of XTherion), and see if two ended up in the same place.
 +
 +It can also happen on a closed wall line, when the ends join, and you pull the wrong Bézier control past the junction - this causes a combination of the two problems mentioned above.
 +
 +
 ====How to solve strange errors?==== ====How to solve strange errors?====
  
Line 714: Line 782:
 There is actually nothing wrong with that arrow -- that is the reason why it took so long to find it :) It has the last control point identical with the last point, which is perfectly acceptable in metapost. Unfortunately there is some bug in the arrow definition, which doesn't allow this. I hope it will be possible to fix it. In the meantime you may change the line either to a straight segment (no control points) or add a control point different from the endpoint. There is actually nothing wrong with that arrow -- that is the reason why it took so long to find it :) It has the last control point identical with the last point, which is perfectly acceptable in metapost. Unfortunately there is some bug in the arrow definition, which doesn't allow this. I hope it will be possible to fix it. In the meantime you may change the line either to a straight segment (no control points) or add a control point different from the endpoint.
  
-====How to solve the incorrectly determined interior of the scrap==== 
- 
-  Warning: scrap outline intersects itself in bmb3_s3@fake.  
- 
-//I have this warning in a few scraps in that survey - I wondered how serious it was, and what I should do about it. But without more details of _where_ it intersects itself (and why this is a problem), I could not do anything but ignore it.// 
- 
-The only information we can give here is the scrap name. There is no way how to find out in MetaPost where exactly the closed path intersects itself :-( 
- 
-//I have several more scraps which I cannot include in the overall survey at the moment because if I do I get cryptic metapost errors. We have to work out a way of getting better feedback to the user about _where_ the problem lies as it is currently extremely difficult to fix as you don't know which of many lines is at fault.// 
- 
-We think it's doable to give a line number in th2 file where the error occurs. It would be perhaps possible to also identify area border lines which don't intersect. 
- 
-//How did you find the above problem. If I understood the process you used to find this it might help me next time.// 
- 
-We got this error (incorrectly determined interior of the scrap) long time ago in Dead Bats Cave map. There was some strange clipping by the scrap border, which we couldn't explain. In that time there was no MP warning, no map colouring. We don't remember exactly but it took quite long till we identified that the problem is in the border and than what is wrong with the border. After reading thoroughly the appropriate chapter of the Metafont book we knew that problem is in the loop -- but even than we couldn't find any -- so small it was, in fact very similar to yours. 
- 
-We added the MP warning to point to this problem. When we see it now, we first check scrap ends if something could cause the problem. The biggest problem is if the loop is introduced only after morphing the scrap ends before joining scraps. We can only recommend to move control point in the last bezier arc of wall just before the scrap end, run therion, undo the change by pressing Ctrl+Z and repeat with other walls until the problem remains. 
- 
-The loop may occur also in the middle of the wall, but it should be visible, at least in 400% zoom. 
- 
-We are sorry that there is no cleverer algorithm to find the loop :( 
- 
-see also [[faq#What_constitutes_a_"pillar"_in_therion?|What constitutes a "pillar" in therion?]] 
- 
-(There are some other scrap drawing tips in [[tips#avoiding_invisible_or_misshapen_scraps_in_loch_and_google_earth|Avoiding Invisible or Misshapen Scraps in Loch and Google Earth]]) 
- 
-This warning can sometimes happen if you have two wall lines joining on a single point, where Bézier curve controls pull the lines into a very acute angle (where the "back" facing Bézier controls are pulled beyond the arc of the other line). The solution is to reduce the angle of the join, or insert more linepoints so that the angle can be produced without needing to use Bézier controls to pull the lines so far that Metapost thinks they overlap. Check any such places in your scrap outline, and test whether removing the Bézier back or forward controls fixes it. If so, then this is the location of your error. 
- 
-It can also happen if you have inserted a point along a wall line, with its Bézier controls oriented backwards compared with the rest of the line, so that the backwards one points forwards, or vice versa. The rendering looks normal, but Metapost has had to flip the orientation of the line twice, so it complains. 
- 
-It can also happen if you have accidentally added two linepoints at the same location - this also causes Metapost to flip directions in order to get from one point to the next. Step through each linepoint in turn (in the "Lines" section of XTherion), and see if two ended up in the same place. 
- 
-It can also happen on a closed wall line, when the ends join, and you pull the wrong Bézier control past the junction - this causes a combination of the two problems mentioned above. 
 ====What are the limits for map and for atlas PDFs?==== ====What are the limits for map and for atlas PDFs?====
  
  • faq.txt
  • Last modified: 6 months ago
  • by brucemutton