48 lines
2.0 KiB
Markdown
48 lines
2.0 KiB
Markdown
# HPGL Plotter Manager
|
|
|
|
Manage HPGL files and send them to a plotter. Single core library (refac version at root), generators, and unified output folder for all graphics.
|
|
|
|
## Folder structure
|
|
|
|
```
|
|
mimaki/
|
|
├── Command.py, Program.py, Plotter.py # Core HPGL library (parse, scale, send to plotter)
|
|
├── main.py # Main entry: load HPGL, scale, send to plotter
|
|
├── maintk.py, hpglView.py # Tk-based viewer / GUI
|
|
├── output/ # All HPGL and SVG files
|
|
│ ├── hpgl/ # HPGL plot files
|
|
│ └── svg/ # SVG and related assets
|
|
├── generators/ # Scripts that generate HPGL (or related graphics)
|
|
│ ├── hilbert.py, koche.py, koch.py, kochger.py
|
|
│ ├── mandelbrot.py, moebius.py, potter.py
|
|
│ ├── refac/ # hilbert, lorenz, K18650, Kleber
|
|
│ └── apollon/ # Apollonian gasket → SVG/HPGL
|
|
└── docs/ # HPGL / plotter documentation (PDFs)
|
|
```
|
|
|
|
## Usage
|
|
|
|
- **Run main (load file and send to plotter):**
|
|
From project root: `python main.py`
|
|
Edit `main.py` to change the file (default: `output/hpgl/kreis.hpgl`).
|
|
|
|
- **Load HPGL and show in window:**
|
|
`python show_hpgl.py`
|
|
|
|
- **Run a generator:**
|
|
From project root, e.g.
|
|
`python generators/potter.py`
|
|
|
|
- **Open/save files in GUI:**
|
|
`python maintk.py` — use File → Open and point to files under `output/hpgl/` or `output/svg/`.
|
|
|
|
## Paths
|
|
|
|
- All HPGL and SVG live under **`output/hpgl/`** and **`output/svg/`**.
|
|
- Run scripts from the project root so paths like `output/hpgl/...` resolve correctly.
|
|
|
|
## Config
|
|
|
|
- Copy **`config.example.ini`** to **`config.ini`** to set plotter port, baudrate, timeouts, and web UI host/port. `config.ini` is gitignored.
|
|
- Plotter and web UI read from `config.ini`; env `SECRET_KEY` overrides the web session secret.
|