← Back to team overview

kicad-developers team mailing list archive

Re: common.h To_User_Unit

 

At Tuesday 06 of December 2011 11:25:35 from Lorenzo Marcantonio:
> On Mon, Dec 05, 2011 at 10:59:57AM -0600, Dick Hollenbeck wrote:
> > Well the biu-plan.txt says clearly that the PCBNew internal units are a
> > compile time decision, period.
> > 
> > "internal_unit_value" is a compile time decision, and therefore done away
> > with within PCBNew under that plan.
> 
> The 'problem' is that the common.cpp stuff is compiled alone and then
> linked to *both* pcbnew and eeschema. You could either:
> 
> - Compile twice the common code with different defines/constants
> 
> or
> 
> - Adopt the same bi(l)u for both eeschema and pcbnew
> 
> Anyway I would find a way to completely junk that parameter and
> everything related to it (no usefulness whatsoever). I'd vote for the
> second alternative since in eeschema there is not a lot of dimension
> related stuff (most of it is the sheet handling which is already in
> common)

I think physical lengths in eeschema could also be in nanometres as in pcb, to 
the parameter can be wiped out. But scheme itself is going to be in scalable 
(relative) units, so there could be some changes in eeschema unit handling.

I currently keep two versions of that functions in local repo, one dealing 
with int and one with length class.

Futhermore its code could reduce to trivial "value/user_unit" where user_unit 
is user unit length in internal units so there's no reason to keep this 
function in future.

-- 

--- KeyFP: DC07 D4C3 BB33 E596 CF5E  CEF9 D4E3 B618 65BA 2B61


References