fixed paths
This commit is contained in:
11
Readme.md
11
Readme.md
@@ -60,7 +60,7 @@ output/pm4n/Flow_Controller_Panel-B_Silkscreen.pm4n
|
||||
output/pm4n/Flow_Controller_Panel-B_Silkscreen.preview.png
|
||||
```
|
||||
#### 4.1. Check the layer preview
|
||||
Check the `output/pm4n/Flow_Controller_Panel-*.preview.png` — traces should appear black on white background.
|
||||
Check the `output/pm4n/Flow_Controller_Panel-*.preview.png` images — traces should appear black on white background.
|
||||
- background = UV exposed = resist removed = etched away
|
||||
- traces = dark = resist kept = copper stays
|
||||
|
||||
@@ -86,18 +86,19 @@ Convert the gerber to pm4n and preview
|
||||
```bash
|
||||
python3 gerber_to_pm4n.py Dummy.pm4n output/gerbers/Flow_Controller_Panel-Front.gtl \
|
||||
--invert --mirror --exposure 120
|
||||
```
|
||||
It should output
|
||||
```bash
|
||||
output/gerbers/Flow_Controller_Panel-Front.pm4n
|
||||
output/gerbers/Flow_Controller_Panel-Front.preview.png
|
||||
output/pm4n/Flow_Controller_Panel-Front.pm4n
|
||||
output/pm4n/Flow_Controller_Panel-Front.preview.png
|
||||
```
|
||||
|
||||
Open the preview image
|
||||
```bash
|
||||
xdg-open output/gerbers/Flow_Controller_Panel-Front.preview.png
|
||||
xdg-open output/pm4n/Flow_Controller_Panel-Front.preview.png
|
||||
```
|
||||
|
||||
Open the `Flow_Controller_Panel-Front.pm4n` in `Chitubox Basic` slicer to visually verify before printing.
|
||||
Open the `output/pm4n/Flow_Controller_Panel-Front.pm4n` in `Chitubox Basic` slicer to visually verify before printing.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -242,7 +242,16 @@ def main():
|
||||
if not p.exists():
|
||||
sys.exit(f"ERROR: {label} file not found: {p}")
|
||||
|
||||
out = Path(args.output) if args.output else gbr.with_suffix('.pm4n')
|
||||
if args.output:
|
||||
out = Path(args.output)
|
||||
else:
|
||||
# If in 'output/gerbers/', default to 'output/pm4n/'
|
||||
parent = gbr.parent
|
||||
if parent.name == 'gerbers' and parent.parent.name == 'output':
|
||||
out = parent.parent / 'pm4n' / gbr.with_suffix('.pm4n').name
|
||||
else:
|
||||
out = gbr.with_suffix('.pm4n')
|
||||
|
||||
pos_mm = None
|
||||
if args.pos:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user