Coordinate system conflict

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Coordinate system conflict

AlPal
in LibreCAD, the dares in the coordinate system increase in an an anticlockwise direction, starting at the righthand end of the X-axis. However, when LibreCAD is used to draw up a site plan the angles of boundaries of properties are derived from true north which is conventionally shown on a plan as vertically above the origin and degrees increase in a clockwise direction. There seems to be no way in LibreCAD of converting from one coordinate system to the other. Yet this should be considered a fundamental requirement of a CAD system that is targeted at architecture or planning. Have I missed something?
Reply | Threaded
Open this post in threaded view
|

Re: Coordinate system conflict

dellus
LibreCAD can not switch to a different coordinate system. Only more advanced commercial CAD packages might have this option. LibreCAD is not primarily targeted at architecture or planning, it's origin is more in mechanical engineering.
So you will have to convert yourself.
Maybe this thread gives some clues: https://forum.librecad.org/How-to-plot-a-survey-plan-using-Surveyor-s-Units-in-LibreCAD-tp5720320.html
Reply | Threaded
Open this post in threaded view
|

Re: Coordinate system conflict

AlPal
Thanks, Delius. The thread does go into a little more detail on the issue. However, unfortunately, it doesn't give sufficient information to do the conversion I need. However, I shall search more widely for a conversion algorithm.

I think that your point that LibreCAD is not targeted primarily at architecture or planning applies to most CAD software, whether commercial or open source. However, that doesn't mean that LibreCAD's support for architecture or planning could not be strengthened. It is clear from the number of YouTube videos on the Internet that explain how to use LibreCAD for preparing building plans that there is a significant level of interest in this are or application. i would make the point that most commercial CAD packages are extraordinarily expensive. So, using a commercial package is not an option for private individuals who simply want to draw up plans of their own home.
Reply | Threaded
Open this post in threaded view
|

Re: Coordinate system conflict

LordOfBikes
Administrator
The conversion is no rocket science.
For relative angles simply add a minus to revert the direction, this works in both directions.
30° geographical becomes -30° cartesian and vice versa.

For absolute angles it becomes a bit more work.
To revert the angle use 360° - ANGLE.
To compensate the the rotation add 90°.
This leads to the formula:
 (360° - ANGLE + 90°) MOD 360
Where MOD is for the modulus operation, it gives the division rest and limits the result to be between 0 and 360.
I spreadsheet syntax it should be something like this:
=MOD(360 - A1 + 90; 360)
Where A1 would be the cell reference with the angle to convert.

This formula works for conversions from geographical to cartesian and vice versa too.

Sadly the LibreCAD command line parser doesn't support modulo operator for direct input yet.
Reply | Threaded
Open this post in threaded view
|

Re: Coordinate system conflict

AlPal
Thank you for this very clear explanation, LordOfBikes.

I hav been wondering how difficult it would be to add the ability to switch from geographic tp cartesian systems and visa versa at some stage in the future. It would obviously not be a trivial change. However, it seemed to me that what would be required might be simpler than would seem at first. The changes would concern the values used to plot lines rather than the plotting of lines or even the entry of values used to plot lines. I say this without any knowledge of code base. I just raise it out of curiosity, not because I want to argue for the change.