← Back to team overview

kicad-developers team mailing list archive

Re: What are dx and dy?

 

I think that the current ruler feature works great. Unfortunately
people don't discover it easily.
There are frequent questions on the user forum that we just answer by
mentioning the space hotkey and how it works.

Here is a patch that could solve this problem:
https://github.com/KiCad/kicad-source-mirror/compare/master...Caerbannog:master.patch
The patch needs improvements to show the current shortcut if "space"
was changed.

The idea is to show a hint about the space shortcut instead of the DX
DY values until the key has been pressed.
There is no disadvantage since the DX and DY values will be redundant
with the X and Y until the key has been pressed.


On Tue, May 10, 2016 at 6:20 PM, Эльдар Хайруллин
<eldar.khayrullin@xxxxxxx> wrote:
> Hello. I think he want to see additional fields with delta_x and delta_y
> (and maybe distance) relative of latest start point of drawing graphic
> primitive (like line) but he doesn't want to reset the user origin.
>
>
> Вторник, 10 мая 2016, 17:25 +03:00 от Wayne Stambaugh
> <stambaughw@xxxxxxxxx>:
>
>
> I don't like the idea of a "smart" origin either. When I set the user
> origin, it's typically to place multiple objects on a given x or y
> coordinate. I don't want kicad thinking it's smarter than I am and
> reset the user origin relative to where I started drawing some object.
> To me that would be more annoying than useful.
>
> On 5/10/2016 10:19 AM, Chris Pavlina wrote:
>> Because that's only useful once in the entire session using pcbnew. Once
>> you've
>> set an origin once you can't use that anymore. What's the point?
>>
>> I quite like the simplicity of the tool as it is. It's a ruler that you
>> can
>> move around. Why do you need a ruler that's smart and picks itself up once
>> in a
>> while? That just seems confusing.
>>
>> On Tue, May 10, 2016 at 08:15:52AM -0600, Duane Johnson wrote:
>>> I can see how this is useful once you know to press space bar. But what
>>> if
>>> it assumes an implicit origin in the following case:
>>> - no explicit origin has been set
>>> - the user is drawing a shape
>>> On May 10, 2016 12:39 AM, "Nick Østergaard" <oe.nick@xxxxxxxxx> wrote:
>>>
>>>> http://docs.kicad-pcb.org/en/pcbnew.html#_displaying_cursor_coordinates
>>>>
>>>> 2016-05-09 22:44 GMT+02:00 Collin Anderson <metacollin@xxxxxxxxxxxx>:
>>>>> Hit space bar, it will set the origin for dx and dy. It's useful for
>>>> seeing where the cursor is relative to the most recent 'origin' set with
>>>> the spacebar. I use it all the time :).
>>>>> --
>>>>> "Violence is the last refuge of the incompetent." - Isaac Asimov
>>>>>
>>>>>> On May 9, 2016, at 2:39 PM, Duane Johnson <duane.johnson@xxxxxxxxx>
>>>> wrote:
>>>>>>
>>>>>> When I create a rectangle, or line, I frequently want to know what the
>>>> size of the rectangle is (width and height). I would have assumed that's
>>>> what "dx" and "dy" in the footer/status bar are for; however, it seems
>>>> like
>>>> in all cases, they simply reflect the same values as "X" and "Y". Am I
>>>> missing something, or is this something to be fixed?
>>>>>>
>>>>>> Thanks,
>>>>>> Duane
>>>>>> <Screenshot 2016-05-09 14
>>>> .37.18.png>_______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
>
> С уважением,
> Эльдар Хайруллин
> eldar.khayrullin@xxxxxxx
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
From c5e03bf091258251b8c82da935e8539945da6f32 Mon Sep 17 00:00:00 2001
From: Martin d'Allens <martin.dallens@xxxxxxxxx>
Date: Wed, 11 May 2016 00:03:14 +0200
Subject: [PATCH] Show hint to use ruler function

---
 pcbnew/basepcbframe.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp
index ff212cc..d33d4ae 100644
--- a/pcbnew/basepcbframe.cpp
+++ b/pcbnew/basepcbframe.cpp
@@ -728,6 +728,12 @@ void PCB_BASE_FRAME::UpdateStatusBar()
 
         // We already decided the formatter above
         line.Printf( locformatter, dXpos, dYpos, hypot( dXpos, dYpos ) );
+        
+        if (screen->m_O_Curseur.x == 0 && screen->m_O_Curseur.y == 0)
+        {
+            // The relative origin has not been set, show a hint instead of repeating the same absolute values.
+            line = wxT( "Press [space] to measure a distance" );
+        }
         SetStatusText( line, 3 );
     }
 }

Follow ups

References