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.
User avatar
Joel_graff
Posts: 1117
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Mon Apr 15, 2019 8:48 pm

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

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Tue Apr 16, 2019 1:16 pm

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. :)
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
HakanSeven12
Posts: 51
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Tue Apr 16, 2019 2:25 pm

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

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Tue Apr 16, 2019 3:04 pm

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. :)
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
HakanSeven12
Posts: 51
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Tue Apr 16, 2019 8:22 pm

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

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Tue Apr 16, 2019 8:31 pm

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?
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
HakanSeven12
Posts: 51
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Wed Apr 17, 2019 6:40 am

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

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Wed Apr 17, 2019 11:50 am

HakanSeven12 wrote:
Wed Apr 17, 2019 6:40 am
code
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.
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: 1117
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Fri Apr 19, 2019 2:18 am

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 70 times
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
User avatar
Kunda1
Posts: 3928
Joined: Thu Jan 05, 2017 9:03 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Kunda1 » Fri Apr 19, 2019 3:12 am

Awesome progress!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features