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 (Transportation Engineering)

Post by Joel_graff »

kisolre wrote: Mon Apr 15, 2019 8:18 pm 600 posts is hardly a vacuum :) Maybe it is very narrow field with existing tools so not many people to search for alternatives...

Today in front of my home I saw a surveyor taking measurements every 20-50 cm... didn't think that such resolution/accuracy was possible... you learn something new every day :)
There isn't a lot of open source options in transportation engineering and it's been a hard start for me to get something useful in place. But FreeCAD seems up to the task.

And yes, resolution anymore is insane. It's pretty neat seeing the point clouds that a portable LiDar station can generate.
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: Mon Apr 15, 2019 4:33 pm I changed file names now it works.
kisolre wrote: Mon Apr 15, 2019 3:19 pm Tried fresh clone - same. Only XML gets created, imports are case sensitive.
Ok, I think I got my head sorted out on this now. At first, I didn't believe what you guys were saying, because I *knew* I changed those files! But they weren't getting pushed to the repo because the old filenames were still cached locally. Now that I know how to delete it, it shouldn't be an issue in the future, since I still have some name-case changes to make.

I also made the changes @kisolre recommended with the icon paths. Have not tested them, but everything has been pushed to the dev branch.

Feel free to test it and let me know if you have more issues.

Thanks again for the help guys, I really appreciate it. :)
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: Tue Apr 16, 2019 1:16 pm Ok, I think I got my head sorted out on this now. At first, I didn't believe what you guys were saying, because I *knew* I changed those files! But they weren't getting pushed to the repo because the old filenames were still cached locally. Now that I know how to delete it, it shouldn't be an issue in the future, since I still have some name-case changes to make.

I also made the changes @kisolre recommended with the icon paths. Have not tested them, but everything has been pushed to the dev branch.

Feel free to test it and let me know if you have more issues.

Thanks again for the help guys, I really appreciate it. :)
It works :) But when I click Open the Templates Library

Code: Select all

Library path  C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails-dev\freecad\trails\corridor/Templates not found.
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: Tue Apr 16, 2019 2:25 pm It works :) But when I click Open the Templates Library

Code: Select all

Library path  C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails-dev\freecad\trails\corridor/Templates not found.

Ah. Yep. That changed too. I just pushed some changes that should fix it. Pull them and you should get a directory-picker dialog pop up if the current path is invalid, so you can choose one manually. And, it *should* default to where I moved the template library files.

I can't really test it well on my end, but I tested enough to be reasonably confident. :)
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: Tue Apr 16, 2019 3:04 pm Ah. Yep. That changed too. I just pushed some changes that should fix it. Pull them and you should get a directory-picker dialog pop up if the current path is invalid, so you can choose one manually. And, it *should* default to where I moved the template library files.

I can't really test it well on my end, but I tested enough to be reasonably confident. :)
It gives some errors. I changed row below. Its works now :)

In TemplateLibrary.py row 725 change this

Code: Select all

resources.__path__ + '/data/template_library/'
to this

Code: Select all

os.path.dirname(resources.__file__) + '/data/template_library/'
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: Tue Apr 16, 2019 8:22 pm In TemplateLibrary.py row 725 change this
Ok, now that's the reverse of the problem you had before.

Can you post the output of both the __path__ and __file__ attributes for me?
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 »

code

Code: Select all

resources.__path__ + '/data/template_library/'
result

Code: Select all

Running the Python command 'ViewTemplateLibrary' failed:
Traceback (most recent call last):
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails-dev\freecad\trails\corridor\template\ViewTemplateLibrary.py", line 116, in Activated
    TemplateLibrary.show(self._library_call_back)
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails-dev\freecad\trails\corridor\template\TemplateLibrary.py", line 725, in show
    resources.__path__ + '/data/template_library/'

can only concatenate list (not "str") to list
code

Code: Select all

os.path.dirname(resources.__file__) + '/data/template_library/'
result

Code: Select all

                python-git not found.
                Git-related functions will be disabled

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 Apr 17, 2019 6:40 amcode
The problem is __path__ returns a list. There needs to be a '[0]' after it:

Code: Select all

resources.__path__[0]
I've caught that a couple times already. I'll try to fix it today.

EDIT: Fixed in two places. Try it now. It should work fine with the __path__ attribute.
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 »

A little update on the GUI tool I'm working on for horizontal alignment design.

I don't know how functional I'll make it, but it's coming along better than I expected...

It's not obvious by the demo, but as the mouse cursor hovers over a curve, it automatically selects all of the segments of the curve and displays the "control" geometry (tangents and radius lines). Then, I made it possible to "select" a curve by clicking on it (it turns white) to enable editing the curve properties.

There's a lot to do to make it a full-featured editor, but having the ability to at least edit existing curves seems like a nice start.

Peek 2019-04-18 21-11.gif
Peek 2019-04-18 21-11.gif (308.71 KiB) Viewed 1514 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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Post by Kunda1 »

Awesome progress!
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
Post Reply