pub struct KiCadFab { /* private fields */ }Expand description
High-level facade for pure-Rust KiCad fabrication output generation.
Implementations§
Source§impl KiCadFab
impl KiCadFab
Sourcepub fn from_pcb_file(path: impl AsRef<Path>) -> Result<Self, FabError>
pub fn from_pcb_file(path: impl AsRef<Path>) -> Result<Self, FabError>
Parse a .kicad_pcb file on disk into a KiCadFab engine.
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_pcb source text into a KiCadFab engine.
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 KiCadFab engine from an already-parsed PcbView.
Sourcepub fn view(&self) -> &FabViewData
pub fn view(&self) -> &FabViewData
Borrow the underlying canonical FabViewData.
Sourcepub fn to_gerbers(&self, opts: &GerberOptions) -> Vec<FabFile>
pub fn to_gerbers(&self, opts: &GerberOptions) -> Vec<FabFile>
Generate Gerber X2/X1 files in memory.
Sourcepub fn to_nc_drill(&self, opts: &DrillOptions) -> Vec<FabFile>
pub fn to_nc_drill(&self, opts: &DrillOptions) -> Vec<FabFile>
Generate Excellon NC Drill files in memory.
Sourcepub fn to_svg(&self, opts: &SvgOptions) -> String
pub fn to_svg(&self, opts: &SvgOptions) -> String
Generate an analytic composite board SVG.
Sourcepub fn to_layer_svgs(&self, opts: &SvgOptions) -> Vec<FabFile>
pub fn to_layer_svgs(&self, opts: &SvgOptions) -> Vec<FabFile>
Generate per-layer SVG files in memory.
Sourcepub fn to_ipc2581(&self) -> String
pub fn to_ipc2581(&self) -> String
Generate an IPC-2581 Rev B .cvg XML document.
Sourcepub fn to_micro_step(&self) -> String
pub fn to_micro_step(&self) -> String
Generate a pure-Rust ISO 10303-21 Micro-STEP substrate model.
Sourcepub fn virtual_layer(&self, name: &str) -> Result<FabLayerItems, FabError>
pub fn virtual_layer(&self, name: &str) -> Result<FabLayerItems, FabError>
Synthesize one virtual fabrication layer by canonical name or alias.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KiCadFab
impl RefUnwindSafe for KiCadFab
impl Send for KiCadFab
impl Sync for KiCadFab
impl Unpin for KiCadFab
impl UnsafeUnpin for KiCadFab
impl UnwindSafe for KiCadFab
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