← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Change track width setting to dropbox

 

Hi Wayne,

Wayne Stambaugh <stambaughw@xxxxxxxxx> writes:
> On 8/25/2017 9:51 AM, Maciej Sumiński wrote:
>
> Even better would be to derive an object (EDA_COORDINATE_VALIDATOR?)
> from wxTextValidator or one of it's decedents which can be used by any
> control that allows text editing.  Rather than use a separate static
> text control to display the units, just embed the units in the text
> control itself which can be edited by the user including entering
> coordinates in units other than the current unit type.  Just food for
> thought.
>
>> Regarding inch vs mil, IMHO mils are better suited for PCB design.
>> Still, I would rather keep pcbnew consistent, so I suppose we should
>> stay with inches for the time being.

Hmm, being able to enter units at will sounds useful.

But let me first describe how I imagine the mils thing could work.

A new EDA_UNITS_T value would be introduced, MILS. This would never be
used as the user unit setting of course.

Then text controls where this was deemed appropriate (e.g. track width,
drill diameter) would be marked as "use mils when user unit is inches",
actually the WX_UNIT_BINDERs would be marked I think. The
WX_UNIT_BINDERs could then take care of the mechanics of it.

Optionally a new configuration setting could be introduced, either as a
single flag "use mils" or a new user unit choice "Inches/Mils", to give
users a choice in the matter.


For entering arbitrary units I would leave the static unit label alone,
this would indicate what the unit is for a naked number entered. To
enter a number using a different unit one could then just enter a number
and add a suffix, e.g. "mm", "in" and "mil".

I think the handling of what part of the text in the input field to
select (for efficient replacement by just typing) gets clumsy with the
default unit always being in the input field.


MGri


Follow ups

References