From 8a12ce350c51129c42b263b723c2e9e9b047e63a Mon Sep 17 00:00:00 2001 From: hakki Date: Sat, 28 Sep 2024 10:04:27 +0200 Subject: [PATCH] SpecctraDocs: added ommited Module descriptions --- src/specctra/design.rs | 6 +++--- src/specctra/mesadata.rs | 6 ++++-- src/specctra/mod.rs | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/specctra/design.rs b/src/specctra/design.rs index a5e6b0b..8b0932a 100644 --- a/src/specctra/design.rs +++ b/src/specctra/design.rs @@ -1,3 +1,6 @@ +//! Module for managing the various Specctra PCB design, including loading the +//! Design DSN file, creating the [`Board`] object from the file, as well as +//! exporting the session file use std::collections::HashMap; use geo::{point, Point, Rotate}; @@ -52,7 +55,6 @@ impl SpecctraDesign { /// This function reads the Specctra Design data from an input stream. /// Later the data is parsed and loaded into a [`SpecctraDesign`] structure, /// allowing further operations such as rule validation, routing, or netlist management. - /// pub fn load(reader: impl std::io::BufRead) -> Result { let mut list_reader = ListTokenizer::new(reader); let dsn = list_reader.read_value::()?; @@ -72,7 +74,6 @@ impl SpecctraDesign { /// This function generates a Specctra SES session file that represents the board's net routing and /// writes it to the provided output stream. The session data includes routed nets, wires, /// layers, and other essential information for routing management. - /// pub fn write_ses( &self, board: &Board, @@ -184,7 +185,6 @@ impl SpecctraDesign { /// which is used for layout and routing operations. The board is initialized with [`SpecctraMesadata`], /// which includes layer and net mappings, and is populated with components, pins, vias, and wires /// from the PCB definition. - /// pub fn make_board(&self) -> Board { let mesadata = SpecctraMesadata::from_pcb(&self.pcb); let mut board = Board::new(Layout::new(Drawing::new( diff --git a/src/specctra/mesadata.rs b/src/specctra/mesadata.rs index 90cd98c..c0d5dc8 100644 --- a/src/specctra/mesadata.rs +++ b/src/specctra/mesadata.rs @@ -1,3 +1,6 @@ +//! Module for handling Specctra's mesadata - design rules, as well as layers +//! or net properties + use std::collections::HashMap; use bimap::BiHashMap; @@ -10,7 +13,7 @@ use crate::{ #[derive(Debug)] /// [`SpecctraRule`] represents the basic routing constraints used by an auto-router, such as -/// the Specctra auto-router, in a PCB design process. This struct defines two key design +/// the Topola auto-router, in a PCB design process. This struct defines two key design /// rules: the width of the trace and the minimum clearance between electrical features. pub struct SpecctraRule { /// Specifies the width of the trace (or conductor) in millimeters. @@ -70,7 +73,6 @@ impl SpecctraMesadata { /// /// This function extracts the necessary metadata from the `Pcb` struct, such as /// layer-to-layer name mappings, net-to-net name mappings, and net class rules. - /// pub fn from_pcb(pcb: &Pcb) -> Self { let mut layer_layername = BiHashMap::from_iter( pcb.structure.layers diff --git a/src/specctra/mod.rs b/src/specctra/mod.rs index 58c4588..86e4cc6 100644 --- a/src/specctra/mod.rs +++ b/src/specctra/mod.rs @@ -1,3 +1,6 @@ +//! Module containing the informations about handling the Specctra +//! based file format, and parsing it into Topola's objects + mod common; pub mod design; pub mod mesadata;