[therion-users] simple HOWTO

Stacho Mudrak s.m at group-s.sk
Wed Dec 4 10:30:00 CET 2002


Today I've more time, so I'll add some comments:

> That was very helpful. I do now basically understand how it works, except
> for how to set the scale for a scrap (and exactly what that means), and
how
> to relate the picture to the real stations.

The scrap scale and projection are two fundamental things, that are not
explained in README file. I'll try to shortly do it. Currently, therion
supports four types of projections. PLAN and ELEVATION are standard
ortogonal projections, EXTENDED is a standard extended elevation. If you
want to use these, each scrap need to have specified at least one control
station - "point x y station -station name" where name is the station name
from data. The last projection is NONE, here no control stations may be
specified. This is used to enter passage cross-sections or to draw maps,
where no centerline data are avaiable (digitization of old maps).

Scrap scale is used to pre-scale (convert coordinate from pixels to meters)
the scrap data. If scrap projection is none, this is the only transformation
that is done with coordinates. In xtherion, the scale can be defined only
one way - using coordinates of two points. When you will select a scrap -
two small red squares will appear (by defalut, they'll be in the corners of
drawing area). You have to drag them to points, coordinates of which you
know - usually the cross sections of mm grid lines on the scanned drawing.
If you can not see scrap these points, you can move pointer to desired
position, red pointer coordinates from status bar and enter these
coordinates into boxes picture scale points. You have to fill X1,Y1 and
X2,Y2 coordinate pairs. Then you have to enter real coordinates of these
points. Using these two points is defined a linear transformation, that will
be applied to scrap before any fitting to survey points.

Uff, it's written very complicated, but it's really very simple. You just
have to enter two coordinates of two points in the picture (pixel)
coordinates and real (meters) coordinates. Do not forget pressing Return
afterwards.

> I also put in a proper survey to relate to some real data:
> But that wouldn't produce output either:
>  If you use same name in station label as station in .th file e.g. '5'
>  point x y station -station 5
>  then survey data specifying station 5 gvies an erro 'object exists -- 5'
>  Change one (e.g. to '05') and data compiles but then says 'projection
>  extended - no reference station' - how is this made to work?

This should not happen. I've tested following code s.th:

survey s
    data
        data cartesian from to dx dy dz
        0 1 10 10 10
    enddata

    scrap ss
        point 0 0 station -station 0
        point 1 1 station -station 1
    endscrap

    map mm
      ss
    endmap

endsurvey

with simple thconfig:

source s.th
export map

and it worked on my therion (OK, thpdf had some protests, because wall was
missing - I've to fix this, but it worked). You can see, that at my Lesson 1
I've made one more mistake - I forget to place a scrap into map - this is
necessarry. Because therion export only maps, not scraps. So if you will run
therion with this simple example. So your "Adding a survey enclosure gets us
'no selected projection data'" was due to missing map command with scrap
name in the body. Maps are used to organize scraps - order and so on.

> * Errors in compiler go off screen RH side - wrap them?

This is questionable - firstly they were wrapped  - but then I realized,
that it's better to scroll them.

> * Lots of stuff cannot be read in RH side panels (eg point types) - widen
box,
>  shrink font, make pop-up show current text not truncate it to fit (I
> shrank the font from 12 to 9 pt in the xtherion tcl script and that was a
> lot better on a 1024x768 screen). Once you know all the options it doesn't
> matter so much but to start with it is hopeless - you can only see the
> first 7-8 characters or so.

On the border between working area and panel on the bottom (10% of height)
is a small panel resize button ;-) You can enlarge panel to fit your needs
;-)))

> * If you add a scrap manually then set the projection in xtherion and save
> it doesn't add it. You need to delete scrap and redo in xtherion.
> * How do I set the scale for a scrap? what does 'update scale' do?

The scale settings are commented above. Here I would comment the update
buttons. The update botton will evaluate "update" script, that will apply
changes, that were typed manually. Normally, this update script is evaluated
very often (every time you click, you compile or you save file). But
sometimes, if you want to apply changes, you need to press this button.
Normally, every text field, where you enter data, have a Return key binding,
that will force update. So when you will manually write down the projection,
you need to press "Update scrap" button, or press Return. In fact I had no
time to think about sophisticated undo redo process, so undo - redo action
is created when an update script is run.

> * F1 etc don't work if menu currently selected. (tcl limitation? - quite
> annoying)

What menu have you in mind? Sometimes it also does not work on my computer,
but I've never find the reason.

> * Problem with files being updated in two places at once. eg edit thconfig
> in text editor but version in compiler is not changed. If you close one in
> compiler to force an update it overwrites the version on disk. Needs to
> check modification times or something slightly smarter. Similar prob with
> edits made in text editor and in map editor at same time.

This have to be fixed. Thanx for comments, some of them would be really
usefull to apply.

S.







More information about the Therion mailing list