Hi, I have files where objects have Z values, but depending on the situation I usually like to measure the 2D distance. However QCAD seems to only show the 3D distance (plus dX and dY) using the info distance point to point tool.
Is it possible to optionally show the 2D distance, and maybe dZ separately? Thanks!
(OS: any, QCAD version: 3.27.1)
Point to point distance 2D
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: Point to point distance 2D
QCAD has limited possibility's to show Z values at entities within the Property Editor. However - QCAD is a plain 2D program which means it could behave "weird" with 3D drawings. Maybe just test your drawing and see how useful it would be for you ...Anda wrote: ↑Sat Jan 29, 2022 11:35 amHi, I have files where objects have Z values, but depending on the situation I usually like to measure the 2D distance. However QCAD seems to only show the 3D distance (plus dX and dY) using the info distance point to point tool.
Is it possible to optionally show the 2D distance, and maybe dZ separately? Thanks!
Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
Re: Point to point distance 2D
As far as I know there is no option/preference to do so.
Perhaps it may be considered as a feature request:
https://www.ribbonsoft.com/bugtracker/
One could duplicate the drawing in a second tab and 'flatten' that to 2D.
One could script that.
InfoDistancePP.js is open source:
https://github.com/qcad/qcad/blob/maste ... tancePP.js
You could expand the resultMessage with the value from this.point1.getDistanceTo2D(this.point2)
And including dz analog to dx & dy.
A customized script with the same name will supersede the standard one.
Regards,
CVH
Re: Point to point distance 2D
Wow, that's pretty awesome, didn't know that. I did as you suggested, and also added a checkbox to switch between 2D and 3D, seems to work well. Thanks!
(Only downer, did see source code indented with spaces.

I guess something like this makes sense as a general feature, so I'll also create a ticket.
Re: Point to point distance 2D
Anda,
Great, would you consider sharing your scripting endeavor?
https://qcad.org/rsforum/viewforum.php?f=30
- Most QCAD scripts use 4 spaces over tabs.
- Space in the message make it more readable, no?
Regards,
CVH
Great, would you consider sharing your scripting endeavor?
https://qcad.org/rsforum/viewforum.php?f=30
Don't understand exactly what you mean by that.
- Most QCAD scripts use 4 spaces over tabs.
- Space in the message make it more readable, no?
Regards,
CVH
Re: Point to point distance 2D
Ok, did that, but I hope the feature request (https://www.qcad.org/bugtracker/index.p ... sk_id=2337) gets accepted, and a better version of these changes hopefully into the official version.CVH wrote: ↑Sun Jan 30, 2022 1:36 pmGreat, would you consider sharing your scripting endeavor?
https://qcad.org/rsforum/viewforum.php?f=30
That's the point. It was just a bad joke referring to the spaces vs tabs war. (QCAD source seems to be all spaces, which I dislike very much. We shouldn't really get into that.)
Re: Point to point distance 2D
I really don't mind, I even suppose that any kind of space is truncated when reading it.
Have you some ideas in mind?

Regards,
CVH