KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_drc_return_path_per_segment.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <filesystem>
#include <fstream>
#include <board.h>
#include <board_design_settings.h>
#include <drc/drc_engine.h>
#include <drc/drc_item.h>
#include <netinfo.h>
#include <pcb_marker.h>
#include <pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (PartiallyShadowedTrunkReportsOneMarker)
 
 BOOST_AUTO_TEST_CASE (FullyUnshadowedTrunkReportsOneMarker)
 

Variables

static const char * PARTIAL_PCB
 
static const char * FULLY_UNSHADOWED_PCB
 
static const char * DRU_TEXT
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( FullyUnshadowedTrunkReportsOneMarker )

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( PartiallyShadowedTrunkReportsOneMarker )

Variable Documentation

◆ DRU_TEXT

const char* DRU_TEXT
static
Initial value:
= R"((version 1)
(rule "ReturnPath"
(condition "A.NetClass == 'Default'")
(constraint length (min 0mm) (max 200mm))
(constraint return_path (layer "B.Cu"))
)
)"

Definition at line 102 of file test_drc_return_path_per_segment.cpp.

◆ FULLY_UNSHADOWED_PCB

const char* FULLY_UNSHADOWED_PCB
static
Initial value:
= R"(
(kicad_pcb
(version 20250904)
(generator "pcbnew")
(generator_version "9.99")
(layers
(0 "F.Cu" signal)
(2 "B.Cu" signal)
(44 "Edge.Cuts" user)
)
(net 0 "")
(net 1 "/CHAIN_FULL")
(net 2 "/GND")
(gr_line (start -5 -5) (end 55 -5) (layer "Edge.Cuts") (width 0.05))
(gr_line (start 55 -5) (end 55 5) (layer "Edge.Cuts") (width 0.05))
(gr_line (start 55 5) (end -5 5) (layer "Edge.Cuts") (width 0.05))
(gr_line (start -5 5) (end -5 -5) (layer "Edge.Cuts") (width 0.05))
(segment (start 0 0) (end 30 0) (width 0.2) (layer "F.Cu") (net 1))
(zone (net 2) (net_name "/GND") (layer "B.Cu") (name "gnd_far") (hatch edge 0.508)
(connect_pads (clearance 0))
(min_thickness 0.254) (filled_areas_thickness no)
(fill (thermal_gap 0.508) (thermal_bridge_width 0.508))
(polygon
(pts (xy 40 -1) (xy 50 -1) (xy 50 1) (xy 40 1))
)
)
)
)"

Definition at line 72 of file test_drc_return_path_per_segment.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ PARTIAL_PCB

const char* PARTIAL_PCB
static
Initial value:
= R"(
(kicad_pcb
(version 20250904)
(generator "pcbnew")
(generator_version "9.99")
(layers
(0 "F.Cu" signal)
(2 "B.Cu" signal)
(44 "Edge.Cuts" user)
)
(net 0 "")
(net 1 "/CHAIN_PARTIAL")
(net 2 "/GND")
(gr_line (start -5 -5) (end 35 -5) (layer "Edge.Cuts") (width 0.05))
(gr_line (start 35 -5) (end 35 5) (layer "Edge.Cuts") (width 0.05))
(gr_line (start 35 5) (end -5 5) (layer "Edge.Cuts") (width 0.05))
(gr_line (start -5 5) (end -5 -5) (layer "Edge.Cuts") (width 0.05))
(segment (start 0 0) (end 15 0) (width 0.2) (layer "F.Cu") (net 1))
(segment (start 15 0) (end 30 0) (width 0.2) (layer "F.Cu") (net 1))
(zone (net 2) (net_name "/GND") (layer "B.Cu") (name "gnd_left") (hatch edge 0.508)
(connect_pads (clearance 0))
(min_thickness 0.254) (filled_areas_thickness no)
(fill (thermal_gap 0.508) (thermal_bridge_width 0.508))
(polygon
(pts (xy -1 -1) (xy 15 -1) (xy 15 1) (xy -1 1))
)
)
)
)"

Definition at line 38 of file test_drc_return_path_per_segment.cpp.

Referenced by BOOST_AUTO_TEST_CASE().