MCPcopy Index your code
hub / github.com/evestera/svg-halftone

github.com/evestera/svg-halftone @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
29 symbols 48 edges 4 files 1 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

svg-halftone

Travis Build Status Appveyor build status

Tool for converting raster images (png, jpg, gif) to SVG halftone patterns that can be cut on a laser cutter, turning the halftone dots into holes.

Installation

There are precompiled binaries of releases on the releases page.

If you have Rust installed you can build from source with:

cargo install --git https://github.com/evestera/svg-halftone

Usage

svg-halftone my-image.jpg

Options

From svg-halftone --help

  • --shape <shape>: Shape used for samples. "circle", "hex" or "diamond" [default: circle]
  • --grid <grid>: Grid to lay samples out on. "rect", "hex", "diamond" or "poisson". Defaults to the grid best suited to the chosen shape.
  • --contrast <contrast>: Adjust contrast of input image before processing. Positive numbers increase contrast, negative numbers decrease it.
  • --invert: Make shapes black on white. I.e. holes show a darker background.
  • --output <output>: Output path [default: out.svg]
  • --output-width <output-width>: Output width in mm [default: 300]
  • --spacing <spacing>: Horizontal spacing between samples in mm [default: 5]
  • --cut-paths: Draw cut paths only (no fill and background). I.e. make a file ready for cutting.

Examples

Image used as input for these examples:

--shape circle --grid rect (default)

--shape circle --grid poisson

--shape hex (also sets --grid hex)

--shape diamond (also sets --grid diamond)

Useful programs/tools

  • remove.bg: Easily replace backgrounds of images of people with a single color.

  • Gapplin (macOS): SVG viewer which automatically redraws the file when it is updated.

License

This project is licensed under the MIT License.

Core symbols most depended-on inside this repo

float_to_index
called by 4
src/poisson.rs
grid
called by 3
src/grid.rs
diamond
called by 2
src/svg.rs
hex
called by 2
src/svg.rs
add_sample
called by 2
src/poisson.rs
circle
called by 1
src/svg.rs
hex_corner
called by 1
src/svg.rs
svg
called by 1
src/svg.rs

Shape

Function 23
Class 2
Enum 2
Method 2

Languages

Rust100%

Modules by API surface

src/svg.rs12 symbols
src/main.rs7 symbols
src/poisson.rs6 symbols
src/grid.rs4 symbols

For agents

$ claude mcp add svg-halftone \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page