Prev Up Top Next Contents
3.4 Scrap outline
The "outline" option specifies on which side of a line there is the rock.
In general it has value "out" for the walls of the cave and value "in"
for the walls (type "wall") of rock pillars between the two branches
of a loop.
Furthermore the contour of a scrap must not intersect itself.
If this happens MetaPost gives a warning message: "Warning: scrap outline
intersects itself". You can see what therion
thinks is the
interior of the cave by coloring the drawing with the layout option
"-color map-fg X" (where X is the color or one of the keywords
"altitude", "scrap", "map").
The color can be a single number between 0 and 100 for a grey level
(0 blak, 100 white), or three numbers between 0 and 100 for the three
RGB (red, green, blue) components. For instance "color map-fg 80" gives
a light gray, "color map-fg [100 0 0]" gives a full red.
If you specify one of the keyword, the map is colored according to
either the altitude, the scraps of the maps. You can also use the plural
of a keyword. In the future it will be posible to color the map
also by the date; either the survey dates or the exploration dates.
The color keyword "map" applies only if you have selected more than
one map for the output, with the select
command, or you have not
specified any select
which means that all the maps with the proper
projection are exported to the output.
Remenber that maps are rendered from the last selected (or defined) one
to the first selected (or defined) so that those defined early stay
on top.
Labels can by coloured too. The layout-color
option labels
can take values on
or off
, which
specify whether they should be colored or black, respectively.
For example layout-color labels off
, which is the default,
makes the labels black no matter what the foreground color is.
There is also an option for the color of the background, "map-bg".
Other objects that can be colored are "preview-above" and
"preview-below".
As a matter of fact it seems that even without the "-outline" option
things work fine. Also: what is the interior does not depend either
on the direction of the line ("reverse" command of the "Lines" control).
The direction of the line is important for the ticks in lines of type
"pit" and "overhang". The yellow tick in the map editor window denotes the
side on which the ticks appear in the map. Chimneys are drawn with a
dashed line.
It looks like therion
completes the outline of the cave passage
by joining the open end points of lines of type "wall",
with invisible lines, so that to form a closed contour.
Selfintersecting contours are allowed (barring the MetaPost warning).
The interior points are those around which the contour makes an odd number
of turns. The others are exterior points.
3.4.1 Example 1
The first example is a piece of fictitious cave with a passage
branching from the side of the main passage and passing underneath it.
The data are (the branching passage is the shot 11-12)
1 2 5.00 90 0
2 3 10.00 45 10
3 4 10.00 90 0
2 11 2.00 90 -10
11 12 15.00 45 -20
11 21 5.00 120 10
The following figure show how it could be drawn.
The red points are the ends of the lines. There are two scraps,
one for the main passage, the other for the branching passage.
The lines, in the first scrap, that form the border with the second
scrap have type "pit".
There are two line joins,
join s1_l1:end s2_l1:0
join s1_l2:end s2_l2:end
Fig. 35. Outline: example 1
3.4.2 Example 2
In this example a cave passage has a overhang and there is another
passage underneath. The line of the overhang is not regular, and if it
were not part of the outline it would be partly inside and partly outside
the outline of the passage, and drawn as in the figure on the left below.
On the other hand with the "-outline out" option for the overhang, this is
drawn correctly, but the join of the two scraps has a portion not colored,
as in the figure on the right below.
Fig. 36. Outline: example 2
To get a satisfactory result we must repeat the overhang line, in the
second scrap with a line of type "wall" and with the option "-visibility off".
If the two scraps are in the same file this can be done graphically,
or by editing the file with a text editor, with a cut-n-paste operation
(followed by a change of the type and options of the new line).
If the scraps belong to different files, it is still possible to do it,
but it takes more work. You open the two files with the text editor
of xtherion
and you copy the line "overhang" from the first to the
second. You change the line type and options in the latter.
For te moment, however, you set "-visibility on", because in this way
it is easyer to see where the line is drawn.
At this point you must move the points of the new line, changing their
coordinates until in the resulting PDF file the new line is overlaid
to the "overhang" line (at least with the precision of the width of the
stroke used to draw them). It is a slow process, because the two scraps
have usually different references. It is usually sufficient to attain
an accuracy of the unity in the point coordinates.
The result can be seen in the figure below.
Fig. 37. Outline: example 3
To get a very accurate overposizion, inhibit the drawing of the
centerline (layout option "symbol-hide group centerline") and
redefine the width of the line stroke (also change the type of the
overhang line with "wall", temporarily), with the following Metapost code
code metapost
def PenA =
pencircle scaled (0.001);
enddef;
endcode
In this case even small discrepancies are clearly
visible and you can achieve a more precise overposition of the
two lines.
3.4.3 The algorithm
S. Mudrak posted a note on the algorithm that computes the outline
(2005-12-21).
This is the situation where wall invisible should be used :) The scrap outline
generation algorithm works wrong way in this case.
When the algorithm is creating scrap outline, it goes from end of one line to
the nearest end of second line. In your case, when it comes to the end of
debris line, it connects the second line, but on the wrong end. Than triangle
appears.
When you will connect the end of debris line with invisible wall to the
correct wall end on the other side of the passage, your problem should be
fixed (at least on my machine is). Matapost also complains about this -
that scrap outline intersect it self.
I know, that this algorithm can be improved, but... But at least, I will put
it in the TODO list.
|
The algorithm of the outline follows the lines and when it reaches the end
of a line it joins it with the closest end of another line.
It may happen that this algorithm connects with the wrong endpoint.
In this case you should add invisible (option "-visibility off") lines
of type "wall", to correct the drawing.
therion users - Fri Jun 15 08:15:51 2012
Prev Up Top Next Contents
This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 License.