Great!pvandeneynde wrote: ↑Sat Nov 14, 2020 9:36 am It works indeed as a alpha version.. congrats for the package and happy to dive into its possibilities!
Civil engineering feature implementation (Transportation Engineering)
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
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
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
Hi Joel. I writed a GeoOrigin FPO. It can create a SoGeoOrigin node and edit its properties. You can get it by using this code.
If there is an object funtion returns it. If not, function will create a new object. Vector is optional. If origin.Origin is (0,0,0) it use vector variable as origin. It has two properties.
Also I added folders under it.
Code: Select all
from freecad.trails import geo_origin
origin = geo_origin.get(vector)
Code: Select all
zone = origin.UtmZone
geo_origin = origin.Origin
- Attachments
-
- geoOrigin.png (7.05 KiB) Viewed 1353 times
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Excellent!HakanSeven12 wrote: ↑Tue Nov 17, 2020 11:50 am If there is an object funtion returns it. If not, function will create a new object. Vector is optional. If origin.Origin is (0,0,0) it use vector variable as origin. It has two properties.
I'm still working through some refactoring on my code, so I haven't had a chance to really look at this yet. I'll try to soon, but I just don't know when.
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
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
I think I understand why there is a GeoSeparator node. If your coordinates has same system with your GeoOrigin you dont need it. But if your coordinates has not same system with GeoOrigin you can use GeoSeparator to define another system to scenegraph origin. That gives you to ability of use different coordinate system values in same scenegraph.
For example, you have two point file. First one is utm coordinates, second one is geodetic coordinates. You can create GeoOrigin with utm system for first file and you can use GeoSeparator with geodetic system for second file. Then you can convert your GeoOrigin origin coordinate to geodatic coordinates and use it as GeoSeparator origin coordinate.
That would be very helpful when using multiple coordinate systems in one scenegraph.
For example, you have two point file. First one is utm coordinates, second one is geodetic coordinates. You can create GeoOrigin with utm system for first file and you can use GeoSeparator with geodetic system for second file. Then you can convert your GeoOrigin origin coordinate to geodatic coordinates and use it as GeoSeparator origin coordinate.
That would be very helpful when using multiple coordinate systems in one scenegraph.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
Hi Joel. The xml importer throwing some errors when I try to import any alignment. I can't send the report because I don't have a computer for now. Can you take a look when you have time?
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Re: Civil engineering feature implementation (Transportation Engineering)
Maybe I can help. Tried to import @HakanSeven12 xml-file
"A Kolu Güzergah.xml"
and got probably the same errors
System info:
Edit: removed the "A Kolu Güzergah.xml" attachement
"A Kolu Güzergah.xml"
and got probably the same errors
Code: Select all
22:14:19 Missing Spiral Center coordinate in alignment K1 A Kolu
22:14:19 Missing Spiral Center coordinate in alignment K1 A Kolu
22:14:19 Missing Spiral Center coordinate in alignment K1 A Kolu
22:14:35 Traceback (most recent call last):
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad/trails/design/project/tasks/alignment/import_alignment_task.py", line 74, in accept
result = alignment.create(_v, _v['meta']['ID'] + ' Horiz')
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad/trails/design/alignment/alignment.py", line 70, in create
result.set_geometry(geometry, zero_reference)
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad/trails/design/alignment/alignment.py", line 365, in set_geometry
self.model = alignment_model.AlignmentModel(geometry, zero_reference)
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad/trails/design/alignment/alignment_model.py", line 58, in __init__
if not self.construct_geometry(geometry, zero_reference):
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad/trails/design/alignment/alignment_model.py", line 118, in construct_geometry
self.validate_stationing()
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad/trails/design/alignment/alignment_model.py", line 523, in validate_stationing
TupleMath.subtract(geo_coord, prev_coord))
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad_python_support/tuple_math.py", line 140, in subtract
return TupleMath._operation(op_sub, op1, op2, fail_on_empty)
File "/home/balrobs/.FreeCAD/Mod/Trails/freecad_python_support/tuple_math.py", line 114, in _operation
return tuple(map(op, _op1, _op2))
<class 'TypeError'>: First arg must be Vector
Code: Select all
OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23074 (Git) AppImage
Build type: Release
Branch: master
Hash: 74b866ed3022fd1452c534dae31a721bcc668f2f
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Last edited by balrobs on Thu Jan 07, 2021 1:34 pm, edited 1 time in total.
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
Thanks. Yes that is the error that I talked about.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Re: Civil engineering feature implementation (Transportation Engineering)
Is it possible to install trails on windows without installing git?
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
I didn't test with addon manager. I'm using visual studio code and git assistant to pull all files. But you can manually download repos an put them where they should be.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Re: Civil engineering feature implementation (Transportation Engineering)
Either manually download nor AddOn manager will fetch the submodules.HakanSeven12 wrote: ↑Mon Nov 30, 2020 8:47 am I didn't test with addon manager. I'm using visual studio code and git assistant to pull all files. But you can manually download repos an put them where they should be.