Skip to main content

geop_ops_drawing/
lib.rs

1//! 2-D engineering drawings of a part: projected views with hidden lines
2//! and silhouettes ([`hidden_lines`]) — of an assembly, of every part
3//! placed, where it is placed ([`scene`]) — laid out on a sheet with
4//! dimensions, centre marks, a title block and a ballooned bill of
5//! materials (see [`geop_lib_sheet`]); the [`Drawing`] operation
6//! of a program, which describes one; and the [`DrawingExporter`], which
7//! writes it as SVG or DXF.
8
9pub mod annotation;
10pub mod drawing;
11mod export;
12pub mod hidden_lines;
13pub mod layer;
14pub mod operation;
15mod parts;
16pub mod scene;
17pub mod section;
18pub mod silhouette;
19pub mod view;
20
21pub use annotation::{Along, Annotation, Candidate, EdgeShape, Leader, Pickable, Target};
22pub use drawing::{
23    DrawingArgs, Layout, PartsListLine, Projected, Projection, SheetSize, annotated, arrange,
24    compose, layout, project,
25};
26pub use export::{DrawingExporter, DrawingOptions, drawing, drawing_steps};
27pub use hidden_lines::{LineKind, ProjectedView, ViewLine, ViewOptions, project_view};
28pub use operation::{Drawing, DrawingSession};
29pub use parts::parts_list;
30pub use view::{DrawnView, ViewFrame, ViewKind};
31
32#[cfg(test)]
33mod annotation_tests;
34#[cfg(test)]
35mod editor_tests;
36mod icons;
37#[cfg(test)]
38mod program_tests;
39#[cfg(test)]
40mod regression_tests;
41#[cfg(test)]
42mod testing;
43#[cfg(test)]
44mod tests;
45#[cfg(test)]
46mod writer_tests;
47
48use geop_core_editor::registry::Registry;
49use geop_core_math::geop_error::GeopResult;
50
51/// Adds what this crate offers an editor to `r`: drawings of a part, and
52/// the files they are written as.
53pub fn register(r: Registry) -> GeopResult<Registry> {
54    r.operation(Drawing)?.exporter(DrawingExporter)
55}