XP1Triang

XP1Triang constructs triangles on baselines in a Drawfile, using lengths supplied in a text file. The purpose is to help you make plan views, using distances you’ve measured between points on the ground. You very probably don’t want the triangles in the final plan, but you need them temporarily to position the vertices you will use.

Starting with one or more measured baselines, you can add several new triangles per baseline* by measuring the distance of each point from each end of the corresponding baseline. (You might want to use one or more sides of new triangles as baselines in further runs of XP1Triang.)

Make a drawing in !Draw with your baseline(s) at a suitable scale on it. Colour the baselines with different colours from the standard colour picker.

Make sure you know which end of each baseline is the start. You need to know whether each new vertex is to the left of its baseline or to its right. The text file should contain:

Scale,Colour,Side,L1,L2[,...]

where Scale is nnn if the scale of your plan is 1:nnn; Colour is one of N, Y, G, R, C, D, O or B for Navy Blue, Yellow, Green, Red, Cream, Dark Green, Orange or Blue; Side is l or r for left or right; L1 and L2 are the distances in mm from the start and end of the corresponding baseline.

Scale occurs just once at the start of the file. Each Colour should occur just once (or not at all if there are no baselines of that colour). Side, L1, and L2 are repeated for each triangle to construct, except that Side can be omitted if it’s the same as the previous one. Finish the list with an E (for End). So a real file with one baseline might look like this:

50,R,l,8000,6250,5400,7200,r,9000,6900,E

Or one with with three baselines, like this:

50,B,l,8000,6250,5400,7200,r,9000,6900,G,4400,4400,l,2830,4000,R,r,9900,4100,E

There should be nothing else before the E – just numbers, commas, and Ns, Ys, Gs, Rs, Cs, Ds, Os, Bs, ls, and rs. The numbers can include a decimal point, but otherwise nothing but digits.

Drag and drop the text file (you can drag it straight from a save window in your editor if you like) onto the iconbar icon, then drag the drawfile (could be straight from Draw) onto it. Then drop the resulting file wherever you like (could be onto the Draw iconbar icon).

All your new vertices will be connected to their baseline with dull green lines. You can now change all their colours – probably to black! (Unless of course you're going to use some of them as baselines for another run.)

N.B. Your baselines must not be inside Groups – you can have other lines with baseline colours within groups if you like, they'll be ignored. Your baselines should be straight and not dashed – if they're Beziers or dashed, you'll get very silly results.

If any of your measurements are too long or too short to make any triangle on the baseline, you will still get a triangle, with the new vertex at the top of the page (if A4 Portrait or A3 Landscape), and to make sure you realize your measurements were wrong, the lines to it will be pink and lilac rather than dull green :-)

You can have more than one baseline of the same colour, and it might occasionally be useful. The same list of measurements to the new vertex will be used for every baseline of the same colour, so the triangles will be the same shape and size if the baselines are the same length.

WARNING: !XP1Triang may crash ungracefully if your textfile doesn't comply. It shouldn't crash anything else though!

* Max 8 baselines, 5 triangles per baseline. There is no magic about these numbers; it would be easy to make the program allow more – but I find it hard to imagine wanting even so many in a single round!

Or alternative separators. Space, semicolon, tab, carriage return &/or linefeed are all okay.

Download XP1Triang here

If you find it useful, contributions to my pension are always welcome, but certainly not required.