pub struct PortRecord {
pub point: Vec3,
pub direction: Vec3,
pub kind: PortKind,
pub extension: f64,
pub display_length: f64,
pub port_name: String,
pub point_name: String,
pub purpose: String,
}Expand description
One resolved connection point, keyed in [SceneMap::ports] by its ADDRESS
(J1.VCC, ACOMP3:J1.VCC once placed - see ports.rs). Published by the
ports tail, by the WAYPOINT feature (under its own feature id) and by an
ACOMP re-publishing a placed part’s points.
direction is the unit vector a wire leaves along on side A; side B
is its negation. extension is the straight run a wire keeps from point
before it may bend (a spline anchor attached here takes it as its
forward/backward distance) and display_length the length of the drawn
line.
port_name / point_name / purpose stay PART-LOCAL through every
namespacing: a placed part’s point is still point VCC of port J1
whatever occurrence chain its address carries. That is what a pin binds to.
A WAYPOINT carries an empty port_name and purpose, and its own name as
point_name.
Fields§
§point: Vec3§direction: Vec3§kind: PortKind§extension: f64§display_length: f64§port_name: String§point_name: String§purpose: StringImplementations§
Source§impl PortRecord
impl PortRecord
Sourcepub fn local_address(&self) -> String
pub fn local_address(&self) -> String
The PART-LOCAL address of this point (J1.VCC), or just the name for a
WAYPOINT, which belongs to no port. The occurrence chain is the map key’s
business, not the record’s.
Sourcepub fn side_direction(&self, side: PortSide) -> Vec3
pub fn side_direction(&self, side: PortSide) -> Vec3
The direction a wire leaves this port along on side (A = the port
direction, B = its negation).