|
KiCad PCB EDA Suite
|
#include <snap_inference.h>
Public Member Functions | |
| void | AddPath (SNAP_OBJECT_PATH aPath) |
| void | AddBounds (SNAP_OBJECT_BOUNDS aBounds) |
| void | AddAlignmentPoint (SNAP_ALIGNMENT_POINT aPoint) |
| void | Clear () |
| void | ActivateExtension (const SNAP_STABLE_ID &aId) |
| void | ClearExtensions () |
| std::vector< SNAP_CANDIDATE > | CollectObjectGeometry (const SNAP_SOURCE_CONTEXT &aContext, int aRadius) const |
| std::vector< SNAP_CANDIDATE > | CollectTangentNormal (const SNAP_SOURCE_CONTEXT &aContext, int aRadius, bool aTangentEnabled, bool aNormalEnabled) const |
| std::vector< SNAP_CANDIDATE > | CollectAlignment (const SNAP_SOURCE_CONTEXT &aContext, int aRadius) const |
| std::vector< SNAP_CANDIDATE > | CollectEqualSpacing (const SNAP_SOURCE_CONTEXT &aContext, int aRadius) const |
Private Member Functions | |
| bool | eligible (const SNAP_SOURCE_CONTEXT &aContext, const SNAP_STABLE_ID &aId) const |
| bool | eligible (const SNAP_SOURCE_CONTEXT &aContext, const SNAP_OBJECT_BOUNDS &aBounds) const |
| bool | eligible (const SNAP_SOURCE_CONTEXT &aContext, const SNAP_ALIGNMENT_POINT &aPoint) const |
Private Attributes | |
| std::vector< SNAP_OBJECT_PATH > | m_paths |
| std::vector< SNAP_OBJECT_BOUNDS > | m_bounds |
| std::vector< SNAP_ALIGNMENT_POINT > | m_alignmentPoints |
| std::vector< SNAP_STABLE_ID > | m_activeExtensions |
Definition at line 57 of file snap_inference.h.
| void SNAP_INFERENCE_PROVIDER::ActivateExtension | ( | const SNAP_STABLE_ID & | aId | ) |
Definition at line 294 of file snap_inference.cpp.
References m_activeExtensions.
Referenced by BOOST_AUTO_TEST_CASE().
| void SNAP_INFERENCE_PROVIDER::AddAlignmentPoint | ( | SNAP_ALIGNMENT_POINT | aPoint | ) |
Definition at line 279 of file snap_inference.cpp.
References m_alignmentPoints.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().
| void SNAP_INFERENCE_PROVIDER::AddBounds | ( | SNAP_OBJECT_BOUNDS | aBounds | ) |
Definition at line 273 of file snap_inference.cpp.
References m_bounds.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().
| void SNAP_INFERENCE_PROVIDER::AddPath | ( | SNAP_OBJECT_PATH | aPath | ) |
Definition at line 267 of file snap_inference.cpp.
References m_paths.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().
| void SNAP_INFERENCE_PROVIDER::Clear | ( | ) |
Definition at line 285 of file snap_inference.cpp.
References m_activeExtensions, m_alignmentPoints, m_bounds, and m_paths.
| void SNAP_INFERENCE_PROVIDER::ClearExtensions | ( | ) |
Definition at line 303 of file snap_inference.cpp.
References m_activeExtensions.
| std::vector< SNAP_CANDIDATE > SNAP_INFERENCE_PROVIDER::CollectAlignment | ( | const SNAP_SOURCE_CONTEXT & | aContext, |
| int | aRadius ) const |
Definition at line 526 of file snap_inference.cpp.
References std::abs(), ANCHOR_POINT, BBOX_ALIGNMENT, BOUNDS_FEATURE, eligible(), end, SNAP_CANDIDATE::guides, SNAP_REFERENCE_PREFERENCE::kind, m_alignmentPoints, m_bounds, MakeDerivedSnapId(), SNAP_SOURCE_CONTEXT::movingBounds, SNAP_SOURCE_CONTEXT::movingReferencePoint, NONE, BOX2< Vec >::Offset(), SNAP_CANDIDATE::referenceAffinity, SNAP_SOURCE_CONTEXT::referencePreference, SNAP_CANDIDATE::relation, result, and SNAP_SOURCE_CONTEXT::sourcePoint.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().
| std::vector< SNAP_CANDIDATE > SNAP_INFERENCE_PROVIDER::CollectEqualSpacing | ( | const SNAP_SOURCE_CONTEXT & | aContext, |
| int | aRadius ) const |
Definition at line 733 of file snap_inference.cpp.
References std::abs(), BBOX_EQUAL_GAP, center, BOX2< Vec >::Centre(), DIMENSION_BRACKET, eligible(), SNAP_CANDIDATE::guides, SNAP_CANDIDATE::id, KiROUND(), m_bounds, MakeIntersectionSnapId(), SNAP_SOURCE_CONTEXT::movingBounds, SNAP_SOURCE_CONTEXT::movingReferencePoint, SNAP_CANDIDATE::normalizedScreenResidual, BOX2< Vec >::Offset(), SNAP_CANDIDATE::relation, result, SNAP_STABLE_ID::solutionBranch, and SNAP_SOURCE_CONTEXT::sourcePoint.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().
| std::vector< SNAP_CANDIDATE > SNAP_INFERENCE_PROVIDER::CollectObjectGeometry | ( | const SNAP_SOURCE_CONTEXT & | aContext, |
| int | aRadius ) const |
Definition at line 334 of file snap_inference.cpp.
References VECTOR2< T >::Distance(), eligible(), INTERSECTION, m_activeExtensions, m_paths, MakeIntersectionSnapId(), OBJECT, path, SNAP_CANDIDATE::Point(), result, and SNAP_SOURCE_CONTEXT::sourcePoint.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().
| std::vector< SNAP_CANDIDATE > SNAP_INFERENCE_PROVIDER::CollectTangentNormal | ( | const SNAP_SOURCE_CONTEXT & | aContext, |
| int | aRadius, | ||
| bool | aTangentEnabled, | ||
| bool | aNormalEnabled ) const |
Definition at line 455 of file snap_inference.cpp.
References center, circle(), SHAPE_ARC::Collide(), delta, VECTOR2< T >::Distance(), eligible(), SHAPE_ARC::GetCenter(), SHAPE_ARC::GetRadius(), SNAP_CANDIDATE::guides, KiROUND(), m_paths, MakeDerivedSnapId(), NORMAL, normal, OBJECT, path, SNAP_CANDIDATE::Point(), radius, SNAP_CANDIDATE::relation, result, SNAP_SOURCE_CONTEXT::sourcePoint, SNAP_SOURCE_CONTEXT::stationarySourceLeg, TANGENT, TANGENT_NORMAL, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().
|
private |
Definition at line 325 of file snap_inference.cpp.
References eligible(), SNAP_ALIGNMENT_POINT::id, SNAP_SOURCE_CONTEXT::movingItem, and SNAP_ALIGNMENT_POINT::parent.
|
private |
Definition at line 316 of file snap_inference.cpp.
References eligible(), SNAP_OBJECT_BOUNDS::id, SNAP_SOURCE_CONTEXT::movingItem, and SNAP_OBJECT_BOUNDS::parent.
|
private |
Definition at line 309 of file snap_inference.cpp.
References SNAP_SOURCE_CONTEXT::movingFeatures.
Referenced by CollectAlignment(), CollectEqualSpacing(), CollectObjectGeometry(), CollectTangentNormal(), eligible(), and eligible().
|
private |
Definition at line 82 of file snap_inference.h.
Referenced by ActivateExtension(), Clear(), ClearExtensions(), and CollectObjectGeometry().
|
private |
Definition at line 81 of file snap_inference.h.
Referenced by AddAlignmentPoint(), Clear(), and CollectAlignment().
|
private |
Definition at line 80 of file snap_inference.h.
Referenced by AddBounds(), Clear(), CollectAlignment(), and CollectEqualSpacing().
|
private |
Definition at line 79 of file snap_inference.h.
Referenced by AddPath(), Clear(), CollectObjectGeometry(), and CollectTangentNormal().