Plot on all layers prep work.

We only need one bottom to top layer sequence definition.

Plot a sequence of layer IDs (LSEQ) in the order of the sequence.

Add helper method to layer set (LSET) to create a sequence of layer IDs
using another sequence for ordering.
This commit is contained in:
Wayne Stambaugh
2022-03-29 16:08:23 -04:00
parent 91ea0903d0
commit c0d8657d97
6 changed files with 68 additions and 89 deletions
+16 -2
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
* Copyright (C) 2014-2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2014-2022 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
@@ -30,7 +30,7 @@
#include <core/arraydim.h>
#include <math/util.h> // for Clamp
#include <layer_ids.h> // for LSET, PCB_LAYER_ID, LSEQ
#include <layer_ids.h> // for LSET, PCB_LAYER_ID, LSEQ
#include <macros.h> // for arrayDim
#include <wx/debug.h> // for wxASSERT, wxASSERT_MSG
#include <wx/string.h>
@@ -442,6 +442,20 @@ LSEQ LSET::Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const
}
LSEQ LSET::Seq( const LSEQ& aSequence ) const
{
LSEQ ret;
for( LSEQ seq = aSequence; seq; ++seq )
{
if( test( *seq ) )
ret.push_back( *seq );
}
return ret;
}
LSEQ LSET::Seq() const
{
LSEQ ret;