Altium PCB: support polygon id 65534 for keepout tracks on board outline.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16849
This commit is contained in:
Alex 2024-02-01 12:14:51 +03:00
parent 27112d7988
commit 285067dad1
2 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Thomas Pointhuber <thomas.pointhuber@gmx.at>
* 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<uint16_t>::max();
// this constant specifies a item which does not define a polygon
const uint16_t ALTIUM_POLYGON_NONE = std::numeric_limits<uint16_t>::max();
// 65534 seems to be belonging to board outline
const uint16_t ALTIUM_POLYGON_BOARD = std::numeric_limits<uint16_t>::max() - 1;
enum class ALTIUM_UNIT
{

View File

@ -2449,7 +2449,7 @@ void ALTIUM_PCB::ConvertArcs6ToPcbShape( const AARC6& aElem, PCB_SHAPE* aShape )
void ALTIUM_PCB::ConvertArcs6ToBoardItem( const AARC6& aElem, const int aPrimitiveIndex )
{
if( aElem.polygon != ALTIUM_POLYGON_NONE )
if( aElem.polygon != ALTIUM_POLYGON_NONE && aElem.polygon != ALTIUM_POLYGON_BOARD )
{
if( m_polygons.size() <= aElem.polygon )
{
@ -3183,7 +3183,7 @@ void ALTIUM_PCB::ParseTracks6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFil
void ALTIUM_PCB::ConvertTracks6ToBoardItem( const ATRACK6& aElem, const int aPrimitiveIndex )
{
if( aElem.polygon != ALTIUM_POLYGON_NONE )
if( aElem.polygon != ALTIUM_POLYGON_NONE && aElem.polygon != ALTIUM_POLYGON_BOARD )
{
if( m_polygons.size() <= aElem.polygon )
{