| 
    KiCad PCB EDA Suite
    
   | 
 
#include <boost/test/unit_test.hpp>#include <boost/test/data/test_case.hpp>#include <qa_utils/wx_utils/unit_test_utils.h>#include <qa_utils/geometry/line_chain_construction.h>#include <geometry/shape_poly_set.h>#include <geometry/shape_line_chain.h>#include <algorithm>#include "geom_test_utils.h"Go to the source code of this file.
Classes | |
| struct | SquareFilletTestCase | 
Functions | |
| void | TestFilletSegmentConstraints (const SEG &aSeg, VECTOR2I aRadCentre, int aRadius, int aError) | 
| void | TestSquareFillet (int aSquareSize, int aRadius, int aError) | 
| : Create a square, fillet it, and check a corner for correctness   | |
| void | TestConcaveSquareFillet (int aSquareSize, int aRadius, int aError) | 
| : Create a square concave corner, fillet and check correctness   | |
| BOOST_DATA_TEST_CASE (SquareConcaveFillet, boost::unit_test::data::make(squareFilletCases), testCase) | |
| Tests the SHAPE_POLY_SET::FilletPolygon method against certain geometric constraints.   | |
Variables | |
| const std::vector< SquareFilletTestCase > | squareFilletCases | 
| BOOST_DATA_TEST_CASE | ( | SquareConcaveFillet | , | 
| boost::unit_test::data::make(squareFilletCases) | , | ||
| testCase | ) | 
Tests the SHAPE_POLY_SET::FilletPolygon method against certain geometric constraints.
Definition at line 200 of file test_fillet.cpp.
References squareFilletCases, and TestConcaveSquareFillet().
| void TestConcaveSquareFillet | ( | int | aSquareSize, | 
| int | aRadius, | ||
| int | aError ) | 
: Create a square concave corner, fillet and check correctness
Definition at line 113 of file test_fillet.cpp.
References SHAPE_POLY_SET::AddOutline(), SHAPE_LINE_CHAIN::Append(), BOOST_CHECK_EQUAL(), GEOM_TEST::FilletPolySet(), SHAPE_POLY_SET::IterateSegments(), SHAPE_POLY_SET::OutlineCount(), GEOM_TEST::SegmentCompletelyWithinRadius(), SHAPE_LINE_CHAIN::SetClosed(), and TestFilletSegmentConstraints().
Referenced by BOOST_DATA_TEST_CASE().
| void TestFilletSegmentConstraints | ( | const SEG & | aSeg, | 
| VECTOR2I | aRadCentre, | ||
| int | aRadius, | ||
| int | aError ) | 
Definition at line 48 of file test_fillet.cpp.
References ANGLE_90, GEOM_TEST::ArePerpendicular(), BOOST_CHECK_PREDICATE(), KI_TEST::IsWithinAndBelow(), and TestFilletSegmentConstraints().
Referenced by TestConcaveSquareFillet(), TestFilletSegmentConstraints(), and TestSquareFillet().
| void TestSquareFillet | ( | int | aSquareSize, | 
| int | aRadius, | ||
| int | aError ) | 
: Create a square, fillet it, and check a corner for correctness
Definition at line 75 of file test_fillet.cpp.
References SHAPE_POLY_SET::AddOutline(), BOOST_CHECK_EQUAL(), KI_TEST::BuildSquareChain(), GEOM_TEST::FilletPolySet(), SHAPE_POLY_SET::IterateSegments(), SHAPE_POLY_SET::OutlineCount(), GEOM_TEST::Q1, GEOM_TEST::SegmentCompletelyInQuadrant(), and TestFilletSegmentConstraints().
| const std::vector<SquareFilletTestCase> squareFilletCases | 
Definition at line 180 of file test_fillet.cpp.
Referenced by BOOST_DATA_TEST_CASE().