Skip to main content

geop_ops_plastic/
lib.rs

1//! Features for designing moulded and printed housings: a [`rib`] grown
2//! from an open profile up to the walls around it, a [`lip`] and the groove
3//! that takes it where two halves of an enclosure meet, and a [`draft`] on
4//! the faces a mould slides along.
5
6pub mod band;
7mod common;
8pub mod draft;
9pub mod lip;
10pub mod operation;
11pub mod rib;
12
13pub use operation::{
14    Draft, DraftArgs, Groove, GrooveArgs, Lip, LipArgs, Rib, RibArgs, RibDirection, RibSide,
15};
16
17#[cfg(test)]
18mod editor_tests;
19mod icons;
20#[cfg(test)]
21mod program_tests;
22#[cfg(test)]
23mod regression_tests;
24#[cfg(any(test, feature = "testing"))]
25pub mod testing;
26#[cfg(test)]
27mod tests;
28
29use geop_core_editor::registry::Registry;
30use geop_core_math::geop_error::GeopResult;
31
32/// Adds what this crate offers an editor to `r`: the features of plastic
33/// parts: ribs, drafts, lips and grooves.
34pub fn register(r: Registry) -> GeopResult<Registry> {
35    r.operation(Rib)?
36        .operation(Draft)?
37        .operation(Lip)?
38        .operation(Groove)
39}