From 3fb01e9f4867307b5f10a18cdf4af766679c52fd Mon Sep 17 00:00:00 2001 From: hakki Date: Tue, 1 Oct 2024 19:34:11 +0200 Subject: [PATCH] Autorouter: general modules descriptions --- src/autorouter/autoroute.rs | 1 + src/autorouter/compare_detours.rs | 5 +++++ src/autorouter/history.rs | 4 ++++ src/autorouter/invoker.rs | 3 +++ src/autorouter/measure_length.rs | 4 ++++ src/autorouter/place_via.rs | 4 ++++ src/autorouter/ratsnest.rs | 5 +++++ src/autorouter/remove_bands.rs | 5 +++++ 8 files changed, 31 insertions(+) diff --git a/src/autorouter/autoroute.rs b/src/autorouter/autoroute.rs index 415e2ef..a2e30f5 100644 --- a/src/autorouter/autoroute.rs +++ b/src/autorouter/autoroute.rs @@ -1,6 +1,7 @@ //! Manages autorouting of ratlines in a layout, tracking status and processed //! routing steps. Provides access to navigation meshes, traces, ghost shapes, //! and obstacles encountered during routing. + use petgraph::graph::EdgeIndex; use crate::{ diff --git a/src/autorouter/compare_detours.rs b/src/autorouter/compare_detours.rs index e06dbc6..122332c 100644 --- a/src/autorouter/compare_detours.rs +++ b/src/autorouter/compare_detours.rs @@ -1,3 +1,8 @@ +//! Manages the comparison of detours between two ratlines, tracking their +//! routing statuses and lengths. Facilitates stepwise processing of routing +//! while providing access to navigation meshes, traces, ghost shapes, and +//! obstacles encountered. + use petgraph::graph::EdgeIndex; use crate::{ diff --git a/src/autorouter/history.rs b/src/autorouter/history.rs index 18ea10f..4db7814 100644 --- a/src/autorouter/history.rs +++ b/src/autorouter/history.rs @@ -1,3 +1,7 @@ +//! Manages command history operations, allowing for undoing and redoing commands. +//! Handles error scenarios related to command history, maintaining lists of executed +//! and undone commands for easy navigation. + use serde::{Deserialize, Serialize}; use thiserror::Error; diff --git a/src/autorouter/invoker.rs b/src/autorouter/invoker.rs index 53f1043..e923704 100644 --- a/src/autorouter/invoker.rs +++ b/src/autorouter/invoker.rs @@ -1,3 +1,6 @@ +//! This module defines the Invoker structure, which manages the execution of +//! routing commands within the autorouting system. + use std::cmp::Ordering; use contracts::debug_requires; diff --git a/src/autorouter/measure_length.rs b/src/autorouter/measure_length.rs index f38c2ac..2f0b9c9 100644 --- a/src/autorouter/measure_length.rs +++ b/src/autorouter/measure_length.rs @@ -1,3 +1,7 @@ +//! This module provides functionality for measuring the total length of selected +//! bands in a PCB layout. It interacts with the autorouter to calculate and return +//! the length of specified band selections. + use crate::{ board::mesadata::AccessMesadata, drawing::graph::PrimitiveIndex, diff --git a/src/autorouter/place_via.rs b/src/autorouter/place_via.rs index b81a92d..31b2d69 100644 --- a/src/autorouter/place_via.rs +++ b/src/autorouter/place_via.rs @@ -1,3 +1,7 @@ +//! This module provides functionality for placing vias in a PCB layout. +//! It manages the process of inserting a via with a specified weight and +//! checks if the via has already been placed. + use crate::{ board::mesadata::AccessMesadata, drawing::graph::PrimitiveIndex, diff --git a/src/autorouter/ratsnest.rs b/src/autorouter/ratsnest.rs index 61cc7dd..c901e67 100644 --- a/src/autorouter/ratsnest.rs +++ b/src/autorouter/ratsnest.rs @@ -1,3 +1,8 @@ +//! This module defines data structures and methods for managing a graph +//! used in layout triangulation and routing tasks. It includes vertex and edge +//! structures for representing graph nodes and edges with associated metadata, +//! as well as functions for constructing and manipulating these graphs. + use std::collections::HashMap; use enum_dispatch::enum_dispatch; diff --git a/src/autorouter/remove_bands.rs b/src/autorouter/remove_bands.rs index 3524c53..5187adc 100644 --- a/src/autorouter/remove_bands.rs +++ b/src/autorouter/remove_bands.rs @@ -1,3 +1,8 @@ +//! This module provides functionality to remove bands from the layout in an +//! autorouting context. It defines a struct that interacts with the autorouter +//! to remove selected bands, and implements necessary traits for working +//! with navigation meshes, traces, and obstacles. + use crate::{ board::mesadata::AccessMesadata, drawing::graph::PrimitiveIndex,