kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #14686
Re: Rename proposal
On 10 September 2014 07:49, Lorenzo Marcantonio
<l.marcantonio@xxxxxxxxxxxx> wrote:
> While inspecting for text module usage, I found a couple of call which
> (for a little) puzzled me :D
>
> IgnoreMTextsOnCopper and IgnoreMTextsOnCmp in the collector 'guide'
> class. At first I tought the first was referring to actual copper layers :P
>
> Then I realized they referred to board sides... wouldn't they better be
> called IgnoreMTextsOnFront and IgnoreMTextsOnBack ?
>
> Also what is their supposed semantic? At the moment since text on
> modules is only on SilkTop the collector simply checks for the module
> side. But the idea is that modules could have text on other layers too,
> possibly on the other side. Is that predicate meant only to act on silk
> text or on other text too?
>
> Just a design decision. In the meantime I'll add them to the list of
> things to inspect to gleam the *actual* usage. Of course the same
> proposal holds for IgnoreModulesOnCu and IgnoreModulesOnCmp (given how
> many board are dual populated it's difficult to tell the copper side
> from the component side...)
Hi Lorenzo,
I think the rename should be done, but I think we should probably end up with:
IgnoreMTextsOnF_Cu
IgnoreMTextsOnB_Cu
because the constants F_Cu and B_Cu are compared when looking for the
layer generally in the same test. For example in collectors.cpp:296
and collectors.cpp:299:
if( m_Guide->IgnoreMTextsOnCopper() && module->GetLayer()==B_Cu )
if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==F_Cu )
Secondly, I think the above tests in the collector should remain true.
If the PCB item is text and it belongs to a module that is placed on
the F_Cu layer we should ignore it if the IgnoreMTextsOnCmp() function
returns true.
More fancy filtering needs a more advanced UI which can filter based
on more information from the user which can control the collector more
precisely.
These functions are actually only used when collecting (enumerating)
pads anyway and is used to disregard all module text items. So the
functionality will break that tool if we change it's meaning to not
ignore all module texts.
Best Regards,
Brian.
Follow ups
References