Altium schematic: support custom sheet sizes.
(cherry picked from commit 16062bbe33
)
This commit is contained in:
parent
c11ae8bd02
commit
6ee909b958
|
@ -800,6 +800,11 @@ ASCH_SHEET::ASCH_SHEET( const std::map<wxString, wxString>& aProps )
|
|||
for( int i = 1; i <= fontidcount; i++ )
|
||||
fonts.emplace_back( aProps, i );
|
||||
|
||||
useCustomSheet = ALTIUM_PARSER::ReadBool( aProps, "USECUSTOMSHEET", false );
|
||||
|
||||
customSize = VECTOR2I( ReadKiCadUnitFrac( aProps, "CUSTOMX" ),
|
||||
ReadKiCadUnitFrac( aProps, "CUSTOMY" ) );
|
||||
|
||||
sheetSize = ReadEnum<ASCH_SHEET_SIZE>( aProps, "SHEETSTYLE", 0, 17, ASCH_SHEET_SIZE::A4 );
|
||||
sheetOrientation = ReadEnum<ASCH_SHEET_WORKSPACEORIENTATION>(
|
||||
aProps, "WORKSPACEORIENTATION", 0, 1, ASCH_SHEET_WORKSPACEORIENTATION::LANDSCAPE );
|
||||
|
|
|
@ -773,6 +773,9 @@ struct ASCH_SHEET
|
|||
{
|
||||
std::vector<ASCH_SHEET_FONT> fonts;
|
||||
|
||||
bool useCustomSheet;
|
||||
VECTOR2I customSize;
|
||||
|
||||
ASCH_SHEET_SIZE sheetSize;
|
||||
ASCH_SHEET_WORKSPACEORIENTATION sheetOrientation;
|
||||
|
||||
|
|
|
@ -2788,6 +2788,14 @@ void SCH_ALTIUM_PLUGIN::ParseSheet( const std::map<wxString, wxString>& aPropert
|
|||
|
||||
bool isPortrait = m_altiumSheet->sheetOrientation == ASCH_SHEET_WORKSPACEORIENTATION::PORTRAIT;
|
||||
|
||||
if( m_altiumSheet->useCustomSheet )
|
||||
{
|
||||
PAGE_INFO::SetCustomWidthMils( schIUScale.IUToMils( m_altiumSheet->customSize.x ) );
|
||||
PAGE_INFO::SetCustomHeightMils( schIUScale.IUToMils( m_altiumSheet->customSize.y ) );
|
||||
pageInfo.SetType( PAGE_INFO::Custom, isPortrait );
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( m_altiumSheet->sheetSize )
|
||||
{
|
||||
default:
|
||||
|
@ -2810,6 +2818,7 @@ void SCH_ALTIUM_PLUGIN::ParseSheet( const std::map<wxString, wxString>& aPropert
|
|||
case ASCH_SHEET_SIZE::ORCAD_D: pageInfo.SetType( "D", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_E: pageInfo.SetType( "E", isPortrait ); break;
|
||||
}
|
||||
}
|
||||
|
||||
screen->SetPageSettings( pageInfo );
|
||||
|
||||
|
|
Loading…
Reference in New Issue