Update some classnames including archaic zone names.
This commit is contained in:
parent
fa8c486758
commit
f7333ad64a
|
@ -42,8 +42,8 @@
|
|||
#include <pcb_base_frame.h>
|
||||
#include <pcb_text.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <class_dimension.h>
|
||||
#include <class_zone.h>
|
||||
#include <dimension.h>
|
||||
#include <zone.h>
|
||||
#include <class_module.h>
|
||||
#include <reporter.h>
|
||||
|
||||
|
@ -570,12 +570,12 @@ class BOARD_ADAPTER
|
|||
PCB_LAYER_ID aLayerId,
|
||||
int aClearanceValue );
|
||||
|
||||
void AddShapeWithClearanceToContainer( const DIMENSION *aDimension,
|
||||
void AddShapeWithClearanceToContainer( const DIMENSION_BASE *aDimension,
|
||||
CGENERICCONTAINER2D *aDstContainer,
|
||||
PCB_LAYER_ID aLayerId,
|
||||
int aClearanceValue );
|
||||
|
||||
void AddSolidAreasShapesToContainer( const ZONE_CONTAINER *aZoneContainer,
|
||||
void AddSolidAreasShapesToContainer( const ZONE *aZoneContainer,
|
||||
CGENERICCONTAINER2D *aDstContainer,
|
||||
PCB_LAYER_ID aLayerId );
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <class_pad.h>
|
||||
#include <pcb_text.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <kicad_string.h>
|
||||
#include <fp_text.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
|
@ -130,10 +130,9 @@ void BOARD_ADAPTER::AddShapeWithClearanceToContainer( const PCB_TEXT* aText,
|
|||
}
|
||||
|
||||
|
||||
void BOARD_ADAPTER::AddShapeWithClearanceToContainer( const DIMENSION* aDimension,
|
||||
void BOARD_ADAPTER::AddShapeWithClearanceToContainer( const DIMENSION_BASE* aDimension,
|
||||
CGENERICCONTAINER2D *aDstContainer,
|
||||
PCB_LAYER_ID aLayerId,
|
||||
int aClearanceValue )
|
||||
PCB_LAYER_ID aLayerId, int aClearanceValue )
|
||||
{
|
||||
AddShapeWithClearanceToContainer(&aDimension->Text(), aDstContainer, aLayerId, aClearanceValue);
|
||||
|
||||
|
@ -762,7 +761,7 @@ void BOARD_ADAPTER::AddShapeWithClearanceToContainer( const PCB_SHAPE* aDrawSegm
|
|||
// Based on
|
||||
// TransformSolidAreasShapesToPolygonSet
|
||||
// board_items_to_polygon_shape_transform.cpp
|
||||
void BOARD_ADAPTER::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneContainer,
|
||||
void BOARD_ADAPTER::AddSolidAreasShapesToContainer( const ZONE* aZoneContainer,
|
||||
CGENERICCONTAINER2D *aDstContainer,
|
||||
PCB_LAYER_ID aLayerId )
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <class_pad.h>
|
||||
#include <pcb_text.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
#include <trigo.h>
|
||||
#include <vector>
|
||||
|
@ -653,8 +653,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
AddShapeWithClearanceToContainer( (DIMENSION*) item, layerContainer, curr_layer_id,
|
||||
0 );
|
||||
AddShapeWithClearanceToContainer( (DIMENSION_BASE*) item, layerContainer,
|
||||
curr_layer_id, 0 );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -711,9 +711,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
if( aStatusReporter )
|
||||
aStatusReporter->Report( _( "Create zones" ) );
|
||||
|
||||
std::vector<std::pair<const ZONE_CONTAINER*, PCB_LAYER_ID>> zones;
|
||||
std::vector<std::pair<const ZONE*, PCB_LAYER_ID>> zones;
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
zones.emplace_back( std::make_pair( zone, layer ) );
|
||||
|
@ -733,7 +733,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
areaId < zones.size();
|
||||
areaId = nextZone.fetch_add( 1 ) )
|
||||
{
|
||||
const ZONE_CONTAINER* zone = zones[areaId].first;
|
||||
const ZONE* zone = zones[areaId].first;
|
||||
|
||||
if( zone == nullptr )
|
||||
break;
|
||||
|
@ -761,7 +761,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
&& ( m_render_engine == RENDER_ENGINE::OPENGL_LEGACY ) )
|
||||
{
|
||||
// Add copper zones
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( zone == nullptr )
|
||||
break;
|
||||
|
@ -953,7 +953,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
AddShapeWithClearanceToContainer( (DIMENSION*) item,
|
||||
AddShapeWithClearanceToContainer( (DIMENSION_BASE*) item,
|
||||
layerContainer,
|
||||
curr_layer_id,
|
||||
0 );
|
||||
|
@ -1053,13 +1053,13 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
// Draw non copper zones
|
||||
if( GetFlag( FL_ZONE ) )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( zone->IsOnLayer( curr_layer_id ) )
|
||||
AddSolidAreasShapesToContainer( zone, layerContainer, curr_layer_id );
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( zone->IsOnLayer( curr_layer_id ) )
|
||||
zone->TransformSolidAreasShapesToPolygon( curr_layer_id, *layerPoly );
|
||||
|
|
|
@ -788,9 +788,9 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
|
|||
}
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
{
|
||||
ZONE_CONTAINER* item = dynamic_cast<ZONE_CONTAINER *>( intersectedBoardItem );
|
||||
ZONE* item = dynamic_cast<ZONE*>( intersectedBoardItem );
|
||||
|
||||
if( item )
|
||||
{
|
||||
|
|
|
@ -503,7 +503,7 @@ set( PCB_COMMON_SRCS
|
|||
${CMAKE_SOURCE_DIR}/pcbnew/board_items_to_polygon_shape_transform.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_board.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_board_item.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_dimension.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/dimension.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/pcb_shape.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/fp_shape.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_pcb_group.cpp
|
||||
|
@ -512,12 +512,12 @@ set( PCB_COMMON_SRCS
|
|||
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_pad.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_pcb_target.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/pcb_target.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/pcb_text.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/board_stackup_manager/class_board_stackup.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/fp_text.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_track.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/class_zone.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/zone.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/collectors.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_algo.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_items.cpp
|
||||
|
|
|
@ -264,6 +264,7 @@ static struct EDA_ITEM_DESC
|
|||
.Map( PCB_TEXT_T, _HKI( "Board Text" ) )
|
||||
.Map( PCB_FP_TEXT_T, _HKI( "Footprint Text" ) )
|
||||
.Map( PCB_FP_SHAPE_T, _HKI( "Graphic Shape" ) )
|
||||
.Map( PCB_FP_ZONE_T, _HKI( "Zone" ) )
|
||||
.Map( PCB_TRACE_T, _HKI( "Track" ) )
|
||||
.Map( PCB_VIA_T, _HKI( "Via" ) )
|
||||
.Map( PCB_MARKER_T, _HKI( "Board Marker" ) )
|
||||
|
@ -272,7 +273,7 @@ static struct EDA_ITEM_DESC
|
|||
.Map( PCB_DIM_CENTER_T, _HKI( "Center Dimension" ) )
|
||||
.Map( PCB_DIM_LEADER_T, _HKI( "Leader" ) )
|
||||
.Map( PCB_TARGET_T, _HKI( "Target" ) )
|
||||
.Map( PCB_ZONE_AREA_T, _HKI( "Zone" ) )
|
||||
.Map( PCB_ZONE_T, _HKI( "Zone" ) )
|
||||
.Map( PCB_ITEM_LIST_T, _HKI( "Item List" ) )
|
||||
.Map( PCB_NETINFO_T, _HKI( "Net Info" ) )
|
||||
.Map( PCB_GROUP_T, _HKI( "Group" ) )
|
||||
|
|
|
@ -207,7 +207,7 @@ struct TEXT_ITEM_INFO
|
|||
// forward declaration from class_track.h
|
||||
enum class VIATYPE : int;
|
||||
|
||||
// forward declarations from class_dimension.h
|
||||
// forward declarations from dimension.h
|
||||
enum class DIM_UNITS_FORMAT : int;
|
||||
enum class DIM_TEXT_POSITION : int;
|
||||
enum class DIM_UNITS_MODE : int;
|
||||
|
|
|
@ -92,18 +92,18 @@ enum KICAD_T
|
|||
PCB_TEXT_T, ///< class PCB_TEXT, text on a layer
|
||||
PCB_FP_TEXT_T, ///< class FP_TEXT, text in a footprint
|
||||
PCB_FP_SHAPE_T, ///< class FP_SHAPE, a footprint edge
|
||||
PCB_FP_ZONE_AREA_T, ///< class ZONE_CONTAINER, managed by a footprint
|
||||
PCB_FP_ZONE_T, ///< class ZONE, managed by a footprint
|
||||
PCB_TRACE_T, ///< class TRACK, a track segment (segment on a copper layer)
|
||||
PCB_VIA_T, ///< class VIA, a via (like a track segment on a copper layer)
|
||||
PCB_ARC_T, ///< class ARC, an arc track segment on a copper layer
|
||||
PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something
|
||||
PCB_DIMENSION_T, ///< class DIMENSION: abstract dimension meta-type
|
||||
PCB_DIMENSION_T, ///< class DIMENSION_BASE: abstract dimension meta-type
|
||||
PCB_DIM_ALIGNED_T, ///< class ALIGNED_DIMENSION, a linear dimension (graphic item)
|
||||
PCB_DIM_LEADER_T, ///< class LEADER, a leader dimension (graphic item)
|
||||
PCB_DIM_CENTER_T, ///< class CENTER_DIMENSION, a center point marking (graphic item)
|
||||
PCB_DIM_ORTHOGONAL_T, ///< class ORTHOGONAL_DIMENSION, a linear dimension constrained to x/y
|
||||
PCB_TARGET_T, ///< class PCB_TARGET, a target (graphic item)
|
||||
PCB_ZONE_AREA_T, ///< class ZONE_CONTAINER, a zone area
|
||||
PCB_ZONE_T, ///< class ZONE, a copper pour area
|
||||
PCB_ITEM_LIST_T, ///< class BOARD_ITEM_LIST, a list of board items
|
||||
PCB_NETINFO_T, ///< class NETINFO_ITEM, a description of a net
|
||||
PCB_GROUP_T, ///< class PCB_GROUP, a set of BOARD_ITEMs
|
||||
|
|
|
@ -111,7 +111,7 @@ void ARRAY_CREATOR::Invoke()
|
|||
case PCB_SHAPE_T:
|
||||
case PCB_TRACE_T:
|
||||
case PCB_VIA_T:
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
case PCB_TARGET_T:
|
||||
case PCB_DIM_ALIGNED_T:
|
||||
case PCB_DIM_CENTER_T:
|
||||
|
|
|
@ -150,7 +150,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
|
|||
}
|
||||
else if( boardItem->Type() == PCB_FP_TEXT_T ||
|
||||
boardItem->Type() == PCB_FP_SHAPE_T ||
|
||||
boardItem->Type() == PCB_FP_ZONE_AREA_T )
|
||||
boardItem->Type() == PCB_FP_ZONE_T )
|
||||
{
|
||||
wxASSERT( boardItem->GetParent() &&
|
||||
boardItem->GetParent()->Type() == PCB_MODULE_T );
|
||||
|
@ -187,7 +187,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
|
|||
case PCB_PAD_T:
|
||||
case PCB_FP_SHAPE_T:
|
||||
case PCB_FP_TEXT_T:
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
// This level can only handle module items when editing footprints
|
||||
wxASSERT( m_isFootprintEditor );
|
||||
|
||||
|
@ -223,7 +223,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
|
|||
case PCB_DIM_LEADER_T: // a leader dimension
|
||||
case PCB_TARGET_T: // a target (graphic item)
|
||||
case PCB_MARKER_T: // a marker used to show something
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
view->Remove( boardItem );
|
||||
|
||||
if( !( changeFlags & CHT_DONE ) )
|
||||
|
@ -369,10 +369,10 @@ EDA_ITEM* BOARD_COMMIT::parentObject( EDA_ITEM* aItem ) const
|
|||
case PCB_PAD_T:
|
||||
case PCB_FP_SHAPE_T:
|
||||
case PCB_FP_TEXT_T:
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
return aItem->GetParent();
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
wxASSERT( !dynamic_cast<MODULE*>( aItem->GetParent() ) );
|
||||
return aItem;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
case PCB_TRACE_T:
|
||||
case PCB_ARC_T:
|
||||
case PCB_VIA_T:
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <class_track.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <kiface_i.h>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <kicad_string.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <class_module.h>
|
||||
#include <fp_shape.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
|
@ -88,7 +88,7 @@ void BOARD::ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_
|
|||
}
|
||||
|
||||
// convert copper zones
|
||||
for( ZONE_CONTAINER* zone : Zones() )
|
||||
for( ZONE* zone : Zones() )
|
||||
{
|
||||
if( zone->GetLayerSet().test( aLayer ) )
|
||||
zone->TransformSolidAreasShapesToPolygon( aLayer, aOutlines );
|
||||
|
@ -283,9 +283,8 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet( SHAPE_POLY_SET& aC
|
|||
}
|
||||
|
||||
|
||||
void ZONE_CONTAINER::TransformSolidAreasShapesToPolygon( PCB_LAYER_ID aLayer,
|
||||
SHAPE_POLY_SET& aCornerBuffer,
|
||||
int aError ) const
|
||||
void ZONE::TransformSolidAreasShapesToPolygon( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aCornerBuffer,
|
||||
int aError ) const
|
||||
{
|
||||
if( !m_FilledPolysList.count( aLayer ) || m_FilledPolysList.at( aLayer ).IsEmpty() )
|
||||
return;
|
||||
|
@ -711,10 +710,9 @@ bool D_PAD::TransformHoleWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
}
|
||||
|
||||
|
||||
void ZONE_CONTAINER::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
||||
PCB_LAYER_ID aLayer, int aClearance,
|
||||
int aError, ERROR_LOC aErrorLoc,
|
||||
bool ignoreLineWidth ) const
|
||||
void ZONE::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
||||
PCB_LAYER_ID aLayer, int aClearance, int aError,
|
||||
ERROR_LOC aErrorLoc, bool ignoreLineWidth ) const
|
||||
{
|
||||
wxASSERT_MSG( !ignoreLineWidth, "IgnoreLineWidth has no meaning for zones." );
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <connectivity/connectivity_data.h>
|
||||
#include <kicad_string.h>
|
||||
|
@ -102,7 +102,7 @@ BOARD::~BOARD()
|
|||
// Clean up the owned elements
|
||||
DeleteMARKERs();
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_zones )
|
||||
for( ZONE* zone : m_zones )
|
||||
delete zone;
|
||||
|
||||
m_zones.clear();
|
||||
|
@ -251,8 +251,10 @@ void BOARD::Move( const wxPoint& aMoveVector ) // overload
|
|||
PCB_ARC_T,
|
||||
// PCB_PAD_T, Can't be at board level
|
||||
// PCB_FP_TEXT_T, Can't be at board level
|
||||
// PCB_FP_SHAPE_T, Can't be at board level
|
||||
// PCB_FP_ZONE_T, Can't be at board level
|
||||
PCB_MODULE_T,
|
||||
PCB_ZONE_AREA_T,
|
||||
PCB_ZONE_T,
|
||||
EOT
|
||||
};
|
||||
|
||||
|
@ -518,7 +520,7 @@ void BOARD::SetElementVisibility( GAL_LAYER_ID aLayer, bool isEnabled )
|
|||
pad->SetLocalRatsnestVisible( isEnabled );
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : Zones() )
|
||||
for( ZONE* zone : Zones() )
|
||||
zone->SetLocalRatsnestVisible( isEnabled );
|
||||
|
||||
break;
|
||||
|
@ -572,8 +574,8 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode )
|
|||
break;
|
||||
|
||||
// this one uses a vector
|
||||
case PCB_ZONE_AREA_T:
|
||||
m_zones.push_back( (ZONE_CONTAINER*) aBoardItem );
|
||||
case PCB_ZONE_T:
|
||||
m_zones.push_back( (ZONE*) aBoardItem );
|
||||
break;
|
||||
|
||||
case PCB_TRACE_T:
|
||||
|
@ -666,7 +668,7 @@ void BOARD::Remove( BOARD_ITEM* aBoardItem )
|
|||
} ) );
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
m_zones.erase( std::remove_if( m_zones.begin(), m_zones.end(),
|
||||
[aBoardItem]( BOARD_ITEM* aItem )
|
||||
{
|
||||
|
@ -802,7 +804,7 @@ BOARD_ITEM* BOARD::GetItem( const KIID& aID ) const
|
|||
}
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : Zones() )
|
||||
for( ZONE* zone : Zones() )
|
||||
{
|
||||
if( zone->m_Uuid == aID )
|
||||
return zone;
|
||||
|
@ -856,7 +858,7 @@ void BOARD::FillItemMap( std::map<KIID, EDA_ITEM*>& aMap )
|
|||
aMap[ drawing->m_Uuid ] = drawing;
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : Zones() )
|
||||
for( ZONE* zone : Zones() )
|
||||
aMap[ zone->m_Uuid ] = zone;
|
||||
|
||||
for( BOARD_ITEM* drawing : Drawings() )
|
||||
|
@ -1039,7 +1041,7 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const
|
|||
}
|
||||
|
||||
// Check zones
|
||||
for( ZONE_CONTAINER* aZone : m_zones )
|
||||
for( ZONE* aZone : m_zones )
|
||||
{
|
||||
if( ( aZone->GetLayerSet() & visible ).any() )
|
||||
area.Merge( aZone->GetBoundingBox() );
|
||||
|
@ -1118,7 +1120,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T s
|
|||
case PCB_PAD_T:
|
||||
case PCB_FP_TEXT_T:
|
||||
case PCB_FP_SHAPE_T:
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
|
||||
// this calls MODULE::Visit() on each module.
|
||||
result = IterateForward<MODULE*>( m_modules, inspector, testData, p );
|
||||
|
@ -1132,7 +1134,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T s
|
|||
case PCB_PAD_T:
|
||||
case PCB_FP_TEXT_T:
|
||||
case PCB_FP_SHAPE_T:
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
continue;
|
||||
|
||||
default:
|
||||
|
@ -1199,8 +1201,8 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T s
|
|||
++p;
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
for( ZONE_CONTAINER* zone : m_zones)
|
||||
case PCB_ZONE_T:
|
||||
for( ZONE* zone : m_zones)
|
||||
{
|
||||
result = zone->Visit( inspector, testData, p );
|
||||
|
||||
|
@ -1411,7 +1413,7 @@ int BOARD::SetAreasNetCodesFromNetNames()
|
|||
{
|
||||
int error_count = 0;
|
||||
|
||||
for( ZONE_CONTAINER* zone : Zones() )
|
||||
for( ZONE* zone : Zones() )
|
||||
{
|
||||
if( !zone->IsOnCopperLayer() )
|
||||
{
|
||||
|
@ -1729,18 +1731,18 @@ MODULE* BOARD::GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer
|
|||
}
|
||||
|
||||
|
||||
std::list<ZONE_CONTAINER*> BOARD::GetZoneList( bool aIncludeZonesInFootprints )
|
||||
std::list<ZONE*> BOARD::GetZoneList( bool aIncludeZonesInFootprints )
|
||||
{
|
||||
std::list<ZONE_CONTAINER*> zones;
|
||||
std::list<ZONE*> zones;
|
||||
|
||||
for( ZONE_CONTAINER* zone : Zones() )
|
||||
for( ZONE* zone : Zones() )
|
||||
zones.push_back( zone );
|
||||
|
||||
if( aIncludeZonesInFootprints )
|
||||
{
|
||||
for( MODULE* footprint : m_modules )
|
||||
{
|
||||
for( MODULE_ZONE_CONTAINER* zone : footprint->Zones() )
|
||||
for( FP_ZONE* zone : footprint->Zones() )
|
||||
zones.push_back( zone );
|
||||
}
|
||||
}
|
||||
|
@ -1749,10 +1751,10 @@ std::list<ZONE_CONTAINER*> BOARD::GetZoneList( bool aIncludeZonesInFootprints )
|
|||
}
|
||||
|
||||
|
||||
ZONE_CONTAINER* BOARD::AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
|
||||
wxPoint aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch )
|
||||
ZONE* BOARD::AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
|
||||
wxPoint aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch )
|
||||
{
|
||||
ZONE_CONTAINER* new_area = new ZONE_CONTAINER( this );
|
||||
ZONE* new_area = new ZONE( this );
|
||||
|
||||
new_area->SetNetCode( aNetcode );
|
||||
new_area->SetLayer( aLayer );
|
||||
|
@ -1774,28 +1776,28 @@ ZONE_CONTAINER* BOARD::AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode,
|
|||
}
|
||||
|
||||
|
||||
void BOARD::RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove )
|
||||
void BOARD::RemoveZone( PICKED_ITEMS_LIST* aDeletedList, ZONE* aZone )
|
||||
{
|
||||
if( area_to_remove == NULL )
|
||||
if( aZone == NULL )
|
||||
return;
|
||||
|
||||
if( aDeletedList )
|
||||
{
|
||||
ITEM_PICKER picker( nullptr, area_to_remove, UNDO_REDO::DELETED );
|
||||
ITEM_PICKER picker( nullptr, aZone, UNDO_REDO::DELETED );
|
||||
aDeletedList->PushItem( picker );
|
||||
Remove( area_to_remove ); // remove from zone list, but does not delete it
|
||||
Remove( aZone ); // remove from zone list, but does not delete it
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete( area_to_remove );
|
||||
Delete( aZone );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool BOARD::NormalizeAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ZONE_CONTAINER* aCurrArea )
|
||||
bool BOARD::NormalizeAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ZONE* aCurrArea )
|
||||
{
|
||||
// mark all areas as unmodified except this one, if modified
|
||||
for( ZONE_CONTAINER* zone : m_zones )
|
||||
for( ZONE* zone : m_zones )
|
||||
zone->SetLocalFlags( 0 );
|
||||
|
||||
aCurrArea->SetLocalFlags( 1 );
|
||||
|
@ -1810,7 +1812,7 @@ bool BOARD::NormalizeAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ZONE_CONTAI
|
|||
// If clipping has created some polygons, we must add these new copper areas.
|
||||
if( n_poly > 1 )
|
||||
{
|
||||
ZONE_CONTAINER* NewArea;
|
||||
ZONE* NewArea;
|
||||
|
||||
// Move the newly created polygons to new areas, removing them from the current area
|
||||
for( int ip = 1; ip < n_poly; ip++ )
|
||||
|
@ -1892,7 +1894,7 @@ const std::vector<BOARD_CONNECTED_ITEM*> BOARD::AllConnectedItems()
|
|||
items.push_back( pad );
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : Zones() )
|
||||
for( ZONE* zone : Zones() )
|
||||
items.push_back( zone );
|
||||
|
||||
return items;
|
||||
|
|
|
@ -41,7 +41,7 @@ class PCB_BASE_FRAME;
|
|||
class PCB_EDIT_FRAME;
|
||||
class PICKED_ITEMS_LIST;
|
||||
class BOARD;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class TRACK;
|
||||
class D_PAD;
|
||||
class MARKER_PCB;
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
|
||||
|
||||
DECL_VEC_FOR_SWIG( MARKERS, MARKER_PCB* )
|
||||
DECL_VEC_FOR_SWIG( ZONE_CONTAINERS, ZONE_CONTAINER* )
|
||||
DECL_VEC_FOR_SWIG( ZONES, ZONE* )
|
||||
DECL_DEQ_FOR_SWIG( TRACKS, TRACK* )
|
||||
// Dequeue rather than Vector just so we can use moveUnflaggedItems in pcbnew_control.cpp
|
||||
DECL_DEQ_FOR_SWIG( GROUPS, PCB_GROUP* )
|
||||
|
@ -189,31 +189,31 @@ class BOARD : public BOARD_ITEM_CONTAINER
|
|||
|
||||
private:
|
||||
/// What is this board being used for
|
||||
BOARD_USE m_boardUse;
|
||||
BOARD_USE m_boardUse;
|
||||
|
||||
wxString m_fileName;
|
||||
MARKERS m_markers;
|
||||
DRAWINGS m_drawings;
|
||||
MODULES m_modules;
|
||||
TRACKS m_tracks;
|
||||
GROUPS m_groups;
|
||||
ZONE_CONTAINERS m_zones;
|
||||
wxString m_fileName;
|
||||
MARKERS m_markers;
|
||||
DRAWINGS m_drawings;
|
||||
MODULES m_modules;
|
||||
TRACKS m_tracks;
|
||||
GROUPS m_groups;
|
||||
ZONES m_zones;
|
||||
|
||||
LAYER m_Layer[PCB_LAYER_ID_COUNT];
|
||||
LAYER m_Layer[PCB_LAYER_ID_COUNT];
|
||||
|
||||
// if true m_highLight_NetCode is used
|
||||
HIGH_LIGHT_INFO m_highLight; // current high light data
|
||||
HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
|
||||
HIGH_LIGHT_INFO m_highLight; // current high light data
|
||||
HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
|
||||
|
||||
int m_fileFormatVersionAtLoad; // the version loaded from the file
|
||||
int m_fileFormatVersionAtLoad; // the version loaded from the file
|
||||
|
||||
std::map<wxString, wxString> m_properties;
|
||||
std::shared_ptr<CONNECTIVITY_DATA> m_connectivity;
|
||||
|
||||
PAGE_INFO m_paper;
|
||||
TITLE_BLOCK m_titles; // text in lower right of screen and plots
|
||||
PCB_PLOT_PARAMS m_plotOptions;
|
||||
PROJECT* m_project; // project this board is a part of
|
||||
PAGE_INFO m_paper;
|
||||
TITLE_BLOCK m_titles; // text in lower right of screen and plots
|
||||
PCB_PLOT_PARAMS m_plotOptions;
|
||||
PROJECT* m_project; // project this board is a part of
|
||||
|
||||
/**
|
||||
* All of the board design settings are stored as a JSON object inside the project file. The
|
||||
|
@ -227,7 +227,7 @@ private:
|
|||
*/
|
||||
std::unique_ptr<BOARD_DESIGN_SETTINGS> m_designSettings;
|
||||
|
||||
NETINFO_LIST m_NetInfo; // net info list (name, design constraints ..
|
||||
NETINFO_LIST m_NetInfo; // net info list (name, design constraints ..
|
||||
|
||||
std::vector<BOARD_LISTENER*> m_listeners;
|
||||
|
||||
|
@ -287,8 +287,8 @@ public:
|
|||
DRAWINGS& Drawings() { return m_drawings; }
|
||||
const DRAWINGS& Drawings() const { return m_drawings; }
|
||||
|
||||
ZONE_CONTAINERS& Zones() { return m_zones; }
|
||||
const ZONE_CONTAINERS& Zones() const { return m_zones; }
|
||||
ZONES& Zones() { return m_zones; }
|
||||
const ZONES& Zones() const { return m_zones; }
|
||||
|
||||
MARKERS& Markers() { return m_markers; }
|
||||
|
||||
|
@ -877,10 +877,10 @@ public:
|
|||
/**
|
||||
* Return the Area (Zone Container) at a given index.
|
||||
*
|
||||
* @param index The array type index into a collection of ZONE_CONTAINER *.
|
||||
* @return ZONE_CONTAINER* - a pointer to the Area or NULL if index out of range.
|
||||
* @param index The array type index into a collection of ZONE *.
|
||||
* @return ZONE* - a pointer to the Area or NULL if index out of range.
|
||||
*/
|
||||
ZONE_CONTAINER* GetArea( int index ) const
|
||||
ZONE* GetArea( int index ) const
|
||||
{
|
||||
if( (unsigned) index < m_zones.size() )
|
||||
return m_zones[index];
|
||||
|
@ -891,10 +891,10 @@ public:
|
|||
/**
|
||||
* @return a std::list of pointers to all board zones (possibly including zones in footprints)
|
||||
*/
|
||||
std::list<ZONE_CONTAINER*> GetZoneList( bool aIncludeZonesInFootprints = false );
|
||||
std::list<ZONE*> GetZoneList( bool aIncludeZonesInFootprints = false );
|
||||
|
||||
/**
|
||||
* @return The number of Areas or ZONE_CONTAINER.
|
||||
* @return The number of copper pour areas or ZONEs.
|
||||
*/
|
||||
int GetAreaCount() const
|
||||
{
|
||||
|
@ -914,8 +914,8 @@ public:
|
|||
* @param aHatch = hatch option
|
||||
* @return a reference to the new area
|
||||
*/
|
||||
ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
|
||||
wxPoint aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch );
|
||||
ZONE* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer,
|
||||
wxPoint aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch );
|
||||
|
||||
/**
|
||||
* Process an area that has been modified, by normalizing its polygon against itself.
|
||||
|
@ -925,7 +925,7 @@ public:
|
|||
* @param aCurrArea = the zone to process
|
||||
* @return true if changes are made
|
||||
*/
|
||||
bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
|
||||
bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE* aCurrArea );
|
||||
|
||||
/**
|
||||
* Process an area that has been modified, by normalizing its polygon
|
||||
|
@ -936,8 +936,7 @@ public:
|
|||
* @param modified_area = area to test
|
||||
* @return true if some areas modified
|
||||
*/
|
||||
bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
|
||||
ZONE_CONTAINER* modified_area );
|
||||
bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList, ZONE* modified_area );
|
||||
|
||||
/**
|
||||
* Check all copper areas in net for intersections, combining them if found.
|
||||
|
@ -949,7 +948,7 @@ public:
|
|||
* Sets local flag = 1 for any areas modified
|
||||
* @return true if some areas modified
|
||||
*/
|
||||
bool CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList,
|
||||
bool CombineAllZonesInNet( PICKED_ITEMS_LIST* aDeletedList,
|
||||
int aNetCode,
|
||||
bool aUseLocalFlags );
|
||||
|
||||
|
@ -958,37 +957,33 @@ public:
|
|||
*
|
||||
* @param aDeletedList = a PICKED_ITEMS_LIST * where to store deleted areas (useful
|
||||
* in undo commands can be NULL
|
||||
* @param area_to_remove = area to delete or put in deleted list
|
||||
* @param aZone = area to delete or put in deleted list
|
||||
*/
|
||||
void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
|
||||
void RemoveZone( PICKED_ITEMS_LIST* aDeletedList, ZONE* aZone );
|
||||
|
||||
/**
|
||||
* Check for intersection of a given copper area with other areas in same net
|
||||
* @param area_to_test = area to compare to all other areas in the same net
|
||||
* @param aZone = area to compare to all other areas in the same net
|
||||
*/
|
||||
bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
|
||||
bool TestZoneIntersections( ZONE* aZone );
|
||||
|
||||
/**
|
||||
* Test for intersection of 2 copper areas
|
||||
* @param area_ref = area reference
|
||||
* @param area_to_test = area to compare for intersection calculations
|
||||
* @param aZone1 = area reference
|
||||
* @param aZone2 = area to compare for intersection calculations
|
||||
* @return : false if no intersection, true if intersection
|
||||
*/
|
||||
bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
|
||||
bool TestZoneIntersection( ZONE* aZone1, ZONE* aZone2 );
|
||||
|
||||
/**
|
||||
* If possible, combine 2 copper areas
|
||||
* @param aDeletedList = a PICKED_ITEMS_LIST * where to store deleted areas
|
||||
* (useful for undo).
|
||||
* @param area_ref = the main area (zone)
|
||||
* @param area_to_combine = the zone that can be merged with area_ref
|
||||
* area_ref must be BEFORE area_to_combine
|
||||
* area_to_combine will be deleted, if areas are combined
|
||||
* @return : true if area_to_combine is combined with area_ref (and therefore be deleted)
|
||||
* @param aDeletedList = a PICKED_ITEMS_LIST * where to store deleted areas (for undo).
|
||||
* @param aRefZone = the main area (zone)
|
||||
* @param aZoneToCombine = the zone that can be merged with aRefZone; will be deleted if the
|
||||
* combine is successful
|
||||
* @return : true if aZoneToCombine is combined with aRefZone (and therefore be deleted)
|
||||
*/
|
||||
bool CombineAreas( PICKED_ITEMS_LIST* aDeletedList,
|
||||
ZONE_CONTAINER* area_ref,
|
||||
ZONE_CONTAINER* area_to_combine );
|
||||
bool CombineZones( PICKED_ITEMS_LIST* aDeletedList, ZONE* aRefZone, ZONE* aZoneToCombine );
|
||||
|
||||
/**
|
||||
* Find a pad \a aPosition on \a aLayer.
|
||||
|
|
|
@ -107,9 +107,9 @@ MODULE::MODULE( const MODULE& aFootprint ) :
|
|||
}
|
||||
|
||||
// Copy zones
|
||||
for( MODULE_ZONE_CONTAINER* zone : aFootprint.Zones() )
|
||||
for( FP_ZONE* zone : aFootprint.Zones() )
|
||||
{
|
||||
MODULE_ZONE_CONTAINER* newZone = static_cast<MODULE_ZONE_CONTAINER*>( zone->Clone() );
|
||||
FP_ZONE* newZone = static_cast<FP_ZONE*>( zone->Clone() );
|
||||
ptrMap[ zone ] = newZone;
|
||||
Add( newZone );
|
||||
|
||||
|
@ -183,7 +183,7 @@ MODULE::~MODULE()
|
|||
|
||||
m_pads.clear();
|
||||
|
||||
for( MODULE_ZONE_CONTAINER* zone : m_fp_zones )
|
||||
for( FP_ZONE* zone : m_fp_zones )
|
||||
delete zone;
|
||||
|
||||
m_fp_zones.clear();
|
||||
|
@ -242,7 +242,7 @@ MODULE& MODULE::operator=( MODULE&& aOther )
|
|||
// Move the zones
|
||||
m_fp_zones.clear();
|
||||
|
||||
for( MODULE_ZONE_CONTAINER* item : aOther.Zones() )
|
||||
for( FP_ZONE* item : aOther.Zones() )
|
||||
{
|
||||
Add( item );
|
||||
|
||||
|
@ -340,9 +340,9 @@ MODULE& MODULE::operator=( const MODULE& aOther )
|
|||
// Copy zones
|
||||
m_fp_zones.clear();
|
||||
|
||||
for( MODULE_ZONE_CONTAINER* zone : aOther.Zones() )
|
||||
for( FP_ZONE* zone : aOther.Zones() )
|
||||
{
|
||||
MODULE_ZONE_CONTAINER* newZone = static_cast<MODULE_ZONE_CONTAINER*>( zone->Clone() );
|
||||
FP_ZONE* newZone = static_cast<FP_ZONE*>( zone->Clone() );
|
||||
ptrMap[ zone ] = newZone;
|
||||
Add( newZone );
|
||||
|
||||
|
@ -461,11 +461,11 @@ void MODULE::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode )
|
|||
m_pads.push_front( static_cast<D_PAD*>( aBoardItem ) );
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
if( aMode == ADD_MODE::APPEND )
|
||||
m_fp_zones.push_back( static_cast<MODULE_ZONE_CONTAINER*>( aBoardItem ) );
|
||||
m_fp_zones.push_back( static_cast<FP_ZONE*>( aBoardItem ) );
|
||||
else
|
||||
m_fp_zones.insert( m_fp_zones.begin(), static_cast<MODULE_ZONE_CONTAINER*>( aBoardItem ) );
|
||||
m_fp_zones.insert( m_fp_zones.begin(), static_cast<FP_ZONE*>( aBoardItem ) );
|
||||
break;
|
||||
|
||||
case PCB_GROUP_T:
|
||||
|
@ -526,10 +526,10 @@ void MODULE::Remove( BOARD_ITEM* aBoardItem )
|
|||
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
for( auto it = m_fp_zones.begin(); it != m_fp_zones.end(); ++it )
|
||||
{
|
||||
if( *it == static_cast<MODULE_ZONE_CONTAINER*>( aBoardItem ) )
|
||||
if( *it == static_cast<FP_ZONE*>( aBoardItem ) )
|
||||
{
|
||||
m_fp_zones.erase( it );
|
||||
break;
|
||||
|
@ -592,7 +592,7 @@ EDA_RECT MODULE::GetFootprintRect() const
|
|||
for( D_PAD* pad : m_pads )
|
||||
area.Merge( pad->GetBoundingBox() );
|
||||
|
||||
for( MODULE_ZONE_CONTAINER* zone : m_fp_zones )
|
||||
for( FP_ZONE* zone : m_fp_zones )
|
||||
area.Merge( zone->GetBoundingBox() );
|
||||
|
||||
// Groups do not contribute to the rect, only their members
|
||||
|
@ -823,7 +823,7 @@ bool MODULE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) co
|
|||
return true;
|
||||
}
|
||||
|
||||
for( MODULE_ZONE_CONTAINER* zone : m_fp_zones )
|
||||
for( FP_ZONE* zone : m_fp_zones )
|
||||
{
|
||||
if( zone->HitTest( arect, false, 0 ) )
|
||||
return true;
|
||||
|
@ -982,8 +982,8 @@ SEARCH_RESULT MODULE::Visit( INSPECTOR inspector, void* testData, const KICAD_T
|
|||
++p;
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
result = IterateForward<MODULE_ZONE_CONTAINER*>( m_fp_zones, inspector, testData, p );
|
||||
case PCB_FP_ZONE_T:
|
||||
result = IterateForward<FP_ZONE*>( m_fp_zones, inspector, testData, p );
|
||||
++p;
|
||||
break;
|
||||
|
||||
|
@ -1070,8 +1070,8 @@ void MODULE::RunOnChildren( const std::function<void (BOARD_ITEM*)>& aFunction )
|
|||
for( D_PAD* pad : m_pads )
|
||||
aFunction( static_cast<BOARD_ITEM*>( pad ) );
|
||||
|
||||
for( MODULE_ZONE_CONTAINER* zone : m_fp_zones )
|
||||
aFunction( static_cast<MODULE_ZONE_CONTAINER*>( zone ) );
|
||||
for( FP_ZONE* zone : m_fp_zones )
|
||||
aFunction( static_cast<FP_ZONE*>( zone ) );
|
||||
|
||||
for( PCB_GROUP* group : m_fp_groups )
|
||||
aFunction( static_cast<PCB_GROUP*>( group ) );
|
||||
|
@ -1287,7 +1287,7 @@ void MODULE::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
pad->Flip( m_Pos, false );
|
||||
|
||||
// Mirror zones to other side of board.
|
||||
for( ZONE_CONTAINER* zone : m_fp_zones )
|
||||
for( ZONE* zone : m_fp_zones )
|
||||
zone->Flip( m_Pos, aFlipLeftRight );
|
||||
|
||||
// Mirror reference and value.
|
||||
|
@ -1333,7 +1333,7 @@ void MODULE::SetPosition( const wxPoint& aPos )
|
|||
for( D_PAD* pad : m_pads )
|
||||
pad->SetPosition( pad->GetPosition() + delta );
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_fp_zones )
|
||||
for( ZONE* zone : m_fp_zones )
|
||||
zone->Move( delta );
|
||||
|
||||
for( BOARD_ITEM* item : m_drawings )
|
||||
|
@ -1435,7 +1435,7 @@ void MODULE::SetOrientation( double aNewAngle )
|
|||
pad->SetDrawCoord();
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_fp_zones )
|
||||
for( ZONE* zone : m_fp_zones )
|
||||
{
|
||||
zone->Rotate( GetPosition(), angleChange );
|
||||
}
|
||||
|
@ -1476,7 +1476,7 @@ BOARD_ITEM* MODULE::Duplicate() const
|
|||
BOARD_ITEM* MODULE::DuplicateItem( const BOARD_ITEM* aItem, bool aAddToModule )
|
||||
{
|
||||
BOARD_ITEM* new_item = NULL;
|
||||
MODULE_ZONE_CONTAINER* new_zone = NULL;
|
||||
FP_ZONE* new_zone = NULL;
|
||||
|
||||
switch( aItem->Type() )
|
||||
{
|
||||
|
@ -1492,9 +1492,9 @@ BOARD_ITEM* MODULE::DuplicateItem( const BOARD_ITEM* aItem, bool aAddToModule )
|
|||
break;
|
||||
}
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
{
|
||||
new_zone = new MODULE_ZONE_CONTAINER( *static_cast<const MODULE_ZONE_CONTAINER*>( aItem ) );
|
||||
new_zone = new FP_ZONE( *static_cast<const FP_ZONE*>( aItem ) );
|
||||
const_cast<KIID&>( new_zone->m_Uuid ) = KIID();
|
||||
|
||||
if( aAddToModule )
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "zones.h"
|
||||
#include <fp_text.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <functional>
|
||||
|
||||
class LINE_READER;
|
||||
|
@ -100,7 +100,7 @@ public:
|
|||
|
||||
DECL_DEQ_FOR_SWIG( PADS, D_PAD* )
|
||||
DECL_DEQ_FOR_SWIG( DRAWINGS, BOARD_ITEM* )
|
||||
DECL_VEC_FOR_SWIG( MODULE_ZONE_CONTAINERS, MODULE_ZONE_CONTAINER* )
|
||||
DECL_VEC_FOR_SWIG( FP_ZONES, FP_ZONE* )
|
||||
DECL_VEC_FOR_SWIG( MODULE_GROUPS, PCB_GROUP* )
|
||||
DECL_DEQ_FOR_SWIG( MODULES, MODULE* )
|
||||
|
||||
|
@ -176,19 +176,18 @@ public:
|
|||
|
||||
// Virtual function
|
||||
const EDA_RECT GetBoundingBox() const override;
|
||||
|
||||
const EDA_RECT GetBoundingBox( bool aIncludeInvisibleText ) const;
|
||||
|
||||
PADS& Pads() { return m_pads; }
|
||||
PADS& Pads() { return m_pads; }
|
||||
const PADS& Pads() const { return m_pads; }
|
||||
|
||||
DRAWINGS& GraphicalItems() { return m_drawings; }
|
||||
DRAWINGS& GraphicalItems() { return m_drawings; }
|
||||
const DRAWINGS& GraphicalItems() const { return m_drawings; }
|
||||
|
||||
MODULE_ZONE_CONTAINERS& Zones() { return m_fp_zones; }
|
||||
const MODULE_ZONE_CONTAINERS& Zones() const { return m_fp_zones; }
|
||||
FP_ZONES& Zones() { return m_fp_zones; }
|
||||
const FP_ZONES& Zones() const { return m_fp_zones; }
|
||||
|
||||
MODULE_GROUPS& Groups() { return m_fp_groups; }
|
||||
MODULE_GROUPS& Groups() { return m_fp_groups; }
|
||||
const MODULE_GROUPS& Groups() const { return m_fp_groups; }
|
||||
|
||||
bool HasThroughHolePads() const;
|
||||
|
@ -197,11 +196,9 @@ public:
|
|||
const std::list<MODULE_3D_SETTINGS>& Models() const { return m_3D_Drawings; }
|
||||
|
||||
void SetPosition( const wxPoint& aPos ) override;
|
||||
|
||||
wxPoint GetPosition() const override { return m_Pos; }
|
||||
|
||||
void SetOrientation( double aNewAngle );
|
||||
|
||||
void SetOrientationDegrees( double aOrientation ) { SetOrientation( aOrientation * 10.0 ); }
|
||||
double GetOrientation() const { return m_Orient; }
|
||||
double GetOrientationDegrees() const { return m_Orient / 10.0; }
|
||||
|
@ -696,7 +693,7 @@ public:
|
|||
private:
|
||||
DRAWINGS m_drawings; // BOARD_ITEMs for drawings on the board, owned by pointer.
|
||||
PADS m_pads; // D_PAD items, owned by pointer
|
||||
MODULE_ZONE_CONTAINERS m_fp_zones; // MODULE_ZONE_CONTAINER items, owned by pointer
|
||||
FP_ZONES m_fp_zones; // FP_ZONE items, owned by pointer
|
||||
MODULE_GROUPS m_fp_groups; // PCB_GROUP items, owned by pointer
|
||||
|
||||
double m_Orient; // Orientation in tenths of a degree, 900=90.0 degrees.
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#include <class_pad.h>
|
||||
#include <class_track.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <class_dimension.h>
|
||||
#include <class_zone.h>
|
||||
#include <dimension.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <class_pcb_group.h>
|
||||
#include <macros.h>
|
||||
|
@ -46,22 +46,22 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
|
|||
// there are some restrictions on the order of items in the general case.
|
||||
// all items in m_Drawings for instance should be contiguous.
|
||||
// *** all items in a same list (shown here) must be contiguous ****
|
||||
PCB_MARKER_T, // in m_markers
|
||||
PCB_TEXT_T, // in m_drawings
|
||||
PCB_SHAPE_T, // in m_drawings
|
||||
PCB_DIM_ALIGNED_T, // in m_drawings
|
||||
PCB_DIM_CENTER_T, // in m_drawings
|
||||
PCB_DIM_ORTHOGONAL_T, // in m_drawings
|
||||
PCB_DIM_LEADER_T, // in m_drawings
|
||||
PCB_TARGET_T, // in m_drawings
|
||||
PCB_VIA_T, // in m_tracks
|
||||
PCB_TRACE_T, // in m_tracks
|
||||
PCB_ARC_T, // in m_tracks
|
||||
PCB_PAD_T, // in footprints
|
||||
PCB_FP_TEXT_T, // in footprints
|
||||
PCB_MODULE_T, // in m_footprints
|
||||
PCB_GROUP_T, // in m_groups
|
||||
PCB_ZONE_AREA_T, // in m_zones
|
||||
PCB_MARKER_T, // in m_markers
|
||||
PCB_TEXT_T, // in m_drawings
|
||||
PCB_SHAPE_T, // in m_drawings
|
||||
PCB_DIM_ALIGNED_T, // in m_drawings
|
||||
PCB_DIM_CENTER_T, // in m_drawings
|
||||
PCB_DIM_ORTHOGONAL_T, // in m_drawings
|
||||
PCB_DIM_LEADER_T, // in m_drawings
|
||||
PCB_TARGET_T, // in m_drawings
|
||||
PCB_VIA_T, // in m_tracks
|
||||
PCB_TRACE_T, // in m_tracks
|
||||
PCB_ARC_T, // in m_tracks
|
||||
PCB_PAD_T, // in footprints
|
||||
PCB_FP_TEXT_T, // in footprints
|
||||
PCB_MODULE_T, // in m_footprints
|
||||
PCB_GROUP_T, // in m_groups
|
||||
PCB_ZONE_T, // in m_zones
|
||||
EOT
|
||||
};
|
||||
|
||||
|
@ -80,7 +80,7 @@ const KICAD_T GENERAL_COLLECTOR::BoardLevelItems[] = {
|
|||
PCB_TRACE_T,
|
||||
PCB_MODULE_T,
|
||||
PCB_GROUP_T,
|
||||
PCB_ZONE_AREA_T,
|
||||
PCB_ZONE_T,
|
||||
EOT
|
||||
};
|
||||
|
||||
|
@ -101,7 +101,7 @@ const KICAD_T GENERAL_COLLECTOR::AllButZones[] = {
|
|||
PCB_FP_TEXT_T,
|
||||
PCB_MODULE_T,
|
||||
PCB_GROUP_T,
|
||||
PCB_ZONE_AREA_T, // if it is visible on screen, it should be selectable
|
||||
PCB_ZONE_T, // if it is visible on screen, it should be selectable
|
||||
EOT
|
||||
};
|
||||
|
||||
|
@ -133,7 +133,7 @@ const KICAD_T GENERAL_COLLECTOR::ModulesAndTheirItems[] = {
|
|||
PCB_FP_TEXT_T,
|
||||
PCB_FP_SHAPE_T,
|
||||
PCB_PAD_T,
|
||||
PCB_FP_ZONE_AREA_T,
|
||||
PCB_FP_ZONE_T,
|
||||
PCB_GROUP_T,
|
||||
EOT
|
||||
};
|
||||
|
@ -143,7 +143,7 @@ const KICAD_T GENERAL_COLLECTOR::ModuleItems[] = {
|
|||
PCB_FP_TEXT_T,
|
||||
PCB_FP_SHAPE_T,
|
||||
PCB_PAD_T,
|
||||
PCB_FP_ZONE_AREA_T,
|
||||
PCB_FP_ZONE_T,
|
||||
PCB_GROUP_T,
|
||||
EOT
|
||||
};
|
||||
|
@ -168,8 +168,8 @@ const KICAD_T GENERAL_COLLECTOR::LockableItems[] = {
|
|||
|
||||
|
||||
const KICAD_T GENERAL_COLLECTOR::Zones[] = {
|
||||
PCB_ZONE_AREA_T,
|
||||
PCB_FP_ZONE_AREA_T,
|
||||
PCB_ZONE_T,
|
||||
PCB_FP_ZONE_T,
|
||||
EOT
|
||||
};
|
||||
|
||||
|
@ -194,9 +194,9 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
|
|||
bool pad_through = false;
|
||||
VIA* via = nullptr;
|
||||
MARKER_PCB* marker = nullptr;
|
||||
ZONE_CONTAINER* zone = nullptr;
|
||||
ZONE* zone = nullptr;
|
||||
PCB_SHAPE* shape = nullptr;
|
||||
DIMENSION* dimension = nullptr;
|
||||
DIMENSION_BASE* dimension = nullptr;
|
||||
|
||||
#if 0 // debugging
|
||||
static int breakhere = 0;
|
||||
|
@ -304,14 +304,14 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
|
|||
goto exit;
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
module = static_cast<MODULE*>( item->GetParent() );
|
||||
|
||||
// Fallthrough to get the zone as well
|
||||
KI_FALLTHROUGH;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
zone = static_cast<ZONE_CONTAINER*>( item );
|
||||
case PCB_ZONE_T:
|
||||
zone = static_cast<ZONE*>( item );
|
||||
break;
|
||||
|
||||
case PCB_TEXT_T:
|
||||
|
@ -325,7 +325,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
|
|||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
dimension = static_cast<DIMENSION*>( item );
|
||||
dimension = static_cast<DIMENSION_BASE*>( item );
|
||||
break;
|
||||
|
||||
case PCB_TARGET_T:
|
||||
|
|
|
@ -74,13 +74,11 @@ bool CN_CONNECTIVITY_ALGO::Remove( BOARD_ITEM* aItem )
|
|||
m_itemList.SetDirty( true );
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
{
|
||||
case PCB_ZONE_T:
|
||||
m_itemMap[aItem].MarkItemsAsInvalid();
|
||||
m_itemMap.erase ( aItem );
|
||||
m_itemList.SetDirty( true );
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
@ -174,9 +172,9 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
|
|||
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
{
|
||||
auto zone = static_cast<ZONE_CONTAINER*>( aItem );
|
||||
ZONE* zone = static_cast<ZONE*>( aItem );
|
||||
|
||||
if( m_itemMap.find( aItem ) != m_itemMap.end() )
|
||||
return false;
|
||||
|
@ -184,8 +182,10 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
|
|||
m_itemMap[zone] = ITEM_MAP_ENTRY();
|
||||
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
for( auto zitem : m_itemList.Add( zone, layer ) )
|
||||
{
|
||||
for( CN_ITEM* zitem : m_itemList.Add( zone, layer ) )
|
||||
m_itemMap[zone].Link( zitem );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ void CN_CONNECTIVITY_ALGO::searchConnections()
|
|||
|
||||
const CN_CONNECTIVITY_ALGO::CLUSTERS CN_CONNECTIVITY_ALGO::SearchClusters( CLUSTER_SEARCH_MODE aMode )
|
||||
{
|
||||
constexpr KICAD_T types[] = { PCB_TRACE_T, PCB_ARC_T, PCB_PAD_T, PCB_VIA_T, PCB_ZONE_AREA_T,
|
||||
constexpr KICAD_T types[] = { PCB_TRACE_T, PCB_ARC_T, PCB_PAD_T, PCB_VIA_T, PCB_ZONE_T,
|
||||
PCB_MODULE_T, EOT };
|
||||
constexpr KICAD_T no_zones[] = { PCB_TRACE_T, PCB_ARC_T, PCB_PAD_T, PCB_VIA_T,
|
||||
PCB_MODULE_T, EOT };
|
||||
|
@ -438,7 +438,7 @@ void CN_CONNECTIVITY_ALGO::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
|
|||
|
||||
size *= 2; // Our caller us gets the other half of the progress bar
|
||||
|
||||
for( ZONE_CONTAINER* zone : aBoard->Zones() )
|
||||
for( ZONE* zone : aBoard->Zones() )
|
||||
{
|
||||
Add( zone );
|
||||
reportProgress( aReporter, ii++, size, delta );
|
||||
|
@ -550,8 +550,7 @@ void CN_CONNECTIVITY_ALGO::PropagateNets( BOARD_COMMIT* aCommit )
|
|||
}
|
||||
|
||||
|
||||
void CN_CONNECTIVITY_ALGO::FindIsolatedCopperIslands( ZONE_CONTAINER* aZone,
|
||||
PCB_LAYER_ID aLayer,
|
||||
void CN_CONNECTIVITY_ALGO::FindIsolatedCopperIslands( ZONE* aZone, PCB_LAYER_ID aLayer,
|
||||
std::vector<int>& aIslands )
|
||||
{
|
||||
if( aZone->GetFilledPolysList( aLayer ).IsEmpty() )
|
||||
|
@ -676,8 +675,8 @@ void CN_VISITOR::checkZoneItemConnection( CN_ZONE_LAYER* aZoneLayer, CN_ITEM* aI
|
|||
|
||||
void CN_VISITOR::checkZoneZoneConnection( CN_ZONE_LAYER* aZoneLayerA, CN_ZONE_LAYER* aZoneLayerB )
|
||||
{
|
||||
const auto zoneA = static_cast<const ZONE_CONTAINER*>( aZoneLayerA->Parent() );
|
||||
const auto zoneB = static_cast<const ZONE_CONTAINER*>( aZoneLayerB->Parent() );
|
||||
const ZONE* zoneA = static_cast<const ZONE*>( aZoneLayerA->Parent() );
|
||||
const ZONE* zoneB = static_cast<const ZONE*>( aZoneLayerB->Parent() );
|
||||
|
||||
if( aZoneLayerA->Layer() != aZoneLayerB->Layer() )
|
||||
return;
|
||||
|
@ -754,20 +753,20 @@ bool CN_VISITOR::operator()( CN_ITEM* aCandidate )
|
|||
return true;
|
||||
|
||||
// We should handle zone-zone connection separately
|
||||
if ( parentA->Type() == PCB_ZONE_AREA_T && parentB->Type() == PCB_ZONE_AREA_T )
|
||||
if ( parentA->Type() == PCB_ZONE_T && parentB->Type() == PCB_ZONE_T )
|
||||
{
|
||||
checkZoneZoneConnection( static_cast<CN_ZONE_LAYER*>( m_item ),
|
||||
static_cast<CN_ZONE_LAYER*>( aCandidate ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
if( parentA->Type() == PCB_ZONE_AREA_T )
|
||||
if( parentA->Type() == PCB_ZONE_T )
|
||||
{
|
||||
checkZoneItemConnection( static_cast<CN_ZONE_LAYER*>( aCandidate ), m_item );
|
||||
return true;
|
||||
}
|
||||
|
||||
if( parentB->Type() == PCB_ZONE_AREA_T )
|
||||
if( parentB->Type() == PCB_ZONE_T )
|
||||
{
|
||||
checkZoneItemConnection( static_cast<CN_ZONE_LAYER*>( m_item ), aCandidate );
|
||||
return true;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <class_board.h>
|
||||
#include <class_pad.h>
|
||||
#include <class_module.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <geometry/poly_grid_partition.h>
|
||||
|
@ -53,7 +53,7 @@ class CN_RATSNEST_NODES;
|
|||
class BOARD;
|
||||
class BOARD_CONNECTED_ITEM;
|
||||
class BOARD_ITEM;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class PROGRESS_REPORTER;
|
||||
|
||||
class CN_EDGE
|
||||
|
@ -224,25 +224,25 @@ public:
|
|||
return m_dirtyNets.size();
|
||||
}
|
||||
|
||||
void Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr );
|
||||
void Build( const std::vector<BOARD_ITEM*>& aItems );
|
||||
void Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr );
|
||||
void Build( const std::vector<BOARD_ITEM*>& aItems );
|
||||
|
||||
void Clear();
|
||||
|
||||
bool Remove( BOARD_ITEM* aItem );
|
||||
bool Add( BOARD_ITEM* aItem );
|
||||
bool Remove( BOARD_ITEM* aItem );
|
||||
bool Add( BOARD_ITEM* aItem );
|
||||
|
||||
const CLUSTERS SearchClusters( CLUSTER_SEARCH_MODE aMode, const KICAD_T aTypes[], int aSingleNet );
|
||||
const CLUSTERS SearchClusters( CLUSTER_SEARCH_MODE aMode );
|
||||
const CLUSTERS SearchClusters( CLUSTER_SEARCH_MODE aMode, const KICAD_T aTypes[],
|
||||
int aSingleNet );
|
||||
const CLUSTERS SearchClusters( CLUSTER_SEARCH_MODE aMode );
|
||||
|
||||
/**
|
||||
* Propagates nets from pads to other items in clusters
|
||||
* @param aCommit is used to store undo information for items modified by the call
|
||||
*/
|
||||
void PropagateNets( BOARD_COMMIT* aCommit = nullptr );
|
||||
void PropagateNets( BOARD_COMMIT* aCommit = nullptr );
|
||||
|
||||
void FindIsolatedCopperIslands( ZONE_CONTAINER* aZone, PCB_LAYER_ID aLayer,
|
||||
std::vector<int>& aIslands );
|
||||
void FindIsolatedCopperIslands( ZONE* aZone, PCB_LAYER_ID aLayer, std::vector<int>& aIslands );
|
||||
|
||||
/**
|
||||
* Finds the copper islands that are not connected to a net. These are added to
|
||||
|
@ -250,7 +250,7 @@ public:
|
|||
* N.B. This must be called after aZones has been refreshed.
|
||||
* @param: aZones The set of zones to search for islands
|
||||
*/
|
||||
void FindIsolatedCopperIslands( std::vector<CN_ZONE_ISOLATED_ISLAND_LIST>& aZones );
|
||||
void FindIsolatedCopperIslands( std::vector<CN_ZONE_ISOLATED_ISLAND_LIST>& aZones );
|
||||
|
||||
const CLUSTERS& GetClusters();
|
||||
|
||||
|
|
|
@ -257,8 +257,7 @@ int CONNECTIVITY_DATA::GetNetCount() const
|
|||
}
|
||||
|
||||
|
||||
void CONNECTIVITY_DATA::FindIsolatedCopperIslands( ZONE_CONTAINER* aZone,
|
||||
std::vector<int>& aIslands )
|
||||
void CONNECTIVITY_DATA::FindIsolatedCopperIslands( ZONE* aZone, std::vector<int>& aIslands )
|
||||
{
|
||||
// TODO(JE) ZONES
|
||||
#if 0
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <math/vector2d.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
|
||||
class FROM_TO_CACHE;
|
||||
class CN_CLUSTER;
|
||||
|
@ -46,7 +46,7 @@ class BOARD;
|
|||
class BOARD_COMMIT;
|
||||
class BOARD_CONNECTED_ITEM;
|
||||
class BOARD_ITEM;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class RN_DATA;
|
||||
class RN_NET;
|
||||
class TRACK;
|
||||
|
@ -66,11 +66,11 @@ struct CN_DISJOINT_NET_ENTRY
|
|||
*/
|
||||
struct CN_ZONE_ISOLATED_ISLAND_LIST
|
||||
{
|
||||
CN_ZONE_ISOLATED_ISLAND_LIST( ZONE_CONTAINER* aZone ) :
|
||||
CN_ZONE_ISOLATED_ISLAND_LIST( ZONE* aZone ) :
|
||||
m_zone( aZone )
|
||||
{}
|
||||
|
||||
ZONE_CONTAINER* m_zone;
|
||||
ZONE* m_zone;
|
||||
|
||||
std::map<PCB_LAYER_ID, std::vector<int>> m_islands;
|
||||
};
|
||||
|
@ -167,7 +167,7 @@ public:
|
|||
* @param aZone zone to test
|
||||
* @param aIslands list of islands that have no connections (outline indices in the polygon set)
|
||||
*/
|
||||
void FindIsolatedCopperIslands( ZONE_CONTAINER* aZone, std::vector<int>& aIslands );
|
||||
void FindIsolatedCopperIslands( ZONE* aZone, std::vector<int>& aIslands );
|
||||
void FindIsolatedCopperIslands( std::vector<CN_ZONE_ISOLATED_ISLAND_LIST>& aZones );
|
||||
|
||||
/**
|
||||
|
|
|
@ -166,8 +166,8 @@ int CN_ZONE_LAYER::AnchorCount() const
|
|||
if( !Valid() )
|
||||
return 0;
|
||||
|
||||
const auto zone = static_cast<const ZONE_CONTAINER*>( Parent() );
|
||||
const auto& outline = zone->GetFilledPolysList( m_layer ).COutline( m_subpolyIndex );
|
||||
const ZONE* zone = static_cast<const ZONE*>( Parent() );
|
||||
const SHAPE_LINE_CHAIN& outline = zone->GetFilledPolysList( m_layer ).COutline( m_subpolyIndex );
|
||||
|
||||
return outline.PointCount() ? 1 : 0;
|
||||
}
|
||||
|
@ -178,8 +178,8 @@ const VECTOR2I CN_ZONE_LAYER::GetAnchor( int n ) const
|
|||
if( !Valid() )
|
||||
return VECTOR2I();
|
||||
|
||||
const auto zone = static_cast<const ZONE_CONTAINER*>( Parent() );
|
||||
const auto& outline = zone->GetFilledPolysList( m_layer ).COutline( m_subpolyIndex );
|
||||
const ZONE* zone = static_cast<const ZONE*>( Parent() );
|
||||
const SHAPE_LINE_CHAIN& outline = zone->GetFilledPolysList( m_layer ).COutline( m_subpolyIndex );
|
||||
|
||||
return outline.CPoint( 0 );
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ CN_ITEM* CN_LIST::Add( ARC* aArc )
|
|||
return item;
|
||||
}
|
||||
|
||||
const std::vector<CN_ITEM*> CN_LIST::Add( ZONE_CONTAINER* zone, PCB_LAYER_ID aLayer )
|
||||
const std::vector<CN_ITEM*> CN_LIST::Add( ZONE* zone, PCB_LAYER_ID aLayer )
|
||||
{
|
||||
const auto& polys = zone->GetFilledPolysList( aLayer );
|
||||
|
||||
|
@ -367,9 +367,9 @@ bool CN_ANCHOR::IsDangling() const
|
|||
connected_count = 0;
|
||||
for( auto item : m_item->ConnectedItems() )
|
||||
{
|
||||
if( item->Parent()->Type() == PCB_ZONE_AREA_T )
|
||||
if( item->Parent()->Type() == PCB_ZONE_T )
|
||||
{
|
||||
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( item->Parent() );
|
||||
ZONE* zone = static_cast<ZONE*>( item->Parent() );
|
||||
|
||||
if( zone->HitTestFilledArea( static_cast<PCB_LAYER_ID>( item->Layer() ),
|
||||
wxPoint( Pos() ), accuracy ) )
|
||||
|
@ -390,17 +390,17 @@ int CN_ANCHOR::ConnectedItemsCount() const
|
|||
|
||||
int connected_count = 0;
|
||||
|
||||
for( auto item : m_item->ConnectedItems() )
|
||||
for( CN_ITEM* item : m_item->ConnectedItems() )
|
||||
{
|
||||
if( item->Parent()->Type() == PCB_ZONE_AREA_T )
|
||||
if( item->Parent()->Type() == PCB_ZONE_T )
|
||||
{
|
||||
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( item->Parent() );
|
||||
ZONE* zone = static_cast<ZONE*>( item->Parent() );
|
||||
|
||||
if( zone->HitTestFilledArea( static_cast<PCB_LAYER_ID>( item->Layer() ),
|
||||
wxPoint( Pos().x, Pos().y ) ) )
|
||||
(wxPoint) Pos() ) )
|
||||
connected_count++;
|
||||
}
|
||||
else if( item->Parent()->HitTest( wxPoint( Pos().x, Pos().y ) ) )
|
||||
else if( item->Parent()->HitTest( (wxPoint) Pos() ) )
|
||||
connected_count++;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <class_pad.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <geometry/poly_grid_partition.h>
|
||||
|
@ -357,8 +357,7 @@ typedef std::shared_ptr<CN_ITEM> CN_ITEM_PTR;
|
|||
class CN_ZONE_LAYER : public CN_ITEM
|
||||
{
|
||||
public:
|
||||
CN_ZONE_LAYER( ZONE_CONTAINER* aParent, PCB_LAYER_ID aLayer, bool aCanChangeNet,
|
||||
int aSubpolyIndex ) :
|
||||
CN_ZONE_LAYER( ZONE* aParent, PCB_LAYER_ID aLayer, bool aCanChangeNet, int aSubpolyIndex ) :
|
||||
CN_ITEM( aParent, aCanChangeNet ),
|
||||
m_subpolyIndex( aSubpolyIndex ),
|
||||
m_layer( aLayer )
|
||||
|
@ -383,7 +382,7 @@ public:
|
|||
|
||||
bool ContainsPoint( const VECTOR2I p, int aAccuracy = 0 ) const
|
||||
{
|
||||
auto zone = static_cast<ZONE_CONTAINER*> ( Parent() );
|
||||
auto zone = static_cast<ZONE*>( Parent() );
|
||||
int clearance = aAccuracy;
|
||||
|
||||
if( zone->GetFilledPolysUseThickness() )
|
||||
|
@ -512,7 +511,7 @@ public:
|
|||
|
||||
CN_ITEM* Add( VIA* via );
|
||||
|
||||
const std::vector<CN_ITEM*> Add( ZONE_CONTAINER* zone, PCB_LAYER_ID aLayer );
|
||||
const std::vector<CN_ITEM*> Add( ZONE* zone, PCB_LAYER_ID aLayer );
|
||||
};
|
||||
|
||||
class CN_CLUSTER
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <zones.h>
|
||||
#include <bitmaps.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <class_board.h>
|
||||
#include <trigo.h>
|
||||
|
||||
|
@ -503,7 +503,7 @@ void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event )
|
|||
// Export settings ( but layer and netcode ) to others copper zones
|
||||
BOARD* pcb = m_Parent->GetBoard();
|
||||
|
||||
for( ZONE_CONTAINER* zone : pcb->Zones() )
|
||||
for( ZONE* zone : pcb->Zones() )
|
||||
{
|
||||
// Cannot export settings from a copper zone
|
||||
// to a zone keepout:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <class_board.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_base_edit_frame.h>
|
||||
#include <pcb_layer_box_selector.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
@ -48,8 +48,8 @@ DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES( PCB_BASE_EDIT_FRAME* a
|
|||
m_lblExtensionOffsetUnits )
|
||||
{
|
||||
wxASSERT( BaseType( aItem->Type() ) == PCB_DIMENSION_T );
|
||||
m_dimension = static_cast<DIMENSION*>( aItem );
|
||||
m_previewDimension = static_cast<DIMENSION*>( m_dimension->Clone() );
|
||||
m_dimension = static_cast<DIMENSION_BASE*>( aItem );
|
||||
m_previewDimension = static_cast<DIMENSION_BASE*>( m_dimension->Clone() );
|
||||
m_previewDimension->SetParent( m_frame->GetBoard() );
|
||||
|
||||
switch( m_dimension->Type() )
|
||||
|
@ -284,7 +284,7 @@ bool DIALOG_DIMENSION_PROPERTIES::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog( DIMENSION* aTarget )
|
||||
void DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog( DIMENSION_BASE* aTarget )
|
||||
{
|
||||
BOARD* board = m_frame->GetBoard();
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
class BOARD_ITEM;
|
||||
class DIMENSION;
|
||||
class DIMENSION_BASE;
|
||||
class PCB_BASE_EDIT_FRAME;
|
||||
|
||||
|
||||
|
@ -46,13 +46,13 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
PCB_BASE_EDIT_FRAME* m_frame;
|
||||
PCB_BASE_EDIT_FRAME* m_frame;
|
||||
|
||||
DIMENSION* m_dimension;
|
||||
DIMENSION* m_previewDimension;
|
||||
DIMENSION_BASE* m_dimension;
|
||||
DIMENSION_BASE* m_previewDimension;
|
||||
|
||||
PCB_LAYER_BOX_SELECTOR* m_cbLayerActual; // The active layer box control
|
||||
wxTextCtrl* m_txtValueActual; // The active value control
|
||||
PCB_LAYER_BOX_SELECTOR* m_cbLayerActual; // The active layer box control
|
||||
wxTextCtrl* m_txtValueActual; // The active value control
|
||||
|
||||
UNIT_BINDER m_textWidth;
|
||||
UNIT_BINDER m_textHeight;
|
||||
|
@ -67,7 +67,7 @@ private:
|
|||
UNIT_BINDER m_arrowLength;
|
||||
UNIT_BINDER m_extensionOffset;
|
||||
|
||||
void updateDimensionFromDialog( DIMENSION* aTarget );
|
||||
void updateDimensionFromDialog( DIMENSION_BASE* aTarget );
|
||||
|
||||
void updatePreviewText();
|
||||
};
|
||||
|
|
|
@ -32,7 +32,6 @@ using namespace std::placeholders;
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
#include <tools/global_edit_tool.h>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <pcb_layer_box_selector.h>
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <fp_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
@ -270,10 +270,10 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( BOARD_COMMIT& aCommit, B
|
|||
{
|
||||
aCommit.Modify( aItem );
|
||||
|
||||
EDA_TEXT* textItem = dynamic_cast<EDA_TEXT*>( aItem );
|
||||
FP_TEXT* fpTextItem = dynamic_cast<FP_TEXT*>( aItem );
|
||||
PCB_SHAPE* drawItem = dynamic_cast<PCB_SHAPE*>( aItem );
|
||||
DIMENSION* dimension = dynamic_cast<DIMENSION*>( aItem );
|
||||
EDA_TEXT* textItem = dynamic_cast<EDA_TEXT*>( aItem );
|
||||
FP_TEXT* fpTextItem = dynamic_cast<FP_TEXT*>( aItem );
|
||||
PCB_SHAPE* drawItem = dynamic_cast<PCB_SHAPE*>( aItem );
|
||||
DIMENSION_BASE* dimension = dynamic_cast<DIMENSION_BASE*>( aItem );
|
||||
|
||||
if( dimension )
|
||||
textItem = &dimension->Text();
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
#include <class_zone.h>
|
||||
#include <zones.h>
|
||||
|
||||
#include <dialog_non_copper_zones_properties_base.h>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <footprint_edit_frame.h>
|
||||
#include <class_zone.h>
|
||||
#include <zones.h>
|
||||
#include <zone_settings.h>
|
||||
#include <dialog_rule_area_properties_base.h>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <class_track.h>
|
||||
#include <view/view.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
#include <class_zone.h>
|
||||
#include <class_board.h>
|
||||
#include "dialog_swap_layers.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <base_units.h>
|
||||
#include <board_commit.h>
|
||||
#include <class_board.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <dialog_target_properties_base.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
#include <base_units.h>
|
||||
#include <class_board.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_text.h>
|
||||
#include <geometry/shape_circle.h>
|
||||
#include <geometry/shape_segment.h>
|
||||
|
@ -38,7 +38,7 @@
|
|||
#include <i18n_utility.h>
|
||||
|
||||
|
||||
DIMENSION::DIMENSION( BOARD_ITEM* aParent, KICAD_T aType ) :
|
||||
DIMENSION_BASE::DIMENSION_BASE( BOARD_ITEM* aParent, KICAD_T aType ) :
|
||||
BOARD_ITEM( aParent, aType ),
|
||||
m_overrideTextEnabled( false ),
|
||||
m_units( EDA_UNITS::INCHES ),
|
||||
|
@ -58,14 +58,14 @@ DIMENSION::DIMENSION( BOARD_ITEM* aParent, KICAD_T aType ) :
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::SetParent( EDA_ITEM* aParent )
|
||||
void DIMENSION_BASE::SetParent( EDA_ITEM* aParent )
|
||||
{
|
||||
BOARD_ITEM::SetParent( aParent );
|
||||
m_text.SetParent( aParent );
|
||||
}
|
||||
|
||||
|
||||
void DIMENSION::updateText()
|
||||
void DIMENSION_BASE::updateText()
|
||||
{
|
||||
wxString text = m_overrideTextEnabled ? m_valueString : GetValueText();
|
||||
|
||||
|
@ -94,13 +94,13 @@ void DIMENSION::updateText()
|
|||
|
||||
|
||||
template<typename ShapeType>
|
||||
void DIMENSION::addShape( const ShapeType& aShape )
|
||||
void DIMENSION_BASE::addShape( const ShapeType& aShape )
|
||||
{
|
||||
m_shapes.push_back( std::make_shared<ShapeType>( aShape ) );
|
||||
}
|
||||
|
||||
|
||||
wxString DIMENSION::GetValueText() const
|
||||
wxString DIMENSION_BASE::GetValueText() const
|
||||
{
|
||||
struct lconv* lc = localeconv();
|
||||
wxChar sep = lc->decimal_point[0];
|
||||
|
@ -129,25 +129,25 @@ wxString DIMENSION::GetValueText() const
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::SetPrefix( const wxString& aPrefix )
|
||||
void DIMENSION_BASE::SetPrefix( const wxString& aPrefix )
|
||||
{
|
||||
m_prefix = aPrefix;
|
||||
}
|
||||
|
||||
|
||||
void DIMENSION::SetSuffix( const wxString& aSuffix )
|
||||
void DIMENSION_BASE::SetSuffix( const wxString& aSuffix )
|
||||
{
|
||||
m_suffix = aSuffix;
|
||||
}
|
||||
|
||||
|
||||
void DIMENSION::SetUnits( EDA_UNITS aUnits )
|
||||
void DIMENSION_BASE::SetUnits( EDA_UNITS aUnits )
|
||||
{
|
||||
m_units = aUnits;
|
||||
}
|
||||
|
||||
|
||||
DIM_UNITS_MODE DIMENSION::GetUnitsMode() const
|
||||
DIM_UNITS_MODE DIMENSION_BASE::GetUnitsMode() const
|
||||
{
|
||||
if( m_autoUnits )
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ DIM_UNITS_MODE DIMENSION::GetUnitsMode() const
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::SetUnitsMode( DIM_UNITS_MODE aMode )
|
||||
void DIMENSION_BASE::SetUnitsMode( DIM_UNITS_MODE aMode )
|
||||
{
|
||||
m_autoUnits = false;
|
||||
|
||||
|
@ -196,27 +196,27 @@ void DIMENSION::SetUnitsMode( DIM_UNITS_MODE aMode )
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::SetText( const wxString& aNewText )
|
||||
void DIMENSION_BASE::SetText( const wxString& aNewText )
|
||||
{
|
||||
m_valueString = aNewText;
|
||||
updateText();
|
||||
}
|
||||
|
||||
|
||||
const wxString DIMENSION::GetText() const
|
||||
const wxString DIMENSION_BASE::GetText() const
|
||||
{
|
||||
return m_text.GetText();
|
||||
}
|
||||
|
||||
|
||||
void DIMENSION::SetLayer( PCB_LAYER_ID aLayer )
|
||||
void DIMENSION_BASE::SetLayer( PCB_LAYER_ID aLayer )
|
||||
{
|
||||
m_Layer = aLayer;
|
||||
m_text.SetLayer( aLayer );
|
||||
}
|
||||
|
||||
|
||||
void DIMENSION::Move( const wxPoint& offset )
|
||||
void DIMENSION_BASE::Move( const wxPoint& offset )
|
||||
{
|
||||
m_text.Offset( offset );
|
||||
|
||||
|
@ -227,7 +227,7 @@ void DIMENSION::Move( const wxPoint& offset )
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::Rotate( const wxPoint& aRotCentre, double aAngle )
|
||||
void DIMENSION_BASE::Rotate( const wxPoint& aRotCentre, double aAngle )
|
||||
{
|
||||
if( m_keepTextAligned )
|
||||
m_keepTextAligned = false;
|
||||
|
@ -243,7 +243,7 @@ void DIMENSION::Rotate( const wxPoint& aRotCentre, double aAngle )
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
||||
void DIMENSION_BASE::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
||||
{
|
||||
Mirror( aCentre );
|
||||
|
||||
|
@ -253,7 +253,7 @@ void DIMENSION::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::Mirror( const wxPoint& axis_pos, bool aMirrorLeftRight )
|
||||
void DIMENSION_BASE::Mirror( const wxPoint& axis_pos, bool aMirrorLeftRight )
|
||||
{
|
||||
int axis = aMirrorLeftRight ? axis_pos.x : axis_pos.y;
|
||||
wxPoint newPos = m_text.GetTextPos();
|
||||
|
@ -286,21 +286,21 @@ void DIMENSION::Mirror( const wxPoint& axis_pos, bool aMirrorLeftRight )
|
|||
}
|
||||
|
||||
|
||||
void DIMENSION::SetStart( const wxPoint& aOrigin )
|
||||
void DIMENSION_BASE::SetStart( const wxPoint& aOrigin )
|
||||
{
|
||||
m_start = aOrigin;
|
||||
Update();
|
||||
}
|
||||
|
||||
|
||||
void DIMENSION::SetEnd( const wxPoint& aEnd )
|
||||
void DIMENSION_BASE::SetEnd( const wxPoint& aEnd )
|
||||
{
|
||||
m_end = aEnd;
|
||||
Update();
|
||||
}
|
||||
|
||||
|
||||
void DIMENSION::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
void DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
// for now, display only the text within the DIMENSION using class PCB_TEXT.
|
||||
wxString msg;
|
||||
|
@ -360,7 +360,7 @@ void DIMENSION::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
}
|
||||
|
||||
|
||||
std::shared_ptr<SHAPE> DIMENSION::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
|
||||
std::shared_ptr<SHAPE> DIMENSION_BASE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
|
||||
{
|
||||
std::shared_ptr<SHAPE_COMPOUND> effectiveShape = std::make_shared<SHAPE_COMPOUND>();
|
||||
|
||||
|
@ -373,7 +373,7 @@ std::shared_ptr<SHAPE> DIMENSION::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
|
|||
}
|
||||
|
||||
|
||||
bool DIMENSION::HitTest( const wxPoint& aPosition, int aAccuracy ) const
|
||||
bool DIMENSION_BASE::HitTest( const wxPoint& aPosition, int aAccuracy ) const
|
||||
{
|
||||
if( m_text.TextHitTest( aPosition ) )
|
||||
return true;
|
||||
|
@ -392,7 +392,7 @@ bool DIMENSION::HitTest( const wxPoint& aPosition, int aAccuracy ) const
|
|||
}
|
||||
|
||||
|
||||
bool DIMENSION::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
|
||||
bool DIMENSION_BASE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
|
||||
{
|
||||
EDA_RECT arect = aRect;
|
||||
arect.Inflate( aAccuracy );
|
||||
|
@ -409,7 +409,7 @@ bool DIMENSION::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy )
|
|||
}
|
||||
|
||||
|
||||
const EDA_RECT DIMENSION::GetBoundingBox() const
|
||||
const EDA_RECT DIMENSION_BASE::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT bBox;
|
||||
int xmin, xmax, ymin, ymax;
|
||||
|
@ -442,7 +442,7 @@ const EDA_RECT DIMENSION::GetBoundingBox() const
|
|||
}
|
||||
|
||||
|
||||
wxString DIMENSION::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
wxString DIMENSION_BASE::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
{
|
||||
return wxString::Format( _( "Dimension '%s' on %s" ),
|
||||
GetText(),
|
||||
|
@ -451,7 +451,7 @@ wxString DIMENSION::GetSelectMenuText( EDA_UNITS aUnits ) const
|
|||
|
||||
|
||||
|
||||
const BOX2I DIMENSION::ViewBBox() const
|
||||
const BOX2I DIMENSION_BASE::ViewBBox() const
|
||||
{
|
||||
BOX2I dimBBox = BOX2I( VECTOR2I( GetBoundingBox().GetPosition() ),
|
||||
VECTOR2I( GetBoundingBox().GetSize() ) );
|
||||
|
@ -461,7 +461,7 @@ const BOX2I DIMENSION::ViewBBox() const
|
|||
}
|
||||
|
||||
|
||||
OPT_VECTOR2I DIMENSION::segPolyIntersection( SHAPE_POLY_SET& aPoly, SEG& aSeg, bool aStart )
|
||||
OPT_VECTOR2I DIMENSION_BASE::segPolyIntersection( SHAPE_POLY_SET& aPoly, SEG& aSeg, bool aStart )
|
||||
{
|
||||
VECTOR2I start( aStart ? aSeg.A : aSeg.B );
|
||||
VECTOR2I endpoint( aStart ? aSeg.B : aSeg.A );
|
||||
|
@ -486,7 +486,7 @@ OPT_VECTOR2I DIMENSION::segPolyIntersection( SHAPE_POLY_SET& aPoly, SEG& aSeg, b
|
|||
|
||||
|
||||
ALIGNED_DIMENSION::ALIGNED_DIMENSION( BOARD_ITEM* aParent, KICAD_T aType ) :
|
||||
DIMENSION( aParent, aType ),
|
||||
DIMENSION_BASE( aParent, aType ),
|
||||
m_height( 0 )
|
||||
{
|
||||
// To preserve look of old dimensions, initialize extension height based on default arrow length
|
||||
|
@ -659,7 +659,7 @@ void ALIGNED_DIMENSION::updateText()
|
|||
m_text.SetTextAngle( textAngle );
|
||||
}
|
||||
|
||||
DIMENSION::updateText();
|
||||
DIMENSION_BASE::updateText();
|
||||
}
|
||||
|
||||
|
||||
|
@ -830,12 +830,12 @@ void ORTHOGONAL_DIMENSION::updateText()
|
|||
m_text.SetTextAngle( textAngle );
|
||||
}
|
||||
|
||||
DIMENSION::updateText();
|
||||
DIMENSION_BASE::updateText();
|
||||
}
|
||||
|
||||
|
||||
LEADER::LEADER( BOARD_ITEM* aParent ) :
|
||||
DIMENSION( aParent, PCB_DIM_LEADER_T ),
|
||||
DIMENSION_BASE( aParent, PCB_DIM_LEADER_T ),
|
||||
m_textFrame( DIM_TEXT_FRAME::NONE )
|
||||
{
|
||||
m_unitsFormat = DIM_UNITS_FORMAT::NO_SUFFIX;
|
||||
|
@ -964,7 +964,7 @@ void LEADER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM
|
|||
|
||||
|
||||
CENTER_DIMENSION::CENTER_DIMENSION( BOARD_ITEM* aParent ) :
|
||||
DIMENSION( aParent, PCB_DIM_CENTER_T )
|
||||
DIMENSION_BASE( aParent, PCB_DIM_CENTER_T )
|
||||
{
|
||||
m_unitsFormat = DIM_UNITS_FORMAT::NO_SUFFIX;
|
||||
m_overrideTextEnabled = true;
|
||||
|
@ -1035,8 +1035,8 @@ static struct DIMENSION_DESC
|
|||
DIMENSION_DESC()
|
||||
{
|
||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||
REGISTER_TYPE( DIMENSION );
|
||||
propMgr.InheritsAfter( TYPE_HASH( DIMENSION ), TYPE_HASH( BOARD_ITEM ) );
|
||||
REGISTER_TYPE( DIMENSION_BASE );
|
||||
propMgr.InheritsAfter( TYPE_HASH( DIMENSION_BASE ), TYPE_HASH( BOARD_ITEM ) );
|
||||
// TODO: add dimension properties:
|
||||
//propMgr.AddProperty( new PROPERTY<DIMENSION, int>( _HKI( "Height" ),
|
||||
//&DIMENSION::SetHeight, &DIMENSION::GetHeight, PROPERTY_DISPLAY::DISTANCE ) );
|
|
@ -22,13 +22,8 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_dimension.h
|
||||
* @brief DIMENSION class definition.
|
||||
*/
|
||||
|
||||
#ifndef DIMENSION_H_
|
||||
#define DIMENSION_H_
|
||||
#ifndef DIMENSION_H
|
||||
#define DIMENSION_H
|
||||
|
||||
|
||||
#include <class_board_item.h>
|
||||
|
@ -97,10 +92,10 @@ enum class DIM_TEXT_FRAME
|
|||
* - "crossbar" refers to the perpendicular line (usually with arrows at each end) between feature
|
||||
* lines on linear dimensions
|
||||
*/
|
||||
class DIMENSION : public BOARD_ITEM
|
||||
class DIMENSION_BASE : public BOARD_ITEM
|
||||
{
|
||||
public:
|
||||
DIMENSION( BOARD_ITEM* aParent, KICAD_T aType = PCB_DIMENSION_T );
|
||||
DIMENSION_BASE( BOARD_ITEM* aParent, KICAD_T aType = PCB_DIMENSION_T );
|
||||
|
||||
bool IsType( const KICAD_T aScanTypes[] ) const override
|
||||
{
|
||||
|
@ -160,11 +155,7 @@ public:
|
|||
wxString GetSuffix() const { return m_suffix; }
|
||||
void SetSuffix( const wxString& aSuffix );
|
||||
|
||||
void GetUnits( EDA_UNITS& aUnits ) const
|
||||
{
|
||||
aUnits = m_units;
|
||||
}
|
||||
|
||||
void GetUnits( EDA_UNITS& aUnits ) const { aUnits = m_units; }
|
||||
void SetUnits( EDA_UNITS aUnits );
|
||||
|
||||
DIM_UNITS_MODE GetUnitsMode() const;
|
||||
|
@ -335,7 +326,7 @@ protected:
|
|||
* The height (distance from features to crossbar) can be set directly, or set by manipulating the
|
||||
* crossbar start or end point (with the point editor).
|
||||
*/
|
||||
class ALIGNED_DIMENSION : public DIMENSION
|
||||
class ALIGNED_DIMENSION : public DIMENSION_BASE
|
||||
{
|
||||
protected:
|
||||
// Geometry
|
||||
|
@ -476,7 +467,7 @@ protected:
|
|||
* Point (a) is m_start, point (b) is m_end, point (c) is the end of the "text line"
|
||||
* The b-c line is drawn from b to the text center, and clipped on the text bounding box.
|
||||
*/
|
||||
class LEADER : public DIMENSION
|
||||
class LEADER : public DIMENSION_BASE
|
||||
{
|
||||
DIM_TEXT_FRAME m_textFrame;
|
||||
|
||||
|
@ -515,7 +506,7 @@ protected:
|
|||
* The size and orientation of the cross is adjustable.
|
||||
* m_start always marks the center being measured; m_end marks the end of one leg of the cross.
|
||||
*/
|
||||
class CENTER_DIMENSION : public DIMENSION
|
||||
class CENTER_DIMENSION : public DIMENSION_BASE
|
||||
{
|
||||
|
||||
public:
|
||||
|
@ -546,4 +537,4 @@ protected:
|
|||
void updateGeometry() override;
|
||||
};
|
||||
|
||||
#endif // DIMENSION_H_
|
||||
#endif // DIMENSION_H
|
|
@ -85,9 +85,9 @@ DRC_ENGINE::~DRC_ENGINE()
|
|||
|
||||
static bool isKeepoutZone( const BOARD_ITEM* aItem )
|
||||
{
|
||||
if( aItem && ( aItem->Type() == PCB_ZONE_AREA_T || aItem->Type() == PCB_FP_ZONE_AREA_T ) )
|
||||
if( aItem && ( aItem->Type() == PCB_ZONE_T || aItem->Type() == PCB_FP_ZONE_T ) )
|
||||
{
|
||||
const ZONE_CONTAINER* zone = static_cast<const ZONE_CONTAINER*>( aItem );
|
||||
const ZONE* zone = static_cast<const ZONE*>( aItem );
|
||||
|
||||
return zone->GetIsRuleArea() && ( zone->GetDoNotAllowTracks()
|
||||
|| zone->GetDoNotAllowVias()
|
||||
|
@ -357,9 +357,9 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
rule->AddConstraint( disallowConstraint );
|
||||
};
|
||||
|
||||
std::vector<ZONE_CONTAINER*> keepoutZones;
|
||||
std::vector<ZONE*> keepoutZones;
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( isKeepoutZone( zone ) )
|
||||
keepoutZones.push_back( zone );
|
||||
|
@ -367,14 +367,14 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
|
||||
for( MODULE* footprint : m_board->Modules() )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : footprint->Zones() )
|
||||
for( ZONE* zone : footprint->Zones() )
|
||||
{
|
||||
if( isKeepoutZone( zone ) )
|
||||
keepoutZones.push_back( zone );
|
||||
}
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : keepoutZones )
|
||||
for( ZONE* zone : keepoutZones )
|
||||
{
|
||||
wxString name = zone->GetZoneName();
|
||||
|
||||
|
@ -656,12 +656,12 @@ void DRC_ENGINE::RunTests( EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aT
|
|||
m_errorLimits[ ii ] = INT_MAX;
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
zone->CacheBoundingBox();
|
||||
|
||||
for( MODULE* module : m_board->Modules() )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : module->Zones() )
|
||||
for( ZONE* zone : module->Zones() )
|
||||
zone->CacheBoundingBox();
|
||||
|
||||
module->BuildPolyCourtyards();
|
||||
|
@ -829,8 +829,8 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRulesForItems( DRC_CONSTRAINT_TYPE_T aConstraintI
|
|||
case PCB_FP_SHAPE_T: mask = DRC_DISALLOW_GRAPHICS; break;
|
||||
case PCB_TEXT_T: mask = DRC_DISALLOW_TEXTS; break;
|
||||
case PCB_FP_TEXT_T: mask = DRC_DISALLOW_TEXTS; break;
|
||||
case PCB_ZONE_AREA_T: mask = DRC_DISALLOW_ZONES; break;
|
||||
case PCB_FP_ZONE_AREA_T: mask = DRC_DISALLOW_ZONES; break;
|
||||
case PCB_ZONE_T: mask = DRC_DISALLOW_ZONES; break;
|
||||
case PCB_FP_ZONE_T: mask = DRC_DISALLOW_ZONES; break;
|
||||
case PCB_LOCATE_HOLE_T: mask = DRC_DISALLOW_HOLES; break;
|
||||
default: mask = 0; break;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ class DRC_TEST_PROVIDER;
|
|||
class PCB_EDIT_FRAME;
|
||||
class BOARD_ITEM;
|
||||
class BOARD;
|
||||
class ZONE_CONTAINER;
|
||||
class MARKER_PCB;
|
||||
class NETCLASS;
|
||||
class NETLIST;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <eda_rect.h>
|
||||
#include <class_board_item.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <unordered_set>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <class_track.h>
|
||||
#include <class_module.h>
|
||||
#include <class_pad.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_text.h>
|
||||
|
||||
|
||||
|
@ -140,7 +140,7 @@ int DRC_TEST_PROVIDER::forEachGeometryItem( const std::vector<KICAD_T>& aTypes,
|
|||
{
|
||||
s_allBasicItems.push_back( (KICAD_T) i );
|
||||
|
||||
if( i != PCB_ZONE_AREA_T && i != PCB_FP_ZONE_AREA_T )
|
||||
if( i != PCB_ZONE_T && i != PCB_FP_ZONE_T )
|
||||
s_allBasicItemsButZones.push_back( (KICAD_T) i );
|
||||
}
|
||||
}
|
||||
|
@ -214,9 +214,9 @@ int DRC_TEST_PROVIDER::forEachGeometryItem( const std::vector<KICAD_T>& aTypes,
|
|||
}
|
||||
}
|
||||
|
||||
if( typeMask[ PCB_ZONE_AREA_T ] )
|
||||
if( typeMask[ PCB_ZONE_T ] )
|
||||
{
|
||||
for( ZONE_CONTAINER* item : brd->Zones() )
|
||||
for( ZONE* item : brd->Zones() )
|
||||
{
|
||||
if( (item->GetLayerSet() & aLayers).any() )
|
||||
{
|
||||
|
@ -284,9 +284,9 @@ int DRC_TEST_PROVIDER::forEachGeometryItem( const std::vector<KICAD_T>& aTypes,
|
|||
}
|
||||
}
|
||||
|
||||
if( typeMask[ PCB_FP_ZONE_AREA_T ] )
|
||||
if( typeMask[ PCB_FP_ZONE_T ] )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : mod->Zones() )
|
||||
for( ZONE* zone : mod->Zones() )
|
||||
{
|
||||
if( (zone->GetLayerSet() & aLayers).any() )
|
||||
{
|
||||
|
|
|
@ -117,7 +117,7 @@ bool DRC_TEST_PROVIDER_CONNECTIVITY::Run()
|
|||
}
|
||||
|
||||
/* test starved zones */
|
||||
for( ZONE_CONTAINER* zone : board->Zones() )
|
||||
for( ZONE* zone : board->Zones() )
|
||||
{
|
||||
if( m_drcEngine->IsErrorLimitExceeded( DRCE_ZONE_HAS_EMPTY_NET ) )
|
||||
break;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <drc/drc_item.h>
|
||||
#include <drc/drc_rule.h>
|
||||
#include <drc/drc_test_provider_clearance_base.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
|
||||
/*
|
||||
Copper clearance test. Checks all copper items (pads, vias, tracks, drawings, zones) for their electrical clearance.
|
||||
|
@ -96,8 +96,8 @@ private:
|
|||
DRC_RTREE m_copperTree;
|
||||
int m_drcEpsilon;
|
||||
|
||||
std::vector<ZONE_CONTAINER*> m_zones;
|
||||
std::map<ZONE_CONTAINER*, std::unique_ptr<DRC_RTREE>> m_zoneTrees;
|
||||
std::vector<ZONE*> m_zones;
|
||||
std::map<ZONE*, std::unique_ptr<DRC_RTREE>> m_zoneTrees;
|
||||
|
||||
};
|
||||
|
||||
|
@ -121,7 +121,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run()
|
|||
|
||||
m_zones.clear();
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( !zone->GetIsRuleArea() )
|
||||
m_zones.push_back( zone );
|
||||
|
@ -129,7 +129,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run()
|
|||
|
||||
for( MODULE* footprint : m_board->Modules() )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : footprint->Zones() )
|
||||
for( ZONE* zone : footprint->Zones() )
|
||||
{
|
||||
if( !zone->GetIsRuleArea() )
|
||||
m_zones.push_back( zone );
|
||||
|
@ -186,7 +186,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run()
|
|||
ii = 0;
|
||||
m_zoneTrees.clear();
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_zones )
|
||||
for( ZONE* zone : m_zones )
|
||||
{
|
||||
if( !reportProgress( ii++, m_zones.size(), delta ) )
|
||||
break;
|
||||
|
@ -308,7 +308,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( TRACK* track, SHA
|
|||
void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZones( BOARD_ITEM* aItem,
|
||||
PCB_LAYER_ID aLayer )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : m_zones )
|
||||
for( ZONE* zone : m_zones )
|
||||
{
|
||||
if( m_drcEngine->IsErrorLimitExceeded( DRCE_CLEARANCE ) )
|
||||
break;
|
||||
|
@ -588,7 +588,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZones()
|
|||
if( !reportProgress( layer_id * m_zones.size() + ia, B_Cu * m_zones.size(), delta ) )
|
||||
break;
|
||||
|
||||
ZONE_CONTAINER* zoneRef = m_zones[ia];
|
||||
ZONE* zoneRef = m_zones[ia];
|
||||
|
||||
if( !zoneRef->IsOnLayer( layer ) )
|
||||
continue;
|
||||
|
@ -597,7 +597,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZones()
|
|||
// Otherwise, we have already tested the zone combination
|
||||
for( size_t ia2 = ia + 1; ia2 < m_zones.size(); ia2++ )
|
||||
{
|
||||
ZONE_CONTAINER* zoneToTest = m_zones[ia2];
|
||||
ZONE* zoneToTest = m_zones[ia2];
|
||||
|
||||
if( zoneRef == zoneToTest )
|
||||
continue;
|
||||
|
|
|
@ -321,7 +321,7 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
|||
return true;
|
||||
};
|
||||
|
||||
forEachGeometryItem( { PCB_TRACE_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_AREA_T, PCB_ARC_T },
|
||||
forEachGeometryItem( { PCB_TRACE_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_T, PCB_ARC_T },
|
||||
LSET::AllCuMask(), addToTree );
|
||||
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ void DRC_TEST_PROVIDER_MISC::testDisabledLayers()
|
|||
};
|
||||
|
||||
// fixme: what about graphical items?
|
||||
forEachGeometryItem( { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_ZONE_AREA_T, PCB_PAD_T },
|
||||
forEachGeometryItem( { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_ZONE_T, PCB_PAD_T },
|
||||
LSET::AllLayersMask(), checkDisabledLayers );
|
||||
}
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <class_dimension.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_target.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_layer_box_selector.h>
|
||||
#include <dialog_drc.h>
|
||||
#include <connectivity/connectivity_data.h>
|
||||
|
@ -142,7 +142,7 @@ void PCB_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
|
|||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
ShowDimensionPropertiesDialog( static_cast<DIMENSION*>( aItem ) );
|
||||
ShowDimensionPropertiesDialog( static_cast<DIMENSION_BASE*>( aItem ) );
|
||||
break;
|
||||
|
||||
case PCB_FP_TEXT_T:
|
||||
|
@ -153,8 +153,8 @@ void PCB_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
|
|||
ShowGraphicItemPropertiesDialog( aItem );
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
Edit_Zone_Params( static_cast<ZONE_CONTAINER*>( aItem ) );
|
||||
case PCB_ZONE_T:
|
||||
Edit_Zone_Params( static_cast<ZONE*>( aItem ) );
|
||||
break;
|
||||
|
||||
case PCB_GROUP_T:
|
||||
|
@ -167,7 +167,7 @@ void PCB_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::ShowDimensionPropertiesDialog( DIMENSION* aDimension )
|
||||
void PCB_EDIT_FRAME::ShowDimensionPropertiesDialog( DIMENSION_BASE* aDimension )
|
||||
{
|
||||
if( aDimension == NULL )
|
||||
return;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <class_board_item.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
#include <ki_exception.h>
|
||||
|
@ -473,7 +473,7 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector<BOARD_ITEM*>& aObjec
|
|||
iu2hyp( track->GetEnd().x ), iu2hyp( track->GetEnd().y ),
|
||||
iu2hyp( track->GetWidth() ), (const char*) layerName.c_str() );
|
||||
}
|
||||
else if( ZONE_CONTAINER* zone = dyn_cast<ZONE_CONTAINER*>( item ) )
|
||||
else if( ZONE* zone = dyn_cast<ZONE*>( item ) )
|
||||
{
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
{
|
||||
|
@ -561,7 +561,7 @@ const std::vector<BOARD_ITEM*> HYPERLYNX_EXPORTER::collectNetObjects( int netcod
|
|||
rv.push_back( item );
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( check( zone ) )
|
||||
rv.push_back( zone );
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "class_module.h"
|
||||
#include "pcb_text.h"
|
||||
#include "class_track.h"
|
||||
#include "class_zone.h"
|
||||
#include "zone.h"
|
||||
#include "convert_to_biu.h"
|
||||
#include <filename_resolver.h>
|
||||
#include "plugins/3dapi/ifsg_all.h"
|
||||
|
@ -1002,7 +1002,7 @@ static void export_vrml_tracks( MODEL_VRML& aModel, BOARD* pcb )
|
|||
|
||||
static void export_vrml_zones( MODEL_VRML& aModel, BOARD* aPcb, COMMIT* aCommit )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : aPcb->Zones() )
|
||||
for( ZONE* zone : aPcb->Zones() )
|
||||
{
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
{
|
||||
|
@ -1017,7 +1017,7 @@ static void export_vrml_zones( MODEL_VRML& aModel, BOARD* aPcb, COMMIT* aCommit
|
|||
zone->SetFillMode( ZONE_FILL_MODE::POLYGONS ); // use filled polygons
|
||||
|
||||
// If the zone fill failed, don't try adding it to the export
|
||||
std::vector<ZONE_CONTAINER*> toFill = { zone };
|
||||
std::vector<ZONE*> toFill = { zone };
|
||||
|
||||
if( !filler.Fill( toFill ) )
|
||||
continue;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
|
||||
#include <board_stackup_manager/stackup_predefined_prms.h>
|
||||
#include <gbr_metadata.h>
|
||||
|
@ -514,7 +514,7 @@ void GERBER_JOBFILE_WRITER::addJSONDesignRules()
|
|||
minclearanceOuter = INT_MAX;
|
||||
minclearanceInner = INT_MAX;
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_pcb->Zones() )
|
||||
for( ZONE* zone : m_pcb->Zones() )
|
||||
{
|
||||
if( zone->GetIsRuleArea() || !zone->IsOnCopperLayer() )
|
||||
continue;
|
||||
|
|
|
@ -177,13 +177,13 @@ void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
|
|||
case PCB_FP_SHAPE_T :ShowGraphicItemPropertiesDialog( aItem );
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
{
|
||||
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( aItem );
|
||||
bool success = false;
|
||||
ZONE_SETTINGS zoneSettings;
|
||||
ZONE* zone = static_cast<ZONE*>( aItem );
|
||||
bool success = false;
|
||||
ZONE_SETTINGS zoneSettings;
|
||||
|
||||
zoneSettings << *static_cast<ZONE_CONTAINER*>( aItem );
|
||||
zoneSettings << *static_cast<ZONE*>( aItem );
|
||||
|
||||
if( zone->GetIsRuleArea() )
|
||||
{
|
||||
|
@ -203,7 +203,7 @@ void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
|
|||
BOARD_COMMIT commit( this );
|
||||
commit.Modify( zone );
|
||||
commit.Push( _( "Edit Zone" ) );
|
||||
zoneSettings.ExportSetting( *static_cast<ZONE_CONTAINER*>( aItem ) );
|
||||
zoneSettings.ExportSetting( *static_cast<ZONE*>( aItem ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
#ifndef FP_TEXT_H
|
||||
#define FP_TEXT_H
|
||||
|
||||
|
||||
#include <eda_text.h>
|
||||
#include <class_board_item.h>
|
||||
|
||||
|
||||
class LINE_READER;
|
||||
class EDA_RECT;
|
||||
class MODULE;
|
||||
|
@ -37,8 +35,6 @@ class MSG_PANEL_ITEM;
|
|||
class PCB_BASE_FRAME;
|
||||
class SHAPE;
|
||||
|
||||
#define UMBILICAL_COLOR LIGHTBLUE
|
||||
|
||||
|
||||
class FP_TEXT : public BOARD_ITEM, public EDA_TEXT
|
||||
{
|
||||
|
|
|
@ -199,11 +199,11 @@ void CLIPBOARD_IO::SaveSelection( const PCBNEW_SELECTION& aSelected, bool isModE
|
|||
footprint->Add( pad );
|
||||
copy = footprint;
|
||||
}
|
||||
else if( item->Type() == PCB_FP_ZONE_AREA_T )
|
||||
else if( item->Type() == PCB_FP_ZONE_T )
|
||||
{
|
||||
// Convert to PCB_ZONE_AREA_T
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
zone->InitDataFromSrcInCopyCtor( *static_cast<ZONE_CONTAINER*>( item ) );
|
||||
// Convert to PCB_ZONE_T
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
zone->InitDataFromSrcInCopyCtor( *static_cast<ZONE*>( item ) );
|
||||
copy = zone;
|
||||
}
|
||||
else if( item->Type() == PCB_GROUP_T )
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <class_module.h>
|
||||
#include <class_pad.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <netinfo.h>
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ void NETINFO_MAPPING::Update()
|
|||
nets.insert( 0 );
|
||||
|
||||
// Zones
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
nets.insert( zone->GetNetCode() );
|
||||
|
||||
// Tracks
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include <class_module.h>
|
||||
#include <class_pad.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <kicad_string.h>
|
||||
|
||||
#include "pcb_netlist.h"
|
||||
|
@ -483,7 +483,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
|
|||
|
||||
void BOARD_NETLIST_UPDATER::cacheCopperZoneConnections()
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() )
|
||||
continue;
|
||||
|
@ -556,7 +556,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
|||
}
|
||||
|
||||
// Test copper zones to detect "dead" nets (nets without any pad):
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() )
|
||||
continue;
|
||||
|
@ -686,7 +686,7 @@ bool BOARD_NETLIST_UPDATER::deleteSinglePadNets()
|
|||
// First, see if we have a copper zone attached to this pad.
|
||||
// If so, this is not really a single pad net
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
if( !zone->IsOnCopperLayer() )
|
||||
continue;
|
||||
|
|
|
@ -156,12 +156,12 @@ private:
|
|||
BOARD* m_board;
|
||||
REPORTER* m_reporter;
|
||||
|
||||
std::map< ZONE_CONTAINER*, std::vector<D_PAD*> > m_zoneConnectionsCache;
|
||||
std::map< wxString, wxString> m_oldToNewNets;
|
||||
std::map< D_PAD*, wxString > m_padNets;
|
||||
std::map< D_PAD*, wxString > m_padPinFunctions;
|
||||
std::vector<MODULE*> m_addedComponents;
|
||||
std::map<wxString, NETINFO_ITEM*> m_addedNets;
|
||||
std::map<ZONE*, std::vector<D_PAD*>> m_zoneConnectionsCache;
|
||||
std::map<wxString, wxString> m_oldToNewNets;
|
||||
std::map<D_PAD*, wxString> m_padNets;
|
||||
std::map<D_PAD*, wxString> m_padPinFunctions;
|
||||
std::vector<MODULE*> m_addedComponents;
|
||||
std::map<wxString, NETINFO_ITEM*> m_addedNets;
|
||||
|
||||
bool m_deleteSinglePadNets;
|
||||
bool m_deleteUnusedComponents;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <dialogs/dialog_grid_settings.h>
|
||||
#include <widgets/appearance_controls.h>
|
||||
#include <dialogs/eda_view_switcher.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
|
||||
|
@ -175,7 +175,7 @@ void PCB_BASE_EDIT_FRAME::unitsChangeRefresh()
|
|||
INSPECTOR_FUNC inspector =
|
||||
[units, view]( EDA_ITEM* aItem, void* aTestData )
|
||||
{
|
||||
DIMENSION* dimension = static_cast<DIMENSION*>( aItem );
|
||||
DIMENSION_BASE* dimension = static_cast<DIMENSION_BASE*>( aItem );
|
||||
|
||||
if( dimension->GetUnitsMode() == DIM_UNITS_MODE::AUTOMATIC )
|
||||
{
|
||||
|
|
|
@ -42,10 +42,10 @@ class VIA;
|
|||
class D_PAD;
|
||||
class PCB_TARGET;
|
||||
class PCB_GROUP;
|
||||
class DIMENSION;
|
||||
class DIMENSION_BASE;
|
||||
class DRC;
|
||||
class DIALOG_PLOT;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class GENERAL_COLLECTOR;
|
||||
class GENERAL_COLLECTORS_GUIDE;
|
||||
class SELECTION;
|
||||
|
@ -785,12 +785,11 @@ public:
|
|||
* Function Edit_Zone_Params
|
||||
* Edit params (layer, clearance, ...) for a zone outline
|
||||
*/
|
||||
void Edit_Zone_Params( ZONE_CONTAINER* zone_container );
|
||||
void Edit_Zone_Params( ZONE* zone_container );
|
||||
|
||||
// Properties dialogs
|
||||
void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
|
||||
void ShowDimensionPropertiesDialog( DIMENSION* aDimension );
|
||||
void ShowGroupPropertiesDialog( PCB_GROUP* aGroup );
|
||||
void ShowDimensionPropertiesDialog( DIMENSION_BASE* aDimension );
|
||||
void InstallNetlistFrame();
|
||||
|
||||
/**
|
||||
|
|
|
@ -218,7 +218,7 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
return;
|
||||
|
||||
auto insideZone =
|
||||
[&]( ZONE_CONTAINER* zone ) -> bool
|
||||
[&]( ZONE* zone ) -> bool
|
||||
{
|
||||
if( !zone )
|
||||
return false;
|
||||
|
@ -297,19 +297,19 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
|
||||
if( arg->AsString() == "A" )
|
||||
{
|
||||
if( insideZone( dynamic_cast<ZONE_CONTAINER*>( context->GetItem( 0 ) ) ) )
|
||||
if( insideZone( dynamic_cast<ZONE*>( context->GetItem( 0 ) ) ) )
|
||||
result->Set( 1.0 );
|
||||
}
|
||||
else if( arg->AsString() == "B" )
|
||||
{
|
||||
if( insideZone( dynamic_cast<ZONE_CONTAINER*>( context->GetItem( 1 ) ) ) )
|
||||
if( insideZone( dynamic_cast<ZONE*>( context->GetItem( 1 ) ) ) )
|
||||
result->Set( 1.0 );
|
||||
}
|
||||
else if( KIID::SniffTest( arg->AsString() ) )
|
||||
{
|
||||
KIID target( arg->AsString() );
|
||||
|
||||
for( ZONE_CONTAINER* candidate : item->GetBoard()->Zones() )
|
||||
for( ZONE* candidate : item->GetBoard()->Zones() )
|
||||
{
|
||||
// Only a single zone can match the UUID; exit once we find a match whether
|
||||
// "inside" or not
|
||||
|
@ -324,7 +324,7 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
|
||||
for( MODULE* module : item->GetBoard()->Modules() )
|
||||
{
|
||||
for( ZONE_CONTAINER* candidate : module->Zones() )
|
||||
for( ZONE* candidate : module->Zones() )
|
||||
{
|
||||
// Only a single zone can match the UUID; exit once we find a match whether
|
||||
// "inside" or not
|
||||
|
@ -340,7 +340,7 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
}
|
||||
else // Match on zone name
|
||||
{
|
||||
for( ZONE_CONTAINER* candidate : item->GetBoard()->Zones() )
|
||||
for( ZONE* candidate : item->GetBoard()->Zones() )
|
||||
{
|
||||
if( candidate->GetZoneName().Matches( arg->AsString() ) )
|
||||
{
|
||||
|
@ -355,7 +355,7 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
|
||||
for( MODULE* module : item->GetBoard()->Modules() )
|
||||
{
|
||||
for( ZONE_CONTAINER* candidate : module->Zones() )
|
||||
for( ZONE* candidate : module->Zones() )
|
||||
{
|
||||
// Many zones can match the name; exit only when we find an "inside"
|
||||
if( candidate->GetZoneName().Matches( arg->AsString() ) )
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
#include <class_pad.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <kicad_string.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <class_dimension.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_target.h>
|
||||
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <pcb_painter.h>
|
||||
|
@ -229,7 +229,7 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
|
|||
const BOARD_CONNECTED_ITEM* conItem = dynamic_cast<const BOARD_CONNECTED_ITEM*> ( aItem );
|
||||
|
||||
// Zones should pull from the copper layer
|
||||
if( item && item->Type() == PCB_ZONE_AREA_T && IsZoneLayer( aLayer ) )
|
||||
if( item && item->Type() == PCB_ZONE_T && IsZoneLayer( aLayer ) )
|
||||
aLayer = aLayer - LAYER_ZONE_START;
|
||||
|
||||
// Marker shadows
|
||||
|
@ -356,7 +356,7 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
|
|||
color.a *= m_viaOpacity;
|
||||
else if( item->Type() == PCB_PAD_T )
|
||||
color.a *= m_padOpacity;
|
||||
else if( item->Type() == PCB_ZONE_AREA_T || item->Type() == PCB_FP_ZONE_AREA_T )
|
||||
else if( item->Type() == PCB_ZONE_T || item->Type() == PCB_FP_ZONE_T )
|
||||
color.a *= m_zoneOpacity;
|
||||
|
||||
// No special modificators enabled
|
||||
|
@ -447,19 +447,19 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
|
|||
draw( static_cast<const PCB_GROUP*>( item ), aLayer );
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
draw( static_cast<const ZONE_CONTAINER*>( item ), aLayer );
|
||||
case PCB_ZONE_T:
|
||||
draw( static_cast<const ZONE*>( item ), aLayer );
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
draw( static_cast<const ZONE_CONTAINER*>( item ), aLayer );
|
||||
case PCB_FP_ZONE_T:
|
||||
draw( static_cast<const ZONE*>( item ), aLayer );
|
||||
break;
|
||||
|
||||
case PCB_DIM_ALIGNED_T:
|
||||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
draw( static_cast<const DIMENSION*>( item ), aLayer );
|
||||
draw( static_cast<const DIMENSION_BASE*>( item ), aLayer );
|
||||
break;
|
||||
|
||||
case PCB_TARGET_T:
|
||||
|
@ -1381,7 +1381,7 @@ void PCB_PAINTER::draw( const PCB_GROUP* aGroup, int aLayer )
|
|||
}
|
||||
|
||||
|
||||
void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone, int aLayer )
|
||||
void PCB_PAINTER::draw( const ZONE* aZone, int aLayer )
|
||||
{
|
||||
/**
|
||||
* aLayer will be the virtual zone layer (LAYER_ZONE_START, ... in GAL_LAYER_ID)
|
||||
|
@ -1465,7 +1465,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone, int aLayer )
|
|||
}
|
||||
|
||||
|
||||
void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer )
|
||||
void PCB_PAINTER::draw( const DIMENSION_BASE* aDimension, int aLayer )
|
||||
{
|
||||
const COLOR4D& strokeColor = m_pcbSettings.GetColor( aDimension, aLayer );
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ class D_PAD;
|
|||
class PCB_SHAPE;
|
||||
class PCB_GROUP;
|
||||
class MODULE;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class PCB_TEXT;
|
||||
class FP_TEXT;
|
||||
class DIMENSION;
|
||||
class DIMENSION_BASE;
|
||||
class PCB_TARGET;
|
||||
class MARKER_PCB;
|
||||
class NET_SETTINGS;
|
||||
|
@ -290,8 +290,8 @@ protected:
|
|||
void draw( const FP_TEXT* aText, int aLayer );
|
||||
void draw( const MODULE* aModule, int aLayer );
|
||||
void draw( const PCB_GROUP* aGroup, int aLayer );
|
||||
void draw( const ZONE_CONTAINER* aZone, int aLayer );
|
||||
void draw( const DIMENSION* aDimension, int aLayer );
|
||||
void draw( const ZONE* aZone, int aLayer );
|
||||
void draw( const DIMENSION_BASE* aDimension, int aLayer );
|
||||
void draw( const PCB_TARGET* aTarget );
|
||||
void draw( const MARKER_PCB* aMarker, int aLayer );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 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
|
||||
|
@ -24,14 +24,9 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_pcb_target.cpp
|
||||
* PCB_TARGET class definition - targets for photo plots, formerly called MIRE (from French 'mire optique')
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <class_board.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <base_units.h>
|
||||
#include <settings/color_settings.h>
|
||||
#include <settings/settings_manager.h>
|
|
@ -22,13 +22,8 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_pcb_target.h
|
||||
* @brief PCB_TARGET class definition. (targets for photo plots).
|
||||
*/
|
||||
|
||||
#ifndef PCB_TARGET_H_
|
||||
#define PCB_TARGET_H_
|
||||
#ifndef PCB_TARGET_H
|
||||
#define PCB_TARGET_H
|
||||
|
||||
#include <class_board_item.h>
|
||||
|
|
@ -41,12 +41,12 @@ class PLOTTER;
|
|||
class PCB_TEXT;
|
||||
class D_PAD;
|
||||
class PCB_SHAPE;
|
||||
class DIMENSION;
|
||||
class DIMENSION_BASE;
|
||||
class MODULE;
|
||||
class FP_SHAPE;
|
||||
class PCB_TARGET;
|
||||
class FP_TEXT;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class BOARD;
|
||||
class REPORTER;
|
||||
class wxFileName;
|
||||
|
@ -100,9 +100,9 @@ public:
|
|||
*/
|
||||
void PlotFootprintTextItems( MODULE* aModule );
|
||||
|
||||
void PlotDimension( DIMENSION* Dimension );
|
||||
void PlotDimension( DIMENSION_BASE* Dimension );
|
||||
void PlotPcbTarget( PCB_TARGET* PtMire );
|
||||
void PlotFilledAreas( ZONE_CONTAINER* aZone, SHAPE_POLY_SET& aPolysList );
|
||||
void PlotFilledAreas( ZONE* aZone, SHAPE_POLY_SET& aPolysList );
|
||||
void PlotPcbText( PCB_TEXT* aText );
|
||||
void PlotPcbShape( PCB_SHAPE* aShape );
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
#include <class_track.h>
|
||||
#include <fp_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <class_dimension.h>
|
||||
#include <pcb_target.h>
|
||||
#include <dimension.h>
|
||||
|
||||
#include <pcbplot.h>
|
||||
#include <pcb_painter.h>
|
||||
|
@ -487,7 +487,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
|||
|
||||
NETINFO_ITEM nonet( aBoard );
|
||||
|
||||
for( ZONE_CONTAINER* zone : aBoard->Zones() )
|
||||
for( ZONE* zone : aBoard->Zones() )
|
||||
{
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
{
|
||||
|
@ -510,7 +510,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
|||
|
||||
if( !islands.IsEmpty() )
|
||||
{
|
||||
ZONE_CONTAINER dummy( *zone );
|
||||
ZONE dummy( *zone );
|
||||
dummy.SetNet( &nonet );
|
||||
itemplotter.PlotFilledAreas( &dummy, islands );
|
||||
}
|
||||
|
@ -809,7 +809,7 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
|||
int zone_margin = 0;
|
||||
#endif
|
||||
|
||||
for( ZONE_CONTAINER* zone : aBoard->Zones() )
|
||||
for( ZONE* zone : aBoard->Zones() )
|
||||
{
|
||||
if( zone->GetLayer() != layer )
|
||||
continue;
|
||||
|
@ -829,12 +829,12 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
|||
}
|
||||
|
||||
#if !NEW_ALGO
|
||||
// To avoid a lot of code, use a ZONE_CONTAINER to handle and plot polygons, because our
|
||||
// polygons look exactly like filled areas in zones.
|
||||
// To avoid a lot of code, use a ZONE to handle and plot polygons, because our polygons look
|
||||
// exactly like filled areas in zones.
|
||||
// Note, also this code is not optimized: it creates a lot of copy/duplicate data.
|
||||
// However it is not complex, and fast enough for plot purposes (copy/convert data is only a
|
||||
// very small calculation time for these calculations).
|
||||
ZONE_CONTAINER zone( aBoard );
|
||||
ZONE zone( aBoard );
|
||||
zone.SetMinThickness( 0 ); // trace polygons only
|
||||
zone.SetLayer( layer );
|
||||
// Combine the current areas to initial areas. This is mandatory because inflate/deflate
|
||||
|
|
|
@ -53,16 +53,16 @@
|
|||
|
||||
#include <class_board.h>
|
||||
#include <class_board_item.h> // for BOARD_ITEM, S_CIRCLE
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_module.h>
|
||||
#include <fp_text.h> // for FP_TEXT
|
||||
#include <class_track.h>
|
||||
#include <class_pad.h> // for D_PAD
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
|
||||
#include <wx/debug.h> // for wxASSERT_MSG
|
||||
#include <wx/wx.h> // for wxPoint, wxSize, wxArra...
|
||||
|
@ -357,7 +357,7 @@ void BRDITEMS_PLOTTER::PlotBoardGraphicItems()
|
|||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
if( item->GetLayer() != Edge_Cuts )
|
||||
PlotDimension( (DIMENSION*) item );
|
||||
PlotDimension( (DIMENSION_BASE*) item );
|
||||
|
||||
break;
|
||||
|
||||
|
@ -406,7 +406,7 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItem( FP_TEXT* aTextMod, COLOR4D aColor
|
|||
}
|
||||
|
||||
|
||||
void BRDITEMS_PLOTTER::PlotDimension( DIMENSION* aDim )
|
||||
void BRDITEMS_PLOTTER::PlotDimension( DIMENSION_BASE* aDim )
|
||||
{
|
||||
if( !m_layerMask[aDim->GetLayer()] )
|
||||
return;
|
||||
|
@ -746,7 +746,7 @@ void BRDITEMS_PLOTTER::PlotPcbText( PCB_TEXT* aText )
|
|||
}
|
||||
|
||||
|
||||
void BRDITEMS_PLOTTER::PlotFilledAreas( ZONE_CONTAINER* aZone, SHAPE_POLY_SET& polysList )
|
||||
void BRDITEMS_PLOTTER::PlotFilledAreas( ZONE* aZone, SHAPE_POLY_SET& polysList )
|
||||
{
|
||||
if( polysList.IsEmpty() )
|
||||
return;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <plugins/altium/altium_parser_utils.h>
|
||||
|
||||
#include <class_board.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_track.h>
|
||||
|
@ -1226,7 +1226,7 @@ void ALTIUM_PCB::ParsePolygons6Data(
|
|||
continue;
|
||||
}
|
||||
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
m_polygons.emplace_back( zone );
|
||||
|
||||
|
@ -1313,7 +1313,7 @@ void ALTIUM_PCB::ParsePolygons6Data(
|
|||
}
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
|
@ -1391,7 +1391,7 @@ void ALTIUM_PCB::ParseShapeBasedRegions6Data(
|
|||
continue;
|
||||
}
|
||||
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
zone->SetIsRuleArea( true );
|
||||
|
@ -1423,7 +1423,7 @@ void ALTIUM_PCB::ParseShapeBasedRegions6Data(
|
|||
}
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
}
|
||||
else if( elem.kind == ALTIUM_REGION_KIND::COPPER )
|
||||
{
|
||||
|
@ -1477,12 +1477,10 @@ void ALTIUM_PCB::ParseRegions6Data(
|
|||
{
|
||||
ALTIUM_PARSER reader( aReader, aEntry );
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_polygons )
|
||||
for( ZONE* zone : m_polygons )
|
||||
{
|
||||
if( zone != nullptr )
|
||||
{
|
||||
if( zone )
|
||||
zone->UnFill(); // just to be sure
|
||||
}
|
||||
}
|
||||
|
||||
while( reader.GetRemainingBytes() >= 4 /* TODO: use Header section of file */ )
|
||||
|
@ -1499,7 +1497,7 @@ void ALTIUM_PCB::ParseRegions6Data(
|
|||
elem.subpolyindex, m_polygons.size() ) );
|
||||
}
|
||||
|
||||
ZONE_CONTAINER *zone = m_polygons.at(elem.subpolyindex);
|
||||
ZONE *zone = m_polygons.at( elem.subpolyindex );
|
||||
|
||||
if( zone == nullptr )
|
||||
{
|
||||
|
@ -1571,7 +1569,7 @@ void ALTIUM_PCB::ParseArcs6Data( const CFB::CompoundFileReader& aReader,
|
|||
shape.SetArcStart( elem.center + arcStartOffset );
|
||||
}
|
||||
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
zone->SetIsRuleArea( true );
|
||||
|
@ -1604,7 +1602,7 @@ void ALTIUM_PCB::ParseArcs6Data( const CFB::CompoundFileReader& aReader,
|
|||
zone->Outline()->Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE ); // the outline is not a single polygon!
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2143,7 +2141,7 @@ void ALTIUM_PCB::ParseTracks6Data( const CFB::CompoundFileReader& aReader,
|
|||
shape.SetEnd( elem.end );
|
||||
shape.SetWidth( elem.width );
|
||||
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
zone->SetIsRuleArea( true );
|
||||
|
@ -2175,7 +2173,7 @@ void ALTIUM_PCB::ParseTracks6Data( const CFB::CompoundFileReader& aReader,
|
|||
ERROR_INSIDE );
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2425,7 +2423,7 @@ void ALTIUM_PCB::ParseFills6Data(
|
|||
|
||||
if( elem.is_keepout || elem.net != ALTIUM_NET_UNCONNECTED )
|
||||
{
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
zone->SetNetCode( GetNetCode( elem.net ) );
|
||||
|
@ -2457,7 +2455,7 @@ void ALTIUM_PCB::ParseFills6Data(
|
|||
zone->Rotate( center, elem.rotation * 10 );
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -84,7 +84,7 @@ enum class ALTIUM_PCB_DIR
|
|||
class BOARD;
|
||||
class PCB_SHAPE;
|
||||
class MODULE;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -184,13 +184,13 @@ private:
|
|||
|
||||
BOARD* m_board;
|
||||
std::vector<MODULE*> m_components;
|
||||
std::vector<ZONE_CONTAINER*> m_polygons;
|
||||
std::vector<ZONE*> m_polygons;
|
||||
std::map<wxString, wxString> m_models;
|
||||
size_t m_num_nets;
|
||||
std::map<ALTIUM_LAYER, PCB_LAYER_ID> m_layermap; // used to correctly map copper layers
|
||||
std::map<ALTIUM_RULE_KIND, std::vector<ARULE6>> m_rules;
|
||||
|
||||
std::map<ALTIUM_LAYER, ZONE_CONTAINER*> m_outer_plane;
|
||||
std::map<ALTIUM_LAYER, ZONE*> m_outer_plane;
|
||||
|
||||
/// Altium stores pour order across all layers
|
||||
int m_highest_pour_index;
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
|
||||
#include <board_stackup_manager/stackup_predefined_prms.h> // KEY_COPPER, KEY_CORE, KEY_PREPREG
|
||||
#include <class_board.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_module.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
#include <trigo.h>
|
||||
|
||||
|
@ -662,8 +662,8 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryAreas( const SYMDEF_PCB& aComponent,
|
|||
|
||||
if( area.NoVias || area.NoTracks )
|
||||
{
|
||||
ZONE_CONTAINER* zone = getZoneFromCadstarShape(
|
||||
area.Shape, getLineThickness( area.LineCodeID ), aModule );
|
||||
ZONE* zone = getZoneFromCadstarShape( area.Shape, getLineThickness( area.LineCodeID ),
|
||||
aModule );
|
||||
|
||||
aModule->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
|
@ -1137,8 +1137,8 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadAreas()
|
|||
|
||||
if( area.NoVias || area.NoTracks || area.Keepout || area.Routing )
|
||||
{
|
||||
ZONE_CONTAINER* zone = getZoneFromCadstarShape(
|
||||
area.Shape, getLineThickness( area.LineCodeID ), mBoard );
|
||||
ZONE* zone = getZoneFromCadstarShape( area.Shape, getLineThickness( area.LineCodeID ),
|
||||
mBoard );
|
||||
|
||||
mBoard->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
|
@ -1327,8 +1327,8 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadTemplates()
|
|||
{
|
||||
TEMPLATE& csTemplate = tempPair.second;
|
||||
|
||||
ZONE_CONTAINER* zone = getZoneFromCadstarShape(
|
||||
csTemplate.Shape, getLineThickness( csTemplate.LineCodeID ), mBoard );
|
||||
ZONE* zone = getZoneFromCadstarShape( csTemplate.Shape,
|
||||
getLineThickness( csTemplate.LineCodeID ), mBoard );
|
||||
|
||||
mBoard->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
|
@ -1450,11 +1450,10 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadTemplates()
|
|||
for( std::pair<BOARD_ID, BOARD> boardPair : Layout.Boards )
|
||||
{
|
||||
//create a zone in each board shape
|
||||
BOARD_DESIGN_SETTINGS& bds = mBoard->GetDesignSettings();
|
||||
BOARD& board = boardPair.second;
|
||||
int defaultLineThicknesss =
|
||||
mBoard->GetDesignSettings().GetLineThickness( PCB_LAYER_ID::Edge_Cuts );
|
||||
ZONE_CONTAINER* zone =
|
||||
getZoneFromCadstarShape( board.Shape, defaultLineThicknesss, mBoard );
|
||||
int defaultLineThicknesss = bds.GetLineThickness( PCB_LAYER_ID::Edge_Cuts );
|
||||
ZONE* zone = getZoneFromCadstarShape( board.Shape, defaultLineThicknesss, mBoard );
|
||||
|
||||
mBoard->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
|
@ -1523,8 +1522,9 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadCoppers()
|
|||
}
|
||||
else
|
||||
{
|
||||
ZONE_CONTAINER* zone = getZoneFromCadstarShape( csCopper.Shape,
|
||||
getKiCadLength( getCopperCode( csCopper.CopperCodeID ).CopperWidth ), mBoard );
|
||||
ZONE* zone = getZoneFromCadstarShape( csCopper.Shape,
|
||||
getKiCadLength( getCopperCode( csCopper.CopperCodeID ).CopperWidth ),
|
||||
mBoard );
|
||||
|
||||
mBoard->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
|
@ -2077,10 +2077,11 @@ PCB_SHAPE* CADSTAR_PCB_ARCHIVE_LOADER::getDrawSegmentFromVertex( const POINT& aC
|
|||
}
|
||||
|
||||
|
||||
ZONE_CONTAINER* CADSTAR_PCB_ARCHIVE_LOADER::getZoneFromCadstarShape( const SHAPE& aCadstarShape,
|
||||
const int& aLineThickness, BOARD_ITEM_CONTAINER* aParentContainer )
|
||||
ZONE* CADSTAR_PCB_ARCHIVE_LOADER::getZoneFromCadstarShape( const SHAPE& aCadstarShape,
|
||||
const int& aLineThickness,
|
||||
BOARD_ITEM_CONTAINER* aParentContainer )
|
||||
{
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( aParentContainer, isModule( aParentContainer ) );
|
||||
ZONE* zone = new ZONE( aParentContainer, isModule( aParentContainer ) );
|
||||
|
||||
if( aCadstarShape.Type == SHAPE_TYPE::HATCHED )
|
||||
{
|
||||
|
|
|
@ -266,10 +266,10 @@ private:
|
|||
* @param aCadstarShape
|
||||
* @param aLineThickness Thickness of line to draw with
|
||||
* @param aParentContainer Parent object (e.g. mBoard or a MODULE pointer)
|
||||
* @return Pointer to ZONE_CONTAINER. Caller owns the object.
|
||||
* @return Pointer to ZONE. Caller owns the object.
|
||||
*/
|
||||
ZONE_CONTAINER* getZoneFromCadstarShape( const SHAPE& aCadstarShape, const int& aLineThickness,
|
||||
BOARD_ITEM_CONTAINER* aParentContainer );
|
||||
ZONE* getZoneFromCadstarShape( const SHAPE& aCadstarShape, const int& aLineThickness,
|
||||
BOARD_ITEM_CONTAINER* aParentContainer );
|
||||
|
||||
/**
|
||||
* @brief Returns a SHAPE_POLY_SET object from a Cadstar SHAPE
|
||||
|
|
|
@ -68,9 +68,9 @@ Load() TODO's
|
|||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
|
||||
#include <plugins/eagle/eagle_plugin.h>
|
||||
|
||||
|
@ -174,7 +174,7 @@ static wxString interpret_text( const wxString& aText )
|
|||
}
|
||||
|
||||
|
||||
static void setKeepoutSettingsToZone( ZONE_CONTAINER* aZone, LAYER_NUM aLayer )
|
||||
static void setKeepoutSettingsToZone( ZONE* aZone, LAYER_NUM aLayer )
|
||||
{
|
||||
if( aLayer == EAGLE_LAYER::TRESTRICT || aLayer == EAGLE_LAYER::BRESTRICT )
|
||||
{
|
||||
|
@ -734,7 +734,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
if( c.layer == EAGLE_LAYER::TRESTRICT || c.layer == EAGLE_LAYER::BRESTRICT
|
||||
|| c.layer == EAGLE_LAYER::VRESTRICT )
|
||||
{
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
setKeepoutSettingsToZone( zone, c.layer );
|
||||
|
@ -762,7 +762,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
}
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -801,7 +801,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
if( IsCopperLayer( layer ) )
|
||||
{
|
||||
// use a "netcode = 0" type ZONE:
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
zone->SetLayer( layer );
|
||||
|
@ -819,7 +819,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
zone->Rotate( zone->GetPosition(), r.rot->degrees * 10 );
|
||||
|
||||
// this is not my fault:
|
||||
zone->SetBorderDisplayStyle( outline_hatch, ZONE_CONTAINER::GetDefaultHatchPitch(),
|
||||
zone->SetBorderDisplayStyle( outline_hatch, ZONE::GetDefaultHatchPitch(),
|
||||
true );
|
||||
}
|
||||
|
||||
|
@ -1236,20 +1236,20 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
}
|
||||
|
||||
|
||||
ZONE_CONTAINER* EAGLE_PLUGIN::loadPolygon( wxXmlNode* aPolyNode )
|
||||
ZONE* EAGLE_PLUGIN::loadPolygon( wxXmlNode* aPolyNode )
|
||||
{
|
||||
EPOLYGON p( aPolyNode );
|
||||
EPOLYGON p( aPolyNode );
|
||||
PCB_LAYER_ID layer = kicad_layer( p.layer );
|
||||
ZONE_CONTAINER* zone = nullptr;
|
||||
bool keepout = ( p.layer == EAGLE_LAYER::TRESTRICT
|
||||
|| p.layer == EAGLE_LAYER::BRESTRICT
|
||||
|| p.layer == EAGLE_LAYER::VRESTRICT );
|
||||
ZONE* zone = nullptr;
|
||||
bool keepout = ( p.layer == EAGLE_LAYER::TRESTRICT
|
||||
|| p.layer == EAGLE_LAYER::BRESTRICT
|
||||
|| p.layer == EAGLE_LAYER::VRESTRICT );
|
||||
|
||||
if( !IsCopperLayer( layer ) && !keepout )
|
||||
return nullptr;
|
||||
|
||||
// use a "netcode = 0" type ZONE:
|
||||
zone = new ZONE_CONTAINER( m_board );
|
||||
zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
if( !keepout )
|
||||
|
@ -1854,7 +1854,7 @@ void EAGLE_PLUGIN::packageRectangle( MODULE* aModule, wxXmlNode* aTree ) const
|
|||
if( r.layer == EAGLE_LAYER::TRESTRICT || r.layer == EAGLE_LAYER::BRESTRICT
|
||||
|| r.layer == EAGLE_LAYER::VRESTRICT )
|
||||
{
|
||||
MODULE_ZONE_CONTAINER* zone = new MODULE_ZONE_CONTAINER( aModule );
|
||||
FP_ZONE* zone = new FP_ZONE( aModule );
|
||||
aModule->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
setKeepoutSettingsToZone( zone, r.layer );
|
||||
|
@ -1873,7 +1873,7 @@ void EAGLE_PLUGIN::packageRectangle( MODULE* aModule, wxXmlNode* aTree ) const
|
|||
}
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1968,7 +1968,7 @@ void EAGLE_PLUGIN::packagePolygon( MODULE* aModule, wxXmlNode* aTree ) const
|
|||
|| p.layer == EAGLE_LAYER::BRESTRICT
|
||||
|| p.layer == EAGLE_LAYER::VRESTRICT )
|
||||
{
|
||||
MODULE_ZONE_CONTAINER* zone = new MODULE_ZONE_CONTAINER( aModule );
|
||||
FP_ZONE* zone = new FP_ZONE( aModule );
|
||||
aModule->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
setKeepoutSettingsToZone( zone, p.layer );
|
||||
|
@ -1978,7 +1978,7 @@ void EAGLE_PLUGIN::packagePolygon( MODULE* aModule, wxXmlNode* aTree ) const
|
|||
zone->Outline()->AddOutline( outline );
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2010,7 +2010,7 @@ void EAGLE_PLUGIN::packageCircle( MODULE* aModule, wxXmlNode* aTree ) const
|
|||
|| e.layer == EAGLE_LAYER::BRESTRICT
|
||||
|| e.layer == EAGLE_LAYER::VRESTRICT )
|
||||
{
|
||||
MODULE_ZONE_CONTAINER* zone = new MODULE_ZONE_CONTAINER( aModule );
|
||||
FP_ZONE* zone = new FP_ZONE( aModule );
|
||||
aModule->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
setKeepoutSettingsToZone( zone, e.layer );
|
||||
|
@ -2038,7 +2038,7 @@ void EAGLE_PLUGIN::packageCircle( MODULE* aModule, wxXmlNode* aTree ) const
|
|||
}
|
||||
|
||||
zone->SetBorderDisplayStyle( ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE,
|
||||
ZONE_CONTAINER::GetDefaultHatchPitch(), true );
|
||||
ZONE::GetDefaultHatchPitch(), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2436,7 +2436,7 @@ void EAGLE_PLUGIN::loadSignals( wxXmlNode* aSignals )
|
|||
{
|
||||
// KiCad does not support an unconnected zone with its own non-zero netcode,
|
||||
// but only when assigned netcode = 0 w/o a name...
|
||||
for( ZONE_CONTAINER* zone : zones )
|
||||
for( ZONE* zone : zones )
|
||||
zone->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||
|
||||
// therefore omit this signal/net.
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
|
||||
class D_PAD;
|
||||
class FP_TEXT;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
|
||||
typedef std::map<wxString, MODULE*> MODULE_MAP;
|
||||
typedef std::vector<ZONE_CONTAINER*> ZONES;
|
||||
typedef std::vector<ZONE*> ZONES;
|
||||
typedef std::map<wxString, ENET> NET_MAP;
|
||||
typedef NET_MAP::const_iterator NET_MAP_CITER;
|
||||
|
||||
|
@ -247,7 +247,7 @@ private:
|
|||
*
|
||||
* @return The loaded zone or nullptr if was not processed.
|
||||
*/
|
||||
ZONE_CONTAINER* loadPolygon( wxXmlNode* aPolyNode );
|
||||
ZONE* loadPolygon( wxXmlNode* aPolyNode );
|
||||
|
||||
void orientModuleAndText( MODULE* m, const EELEMENT& e, const EATTR* nameAttr, const EATTR* valueAttr );
|
||||
void orientModuleText( MODULE* m, const EELEMENT& e, FP_TEXT* txt, const EATTR* a );
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <fp_shape.h>
|
||||
#include <confirm.h>
|
||||
#include <locale_io.h>
|
||||
|
@ -396,7 +396,7 @@ void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const
|
|||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
format( static_cast<DIMENSION*>( aItem ), aNestLevel );
|
||||
format( static_cast<DIMENSION_BASE*>( aItem ), aNestLevel );
|
||||
break;
|
||||
|
||||
case PCB_SHAPE_T:
|
||||
|
@ -437,9 +437,9 @@ void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const
|
|||
format( static_cast<TRACK*>( aItem ), aNestLevel );
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_ZONE_AREA_T:
|
||||
format( static_cast<ZONE_CONTAINER*>( aItem ), aNestLevel );
|
||||
case PCB_FP_ZONE_T:
|
||||
case PCB_ZONE_T:
|
||||
format( static_cast<ZONE*>( aItem ), aNestLevel );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -665,7 +665,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
|
|||
}
|
||||
|
||||
|
||||
void PCB_IO::format( DIMENSION* aDimension, int aNestLevel ) const
|
||||
void PCB_IO::format( DIMENSION_BASE* aDimension, int aNestLevel ) const
|
||||
{
|
||||
ALIGNED_DIMENSION* aligned = dynamic_cast<ALIGNED_DIMENSION*>( aDimension );
|
||||
ORTHOGONAL_DIMENSION* ortho = dynamic_cast<ORTHOGONAL_DIMENSION*>( aDimension );
|
||||
|
@ -1730,10 +1730,10 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const
|
|||
}
|
||||
|
||||
|
||||
void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const
|
||||
void PCB_IO::format( ZONE* aZone, int aNestLevel ) const
|
||||
{
|
||||
// Save the NET info; For keepout zones, net code and net name are irrelevant
|
||||
// so be sure a dummy value is stored, just for ZONE_CONTAINER compatibility
|
||||
// so be sure a dummy value is stored, just for ZONE compatibility
|
||||
// (perhaps netcode and netname should be not stored)
|
||||
m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)",
|
||||
aZone->GetIsRuleArea() ? 0 : m_mapping->Translate( aZone->GetNetCode() ),
|
||||
|
|
|
@ -35,7 +35,7 @@ class FP_CACHE;
|
|||
class PCB_PARSER;
|
||||
class NETINFO_MAPPING;
|
||||
class BOARD_DESIGN_SETTINGS;
|
||||
class DIMENSION;
|
||||
class DIMENSION_BASE;
|
||||
class FP_SHAPE;
|
||||
class PCB_SHAPE;
|
||||
class PCB_TARGET;
|
||||
|
@ -43,7 +43,7 @@ class D_PAD;
|
|||
class FP_TEXT;
|
||||
class PCB_GROUP;
|
||||
class TRACK;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class PCB_TEXT;
|
||||
|
||||
|
||||
|
@ -258,7 +258,7 @@ protected:
|
|||
private:
|
||||
void format( BOARD* aBoard, int aNestLevel = 0 ) const;
|
||||
|
||||
void format( DIMENSION* aDimension, int aNestLevel = 0 ) const;
|
||||
void format( DIMENSION_BASE* aDimension, int aNestLevel = 0 ) const;
|
||||
|
||||
void format( FP_SHAPE* aModuleDrawing, int aNestLevel = 0 ) const;
|
||||
|
||||
|
@ -278,7 +278,7 @@ private:
|
|||
|
||||
void format( TRACK* aTrack, int aNestLevel = 0 ) const;
|
||||
|
||||
void format( ZONE_CONTAINER* aZone, int aNestLevel = 0 ) const;
|
||||
void format( ZONE* aZone, int aNestLevel = 0 ) const;
|
||||
|
||||
void formatLayer( const BOARD_ITEM* aItem ) const;
|
||||
|
||||
|
|
|
@ -36,16 +36,16 @@
|
|||
|
||||
#include <advanced_config.h>
|
||||
#include <class_board.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_pcb_group.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <class_module.h>
|
||||
#include <netclass.h>
|
||||
#include <class_pad.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <plugins/kicad/kicad_plugin.h>
|
||||
#include <pcb_plot_params_parser.h>
|
||||
#include <pcb_plot_params.h>
|
||||
|
@ -635,7 +635,7 @@ BOARD* PCB_PARSER::parseBOARD_unchecked()
|
|||
break;
|
||||
|
||||
case T_zone:
|
||||
m_board->Add( parseZONE_CONTAINER( m_board ), ADD_MODE::APPEND );
|
||||
m_board->Add( parseZONE( m_board ), ADD_MODE::APPEND );
|
||||
break;
|
||||
|
||||
case T_target:
|
||||
|
@ -2360,14 +2360,14 @@ PCB_TEXT* PCB_PARSER::parsePCB_TEXT()
|
|||
}
|
||||
|
||||
|
||||
DIMENSION* PCB_PARSER::parseDIMENSION()
|
||||
DIMENSION_BASE* PCB_PARSER::parseDIMENSION()
|
||||
{
|
||||
wxCHECK_MSG( CurTok() == T_dimension, NULL,
|
||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as DIMENSION." ) );
|
||||
|
||||
T token;
|
||||
|
||||
std::unique_ptr<DIMENSION> dimension;
|
||||
std::unique_ptr<DIMENSION_BASE> dimension;
|
||||
|
||||
// skip value that used to be saved
|
||||
if( NextTok() != T_LEFT )
|
||||
|
@ -3056,7 +3056,7 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments )
|
|||
|
||||
case T_zone:
|
||||
{
|
||||
ZONE_CONTAINER* zone = parseZONE_CONTAINER( module.get() );
|
||||
ZONE* zone = parseZONE( module.get() );
|
||||
module->Add( zone, ADD_MODE::APPEND );
|
||||
}
|
||||
break;
|
||||
|
@ -4260,35 +4260,35 @@ VIA* PCB_PARSER::parseVIA()
|
|||
}
|
||||
|
||||
|
||||
ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent )
|
||||
ZONE* PCB_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent )
|
||||
{
|
||||
wxCHECK_MSG( CurTok() == T_zone, NULL,
|
||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) +
|
||||
wxT( " as ZONE_CONTAINER." ) );
|
||||
wxT( " as ZONE." ) );
|
||||
|
||||
ZONE_BORDER_DISPLAY_STYLE hatchStyle = ZONE_BORDER_DISPLAY_STYLE::NO_HATCH;
|
||||
|
||||
int hatchPitch = ZONE_CONTAINER::GetDefaultHatchPitch();
|
||||
wxPoint pt;
|
||||
T token;
|
||||
int tmp;
|
||||
wxString netnameFromfile; // the zone net name find in file
|
||||
int hatchPitch = ZONE::GetDefaultHatchPitch();
|
||||
wxPoint pt;
|
||||
T token;
|
||||
int tmp;
|
||||
wxString netnameFromfile; // the zone net name find in file
|
||||
|
||||
// bigger scope since each filled_polygon is concatenated in here
|
||||
std::map<PCB_LAYER_ID, SHAPE_POLY_SET> pts;
|
||||
bool inModule = false;
|
||||
bool inModule = false;
|
||||
PCB_LAYER_ID filledLayer;
|
||||
bool addedFilledPolygons = false;
|
||||
bool addedFilledPolygons = false;
|
||||
|
||||
if( dynamic_cast<MODULE*>( aParent ) ) // The zone belongs a footprint
|
||||
inModule = true;
|
||||
|
||||
std::unique_ptr<ZONE_CONTAINER> zone;
|
||||
std::unique_ptr<ZONE> zone;
|
||||
|
||||
if( inModule )
|
||||
zone = std::make_unique<MODULE_ZONE_CONTAINER>( aParent );
|
||||
zone = std::make_unique<FP_ZONE>( aParent );
|
||||
else
|
||||
zone = std::make_unique<ZONE_CONTAINER>( aParent );
|
||||
zone = std::make_unique<ZONE>( aParent );
|
||||
|
||||
zone->SetPriority( 0 );
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class BOARD_ITEM;
|
|||
class BOARD_ITEM_CONTAINER;
|
||||
class D_PAD;
|
||||
class BOARD_DESIGN_SETTINGS;
|
||||
class DIMENSION;
|
||||
class DIMENSION_BASE;
|
||||
class PCB_SHAPE;
|
||||
class EDA_TEXT;
|
||||
class FP_SHAPE;
|
||||
|
@ -56,7 +56,7 @@ class MODULE;
|
|||
class PCB_GROUP;
|
||||
class PCB_TARGET;
|
||||
class VIA;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class MARKER_PCB;
|
||||
class MODULE_3D_SETTINGS;
|
||||
struct LAYER;
|
||||
|
@ -164,7 +164,7 @@ class PCB_PARSER : public PCB_LEXER
|
|||
*/
|
||||
PCB_SHAPE* parsePCB_SHAPE( bool aAllowZeroWidth = false );
|
||||
PCB_TEXT* parsePCB_TEXT();
|
||||
DIMENSION* parseDIMENSION();
|
||||
DIMENSION_BASE* parseDIMENSION();
|
||||
|
||||
/**
|
||||
* Function parseMODULE_unchecked
|
||||
|
@ -179,7 +179,7 @@ class PCB_PARSER : public PCB_LEXER
|
|||
ARC* parseARC();
|
||||
TRACK* parseTRACK();
|
||||
VIA* parseVIA();
|
||||
ZONE_CONTAINER* parseZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent );
|
||||
ZONE* parseZONE( BOARD_ITEM_CONTAINER* aParent );
|
||||
PCB_TARGET* parsePCB_TARGET();
|
||||
MARKER_PCB* parseMARKER( BOARD_ITEM_CONTAINER* aParent );
|
||||
BOARD* parseBOARD();
|
||||
|
|
|
@ -76,10 +76,10 @@
|
|||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_zone.h>
|
||||
#include <class_dimension.h>
|
||||
#include <zone.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <fp_shape.h>
|
||||
#include <3d_cache/3d_info.h>
|
||||
#include <pcb_plot_params.h>
|
||||
|
@ -2434,7 +2434,7 @@ void LEGACY_PLUGIN::loadNETCLASS()
|
|||
|
||||
void LEGACY_PLUGIN::loadZONE_CONTAINER()
|
||||
{
|
||||
std::unique_ptr<ZONE_CONTAINER> zc = std::make_unique<ZONE_CONTAINER>( m_board );
|
||||
std::unique_ptr<ZONE> zc = std::make_unique<ZONE>( m_board );
|
||||
|
||||
ZONE_BORDER_DISPLAY_STYLE outline_hatch = ZONE_BORDER_DISPLAY_STYLE::NO_HATCH;
|
||||
bool endContour = false;
|
||||
|
@ -2712,8 +2712,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
|
|||
|
||||
// HatchBorder here, after outlines corners are read
|
||||
// Set hatch here, after outlines corners are read
|
||||
zc->SetBorderDisplayStyle( outline_hatch, ZONE_CONTAINER::GetDefaultHatchPitch(),
|
||||
true );
|
||||
zc->SetBorderDisplayStyle( outline_hatch, ZONE::GetDefaultHatchPitch(), true );
|
||||
|
||||
m_board->Add( zc.release() );
|
||||
}
|
||||
|
|
|
@ -43,8 +43,8 @@ class MODULE;
|
|||
class TRACK;
|
||||
class NETCLASS;
|
||||
class NETCLASSES;
|
||||
class ZONE_CONTAINER;
|
||||
class DIMENSION;
|
||||
class ZONE;
|
||||
class DIMENSION_BASE;
|
||||
class NETINFO_ITEM;
|
||||
class NETINFO_MAPPING;
|
||||
class FP_TEXT;
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
|
||||
namespace PCAD2KICAD {
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ void PCB_POLYGON::AddToBoard()
|
|||
|
||||
if( m_outline.GetCount() > 0 )
|
||||
{
|
||||
ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
|
||||
ZONE* zone = new ZONE( m_board );
|
||||
m_board->Add( zone, ADD_MODE::APPEND );
|
||||
|
||||
zone->SetLayer( m_KiCadLayer );
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <fp_text.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <board_commit.h>
|
||||
|
@ -923,8 +923,7 @@ std::unique_ptr<PNS::VIA> PNS_KICAD_IFACE_BASE::syncVia( VIA* aVia )
|
|||
}
|
||||
|
||||
|
||||
bool PNS_KICAD_IFACE_BASE::syncZone( PNS::NODE* aWorld, ZONE_CONTAINER* aZone,
|
||||
SHAPE_POLY_SET* aBoardOutline )
|
||||
bool PNS_KICAD_IFACE_BASE::syncZone( PNS::NODE* aWorld, ZONE* aZone, SHAPE_POLY_SET* aBoardOutline )
|
||||
{
|
||||
SHAPE_POLY_SET poly;
|
||||
|
||||
|
@ -1182,7 +1181,7 @@ void PNS_KICAD_IFACE_BASE::SyncWorld( PNS::NODE *aWorld )
|
|||
if( m_board->GetBoardPolygonOutlines( buffer ) )
|
||||
boardOutline = &buffer;
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
syncZone( aWorld, zone, boardOutline );
|
||||
}
|
||||
|
@ -1200,7 +1199,7 @@ void PNS_KICAD_IFACE_BASE::SyncWorld( PNS::NODE *aWorld )
|
|||
syncTextItem( aWorld, &module->Reference(), module->Reference().GetLayer() );
|
||||
syncTextItem( aWorld, &module->Value(), module->Value().GetLayer() );
|
||||
|
||||
for( MODULE_ZONE_CONTAINER* zone : module->Zones() )
|
||||
for( FP_ZONE* zone : module->Zones() )
|
||||
syncZone( aWorld, zone, boardOutline );
|
||||
|
||||
if( module->IsNetTie() )
|
||||
|
|
|
@ -94,7 +94,7 @@ protected:
|
|||
std::unique_ptr<PNS::VIA> syncVia( VIA* aVia );
|
||||
bool syncTextItem( PNS::NODE* aWorld, EDA_TEXT* aText, PCB_LAYER_ID aLayer );
|
||||
bool syncGraphicalItem( PNS::NODE* aWorld, PCB_SHAPE* aItem );
|
||||
bool syncZone( PNS::NODE* aWorld, ZONE_CONTAINER* aZone, SHAPE_POLY_SET* aBoardOutline );
|
||||
bool syncZone( PNS::NODE* aWorld, ZONE* aZone, SHAPE_POLY_SET* aBoardOutline );
|
||||
bool inheritTrackWidth( PNS::ITEM* aItem, int* aInheritedWidth );
|
||||
|
||||
protected:
|
||||
|
|
|
@ -1565,7 +1565,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
|||
view()->AddToPreview( previewItem );
|
||||
view()->Hide( &module->Value() );
|
||||
|
||||
for( ZONE_CONTAINER* zone : module->Zones() )
|
||||
for( ZONE* zone : module->Zones() )
|
||||
{
|
||||
previewItem = static_cast<BOARD_ITEM*>( zone->Clone() );
|
||||
previewItem->Move( offset );
|
||||
|
@ -1601,7 +1601,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
|||
view()->Hide( &module->Reference(), false );
|
||||
view()->Hide( &module->Value(), false );
|
||||
|
||||
for( ZONE_CONTAINER* zone : module->Zones() )
|
||||
for( ZONE* zone : module->Zones() )
|
||||
view()->Hide( zone, false );
|
||||
|
||||
view()->ClearPreview();
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include <class_module.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <base_units.h>
|
||||
#include <collectors.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
|
@ -1073,12 +1073,12 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
|
|||
{
|
||||
int netlessZones = 0;
|
||||
|
||||
static const KICAD_T scanZONEs[] = { PCB_ZONE_AREA_T, EOT };
|
||||
static const KICAD_T scanZONEs[] = { PCB_ZONE_T, EOT };
|
||||
items.Collect( aBoard, scanZONEs );
|
||||
|
||||
for( int i = 0; i<items.GetCount(); ++i )
|
||||
{
|
||||
ZONE_CONTAINER* item = (ZONE_CONTAINER*) items[i];
|
||||
ZONE* item = (ZONE*) items[i];
|
||||
|
||||
if( item->GetIsRuleArea() )
|
||||
continue;
|
||||
|
@ -1191,12 +1191,12 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
|
|||
|
||||
//-----<zone containers flagged keepout areas become keepout>--------------------------------
|
||||
{
|
||||
static const KICAD_T scanZONEs[] = { PCB_ZONE_AREA_T, EOT };
|
||||
static const KICAD_T scanZONEs[] = { PCB_ZONE_T, EOT };
|
||||
items.Collect( aBoard, scanZONEs );
|
||||
|
||||
for( int i=0; i<items.GetCount(); ++i )
|
||||
{
|
||||
ZONE_CONTAINER* item = (ZONE_CONTAINER*) items[i];
|
||||
ZONE* item = (ZONE*) items[i];
|
||||
|
||||
if( !item->GetIsRuleArea() )
|
||||
continue;
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <connectivity/connectivity_data.h>
|
||||
#include <view/view.h>
|
||||
#include "specctra.h"
|
||||
|
|
|
@ -54,9 +54,9 @@
|
|||
0 | 0 );
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
obj = SWIG_NewPointerObj( SWIG_as_voidptr(aItem),
|
||||
SWIGTYPE_p_ZONE_CONTAINER,
|
||||
SWIGTYPE_p_ZONE,
|
||||
0 | 0 );
|
||||
break;
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ class EDGE_MODULE;
|
|||
class D_PAD;
|
||||
class TRACK;
|
||||
class VIA;
|
||||
class ZONE_CONTAINER;
|
||||
class ZONE;
|
||||
class FP_ZONE;
|
||||
class PCB_TARGET;
|
||||
|
||||
// Anthing targeted to the %wrapper section is extern "C" whereas code targeted
|
||||
|
@ -86,7 +87,8 @@ static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* );
|
|||
static D_PAD* Cast_to_D_PAD( BOARD_ITEM* );
|
||||
static TRACK* Cast_to_TRACK( BOARD_ITEM* );
|
||||
static VIA* Cast_to_VIA( BOARD_ITEM* );
|
||||
static ZONE_CONTAINER* Cast_to_ZONE_CONTAINER( BOARD_ITEM* );
|
||||
static ZONE* Cast_to_ZONE( BOARD_ITEM* );
|
||||
static FP_ZONE* Cast_to_FP_ZONE( BOARD_ITEM* );
|
||||
static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* );
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -110,7 +112,8 @@ static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* );
|
|||
static D_PAD* Cast_to_D_PAD( BOARD_ITEM* );
|
||||
static TRACK* Cast_to_TRACK( BOARD_ITEM* );
|
||||
static VIA* Cast_to_VIA( BOARD_ITEM* );
|
||||
static ZONE_CONTAINER* Cast_to_ZONE_CONTAINER( BOARD_ITEM* );
|
||||
static ZONE* Cast_to_ZONE( BOARD_ITEM* );
|
||||
static FP_ZONE* Cast_to_FP_ZONE( BOARD_ITEM* );
|
||||
static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* );
|
||||
|
||||
|
||||
|
@ -152,8 +155,8 @@ static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* );
|
|||
return Cast_to_TRACK(self)
|
||||
elif ct=="PCB_TARGET":
|
||||
return Cast_to_PCB_TARGET(self)
|
||||
elif ct=="ZONE_CONTAINER":
|
||||
return Cast_to_ZONE_CONTAINER(self)
|
||||
elif ct=="ZONE":
|
||||
return Cast_to_ZONE(self)
|
||||
else:
|
||||
raise TypeError("Unsupported drawing class: %s" % ct)
|
||||
|
||||
|
@ -197,6 +200,7 @@ static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* self ) {
|
|||
static D_PAD* Cast_to_D_PAD( BOARD_ITEM* self ) { return dynamic_cast<D_PAD*>(self); }
|
||||
static TRACK* Cast_to_TRACK( BOARD_ITEM* self ) { return dynamic_cast<TRACK*>(self); }
|
||||
static VIA* Cast_to_VIA( BOARD_ITEM* self ) { return dynamic_cast<VIA*>(self); }
|
||||
static ZONE_CONTAINER* Cast_to_ZONE_CONTAINER( BOARD_ITEM* self ) { return dynamic_cast<ZONE_CONTAINER*>(self); }
|
||||
static ZONE* Cast_to_ZONE( BOARD_ITEM* self ) { return dynamic_cast<ZONE*>( self); }
|
||||
static FP_ZONE* Cast_to_FP_ZONE( BOARD_ITEM* self ) { return dynamic_cast<FP_ZONE*>( self); }
|
||||
static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* self ) { return dynamic_cast<PCB_TARGET*>(self); }
|
||||
%}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
%include class_dimension.h
|
||||
%include dimension.h
|
||||
%{
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
%}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <python_scripting.h>
|
||||
|
@ -231,7 +231,7 @@ void PCB_EDIT_FRAME::RunActionPlugin( ACTION_PLUGIN* aActionPlugin )
|
|||
}
|
||||
|
||||
// Append zones outlines
|
||||
for( ZONE_CONTAINER* zone : currentPcb->Zones() )
|
||||
for( ZONE* zone : currentPcb->Zones() )
|
||||
{
|
||||
ITEM_PICKER picker( nullptr, zone, UNDO_REDO::CHANGED );
|
||||
itemsList.PushItem( picker );
|
||||
|
@ -282,7 +282,7 @@ void PCB_EDIT_FRAME::RunActionPlugin( ACTION_PLUGIN* aActionPlugin )
|
|||
currItemList.insert( item );
|
||||
|
||||
// Append zones outlines
|
||||
for( ZONE_CONTAINER* zone : currentPcb->Zones() )
|
||||
for( ZONE* zone : currentPcb->Zones() )
|
||||
currItemList.insert( zone );
|
||||
|
||||
// Found deleted footprints
|
||||
|
@ -331,7 +331,7 @@ void PCB_EDIT_FRAME::RunActionPlugin( ACTION_PLUGIN* aActionPlugin )
|
|||
}
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : currentPcb->Zones() )
|
||||
for( ZONE* zone : currentPcb->Zones() )
|
||||
{
|
||||
if( !oldBuffer->ContainsItem( zone ) )
|
||||
{
|
||||
|
|
|
@ -351,7 +351,7 @@ bool IsActionRunning()
|
|||
|
||||
|
||||
bool WriteDRCReport( BOARD* aBoard, const wxString& aFileName, EDA_UNITS aUnits,
|
||||
bool aTestTracksAgainstZones, bool aReportAllTrackErrors )
|
||||
bool aReportAllTrackErrors )
|
||||
{
|
||||
wxCHECK( aBoard, false );
|
||||
|
||||
|
|
|
@ -151,12 +151,11 @@ bool IsActionRunning();
|
|||
* @param aBoard is a valid loaded board
|
||||
* @param aFileName is the full path and name of the report file to write
|
||||
* @param aUnits is the units to use in the report
|
||||
* @param aTestTracksAgainstZones controls whether full track/zone checking is done (slow)
|
||||
* @param aReportAllTrackErrors controls whether all errors or just the first error is reported
|
||||
* for each track
|
||||
* @return true if successful, false if not
|
||||
*/
|
||||
bool WriteDRCReport( BOARD* aBoard, const wxString& aFileName, EDA_UNITS aUnits,
|
||||
bool aTestTracksAgainstZones, bool aReportAllTrackErrors );
|
||||
bool aReportAllTrackErrors );
|
||||
|
||||
#endif // __PCBNEW_SCRIPTING_HELPERS_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// Do not permit default ZONE_FILLER ctor since commits are not supported from Python
|
||||
%ignore ZONE_FILLER::ZONE_FILLER(BOARD*, COMMIT*);
|
||||
|
||||
%include class_zone.h
|
||||
%include zone.h
|
||||
%include zones.h
|
||||
|
||||
%{
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <zones.h>
|
||||
#include <zone_filler.h>
|
||||
%}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <pcb_shape.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <collectors.h>
|
||||
#include <confirm.h>
|
||||
#include <menus_helpers.h>
|
||||
|
@ -72,7 +72,7 @@ bool CONVERT_TOOL::Init()
|
|||
m_menu->SetTitle( _( "Convert..." ) );
|
||||
|
||||
static KICAD_T convertableTracks[] = { PCB_TRACE_T, PCB_ARC_T, EOT };
|
||||
static KICAD_T convertableZones[] = { PCB_ZONE_AREA_T, PCB_FP_ZONE_AREA_T, EOT };
|
||||
static KICAD_T convertableZones[] = { PCB_ZONE_T, PCB_FP_ZONE_T, EOT };
|
||||
|
||||
auto graphicLines = P_S_C::OnlyGraphicShapeTypes( { S_SEGMENT, S_RECT } ) && P_S_C::SameLayer();
|
||||
|
||||
|
@ -218,8 +218,7 @@ int CONVERT_TOOL::LinesToPoly( const TOOL_EVENT& aEvent )
|
|||
|
||||
for( const SHAPE_POLY_SET& poly : polys )
|
||||
{
|
||||
ZONE_CONTAINER* zone = isFootprint ? new MODULE_ZONE_CONTAINER( parent )
|
||||
: new ZONE_CONTAINER( parent );
|
||||
ZONE* zone = isFootprint ? new FP_ZONE( parent ) : new ZONE( parent );
|
||||
|
||||
*zone->Outline() = poly;
|
||||
zone->HatchBorder();
|
||||
|
@ -391,8 +390,8 @@ int CONVERT_TOOL::PolyToLines( const TOOL_EVENT& aEvent )
|
|||
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -411,9 +410,9 @@ int CONVERT_TOOL::PolyToLines( const TOOL_EVENT& aEvent )
|
|||
|
||||
switch( aItem->Type() )
|
||||
{
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
set = *static_cast<ZONE_CONTAINER*>( aItem )->Outline();
|
||||
case PCB_ZONE_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
set = *static_cast<ZONE*>( aItem )->Outline();
|
||||
break;
|
||||
|
||||
case PCB_SHAPE_T:
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#include <class_board.h>
|
||||
#include <fp_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_dimension.h>
|
||||
#include <class_zone.h>
|
||||
#include <dimension.h>
|
||||
#include <zone.h>
|
||||
#include <class_module.h>
|
||||
|
||||
#include <preview_items/two_point_assistant.h>
|
||||
|
@ -620,7 +620,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
void DRAWING_TOOL::constrainDimension( DIMENSION* aDim )
|
||||
void DRAWING_TOOL::constrainDimension( DIMENSION_BASE* aDim )
|
||||
{
|
||||
const VECTOR2I lineVector{ aDim->GetEnd() - aDim->GetStart() };
|
||||
|
||||
|
@ -633,10 +633,10 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
|||
if( m_isFootprintEditor && !m_frame->GetModel() )
|
||||
return 0;
|
||||
|
||||
TOOL_EVENT originalEvent = aEvent;
|
||||
DIMENSION* dimension = nullptr;
|
||||
BOARD_COMMIT commit( m_frame );
|
||||
GRID_HELPER grid( m_toolMgr, m_frame->GetMagneticItemsSettings() );
|
||||
TOOL_EVENT originalEvent = aEvent;
|
||||
DIMENSION_BASE* dimension = nullptr;
|
||||
BOARD_COMMIT commit( m_frame );
|
||||
GRID_HELPER grid( m_toolMgr, m_frame->GetMagneticItemsSettings() );
|
||||
|
||||
const BOARD_DESIGN_SETTINGS& boardSettings = m_board->GetDesignSettings();
|
||||
|
||||
|
@ -770,7 +770,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
|||
|
||||
// Init the new item attributes
|
||||
auto setMeasurementAttributes =
|
||||
[&]( DIMENSION* aDim )
|
||||
[&]( DIMENSION_BASE* aDim )
|
||||
{
|
||||
aDim->SetUnitsMode( boardSettings.m_DimensionUnitsMode );
|
||||
aDim->SetUnitsFormat( boardSettings.m_DimensionUnitsFormat );
|
||||
|
@ -1764,7 +1764,7 @@ bool DRAWING_TOOL::drawArc( const std::string& aTool, PCB_SHAPE** aGraphic, bool
|
|||
}
|
||||
|
||||
|
||||
bool DRAWING_TOOL::getSourceZoneForAction( ZONE_MODE aMode, ZONE_CONTAINER** aZone )
|
||||
bool DRAWING_TOOL::getSourceZoneForAction( ZONE_MODE aMode, ZONE** aZone )
|
||||
{
|
||||
bool clearSelection = false;
|
||||
*aZone = nullptr;
|
||||
|
@ -1784,7 +1784,7 @@ bool DRAWING_TOOL::getSourceZoneForAction( ZONE_MODE aMode, ZONE_CONTAINER** aZo
|
|||
|
||||
// we want a single zone
|
||||
if( selection.Size() == 1 )
|
||||
*aZone = dyn_cast<ZONE_CONTAINER*>( selection[0] );
|
||||
*aZone = dyn_cast<ZONE*>( selection[0] );
|
||||
|
||||
// expected a zone, but didn't get one
|
||||
if( !*aZone )
|
||||
|
@ -1817,7 +1817,7 @@ int DRAWING_TOOL::DrawZone( const TOOL_EVENT& aEvent )
|
|||
// get a source zone, if we need one. We need it for:
|
||||
// ZONE_MODE::CUTOUT (adding a hole to the source zone)
|
||||
// ZONE_MODE::SIMILAR (creating a new zone using settings of source zone
|
||||
ZONE_CONTAINER* sourceZone = nullptr;
|
||||
ZONE* sourceZone = nullptr;
|
||||
|
||||
if( !getSourceZoneForAction( zoneMode, &sourceZone ) )
|
||||
return 0;
|
||||
|
@ -2182,9 +2182,9 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<ZONE_CONTAINER*> foundZones;
|
||||
std::vector<ZONE*> foundZones;
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_board->Zones() )
|
||||
for( ZONE* zone : m_board->Zones() )
|
||||
{
|
||||
for( PCB_LAYER_ID layer : LSET( zone->GetLayerSet() & lset ).Seq() )
|
||||
{
|
||||
|
@ -2194,20 +2194,20 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
std::sort( foundZones.begin(), foundZones.end(),
|
||||
[] ( const ZONE_CONTAINER* a, const ZONE_CONTAINER* b )
|
||||
{
|
||||
return a->GetLayer() < b->GetLayer();
|
||||
} );
|
||||
[] ( const ZONE* a, const ZONE* b )
|
||||
{
|
||||
return a->GetLayer() < b->GetLayer();
|
||||
} );
|
||||
|
||||
// first take the net of the active layer
|
||||
for( ZONE_CONTAINER* z : foundZones )
|
||||
for( ZONE* z : foundZones )
|
||||
{
|
||||
if( m_frame->GetActiveLayer() == z->GetLayer() )
|
||||
return z->GetNetCode();
|
||||
}
|
||||
|
||||
// none? take the topmost visible layer
|
||||
for( ZONE_CONTAINER* z : foundZones )
|
||||
for( ZONE* z : foundZones )
|
||||
{
|
||||
if( m_board->IsLayerVisible( z->GetLayer() ) )
|
||||
return z->GetNetCode();
|
||||
|
|
|
@ -211,14 +211,14 @@ private:
|
|||
* @return true if a suitable zone was found, or the action doesn't
|
||||
* need a zone. False if the action needs a zone but none was found.
|
||||
*/
|
||||
bool getSourceZoneForAction( ZONE_MODE aMode, ZONE_CONTAINER** aZone );
|
||||
bool getSourceZoneForAction( ZONE_MODE aMode, ZONE** aZone );
|
||||
|
||||
/**
|
||||
* Function constrainDimension()
|
||||
* Forces the dimension lime to be drawn on multiple of 45 degrees
|
||||
* @param aDimension is the dimension element currently being drawn
|
||||
*/
|
||||
void constrainDimension( DIMENSION* aDim );
|
||||
void constrainDimension( DIMENSION_BASE* aDim );
|
||||
|
||||
///> Returns the appropriate width for a segment depending on the settings.
|
||||
int getSegmentWidth( PCB_LAYER_ID aLayer ) const;
|
||||
|
|
|
@ -73,7 +73,7 @@ void EditToolSelectionFilter( GENERAL_COLLECTOR& aCollector, int aFlags,
|
|||
{
|
||||
aCollector.Remove( item );
|
||||
}
|
||||
else if( item->Type() == PCB_FP_ZONE_AREA_T )
|
||||
else if( item->Type() == PCB_FP_ZONE_T )
|
||||
{
|
||||
MODULE* mod = static_cast<MODULE*>( item->GetParent() );
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
case PCB_FP_SHAPE_T:
|
||||
case PCB_FP_TEXT_T:
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
case PCB_PAD_T:
|
||||
// Only create undo entry for items on the board
|
||||
if( !item->IsNew() && !IsFootprintEditor() )
|
||||
|
@ -1092,9 +1092,9 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
|
|||
break;
|
||||
}
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
{
|
||||
MODULE_ZONE_CONTAINER* zone = static_cast<MODULE_ZONE_CONTAINER*>( item );
|
||||
FP_ZONE* zone = static_cast<FP_ZONE*>( item );
|
||||
zone->Mirror( mirrorPoint, false );
|
||||
break;
|
||||
}
|
||||
|
@ -1301,10 +1301,10 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
break;
|
||||
|
||||
case PCB_FP_ZONE_AREA_T:
|
||||
case PCB_FP_ZONE_T:
|
||||
{
|
||||
MODULE_ZONE_CONTAINER* zone = static_cast<MODULE_ZONE_CONTAINER*>( item );
|
||||
MODULE* parent = static_cast<MODULE*>( item->GetParent() );
|
||||
FP_ZONE* zone = static_cast<FP_ZONE*>( item );
|
||||
MODULE* parent = static_cast<MODULE*>( item->GetParent() );
|
||||
|
||||
m_commit->Modify( parent );
|
||||
getView()->Remove( zone );
|
||||
|
@ -1312,15 +1312,15 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
break;
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
// We process the zones special so that cutouts can be deleted when the delete tool
|
||||
// is called from inside a cutout when the zone is selected.
|
||||
{
|
||||
// Only interact with cutouts when deleting and a single item is selected
|
||||
if( !isCut && selectionCopy.GetSize() == 1 )
|
||||
{
|
||||
VECTOR2I curPos = getViewControls()->GetCursorPosition();
|
||||
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( item );
|
||||
VECTOR2I curPos = getViewControls()->GetCursorPosition();
|
||||
ZONE* zone = static_cast<ZONE*>( item );
|
||||
|
||||
int outlineIdx, holeIdx;
|
||||
|
||||
|
@ -1330,7 +1330,7 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
|
|||
m_commit->Modify( zone );
|
||||
zone->RemoveCutout( outlineIdx, holeIdx );
|
||||
|
||||
std::vector<ZONE_CONTAINER*> toFill;
|
||||
std::vector<ZONE*> toFill;
|
||||
toFill.emplace_back( zone );
|
||||
|
||||
// Fill the modified zone
|
||||
|
@ -1595,7 +1595,7 @@ int EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent )
|
|||
case PCB_SHAPE_T:
|
||||
case PCB_TRACE_T:
|
||||
case PCB_VIA_T:
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
case PCB_TARGET_T:
|
||||
case PCB_DIM_ALIGNED_T:
|
||||
case PCB_DIM_CENTER_T:
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
using namespace std::placeholders;
|
||||
|
||||
#include <class_board.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <geometry/shape_circle.h>
|
||||
#include <geometry/shape_line_chain.h>
|
||||
#include <geometry/shape_rect.h>
|
||||
|
@ -658,9 +658,9 @@ void GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos, bo
|
|||
break;
|
||||
}
|
||||
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_ZONE_T:
|
||||
{
|
||||
const SHAPE_POLY_SET* outline = static_cast<const ZONE_CONTAINER*>( aItem )->Outline();
|
||||
const SHAPE_POLY_SET* outline = static_cast<const ZONE*>( aItem )->Outline();
|
||||
|
||||
SHAPE_LINE_CHAIN lc;
|
||||
lc.SetClosed( true );
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
#include <class_board.h>
|
||||
#include <class_pcb_group.h>
|
||||
#include <class_module.h>
|
||||
#include <class_pcb_target.h>
|
||||
#include <pcb_target.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <collectors.h>
|
||||
#include <confirm.h>
|
||||
|
@ -197,7 +197,7 @@ bool PCB_EDITOR_CONTROL::Init()
|
|||
|
||||
menu.AddMenu( lockMenu.get(), SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::LockableItems ), 100 );
|
||||
|
||||
menu.AddMenu( zoneMenu.get(), SELECTION_CONDITIONS::OnlyType( PCB_ZONE_AREA_T ), 200 );
|
||||
menu.AddMenu( zoneMenu.get(), SELECTION_CONDITIONS::OnlyType( PCB_ZONE_T ), 200 );
|
||||
}
|
||||
|
||||
DRAWING_TOOL* drawingTool = m_toolMgr->GetTool<DRAWING_TOOL>();
|
||||
|
@ -436,7 +436,7 @@ int PCB_EDITOR_CONTROL::RepairBoard( const TOOL_EVENT& aEvent )
|
|||
for( BOARD_ITEM* item : footprint->GraphicalItems() )
|
||||
processItem( item );
|
||||
|
||||
for( ZONE_CONTAINER* zone : footprint->Zones() )
|
||||
for( ZONE* zone : footprint->Zones() )
|
||||
processItem( zone );
|
||||
|
||||
for( PCB_GROUP* group : footprint->Groups() )
|
||||
|
@ -446,7 +446,7 @@ int PCB_EDITOR_CONTROL::RepairBoard( const TOOL_EVENT& aEvent )
|
|||
for( BOARD_ITEM* drawing : board()->Drawings() )
|
||||
processItem( drawing );
|
||||
|
||||
for( ZONE_CONTAINER* zone : board()->Zones() )
|
||||
for( ZONE* zone : board()->Zones() )
|
||||
processItem( zone );
|
||||
|
||||
for( MARKER_PCB* marker : board()->Markers() )
|
||||
|
@ -1101,8 +1101,8 @@ int PCB_EDITOR_CONTROL::PlaceTarget( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
static bool mergeZones( BOARD_COMMIT& aCommit, std::vector<ZONE_CONTAINER *>& aOriginZones,
|
||||
std::vector<ZONE_CONTAINER *>& aMergedZones )
|
||||
static bool mergeZones( BOARD_COMMIT& aCommit, std::vector<ZONE*>& aOriginZones,
|
||||
std::vector<ZONE*>& aMergedZones )
|
||||
{
|
||||
for( unsigned int i = 1; i < aOriginZones.size(); i++ )
|
||||
{
|
||||
|
@ -1118,7 +1118,7 @@ static bool mergeZones( BOARD_COMMIT& aCommit, std::vector<ZONE_CONTAINER *>& aO
|
|||
// but we should never have more than 2 polys
|
||||
if( aOriginZones[0]->Outline()->OutlineCount() > 1 )
|
||||
{
|
||||
wxLogMessage( "BOARD::CombineAreas error: more than 2 polys after merging" );
|
||||
wxLogMessage( "BOARD::mergeZones error: more than 2 polys after merging" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1149,12 +1149,12 @@ int PCB_EDITOR_CONTROL::ZoneMerge( const TOOL_EVENT& aEvent )
|
|||
|
||||
int netcode = -1;
|
||||
|
||||
ZONE_CONTAINER* firstZone = nullptr;
|
||||
std::vector<ZONE_CONTAINER*> toMerge, merged;
|
||||
ZONE* firstZone = nullptr;
|
||||
std::vector<ZONE*> toMerge, merged;
|
||||
|
||||
for( auto item : selection )
|
||||
{
|
||||
auto curr_area = dynamic_cast<ZONE_CONTAINER*>( item );
|
||||
ZONE* curr_area = dynamic_cast<ZONE*>( item );
|
||||
|
||||
if( !curr_area )
|
||||
continue;
|
||||
|
@ -1176,7 +1176,7 @@ int PCB_EDITOR_CONTROL::ZoneMerge( const TOOL_EVENT& aEvent )
|
|||
if( curr_area->GetLayer() != firstZone->GetLayer() )
|
||||
continue;
|
||||
|
||||
if( !board->TestAreaIntersection( curr_area, firstZone ) )
|
||||
if( !board->TestZoneIntersection( curr_area, firstZone ) )
|
||||
continue;
|
||||
|
||||
toMerge.push_back( curr_area );
|
||||
|
@ -1206,7 +1206,7 @@ int PCB_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent )
|
|||
if( selection.Size() != 1 )
|
||||
return 0;
|
||||
|
||||
auto oldZone = dyn_cast<ZONE_CONTAINER*>( selection[0] );
|
||||
ZONE* oldZone = dyn_cast<ZONE*>( selection[0] );
|
||||
|
||||
if( !oldZone )
|
||||
return 0;
|
||||
|
@ -1228,7 +1228,7 @@ int PCB_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent )
|
|||
// duplicate the zone
|
||||
BOARD_COMMIT commit( m_frame );
|
||||
|
||||
auto newZone = std::make_unique<ZONE_CONTAINER>( *oldZone );
|
||||
std::unique_ptr<ZONE> newZone = std::make_unique<ZONE>( *oldZone );
|
||||
newZone->ClearSelected();
|
||||
newZone->UnFill();
|
||||
zoneSettings.ExportSetting( *newZone );
|
||||
|
|
|
@ -82,7 +82,7 @@ bool PCB_INSPECTION_TOOL::Init()
|
|||
netSubMenu->SetTool( this );
|
||||
|
||||
static KICAD_T connectedTypes[] = { PCB_TRACE_T, PCB_VIA_T, PCB_ARC_T, PCB_PAD_T,
|
||||
PCB_ZONE_AREA_T, EOT };
|
||||
PCB_ZONE_T, EOT };
|
||||
|
||||
CONDITIONAL_MENU& menu = selectionTool->GetToolMenu().GetMenu();
|
||||
|
||||
|
@ -109,7 +109,7 @@ int PCB_INSPECTION_TOOL::ShowStatisticsDialog( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
void PCB_INSPECTION_TOOL::reportZoneConnection( ZONE_CONTAINER* aZone, D_PAD* aPad, REPORTER* r )
|
||||
void PCB_INSPECTION_TOOL::reportZoneConnection( ZONE* aZone, D_PAD* aPad, REPORTER* r )
|
||||
{
|
||||
ENUM_MAP<ZONE_CONNECTION> connectionEnum = ENUM_MAP<ZONE_CONNECTION>::Instance();
|
||||
wxString source;
|
||||
|
@ -283,7 +283,7 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
|
|||
layer = B_Cu;
|
||||
}
|
||||
|
||||
if( a->Type() != PCB_ZONE_AREA_T && b->Type() == PCB_ZONE_AREA_T )
|
||||
if( a->Type() != PCB_ZONE_T && b->Type() == PCB_ZONE_T )
|
||||
std::swap( a, b );
|
||||
else if( !a->IsConnected() && b->IsConnected() )
|
||||
std::swap( a, b );
|
||||
|
@ -340,10 +340,9 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
// Same nets....
|
||||
|
||||
if( ac->Type() == PCB_ZONE_AREA_T && bc->Type() == PCB_PAD_T )
|
||||
if( ac->Type() == PCB_ZONE_T && bc->Type() == PCB_PAD_T )
|
||||
{
|
||||
reportZoneConnection( static_cast<ZONE_CONTAINER*>( ac ),
|
||||
static_cast<D_PAD*>( bc ), r );
|
||||
reportZoneConnection( static_cast<ZONE*>( ac ), static_cast<D_PAD*>( bc ), r );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -401,12 +400,12 @@ int PCB_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
|
|||
compileError = true;
|
||||
}
|
||||
|
||||
for( ZONE_CONTAINER* zone : m_frame->GetBoard()->Zones() )
|
||||
for( ZONE* zone : m_frame->GetBoard()->Zones() )
|
||||
zone->CacheBoundingBox();
|
||||
|
||||
for( MODULE* module : m_frame->GetBoard()->Modules() )
|
||||
{
|
||||
for( ZONE_CONTAINER* zone : module->Zones() )
|
||||
for( ZONE* zone : module->Zones() )
|
||||
zone->CacheBoundingBox();
|
||||
|
||||
module->BuildPolyCourtyards();
|
||||
|
@ -1002,7 +1001,7 @@ void PCB_INSPECTION_TOOL::calculateSelectionRatsnest( const VECTOR2I& aDelta )
|
|||
return( aItem->Type() == PCB_TRACE_T
|
||||
|| aItem->Type() == PCB_PAD_T
|
||||
|| aItem->Type() == PCB_ARC_T
|
||||
|| aItem->Type() == PCB_ZONE_AREA_T
|
||||
|| aItem->Type() == PCB_ZONE_T
|
||||
|| aItem->Type() == PCB_MODULE_T
|
||||
|| aItem->Type() == PCB_VIA_T );
|
||||
} ) )
|
||||
|
|
|
@ -130,7 +130,7 @@ private:
|
|||
void onInspectClearanceDialogClosed( wxCommandEvent& aEvent );
|
||||
void onInspectConstraintsDialogClosed( wxCommandEvent& aEvent );
|
||||
|
||||
void reportZoneConnection( ZONE_CONTAINER* aZone, D_PAD* aPad, REPORTER* r );
|
||||
void reportZoneConnection( ZONE* aZone, D_PAD* aPad, REPORTER* r );
|
||||
|
||||
void reportClearance( DRC_CONSTRAINT_TYPE_T aClearanceType, PCB_LAYER_ID aLayer,
|
||||
BOARD_ITEM* aA, BOARD_ITEM* aB, REPORTER* r );
|
||||
|
|
|
@ -42,7 +42,7 @@ bool PCB_SELECTION_CONDITIONS::OnlyConnectedItems( const SELECTION& aSelection )
|
|||
{
|
||||
auto type = item->Type();
|
||||
|
||||
if( type != PCB_PAD_T && type != PCB_VIA_T && type != PCB_TRACE_T && type != PCB_ZONE_AREA_T )
|
||||
if( type != PCB_PAD_T && type != PCB_VIA_T && type != PCB_TRACE_T && type != PCB_ZONE_T )
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
#include <board_commit.h>
|
||||
#include <class_board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <class_dimension.h>
|
||||
#include <dimension.h>
|
||||
#include <class_module.h>
|
||||
#include <class_track.h>
|
||||
#include <class_zone.h>
|
||||
#include <zone.h>
|
||||
#include <fp_shape.h>
|
||||
#include <confirm.h>
|
||||
#include <connectivity/connectivity_data.h>
|
||||
|
@ -201,7 +201,7 @@ int PCBNEW_CONTROL::ZoneDisplayMode( const TOOL_EVENT& aEvent )
|
|||
|
||||
m_frame->SetDisplayOptions( opts );
|
||||
|
||||
for( ZONE_CONTAINER* zone : board()->Zones() )
|
||||
for( ZONE* zone : board()->Zones() )
|
||||
view()->Update( zone, KIGFX::GEOMETRY );
|
||||
|
||||
canvas()->Refresh();
|
||||
|
@ -787,8 +787,7 @@ static void moveUnflaggedItems( std::deque<T>& aList, std::vector<BOARD_ITEM*>&
|
|||
}
|
||||
|
||||
|
||||
static void moveUnflaggedItems( ZONE_CONTAINERS& aList, std::vector<BOARD_ITEM*>& aTarget,
|
||||
bool aIsNew )
|
||||
static void moveUnflaggedItems( ZONES& aList, std::vector<BOARD_ITEM*>& aTarget, bool aIsNew )
|
||||
{
|
||||
if( aList.size() == 0 )
|
||||
return;
|
||||
|
@ -878,7 +877,7 @@ int PCBNEW_CONTROL::placeBoardItems( std::vector<BOARD_ITEM*>& aItems, bool aIsN
|
|||
case PCB_DIM_LEADER_T:
|
||||
{
|
||||
// Dimensions need to have their units updated if they are automatic
|
||||
DIMENSION* dim = static_cast<DIMENSION*>( item );
|
||||
DIMENSION_BASE* dim = static_cast<DIMENSION_BASE*>( item );
|
||||
|
||||
if( dim->GetUnitsMode() == DIM_UNITS_MODE::AUTOMATIC )
|
||||
dim->SetUnits( frame()->GetUserUnits() );
|
||||
|
|
|
@ -33,7 +33,6 @@ using namespace std::placeholders;
|
|||
#include <class_board_item.h>
|
||||
#include <class_track.h>
|
||||
#include <class_module.h>
|
||||
#include <class_zone.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <class_draw_panel_gal.h>
|
||||
#include <view/view_controls.h>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue