KiCad PCB EDA Suite
point_editor.cpp File Reference
#include <functional>
#include <tool/tool_manager.h>
#include <view/view_controls.h>
#include <gal/graphics_abstraction_layer.h>
#include <geometry/seg.h>
#include <confirm.h>
#include "pcb_actions.h"
#include "selection_tool.h"
#include "point_editor.h"
#include <board_commit.h>
#include <bitmaps.h>
#include <wxPcbStruct.h>
#include <class_edge_mod.h>
#include <class_dimension.h>
#include <class_zone.h>
#include <class_board.h>
#include <class_module.h>
#include <connectivity_data.h>
#include "zone_filler.h"

Go to the source code of this file.

Classes

class  EDIT_POINTS_FACTORY
 

Enumerations

enum  SEG_POINTS { SEG_START, SEG_END }
 
enum  ARC_POINTS { ARC_CENTER, ARC_START, ARC_END }
 
enum  CIRCLE_POINTS { CIRC_CENTER, CIRC_END }
 
enum  DIMENSION_POINTS { DIM_CROSSBARO, DIM_CROSSBARF, DIM_FEATUREGO, DIM_FEATUREDO }
 

Functions

static std::pair< bool, SHAPE_POLY_SET::VERTEX_INDEXfindVertex (SHAPE_POLY_SET &aPolySet, const EDIT_POINT &aPoint)
 

Enumeration Type Documentation

enum ARC_POINTS
Enumerator
ARC_CENTER 
ARC_START 
ARC_END 

Definition at line 66 of file point_editor.cpp.

Enumerator
CIRC_CENTER 
CIRC_END 

Definition at line 71 of file point_editor.cpp.

Enumerator
DIM_CROSSBARO 
DIM_CROSSBARF 
DIM_FEATUREGO 
DIM_FEATUREDO 

Definition at line 76 of file point_editor.cpp.

enum SEG_POINTS
Enumerator
SEG_START 
SEG_END 

Definition at line 61 of file point_editor.cpp.

62 {
64 };

Function Documentation

static std::pair<bool, SHAPE_POLY_SET::VERTEX_INDEX> findVertex ( SHAPE_POLY_SET aPolySet,
const EDIT_POINT aPoint 
)
static

Definition at line 789 of file point_editor.cpp.

References EDIT_POINT::GetPosition(), SHAPE_POLY_SET::IterateWithHoles(), and SHAPE_POLY_SET::Vertex().

Referenced by POINT_EDITOR::removeCorner(), and POINT_EDITOR::removeCornerCondition().

790 {
791  for( auto it = aPolySet.IterateWithHoles(); it; ++it )
792  {
793  auto vertexIdx = it.GetIndex();
794 
795  if( aPolySet.Vertex( vertexIdx ) == aPoint.GetPosition() )
796  return std::make_pair( true, vertexIdx );
797  }
798 
799  return std::make_pair( false, SHAPE_POLY_SET::VERTEX_INDEX() );
800 }
Struct VERTEX_INDEX.
VECTOR2I & Vertex(int aIndex, int aOutline, int aHole)
Returns the index-th vertex in a given hole outline within a given outline
ITERATOR IterateWithHoles(int aOutline)
Function IterateWithHoles.
virtual VECTOR2I GetPosition() const
Function GetPosition()
Definition: edit_points.h:65