|
KiCad PCB EDA Suite
|
Tests the arc swept-angle constraint (issue #2329): authoring measures GetArcAngle(), and the solver drives the arc's swept angle, holding the free radius so it cannot collapse. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <vector>#include <board.h>#include <pcb_shape.h>#include <constraints/pcb_constraint.h>#include <constraints/board_constraint_adapter.h>#include <constraints/constraint_builder.h>#include "constraint_test_utils.h"Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (AuthorMeasuresSweptAngle) | |
| BOOST_AUTO_TEST_CASE (AuthorRejectsNonArc) | |
| BOOST_AUTO_TEST_CASE (DriveSweptAngleReachesTarget) | |
| BOOST_AUTO_TEST_CASE (ApplyHoldsArcRadius) | |
| BOOST_AUTO_TEST_CASE (DriveToReflexAngle) | |
| BOOST_AUTO_TEST_CASE (ArcAngleOnCircleIsUnmapped) | |
| BOOST_AUTO_TEST_CASE (ReferenceArcAngleTracksGeometry) | |
Tests the arc swept-angle constraint (issue #2329): authoring measures GetArcAngle(), and the solver drives the arc's swept angle, holding the free radius so it cannot collapse.
Definition in file test_constraint_arc_angle.cpp.
| BOOST_AUTO_TEST_CASE | ( | ApplyHoldsArcRadius | ) |
Definition at line 96 of file test_constraint_arc_angle.cpp.
References std::abs(), KI_TEST::addConstraint(), ApplyConstraintImmediately(), ARC_ANGLE, EDA_ANGLE::AsDegrees(), EDA_SHAPE::GetArcAngle(), EDA_SHAPE::GetRadius(), EDA_ITEM::m_Uuid, and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | ArcAngleOnCircleIsUnmapped | ) |
Definition at line 129 of file test_constraint_arc_angle.cpp.
References KI_TEST::addCircle(), KI_TEST::addConstraint(), ARC_ANGLE, BOOST_REQUIRE(), BOARD_CONSTRAINT_ADAPTER::Build(), circle(), KI_TEST::MM, BOARD_CONSTRAINT_ADAPTER::UnmappedConstraints(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | AuthorMeasuresSweptAngle | ) |
Definition at line 54 of file test_constraint_arc_angle.cpp.
References ARC_ANGLE, BOOST_AUTO_TEST_CASE(), BOOST_REQUIRE(), and BuildConstraintFromItems().
| BOOST_AUTO_TEST_CASE | ( | AuthorRejectsNonArc | ) |
Definition at line 69 of file test_constraint_arc_angle.cpp.
References KI_TEST::addCircle(), ARC_ANGLE, BuildConstraintFromItems(), circle(), and KI_TEST::MM.
| BOOST_AUTO_TEST_CASE | ( | DriveSweptAngleReachesTarget | ) |
Definition at line 78 of file test_constraint_arc_angle.cpp.
References KI_TEST::addConstraint(), ARC_ANGLE, EDA_ANGLE::AsDegrees(), EDA_SHAPE::GetArcAngle(), EDA_ITEM::m_Uuid, KI_TEST::solveAndApply(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | DriveToReflexAngle | ) |
Definition at line 115 of file test_constraint_arc_angle.cpp.
References KI_TEST::addConstraint(), ARC_ANGLE, EDA_ANGLE::AsDegrees(), EDA_SHAPE::GetArcAngle(), EDA_ITEM::m_Uuid, KI_TEST::solveAndApply(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | ReferenceArcAngleTracksGeometry | ) |
Definition at line 148 of file test_constraint_arc_angle.cpp.
References KI_TEST::addConstraint(), ARC_ANGLE, BOOST_REQUIRE(), PCB_CONSTRAINT::GetValue(), EDA_ITEM::m_Uuid, KI_TEST::MM, ReSolveShapeClusters(), PCB_SHAPE::SetArcGeometry(), PCB_CONSTRAINT::SetDriving(), and WHOLE.