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 "grid_helper.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/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  BEZIER_CURVE_POINTS { BEZIER_CURVE_START, BEZIER_CURVE_CONTROL_POINT1, BEZIER_CURVE_CONTROL_POINT2, BEZIER_CURVE_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 68 of file point_editor.cpp.

Enumerator
BEZIER_CURVE_START 
BEZIER_CURVE_CONTROL_POINT1 
BEZIER_CURVE_CONTROL_POINT2 
BEZIER_CURVE_END 

Definition at line 78 of file point_editor.cpp.

Enumerator
CIRC_CENTER 
CIRC_END 

Definition at line 73 of file point_editor.cpp.

Enumerator
DIM_CROSSBARO 
DIM_CROSSBARF 
DIM_FEATUREGO 
DIM_FEATUREDO 

Definition at line 86 of file point_editor.cpp.

enum SEG_POINTS
Enumerator
SEG_START 
SEG_END 

Definition at line 63 of file point_editor.cpp.

64 {
66 };

Function Documentation

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

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

909 {
910  for( auto it = aPolySet.IterateWithHoles(); it; ++it )
911  {
912  auto vertexIdx = it.GetIndex();
913 
914  if( aPolySet.Vertex( vertexIdx ) == aPoint.GetPosition() )
915  return std::make_pair( true, vertexIdx );
916  }
917 
918  return std::make_pair( false, SHAPE_POLY_SET::VERTEX_INDEX() );
919 }
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