Write out partial pad-stacks for blind/buried/microvias.
Fixes https://gitlab.com/kicad/code/kicad/issues/11692
This commit is contained in:
parent
2a525cf986
commit
80124d2463
|
@ -89,22 +89,6 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsSMD() const
|
|
||||||
{
|
|
||||||
return m_type == PAD_ATTRIB::SMD;
|
|
||||||
}
|
|
||||||
|
|
||||||
PCB_LAYER_ID GetSMDLayer() const
|
|
||||||
{
|
|
||||||
for( PCB_LAYER_ID l : LSET::AllCuMask().Seq() )
|
|
||||||
{
|
|
||||||
if( m_layers[l] )
|
|
||||||
return l;
|
|
||||||
}
|
|
||||||
|
|
||||||
return F_Cu;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetId( int id )
|
void SetId( int id )
|
||||||
{
|
{
|
||||||
m_id = id;
|
m_id = id;
|
||||||
|
@ -115,21 +99,6 @@ public:
|
||||||
return m_id;
|
return m_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IsSupportedByExporter() const
|
|
||||||
{
|
|
||||||
switch( m_shape )
|
|
||||||
{
|
|
||||||
case PAD_SHAPE::CIRCLE:
|
|
||||||
case PAD_SHAPE::OVAL:
|
|
||||||
case PAD_SHAPE::ROUNDRECT:
|
|
||||||
case PAD_SHAPE::RECT:
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsEmpty() const
|
bool IsEmpty() const
|
||||||
{
|
{
|
||||||
LSET layerMask = LSET::AllCuMask() & m_board->GetEnabledLayers();
|
LSET layerMask = LSET::AllCuMask() & m_board->GetEnabledLayers();
|
||||||
|
@ -184,21 +153,30 @@ private:
|
||||||
switch( aStack.m_shape )
|
switch( aStack.m_shape )
|
||||||
{
|
{
|
||||||
case PAD_SHAPE::CIRCLE:
|
case PAD_SHAPE::CIRCLE:
|
||||||
case PAD_SHAPE::OVAL: shapeId = 0; break;
|
case PAD_SHAPE::OVAL:
|
||||||
case PAD_SHAPE::ROUNDRECT: shapeId = 2; break;
|
|
||||||
case PAD_SHAPE::RECT: shapeId = 1; break;
|
|
||||||
default:
|
|
||||||
shapeId = 0;
|
shapeId = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PAD_SHAPE::ROUNDRECT:
|
||||||
|
shapeId = 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PAD_SHAPE::RECT:
|
||||||
|
shapeId = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
if( m_reporter )
|
if( m_reporter )
|
||||||
{
|
{
|
||||||
m_reporter->Report( _( "File contains pad shapes that are not supported by the "
|
m_reporter->Report( _( "File contains pad shapes that are not supported by the "
|
||||||
"Hyperlynx exporter (supported shapes are oval, rectangle "
|
"Hyperlynx exporter (supported shapes are oval, rectangle, "
|
||||||
"and circle)." ),
|
"rounded rectangle, and circle)." ),
|
||||||
RPT_SEVERITY_WARNING );
|
RPT_SEVERITY_WARNING );
|
||||||
m_reporter->Report( _( "They have been exported as oval pads." ),
|
m_reporter->Report( _( "They have been exported as oval pads." ),
|
||||||
RPT_SEVERITY_INFO );
|
RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shapeId = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +235,7 @@ HYPERLYNX_PAD_STACK::HYPERLYNX_PAD_STACK( BOARD* aBoard, const PCB_VIA* aVia )
|
||||||
m_sx = aVia->GetWidth();
|
m_sx = aVia->GetWidth();
|
||||||
m_sy = aVia->GetWidth();
|
m_sy = aVia->GetWidth();
|
||||||
m_angle = 0;
|
m_angle = 0;
|
||||||
m_layers = LSET::AllCuMask();
|
m_layers = aVia->GetLayerSet();
|
||||||
m_drill = aVia->GetDrillValue();
|
m_drill = aVia->GetDrillValue();
|
||||||
m_shape = PAD_SHAPE::CIRCLE;
|
m_shape = PAD_SHAPE::CIRCLE;
|
||||||
m_type = PAD_ATTRIB::PTH;
|
m_type = PAD_ATTRIB::PTH;
|
||||||
|
@ -496,6 +474,10 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector<BOARD_ITEM*>& aObjec
|
||||||
iu2hyp( track->GetWidth() ),
|
iu2hyp( track->GetWidth() ),
|
||||||
(const char*) layerName.c_str() );
|
(const char*) layerName.c_str() );
|
||||||
}
|
}
|
||||||
|
else if( PCB_ARC* arc = dyn_cast<PCB_ARC*>( item ) )
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
else if( ZONE* zone = dyn_cast<ZONE*>( item ) )
|
else if( ZONE* zone = dyn_cast<ZONE*>( item ) )
|
||||||
{
|
{
|
||||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||||
|
|
Loading…
Reference in New Issue