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!
User avatar
HakanSeven12
Posts: 1279
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Fri Feb 05, 2021 6:54 am

I made a test for your alignments. I extracted points from alignment for every 10m(in Civil 3D) and I created a FreeCAD file to comperate them. I send point file and FCstd file to you. I think it can be useful for you :)
Attachments
alignments test.png
alignments test.png (114.53 KiB) Viewed 785 times
Last edited by HakanSeven12 on Fri Feb 05, 2021 12:00 pm, edited 1 time in total.
User avatar
HakanSeven12
Posts: 1279
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Fri Feb 05, 2021 8:06 am

bernd wrote: Fri Feb 05, 2021 7:48 am

Code: Select all

from typing import Final
has been added to pivy trackers

https://github.com/joelgraff/pivy_track ... ums.py#L26

but this is only available for Python 3.8 https://docs.python.org/3/library/typing.html (search for final) and a lot of system do not have Python 3.8 installed (including me on Debian Buster). Would it be possible to make some workaroud for them. Trails does not work ATM.
User avatar
HakanSeven12
Posts: 1279
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Fri Feb 05, 2021 11:09 am

I added labels to alignment. You can find it under view properties. Default option is False. So you dont see labels until you activate it.
Attachments
alignment labels.png
alignment labels.png (115.96 KiB) Viewed 740 times
User avatar
Joel_graff
Posts: 1935
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Sat Feb 06, 2021 3:30 pm

Station labels are something I need to add to the design side as well. One more item for the list.

As for the Final thing - I did that to enforce Const-ness for the python coin enumerant classes I created. I can roll that back, though. It's not necessary.

And thanks for the benchmark dataset. If / when I can get around to implementing that indeterminant clothoid, it'll come in handy.
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: 1279
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Sat Feb 06, 2021 5:12 pm

Joel_graff wrote: Sat Feb 06, 2021 3:30 pm Station labels are something I need to add to the design side as well. One more item for the list.
I added a function to view provider to get stations but you can move it in to alignment model and apply your tuple math codes(I'm not so familiar with that). Also I need a function that return station orthogonal vector angle to rotate label text. So I can make ticks and labels more compatible. Also I want to add labels for horizontal geometry points. So a function that returns that stations can be helpful :)
User avatar
Joel_graff
Posts: 1935
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Sat Feb 06, 2021 5:35 pm

HakanSeven12 wrote: Sat Feb 06, 2021 5:12 pm Also I need a function that return station orthogonal vector angle to rotate label text
You can't just use what you use already to calculate section lines?
HakanSeven12 wrote: Sat Feb 06, 2021 5:12 pm Also I want to add labels for horizontal geometry points. So a function that returns that stations can be helpful
That's already done. It may not be ready for public consumption, though.. I'll take a look this week.
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: 1279
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Sat Feb 06, 2021 6:42 pm

Joel_graff wrote: Sat Feb 06, 2021 5:35 pm You can't just use what you use already to calculate section lines?
That is returning the offset points of stations. How can I get angle from it?
User avatar
Joel_graff
Posts: 1935
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Sat Feb 06, 2021 11:27 pm

HakanSeven12 wrote: Sat Feb 06, 2021 6:42 pm That is returning the offset points of stations. How can I get angle from it?
Does this help?

https://github.com/joelgraff/freecad.tr ... el.py#L668
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: 1935
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Mon Feb 08, 2021 1:18 pm

Joel_graff wrote: Sat Feb 06, 2021 11:27 pm That is returning the offset points of stations. How can I get angle from it?
I didn't see your reply when I posted mine... To get the angle between, I have that built into the TupleMath module in freecad_python_support. I think it's also a function in the FreeCAD.Vector class.

Let me know if you need help sorting that tout, though.
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: 1935
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Mon Feb 08, 2021 1:21 pm

HakanSeven12 wrote: Sat Feb 06, 2021 5:12 pm So a function that returns that stations can be helpful :)
Are you using the AlignmentModel class? You should be able to get actual stationing from that. Otherwise, I don't think I have a solution - at least, not one that can account for omissions / station equations along the 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