mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-18 22:11:40 +00:00
Update some classnames including archaic zone names.
This commit is contained in:
parent
fa8c486758
commit
f7333ad64a
3d-viewer/3d_canvas
common
include
pcbnew
array_creator.cppboard_commit.cppboard_connected_item.hboard_design_settings.cppboard_items_to_polygon_shape_transform.cppclass_board.cppclass_board.hclass_module.cppclass_module.hcollectors.cpp
connectivity
connectivity_algo.cppconnectivity_algo.hconnectivity_data.cppconnectivity_data.hconnectivity_items.cppconnectivity_items.h
dialogs
dialog_copper_zones.cppdialog_dimension_properties.cppdialog_dimension_properties.hdialog_global_deletion.cppdialog_global_edit_text_and_graphics.cppdialog_non_copper_zones_properties.cppdialog_rule_area_properties.cppdialog_swap_layers.cppdialog_target_properties.cpp
dimension.cppdimension.hdrc
drc_engine.cppdrc_engine.hdrc_rtree.hdrc_test_provider.cppdrc_test_provider_connectivity.cppdrc_test_provider_copper_clearance.cppdrc_test_provider_diff_pair_coupling.cppdrc_test_provider_misc.cpp
edit.cppexporters
footprint_editor_utils.cppfp_text.hkicad_clipboard.cppnetinfo_list.cppnetlist_reader
pcb_base_edit_frame.cpppcb_edit_frame.hpcb_expr_evaluator.cpppcb_painter.cpppcb_painter.hpcb_target.cpppcb_target.hpcbplot.hplot_board_layers.cppplot_brditems_plotter.cppplugins
altium
cadstar
eagle
kicad
legacy
pcad
router
specctra_import_export
swig
board_connected_item.iboard_item.idimension.ipcbnew_action_plugins.cpppcbnew_scripting_helpers.cpppcbnew_scripting_helpers.hzone.i
tools
convert_tool.cppdrawing_tool.cppdrawing_tool.hedit_tool.cppgrid_helper.cpppcb_editor_control.cpppcb_inspection_tool.cpppcb_inspection_tool.hpcb_selection_conditions.cpppcbnew_control.cpppcbnew_selection.cpppoint_editor.cppselection_tool.cppzone_create_helper.cppzone_create_helper.hzone_filler_tool.cpp
undo_redo.cppzone.cppzone.hzone_filler.cppzone_filler.hzone_settings.cppzone_settings.hzones.hzones_by_polygon.cppzones_functions_for_undo_redo.cppzones_test_and_combine_areas.cppqa
pcbnew_tools/tools
qa_utils
@ -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:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user