← Back to team overview

kicad-developers team mailing list archive

Re: 3D-Viewer feature proposal: display of the 3D Shapes based on Attributes of the footprint

 

Le 26/02/2016 14:03, Mário Luzeiro a écrit :
> Hello again,
> 
> Could someone clarify this:
> https://github.com/KiCad/kicad-source-mirror/blob/a356293fee05b5a48853a3bb1c0d565f846113e6/pcbnew/class_module.h#L64
>  * Enum MODULE_ATTR_T
>  * is the set of attributes allowed within a MODULE, using MODULE::SetAttributes()
>  * and MODULE::GetAttributes().  These are to be ORed together when calling
>  * MODULE::SetAttributes()
> 
> However, in the options:
> http://docs.kicad-pcb.org/en/pcbnew.html#_attributes
> 
> only an option can be set at one time.
> 
> On the source code I see lots of | (or) with this flags. Example:
> https://github.com/KiCad/kicad-source-mirror/blob/d24bd85bf503f83429acbeb31e34323f901f0873/pcbnew/muonde.cpp#L292
> 
> Could you clarify how it should be interpreted?
> 
> Thanks
> Mario

Attributes are flags which can be ORed (at least they were intended to
be ORed).
However currently, there are only 2 attributes, which are (obviously)
mutually exclusive:
VIRTUAL
MOD_SMD

the "Attribute" NORMAL is in fact no attribute.

in muonde.cpp, you can see VIRTUAL|MOD_SMD like a (minor) bug in a
rather old code.




-- 
Jean-Pierre CHARRAS


References