|
KiCad PCB EDA Suite
|
#include <pth_hole_size.h>#include <algorithm>#include <cmath>#include <cstdint>#include <utility>#include <base_units.h>#include <math/util.h>#include <wx/intl.h>Go to the source code of this file.
Functions | |
| int | ComputeRecommendedPthHoleSize (const PTH_HOLE_SIZE_RESULT &aRange, int aRoundingStep, PTH_HOLE_ROUNDING aRounding) |
| Choose a recommended hole within an allowable range. | |
| const PTH_HOLE_SIZE_STANDARD * | FindPthHoleSizeStandard (const wxString &aId) |
| Find a hole size standard in the registry by its ID (e.g. | |
| const std::vector< const PTH_HOLE_SIZE_STANDARD * > & | GetPthHoleSizeStandards () |
| int ComputeRecommendedPthHoleSize | ( | const PTH_HOLE_SIZE_RESULT & | aRange, |
| int | aRoundingStep, | ||
| PTH_HOLE_ROUNDING | aRounding ) |
Choose a recommended hole within an allowable range.
The midpoint of the range is rounded onto the rounding grid: to the nearest multiple of the step, or always up to the next multiple. The result is never below the range minimum.
| aRange | is the allowable hole size range (m_holeMin and m_holeMax). |
| aRoundingStep | is the rounding grid. A value of 0 or less returns the exact midpoint of the range. |
| aRounding | selects how the midpoint is rounded onto the grid. |
Definition at line 129 of file pth_hole_size.cpp.
References PTH_HOLE_SIZE_RESULT::m_holeMax, PTH_HOLE_SIZE_RESULT::m_holeMin, and UP.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PANEL_PTH_SIZE::recalculate().
| const PTH_HOLE_SIZE_STANDARD * FindPthHoleSizeStandard | ( | const wxString & | aId | ) |
Find a hole size standard in the registry by its ID (e.g.
"IPC-2222B").
The caller does not own the returned pointer.
| aId | is the standard ID. |
Definition at line 152 of file pth_hole_size.cpp.
References GetPthHoleSizeStandards().
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| const std::vector< const PTH_HOLE_SIZE_STANDARD * > & GetPthHoleSizeStandards | ( | ) |
Definition at line 164 of file pth_hole_size.cpp.
Referenced by FindPthHoleSizeStandard(), PANEL_PTH_SIZE::populateStandardChoice(), and PANEL_PTH_SIZE::updateStandard().