pub struct SheetSource {
pub pcb: Option<Document>,
pub diagram: Option<Document>,
pub offset: Point,
pub twins: BTreeMap<Uuid, Component>,
pub moved_wires: BTreeMap<Uuid, (Wire, Wire)>,
pub zones: Vec<SheetZone>,
}Expand description
What Document::merge_sheet read, kept by the host for the split.
Fields§
§pcb: Option<Document>The schematic as merged; None when the assembly has no board of its own.
diagram: Option<Document>The wiring diagram as merged; None when it has none.
offset: PointWhere the board’s schematic origin sits in the diagram’s coordinates: a diagram
point p is drawn at p - offset on the sheet.
twins: BTreeMap<Uuid, Component>A part on both documents: the sheet component’s id (the schematic’s), and the diagram’s own copy of it as merged.
moved_wires: BTreeMap<Uuid, (Wire, Wire)>A harness wire whose end the merge moved onto a part’s place on the board (its twin sat elsewhere): the diagram’s wire, and the sheet’s as merged. An unedited one splits back to the diagram’s.
zones: Vec<SheetZone>The sub-board zones as merged, in the sheet’s coordinates.
Implementations§
Source§impl SheetSource
impl SheetSource
Sourcepub fn after(sheet: &Document, split: &SplitSheet, offset: Point) -> SheetSource
pub fn after(sheet: &Document, split: &SplitSheet, offset: Point) -> SheetSource
What a merge of split would have read, for the sheet sheet it was split
from: the source the NEXT split of the same sheet is taken against, once the
host has stored split. The sheet keeps its own ids, so its editor keeps its
selection; re-merging would rename a part that moved off the board.