![]() |
Junction Diagram Automation Suite 1.5.1
An AutoCAD 2024 plugin for the manipulation and generation of junction box wiring diagrams
|
Represents a junction box containing multiple cables. More...
#include <JBox.h>
Public Member Functions | |
JBox (std::string tag, std::vector< Cable > cables) | |
Constructs a new JBox object. | |
int | GetLeftoverTerminals (BoxSize boxSize) const |
Calculates the number of leftover terminals for a given box size. | |
std::string | GetTag () const |
Gets the tag identifier of the junction box. | |
void | Draw (BoxSize boxSize, AcGeVector3d origin) |
Draws the junction box (function stub). |
Represents a junction box containing multiple cables.
The JBox class encapsulates logic for managing the cables inside a junction box and determining how many terminals remain based on the box size.
JBox::JBox | ( | std::string | tag, |
std::vector< Cable > | cables ) |
void JBox::Draw | ( | BoxSize | boxSize, |
AcGeVector3d | origin ) |
Draws the junction box (function stub).
Draw the cables in this box, arranged based on the size of the box.
boxSize | The size of the box to draw. |
int JBox::GetLeftoverTerminals | ( | BoxSize | boxSize | ) | const |
Calculates the number of leftover terminals for a given box size.
For large boxes, the function checks if cables can be distributed across two tables without splitting. If not feasible, it returns -1. For custom-sized boxes, it returns 0.
boxSize | The size of the box (e.g., SMALL, MEDIUM, LARGE, CUSTOM). |
std::string JBox::GetTag | ( | ) | const |
Gets the tag identifier of the junction box.