## 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
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

### Re: Civil engineering feature implementation (Transportation Engineering)

microelly2 wrote:
Mon Feb 18, 2019 5:48 pm
We can use the idea from here
Actually, the spiral curve as it's used in transportation engineering has a pretty well-defined model - no need to solve for it generally... Unless it's a more elegant solution? Anyway, a brief overview of the parameters and their mathematical definitions for a transportation engineering clothoid can be found here:

https://www.mathalino.com/reviewer/surv ... iral-curve

Given those parameters, I just need to sort out which ones need to be given by the user, and which can be calculated.

To this point, I know the distance between PI's, the simple curve radius, and the central angle of the simple curve. From that, I can probably get the spiral's tangent length (Ts), but to get the other parameters, I'll probably need to know one or more of the following: the spiral angle, the circular curve offset (length of throw), and the length of the spiral curve... That's just a guess, though.

If you can think of a better approach, though, I'd love to hear it.

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

### Re: Civil engineering feature implementation (Transportation Engineering)

HakanSeven12 wrote:
Mon Feb 18, 2019 2:55 pm
Spirals uses curve radius which its connected and spiral length input.
Ok, so in order to completely describe a spiral curve from beginning to end, I believe I need to know the following:

1. PI location - Either as a distance / bearing from previous PI or as an absolute northing / easting (x/y) coordinate
2. Circular/Central Arc size - Radius or degree of curve
3. Length of Spiral (as you indicated)

The first two parameters I require for simple/circular curves as it is. The third parameter should be all I need to build the spiral.

I'll play around with it - it might be a bit before I have something, though. Still, better to add this now than later, I think.

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

### Re: Civil engineering feature implementation (Transportation Engineering)

microelly2 wrote:
Mon Feb 18, 2019 5:48 pm
We can use the idea from here
HakanSeven12 wrote:
Mon Feb 18, 2019 10:14 am
Can we add clothoid object to curves?
Just an FYI, rudimentary support for spirals is in place. Right now, it's only for right-hand curves, because that's what I'm testing with

At present, it doesn't look quite right, and I'm having a hard time working up a test case. With a little more time, I hope I can iron out the issues or at least identify what limitations it has before moving on.

Need to keep pressing forward, so I can't promise a lot of polish on this at the moment, but I'll keep at it for another week or so to see what I can get done.

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

### Re: Civil engineering feature implementation (Transportation Engineering)

Joel_graff wrote:
Fri Feb 22, 2019 2:44 pm
Just an FYI, rudimentary support for spirals is in place. Right now, it's only for right-hand curves, because that's what I'm testing with

At present, it doesn't look quite right, and I'm having a hard time working up a test case. With a little more time, I hope I can iron out the issues or at least identify what limitations it has before moving on.

Need to keep pressing forward, so I can't promise a lot of polish on this at the moment, but I'll keep at it for another week or so to see what I can get done.
Good to see progress
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

### Re: Civil engineering feature implementation (Transportation Engineering)

HakanSeven12 wrote:
Fri Feb 22, 2019 2:59 pm
Good to see progress
Thought now would be a good time to post an update video. This describes how horizontal alignments can be imported into FreeCAD. And yes, spirals work now. At least I think they do.

phpBB [video]

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

### Re: Civil engineering feature implementation (Transportation Engineering)

İt works I think we need something like horizontal alignment creation tool
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

### Re: Civil engineering feature implementation (Transportation Engineering)

HakanSeven12 wrote:
Sat Feb 23, 2019 10:53 pm
İt works I think we need something like horizontal alignment creation tool
I have an idea about that. I'm thinking we could use the Sketcher in a limited capacity. Essentially, if the user chooses a curve to edit, the curve (and it's adjoining tangents) could be created in a sketch and edited in it. Then, when the sketch is closed, the actual curve is rebuilt with the geometry as the user edited it in the sketch.

The Sketcher doesn't really handle long alignments or lots of geometry well, so using it to simply edit a single curve at a time, rather than maintain the entire alignment in one Sketch (which I was attempting to do previously) should work. That said, editing spirals / clothoids will prove quite tricky, I'm sure.

In any case, I don't think I really want to try to implement that now. I need to get vertical alignment importing implemented, then see what more I can do with 3D modelling.

Incidentally, the data I used to in the video is available in the Mod/transportationwb/data/alignment folder...

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
microelly2
Posts: 4440
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

### Re: Civil engineering feature implementation (Transportation Engineering)

I made a script to create a pattern along a spline path with fixed length segments like a railway train with wagons. it may be an idea for special swept path problems. Still don't know whether is useful, but it was a fun to play with it.

the control points (double circles in the picture) belong to the curve and have the same distance to the others
Attachments
bp_968.png (6.58 KiB) Viewed 365 times
Joel_graff
Posts: 1576
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

### Re: Civil engineering feature implementation (Transportation Engineering)

microelly2 wrote:
Fri Mar 01, 2019 2:01 pm
I made a script to create a pattern along a spline path with fixed length segments like a railway train with wagons. it may be an idea for special swept path problems. Still don't know whether is useful, but it was a fun to play with it.
My first thought would be applying symbology to lines - not line styles (like dashed lines), but symbols that overlay them.

Take a look at our highway standard for standard symbols, abbreviations, and patterns:

http://www.idot.illinois.gov/Assets/upl ... tterns.pdf

There are good examples of what I'm thinking about starting with the drainage items section and most of the sections that follow it. It's probably not the right way to do that, though...

The other potential use might be with the swept path analyzer...? Not so much for doing an analysis, but just as a possible visual aid.

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

### Re: Civil engineering feature implementation (Transportation Engineering)

Just noting it here - this feature might come in handy for editing alignments without requiring the sketcher...