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

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Sat Feb 02, 2019 5:46 pm

So something on the long-term roadmap for building 3D highway models is the idea of model targeting.

Essentially, it's the idea that, if I have two separate models, like two lofts, that intersect, I want to trim them to their point of intersection. Or, in the case of a highway model and a terrain (something generated from LiDar data), I want to "trim" the highway model to the existing terrain at it's limits (like where the highway ditches intersect the highway terrain.

I can generally imagine ways to get this done, but I'm not familiar enough with FreeCAD to articulate just what approach might be best....

Looking for ideas and thoughts...

An example of what I mean using Bentley Microstation SSE4:

phpBB [video]
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
User avatar
microelly2
Posts: 4351
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby microelly2 » Thu Feb 07, 2019 1:12 pm

I think what is needed is a method which connects the two objects by calculating of some extra middle segments.
https://youtu.be/njc4wng1nRE
User avatar
Joel_graff
Posts: 1491
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Thu Feb 07, 2019 5:33 pm

microelly2 wrote:
Thu Feb 07, 2019 1:12 pm
I think what is needed is a method which connects the two objects by calculating of some extra middle segments.
One particular thought I had: Would it be possible to force the connector through a template defined by an edge / spline? That is, let's assume the connector is generally flat between two objects. But I want it to transition to a "U" shape for a certain distance between those objects. Is it reasonable to think I could take an edge/wire/spline/arc and use it as a template to control the cross-sectional shape of the connector as it transitions between the poles on the two objects?


There's also one other issue. This approach requires two known sets of points. In some cases, one set will not be known.

Think of a highway with a ditch. A ditch consists of three elements: A foreslope extending down from the road edge (typically 4:1 (H:V)), a ditch bottom (2 feet wide), and a backslope rising up to meet the ground (typically 3:1).

Assuming the existing terrain is *above* the ditch bottom, the ditch backslope will rise at a fixed rate from the outer edge of the ditch bottom. The surface of the backslope will be generally planar, only curving as the ditch bottom curves (horizontally). The top of the slope will not conform to the shape of the terrain. Rather, it will retain it's planar shape, and simply intersect the terrain surface at various points along it's length.

In order to solve that, I assume the following will need to be done:

1. Sweep the ditch backslope edge along the outer edge of the ditch bottom
2. Compute a boolean intersection between the resulting backslope surface and the existing terrain
3. Use the resulting ruled edge to generate a surface between the terrain and the outer edge of the ditch bottom (or just trim the existing backslope surface to the edge of intersection...)

Sorry for the complete lack of pictures...
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
triplus
Posts: 8667
Joined: Mon Dec 12, 2011 4:45 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby triplus » Fri Feb 08, 2019 8:17 pm

Joel_graff wrote:
Wed Jan 16, 2019 5:19 pm
I don't exactly want the point itself to be permanent... I just want to make sure I can always find that point using a consistent, unique identifier, no matter what the user does with the sketch. That is, the index may change if the user adds / deletes other points. The location changes if the user moves it. But in the end, the point itself still exists. I just need a way to identify that point consistently from outside the sketch.

Look, for example, at the sketch template I showed previously. It might represent a single roadway lane of a two-lane road (a typical roadway lane is 12 feet in the US). The sketch origin is at the road's center and the point at the far right would represent the right edge of pavement. I would want to name it 'EOP_RT' so I could permanently refer to it outside the sketch, and so it has a name that's meaningful to the user.

But how do I ensure that the point that I've named is always going to be the same point?

That's why I had the idea that maybe an 'empty constraint' attached to the point might be a solution. It doesn't constrain anything, it just provides a consistent way to reference the actual point from outside the sketch, unless, of course, the point itself (or the constraint) is deleted.
Joel_graff wrote:
Thu Jan 17, 2019 1:20 pm
This is exactly what I need. Using existing constraints (like microelly outlined) or reference constraints (like paullee suggested) is certainly less preferable. I don't care what happens to the point - whether it gets moved, re-ordered, or deleted. I only care that, so long as it exists, I can identify it without fail using an identifier that is serializable and unique within the scope of the sketch.
We had a debate about Part container interfaces here:

https://forum.freecadweb.org/viewtopic. ... &start=170
Interface.png
Interface.png (8.23 KiB) Viewed 438 times
Maybe a part of the problem is you would like to have such point in the Sketch. But in reality you might not want to care at all. About what is in the Sketch in the first place. Doing it like that, you would be able to define road cross sections, before actually adding any geometry inside the Sketch. And from inside the Sketch, you would still have a possibility to reference such point.

P.S. All of this Linked and not Merged. ;)
User avatar
Joel_graff
Posts: 1491
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Fri Feb 08, 2019 9:25 pm

triplus wrote:
Fri Feb 08, 2019 8:17 pm
Doing it like that, you would be able to define road cross sections, before actually adding any geometry inside the Sketch. And from inside the Sketch, you would still have a possibility to reference such point.
If I understand you correctly, you're suggesting create a vertex outside the Sketch and use it as external geometry for the corresponding vertex in the Sketch. Thus, the external vertex acts as a proxy for the internal one to provide a consistent reference, correct?
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
triplus
Posts: 8667
Joined: Mon Dec 12, 2011 4:45 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby triplus » Fri Feb 08, 2019 9:43 pm

Joel_graff wrote:
Fri Feb 08, 2019 9:25 pm
If I understand you correctly, you're suggesting create a vertex outside the Sketch and use it as external geometry for the corresponding vertex in the Sketch. Thus, the external vertex acts as a proxy for the internal one to provide a consistent reference, correct?
Yes.
User avatar
HakanSeven12
Posts: 278
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Sat Feb 16, 2019 7:29 am

Hi. I'm traying to install WB but I copied the files into C:\Program Files\FreeCAD 0.17\Mod\Transportation but I cant see Transportation WB in FreeCAD.
chrisb
Posts: 18003
Joined: Tue Mar 17, 2015 9:14 am

Re: Civil engineering feature implementation (Transportation Engineering)

Postby chrisb » Sat Feb 16, 2019 8:03 am

Hi Hakan, welcome to the forum.
Did you restart FreeCAD?
User avatar
HakanSeven12
Posts: 278
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Sat Feb 16, 2019 9:06 am

Yes. I uninstalled 0.17 and install 0.18. Now I can see Transportation WB but when I select it give an error "No module named scipy".
chrisb
Posts: 18003
Joined: Tue Mar 17, 2015 9:14 am

Re: Civil engineering feature implementation (Transportation Engineering)

Postby chrisb » Sat Feb 16, 2019 10:34 am

I faintly remember that microelly2 talked about how to install it.
microelly2 wrote: ping