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
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Post by HakanSeven12 »

Joel_graff wrote: Wed Jun 12, 2019 3:41 pm Getting closer...

Capture.JPG
Better than mine :) right side arc and spirals look good
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Post by Joel_graff »

HakanSeven12 wrote: Wed Jun 12, 2019 4:21 pm Better than mine right side arc and spirals look good
I think I was overtired or something when I pushed the code last week - I forgot some really critical code (like the code that tells it to draw the spiral!) so it's been substituting straight lines in for the spirals. I'm getting it figured out now, though. Hopefully will have something in the next day or so.
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
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Post by HakanSeven12 »

In your screenshot, some alignments first line is missing. For example Yanyol 202.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Post by Joel_graff »

HakanSeven12 wrote: Wed Jun 12, 2019 6:27 pm In your screenshot, some alignments first line is missing. For example Yanyol 202.
I'll take a closer look at that...

I'm currently trying to sort out an issue with "K2 E Kolu".

Specifically, the geometry starting at line 974:

Code: Select all

	<Curve rot="cw" chord="1.490629760303" crvType="arc" delta="0.840768439589" dirEnd="199.748605272655" dirStart="200.589373712244" external="0.002734306578" length="1.490643134534" midOrd="0.00273423298" radius="101.582738299146" tangent="0.745334941822">
		<Start>4275265.150289229117 508814.41553000838</Start>
		<Center>4275360.244407110848 508778.692127809045</Center>
		<End>4275264.636334692128 508813.016306003497</End>
		<PI>4275264.888178758323 508813.717803520034</PI>
	</Curve>
	<Line dir="199.748605286717" length="1.8633819771">
		<Start>4275264.636334692128 508813.016306003497</Start>
		<End>4275264.0067094611 508811.26252025232</End>
	</Line>
	<Curve rot="cw" chord="289.328978525251" crvType="arc" delta="116.634131201892" dirEnd="82.681228175862" dirStart="199.315359377754" external="153.674990370323" length="346.060433644311" midOrd="80.712903808363" radius="169.999999999696" tangent="275.436924523811">
		<Start>4275264.006709448062 508811.262520213262</Start>
		<Center>4275424.437803187408 508755.032064394094</Center>
		<End>4275446.094031156041 508586.417095337238</End>
		<PI>4275172.901157593355 508551.329302228231</PI>
	</Curve>
The issue is the bearings are discontinuous. That is the 'dirEnd' attribute of the first curve matches the 'dir' attribute of the Line, but the 'dirStart' attribute is off by about 0.434 degrees. That causes it to crash on this alignment. I could force it to render it anyway, I suppose... But you may want to look at that.
Last edited by Joel_graff on Wed Jun 12, 2019 8:16 pm, edited 1 time in total.
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
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Post by Joel_graff »

HakanSeven12 wrote: Wed Jun 12, 2019 6:27 pm In your screenshot, some alignments first line is missing. For example Yanyol 202.
Fixed.

Three issues remain:

1. The alignment "K2 E Kolu" does not render because of the aforementioned curve bearing issues. Not sure how to process what looks like incorrect data.

2. There's a curve rendered far above the alignment. I think this is an artifact resulting from issue #1.

3. "K2 C Kolu" renders incorrectly because it has an arc-spiral-arc segment. I have yet to implement support for this case.

Capture.JPG
Capture.JPG (25.96 KiB) Viewed 741 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
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Post by HakanSeven12 »

Joel_graff wrote: Wed Jun 12, 2019 8:04 pm The issue is the bearings are discontinuous. That is the 'dirEnd' attribute of the first curve matches the 'dir' attribute of the Line, but the 'dirStart' attribute is off by about 0.434 degrees. That causes it to crash on this alignment. I could force it to render it anyway, I suppose... But you may want to look at that.
I created it from polyline. Maybe this couse the problem. Its can't fit perfectly.
Last edited by HakanSeven12 on Wed Jun 12, 2019 9:27 pm, edited 3 times in total.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Post by HakanSeven12 »

Joel_graff wrote: Wed Jun 12, 2019 8:14 pm Fixed.

Three issues remain:

1. The alignment "K2 E Kolu" does not render because of the aforementioned curve bearing issues. Not sure how to process what looks like incorrect data.

2. There's a curve rendered far above the alignment. I think this is an artifact resulting from issue #1.

3. "K2 C Kolu" renders incorrectly because it has an arc-spiral-arc segment. I have yet to implement support for this case.
You almost finished spiral implementation :)
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Post by Joel_graff »

HakanSeven12 wrote: Wed Jun 12, 2019 8:15 pm I created it from plyline. Maybe this couse the problem. Its can't fit perfectly.
In a case where there's a significant error in the data, the only thing I can propose is to simply replace the curve with a tangent connecting the starting and end points. That would allow the alignment to be imported, and the user could go back and fix the alignment in FreeCAD after the fact.
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
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Post by HakanSeven12 »

I will take a look tomorrow.
Last edited by HakanSeven12 on Wed Jun 12, 2019 9:26 pm, edited 1 time in total.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Post by HakanSeven12 »

Joel_graff wrote: Wed Jun 12, 2019 8:14 pm 2. There's a curve rendered far above the alignment. I think this is an artifact resulting from issue #1.
What do you mean by that?
Post Reply