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

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Thu Jul 25, 2019 12:09 pm

HakanSeven12 wrote:
Wed Jul 24, 2019 7:47 pm
I think we must fix error at spiral infinity side because at infinity side, spiral converge to flat line. So we spread error at TS. Almost it's not change alingment geometry.
Yeah, I think we're on the same page, here. The SC and PI are really what define the curve's position, so unless the spiral can't be resolved, we essentially treat the TS as a floating coordinate...
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
User avatar
Joel_graff
Posts: 1472
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Sun Aug 25, 2019 6:13 am

A small update of what I've been doing lately with the trails workbench...

phpBB [video]
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
triplus
Posts: 8605
Joined: Mon Dec 12, 2011 4:45 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby triplus » Sun Aug 25, 2019 9:53 pm

From the beginning i had a feeling using Sketcher workbench directly likely won't be the best fit. As for the presented interaction capabilities. Nice.

P.S. Hopefully in the future Pivy could have more support for achieving such things. And seeing such development, that is why having Python bindings for FreeCAD viewport is basically a must.
User avatar
Kunda1
Posts: 5218
Joined: Thu Jan 05, 2017 9:03 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Kunda1 » Sun Aug 25, 2019 11:07 pm

Fantastic update. Much applause for the work to drop Sketcher and go your own way. Hopefully this proof of concept can keep pivy and coin3d updated and relevant
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Joel_graff
Posts: 1472
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Mon Aug 26, 2019 1:12 am

Kunda1 wrote:
Sun Aug 25, 2019 11:07 pm
Fantastic update. Much applause for the work to drop Sketcher and go your own way. Hopefully this proof of concept can keep pivy and coin3d updated and relevant
As I was writing this, the thought occurred to me.. why don't we have a FreeCAD Python devkit? That led me to the next question... Why don't we have a developer's workbench? Or would that sort of thing be useful?
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
triplus
Posts: 8605
Joined: Mon Dec 12, 2011 4:45 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby triplus » Mon Aug 26, 2019 10:51 am

Joel_graff wrote:
Mon Aug 26, 2019 1:12 am
why don't we have a FreeCAD Python devkit?
Don't we? One of the first thing one notices, when starting FreeCAD, is built in Python interpreter. Hence everything just works in a seamless way. Bindings for the viewport are available by default.

P.S. Or maybe you are talking about, on why there are not more initiatives like this:

https://forum.freecadweb.org/viewtopic.php?t=21808

There could be more of that in the future.
User avatar
Joel_graff
Posts: 1472
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Mon Aug 26, 2019 11:46 am

triplus wrote:
Mon Aug 26, 2019 10:51 am
P.S. Or maybe you are talking about, on why there are not more initiatives like this:
It has occurred to me that there are numerous snippets of reusable code scattered throughout the forums and workbenches in python, but no developer's library, of sorts, to contain them. pivy is something like that, of course, and the stuff I'm writing might be useful in a pivy 2D graphics library context, perhaps.

But having a workbench that can act as a developers playground... maybe allows a dev to add certain python libraries of code to their own WB automatically (which seems like a very small thing to do) seems like it'd make it a fun little tool that would make you just want to explore all the different recipes / snippets that are in it. On the flip side, it also seems like a potential maintenance hassle with lots of broken / unusuable / outdated code.

So whether a 'developer's workbench' is of value, I can't really say. I think it would be, though I'm not sure what that should look like.

---

On a slightly different topic, as I've worked on this horizontal alignment tool, I've come to appreciate looking at the FreeCAD task panel (and the associated task) as a sort of miniature, single-function workbench. As I wrote the tracker classes, I started creating global state singletons to track things like mouse position, drag state, view state, and the selection state. All of this duplicates functionality that's built into FreeCAD, but the "global" singletons have a scope that's limited to the currently active task. That allows me to re-implement a customized version of these functions tailored to the specific task at hand.

So, I suppose the most useful idea I have would be to develop (or at least outline) a FreeCAD task framework in Python. Perhaps what I have in mind would be a further development for the new workbench starter kit or something...
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
triplus
Posts: 8605
Joined: Mon Dec 12, 2011 4:45 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby triplus » Tue Aug 27, 2019 12:15 pm

Sounds reasonable.

P.S. I wonder if much of that is due to a developer oriented documentation currently a bit lacking? Documentation is rather focused on people using FreeCAD. People developing FreeCAD indeed must gather info from different places, a bit here and a bit there. But i don't know on how to improve that. Without more people being capable of writing such documentation getting involved, therefore developers. In addition external libraries, such as mentioned Pivy, documentation is usually available elsewhere. FreeCAD documentation therefore at best providing some information and examples. If a workbench could help i don't know. For such purposes i guess developers already look for clues in existing workbenches.
User avatar
Kunda1
Posts: 5218
Joined: Thu Jan 05, 2017 9:03 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Kunda1 » Tue Aug 27, 2019 12:25 pm

Some documentation efforts are happening in this GSOC https://forum.freecadweb.org/viewtopic. ... 91#p329391
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Joel_graff
Posts: 1472
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Sat Sep 07, 2019 9:58 pm

Another update on the horizontal alignment design tool I'm working on.


phpBB [video]
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails