pub struct FabViewData {Show 15 fields
pub name: String,
pub source_version: i64,
pub copper_count: usize,
pub thickness_nm: i64,
pub aux_origin: CoordNm,
pub layers: Vec<FabLayer>,
pub layers_items: BTreeMap<String, FabLayerItems>,
pub profile: Option<FabProfile>,
pub drill_pairs: Vec<FabDrillPair>,
pub holes: Vec<FabHole>,
pub components: Vec<FabComponent>,
pub bodies: Vec<FabBody3D>,
pub designator_sources: BTreeSet<String>,
pub stackup: Vec<FabStackRow>,
pub nets: BTreeMap<i64, String>,
}Expand description
Canonical whole-nm, +Y-up fabrication model built from a KiCad PCB.
Fields§
§name: String§source_version: i64§copper_count: usize§thickness_nm: i64§aux_origin: CoordNm§layers: Vec<FabLayer>§layers_items: BTreeMap<String, FabLayerItems>§profile: Option<FabProfile>§drill_pairs: Vec<FabDrillPair>§holes: Vec<FabHole>§components: Vec<FabComponent>§bodies: Vec<FabBody3D>§designator_sources: BTreeSet<String>§stackup: Vec<FabStackRow>§nets: BTreeMap<i64, String>Implementations§
Source§impl FabViewData
impl FabViewData
Sourcepub fn from_pcb_source(
source: &str,
name: impl Into<String>,
) -> Result<Self, FabError>
pub fn from_pcb_source( source: &str, name: impl Into<String>, ) -> Result<Self, FabError>
Parse KiCad .kicad_pcb source text and build a canonical FabViewData.
Sourcepub fn from_pcb_view(
view: &PcbView<'_>,
name: impl Into<String>,
) -> Result<Self, FabError>
pub fn from_pcb_view( view: &PcbView<'_>, name: impl Into<String>, ) -> Result<Self, FabError>
Build a canonical FabViewData from an already-parsed PcbView.
Sourcepub fn fab_key_for_kicad(&self, kicad_name: &str) -> Option<&str>
pub fn fab_key_for_kicad(&self, kicad_name: &str) -> Option<&str>
Resolve a KiCad layer name (e.g. F.Cu, F.SilkS, F.Mask) to its canonical FabView key.
Sourcepub fn is_designator_source(&self, source: Option<&str>) -> bool
pub fn is_designator_source(&self, source: Option<&str>) -> bool
Return true when source belongs to a footprint Reference designator text item.
Trait Implementations§
Source§impl Clone for FabViewData
impl Clone for FabViewData
Source§fn clone(&self) -> FabViewData
fn clone(&self) -> FabViewData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FabViewData
impl Debug for FabViewData
Source§impl<'de> Deserialize<'de> for FabViewData
impl<'de> Deserialize<'de> for FabViewData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FabViewData
impl RefUnwindSafe for FabViewData
impl Send for FabViewData
impl Sync for FabViewData
impl Unpin for FabViewData
impl UnsafeUnpin for FabViewData
impl UnwindSafe for FabViewData
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
Mutably borrows from an owned value. Read more