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 <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)   wxString::Format( _( "Missing layer name argument to %s." ), f )
 
#define MISSING_FP_ARG(f)    wxString::Format( _( "Missing footprint argument (A, B, or reference designator) to %s." ), f )
 
#define MISSING_AREA_ARG(f)    wxString::Format( _( "Missing rule-area argument (A, B, or rule-area name) to %s." ), f )
 
#define MISSING_GROUP_ARG(f)    wxString::Format( _( "Missing group name argument to %s." ), f )
 
#define MISSING_SHEET_ARG(f)    wxString::Format( _( "Missing sheet name argument to %s." ), f )
 
#define MISSING_REF_ARG(f)    wxString::Format( _( "Missing footprint argument (reference designator) to %s." ), f )
 
#define MISSING_DP_ARG(f)    wxString::Format( _( "Missing diff-pair name argument to %s." ), 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 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, 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 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 hasComponentClassFunc (LIBEVAL::CONTEXT *aCtx, void *self)
 

Macro Definition Documentation

◆ MISSING_AREA_ARG

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

Definition at line 670 of file pcbexpr_functions.cpp.

◆ MISSING_DP_ARG

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

Definition at line 1106 of file pcbexpr_functions.cpp.

◆ MISSING_FP_ARG

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

Definition at line 263 of file pcbexpr_functions.cpp.

◆ MISSING_GROUP_ARG

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

Definition at line 885 of file pcbexpr_functions.cpp.

◆ MISSING_LAYER_ARG

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

Definition at line 75 of file pcbexpr_functions.cpp.

◆ MISSING_REF_ARG

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

Definition at line 989 of file pcbexpr_functions.cpp.

◆ MISSING_SHEET_ARG

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

Definition at line 931 of file pcbexpr_functions.cpp.

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()

◆ hasNetclassFunc()

◆ inDiffPairFunc()

◆ intersectsAreaFunc()

◆ intersectsBackCourtyardFunc()

◆ intersectsCourtyardFunc()

◆ intersectsFrontCourtyardFunc()

◆ isBlindBuriedViaFunc()

◆ isCoupledDiffPairFunc()

◆ isMicroVia()

◆ isPlatedFunc()

◆ memberOfFootprintFunc()

◆ memberOfGroupFunc()

◆ memberOfSheetFunc()

◆ 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