| 
    KiCad PCB EDA Suite
    
   | 
 
#include <graphics_cleaner.h>
Public Member Functions | |
| GRAPHICS_CLEANER (const DRAWINGS &aDrawings, FOOTPRINT *aParentFootprint, BOARD_COMMIT &aCommit, TOOL_MANAGER *aToolManager) | |
| void | CleanupBoard (bool aDryRun, std::vector< std::shared_ptr< CLEANUP_ITEM > > *aItemsList, bool aMergeRects, bool aDeleteRedundant, bool aMergePads, bool aFixBoardOutlines, int aTolerance) | 
| the cleanup function.   | |
Private Member Functions | |
| bool | isNullShape (PCB_SHAPE *aShape) | 
| bool | areEquivalent (PCB_SHAPE *aShape1, PCB_SHAPE *aShape2) | 
| void | cleanupShapes () | 
| void | fixBoardOutlines () | 
| void | mergeRects () | 
| void | mergePads () | 
Private Attributes | |
| const DRAWINGS & | m_drawings | 
| FOOTPRINT * | m_parentFootprint | 
| BOARD_COMMIT & | m_commit | 
| TOOL_MANAGER * | m_toolMgr | 
| bool | m_dryRun | 
| int | m_epsilon | 
| int | m_maxError | 
| int | m_outlinesTolerance | 
| std::vector< std::shared_ptr< CLEANUP_ITEM > > * | m_itemsList | 
Definition at line 36 of file graphics_cleaner.h.
| GRAPHICS_CLEANER::GRAPHICS_CLEANER | ( | const DRAWINGS & | aDrawings, | 
| FOOTPRINT * | aParentFootprint, | ||
| BOARD_COMMIT & | aCommit, | ||
| TOOL_MANAGER * | aToolManager ) | 
Definition at line 39 of file graphics_cleaner.cpp.
References ARC_HIGH_DEF, m_commit, m_drawings, m_dryRun, m_epsilon, m_itemsList, m_maxError, m_outlinesTolerance, m_parentFootprint, and m_toolMgr.
Definition at line 126 of file graphics_cleaner.cpp.
References ARC, BEZIER, CIRCLE, equivalent(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), PCB_SHAPE::GetLayer(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), PCB_SHAPE::GetWidth(), m_epsilon, POLY, RECTANGLE, SEGMENT, and EDA_SHAPE::SHAPE_T_asString().
Referenced by cleanupShapes().
| void GRAPHICS_CLEANER::CleanupBoard | ( | bool | aDryRun, | 
| std::vector< std::shared_ptr< CLEANUP_ITEM > > * | aItemsList, | ||
| bool | aMergeRects, | ||
| bool | aDeleteRedundant, | ||
| bool | aMergePads, | ||
| bool | aFixBoardOutlines, | ||
| int | aTolerance ) | 
the cleanup function.
| aMergeRects | = merge for segments forming a rectangle into a rect | 
| aDeleteRedundant | = true to delete null graphics and duplicated graphics | 
| aMergePads | = true to apply Pad Editor's merge algorithm to all pads in footprint (it is assumed this will only be run on FPEditor boards) | 
Definition at line 54 of file graphics_cleaner.cpp.
References cleanupShapes(), fixBoardOutlines(), IS_DELETED, m_commit, m_drawings, m_dryRun, m_epsilon, m_itemsList, m_maxError, m_outlinesTolerance, mergePads(), and mergeRects().
Referenced by DIALOG_CLEANUP_GRAPHICS::doCleanup().
      
  | 
  private | 
Definition at line 166 of file graphics_cleaner.cpp.
References areEquivalent(), CLEANUP_DUPLICATE_GRAPHIC, CLEANUP_NULL_GRAPHIC, EDA_ITEM::HasFlag(), IS_DELETED, isNullShape(), m_commit, m_drawings, m_dryRun, m_itemsList, and EDA_ITEM::SetFlags().
Referenced by CleanupBoard().
      
  | 
  private | 
Definition at line 211 of file graphics_cleaner.cpp.
References ConnectBoardShapes(), Edge_Cuts, PCB_SHAPE::IsOnLayer(), m_commit, m_drawings, m_dryRun, and m_outlinesTolerance.
Referenced by CleanupBoard().
      
  | 
  private | 
Definition at line 94 of file graphics_cleaner.cpp.
References ARC, BEZIER, CIRCLE, equivalent(), EDA_SHAPE::GetBezierPoints(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetPointCount(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), m_epsilon, m_maxError, POLY, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), RECTANGLE, SEGMENT, EDA_SHAPE::SHAPE_T_asString(), and UNIMPLEMENTED_FOR.
Referenced by cleanupShapes(), and mergeRects().
      
  | 
  private | 
Definition at line 381 of file graphics_cleaner.cpp.
References CLEANUP_MERGE_PAD, m_commit, m_dryRun, m_itemsList, m_parentFootprint, m_toolMgr, pad, and PAD_TOOL::RecombinePad().
Referenced by CleanupBoard().
      
  | 
  private | 
Definition at line 237 of file graphics_cleaner.cpp.
References CLEANUP_LINES_TO_RECT, end, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), IS_DELETED, isNullShape(), left, m_commit, m_drawings, m_dryRun, m_itemsList, m_parentFootprint, RECTANGLE, right, SEGMENT, EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFilled(), PCB_SHAPE::SetLayer(), EDA_SHAPE::SetShape(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by CleanupBoard().
      
  | 
  private | 
Definition at line 65 of file graphics_cleaner.h.
Referenced by CleanupBoard(), cleanupShapes(), fixBoardOutlines(), GRAPHICS_CLEANER(), mergePads(), and mergeRects().
      
  | 
  private | 
Definition at line 63 of file graphics_cleaner.h.
Referenced by CleanupBoard(), cleanupShapes(), fixBoardOutlines(), GRAPHICS_CLEANER(), and mergeRects().
      
  | 
  private | 
Definition at line 67 of file graphics_cleaner.h.
Referenced by CleanupBoard(), cleanupShapes(), fixBoardOutlines(), GRAPHICS_CLEANER(), mergePads(), and mergeRects().
      
  | 
  private | 
Definition at line 68 of file graphics_cleaner.h.
Referenced by areEquivalent(), CleanupBoard(), GRAPHICS_CLEANER(), and isNullShape().
      
  | 
  private | 
Definition at line 72 of file graphics_cleaner.h.
Referenced by CleanupBoard(), cleanupShapes(), GRAPHICS_CLEANER(), mergePads(), and mergeRects().
      
  | 
  private | 
Definition at line 69 of file graphics_cleaner.h.
Referenced by CleanupBoard(), GRAPHICS_CLEANER(), and isNullShape().
      
  | 
  private | 
Definition at line 70 of file graphics_cleaner.h.
Referenced by CleanupBoard(), fixBoardOutlines(), and GRAPHICS_CLEANER().
      
  | 
  private | 
Definition at line 64 of file graphics_cleaner.h.
Referenced by GRAPHICS_CLEANER(), mergePads(), and mergeRects().
      
  | 
  private | 
Definition at line 66 of file graphics_cleaner.h.
Referenced by GRAPHICS_CLEANER(), and mergePads().