[therion] Re: Help - my cave is inside-out
Martin Budaj
m.b at speleo.sk
Wed Jan 5 22:31:44 CET 2005
Wookey wrote:
>> It seems that if I include any of soundriver2_s1 soundriver3_s1 or
>> soundrivercrab_s1 then it breaks. soundriver2_s1 is particularly
>> perplexing
>> as it is a straight bit of passage with no areas in it, 3 stations, and
>> not
>> much detail - seems to me there is very little to go wrong.
I'll start with easier problems. The problem in soundriver3_s1 was really
tricky. Step by step description:
*** uncommented soundrivercrab_s1:
I got an MetaPost error "! Paths 6 and 5 don't intersect."
It's always related to areas so I used "search & select" in the map area
to find all areas. There was only one area (line 6 in File commands). I
looked to Command preview window to see the definition and tried to locate
all area border lines in the scrap. There was one line too much
(l26-1164-70), which I deleted in Area control.
*** uncommented soundriver2_s1:
I got an error:
-----
l_flowstone->...as>dlzka+(mojkrok/3);t1:=t2;endfor
;
l.5074 ))
;
The `angle' between two identical points is undefined.
I'm zeroing this one. Proceed, with fingers crossed.
-----
The first error line gives the name of symbol in which the error ocured
(l_flowstone) with a piece of its definition (which is not interesting
now) and the second line gives a line number in the metapost file (created
from all scraps) where the error ocurred and the text on that line.
I knew that problem was in some line flowstone symbol so I used "search &
select" to find all "line flowstone" occurences, and checked the
definition in the "Command preview". Fortunately already the first
flowstone line had duplicated point
703.0 793.0
703.0 793.0
I deleted it in Line control->Edit line->Delete point
*** uncommented soundriver3_s1:
Similar error
-----
l_arrow->...d(angle(direction.infinity.of(EXPR0))-
90)shifted(point.infinity....
l.5728 ),2)
;
The `angle' between two identical points is undefined.
I'm zeroing this one. Proceed, with fingers crossed.
-----
As before I searched for the given symbol (line arrow): search & select
line arrow (Find first, Find next, ...) and watched the Command preview
window to see the definition. I suspected that problematic is line 24 in
the File commands window:
363.0 573.5
363.0 573.5 317.0 604.5 295.0 642.5
with the control point of bezier line equal to previous point. After
playing a bit with control points and even deleting the line the problem
remained. I couldn't imagine which arrow casues problems so I had to
identify it acoording to the line number given in MP error.
I run therion in debugging mode (-d argument), opened the file data.mp in
the $TEMP/thTMPDIR directory and jumped to line 5728.
The problem with the file data.mp is that it doesn't contain original
coordinates from th2 files so I couldn't identify the arrow using
coordinates. I counted how many arrows are in the scrap containing line
5728 before the arrow ending on line 5728. Our arrow was the second in
this scrap. Metapost file has reverse order of symbols (in order to
display first object in the th2 file on top) so the final result is that
problematic arrow is last-but-one in the file, i.e. line 23 in the File
commands window.
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.
Martin
More information about the Therion
mailing list