Civil engineering feature implementation (Transportation Engineering)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
chrisb
Posts: 19487
Joined: Tue Mar 17, 2015 9:14 am

Re: Civil engineering feature implementation (Transportation Engineering)

Postby chrisb » Sat Jul 13, 2019 10:24 am

These two photos made my day! While you need almost one and a half turn in Japan to get from upper left to upper right, you don't seem to struggle with such challenges in Australia. Do you have a speed limit with that much traffic?
User avatar
HakanSeven12
Posts: 278
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Sat Jul 13, 2019 10:39 am

jmaustpc wrote:
Sat Jul 13, 2019 10:08 am
approximately 2100km.
Are you kidding :D you can fit Turkey between those citys.
User avatar
kkremitzki
Posts: 1789
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Civil engineering feature implementation (Transportation Engineering)

Postby kkremitzki » Sat Jul 13, 2019 5:24 pm

Hah, that reminds me of this sign you see when entering Texas from the east showing how far it is to Texas' westernmost city:

Image

(That's 1379 kilometers.)
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Thu Jul 18, 2019 2:18 pm

HakanSeven12 wrote:
Sat Jul 13, 2019 9:52 am
ping
So I've been working with your large alignment, trying to rework spiral alyouts, and I've come across a small amount of error in the values in your LandXML.

Specifically, the first spiral curve in "Anayol" is described as:

Code: Select all

<Spiral length="375." radiusEnd="1500." radiusStart="INF" rot="ccw" spiType="clothoid" theta="7.161972439135" totalY="15.607570051337" totalX="374.414486202449" tanLong="250.204919632086" tanShort="125.186311833623">
    <Start>4271523.619686000049 507067.709483999992</Start>
    <PI>4271690.523937826976 507254.110858806758</PI>
    <End>4271785.008000442758 507336.235000094923</End>
</Spiral>
I checked the calculation of the TotalX / TotalY values (Xc / Yc) using two different formulas for spiral curves. In each case, my values came up somewhat different than what's in your file.

For example, , I calculated TotalX / Xc two ways and got 374.4140625 and 374.414057537. Your value was 374.424486202449. ~0.5 mm error

The TotalY values proved much worse ~18mm

When plotting the curve itself, the start point ends up off by 11 - 12 millimeters in the X and Y directions.

So I can cross check the provided values against the mathematical values, but when a discrepancy occurs, what values should be preserved from the original data, and which values should be recalculated? That is, do we save the coordinate values and recalculate the curve attributes, or do the reverse?
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
HakanSeven12
Posts: 278
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Thu Jul 18, 2019 2:57 pm

Joel_graff wrote:
Thu Jul 18, 2019 2:18 pm
do we save the coordinate values and recalculate the curve attributes, or do the reverse?
I dont know what is causing this but I think we must protect the coordinates. If we dont, that issue effect other alignment item coordinates too. If issue repeat itself more than one time, the end station coordinates deflection will increase.
User avatar
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Thu Jul 18, 2019 3:06 pm

HakanSeven12 wrote:
Thu Jul 18, 2019 2:57 pm
I dont know what is causing this but I think we must protect the coordinates. If we dont, that issue effect other alignment item coordinates too. If issue repeat itself more than one time, the end station coordinates deflection will increase.
That was my feeling on the matter as well.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
HakanSeven12
Posts: 278
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Mon Jul 22, 2019 10:16 pm

Joel_graff wrote:
Thu Jul 18, 2019 3:06 pm
That was my feeling on the matter as well.
Maybe you can add a warning and show recalculated and old paramaters.
User avatar
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Wed Jul 24, 2019 1:12 pm

Just a little surveyor humor about coordinate precision... :)
0.png
0.png (69.93 KiB) Viewed 262 times
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Wed Jul 24, 2019 1:22 pm

HakanSeven12 wrote:
Mon Jul 22, 2019 10:16 pm
Maybe you can add a warning and show recalculated and old paramaters.
Ok, so as I'm sorting out what really matters here, the number one coordinate that must be preserved is the PI.

If the PI is never altered, then any 'drift' caused by math will be strictly limited to the individual geometry.

So, we need to document how to handle the error cases.

For example, given a fixed PI for a simple curve, the distances between (center / start, center / end) and (PI / start, PI / end) must correspond to the radius and tangent lengths. If the coordinate distances are unequal among themselves, then they must be changed. So what parameter (other than the PI), will be the fallback for cases where the coordinate data is incorrect?

In the case of a clothoid, the curve itself is pretty much locked to the spiral-to-curve point (SC) and the PI. Thus, if there is an error in any coordinates, it's with the point of infinite radius (tangent) or it's length. In that case, assuming the tangent-to-spiral point (TS) does fall on the alignment (and isn't incorrect), the length can be recalculated. Otherwise, the length should control and the TS recalculated.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
HakanSeven12
Posts: 278
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Wed Jul 24, 2019 7:47 pm

I think TS coordinates must recalculated. Because if we change length of spiral, it will effect alignment more than when we change TS coordinates. I think we must fix error at spiral infinity side because at infinity side, spiral converge to flat line. So we spread error at TS. Almost it's not change alingment geometry.

AND
Joel_graff wrote:
Wed Jul 24, 2019 1:12 pm
Just a little surveyor humor about coordinate precision... :)

I like it :D