KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CREEP_SHAPE Class Reference

A class used to represent the shapes for creepage calculation. More...

#include <drc_creepage_utils.h>

Inheritance diagram for CREEP_SHAPE:
BE_SHAPE CU_SHAPE BE_SHAPE_CIRCLE BE_SHAPE_POINT CU_SHAPE_CIRCLE CU_SHAPE_SEGMENT BE_SHAPE_ARC CU_SHAPE_ARC

Public Types

enum class  TYPE { UNDEFINED = 0 , POINT , CIRCLE , ARC }
 

Public Member Functions

 CREEP_SHAPE ()
 
virtual ~CREEP_SHAPE ()
 
virtual int GetRadius () const
 
virtual EDA_ANGLE GetStartAngle () const
 
virtual EDA_ANGLE GetEndAngle () const
 
virtual VECTOR2I GetStartPoint () const
 
virtual VECTOR2I GetEndPoint () const
 
VECTOR2I GetPos () const
 
CREEP_SHAPE::TYPE GetType () const
 
const BOARD_ITEMGetParent () const
 
void SetParent (BOARD_ITEM *aParent)
 
virtual void ConnectChildren (std::shared_ptr< GraphNode > &a1, std::shared_ptr< GraphNode > &a2, CreepageGraph &aG) const
 
std::vector< PATH_CONNECTIONReversePaths (const std::vector< PATH_CONNECTION > &aV) const
 
std::vector< PATH_CONNECTIONPaths (const CREEP_SHAPE &aS2, double aMaxWeight, double aMaxSquaredWeight) const
 
virtual std::vector< PATH_CONNECTIONPaths (const BE_SHAPE_POINT &aS2, double aMaxWeight, double aMaxSquaredWeight) const
 
virtual std::vector< PATH_CONNECTIONPaths (const BE_SHAPE_CIRCLE &aS2, double aMaxWeight, double aMaxSquaredWeight) const
 
virtual std::vector< PATH_CONNECTIONPaths (const BE_SHAPE_ARC &aS2, double aMaxWeight, double aMaxSquaredWeight) const
 
virtual std::vector< PATH_CONNECTIONPaths (const CU_SHAPE_SEGMENT &aS2, double aMaxWeight, double aMaxSquaredWeight) const
 
virtual std::vector< PATH_CONNECTIONPaths (const CU_SHAPE_CIRCLE &aS2, double aMaxWeight, double aMaxSquaredWeight) const
 
virtual std::vector< PATH_CONNECTIONPaths (const CU_SHAPE_ARC &aS2, double aMaxWeight, double aMaxSquaredWeight) const
 
bool IsConductive ()
 

Protected Attributes

bool m_conductive = false
 
BOARD_ITEMm_parent = nullptr
 
VECTOR2I m_pos = VECTOR2I( 0, 0 )
 
CREEP_SHAPE::TYPE m_type = CREEP_SHAPE::TYPE::UNDEFINED
 

Detailed Description

A class used to represent the shapes for creepage calculation.

Definition at line 161 of file drc_creepage_utils.h.

Member Enumeration Documentation

◆ TYPE

enum class CREEP_SHAPE::TYPE
strong
Enumerator
UNDEFINED 
POINT 
CIRCLE 
ARC 

Definition at line 164 of file drc_creepage_utils.h.

Constructor & Destructor Documentation

◆ CREEP_SHAPE()

CREEP_SHAPE::CREEP_SHAPE ( )
inline

Definition at line 171 of file drc_creepage_utils.h.

◆ ~CREEP_SHAPE()

virtual CREEP_SHAPE::~CREEP_SHAPE ( )
inlinevirtual

Definition at line 173 of file drc_creepage_utils.h.

Member Function Documentation

◆ ConnectChildren()

void CREEP_SHAPE::ConnectChildren ( std::shared_ptr< GraphNode > &  a1,
std::shared_ptr< GraphNode > &  a2,
CreepageGraph aG 
) const
virtual

Reimplemented in BE_SHAPE_POINT, BE_SHAPE_CIRCLE, and BE_SHAPE_ARC.

Definition at line 704 of file drc_creepage_utils.cpp.

◆ GetEndAngle()

virtual EDA_ANGLE CREEP_SHAPE::GetEndAngle ( ) const
inlinevirtual

Reimplemented in CU_SHAPE_ARC, and BE_SHAPE_ARC.

Definition at line 178 of file drc_creepage_utils.h.

◆ GetEndPoint()

virtual VECTOR2I CREEP_SHAPE::GetEndPoint ( ) const
inlinevirtual

Reimplemented in CU_SHAPE_ARC, and BE_SHAPE_ARC.

Definition at line 180 of file drc_creepage_utils.h.

◆ GetParent()

const BOARD_ITEM * CREEP_SHAPE::GetParent ( ) const
inline

