diff --git a/pcbnew/plugins/altium/altium_parser_pcb.h b/pcbnew/plugins/altium/altium_parser_pcb.h index 53f39db5cc..3ef95fa935 100644 --- a/pcbnew/plugins/altium/altium_parser_pcb.h +++ b/pcbnew/plugins/altium/altium_parser_pcb.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2020 Thomas Pointhuber - * Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2021-2024 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -42,6 +42,9 @@ const uint16_t ALTIUM_COMPONENT_NONE = std::numeric_limits::max(); // this constant specifies a item which does not define a polygon const uint16_t ALTIUM_POLYGON_NONE = std::numeric_limits::max(); +// 65534 seems to be belonging to board outline +const uint16_t ALTIUM_POLYGON_BOARD = std::numeric_limits::max() - 1; + enum class ALTIUM_UNIT { diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp index b3adb4f3f8..c4bf35af1a 100644 --- a/pcbnew/plugins/altium/altium_pcb.cpp +++ b/pcbnew/plugins/altium/altium_pcb.cpp @@ -2457,8 +2457,12 @@ void ALTIUM_PCB::ConvertArcs6ToPcbShape( const AARC6& aElem, PCB_SHAPE* aShape ) void ALTIUM_PCB::ConvertArcs6ToBoardItem( const AARC6& aElem, const int aPrimitiveIndex ) { - if( aElem.is_polygonoutline || aElem.subpolyindex != ALTIUM_POLYGON_NONE ) + if( aElem.is_polygonoutline + || ( aElem.subpolyindex != ALTIUM_POLYGON_NONE + && aElem.subpolyindex != ALTIUM_POLYGON_BOARD ) ) + { return; + } if( aElem.is_keepout || aElem.layer == ALTIUM_LAYER::KEEP_OUT_LAYER || IsAltiumLayerAPlane( aElem.layer ) ) @@ -3156,8 +3160,12 @@ void ALTIUM_PCB::ParseTracks6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFil void ALTIUM_PCB::ConvertTracks6ToBoardItem( const ATRACK6& aElem, const int aPrimitiveIndex ) { - if( aElem.is_polygonoutline || aElem.subpolyindex != ALTIUM_POLYGON_NONE ) + if( aElem.is_polygonoutline + || ( aElem.subpolyindex != ALTIUM_POLYGON_NONE + && aElem.subpolyindex != ALTIUM_POLYGON_BOARD ) ) + { return; + } if( aElem.is_keepout || aElem.layer == ALTIUM_LAYER::KEEP_OUT_LAYER || IsAltiumLayerAPlane( aElem.layer ) )