Chodzi Ci konkretnie o przetworzenie dzieła wykonanego w Blenderze do g-code, czy o generowanie g-code za pomocą zamieszczonego skryptu?
Skrypt działa tak (trzeba zadać kilka parametrów, żeby coś wyszło):
Kod: Zaznacz cały
bash-2.05b$ python cam.py -i /home/jarek/grafika/official\ gnu.svg -o out.g -w /home/jarek/pakiety/BlenderCAM/ -s 700 -h 20 -c 1 &
[2] 1702
bash-2.05b$ cam.py 10/2/06 (c) MIT CBA Neil Gershenfeld
Permission granted for experimental and personal use;
license for commercial sale available from MIT
modes: 1D path following, 2D contour and raster, 3D slicing
input:
*.svg: SVG (polylines and paths)
*.dxf: DXF (2D polylines, 3D polymeshes)
*.stl: STL (binary and ASCII)
*.cmp,*.sol,*.via,*.mill: Gerber
RS-274X format, with 0-width trace defining board boundary
*.drl, *.drd: Excellon (with embedded drill defitions)
*.jpg: z bitmap
output:
*.rml: Roland Modela RML mill
*.camm: Roland CAMM cutter
*.jpg,*.bmp: images
*.epi: Epilog lasercutter
*.uni: Universal lasercutter
*.g: G codes
*.ord: OMAX waterjet cutter
*.oms: Resonetics excimer micromachining center
*.dxf: DXF
*.stl: STL
keys: Q to quit
usage: python cam.py [[-i] infile][-d display scale][-p part scale][-x xmin][-y ymin][-o outfile][-f force][-v velocity][-t tooldia][-a rate][-e power][-s speed][-h height][-c contour][-r raster][-n no noise][-# number of arc segments][-j jobname][-w write toolpath]
reading SVG file /home/jarek/grafika/official gnu.svg
width: 450.000in
height: 450.000in
found 619 polygons, 11440 vertices
xmin: 0 xmax: 1.2e+03 dx: 1.2e+03
ymin: -1.2e+03 ymax: -116 dy: 1.08e+03
added 0.00108 perturbation
plotting
wrote 619 G code toolpath segments to out.g
xmin: 0 xmax: 1.2e+03 dx: 1.2e+03
ymin: 0 ymax: 1.08e+03 dy: 1.08e+03
Z pliku svg poszło bez problemu (nie mam w tej chwili w czym podejrzeć, ale te cale mi się nie podobają). Z dxf ani stl wyeksportowanego z Blender-a nic nie uzyskałem.