Definition at line 183 of file drc_creepage_utils.h.

References m_parent.

◆ GetPos()

◆ GetRadius()

virtual int CREEP_SHAPE::GetRadius ( ) const
inlinevirtual

Reimplemented in CU_SHAPE_CIRCLE, CU_SHAPE_ARC, BE_SHAPE_CIRCLE, and BE_SHAPE_ARC.

Definition at line 176 of file drc_creepage_utils.h.

Referenced by areEquivalent(), and compareShapes().

◆ GetStartAngle()

virtual EDA_ANGLE CREEP_SHAPE::GetStartAngle ( ) const
inlinevirtual

Reimplemented in CU_SHAPE_ARC, and BE_SHAPE_ARC.

Definition at line 177 of file drc_creepage_utils.h.

◆ GetStartPoint()

virtual VECTOR2I CREEP_SHAPE::GetStartPoint ( ) const
inlinevirtual

Reimplemented in CU_SHAPE_ARC, and BE_SHAPE_ARC.

Definition at line 179 of file drc_creepage_utils.h.

◆ GetType()

CREEP_SHAPE::TYPE CREEP_SHAPE::GetType ( ) const
inline

Definition at line 182 of file drc_creepage_utils.h.

References m_type.

Referenced by areEquivalent(), and compareShapes().

◆ IsConductive()

bool CREEP_SHAPE::IsConductive ( )
inline

Definition at line 247 of file drc_creepage_utils.h.

References m_conductive.

◆ Paths() [1/7]

virtual std::vector< PATH_CONNECTION > CREEP_SHAPE::Paths ( const BE_SHAPE_ARC aS2,
double  aMaxWeight,
double  aMaxSquaredWeight 
) const
inlinevirtual

◆ Paths() [2/7]

virtual std::vector< PATH_CONNECTION > CREEP_SHAPE::Paths ( const BE_SHAPE_CIRCLE aS2,
double  aMaxWeight,
double  aMaxSquaredWeight 
) const
inlinevirtual

◆ Paths() [3/7]

virtual std::vector< PATH_CONNECTION > CREEP_SHAPE::Paths ( const BE_SHAPE_POINT aS2,
double  aMaxWeight,
double  aMaxSquaredWeight 
) const
inlinevirtual

◆ Paths() [4/7]

std::vector< PATH_CONNECTION > CREEP_SHAPE::Paths ( const CREEP_SHAPE aS2,
double  aMaxWeight,
double  aMaxSquaredWeight 
) const
inline

Definition at line 203 of file drc_creepage_utils.h.

◆ Paths() [5/7]

virtual std::vector< PATH_CONNECTION > CREEP_SHAPE::Paths ( const CU_SHAPE_ARC aS2,
double  aMaxWeight,
double  aMaxSquaredWeight 
) const
inlinevirtual

Reimplemented in CU_SHAPE_SEGMENT, CU_SHAPE_CIRCLE, CU_SHAPE_ARC, BE_SHAPE_POINT, and BE_SHAPE_ARC.

Definition at line 239 of file drc_creepage_utils.h.

◆ Paths() [6/7]

virtual std::vector< PATH_CONNECTION > CREEP_SHAPE::Paths ( const CU_SHAPE_CIRCLE aS2,
double  aMaxWeight,
double  aMaxSquaredWeight 
) const
inlinevirtual

◆ Paths() [7/7]

virtual std::vector< PATH_CONNECTION > CREEP_SHAPE::Paths ( const CU_SHAPE_SEGMENT aS2,
double  aMaxWeight,
double  aMaxSquaredWeight 
) const
inlinevirtual

◆ ReversePaths()

std::vector< PATH_CONNECTION > CREEP_SHAPE::ReversePaths ( const std::vector< PATH_CONNECTION > &  aV) const
inline

◆ SetParent()

void CREEP_SHAPE::SetParent ( BOARD_ITEM aParent)
inline

Definition at line 184 of file drc_creepage_utils.h.

References m_parent.

Referenced by CreepageGraph::Addshape(), and CreepageGraph::TransformEdgeToCreepShapes().

Member Data Documentation

◆ m_conductive

bool CREEP_SHAPE::m_conductive = false
protected

Definition at line 251 of file drc_creepage_utils.h.

Referenced by BE_SHAPE::BE_SHAPE(), CU_SHAPE::CU_SHAPE(), and IsConductive().

◆ m_parent

BOARD_ITEM* CREEP_SHAPE::m_parent = nullptr
protected

Definition at line 252 of file drc_creepage_utils.h.

Referenced by CreepageGraph::FindNode(), GetParent(), and SetParent().

◆ m_pos

◆ m_type

CREEP_SHAPE::TYPE CREEP_SHAPE::m_type = CREEP_SHAPE::TYPE::UNDEFINED
protected

The documentation for this class was generated from the following files: