- gl2.png (131.7 KiB) Viewed 1075 times
Civil engineering feature implementation (Transportation Engineering)
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
I think I've fixed this. Give it a try.
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
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
Locations are correct but spiral lines are not perpendicular to alignment Left spiral lines are reversed.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Pushed a small change. Try again.
Note: I didn't deal with the spiral lines not being perpendicular. Not sure what's causing that. My test code seemed to work ok.
Note: I didn't deal with the spiral lines not being perpendicular. Not sure what's causing that. My test code seemed to work ok.
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
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
This issue should be fixed. I tested all of the alignments and it seems to generate orthogonals correctly now, except spirals with two non-infinite radii.HakanSeven12 wrote: ↑Mon Jun 17, 2019 2:46 pm Locations are correct but spiral lines are not perpendicular to alignment
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
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
Everything looks okey. But only one line is reversed. Its not a big problem for now
Edit: I tested it with other alignments. I dont see any problem with them. Its valid only for "A1 Kolu" and "D2 Kolu". Maybe its releated with my code.
Edit: I tested it with other alignments. I dont see any problem with them. Its valid only for "A1 Kolu" and "D2 Kolu". Maybe its releated with my code.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Ok, so that's really weird. You must be doing something in your code that's causing that error, because it didn't show up at all in mine. In order to address that, I think we need to know at exactly what coordinate that falls - if it's exactly at the start / end of a curve, it may be a math error that needs to be handled by a if/then conditional or something.
Anyway, below is a screenshot of left-side orthogonals along both alignments spaced at 1 meter:
There's a function I wrote in the alignment object to do that- _plot_vectors().
It's accessible through alignment.Proxy. You might want to test on your system and see if you get identical results.
Anyway, below is a screenshot of left-side orthogonals along both alignments spaced at 1 meter:
There's a function I wrote in the alignment object to do that- _plot_vectors().
It's accessible through alignment.Proxy. You might want to test on your system and see if you get identical results.
Code: Select all
>>> App.ActiveDocument.K1_A_Kolu_Horiz.Proxy._plot_vectors([],1.0)
station range: [0.0, 427.237184837352]
>>> App.ActiveDocument.K2_D_Kolu_Horiz.Proxy._plot_vectors([],1.0)
station range: [0.0, 387.319268052876]
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
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
I also created wires at horizontal geometry points and the wrong lines at spiral-spiral(for A1) and spiral-arc(for D2) transition. Don't interest with it. Its just insignificant bug.
Last edited by HakanSeven12 on Tue Jun 18, 2019 12:52 pm, edited 2 times in total.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Can you do me a favor and give me the exact coordinate value that generates the line for you on K1_A? I have zeroed in on that particular point and cannot reproduce the error using my own function.
I know it's not a significant issue, but if it's a math error on my side that can be fixed easily, then it should be fixed. That could easily become a big issue in another context...
I know it's not a significant issue, but if it's a math error on my side that can be fixed easily, then it should be fixed. That could easily become a big issue in another context...
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
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
for A1 0+313.236 (508258370.0956219,4274274595.1136127,0.0)
for D2 0+200.159 (507827001.2552882,4275021798.457997,0.0)
for D2 0+200.159 (507827001.2552882,4275021798.457997,0.0)
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum