pub struct ProjectView<'a> { /* private fields */ }Implementations§
Source§impl ProjectView<'_>
impl ProjectView<'_>
Sourcepub fn fabrication_design_rules(
&self,
) -> Result<ProjectFabricationRules, ProjectError>
pub fn fabrication_design_rules( &self, ) -> Result<ProjectFabricationRules, ProjectError>
Read only declared minimum rules. This does not measure board geometry.
Source§impl<'a> ProjectView<'a>
impl<'a> ProjectView<'a>
pub const fn raw(&self) -> &'a Map<String, Value>
Sourcepub fn schematic_worksheet_path(&self) -> Result<Option<&'a str>, ProjectError>
pub fn schematic_worksheet_path(&self) -> Result<Option<&'a str>, ProjectError>
Exact selected schematic worksheet locator; an absent/empty value selects the default. The caller resolves a relative locator against the explicitly selected project directory.
pub fn text_variables(&self) -> Result<Vec<(String, String)>, ProjectError>
Sourcepub fn schematic_drawing_settings(&self) -> SchematicDrawingSettings
pub fn schematic_drawing_settings(&self) -> SchematicDrawingSettings
Return KiCad’s schematic drawing settings in the units consumed by the typed plotter. Project line thickness is stored in mils.
Sourcepub fn schematic_junction_diameter_nm(&self) -> i64
pub fn schematic_junction_diameter_nm(&self) -> i64
The diameter KiCad draws a junction whose own diameter is zero
(SCHEMATIC_SETTINGS::GetJunctionSize): the Default net class’s wire
width (6 mil unless the project sets one) times the multiplier
junction_size_choice selects (None, Smallest, Small, Default, Large,
Largest), rounded to KiCad’s 100 nm unit, nanometres.
Sourcepub fn top_level_sheets(&self) -> Vec<(String, String)>
pub fn top_level_sheets(&self) -> Vec<(String, String)>
schematic.top_level_sheets: each entry’s (filename, name), in order.
A field that is not a string reads as empty.
Sourcepub fn root_sheet_name(
&self,
project_name: &str,
root_schematic_file: &str,
file_exists: impl Fn(&str) -> bool,
) -> String
pub fn root_sheet_name( &self, project_name: &str, root_schematic_file: &str, file_exists: impl Fn(&str) -> bool, ) -> String
The name KiCad 10.0.8 gives the root sheet when it loads
root_schematic_file (a /-separated path relative to the project
directory) with this project, as ${SHEETNAME} shows it.
PROJECT_FILE::LoadFromFile (common/project/project_file.cpp:692-755)
gives a project without top-level sheets one entry named for the
project, <project_name>.kicad_sch, and points an entry whose file is
missing at that file. EESCHEMA_HELPERS::LoadSchematic
(eeschema/eeschema_helpers.cpp:140-196) then takes the name of the
entry for the loaded file. With one entry, an empty name or no matching
entry gives “Root”; with several, the entry’s name is kept as it is.
Without a project the name is “Root” (see ROOT_SHEET_DEFAULT_NAME).
pub fn variants(&self) -> Result<Vec<ProjectVariant>, ProjectError>
pub fn bus_aliases(&self) -> Result<Vec<ProjectBusAlias>, ProjectError>
pub fn net_settings(&self) -> Result<ProjectNetSettings, ProjectError>
pub fn board_design_settings( &self, ) -> Result<ProjectBoardDesignSettings, ProjectError>
pub fn get_path(&self, dotted_path: &str) -> Option<&'a Value>
Trait Implementations§
Source§impl<'a> Clone for ProjectView<'a>
impl<'a> Clone for ProjectView<'a>
Source§fn clone(&self) -> ProjectView<'a>
fn clone(&self) -> ProjectView<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more