KiCad PCB EDA Suite
Loading...
Searching...
No Matches
padstack.cpp File Reference
#include <convert_basic_shapes_to_polygon.h>
#include "padstack.h"
#include <api/api_enums.h>
#include <api/api_utils.h>
#include <api/api_pcb_utils.h>
#include <api/board/board_types.pb.h>
#include <layer_range.h>
#include <macros.h>
#include <magic_enum.hpp>
#include <pad.h>
#include <board.h>
#include <pcb_shape.h>

Go to the source code of this file.

Macros

#define TEST(a, b)
 
#define TEST_OPT(a, b, v)
 
#define TEST_OPT_ANGLE(a, b, v)
 

Functions

 IMPLEMENT_ENUM_TO_WXANY (PAD_DRILL_POST_MACHINING_MODE)
 
 IMPLEMENT_ENUM_TO_WXANY (BACKDRILL_MODE)
 
 IMPLEMENT_ENUM_TO_WXANY (UNCONNECTED_LAYER_MODE)
 

Macro Definition Documentation

◆ TEST

#define TEST ( a,
b )
Value:
{ if( a != b ) return a - b; }

Definition at line 1352 of file padstack.cpp.

◆ TEST_OPT

#define TEST_OPT ( a,
b,
v )
Value:
{ \
if( a.has_value() != b.has_value() ) \
return a.has_value() - b.has_value(); \
if( (int) a.value_or( v ) - (int) b.value_or( v ) != 0 ) \
return (int) a.value_or( v ) - (int) b.value_or( v ); \
}

Definition at line 1605 of file padstack.cpp.

Referenced by PADSTACK::COPPER_LAYER_PROPS::Compare(), PADSTACK::DRILL_PROPS::Compare(), PADSTACK::MASK_LAYER_PROPS::Compare(), and PADSTACK::POST_MACHINING_PROPS::Compare().

◆ TEST_OPT_ANGLE

#define TEST_OPT_ANGLE ( a,
b,
v )
Value:
{ \
if( a.has_value() != b.has_value() ) \
return a.has_value() - b.has_value(); \
if( abs( a.value_or( v ).AsDegrees() - b.value_or( v ).AsDegrees() ) > 0.001 ) \
return a.value_or( v ).AsDegrees() > b.value_or( v ).AsDegrees() ? 1 : -1; \
}

Definition at line 1613 of file padstack.cpp.

Referenced by PADSTACK::COPPER_LAYER_PROPS::Compare().

Function Documentation

◆ IMPLEMENT_ENUM_TO_WXANY() [1/3]

IMPLEMENT_ENUM_TO_WXANY ( BACKDRILL_MODE )

◆ IMPLEMENT_ENUM_TO_WXANY() [2/3]

IMPLEMENT_ENUM_TO_WXANY ( PAD_DRILL_POST_MACHINING_MODE )

◆ IMPLEMENT_ENUM_TO_WXANY() [3/3]

IMPLEMENT_ENUM_TO_WXANY ( UNCONNECTED_LAYER_MODE )