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 <status_popup.h>
#include <pcb_edit_frame.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 67 of file point_editor.cpp.

Enumerator
CIRC_CENTER 
CIRC_END 

Definition at line 72 of file point_editor.cpp.

Enumerator
DIM_CROSSBARO 
DIM_CROSSBARF 
DIM_FEATUREGO 
DIM_FEATUREDO 

Definition at line 77 of file point_editor.cpp.

enum SEG_POINTS
Enumerator
SEG_START 
SEG_END 

Definition at line 62 of file point_editor.cpp.

63 {
65 };

Function Documentation

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

Definition at line 832 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().

833 {
834  for( auto it = aPolySet.IterateWithHoles(); it; ++it )
835  {
836  auto vertexIdx = it.GetIndex();
837 
838  if( aPolySet.Vertex( vertexIdx ) == aPoint.GetPosition() )
839  return std::make_pair( true, vertexIdx );
840  }
841 
842  return std::make_pair( false, SHAPE_POLY_SET::VERTEX_INDEX() );
843 }
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