From 44d2c63b3b2d0c45b50496ddbceee2d2c3ac723e Mon Sep 17 00:00:00 2001 From: Samuel Bryner Date: Thu, 24 Jan 2019 23:11:36 +0100 Subject: [PATCH] Remove gnuplot stuff. --- Cargo.toml | 1 - readme.md | 6 +++--- src/sort_polygons.rs | 22 ---------------------- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 99bf401..9c011e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ usvg = "0.5" svgdom = "0.16" lyon = "0.11" conv = "0.3" # this is the version used by gerber-types -gnuplot = "0.0.26" # just for debugging log = "0.4" env_logger = "0.6" diff --git a/readme.md b/readme.md index 9770049..571596e 100644 --- a/readme.md +++ b/readme.md @@ -42,13 +42,13 @@ Usage ./svg2gerb input.svg [output.gerb [layer_type]] -If no output file is specified it will take the input filename and replace the extension with ".gerb". +If no output file is specified it will take the input filename and replace the extension with "`.gerb`". -If the output path is just "-" the Gerber data will be printed to stdout. +If the output path is just "`-`" the Gerber data will be printed to stdout. `layer_type` specifies what kind of metadata the output contains. This is optional but recommended to make it more clear for the manufacturer how to interpret your files. Possible values are (case insensitive): - `F.Cu`, `B.Cu` Copper layer, positive file polarity - - `F.Mask`, `B.Mask` Solder mask, negative file polarity (i.e. the shapes specify areas that should *not* be covered in solder mask) + - `F.Mask`, `B.Mask` Solder mask, negative file polarity (i.e. the shapes specify areas that should _not_ be covered in solder mask) diff --git a/src/sort_polygons.rs b/src/sort_polygons.rs index 6c1461b..1d2bcd0 100644 --- a/src/sort_polygons.rs +++ b/src/sort_polygons.rs @@ -1,8 +1,5 @@ extern crate lyon; -//extern crate gnuplot; -//use sort_polygons::gnuplot::AxesCommon; - //use lyon::tessellation as tess; use lyon::path::iterator::PathIterator; use lyon::path::FlattenedEvent; @@ -178,18 +175,6 @@ pub fn create_parent_list<'a>(polygons: &'a Vec) -> Vec> let mut parent_stack: Vec = Vec::new(); - - /* - let mut fig = gnuplot::Figure::new(); - { - let mut ax = fig.axes2d(); - - ax.set_title(&format!("Step {}", _step), &[]); - ax.lines(&[pt.vertex.x, pt.prev.x], &[pt.vertex.y, pt.prev.y], &[gnuplot::Color("black"), gnuplot::LineWidth(2.0)]); - ax.lines(&[pt.vertex.x, pt.next.x], &[pt.vertex.y, pt.next.y], &[gnuplot::Color("black"), gnuplot::LineWidth(2.0)]); - ax.points(&[pt.vertex.x], &[pt.vertex.y], &[gnuplot::Color("black"), gnuplot::PointSize(5.0), gnuplot::PointSymbol('o')]); - */ - // count number of edges between current vertex and the outside (while ignoring edges of // the current polygon) for ref edge in ¤t_scanline { @@ -204,8 +189,6 @@ pub fn create_parent_list<'a>(polygons: &'a Vec) -> Vec> continue; } - //ax.lines(&[edge.upper.x, edge.lower.x], &[edge.upper.y, edge.lower.y], &[gnuplot::Color("red"), gnuplot::LineWidth(2.0)]); - // push or pop polys to/from stack let mut pop = false; if let Some(p) = parent_stack.last() { @@ -221,11 +204,6 @@ pub fn create_parent_list<'a>(polygons: &'a Vec) -> Vec> } } - /* - } - fig.show(); - */ - trace!(" -> handling point {:?}", pt.vertex); trace!(" -> last edge on stack of {}: {:?}", parent_stack.len(), parent_stack.last());