Lengths of lines and angle size
David R. Lane (77) 766 posts |
Is there a RISC OS application, using Draw, that can measure line lengths and angle sizes? I have been given a diagram of the boundaries of a plot of land drawn up by a surveyor as a pdf. I can export this to a Draw file and then wish to measure the straight line segments of the boundary and the angles between them to calculate the plot area. I have looked at Draw and OpenVector, but can’t find anything useful. |
Chris Hall (132) 3554 posts |
One possibility is to use !MultiTask to disassemble the Draw file. You can then re-create the Draw file using MakeDraw – the disassembly of the Draw file is a BASIC program with each line specified in precise coordinates. You can use DrawDis to display the Draw file to identify where in memory the line you want is held. Once you find the enclosing lines, you can use the PROCmdPlotArea routine to measure the area. Once you find two lines you can use the coordinates to work out the exact angle. |
Rick Murray (539) 13840 posts |
Prolly a dumb question, but since the surveyor surveyed, can’t (s)he just tell you? |
Clive Semmens (2335) 3276 posts |
Sorry, unless this is really very non-urgent, this isn’t a lot of use to you. But I do have plans to write exactly the app you want, because I’m likely to want it for my own (very similar) purposes. The idea is that you’ll be able to drop a drawfile onto the icon bar, and it will spit out a new copy of the drawfile with each line labelled with its length and orientation, and each closed path labeled with its area. |
Jean-Michel BRUCK (3009) 359 posts |
!ProCAD+ knows how to measure lengths and angles taking into account the drawing scale. @Clive nice idea! |
Gavin Crawford (560) 30 posts |
!Artworks2 also has the feature to select a line segment and display its length and angle. You would obviously have to scale the drawing to a suitable scale. I’ve done similar things in the past for building plans and field boundaries etc. I would usually scale to something useful, such as, 1mm = 1m or 1mm = 10m. I often used this technique when I had my farm and I had to calculate electric fencing runs. |
Clive Semmens (2335) 3276 posts |
Yup. I didn’t mention that, but it’s an obvious requirement – the corresponding facility already implemented for this somewhat different app: https://clive.semmens.org.uk/RISCOS/XP1Triang.html |
David R. Lane (77) 766 posts |
That was quick! I have downloaded Clive Semmens’ XP1Triang to give it a ‘whirl’ over the weekend. Does anyone have experience of ProCad+: is it still being developed or upgraded? |
Gwyn (355) 46 posts |
Regular user of Procad. Mature product, capable would recommend. |
Clive Semmens (2335) 3276 posts |
Yup. Only advantage of any of my homebrew stuff is it’s free…I make it for my own use, if it’s any use to anyone else that’s a bonus! :D |
Matthew Phillips (473) 721 posts |
I have a feeling the last time I tried something similar, I found it impossible to get ProCAD to measure distances except in the directions of the X and Y axes. Perhaps I was missing something. RiscOSM might help you, even in the demo mode you get from an unlicensed download. Open a map at 0 longitude and 0 latitude, so the screen is blank. Change the scale to the same as the scale of the drawing. Drop the Draw file on the window. You can then use RiscOSM’s line drawing and area drawing tools and the lengths/areas will be shown. There’s not much control over the number of decimal places shown. |
Gwyn (355) 46 posts |
in the dimension window you need to click on the direction icon until dimension line at 45 degrees and a mouse symbol (or click with menu to see all options) |
Chris Hall (132) 3554 posts |
I am updating DrawDis to version 0.06 to display information about the draw object under the mouse. It will display information in OS units, as below. Is this what you mean? The information shows that there is a path object at offset 35B830 in the Draw file, contained within a group object at offset 59604 shown on screen at OS unit coordinates given and at an angle from the horizontal of 24° to the horizontal. At present it only shows such detail for a path object comprising a move then a draw line to. Other path objects are just shown abbreviated as (for example) MLBLBC. While displaying the help info it highlights the relevant path object by colouring it red. Another example is: and using the information given the Draw file can be disassembled using MultiTask and the relevant path object extracted as below:
|
Chris Hall (132) 3554 posts |
Another example: This shows a path elelemnt in a RiscOSM map at address 29E70 that is inside three nested groups at 0050 (called Whole_File), 0074 (called Whole_Map) and 030C88 (called Street_Names). (yes I know 29E70 is not inside 30C88 but that’s just one more bug to sort out before releasing 0.06) |
David R. Lane (77) 766 posts |
I can’t get Clive’s XP1Triang to work: It doesn’t crash anything, but the draw file it produces is just the draw input file containing the baseline unchanged. I have looked at the help file including the examples which don’t work for me, either. The number of length arguments in these two examples seem too many for what is required: for each given baseline (of a triangle) you need only 2 length arguments to define the triangle. |
David R. Lane (77) 766 posts |
I meant to add my experience of Matthew’s suggestion of using RiscOSM that it didn’t work. I just drew a rectangle using draw and dropped the file into the RiscOSM map at 0 latitude and 0 longitude; but I couldn’t get its area, lengths of sides or perimeter. |
Chris Hall (132) 3554 posts |
Try DrawDis version 0.06 beta to identify the offset from the start of the Draw file of the lines or paths concerned, then disassemble the Draw file using !MultiTask and you should be able to find the relevant lines (as the offsets of each path are shown in sequence) which create the path concerned with their coordinates. |
Clive Semmens (2335) 3276 posts |
I shall have a look at that. I’m a bit puzzled – it certainly worked for me, and the examples did what I expected them to. I suppose it’s possible the program I’ve put on my website isn’t the version I’ve used, and/or likewise the help file. I’ll probably look tomorrow when it’s raining here – I’m only taking a brief break from work in the garden at the moment! |
Clive Semmens (2335) 3276 posts |
I’ve still not looked at this on the Pi, but reading the instructions on the website to remind me, I’m guessing this: 1) If you’re not getting any triangle at all, you don’t have a black baseline instead of a coloured one by any chance? It has to be one of the colours from the Draw colour picker, and you have to specify the colour in the text file using the corresponding capital letter. I suppose it’s possible the colour picker in Draw may have changed? 2) The reason there are more than just two length arguments are that the examples are for more than one triangle on the baseline(s) – a common requirement. From the helpfile: Example 1 puts two triangles on the left and one on the right of the baseline, which is Red (the red in the colour picker). |
Matthew Phillips (473) 721 posts |
Sorry, I perhaps didn’t explain well enough. RiscOSM will load the Draw file, but you then have to use RiscOSM’s area tool (near the bottom of the left toolbar) to trace the area you want measured. It can’t tell you direct what the area is for any part of the loaded Draw file. Gwin wrote, regarding ProCAD:
I tried that option, but the dimension is still only measured horizontally or vertically. Do you have press some special keys or do something odd with the mouse to make it measure at a different angle? |
Clive Semmens (2335) 3276 posts |
I think I’ve realised the problem: my Help file (and the info on my web page, which is more or less the same – perhaps exactly the same, I don’t remember and haven’t checked) doesn’t make it clear that |
Clive Semmens (2335) 3276 posts |
Just downloaded what’s currently on my website to a RAMdisc on the Pi, started !XP1Triang, selected the first example from the Helpfile and saved it onto the iconbar icon, then made a simple drawfile with just one plain red line, saved that onto the iconbar icon, and Bingo – I got back what I expected: same red line, with three pairs of green lines forming three triangles sharing the baseline. |