kicad-source/eeschema/junction_helpers.h
John Beard 6992afeb38 Consider a bus entry hitting a wire corner or tee to be dot-worthy
This doesn't change the connectivity, it just makes putting the
dot more closely match what the connectivity already does.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18046
2024-05-20 12:40:29 +08:00

29 lines
874 B
C++

#include <math/vector2d.h>
#include <sch_rtree.h>
namespace JUNCTION_HELPERS
{
/**
* A selection of information about a point in the schematic that might
* be eligible for turning into a junction.
*/
struct POINT_INFO
{
///< True if the point has 3+ wires and/or 3+ buses meeting there
bool isJunction;
///< True if there is already junction dot at the point
bool hasExplicitJunctionDot;
///< True if there is a bus entry at the point (either end)
bool hasBusEntry;
///< True if there is a bus entry at the point and it connects to more than one wire
bool hasBusEntryToMultipleWires;
};
/**
* Check a tree of items for a confluence at a given point and work out what kind of junction
* it is, if any.
*/
POINT_INFO AnalyzePoint( const EE_RTREE& aItem, const VECTOR2I& aPosition, bool aBreakCrossings );
} // namespace JUNCTION_HELPERS