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 »

HakanSeven12 wrote: Tue Jun 04, 2019 1:43 pm Yes my files bearing is ccw from east
Ok. That's a convention I've never encountered before in surveying. I've always understood bearings as being measured CW from north.

The other issue is that it violates the LandXML specification, which states direction values must be expressed from north (though the docs don't dictate a direction...)

In addition, there's no way for me to determine which bearing convention is being used on any given file.
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 Jun 04, 2019 1:55 pm Ok. That's a convention I've never encountered before in surveying. I've always understood bearings as being measured CW from north.

The other issue is that it violates the LandXML specification, which states direction values must be expressed from north (though the docs don't dictate a direction...)

In addition, there's no way for me to determine which bearing convention is being used on any given file.
You can calculate bearing from North manually by using start and end coordonates for line or start and pi coordinates for curves.
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 Jun 04, 2019 3:25 pm You can calculate bearing from North manually by using start and end coordonates for line or start and pi coordinates for curves.
Right - that math is trivial. However, the method I use to validate the geometry means I check the calculated bearing against the supplied bearing (if it exists) as an error check. If there's a difference, then the data is potentially corrupted. So, either the user must supply the bearing angles referenced clockwise from north, or I need a way to know before processing the file that a different definition of bearing is being used...

I'll have to think on that. I assume Civil3D allows you to define bearing however you like?
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 Jun 04, 2019 3:54 pm I assume Civil3D allows you to define bearing however you like?
I don't know. I never used bearing when I create an alignment. But I used your WB before to import alignmets. I don't have any issue about bearing and alignment placed where it should be.
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 Jun 04, 2019 4:07 pm I don't know. I never used bearing when I create an alignment. But I used your WB before to import alignmets. I don't have any issue about bearing and alignment placed where it should be.
See, that's what I thought, which is why I'm so confused... If your bearing is CCW from east, then everything ought to be rotated 90 degrees to the left... or something like that.

Anyway, the issue is finding a consistent definition for line and arc tangent directions. An angle has to be referenced from something... The best I can do is check to make sure that the calculated bearings and the provided direction angles match and, if not, give the user a chance to specify how the angles are referenced. I suspect not using a specific reference for direction angles is probably going to be a common occurrence...
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 Jun 04, 2019 7:08 pm See, that's what I thought, which is why I'm so confused... If your bearing is CCW from east, then everything ought to be rotated 90 degrees to the left... or something like that.
Normally in Turkey, bearing is cw from North but when I look inside the xml it's seems ccw from East. I checked it from my road plan too. Maybe Civil 3d works with ccw from East. I'm not sure it's changeable in options.
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 Jun 04, 2019 9:05 pm Normally in Turkey, bearing is cw from North but when I look inside the xml it's seems ccw from East. I checked it from my road plan too. Maybe Civil 3d works with ccw from East. I'm not sure it's changeable in options.
I don't think there's any other standard for bearing references in surveying, so far as I can tell. Why Civil3D defaults to that, I've no idea. But it presents a problem that I should be able to accommodate.

So, to that end, I have. At least, I've figured out how to investigate a file and determine if the bearing reference is correct or not, and, if it isn't, how to fix it.

But I think I'm going to just force it to be fixed at this point, rather than accommodate another way of referencing a bearing.

Still - it's a good exercise. It makes the importer more robust and able to handle different situations.
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 Jun 04, 2019 9:26 pm I don't think there's any other standard for bearing references in surveying, so far as I can tell. Why Civil3D defaults to that, I've no idea. But it presents a problem that I should be able to accommodate.
I did little search for this. Civil 3d using ccw from East as default. İt's under drawing units settings.

https://knowledge.autodesk.com/support/ ... il-3D.html
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 Jun 05, 2019 7:27 pm I did little search for this. Civil 3d using ccw from East as default. İt's under drawing units settings.
That's odd. Though, CCW from <1,0,0> (east) is standard in a lot of CAD (FreeCAD included)...

Anyway, no matter. I solved it. I can import your files without issue now. But now, my test files are breaking! :lol:

Still, that fix should allow any bearing reference to work - North, South, East, West, CW or CCW.
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 »

Do you think we need to merge workbenches?
Post Reply