KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_constraint_dimension.cpp File Reference

Tests the dimension-as-constraint-member support (issue #2329, item 6 phase 1): a dimension's feature point can be COINCIDENT with a shape point, so solving (or dragging the shape) pulls the dimension along, while its other, unbound endpoint stays put. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <algorithm>
#include <vector>
#include <board.h>
#include <footprint.h>
#include <geometry/shape_arc.h>
#include <geometry/shape_line_chain.h>
#include <i18n_utility.h>
#include <pcb_dimension.h>
#include <pcb_shape.h>
#include <properties/property.h>
#include <properties/property_mgr.h>
#include <trigo.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 (DimensionAnchorsPerFamily)
 
 BOOST_AUTO_TEST_CASE (CoincidentDimensionFollowsDraggedShape)
 
 BOOST_AUTO_TEST_CASE (DeletedShapeErrorsDimensionConstraint)
 
 BOOST_AUTO_TEST_CASE (PickerOffersDimensionAnchor)
 
 BOOST_AUTO_TEST_CASE (ApplyCoincidentDimensionFirstMember)
 
 BOOST_AUTO_TEST_CASE (WholeShapeMoveDragsBoundDimension)
 
 BOOST_AUTO_TEST_CASE (LeaderEndIsNotBindable)
 
 BOOST_AUTO_TEST_CASE (RadialDrivingLengthDrivesCircleRadius)
 
 BOOST_AUTO_TEST_CASE (OrthogonalHorizontalDrivingSetsXAxisOnly)
 
 BOOST_AUTO_TEST_CASE (OrthogonalVerticalDrivingSetsYAxisOnly)
 
 BOOST_AUTO_TEST_CASE (RadialBindingRequiresSameArcCenterAndOutline)
 
 BOOST_AUTO_TEST_CASE (RadialBindingRejectsCrossObjectCenterAndOutline)
 
 BOOST_AUTO_TEST_CASE (DimensionBindsRectCornerToCorner)
 
 BOOST_AUTO_TEST_CASE (DimensionBindsPolygonVertices)
 
 BOOST_AUTO_TEST_CASE (DimensionBindingPrefersSinglePolygonOverSplit)
 
 BOOST_AUTO_TEST_CASE (ArcOutlinePolyOffersNoAnchors)
 
 BOOST_AUTO_TEST_CASE (AlignedDrivingLengthDrivesRectWidth)
 
 BOOST_AUTO_TEST_CASE (OrthogonalDrivingLengthDrivesPolygonAxis)
 
 BOOST_AUTO_TEST_CASE (DrivenDimensionRemeasuresAfterRectResize)
 
 BOOST_AUTO_TEST_CASE (HoldingEditedRectResizeFollowsBindings)
 
 BOOST_AUTO_TEST_CASE (StaleVertexBindingDegradesAndGatesDriving)
 
 BOOST_AUTO_TEST_CASE (RadialDrivingGateRequiresSingleMappableTarget)
 
 BOOST_AUTO_TEST_CASE (SwappedRectVertexZeroIsPhysicalTopLeft)
 
 BOOST_AUTO_TEST_CASE (VertexInsertShiftsMembersPastInsertionPoint)
 
 BOOST_AUTO_TEST_CASE (VertexDeleteBelowShiftsMemberDown)
 
 BOOST_AUTO_TEST_CASE (VertexDeleteOfBoundVertexRetiresConstraint)
 
 BOOST_AUTO_TEST_CASE (ChamferRemapOrderNetsOneHigherPastTheCorner)
 
 BOOST_AUTO_TEST_CASE (VertexRemapLeavesOtherShapesAndLowerIndicesAlone)
 
 BOOST_AUTO_TEST_CASE (CardinalRotationRecanonicalizesRectRoles)
 
 BOOST_AUTO_TEST_CASE (NonCardinalRotationKeepsRectVertexBindings)
 
 BOOST_AUTO_TEST_CASE (RoundedRectNonCardinalRotationDegradesToUnmapped)
 
 BOOST_AUTO_TEST_CASE (FootprintParentedBindingGatesDriving)
 
 BOOST_AUTO_TEST_CASE (ValueModeDerivation)
 
 BOOST_AUTO_TEST_CASE (SetValueModeTransitions)
 
 BOOST_AUTO_TEST_CASE (SetValueModeDrivingRejections)
 
 BOOST_AUTO_TEST_CASE (SetValueModeDrivingResolvesGeometry)
 
 BOOST_AUTO_TEST_CASE (ValueModePropertySurface)
 

Detailed Description

Tests the dimension-as-constraint-member support (issue #2329, item 6 phase 1): a dimension's feature point can be COINCIDENT with a shape point, so solving (or dragging the shape) pulls the dimension along, while its other, unbound endpoint stays put.

Definition in file test_constraint_dimension.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/37]

◆ BOOST_AUTO_TEST_CASE() [2/37]

BOOST_AUTO_TEST_CASE ( ApplyCoincidentDimensionFirstMember )

◆ BOOST_AUTO_TEST_CASE() [3/37]

◆ BOOST_AUTO_TEST_CASE() [4/37]

◆ BOOST_AUTO_TEST_CASE() [5/37]

◆ BOOST_AUTO_TEST_CASE() [6/37]

BOOST_AUTO_TEST_CASE ( CoincidentDimensionFollowsDraggedShape )

◆ BOOST_AUTO_TEST_CASE() [7/37]

◆ BOOST_AUTO_TEST_CASE() [8/37]

◆ BOOST_AUTO_TEST_CASE() [9/37]

BOOST_AUTO_TEST_CASE ( DimensionBindingPrefersSinglePolygonOverSplit )

◆ BOOST_AUTO_TEST_CASE() [10/37]

◆ BOOST_AUTO_TEST_CASE() [11/37]

BOOST_AUTO_TEST_CASE ( DimensionBindsRectCornerToCorner )

◆ BOOST_AUTO_TEST_CASE() [12/37]

◆ BOOST_AUTO_TEST_CASE() [13/37]

◆ BOOST_AUTO_TEST_CASE() [14/37]

◆ BOOST_AUTO_TEST_CASE() [15/37]

◆ BOOST_AUTO_TEST_CASE() [16/37]

◆ BOOST_AUTO_TEST_CASE() [17/37]

◆ BOOST_AUTO_TEST_CASE() [18/37]

◆ BOOST_AUTO_TEST_CASE() [19/37]

◆ BOOST_AUTO_TEST_CASE() [20/37]

BOOST_AUTO_TEST_CASE ( PickerOffersDimensionAnchor )

◆ BOOST_AUTO_TEST_CASE() [21/37]

BOOST_AUTO_TEST_CASE ( RadialBindingRejectsCrossObjectCenterAndOutline )

◆ BOOST_AUTO_TEST_CASE() [22/37]

BOOST_AUTO_TEST_CASE ( RadialBindingRequiresSameArcCenterAndOutline )

◆ BOOST_AUTO_TEST_CASE() [23/37]

BOOST_AUTO_TEST_CASE ( RadialDrivingGateRequiresSingleMappableTarget )

◆ BOOST_AUTO_TEST_CASE() [24/37]

BOOST_AUTO_TEST_CASE ( RadialDrivingLengthDrivesCircleRadius )

◆ BOOST_AUTO_TEST_CASE() [25/37]

◆ BOOST_AUTO_TEST_CASE() [26/37]

◆ BOOST_AUTO_TEST_CASE() [27/37]

◆ BOOST_AUTO_TEST_CASE() [28/37]

◆ BOOST_AUTO_TEST_CASE() [29/37]

◆ BOOST_AUTO_TEST_CASE() [30/37]

BOOST_AUTO_TEST_CASE ( SwappedRectVertexZeroIsPhysicalTopLeft )

◆ BOOST_AUTO_TEST_CASE() [31/37]

◆ BOOST_AUTO_TEST_CASE() [32/37]

◆ BOOST_AUTO_TEST_CASE() [33/37]

◆ BOOST_AUTO_TEST_CASE() [34/37]

◆ BOOST_AUTO_TEST_CASE() [35/37]

◆ BOOST_AUTO_TEST_CASE() [36/37]

◆ BOOST_AUTO_TEST_CASE() [37/37]

BOOST_AUTO_TEST_CASE ( WholeShapeMoveDragsBoundDimension )