EXPORTER_STEP: handle sub-layers in dielectric layer.
A dielectric layer (between 2 copper layers) can be made by more than one layer (composite dielectric). Not frequent, but possible. sub-layers where previously ignored.
This commit is contained in:
parent
45e67950fd
commit
4766175d60
|
@ -298,7 +298,11 @@ void EXPORTER_STEP::determinePcbThickness()
|
||||||
switch( item->GetType() )
|
switch( item->GetType() )
|
||||||
{
|
{
|
||||||
case BS_ITEM_TYPE_DIELECTRIC:
|
case BS_ITEM_TYPE_DIELECTRIC:
|
||||||
thickness += item->GetThickness();
|
// Dielectric can have sub-layers. Layer 0 is the main layer
|
||||||
|
// Not frequent, but possible
|
||||||
|
for( int idx = 0; idx < item->GetSublayersCount(); idx++ )
|
||||||
|
thickness += item->GetThickness( idx );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BS_ITEM_TYPE_COPPER:
|
case BS_ITEM_TYPE_COPPER:
|
||||||
|
@ -325,6 +329,9 @@ bool EXPORTER_STEP::Export()
|
||||||
|
|
||||||
ReportMessage( _( "Determining PCB data\n" ) );
|
ReportMessage( _( "Determining PCB data\n" ) );
|
||||||
determinePcbThickness();
|
determinePcbThickness();
|
||||||
|
wxString msg;
|
||||||
|
msg.Printf( _( "Board Thickness from stackup: %.3f mm\n" ), m_boardThickness );
|
||||||
|
ReportMessage( msg );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -362,8 +369,6 @@ bool EXPORTER_STEP::Export()
|
||||||
|
|
||||||
if( m_fail || m_error )
|
if( m_fail || m_error )
|
||||||
{
|
{
|
||||||
wxString msg;
|
|
||||||
|
|
||||||
if( m_fail )
|
if( m_fail )
|
||||||
{
|
{
|
||||||
msg = _( "Unable to create STEP file.\n"
|
msg = _( "Unable to create STEP file.\n"
|
||||||
|
|
Loading…
Reference in New Issue