KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbexpr_functions.cpp File Reference
#include <algorithm>
#include <cstdio>
#include <memory>
#include <mutex>
#include <wx/log.h>
#include <board.h>
#include <board_design_settings.h>
#include <component_classes/component_class.h>
#include <drc/drc_rtree.h>
#include <drc/drc_engine.h>
#include <lset.h>
#include <pcb_track.h>
#include <pcb_group.h>
#include <geometry/shape_segment.h>
#include <pcbexpr_evaluator.h>
#include <connectivity/connectivity_data.h>
#include <connectivity/connectivity_algo.h>
#include <connectivity/from_to_cache.h>

Go to the source code of this file.

Classes

class  SCOPED_LAYERSET
 

Macros

#define MISSING_LAYER_ARG(f)
 
#define MISSING_FP_ARG(f)
 
#define MISSING_AREA_ARG(f)
 
#define MISSING_GROUP_ARG(f)
 
#define MISSING_SHEET_ARG(f)
 
#define MISSING_REF_ARG(f)
 
#define MISSING_DP_ARG(f)
 

Functions

bool fromToFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void existsOnLayerFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void isPlatedFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
bool collidesWithCourtyard (BOARD_ITEM *aItem, std::shared_ptr< SHAPE > &aItemShape, PCBEXPR_CONTEXT *aCtx, FOOTPRINT *aFootprint, PCB_LAYER_ID aSide)
 
static bool testFootprintSelector (FOOTPRINT *aFp, const wxString &aSelector)
 
static bool searchFootprints (BOARD *aBoard, const wxString &aArg, PCBEXPR_CONTEXT *aCtx, const std::function< bool(FOOTPRINT *)> &aFunc)
 
static void intersectsCourtyardFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void intersectsFrontCourtyardFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void intersectsBackCourtyardFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
bool collidesWithArea (BOARD_ITEM *aItem, PCB_LAYER_ID aLayer, PCBEXPR_CONTEXT *aCtx, ZONE *aArea)
 
bool searchAreas (BOARD *aBoard, const wxString &aArg, PCBEXPR_CONTEXT *aCtx, const std::function< bool(ZONE *)> &aFunc)
 
static void intersectsAreaFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void enclosedByAreaFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void memberOfGroupFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void memberOfSheetFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void memberOfSheetOrChildrenFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void memberOfFootprintFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void isMicroVia (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void isBlindBuriedViaFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void isCoupledDiffPairFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void inDiffPairFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void getFieldFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void hasNetclassFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void hasExactNetclassFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 
static void hasComponentClassFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 

Macro Definition Documentation

◆ MISSING_AREA_ARG

#define MISSING_AREA_ARG ( f)
Value:
wxString::Format( _( "Missing rule-area argument (A, B, or rule-area name) to %s." ), f )
#define _(s)

Definition at line 666 of file pcbexpr_functions.cpp.

Referenced by enclosedByAreaFunc(), and intersectsAreaFunc().

◆ MISSING_DP_ARG

#define MISSING_DP_ARG ( f)
Value:
wxString::Format( _( "Missing diff-pair name argument to %s." ), f )

Definition at line 1166 of file pcbexpr_functions.cpp.

Referenced by inDiffPairFunc().

◆ MISSING_FP_ARG

#define MISSING_FP_ARG ( f)
Value:
wxString::Format( _( "Missing footprint argument (A, B, or reference designator) to %s." ), f )

Definition at line 272 of file pcbexpr_functions.cpp.

Referenced by intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), and intersectsFrontCourtyardFunc().

◆ MISSING_GROUP_ARG

#define MISSING_GROUP_ARG ( f)
Value:
wxString::Format( _( "Missing group name argument to %s." ), f )

Definition at line 881 of file pcbexpr_functions.cpp.

Referenced by memberOfGroupFunc().

◆ MISSING_LAYER_ARG

#define MISSING_LAYER_ARG ( f)
Value:
wxString::Format( _( "Missing layer name argument to %s." ), f )

Definition at line 76 of file pcbexpr_functions.cpp.

Referenced by existsOnLayerFunc().

◆ MISSING_REF_ARG

#define MISSING_REF_ARG ( f)
Value:
wxString::Format( _( "Missing footprint argument (reference designator) to %s." ), f )

Definition at line 1048 of file pcbexpr_functions.cpp.

Referenced by memberOfFootprintFunc().

◆ MISSING_SHEET_ARG

#define MISSING_SHEET_ARG ( f)
Value:
wxString::Format( _( "Missing sheet name argument to %s." ), f )

Definition at line 927 of file pcbexpr_functions.cpp.

Referenced by memberOfSheetFunc(), and memberOfSheetOrChildrenFunc().

Function Documentation

◆ collidesWithArea()

◆ collidesWithCourtyard()

bool collidesWithCourtyard ( BOARD_ITEM * aItem,
std::shared_ptr< SHAPE > & aItemShape,
PCBEXPR_CONTEXT * aCtx,
FOOTPRINT * aFootprint,
PCB_LAYER_ID aSide )

◆ enclosedByAreaFunc()

◆ existsOnLayerFunc()

◆ fromToFunc()

◆ getFieldFunc()

◆ hasComponentClassFunc()

◆ hasExactNetclassFunc()

◆ hasNetclassFunc()

◆ inDiffPairFunc()

◆ intersectsAreaFunc()

◆ intersectsBackCourtyardFunc()

◆ intersectsCourtyardFunc()

◆ intersectsFrontCourtyardFunc()

◆ isBlindBuriedViaFunc()

◆ isCoupledDiffPairFunc()

◆ isMicroVia()

◆ isPlatedFunc()

◆ memberOfFootprintFunc()

◆ memberOfGroupFunc()

◆ memberOfSheetFunc()

◆ memberOfSheetOrChildrenFunc()

◆ searchAreas()

bool searchAreas ( BOARD * aBoard,
const wxString & aArg,
PCBEXPR_CONTEXT * aCtx,
const std::function< bool(ZONE *)> & aFunc )

◆ searchFootprints()

static bool searchFootprints ( BOARD * aBoard,
const wxString & aArg,
PCBEXPR_CONTEXT * aCtx,
const std::function< bool(FOOTPRINT *)> & aFunc )
static

◆ testFootprintSelector()

static bool testFootprintSelector ( FOOTPRINT * aFp,
const wxString & aSelector )
static