2024-05-17 12:28:22 +00:00
|
|
|
#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
|
|
|
|
{
|
2024-05-17 13:04:59 +00:00
|
|
|
///< True if the point has 3+ wires and/or 3+ buses meeting there
|
2024-05-17 12:28:22 +00:00
|
|
|
bool isJunction;
|
2024-05-17 13:04:59 +00:00
|
|
|
///< True if there is already junction dot at the point
|
2024-05-17 12:28:22 +00:00
|
|
|
bool hasExplicitJunctionDot;
|
2024-05-17 13:04:59 +00:00
|
|
|
///< True if there is a bus entry at the point (either end)
|
2024-05-17 12:28:22 +00:00
|
|
|
bool hasBusEntry;
|
2024-05-17 13:04:59 +00:00
|
|
|
///< True if there is a bus entry at the point and it connects to more than one wire
|
|
|
|
bool hasBusEntryToMultipleWires;
|
2024-05-17 12:28:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|