Browse Source
Add SCH_RULE_AREA shapes to eeschema
Add SCH_RULE_AREA shapes to eeschema
Includes: - Fix GAL to draw closed polygons in eeschema - Add functionality to eeschema to draw arbitary polygons - Update polygon item previews to have customisable edge colour - Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE - Add SCH_RULE_AREA to paint and plot methods - Add new rule area color preference to themesfusion360
committed by
Seth Hillbrand
57 changed files with 3858 additions and 110 deletions
-
1common/eda_item.cpp
-
1common/layer_id.cpp
-
23common/preview_items/polygon_item.cpp
-
2common/settings/builtin_color_themes.h
-
1common/settings/color_settings.cpp
-
2eeschema/CMakeLists.txt
-
90eeschema/connection_graph.cpp
-
8eeschema/connection_graph.h
-
6eeschema/ee_collectors.cpp
-
76eeschema/erc.cpp
-
15eeschema/erc.h
-
8eeschema/erc_item.cpp
-
1eeschema/erc_item.h
-
1eeschema/erc_settings.h
-
3eeschema/menubar.cpp
-
10eeschema/sch_commit.cpp
-
143eeschema/sch_edit_frame.cpp
-
3eeschema/sch_file_versions.h
-
19eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp
-
2eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.h
-
44eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp
-
2eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.h
-
23eeschema/sch_item.h
-
24eeschema/sch_label.cpp
-
17eeschema/sch_label.h
-
36eeschema/sch_painter.cpp
-
1eeschema/sch_plotter.h
-
442eeschema/sch_rule_area.cpp
-
125eeschema/sch_rule_area.h
-
2eeschema/sch_view.h
-
1eeschema/schematic.keywords
-
9eeschema/schematic_undo_redo.cpp
-
1eeschema/toolbars_sch_editor.cpp
-
23eeschema/tools/ee_actions.cpp
-
3eeschema/tools/ee_actions.h
-
1eeschema/tools/ee_grid_helper.cpp
-
49eeschema/tools/ee_point_editor.cpp
-
175eeschema/tools/rule_area_create_helper.cpp
-
93eeschema/tools/rule_area_create_helper.h
-
185eeschema/tools/sch_drawing_tools.cpp
-
2eeschema/tools/sch_drawing_tools.h
-
20eeschema/tools/sch_edit_tool.cpp
-
2include/core/typeinfo.h
-
1include/layer_ids.h
-
13include/preview_items/polygon_item.h
-
376qa/data/eeschema/RuleAreaNetclassConflictOnWire_1.kicad_sch
-
365qa/data/eeschema/RuleAreaNetclassConflictOnWire_2.kicad_sch
-
45qa/data/eeschema/RuleAreaNoOverlap.kicad_sch
-
327qa/data/eeschema/RuleAreaOneNetclassDirective.kicad_sch
-
43qa/data/eeschema/RuleAreaOneOverlap.kicad_sch
-
75qa/data/eeschema/RuleAreaOneOverlapTwice.kicad_sch
-
373qa/data/eeschema/RuleAreaThreeNetclassDirectives.kicad_sch
-
350qa/data/eeschema/RuleAreaTwoNetclassDirectives.kicad_sch
-
58qa/data/eeschema/RuleAreaTwoOverlaps.kicad_sch
-
1qa/tests/eeschema/CMakeLists.txt
-
139qa/tests/eeschema/erc/test_erc_rule_areas.cpp
-
19qa/tests/eeschema/test_ee_item.cpp
@ -0,0 +1,442 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|||
* or you may search the http://www.gnu.org website for the version 2 license,
|
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#include <algorithm>
|
|||
#include <iterator>
|
|||
#include <map>
|
|||
#include <vector>
|
|||
|
|||
#include <eda_draw_frame.h>
|
|||
#include <erc_item.h>
|
|||
#include <erc_settings.h>
|
|||
#include <geometry/shape_segment.h>
|
|||
#include <geometry/shape_simple.h>
|
|||
#include <sch_line.h>
|
|||
#include <sch_marker.h>
|
|||
#include <sch_rtree.h>
|
|||
#include <sch_rule_area.h>
|
|||
#include <sch_screen.h>
|
|||
#include <sch_sheet_path.h>
|
|||
|
|||
|
|||
wxString SCH_RULE_AREA::GetClass() const |
|||
{ |
|||
return wxT( "SCH_RULE_AREA" ); |
|||
} |
|||
|
|||
|
|||
wxString SCH_RULE_AREA::GetFriendlyName() const |
|||
{ |
|||
return _( "Rule Area" ); |
|||
} |
|||
|
|||
|
|||
EDA_ITEM* SCH_RULE_AREA::Clone() const |
|||
{ |
|||
return new SCH_RULE_AREA( *this ); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::ViewGetLayers( int aLayers[], int& aCount ) const |
|||
{ |
|||
aCount = 3; |
|||
aLayers[0] = LAYER_RULE_AREAS; |
|||
aLayers[1] = LAYER_NOTES_BACKGROUND; |
|||
aLayers[2] = LAYER_SELECTION_SHADOWS; |
|||
} |
|||
|
|||
|
|||
std::vector<SHAPE*> SCH_RULE_AREA::MakeEffectiveShapes( bool aEdgeOnly ) const |
|||
{ |
|||
std::vector<SHAPE*> effectiveShapes; |
|||
int width = GetEffectiveWidth(); |
|||
|
|||
switch( m_shape ) |
|||
{ |
|||
case SHAPE_T::POLY: |
|||
{ |
|||
if( GetPolyShape().OutlineCount() == 0 ) // malformed/empty polygon
|
|||
break; |
|||
|
|||
for( int ii = 0; ii < GetPolyShape().OutlineCount(); ++ii ) |
|||
{ |
|||
const SHAPE_LINE_CHAIN& l = GetPolyShape().COutline( ii ); |
|||
|
|||
if( IsFilled() && !aEdgeOnly ) |
|||
effectiveShapes.emplace_back( new SHAPE_SIMPLE( l ) ); |
|||
|
|||
if( width > 0 || !IsFilled() || aEdgeOnly ) |
|||
{ |
|||
int segCount = l.SegmentCount(); |
|||
|
|||
for( int jj = 0; jj < segCount; jj++ ) |
|||
effectiveShapes.emplace_back( new SHAPE_SEGMENT( l.CSegment( jj ), width ) ); |
|||
} |
|||
} |
|||
} |
|||
break; |
|||
|
|||
default: |
|||
return SCH_SHAPE::MakeEffectiveShapes( aEdgeOnly ); |
|||
break; |
|||
} |
|||
|
|||
return effectiveShapes; |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS& aPlotOpts, |
|||
int aUnit, int aBodyStyle, const VECTOR2I& aOffset, bool aDimmed ) |
|||
{ |
|||
if( IsPrivate() ) |
|||
return; |
|||
|
|||
SCH_RENDER_SETTINGS* renderSettings = getRenderSettings( aPlotter ); |
|||
int pen_size = GetEffectivePenWidth( renderSettings ); |
|||
|
|||
if( GetShape() != SHAPE_T::POLY ) |
|||
SCH_SHAPE::Plot( aPlotter, aBackground, aPlotOpts, aUnit, aBodyStyle, aOffset, aDimmed ); |
|||
|
|||
static std::vector<VECTOR2I> ptList; |
|||
|
|||
ptList.clear(); |
|||
|
|||
const std::vector<VECTOR2I>& polyPoints = m_poly.Outline( 0 ).CPoints(); |
|||
|
|||
for( const VECTOR2I& pt : polyPoints ) |
|||
{ |
|||
ptList.push_back( pt ); |
|||
} |
|||
|
|||
ptList.push_back( polyPoints[0] ); |
|||
|
|||
COLOR4D color = GetStroke().GetColor(); |
|||
COLOR4D bg = renderSettings->GetBackgroundColor(); |
|||
LINE_STYLE lineStyle = GetStroke().GetLineStyle(); |
|||
FILL_T fill = m_fill; |
|||
|
|||
if( aBackground ) |
|||
{ |
|||
if( !aPlotter->GetColorMode() ) |
|||
return; |
|||
|
|||
switch( m_fill ) |
|||
{ |
|||
case FILL_T::FILLED_SHAPE: |
|||
return; |
|||
|
|||
case FILL_T::FILLED_WITH_COLOR: |
|||
color = GetFillColor(); |
|||
break; |
|||
|
|||
case FILL_T::FILLED_WITH_BG_BODYCOLOR: |
|||
color = renderSettings->GetLayerColor( LAYER_DEVICE_BACKGROUND ); |
|||
break; |
|||
|
|||
default: |
|||
return; |
|||
} |
|||
|
|||
pen_size = 0; |
|||
lineStyle = LINE_STYLE::SOLID; |
|||
} |
|||
else /* if( aForeground ) */ |
|||
{ |
|||
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED ) |
|||
color = renderSettings->GetLayerColor( m_layer ); |
|||
|
|||
if( lineStyle == LINE_STYLE::DEFAULT ) |
|||
lineStyle = LINE_STYLE::SOLID; |
|||
|
|||
if( m_fill == FILL_T::FILLED_SHAPE ) |
|||
fill = m_fill; |
|||
else |
|||
fill = FILL_T::NO_FILL; |
|||
|
|||
pen_size = GetEffectivePenWidth( renderSettings ); |
|||
} |
|||
|
|||
if( bg == COLOR4D::UNSPECIFIED || !aPlotter->GetColorMode() ) |
|||
bg = COLOR4D::WHITE; |
|||
|
|||
if( aDimmed ) |
|||
{ |
|||
color.Desaturate(); |
|||
color = color.Mix( bg, 0.5f ); |
|||
} |
|||
|
|||
aPlotter->SetColor( color ); |
|||
aPlotter->SetCurrentLineWidth( pen_size ); |
|||
aPlotter->SetDash( pen_size, lineStyle ); |
|||
|
|||
aPlotter->PlotPoly( ptList, fill, pen_size ); |
|||
|
|||
aPlotter->SetDash( pen_size, LINE_STYLE::SOLID ); |
|||
} |
|||
|
|||
|
|||
wxString SCH_RULE_AREA::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const |
|||
{ |
|||
return _( "Schematic rule area" ); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::ResetCaches( KIGFX::SCH_VIEW* view ) |
|||
{ |
|||
// Save the current state
|
|||
m_prev_items = m_items; |
|||
m_prev_directives = m_directives; |
|||
|
|||
// Reset the rule area
|
|||
clearContainedItems(); |
|||
clearDirectives( view ); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::RefreshContainedItemsAndDirectives( |
|||
SCH_SCREEN* screen, KIGFX::SCH_VIEW* view, |
|||
std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>>& forceUpdateRuleAreas ) |
|||
{ |
|||
EE_RTREE& items = screen->Items(); |
|||
const BOX2I boundingBox = GetBoundingBox(); |
|||
|
|||
// Get any SCH_DIRECTIVE_LABELs which are attached to the rule area border
|
|||
std::unordered_set<SCH_DIRECTIVE_LABEL*> attachedDirectives; |
|||
EE_RTREE::EE_TYPE candidateDirectives = items.Overlapping( SCH_DIRECTIVE_LABEL_T, boundingBox ); |
|||
|
|||
for( SCH_ITEM* candidateDirective : candidateDirectives ) |
|||
{ |
|||
SCH_DIRECTIVE_LABEL* label = static_cast<SCH_DIRECTIVE_LABEL*>( candidateDirective ); |
|||
const std::vector<VECTOR2I> labelConnectionPoints = label->GetConnectionPoints(); |
|||
assert( labelConnectionPoints.size() == 1 ); |
|||
|
|||
if( GetPolyShape().CollideEdge( labelConnectionPoints[0], nullptr, 5 ) ) |
|||
{ |
|||
addDirective( label, view ); |
|||
} |
|||
} |
|||
|
|||
// If directives have changed, we need to force an update of the contained items connectivity
|
|||
if( m_directives != m_prev_directives ) |
|||
forceUpdateRuleAreas.push_back( { this, screen } ); |
|||
|
|||
// Next find any connectable items which lie within the rule area
|
|||
EE_RTREE::EE_TYPE ruleAreaItems = items.Overlapping( boundingBox ); |
|||
|
|||
for( SCH_ITEM* areaItem : ruleAreaItems ) |
|||
{ |
|||
if( areaItem->IsType( { SCH_ITEM_LOCATE_WIRE_T, SCH_ITEM_LOCATE_BUS_T } ) ) |
|||
{ |
|||
SCH_LINE* lineItem = static_cast<SCH_LINE*>( areaItem ); |
|||
SHAPE_SEGMENT lineSeg( lineItem->GetStartPoint(), lineItem->GetEndPoint(), |
|||
lineItem->GetLineWidth() ); |
|||
|
|||
if( GetPolyShape().Collide( &lineSeg ) ) |
|||
{ |
|||
addContainedItem( areaItem ); |
|||
} |
|||
} |
|||
else if( areaItem->IsType( |
|||
{ SCH_PIN_T, SCH_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T } ) ) |
|||
{ |
|||
std::vector<VECTOR2I> connectionPoints = areaItem->GetConnectionPoints(); |
|||
assert( connectionPoints.size() == 1 ); |
|||
|
|||
if( GetPolyShape().Collide( connectionPoints[0] ) ) |
|||
{ |
|||
addContainedItem( areaItem ); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
std::unordered_set<SCH_ITEM*> SCH_RULE_AREA::GetPastAndPresentContainedItems() const |
|||
{ |
|||
std::unordered_set<SCH_ITEM*> items = m_items; |
|||
|
|||
for( SCH_ITEM* item : m_prev_items ) |
|||
items.insert( item ); |
|||
|
|||
return items; |
|||
} |
|||
|
|||
|
|||
std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>> |
|||
SCH_RULE_AREA::UpdateRuleAreasInScreens( std::unordered_set<SCH_SCREEN*>& screens, |
|||
KIGFX::SCH_VIEW* view ) |
|||
{ |
|||
std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>> forceUpdateRuleAreas; |
|||
|
|||
for( SCH_SCREEN* screen : screens ) |
|||
{ |
|||
// First reset all item caches - must be done first to ensure two rule areas
|
|||
// on the same item don't overwrite each other's caches
|
|||
for( SCH_ITEM* ruleAreaAsItem : screen->Items().OfType( SCH_RULE_AREA_T ) ) |
|||
{ |
|||
SCH_RULE_AREA* ruleArea = static_cast<SCH_RULE_AREA*>( ruleAreaAsItem ); |
|||
ruleArea->ResetCaches( view ); |
|||
} |
|||
|
|||
// Secondly refresh the contained items
|
|||
for( SCH_ITEM* ruleAreaAsItem : screen->Items().OfType( SCH_RULE_AREA_T ) ) |
|||
{ |
|||
SCH_RULE_AREA* ruleArea = static_cast<SCH_RULE_AREA*>( ruleAreaAsItem ); |
|||
ruleArea->RefreshContainedItemsAndDirectives( screen, view, forceUpdateRuleAreas ); |
|||
} |
|||
} |
|||
|
|||
return forceUpdateRuleAreas; |
|||
} |
|||
|
|||
|
|||
const std::unordered_set<SCH_ITEM*>& SCH_RULE_AREA::GetContainedItems() const |
|||
{ |
|||
return m_items; |
|||
} |
|||
|
|||
|
|||
const std::unordered_set<SCH_DIRECTIVE_LABEL*> SCH_RULE_AREA::GetDirectives() const |
|||
{ |
|||
return m_directives; |
|||
} |
|||
|
|||
|
|||
const std::vector<std::pair<wxString, SCH_ITEM*>> SCH_RULE_AREA::GetResolvedNetclasses() const |
|||
{ |
|||
std::vector<std::pair<wxString, SCH_ITEM*>> resolvedNetclasses; |
|||
|
|||
for( SCH_DIRECTIVE_LABEL* directive : m_directives ) |
|||
{ |
|||
directive->RunOnChildren( |
|||
[&]( SCH_ITEM* aChild ) |
|||
{ |
|||
if( aChild->Type() == SCH_FIELD_T ) |
|||
{ |
|||
SCH_FIELD* field = static_cast<SCH_FIELD*>( aChild ); |
|||
|
|||
if( field->GetCanonicalName() == wxT( "Netclass" ) ) |
|||
{ |
|||
wxString netclass = field->GetText(); |
|||
|
|||
if( netclass != wxEmptyString ) |
|||
resolvedNetclasses.push_back( { netclass, directive } ); |
|||
} |
|||
} |
|||
|
|||
return true; |
|||
} ); |
|||
} |
|||
|
|||
return resolvedNetclasses; |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::ResetDirectivesAndItems( KIGFX::SCH_VIEW* view ) |
|||
{ |
|||
for( SCH_DIRECTIVE_LABEL* label : m_directives ) |
|||
{ |
|||
label->ClearConnectedRuleAreas(); |
|||
view->Update( label, KIGFX::REPAINT ); |
|||
} |
|||
|
|||
for( SCH_ITEM* item : m_items ) |
|||
item->ClearRuleAreasCache(); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) |
|||
{ |
|||
aList.emplace_back( _( "Rule Area" ), wxEmptyString ); |
|||
|
|||
wxString msg; |
|||
msg.Printf( wxS( "%d" ), GetPolyShape().Outline( 0 ).PointCount() ); |
|||
aList.emplace_back( _( "Points" ), msg ); |
|||
|
|||
m_stroke.GetMsgPanelInfo( aFrame, aList ); |
|||
|
|||
const std::vector<std::pair<wxString, SCH_ITEM*>> netclasses = |
|||
SCH_RULE_AREA::GetResolvedNetclasses(); |
|||
wxString resolvedNetclass = _( "<None>" ); |
|||
|
|||
if( netclasses.size() > 0 ) |
|||
resolvedNetclass = netclasses[0].first; |
|||
|
|||
aList.emplace_back( _( "Resolved netclass" ), resolvedNetclass ); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::addDirective( SCH_DIRECTIVE_LABEL* label, KIGFX::SCH_VIEW* view ) |
|||
{ |
|||
label->AddConnectedRuleArea( this ); |
|||
m_directives.insert( label ); |
|||
|
|||
if( view ) |
|||
view->Update( label, KIGFX::REPAINT ); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::clearDirectives( KIGFX::SCH_VIEW* view ) |
|||
{ |
|||
for( SCH_DIRECTIVE_LABEL* label : m_directives ) |
|||
{ |
|||
label->ClearConnectedRuleAreas(); |
|||
|
|||
if( view ) |
|||
view->Update( label, KIGFX::REPAINT ); |
|||
} |
|||
|
|||
m_directives.clear(); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::addContainedItem( SCH_ITEM* item ) |
|||
{ |
|||
item->AddRuleAreaToCache( this ); |
|||
m_items.insert( item ); |
|||
} |
|||
|
|||
|
|||
void SCH_RULE_AREA::clearContainedItems() |
|||
{ |
|||
for( SCH_ITEM* item : m_items ) |
|||
item->ClearRuleAreasCache(); |
|||
|
|||
m_items.clear(); |
|||
} |
|||
|
|||
|
|||
static struct SCH_RULE_AREA_DESC |
|||
{ |
|||
SCH_RULE_AREA_DESC() |
|||
{ |
|||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance(); |
|||
REGISTER_TYPE( SCH_RULE_AREA ); |
|||
propMgr.AddTypeCast( new TYPE_CAST<SCH_RULE_AREA, SCH_SHAPE> ); |
|||
propMgr.AddTypeCast( new TYPE_CAST<SCH_RULE_AREA, SCH_ITEM> ); |
|||
propMgr.AddTypeCast( new TYPE_CAST<SCH_RULE_AREA, EDA_SHAPE> ); |
|||
propMgr.InheritsAfter( TYPE_HASH( SCH_RULE_AREA ), TYPE_HASH( SCH_SHAPE ) ); |
|||
propMgr.InheritsAfter( TYPE_HASH( SCH_RULE_AREA ), TYPE_HASH( SCH_ITEM ) ); |
|||
propMgr.InheritsAfter( TYPE_HASH( SCH_RULE_AREA ), TYPE_HASH( EDA_SHAPE ) ); |
|||
} |
|||
} _SCH_RULE_AREA_DESC; |
|||
@ -0,0 +1,125 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#ifndef SCH_RULE_AREA_H |
|||
#define SCH_RULE_AREA_H |
|||
|
|||
#include <unordered_set> |
|||
#include <utility> |
|||
|
|||
#include <plotters/plotter.h> |
|||
#include <sch_plotter.h> |
|||
#include <sch_screen.h> |
|||
#include <sch_shape.h> |
|||
#include <sch_label.h> |
|||
#include <sch_sheet_path.h> |
|||
#include <sch_view.h> |
|||
|
|||
class SCHEMATIC; |
|||
|
|||
class SCH_RULE_AREA : public SCH_SHAPE |
|||
{ |
|||
public: |
|||
SCH_RULE_AREA() : |
|||
SCH_SHAPE( SHAPE_T::POLY, LAYER_RULE_AREAS, 0 /* line width */, FILL_T::NO_FILL, |
|||
SCH_RULE_AREA_T ) |
|||
{ |
|||
SetLayer( LAYER_RULE_AREAS ); |
|||
} |
|||
|
|||
virtual ~SCH_RULE_AREA() {} |
|||
|
|||
wxString GetClass() const override; |
|||
|
|||
wxString GetFriendlyName() const override; |
|||
|
|||
EDA_ITEM* Clone() const override; |
|||
|
|||
void ViewGetLayers( int aLayers[], int& aCount ) const override; |
|||
|
|||
virtual std::vector<SHAPE*> MakeEffectiveShapes( bool aEdgeOnly = false ) const override; |
|||
|
|||
virtual void Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS& aPlotOpts, |
|||
int aUnit, int aBodyStyle, const VECTOR2I& aOffset, bool aDimmed ) override; |
|||
|
|||
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override; |
|||
|
|||
/// @brief Resets all item and directive caches, saving the current state first |
|||
void ResetCaches( KIGFX::SCH_VIEW* view ); |
|||
|
|||
/// @brief Refreshes the list of items which this rule area affects |
|||
void RefreshContainedItemsAndDirectives( |
|||
SCH_SCREEN* screen, KIGFX::SCH_VIEW* view, |
|||
std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>>& forceUpdateRuleAreas ); |
|||
|
|||
/// @brief Fetches all items which were, or are, within the rule area |
|||
std::unordered_set<SCH_ITEM*> GetPastAndPresentContainedItems() const; |
|||
|
|||
/// @brief Updates all rule area connectvity / caches in the given sheet paths |
|||
/// @returns A map of all updated rule areas and their owning screen |
|||
static std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>> |
|||
UpdateRuleAreasInScreens( std::unordered_set<SCH_SCREEN*>& screens, KIGFX::SCH_VIEW* view ); |
|||
|
|||
/// @brief Returns a set of all items contained within the rule area |
|||
const std::unordered_set<SCH_ITEM*>& GetContainedItems() const; |
|||
|
|||
/// @brief Returns the set of all directive labels attached to the rule area border |
|||
const std::unordered_set<SCH_DIRECTIVE_LABEL*> GetDirectives() const; |
|||
|
|||
/// @brief Resolves the netclass of this rule area from connected directive labels |
|||
/// @returns The resolved netclass (if any), and the SCH_ITEM providing the declaration |
|||
const std::vector<std::pair<wxString, SCH_ITEM*>> GetResolvedNetclasses() const; |
|||
|
|||
/// @brief Clears and resets items and directives attached to this rule area |
|||
void ResetDirectivesAndItems( KIGFX::SCH_VIEW* view ); |
|||
|
|||
/// @brief Gets the message panel info for the rule area |
|||
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override; |
|||
|
|||
protected: |
|||
/// @brief Adds a directive label which applies to items within ths rule area |
|||
void addDirective( SCH_DIRECTIVE_LABEL* label, KIGFX::SCH_VIEW* view ); |
|||
|
|||
/// @brief Clears the list of directives |
|||
void clearDirectives( KIGFX::SCH_VIEW* view ); |
|||
|
|||
/// @briefs Adds an item to the list of items which this rule area affects |
|||
void addContainedItem( SCH_ITEM* item ); |
|||
|
|||
/// @brief Clears the list of items which this rule area affects |
|||
void clearContainedItems(); |
|||
|
|||
/// All SCH_ITEMs currently contained or intersecting the rule area |
|||
std::unordered_set<SCH_ITEM*> m_items; |
|||
|
|||
/// All SCH_DIRECTIVE_LABELs attached to the rule area border |
|||
std::unordered_set<SCH_DIRECTIVE_LABEL*> m_directives; |
|||
|
|||
/// All SCH_ITEMs contained or intersecting the rule area in the previous update |
|||
std::unordered_set<SCH_ITEM*> m_prev_items; |
|||
|
|||
/// All SCH_DIRECTIVE_LABELs attached to the rule area border in the previous update |
|||
std::unordered_set<SCH_DIRECTIVE_LABEL*> m_prev_directives; |
|||
}; |
|||
|
|||
#endif |
|||
@ -0,0 +1,175 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2017-2023 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 |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|||
* or you may search the http://www.gnu.org website for the version 2 license,
|
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#include <core/spinlock.h>
|
|||
#include <geometry/shape_poly_set.h>
|
|||
#include <geometry/shape_line_chain.h>
|
|||
#include <sch_commit.h>
|
|||
#include <sch_edit_frame.h>
|
|||
#include <sch_rule_area.h>
|
|||
#include <tool/tool_manager.h>
|
|||
#include <tools/ee_actions.h>
|
|||
#include <tools/rule_area_create_helper.h>
|
|||
|
|||
|
|||
RULE_AREA_CREATE_HELPER::RULE_AREA_CREATE_HELPER( KIGFX::VIEW& aView, SCH_EDIT_FRAME* aFrame, |
|||
TOOL_MANAGER* aMgr ) : |
|||
m_parentView( aView ), |
|||
m_frame( aFrame ), m_toolManager( aMgr ) |
|||
{ |
|||
m_parentView.Add( &m_previewItem ); |
|||
} |
|||
|
|||
|
|||
RULE_AREA_CREATE_HELPER::~RULE_AREA_CREATE_HELPER() |
|||
{ |
|||
// remove the preview from the view
|
|||
m_parentView.SetVisible( &m_previewItem, false ); |
|||
m_parentView.Remove( &m_previewItem ); |
|||
} |
|||
|
|||
|
|||
std::unique_ptr<SCH_RULE_AREA> RULE_AREA_CREATE_HELPER::createNewRuleArea() |
|||
{ |
|||
std::unique_ptr<SCH_RULE_AREA> ruleArea = std::make_unique<SCH_RULE_AREA>(); |
|||
ruleArea->SetLineStyle( LINE_STYLE::DASH ); |
|||
ruleArea->SetLineColor( COLOR4D::UNSPECIFIED ); |
|||
|
|||
return ruleArea; |
|||
} |
|||
|
|||
|
|||
void RULE_AREA_CREATE_HELPER::commitRuleArea( std::unique_ptr<SCH_RULE_AREA> aRuleArea ) |
|||
{ |
|||
SCH_COMMIT commit( m_toolManager ); |
|||
|
|||
SCH_RULE_AREA* ruleArea = aRuleArea.release(); |
|||
|
|||
commit.Add( ruleArea, m_frame->GetScreen() ); |
|||
commit.Push( _( "Draw Rule Area" ) ); |
|||
|
|||
m_toolManager->RunAction<EDA_ITEM*>( EE_ACTIONS::addItemToSel, ruleArea ); |
|||
|
|||
m_parentView.ClearPreview(); |
|||
} |
|||
|
|||
|
|||
bool RULE_AREA_CREATE_HELPER::OnFirstPoint( POLYGON_GEOM_MANAGER& aMgr ) |
|||
{ |
|||
m_rule_area = createNewRuleArea(); |
|||
|
|||
if( m_rule_area ) |
|||
{ |
|||
m_toolManager->RunAction( EE_ACTIONS::clearSelection ); |
|||
|
|||
SCH_RENDER_SETTINGS renderSettings; |
|||
COLOR_SETTINGS* colorSettings = m_frame->GetColorSettings(); |
|||
renderSettings.LoadColors( colorSettings ); |
|||
|
|||
COLOR4D color = renderSettings.GetLayerColor( LAYER_RULE_AREAS ); |
|||
m_previewItem.SetLineColor( color ); |
|||
m_previewItem.SetLeaderColor( color ); |
|||
m_previewItem.SetFillColor( color.WithAlpha( 0.2 ) ); |
|||
|
|||
m_parentView.SetVisible( &m_previewItem, true ); |
|||
|
|||
aMgr.SetLeaderMode( POLYGON_GEOM_MANAGER::LEADER_MODE::DEG45 ); |
|||
} |
|||
|
|||
return m_rule_area != nullptr; |
|||
} |
|||
|
|||
|
|||
void RULE_AREA_CREATE_HELPER::OnGeometryChange( const POLYGON_GEOM_MANAGER& aMgr ) |
|||
{ |
|||
// Handle a cancel-interactive
|
|||
if( m_rule_area && !aMgr.IsPolygonInProgress() ) |
|||
{ |
|||
m_rule_area = nullptr; |
|||
m_parentView.SetVisible( &m_previewItem, false ); |
|||
return; |
|||
} |
|||
|
|||
// send the points to the preview item
|
|||
m_previewItem.SetPoints( aMgr.GetLockedInPoints(), aMgr.GetLeaderLinePoints(), |
|||
aMgr.GetLoopLinePoints() ); |
|||
m_parentView.Update( &m_previewItem, KIGFX::GEOMETRY ); |
|||
} |
|||
|
|||
|
|||
void RULE_AREA_CREATE_HELPER::OnComplete( const POLYGON_GEOM_MANAGER& aMgr ) |
|||
{ |
|||
auto& finalPoints = aMgr.GetLockedInPoints(); |
|||
|
|||
if( finalPoints.PointCount() < 3 ) |
|||
{ |
|||
// Just scrap the rule area in progress
|
|||
m_rule_area = nullptr; |
|||
} |
|||
else |
|||
{ |
|||
SHAPE_POLY_SET ruleShape; |
|||
|
|||
ruleShape.NewOutline(); |
|||
auto& outline = ruleShape.Outline( 0 ); |
|||
|
|||
for( int i = 0; i < finalPoints.PointCount(); ++i ) |
|||
outline.Append( finalPoints.CPoint( i ) ); |
|||
|
|||
// In DEG45 mode, we may have intermediate points in the leader that should be included
|
|||
// as they are shown in the preview. These typically maintain the 45 constraint
|
|||
if( aMgr.GetLeaderMode() == POLYGON_GEOM_MANAGER::LEADER_MODE::DEG45 ) |
|||
{ |
|||
const SHAPE_LINE_CHAIN leaderPts = aMgr.GetLeaderLinePoints(); |
|||
for( int i = 1; i < leaderPts.PointCount(); i++ ) |
|||
outline.Append( leaderPts.CPoint( i ) ); |
|||
|
|||
const SHAPE_LINE_CHAIN loopPts = aMgr.GetLoopLinePoints(); |
|||
for( int i = 1; i < loopPts.PointCount() - 1; i++ ) |
|||
outline.Append( loopPts.CPoint( i ) ); |
|||
} |
|||
|
|||
outline.SetClosed( true ); |
|||
outline.Simplify( true ); |
|||
|
|||
// Remove the start point if it lies on the line between neighbouring points.
|
|||
// Simplify doesn't handle that currently.
|
|||
if( outline.PointCount() >= 3 ) |
|||
{ |
|||
SEG seg( outline.CPoint( -1 ), outline.CPoint( 1 ) ); |
|||
|
|||
if( seg.LineDistance( outline.CPoint( 0 ) ) <= 1 ) |
|||
outline.Remove( 0 ); |
|||
} |
|||
|
|||
m_rule_area->SetPolyShape( ruleShape ); |
|||
|
|||
// hand the rule area over to the committer
|
|||
commitRuleArea( std::move( m_rule_area ) ); |
|||
m_rule_area = nullptr; |
|||
} |
|||
|
|||
m_parentView.SetVisible( &m_previewItem, false ); |
|||
} |
|||
|
|||
|
|||
@ -0,0 +1,93 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Kicad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#ifndef EESCHEMA_TOOLS_RULE_CREATE_HELPER__H_ |
|||
#define EESCHEMA_TOOLS_RULE_CREATE_HELPER__H_ |
|||
|
|||
#include <preview_items/polygon_geom_manager.h> |
|||
#include <preview_items/polygon_item.h> |
|||
#include "sch_rule_area.h" |
|||
#include <view/view.h> |
|||
|
|||
namespace KIGFX |
|||
{ |
|||
class VIEW; |
|||
} |
|||
|
|||
class TOOL_MANAGER; |
|||
|
|||
/** |
|||
* An adjunct helper to the DRAWING_TOOL interactive tool, which handles incoming geometry |
|||
* changes from a #POLYGON_GEOM_MANAGER and translates that into a SCH_RULE_AREA based on given |
|||
* parameters. |
|||
*/ |
|||
class RULE_AREA_CREATE_HELPER : public POLYGON_GEOM_MANAGER::CLIENT |
|||
{ |
|||
public: |
|||
RULE_AREA_CREATE_HELPER( KIGFX::VIEW& aView, SCH_EDIT_FRAME* aFrame, TOOL_MANAGER* aMgr ); |
|||
|
|||
virtual ~RULE_AREA_CREATE_HELPER(); |
|||
|
|||
SCH_RULE_AREA* GetRuleArea() const { return m_rule_area.get(); } |
|||
|
|||
/* |
|||
* Interface for receiving #POLYGON_GEOM_MANAGER update |
|||
*/ |
|||
void OnGeometryChange( const POLYGON_GEOM_MANAGER& aMgr ) override; |
|||
|
|||
bool OnFirstPoint( POLYGON_GEOM_MANAGER& aMgr ) override; |
|||
|
|||
void OnComplete( const POLYGON_GEOM_MANAGER& aMgr ) override; |
|||
|
|||
/** |
|||
* Create a new SCH_RULE_AREA |
|||
* |
|||
* @return the new rule area, can be null if the user aborted |
|||
*/ |
|||
std::unique_ptr<SCH_RULE_AREA> createNewRuleArea(); |
|||
|
|||
/** |
|||
* Commit the current rule area in progress to the schematic. |
|||
* |
|||
* @param aRuleArea is the drawn rule area outline to commit. |
|||
*/ |
|||
void commitRuleArea( std::unique_ptr<SCH_RULE_AREA> aRuleArea ); |
|||
|
|||
private: |
|||
///< The preview item to display |
|||
KIGFX::PREVIEW::POLYGON_ITEM m_previewItem; |
|||
|
|||
///< view that show the preview item |
|||
KIGFX::VIEW& m_parentView; |
|||
|
|||
///< The active schematic edit frame |
|||
SCH_EDIT_FRAME* m_frame; |
|||
|
|||
///< The rule area in progress |
|||
std::unique_ptr<SCH_RULE_AREA> m_rule_area; |
|||
|
|||
///< The TOOL_MANAGER running the tool |
|||
TOOL_MANAGER* m_toolManager; |
|||
}; |
|||
|
|||
#endif // EESCHEMA_TOOLS_RULE_CREATE_HELPER__H_ |
|||
@ -0,0 +1,376 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "0726e9d1-eea3-424d-8780-ca27e04db582") |
|||
(paper "A4") |
|||
(lib_symbols |
|||
(symbol "Device:R" |
|||
(pin_numbers hide) |
|||
(pin_names |
|||
(offset 0) |
|||
) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(property "Reference" "R" |
|||
(at 2.032 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 0 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at -1.778 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_keywords" "R res resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_fp_filters" "R_*" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(symbol "R_0_1" |
|||
(rectangle |
|||
(start -1.016 -2.54) |
|||
(end 1.016 2.54) |
|||
(stroke |
|||
(width 0.254) |
|||
(type default) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
) |
|||
) |
|||
(symbol "R_1_1" |
|||
(pin passive line |
|||
(at 0 3.81 270) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "1" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(pin passive line |
|||
(at 0 -3.81 90) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "2" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(no_connect |
|||
(at 121.92 97.79) |
|||
(uuid "4236af9f-a6bf-4cf1-9924-15f3612b7e4e") |
|||
) |
|||
(no_connect |
|||
(at 83.82 73.66) |
|||
(uuid "5e7b627b-1c2e-465a-84ed-c5ec27af46ab") |
|||
) |
|||
(wire |
|||
(pts |
|||
(xy 91.44 73.66) (xy 121.92 73.66) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type default) |
|||
) |
|||
(uuid "73c537ad-8abb-4a42-9ec1-e67712c81b34") |
|||
) |
|||
(wire |
|||
(pts |
|||
(xy 121.92 90.17) (xy 121.92 73.66) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type default) |
|||
) |
|||
(uuid "f443e7c4-f627-4cda-b5a1-cbc238e17fb4") |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 93.98 67.31) (xy 99.06 67.31) (xy 99.06 80.01) (xy 96.52 82.55) (xy 95.25 81.28) (xy 95.25 77.47) |
|||
(xy 93.98 76.2) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 40e86e61-b17e-4a50-a591-d1015a45e6e4) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 133.35 77.47) (xy 133.35 83.82) (xy 114.3 83.82) (xy 111.76 81.28) (xy 111.76 77.47) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid ea7226cb-9108-48d9-9ca3-95d32a5d4077) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 95.25 67.31 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "71111a86-8188-4247-ad10-36f2f6d838f8") |
|||
(property "Netclass" "CLASS1" |
|||
(at 95.9485 64.77 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 133.35 80.01 270) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify right bottom) |
|||
) |
|||
(uuid "e8b709aa-42c8-45a8-8cd0-dd3110e4048f") |
|||
(property "Netclass" "CLASS2" |
|||
(at 135.89 79.3115 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 121.92 93.98 180) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "e294c19e-e287-4924-9e89-aea9a1a5c8e1") |
|||
(property "Reference" "R2" |
|||
(at 128.27 93.98 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 125.73 93.98 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 123.698 93.98 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 121.92 93.98 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 121.92 93.98 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "6e8901c6-d0c5-455a-a42b-f31a4c09e3db") |
|||
) |
|||
(pin "2" |
|||
(uuid "fcf2f54f-8f15-40c7-882e-02cb8d2d987f") |
|||
) |
|||
(instances |
|||
(project "RuleAreaNetclassConflictOnWire" |
|||
(path "/0726e9d1-eea3-424d-8780-ca27e04db582" |
|||
(reference "R2") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 87.63 73.66 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "e33b52ff-7e35-442f-8c36-1e6677209b8c") |
|||
(property "Reference" "R1" |
|||
(at 87.63 67.31 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 87.63 69.85 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 87.63 71.882 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 87.63 73.66 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 87.63 73.66 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "c87ab3da-a973-4c8f-8e38-3156b231d8af") |
|||
) |
|||
(pin "2" |
|||
(uuid "5d2f6407-4aee-4cc1-850a-883ae2f37307") |
|||
) |
|||
(instances |
|||
(project "" |
|||
(path "/0726e9d1-eea3-424d-8780-ca27e04db582" |
|||
(reference "R1") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,365 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "0726e9d1-eea3-424d-8780-ca27e04db582") |
|||
(paper "A4") |
|||
(lib_symbols |
|||
(symbol "Device:R" |
|||
(pin_numbers hide) |
|||
(pin_names |
|||
(offset 0) |
|||
) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(property "Reference" "R" |
|||
(at 2.032 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 0 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at -1.778 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_keywords" "R res resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_fp_filters" "R_*" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(symbol "R_0_1" |
|||
(rectangle |
|||
(start -1.016 -2.54) |
|||
(end 1.016 2.54) |
|||
(stroke |
|||
(width 0.254) |
|||
(type default) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
) |
|||
) |
|||
(symbol "R_1_1" |
|||
(pin passive line |
|||
(at 0 3.81 270) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "1" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(pin passive line |
|||
(at 0 -3.81 90) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "2" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(no_connect |
|||
(at 127 73.66) |
|||
(uuid "4236af9f-a6bf-4cf1-9924-15f3612b7e4e") |
|||
) |
|||
(no_connect |
|||
(at 83.82 73.66) |
|||
(uuid "5e7b627b-1c2e-465a-84ed-c5ec27af46ab") |
|||
) |
|||
(wire |
|||
(pts |
|||
(xy 91.44 73.66) (xy 119.38 73.66) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type default) |
|||
) |
|||
(uuid "73c537ad-8abb-4a42-9ec1-e67712c81b34") |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 106.68 67.31) (xy 110.49 67.31) (xy 110.49 77.47) (xy 106.68 77.47) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 03801fed-03b2-45ff-96c8-aae8ef0df963) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 93.98 67.31) (xy 97.79 67.31) (xy 97.79 80.01) (xy 93.98 80.01) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 6fd89307-6035-4c4e-8858-d37921436305) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 95.25 67.31 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "71111a86-8188-4247-ad10-36f2f6d838f8") |
|||
(property "Netclass" "CLASS1" |
|||
(at 95.9485 64.77 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 107.95 67.31 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "e8b709aa-42c8-45a8-8cd0-dd3110e4048f") |
|||
(property "Netclass" "CLASS2" |
|||
(at 108.6485 64.77 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 123.19 73.66 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "e294c19e-e287-4924-9e89-aea9a1a5c8e1") |
|||
(property "Reference" "R2" |
|||
(at 123.19 67.31 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 123.19 69.85 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 123.19 71.882 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 123.19 73.66 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 123.19 73.66 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "6e8901c6-d0c5-455a-a42b-f31a4c09e3db") |
|||
) |
|||
(pin "2" |
|||
(uuid "fcf2f54f-8f15-40c7-882e-02cb8d2d987f") |
|||
) |
|||
(instances |
|||
(project "RuleAreaNetclassConflictOnWire" |
|||
(path "/0726e9d1-eea3-424d-8780-ca27e04db582" |
|||
(reference "R2") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 87.63 73.66 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "e33b52ff-7e35-442f-8c36-1e6677209b8c") |
|||
(property "Reference" "R1" |
|||
(at 87.63 67.31 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 87.63 69.85 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 87.63 71.882 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 87.63 73.66 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 87.63 73.66 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "c87ab3da-a973-4c8f-8e38-3156b231d8af") |
|||
) |
|||
(pin "2" |
|||
(uuid "5d2f6407-4aee-4cc1-850a-883ae2f37307") |
|||
) |
|||
(instances |
|||
(project "" |
|||
(path "/0726e9d1-eea3-424d-8780-ca27e04db582" |
|||
(reference "R1") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,45 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "e77939c4-758d-4d0c-a6e5-dc441c8c54c9") |
|||
(paper "A4") |
|||
(lib_symbols) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 144.78 63.5) (xy 177.8 63.5) (xy 180.34 66.04) (xy 180.34 110.49) (xy 171.45 110.49) (xy 157.48 96.52) |
|||
(xy 148.59 105.41) (xy 148.59 107.95) (xy 133.35 92.71) (xy 133.35 85.09) (xy 139.7 78.74) (xy 139.7 68.58) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 4f0aecc0-f3b3-4645-a47e-6a29fb5ff671) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 69.85 49.53) (xy 101.6 49.53) (xy 101.6 73.66) (xy 95.25 80.01) (xy 86.36 80.01) (xy 76.2 69.85) |
|||
(xy 76.2 66.04) (xy 78.74 63.5) (xy 69.85 54.61) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 839de646-0221-4c81-b248-242a273d8ed3) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,327 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "8a90b8e2-28c2-4028-bcb6-cef3be983f1e") |
|||
(paper "A4") |
|||
(lib_symbols |
|||
(symbol "Device:R" |
|||
(pin_numbers hide) |
|||
(pin_names |
|||
(offset 0) |
|||
) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(property "Reference" "R" |
|||
(at 2.032 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 0 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at -1.778 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_keywords" "R res resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_fp_filters" "R_*" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(symbol "R_0_1" |
|||
(rectangle |
|||
(start -1.016 -2.54) |
|||
(end 1.016 2.54) |
|||
(stroke |
|||
(width 0.254) |
|||
(type default) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
) |
|||
) |
|||
(symbol "R_1_1" |
|||
(pin passive line |
|||
(at 0 3.81 270) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "1" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(pin passive line |
|||
(at 0 -3.81 90) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "2" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(no_connect |
|||
(at 132.08 53.34) |
|||
(uuid "45692886-21e1-4796-b1b4-634d6c7163d5") |
|||
) |
|||
(no_connect |
|||
(at 83.82 53.34) |
|||
(uuid "c283f30d-202c-4a0d-9d0a-ea95c5656841") |
|||
) |
|||
(wire |
|||
(pts |
|||
(xy 91.44 53.34) (xy 124.46 53.34) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type default) |
|||
) |
|||
(uuid "6f61af9e-a21c-4ea8-aac1-554407fe006a") |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 99.06 44.45) (xy 105.41 44.45) (xy 105.41 60.96) (xy 99.06 60.96) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 01d7705f-5c3d-4abe-b2c7-9e8f5b00caa8) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 101.6 44.45 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "655ca652-695a-4f6a-93fa-4347d69a2f15") |
|||
(property "Netclass" "CLASS1" |
|||
(at 102.2985 41.91 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 87.63 53.34 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "57d8460e-6d78-4dc9-8734-201edb21294a") |
|||
(property "Reference" "R1" |
|||
(at 87.63 46.99 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 87.63 49.53 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 87.63 51.562 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 87.63 53.34 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 87.63 53.34 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "5d7b48cb-ccac-454c-b8ae-d8106594e160") |
|||
) |
|||
(pin "2" |
|||
(uuid "e59c83d5-3e67-4d97-8414-98cf0d4cd0f7") |
|||
) |
|||
(instances |
|||
(project "" |
|||
(path "/8a90b8e2-28c2-4028-bcb6-cef3be983f1e" |
|||
(reference "R1") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 128.27 53.34 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "758cfdea-5424-4d58-a623-ef6afa897cdc") |
|||
(property "Reference" "R2" |
|||
(at 128.27 46.99 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 128.27 49.53 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 128.27 51.562 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 128.27 53.34 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 128.27 53.34 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "fc325f46-cf90-477d-b24e-842cfcdab056") |
|||
) |
|||
(pin "2" |
|||
(uuid "d48f9df0-ba21-474c-878e-433fd5cecebf") |
|||
) |
|||
(instances |
|||
(project "RuleAreaOneNetclassDirective" |
|||
(path "/8a90b8e2-28c2-4028-bcb6-cef3be983f1e" |
|||
(reference "R2") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,43 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "e77939c4-758d-4d0c-a6e5-dc441c8c54c9") |
|||
(paper "A4") |
|||
(lib_symbols) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 81.28 64.77) (xy 107.95 64.77) (xy 107.95 97.79) (xy 106.68 99.06) (xy 100.33 99.06) (xy 81.28 80.01) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 29482117-50fb-4bf0-9227-b57a2a024196) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 63.5 48.26) (xy 95.25 48.26) (xy 95.25 76.2) (xy 92.71 78.74) (xy 67.31 78.74) (xy 63.5 74.93) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid fb9e0dd5-7b94-4714-b095-086e21d4076e) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,75 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "e77939c4-758d-4d0c-a6e5-dc441c8c54c9") |
|||
(paper "A4") |
|||
(lib_symbols) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 193.04 80.01) (xy 229.87 80.01) (xy 231.14 81.28) (xy 231.14 111.76) (xy 205.74 111.76) (xy 199.39 105.41) |
|||
(xy 199.39 102.87) (xy 193.04 96.52) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 205fcd89-40f4-4d53-8543-c72a408467cf) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 215.9 100.33) (xy 215.9 135.89) (xy 250.19 135.89) (xy 255.27 130.81) (xy 255.27 109.22) (xy 246.38 100.33) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 4953ad1a-332e-4324-a6e9-44125580b5ce) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 90.17 52.07) (xy 64.77 52.07) (xy 64.77 71.12) (xy 73.66 80.01) (xy 77.47 80.01) (xy 90.17 67.31) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 9e60651e-f0c3-4ab3-88c0-5b67a7585ce9) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 80.01 66.04) (xy 107.95 66.04) (xy 110.49 68.58) (xy 110.49 100.33) (xy 85.09 100.33) (xy 74.93 90.17) |
|||
(xy 74.93 71.12) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid a2990ee5-6b66-496f-a7b1-0402651214fa) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,373 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "3faa707b-1d78-466d-bafe-1ee08b43bb08") |
|||
(paper "A4") |
|||
(lib_symbols |
|||
(symbol "Device:R" |
|||
(pin_numbers hide) |
|||
(pin_names |
|||
(offset 0) |
|||
) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(property "Reference" "R" |
|||
(at 2.032 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 0 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at -1.778 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_keywords" "R res resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_fp_filters" "R_*" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(symbol "R_0_1" |
|||
(rectangle |
|||
(start -1.016 -2.54) |
|||
(end 1.016 2.54) |
|||
(stroke |
|||
(width 0.254) |
|||
(type default) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
) |
|||
) |
|||
(symbol "R_1_1" |
|||
(pin passive line |
|||
(at 0 3.81 270) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "1" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(pin passive line |
|||
(at 0 -3.81 90) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "2" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(no_connect |
|||
(at 88.9 74.93) |
|||
(uuid "5833ab2c-0b21-4284-bda0-ec7a7f3886e3") |
|||
) |
|||
(no_connect |
|||
(at 137.16 74.93) |
|||
(uuid "6a8eab8a-8b70-48aa-8775-bd58e38e6544") |
|||
) |
|||
(wire |
|||
(pts |
|||
(xy 96.52 74.93) (xy 129.54 74.93) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type default) |
|||
) |
|||
(uuid "3c913039-c0ff-4276-9bfd-95aa6d609814") |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 102.87 66.04) (xy 119.38 66.04) (xy 119.38 78.74) (xy 113.03 85.09) (xy 107.95 85.09) (xy 102.87 80.01) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 732edf9e-56d8-43fc-b7ec-e3df2ffeb182) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 106.68 66.04 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "0e535a38-1e87-423a-9462-046eeca2761f") |
|||
(property "Netclass" "CLASS1" |
|||
(at 107.3785 63.5 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 115.57 66.04 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "3651b727-06a6-4517-b594-14249bcb01ff") |
|||
(property "Netclass" "CLASS2" |
|||
(at 116.2685 63.5 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 111.76 85.09 180) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify right bottom) |
|||
) |
|||
(uuid "39c91c96-4582-476e-aaa8-0403610211a4") |
|||
(property "Netclass" "CLASS3" |
|||
(at 112.4585 87.63 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 133.35 74.93 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "69906541-660f-49dd-b971-79ef911d51f2") |
|||
(property "Reference" "R2" |
|||
(at 133.35 68.58 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 133.35 71.12 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 133.35 73.152 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 133.35 74.93 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 133.35 74.93 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "5a4f2edd-e02e-4a2a-b273-2a79268c7b9b") |
|||
) |
|||
(pin "2" |
|||
(uuid "92e081c4-e86d-400c-82e1-d46671606b34") |
|||
) |
|||
(instances |
|||
(project "RuleAreaThreeNetclassDirectives" |
|||
(path "/3faa707b-1d78-466d-bafe-1ee08b43bb08" |
|||
(reference "R2") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 92.71 74.93 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "6c332818-966e-43a5-87c5-6aea83712c35") |
|||
(property "Reference" "R1" |
|||
(at 92.71 68.58 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 92.71 71.12 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 92.71 73.152 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 92.71 74.93 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 92.71 74.93 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "50fab8cc-532c-479e-a764-1688c768c001") |
|||
) |
|||
(pin "2" |
|||
(uuid "0f5fce2a-437e-4928-b1e0-0469819dd910") |
|||
) |
|||
(instances |
|||
(project "RuleAreaThreeNetclassDirectives" |
|||
(path "/3faa707b-1d78-466d-bafe-1ee08b43bb08" |
|||
(reference "R1") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,350 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "72af7883-b930-45a7-b8c1-7781d1afdd37") |
|||
(paper "A4") |
|||
(lib_symbols |
|||
(symbol "Device:R" |
|||
(pin_numbers hide) |
|||
(pin_names |
|||
(offset 0) |
|||
) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(property "Reference" "R" |
|||
(at 2.032 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 0 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at -1.778 0 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_keywords" "R res resistor" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "ki_fp_filters" "R_*" |
|||
(at 0 0 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(symbol "R_0_1" |
|||
(rectangle |
|||
(start -1.016 -2.54) |
|||
(end 1.016 2.54) |
|||
(stroke |
|||
(width 0.254) |
|||
(type default) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
) |
|||
) |
|||
(symbol "R_1_1" |
|||
(pin passive line |
|||
(at 0 3.81 270) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "1" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(pin passive line |
|||
(at 0 -3.81 90) |
|||
(length 1.27) |
|||
(name "~" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(number "2" |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(no_connect |
|||
(at 106.68 71.12) |
|||
(uuid "2f717211-60fa-4046-b14f-c148c1bebb31") |
|||
) |
|||
(no_connect |
|||
(at 154.94 71.12) |
|||
(uuid "e58e3d56-33f2-47c1-8169-9b603a68c30f") |
|||
) |
|||
(wire |
|||
(pts |
|||
(xy 114.3 71.12) (xy 147.32 71.12) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type default) |
|||
) |
|||
(uuid "2d14d2f0-6ae7-41c8-8699-c57748f8f4ae") |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 121.92 62.23) (xy 137.16 62.23) (xy 137.16 73.66) (xy 135.89 74.93) (xy 123.19 74.93) (xy 121.92 73.66) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid 826526a6-b643-4832-8cb3-7693aac87471) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 133.35 62.23 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "0318db31-1e4c-4d69-8534-0e5f3ee9c7eb") |
|||
(property "Netclass" "CLASS2" |
|||
(at 134.0485 59.69 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(netclass_flag "" |
|||
(length 2.54) |
|||
(shape round) |
|||
(at 124.46 62.23 0) |
|||
(fields_autoplaced yes) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(justify left bottom) |
|||
) |
|||
(uuid "74dc4bc7-6913-49ba-a2f3-bcdc39c3019f") |
|||
(property "Netclass" "CLASS1" |
|||
(at 125.1585 59.69 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
(italic yes) |
|||
) |
|||
(justify left) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 151.13 71.12 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "4f5c367d-1c08-48f1-86dc-e95b0140a51b") |
|||
(property "Reference" "R2" |
|||
(at 151.13 64.77 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 151.13 67.31 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 151.13 69.342 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 151.13 71.12 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 151.13 71.12 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "dbe85168-ed53-4e8a-8c45-277d6c150cde") |
|||
) |
|||
(pin "2" |
|||
(uuid "4c070690-f1aa-48d2-a083-8c7fe39df9c2") |
|||
) |
|||
(instances |
|||
(project "RuleAreaTwoNetclassDirectives" |
|||
(path "/72af7883-b930-45a7-b8c1-7781d1afdd37" |
|||
(reference "R2") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(symbol |
|||
(lib_id "Device:R") |
|||
(at 110.49 71.12 270) |
|||
(unit 1) |
|||
(exclude_from_sim no) |
|||
(in_bom yes) |
|||
(on_board yes) |
|||
(dnp no) |
|||
(fields_autoplaced yes) |
|||
(uuid "7848d115-602f-44c3-b980-c1e03934ea7e") |
|||
(property "Reference" "R1" |
|||
(at 110.49 64.77 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Value" "R" |
|||
(at 110.49 67.31 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
) |
|||
) |
|||
(property "Footprint" "" |
|||
(at 110.49 69.342 90) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Datasheet" "~" |
|||
(at 110.49 71.12 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(property "Description" "Resistor" |
|||
(at 110.49 71.12 0) |
|||
(effects |
|||
(font |
|||
(size 1.27 1.27) |
|||
) |
|||
(hide yes) |
|||
) |
|||
) |
|||
(pin "1" |
|||
(uuid "84a25105-1263-4adf-a0a5-a2bdf51e736e") |
|||
) |
|||
(pin "2" |
|||
(uuid "4d2f1a67-27d6-4ef0-a95f-9a34d0373e7d") |
|||
) |
|||
(instances |
|||
(project "RuleAreaTwoNetclassDirectives" |
|||
(path "/72af7883-b930-45a7-b8c1-7781d1afdd37" |
|||
(reference "R1") |
|||
(unit 1) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,58 @@ |
|||
(kicad_sch |
|||
(version 20240417) |
|||
(generator "eeschema") |
|||
(generator_version "8.99") |
|||
(uuid "e77939c4-758d-4d0c-a6e5-dc441c8c54c9") |
|||
(paper "A4") |
|||
(lib_symbols) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 105.41 66.04) (xy 105.41 95.25) (xy 124.46 95.25) (xy 133.35 86.36) (xy 133.35 83.82) (xy 115.57 66.04) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid b2e29650-5d7b-46fa-b3ac-2da8c988ba4f) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 85.09 76.2) (xy 114.3 76.2) (xy 114.3 107.95) (xy 92.71 107.95) (xy 85.09 100.33) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid c2d18c36-f42f-4d71-b979-aec0f5842e3b) |
|||
) |
|||
) |
|||
(rule_area |
|||
(polyline |
|||
(pts |
|||
(xy 68.58 60.96) (xy 96.52 60.96) (xy 97.79 62.23) (xy 97.79 88.9) (xy 76.2 88.9) (xy 68.58 81.28) |
|||
) |
|||
(stroke |
|||
(width 0) |
|||
(type dash) |
|||
) |
|||
(fill |
|||
(type none) |
|||
) |
|||
(uuid d4219527-beea-4857-99ad-9080af58cbc4) |
|||
) |
|||
) |
|||
(sheet_instances |
|||
(path "/" |
|||
(page "1") |
|||
) |
|||
) |
|||
) |
|||
@ -0,0 +1,139 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.TXT for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 3 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one at |
|||
* http://www.gnu.org/licenses/
|
|||
*/ |
|||
|
|||
#include <qa_utils/wx_utils/unit_test_utils.h>
|
|||
#include <schematic_utils/schematic_file_util.h>
|
|||
|
|||
#include <connection_graph.h>
|
|||
#include <schematic.h>
|
|||
#include <erc_settings.h>
|
|||
#include <erc.h>
|
|||
#include <erc_report.h>
|
|||
#include <sch_rule_area.h>
|
|||
#include <settings/settings_manager.h>
|
|||
#include <locale_io.h>
|
|||
|
|||
|
|||
struct ERC_REGRESSION_TEST_FIXTURE |
|||
{ |
|||
ERC_REGRESSION_TEST_FIXTURE() : m_settingsManager( true /* headless */ ) {} |
|||
|
|||
SETTINGS_MANAGER m_settingsManager; |
|||
std::unique_ptr<SCHEMATIC> m_schematic; |
|||
}; |
|||
|
|||
|
|||
BOOST_FIXTURE_TEST_CASE( ERCRuleAreaNetClasseDirectives, ERC_REGRESSION_TEST_FIXTURE ) |
|||
{ |
|||
LOCALE_IO dummy; |
|||
|
|||
// Check for Errors when using rule area netclass directives
|
|||
std::vector<std::pair<wxString, int>> tests = { { "RuleAreaOneNetclassDirective", 0 }, |
|||
{ "RuleAreaTwoNetclassDirectives", 1 }, |
|||
{ "RuleAreaThreeNetclassDirectives", 2 }, |
|||
{ "RuleAreaNetclassConflictOnWire_1", 1 }, |
|||
{ "RuleAreaNetclassConflictOnWire_2", 1 } }; |
|||
|
|||
for( const std::pair<wxString, int>& test : tests ) |
|||
{ |
|||
KI_TEST::LoadSchematic( m_settingsManager, test.first, m_schematic ); |
|||
|
|||
ERC_SETTINGS& settings = m_schematic->ErcSettings(); |
|||
SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); |
|||
|
|||
// Skip the "Modified symbol" warning
|
|||
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; |
|||
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; |
|||
|
|||
// Configure the rules under test
|
|||
settings.m_ERCSeverities[ERCE_NETCLASS_CONFLICT] = RPT_SEVERITY_ERROR; |
|||
|
|||
std::unordered_set<SCH_SCREEN*> allScreens; |
|||
SCH_SCREENS screens( m_schematic->Root() ); |
|||
screens.BuildClientSheetPathList(); |
|||
|
|||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; |
|||
screen = screens.GetNext() ) |
|||
allScreens.insert( screen ); |
|||
|
|||
SCH_RULE_AREA::UpdateRuleAreasInScreens( allScreens, nullptr ); |
|||
m_schematic->ConnectionGraph()->Recalculate( m_schematic->GetSheets(), true ); |
|||
m_schematic->ConnectionGraph()->RunERC(); |
|||
|
|||
errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); |
|||
|
|||
ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MILLIMETRES ); |
|||
|
|||
BOOST_CHECK_MESSAGE( errors.GetCount() == test.second, |
|||
"Expected " << test.second << " errors in " << test.first.ToStdString() |
|||
<< " but got " << errors.GetCount() << "\n" |
|||
<< reportWriter.GetTextReport() ); |
|||
} |
|||
} |
|||
|
|||
|
|||
BOOST_FIXTURE_TEST_CASE( ERCRuleAreaOverlaps, ERC_REGRESSION_TEST_FIXTURE ) |
|||
{ |
|||
LOCALE_IO dummy; |
|||
|
|||
// Check for Errors when using rule area netclass directives
|
|||
std::vector<std::pair<wxString, int>> tests = { { "RuleAreaNoOverlap", 0 }, |
|||
{ "RuleAreaOneOverlap", 1 }, |
|||
{ "RuleAreaOneOverlapTwice", 2 }, |
|||
{ "RuleAreaTwoOverlaps", 2 } }; |
|||
|
|||
for( const std::pair<wxString, int>& test : tests ) |
|||
{ |
|||
KI_TEST::LoadSchematic( m_settingsManager, test.first, m_schematic ); |
|||
|
|||
ERC_SETTINGS& settings = m_schematic->ErcSettings(); |
|||
SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); |
|||
|
|||
// Skip the "Modified symbol" warning
|
|||
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; |
|||
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; |
|||
|
|||
// Configure the rules under test
|
|||
settings.m_ERCSeverities[ERCE_OVERLAPPING_RULE_AREAS] = RPT_SEVERITY_ERROR; |
|||
|
|||
std::unordered_set<SCH_SCREEN*> allScreens; |
|||
SCH_SCREENS screens( m_schematic->Root() ); |
|||
screens.BuildClientSheetPathList(); |
|||
|
|||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; |
|||
screen = screens.GetNext() ) |
|||
allScreens.insert( screen ); |
|||
|
|||
SCH_RULE_AREA::UpdateRuleAreasInScreens( allScreens, nullptr ); |
|||
m_schematic->ConnectionGraph()->Recalculate( m_schematic->GetSheets(), true ); |
|||
|
|||
ERC_TESTER tester( m_schematic.get() ); |
|||
tester.RunRuleAreaERC(); |
|||
|
|||
errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); |
|||
|
|||
ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MILLIMETRES ); |
|||
|
|||
BOOST_CHECK_MESSAGE( errors.GetCount() == test.second, |
|||
"Expected " << test.second << " errors in " << test.first.ToStdString() |
|||
<< " but got " << errors.GetCount() << "\n" |
|||
<< reportWriter.GetTextReport() ); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue