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

Re: Civil engineering feature implementation

Post by Joel_graff »

Ok, so I've been looking through the threads and the documentation, and I'm trying to get the geodata workbench up and running under freecad. Unfortunately, Freecad doesn't detect it. Does it need to be built before it can be used?
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Civil engineering feature implementation

Post by Kunda1 »

Joel_graff wrote:Ok, so I've been looking through the threads and the documentation, and I'm trying to get the geodata workbench up and running under freecad. Unfortunately, Freecad doesn't detect it. Does it need to be built before it can be used?
Per https://forum.freecadweb.org/viewtopic.php?f=4&t=20232 it needs to be preinstalled.
And as @sgrogan mentions there is a dependency on the animation workbench so it also needs to be preinstalled.

FYI I've opened a ticket on FreeCAD-addons to create a pre-requisite checker that would simplify this process but it is no small task.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Civil engineering feature implementation

Post by Kunda1 »

Joel_graff wrote:Ok, so I've been looking through the threads and the documentation, and I'm trying to get the geodata workbench up and running under freecad. Unfortunately, Freecad doesn't detect it. Does it need to be built before it can be used?
microelly2 wrote:ping
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation

Post by Joel_graff »

I've been exploring FreeCAD a little further and I've reached a point where I want to try to implement some of these transportation-engineering tools.

If I were to start implementing the basic tools required to build horizontal / vertical curves for highway transportation, extending the draft module seems the natural approach. I'm not sure, though, that this is best.

Basically, I would have to start by creating tools to build 2-center, 3-center and spiral curves. Typically, these are created using specific ideas and concepts unique to transportation engineering, so I'm reluctant to incorporate them into the general draft module. The curves themselves may not be that useful outside transportation engineering contexts, and the parameters that describe them tend to be discipline-specific. Further, there's the need to apply stationing to the curves, as well as curve "descriptions" (a list of the curve parameters).

What also complicates this is that different forms of transportation may use the same types of curves, but specify them in different ways - rail vs. road, for example are likely very different.

In the end, the horizontal / vertical alignment will exist as a single object with all of it's curves and their corresponding definitions.

I can begin this simply as a series of macros, of course, but it would be good to have some idea of what kind of roadmap implementing this would require.
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

Post by Joel_graff »

Those give a really good idea of what I think a transportation engineering parametric tool should do, but it's also very large-scale level. The real problems I've encountered (on the Bentley side, anyway) is more of a micro level - creating 3D cells of roadside "appurtenances" - guardrail, sidewalk ramps, entrances, retaining walls, etc., and providing a way to drop them in, much like a tile-based building game (like Sim City). Further, once they're dropped in place, they need to be freely adjustable to match whatever design standards apply... Bentley does this, but poorly. I don't get the impression Civil3D is much better.
Last edited by Joel_graff on Tue May 23, 2017 9:34 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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Civil engineering feature implementation

Post by Kunda1 »

Joel_graff wrote:
Those give a really food idea of what I think a transportation engineering parametric tool should do, but it's also very large-scale level. The real problems I've encountered (on the Bentley side, anyway) is more of a micro level - creating 3D cells of roadside "appurtenances" - guardrail, sidewalk ramps, entrances, retaining walls, etc., and providing a way to drop them in, much like a tile-based building game (like Sim City). Further, once they're dropped in place, they need to be freely adjustable to match whatever design standards apply... Bentley does this, but poorly. I don't get the impression Civil3D is much better.
This maybe derailing the thread but just wanted to make sure you saw this interesting idea that was implemented by a user recently. Minecraft-esque:
https://github.com/JMG1/VoxelWorkbench
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Civil engineering feature implementation

Post by ickby »

Most likely the best approach would be to make a custom workbench. You could import all tools you need from draft and add the ones you create for the specific task.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation

Post by Joel_graff »

Kunda1 wrote: This maybe derailing the thread but just wanted to make sure you saw this interesting idea that was implemented by a user recently. Minecraft-esque:
https://github.com/JMG1/VoxelWorkbench
That's really fantastic! My kids will get a kick out of that.
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

Post by Joel_graff »

Ok, so I've been working out what an alignment module would look like - specifically a set of tools designed to create horizontal and vertical alignments.

There's a number of elements to include, but at the most basic level, it consists of connecting lines and arcs end-to-end with tangential constraints. Most of the functionality can already be demonstrated in the Sketcher workbench, as seen below:
Screenshot from 2017-05-26 17-17-44.png
Screenshot from 2017-05-26 17-17-44.png (10.31 KiB) Viewed 4200 times
There are a number of domain-specific behaviors that would control how these curves are laid out. For example, the first two arcs represent a 2-center curve, where the center of the curve of lesser radius is constrained to the line defined by the center point of the other curve, and the point of tangency bewteen the curves (as demonstrated in the above image).

Thus it becomes necessary to predefine these curve types to ensure this essential constraint is always in effect. Further, appended or inserted curves and tangents are always constrained tangentially at their connected ends. There's really a variety of other domain-specific constraints that need to be included, as well.

While the fact that the core functionality is so readily demonstrated in Sketcher is really encouraging, it appears to me that Sketcher is implemented almost entirely in C++. Further, there doesn't appear to be any API documentation, (nor much of an API so far as I can tell). Is there more information on how to interact with Sketcher via Python?

Also, one of the things that I noticed in the documentation is that the sketcher objects are intended to generate a 3D object and that the sketcher geometry exists in only the sketcher design stage.

With an alignment object, this poses a couple of problems:

1. The alignment object is a real object that must exist in the final model, though it is never more than curvelinear.
2. The alignment object is the superposition of two curvelinear objects in orthogonal planes (horizontal and vertical)

Meeting these requirements seems to be complicated using Sketcher...

Can anyone perhaps fill in the gaps in my understanding that might make this easier to visualize?
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
Post Reply