Skip to main content

geop_ops_drawing/
layer.rs

1//! The layers a drawing is drawn on (see [`Layer`]), in the order a sheet
2//! writes them ([`ALL`]).
3
4use geop_lib_sheet::{Layer, LineType};
5
6/// The part's edges and silhouettes seen.
7pub const VISIBLE: Layer = Layer {
8    name: "VISIBLE",
9    width: 0.5,
10    line_type: LineType::Continuous,
11    color: 7,
12};
13
14/// The part's edges and silhouettes behind its faces.
15pub const HIDDEN: Layer = Layer {
16    name: "HIDDEN",
17    width: 0.3,
18    line_type: LineType::Hidden,
19    color: 8,
20};
21
22/// Centre lines and marks: axes of holes and cylinders.
23pub const CENTER: Layer = Layer {
24    name: "CENTER",
25    width: 0.25,
26    line_type: LineType::Center,
27    color: 1,
28};
29
30/// Dimensions, balloons and the parts list.
31pub const DIMENSION: Layer = Layer {
32    name: "DIMENSIONS",
33    width: 0.25,
34    line_type: LineType::Continuous,
35    color: 3,
36};
37
38/// The hatching of a section's cut faces.
39pub const HATCH: Layer = Layer {
40    name: "HATCH",
41    width: 0.18,
42    line_type: LineType::Continuous,
43    color: 9,
44};
45
46/// The sheet's frame and title block.
47pub const BORDER: Layer = Layer {
48    name: "BORDER",
49    width: 0.5,
50    line_type: LineType::Continuous,
51    color: 7,
52};
53
54/// Thin continuous lines: a cosmetic thread seen.
55pub const THREAD: Layer = Layer {
56    name: "THREAD",
57    width: 0.25,
58    line_type: LineType::Continuous,
59    color: 4,
60};
61
62/// Every layer of a drawing, as its sheet lists them.
63pub const ALL: [Layer; 7] = [VISIBLE, HIDDEN, CENTER, DIMENSION, HATCH, BORDER, THREAD];