Solved: Contour Layout for Building Site

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
roo
Posts: 49
Joined: Sat Jul 29, 2017 9:24 am
Location: oz

Solved: Contour Layout for Building Site

Postby roo » Sat Jul 29, 2017 10:10 am

I'd appreciate some advice on how to set up a contour layout for my building site. I have a stadia survey of the site which means I need to locate the points by bearing and distance then apply a height. Once I have done that I'd like to calculate contours for the site.

OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Edit: Ignore file below and go to post with updated source files.
Attachments
Stadia Survey.xlsx
(12.57 KiB) Downloaded 54 times
Last edited by roo on Mon Aug 07, 2017 12:28 pm, edited 4 times in total.
jmaustpc
Posts: 10012
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Contour Layout for Building Site

Postby jmaustpc » Sat Jul 29, 2017 11:24 am

Your first post, welcome to FreeCAD.

You posted this to the tutorials forum but it is more appropriate for the Help forum so I moved it.

Please post your version data, so we know what we are dealing with, how to do this is explained in the Forum Rules link above the Help forum.
jmaustpc
Posts: 10012
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Contour Layout for Building Site

Postby jmaustpc » Sat Jul 29, 2017 11:27 am

roo wrote:
Sat Jul 29, 2017 10:10 am
I have a stadia survey of the site
what format is the data in? Do you mean a written document or some computer file format?
User avatar
roo
Posts: 49
Joined: Sat Jul 29, 2017 9:24 am
Location: oz

Re: Contour Layout for Building Site

Postby roo » Sun Jul 30, 2017 12:38 am

jmaustpc wrote:
Sat Jul 29, 2017 11:27 am
what format is the data in? ...
I have added the excel data file and my FreeCAD version info to my post.

There are three survey stations (places where I set up the level) and two common points for each survey station.

Each station has a relative start point of 0,0 and a random bearing.
Real Bearings can be calculated from known bearings then adjusting the bearings one station at a time.
Site 2 SS to 1 PM is published as 208.117 metres with a bearing of 248:53:29 Deg:Min:Sec.

Caution: This data was collected by an illiterate surveyor that is blind in one eye with a short leg and their assistant was deaf. It is real data with mistakes but it is fit for purpose (ie where will the water run and how high do the steps need to be). There is something wrong with site 2 but the bearing and distance seem right.

A contour diagram is a common issue at the start of a project so should be a good tutorial topic.
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: Contour Layout for Building Site

Postby emills2 » Sun Jul 30, 2017 1:24 am

roo wrote:
Sun Jul 30, 2017 12:38 am
Real Bearings can be calculated from known bearings then adjusting the bearings one station at a time.
It always sounds trivial when you're familiar with the data type and the equations :) can you provide the mathematical formula you wish to have applied to each data point? I see X coord and Y coord in your sheet but no cell is obviously Z coord (to my eye)

do you want to visualize all points in 3D then draw un-surveyed contour lines at arbitrary elevations? or do you just want to draw contour lines in 2D for a set of equal elevation data points?

the second one will be a lot easier...but the first one is possible too, if you pick the right interpolation method.

There may already be a contour plot tool somewhere, and if not it may be simple to write one.
User avatar
roo
Posts: 49
Joined: Sat Jul 29, 2017 9:24 am
Location: oz

Re: Contour Layout for Building Site

Postby roo » Sun Jul 30, 2017 1:51 am

emills2 wrote:
Sun Jul 30, 2017 1:24 am
... can you provide the mathematical formula you wish to have applied to each data point? I see X coord and Y coord in your sheet but no cell is obviously Z coord (to my eye)

do you want to visualize all points in 3D then draw un-surveyed contour lines at arbitrary elevations? or do you just want to draw contour lines in 2D for a set of equal elevation data points?

the second one will be a lot easier...but the first one is possible too, if you pick the right interpolation method. ...
R.L. (Relative Level) is the adjusted Z axis adjusted to the same plane for all survey stations.

All stations have a relative X/Y coordinate of 0,0 while in reality the locations are different. I thought the best approach would be plotting the survey for each station separately then overlaying them on the common points by dragging the graphics. Mathematically it would be adjust the bearings then move the X/Y to align the common points to the same coordinate system. The points won't match exactly due to measurement errors but I wasn't going to use the surveying method to apportion measurement error to each point.

The survey sites are random not part of a grid. The endpoint is a 2D plan with calculated contour lines (maybe 10 or 20 cm) but the data will be part of a 3D model.
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: Contour Layout for Building Site

Postby emills2 » Sun Jul 30, 2017 2:11 am

i might be able to try the following over the next few days (no promises):

-make a point cloud from each station (with a simple script and clean up of the spreadsheet)
-use draft move to overlay them
-figure out which points are supposed to match
-pick one station as absolute, figure out the offset
-apply the offset to the data and make a single complete data set

you can see how knowing which points to line up would save us a lot of effort (we could subtract X and Y up front, sort the spreadsheet and eliminate or average duplicates)

once we have a single point cloud:
- convert the data so we can use the Curves workbench cloud approximation surface
- make a bunch of flat faces, one per elevation
- cut the flat face along the point cloud surface

