pub struct PcbNet {Show 14 fields
pub name: String,
pub layer: Layer,
pub locked: bool,
pub visible: bool,
pub primitive_lock: bool,
pub user_routed: bool,
pub keepout: bool,
pub union_index: i32,
pub color: Color,
pub loop_removal: bool,
pub override_color_for_draw: bool,
pub layer_widths: Vec<(String, Coord)>,
pub unique_id: String,
pub params: ParameterCollection,
}Expand description
PCB net record.
A net represents an electrical connection between multiple points on the PCB. It stores routing properties like track widths for different layers and visual display settings.
Fields§
§name: StringNet name.
layer: LayerLayer (typically TOP for default).
locked: boolWhether the net is locked.
visible: boolWhether the net is visible.
primitive_lock: boolWhether primitives are locked.
user_routed: boolWhether this is a user-routed net.
keepout: boolWhether this is a keepout net.
union_index: i32Union index (for grouping).
color: ColorDisplay color for the net.
loop_removal: boolWhether to use loop removal optimization.
override_color_for_draw: boolWhether to override color for drawing.
layer_widths: Vec<(String, Coord)>Layer-specific minimum routing widths (indexed by layer). Format: TOPLAYER_MRWIDTH, MIDLAYER1_MRWIDTH, etc.
unique_id: StringUnique ID.
params: ParameterCollectionAll parameters for round-tripping.
Implementations§
Source§impl PcbNet
impl PcbNet
Sourcepub fn from_params(params: &ParameterCollection) -> Self
pub fn from_params(params: &ParameterCollection) -> Self
Parse a net from parameters.
Sourcepub fn to_params(&self) -> ParameterCollection
pub fn to_params(&self) -> ParameterCollection
Export to parameters.
Sourcepub fn get_layer_width(&self, layer_name: &str) -> Option<Coord>
pub fn get_layer_width(&self, layer_name: &str) -> Option<Coord>
Get the minimum routing width for a specific layer.
Sourcepub fn top_layer_width(&self) -> Option<Coord>
pub fn top_layer_width(&self) -> Option<Coord>
Get the top layer minimum routing width.
Sourcepub fn bottom_layer_width(&self) -> Option<Coord>
pub fn bottom_layer_width(&self) -> Option<Coord>
Get the bottom layer minimum routing width.
Trait Implementations§
Source§impl DumpTree for PcbNet
impl DumpTree for PcbNet
Source§fn dump(&self, tree: &mut TreeBuilder)
fn dump(&self, tree: &mut TreeBuilder)
Source§fn dump_to_string(&self) -> String
fn dump_to_string(&self) -> String
Source§fn dump_to_string_with_options(&self, options: DumpOptions) -> String
fn dump_to_string_with_options(&self, options: DumpOptions) -> String
Auto Trait Implementations§
impl Freeze for PcbNet
impl RefUnwindSafe for PcbNet
impl Send for PcbNet
impl Sync for PcbNet
impl Unpin for PcbNet
impl UnwindSafe for PcbNet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more