Gerbview: enhancement: show attributes for polygons (Regions in Gerber dialect)

This commit is contained in:
jean-pierre charras 2019-10-06 17:34:35 +02:00
parent 027658d3da
commit 1a3f4fb38b
2 changed files with 10 additions and 2 deletions

View File

@ -89,8 +89,7 @@ public:
// Lines : m_Size.x = m_Size.y = line width
bool m_Flashed; // True for flashed items
int m_DCode; // DCode used to draw this item.
// 0 for items that do not use DCodes (polygons)
// or when unknown and normal values are 10 to 999
// Allowed values are 10 to 999. 0 when unknown
// values 0 to 9 can be used for special purposes
GERBER_FILE_IMAGE* m_GerberImageFile; /* Gerber file image source of this item
* Note: some params stored in this class are common

View File

@ -619,6 +619,14 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande )
m_Drawings.Append( gbritem );
gbritem->m_Shape = GBR_POLYGON;
gbritem->m_Flashed = false;
tool = GetDCODE( m_Current_Tool );
if( tool )
gbritem->m_DCode = tool->m_Num_Dcode;
if( gbritem->m_GerberImageFile )
gbritem->SetNetAttributes( gbritem->m_GerberImageFile->m_NetAttributeDict );
}
switch( m_Iterpolation )
@ -676,6 +684,7 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande )
m_Exposure = true;
tool = GetDCODE( m_Current_Tool );
if( tool )
{
size = tool->m_Size;