if the Curves workbench approximation surface is too wobbly (not enough data points)
- build a triangle mesh from the point cloud
- make elev planes
- slice
User avatar
roo
Posts: 49
Joined: Sat Jul 29, 2017 9:24 am
Location: oz

Re: Contour Layout for Building Site

Postby roo » Sun Jul 30, 2017 2:51 am

emills2 wrote:
Sun Jul 30, 2017 2:11 am
... you can see how knowing which points to line up would save us a lot of effort (we could subtract X and Y up front, sort the spreadsheet and eliminate or average duplicates) ...
I think you have a good understanding the spreadsheet but just to be clear:

Site 1 PM from Station 1 is the best known reference.
I suggest the points to line up are in the spreadsheet Column N.
* Start with 2 SS to 1 TS as known points to align Station 1
* Station 1 common points 5 T1 to 3 T2
* Station 2 common points 5 T1 to 3 T2 to match Station 1
* Station 3 common points 34 D to 17 G to match Station 2 and Station 1 respectively.

As you say bad points could be eliminated and errors averaged. Moving the relative reference for each station aligns the intermediate points.

I'm too new to FreeCAD to understand how the rest is done but it reads right. One error check is the difference between the Top or Bot hair and the cross hair (Back/Inter/Fore). Top to cross and bottom to cross should be equal.
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: Contour Layout for Building Site

Postby emills2 » Sun Jul 30, 2017 5:33 am

roo wrote:
Sun Jul 30, 2017 2:51 am
points to line up are in the spreadsheet Column N
column N contains the following entries
2 to 1
5 to 3
34 to 17
5 to 3
then,
roo wrote:
Sun Jul 30, 2017 2:51 am
* Start with 2 SS to 1 TS as known points to align Station 1
* Station 1 common points 5 T1 to 3 T2
* Station 2 common points 5 T1 to 3 T2 to match Station 1
* Station 3 common points 34 D to 17 G to match Station 2 and Station 1 respectively.
None of these instructions match data in column N. So i look nearby and see column M

in column M, there is an entry called '2 SS'
there is no entry called '1 TS' :( (do you mean '1 PM'?)
there are two entries called '5 T1' how do i know which entry belong to which station? i assumed the colors green/orange/yellow would be the stations, but that is not really clear.
there are 2 entries called '34 D' again not clear what is what.
there are 2 entries called '17 G' again not clear what is what.

symbols 3 and 5 repeat and seems to be related to '3 T2' and '5 t1', symbol 17 seems related to both instances of '17 G'.

none of these things are obvious, until you devote some time and energy to sorting it out.

i see a strong connection between the green points and the yellow points through symbol 3 '3 T2' and symbol 5 '5 T1' if these are common points, i can align the green data set to the yellow data set. i dont know how i really feel about symbol 17 and 34. i guess 17 relates orange to green and 34 relates orange to yellow. i would almost bet this is correct if you hadn't mentioned something about 2 SS to 1 TS

could you verify the color coding for the stations, and then drop column M and N completely. Just use column L 'symbol' to identify the connecting points.

if spreadsheet cell '6L', containing symbol '3' is the connecting point for station 1, just use that symbol when you repeat the measurement from another station. i think that's what you did, but the additional instructions don't clarify.

if the above is correct, then a good way to communicate that would be:
"i have two big sets of data points"
"the two big data sets share 1 point in common. it has symbol 17"
"to fix the orientation between the two sets, i have a third set. this third set only has 3 points: 3 and 5 from the first set, and 34 from the second set"

i see a real bearing column all the way at the end. does that mean each station is rotated? if so can i trust the 'real bearing'? how do i align the stations to true north? i would like to end up with the y axis pointing north, and if we have a common bearing, we can fix the orientation before doing a translation on all the data.

even without a common bearing it can be done, we would need to draw triangles [3,5,17] then [3,5,34], then [3,17,34]. by looking at these three triangles, we could see which sides have equal lengths, then we can figure out how to rotate them so the equal side are parallel. then we can translate them.
User avatar
roo
Posts: 49
Joined: Sat Jul 29, 2017 9:24 am
Location: oz

Re: Contour Layout for Building Site

Postby roo » Sun Jul 30, 2017 6:39 am

I apologise for the confusion and agree your description of the data is better than mine.

The survey data is entered in Columns A to F and a label is added to Column L. I added a description to Column M to highlight the reference sites and Column N to describe the bearing. Where the description in Column M is the same then the site is the same (ie same site for different station).

You are correct:
* I incorrectly typed 1 TS instead of 1 PM.
* The stations are colour coded green/orange/yellow on Column F.

Best I don't try to explain that if the Real Bearing value for a station is pasted over original Bearing data and the Adjust calculates as zero, the Bearing value becomes a Real Bearing not the survey Bearing.

roo wrote:
Sun Jul 30, 2017 12:38 am
... Site 2 SS to 1 PM is published as 208.117 metres with a bearing of 248:53:29 Deg:Min:Sec.
... and give true north.