1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Easy to use ready made programs that each takes a measurement struct and
//! can output the full G-code.
//!
//! When working with CNC routing there are some steps that is often needed
//! again and again, like planing surfaces for example, the intention is to
//! gather automated instructions for several of these kinds of tasks in this
//! module.
//!
//! Hopefully this module will grow with time to provide a larger set of
//! useful programs.
//!
//! The gcode can be generated by running `program.to_gcode()?` or by passing
//! it to [filesystem::write_project](../filesystem/fn.write_project.html).
//!
//! You can also combine/merge two or more programs using the
//! [.merge(program)](../program/struct.Program.html#method.merge) method.
//!
//! Example for the planing program:
//! ```
//! use anyhow::Result;
//! use cnccoder::prelude::*;
//!
//! fn main() -> Result<()> {
//! let measurements = PlaningMeasurements {
//! x_length: 100.0,
//! y_length: 100.0,
//! z_start: 3.0,
//! z_end: 0.0,
//! z_max_step: 1.0,
//! units: Units::Metric
//! };
//!
//! let tool = Tool::cylindrical(
//! Units::Metric,
//! 20.0,
//! 10.0,
//! Direction::Clockwise,
//! 20000.0,
//! 5000.0,
//! );
//!
//! let mut program = planing(tool, measurements);
//! program.set_name("Peng");
//!
//! write_project(&program, 0.5)?;
//!
//! Ok(())
//! }
//! ```
pub use *;