← Back to team overview

kicad-developers team mailing list archive

Re: common.h To_User_Unit

 

On Mon, Dec 05, 2011 at 09:09:01AM -0600, Dick Hollenbeck wrote:
> I've read it 5 times, still don't know what this does, mostly since internal_unit_value is
> not documented, and its mere presence is in explicable.

The reason is this:

- eeschema works in mils
- pcbnew works in decimils

so internal_unit_value is *always* 1000 in eeschema and *always* 10000
in pcbnew. It's funny since it usually comes from a global variable and
not from a constant (at least that variable is set only once). Look
for m_InternalUnits ! It also get propagated around in parameters and so
on, too...

I had to work out this during my user typeable unit patch. Didn't ditch
it out since changes were too extensive at the time. Will die horribly
with the new internal unit code, obviously...

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References