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

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Thu May 28, 2020 12:03 am

Yeah, there's really no advantage to using lxml over xml.etree like I do. lxml has some performance advantages, but in the end, it's a third-party dependency that doesn't really make it worthwhile, I'm afraid. I did look into it a long time ago.
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
Posts: 796
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Mon Jun 01, 2020 3:00 pm

I updated trails and it gives error

Code: Select all

No module named 'freecad.trails.project.coin'
Traceback (most recent call last):
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\init_gui.py", line 220, in Initialize
    from .project.commands \
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\commands\edit_alignment_cmd.py", line 33, in <module>
    from ..tasks.alignment import edit_alignment_task
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\tasks\alignment\edit_alignment_task.py", line 50, in <module>
    from ...trackers.alignment_tracker import AlignmentTracker
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\trackers\alignment_tracker.py", line 44, in <module>
    from .curve_tracker import CurveTracker
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\trackers\curve_tracker.py", line 28, in <module>
    from ..coin import coin_utils
User avatar
Joel_graff
Posts: 1754
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Mon Jun 01, 2020 4:19 pm

I'll take a look at that today. I must have forgot to comment something out. :)
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
Posts: 1754
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Mon Jun 01, 2020 4:38 pm

So things are really in flux atm. I've pushed some broken code. need to start using branches more often.

Anyway, I think I fixed it, but let me know.
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
Posts: 796
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Tue Jun 02, 2020 7:02 am

error

Code: Select all

No module named 'pivy_trackers.tracker'
Traceback (most recent call last):
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\init_gui.py", line 220, in Initialize
    from .project.commands \
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\commands\edit_alignment_cmd.py", line 33, in <module>
    from ..tasks.alignment import edit_alignment_task
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\tasks\alignment\edit_alignment_task.py", line 50, in <module>
    from ...trackers.alignment_tracker import AlignmentTracker
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\trackers\alignment_tracker.py", line 44, in <module>
    from .curve_tracker import CurveTracker
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\trackers\curve_tracker.py", line 26, in <module>
    from pivy_trackers.tracker.line_tracker import LineTracker
fix

Code: Select all

from pivy_trackers.pivy_trackers.tracker.line_tracker import LineTracker

from ...geometry import arc, spiral, support

from pivy_trackers.pivy_trackers.coin import coin_utils

from collections.abc import Iterable
#from ..support.tuple_math import TupleMath

from pivy_trackers.pivy_trackers.coin.coin_enums import NodeTypes as Nodes
from pivy_trackers.pivy_trackers.coin.todo import todo

from pivy_trackers.pivy_trackers.tracker.marker_tracker import MarkerTracker
from pivy_trackers.pivy_trackers.tracker.context_tracker import ContextTracker
new error

Code: Select all

  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\tasks\alignment\edit_alignment_task.py", line 50, in <module>
    from ...trackers.alignment_tracker import AlignmentTracker
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\trackers\alignment_tracker.py", line 44, in <module>
    from .curve_tracker import CurveTracker
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\project\trackers\curve_tracker.py", line 26, in <module>
    from pivy_trackers.pivy_trackers.tracker.line_tracker import LineTracker
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\pivy_trackers\pivy_trackers\tracker\line_tracker.py", line 28, in <module>
    from ..coin import coin_utils
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\pivy_trackers\pivy_trackers\coin\coin_utils.py", line 30, in <module>
    from .coin_enums import MarkerStyles
  File "C:\Users\Hakan\AppData\Roaming\FreeCAD\Mod\freecad.trails\pivy_trackers\pivy_trackers\coin\coin_enums.py", line 28, in <module>
    from ..support.const import Const
Joel_graff wrote:
Mon Jun 01, 2020 4:19 pm
I'll take a look at that today. I must have forgot to comment something out. :)
Yes. Some parts are missing :) I'm using "VS Code" for code editing and "Git (Submodule) Assistant" to get submodules.
User avatar
Joel_graff
Posts: 1754
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Tue Jun 02, 2020 12:08 pm

Is your support folder populated?

When you git clone a project that has submodules, you have to individually clone the submodules. I didn't realize that till after I started using them. Starting to rethink doing that, but it makes stuff so much easier to handle.

This link explains that if you hadn't already figured it out.:

https://stackoverflow.com/questions/379 ... es#4438292
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
Posts: 796
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Tue Jun 02, 2020 12:39 pm

Joel_graff wrote:
Tue Jun 02, 2020 12:08 pm
When you git clone a project that has submodules, you have to individually clone the submodules.
You dont need to do it manuelly. You can use "Git (Submodule) Assistant" if you are using vs code. https://marketplace.visualstudio.com/it ... -assistant

There is no "support" in your pivy tracker repository.
Attachments
support.png
support.png (117.48 KiB) Viewed 160 times
User avatar
Joel_graff
Posts: 1754
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Tue Jun 02, 2020 1:06 pm

I see what I did. Sort of.

I've added support as a submodule in both trails and trackers. Then I added trackers as a submodule to trails. In other words, the same submodule is added twice, though in different locations.

Not sure why that would cause it to be removed, but I see the commit that removed it.

I'm going to try to sort this out and get back to you. it may take a while. If you can comment out stuff and get it running in the meantime, go for it.

And thanks for the submodule assistant tip. :)
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
Posts: 796
Joined: Wed Feb 06, 2019 10:30 pm

Re: Civil engineering feature implementation (Transportation Engineering)

Postby HakanSeven12 » Tue Jun 02, 2020 1:17 pm

You are welcome :)
User avatar
Joel_graff
Posts: 1754
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Civil engineering feature implementation (Transportation Engineering)

Postby Joel_graff » Tue Jun 02, 2020 1:54 pm

Ok, I removed and readded the submodule locally then pushed to remote.

Hopefully that will fix things.
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