36struct BDS_TEST_FIXTURE
39 m_board( new
BOARD() )
42 SETTINGS_MANAGER m_settingsManager;
43 std::unique_ptr<BOARD> m_board;
52 JSON_SETTINGS(
"bds_test_parent",
SETTINGS_LOC::
NONE, 0, false, false, false )
59BOOST_FIXTURE_TEST_SUITE( BoardDesignSettings, BDS_TEST_FIXTURE )
103 const int ruleClearance =
pcbIUScale.mmToIU( 4.0 );
105 auto rule = std::make_shared<DRC_RULE>( wxT(
"NPTH Hole to Track Clearance" ) );
109 rule->AddConstraint( constraint );
111 auto engine = std::make_shared<DRC_ENGINE>( m_board.get(), &bds );
112 engine->InitEngine( rule );
141 for(
int step = 2; step <= lastReal; ++step )
155 for(
int step = lastReal - 1; step >= 1; --step )
164 for(
int step = 0; step < lastReal * 3; ++step )
166 BOOST_CHECK_GE( idx, 1 );
290 BDS_TEST_PARENT parent;
292 ( *parent.Internals() )[
"/board/design_settings"_json_pointer] =
293 nlohmann::json{ {
"meta", { {
"version", 2 } } } };
295 const int negativeValue =
pcbIUScale.mmToIU( -0.1 );
constexpr EDA_IU_SCALE pcbIUScale
Container for design settings for a BOARD object.
void UseCustomTrackViaSize(bool aEnabled)
Enables/disables custom track/via size settings.
int GetNextDiffPairIndex(int aIndex, bool aForward) const
Compute the next diff pair dimensions list index when cycling predefined sizes, skipping the index-0 ...
void SetViaSizeIndex(int aIndex)
Set the current via size list index to aIndex.
std::shared_ptr< DRC_ENGINE > m_DRCEngine
int GetTrackWidthIndex() const
int GetViaSizeIndex() const
int GetDiffPairIndex() const
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
void SetDiffPairIndex(int aIndex)
int GetNextTrackWidthIndex(int aIndex, bool aForward) const
Compute the next track width list index when cycling predefined sizes, skipping the index-0 netclass ...
int GetBiggestClearanceValue() const
int GetCurrentTrackWidth() const
bool LoadFromFile(const wxString &aDirectory="") override
Loads the backing file from disk and then calls Load()
void SetTrackWidthIndex(int aIndex)
Set the current track width list index to aIndex.
int GetNextViaSizeIndex(int aIndex, bool aForward) const
Compute the next via size list index when cycling predefined sizes, skipping the index-0 netclass pla...
std::vector< int > m_TrackWidthList
std::vector< VIA_DIMENSION > m_ViasDimensionsList
MINOPTMAX< int > & Value()
virtual void Load()
Updates the parameters of this object based on the current JSON document contents.
virtual bool Store()
Stores the current parameters into the JSON document represented by this object Note: this doesn't do...
bool SaveToFile(const wxString &aDirectory="", bool aForce=false) override
Calls Store() and then saves the JSON document contents into the parent JSON_SETTINGS.
@ PHYSICAL_HOLE_CLEARANCE_CONSTRAINT
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_CASE(NegativeSilkClearanceRoundTrip)
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23327.
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")