├── MANIFEST.in
├── images
├── cut.png
├── clone.png
├── controls.png
├── micro 3d.png
├── settings.png
├── model editor.png
├── model viewer.png
└── profile editor.png
├── .gitignore
├── installers
├── Linux
│ ├── install.zip
│ ├── octoprint.png
│ ├── uninstall.zip
│ ├── OctoPrint.desktop
│ ├── rc-local.service
│ ├── 90-micro-3d-local.rules
│ ├── 92-m3d-pro-local.rules
│ ├── 93-micro+-local.rules
│ └── 91-micro-3d-heatbed-local.rules
├── Windows
│ ├── M3D_v2.cat
│ ├── CH341PT.DLL
│ ├── CH341S64.SYS
│ ├── CH341S98.SYS
│ ├── CH341SER.INF
│ ├── CH341SER.SYS
│ ├── CH341SER.VXD
│ ├── ch341SER.CAT
│ ├── install.zip
│ ├── octoprint.ico
│ ├── uninstall.zip
│ ├── OctoPrint.url
│ └── M3D_v2.inf
└── macOS
│ ├── install.zip
│ ├── shortcut.zip
│ ├── uninstall.zip
│ ├── CH34x_Install.pkg
│ ├── com.octoprint.app.plist
│ ├── command line tools installer.bash
│ ├── uninstall.sh
│ └── install.sh
├── octoprint_m33fio
├── static
│ ├── img
│ │ ├── axes.png
│ │ ├── cube.png
│ │ ├── cut.png
│ │ ├── grid.png
│ │ ├── logo.png
│ │ ├── snap.png
│ │ ├── clone.png
│ │ ├── custom.png
│ │ ├── delete.png
│ │ ├── loading.gif
│ │ ├── merge.png
│ │ ├── reset.png
│ │ ├── rotate.png
│ │ ├── scale.png
│ │ ├── sphere.png
│ │ ├── apply-cut.png
│ │ ├── filament.png
│ │ ├── hengLiXin.png
│ │ ├── listener.png
│ │ ├── shenzhew.png
│ │ ├── translate.png
│ │ ├── xinyujie.png
│ │ ├── boundaries.png
│ │ ├── measurements.png
│ │ ├── m3d-pro-black.png
│ │ ├── micro-3d-black.png
│ │ ├── micro-3d-blue.png
│ │ ├── micro-3d-clear.png
│ │ ├── micro-3d-green.png
│ │ ├── micro-3d-white.png
│ │ ├── backlash-layout.png
│ │ ├── backlash-printed.png
│ │ ├── fill-density-full.png
│ │ ├── fill-density-high.png
│ │ ├── fill-density-low.png
│ │ ├── fill-density-thin.png
│ │ ├── fill-pattern-line.png
│ │ ├── fill-quality-high.png
│ │ ├── fill-quality-low.png
│ │ ├── graph-background.png
│ │ ├── import-from-file.png
│ │ ├── micro-3d-orange.png
│ │ ├── micro-3d-purple.png
│ │ ├── micro-3d-silver.png
│ │ ├── test-border-good.png
│ │ ├── test-border-high.png
│ │ ├── test-border-low.png
│ │ ├── fill-density-medium.png
│ │ ├── fill-density-thick.png
│ │ ├── fill-quality-medium.png
│ │ ├── import-from-server.png
│ │ ├── fill-pattern-honeycomb.png
│ │ ├── fill-quality-extra-low.png
│ │ ├── fill-quality-highest.png
│ │ ├── fill-density-extra-high.png
│ │ ├── fill-pattern-3dhoneycomb.png
│ │ ├── fill-pattern-concentric.png
│ │ ├── fill-pattern-rectilinear.png
│ │ ├── fill-quality-extra-high.png
│ │ ├── fill-pattern-hilbertcurve.png
│ │ ├── fill-pattern-octagramspiral.png
│ │ └── fill-pattern-archimedeanchords.png
│ ├── models
│ │ ├── m3d-pro.stl
│ │ └── micro-3d.stl
│ ├── files
│ │ ├── M3D 2016010812.hex
│ │ ├── M3D 2016040401.hex
│ │ ├── iMe 1900000125.hex
│ │ ├── M3D Mod 2116010812.hex
│ │ ├── M3D Mod 2116040401.hex
│ │ ├── QuickBacklash-v2-X.gcode
│ │ ├── QuickBacklash-v2-Y.gcode
│ │ ├── iMe Debug 1800000125.hex
│ │ └── test border.gcode
│ ├── libraries
│ │ ├── preprocessor_arm7.so
│ │ ├── preprocessor_i386.so
│ │ ├── preprocessor_i386.dll
│ │ ├── preprocessor_x86-64.so
│ │ ├── preprocessor_i386.dylib
│ │ ├── preprocessor_x86-64.dll
│ │ ├── preprocessor_x86-64.dylib
│ │ ├── preprocessor_arm1176jzf-s.so
│ │ └── preprocessor_arm_cortex-a7.so
│ ├── js
│ │ ├── Detector.js
│ │ ├── M3DLoader.js
│ │ ├── STLBinaryExporter.js
│ │ ├── STLLoader.js
│ │ └── AMFLoader.js
│ └── profiles
│ │ ├── Cura
│ │ ├── Micro 3D ABS.ini
│ │ ├── Micro 3D CAM.ini
│ │ ├── Micro 3D FLX.ini
│ │ ├── Micro 3D HIPS.ini
│ │ ├── Micro 3D PLA.ini
│ │ ├── Micro 3D TGH.ini
│ │ └── Micro 3D ABS-R.ini
│ │ └── Slic3r
│ │ ├── Micro 3D ABS.ini
│ │ ├── Micro 3D HIPS.ini
│ │ ├── Micro 3D CAM.ini
│ │ ├── Micro 3D FLX.ini
│ │ ├── Micro 3D PLA.ini
│ │ ├── Micro 3D TGH.ini
│ │ └── Micro 3D ABS-R.ini
├── templates
│ └── m33fio_navbar.jinja2
├── vector.py
├── webcam_server.py
└── gcode.py
├── babel.cfg
├── requirements.txt
├── .editorconfig
├── push.sh
├── shared library source
├── vector.h
├── Makefile
├── gcode.h
├── vector.cpp
├── preprocessor.h
└── eeprom.h
├── setup.py
├── tools
└── comparer.cpp
└── README.md
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include README.md
2 |
--------------------------------------------------------------------------------
/images/cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/cut.png
--------------------------------------------------------------------------------
/images/clone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/clone.png
--------------------------------------------------------------------------------
/images/controls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/controls.png
--------------------------------------------------------------------------------
/images/micro 3d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/micro 3d.png
--------------------------------------------------------------------------------
/images/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/settings.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | *.swp
3 | .idea
4 | *.iml
5 | build
6 | dist
7 | *.egg*
8 | .DS_Store
9 |
--------------------------------------------------------------------------------
/images/model editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/model editor.png
--------------------------------------------------------------------------------
/images/model viewer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/model viewer.png
--------------------------------------------------------------------------------
/images/profile editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/images/profile editor.png
--------------------------------------------------------------------------------
/installers/Linux/install.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Linux/install.zip
--------------------------------------------------------------------------------
/installers/Windows/M3D_v2.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/M3D_v2.cat
--------------------------------------------------------------------------------
/installers/macOS/install.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/macOS/install.zip
--------------------------------------------------------------------------------
/installers/macOS/shortcut.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/macOS/shortcut.zip
--------------------------------------------------------------------------------
/installers/Linux/octoprint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Linux/octoprint.png
--------------------------------------------------------------------------------
/installers/Linux/uninstall.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Linux/uninstall.zip
--------------------------------------------------------------------------------
/installers/Windows/CH341PT.DLL:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/CH341PT.DLL
--------------------------------------------------------------------------------
/installers/Windows/CH341S64.SYS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/CH341S64.SYS
--------------------------------------------------------------------------------
/installers/Windows/CH341S98.SYS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/CH341S98.SYS
--------------------------------------------------------------------------------
/installers/Windows/CH341SER.INF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/CH341SER.INF
--------------------------------------------------------------------------------
/installers/Windows/CH341SER.SYS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/CH341SER.SYS
--------------------------------------------------------------------------------
/installers/Windows/CH341SER.VXD:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/CH341SER.VXD
--------------------------------------------------------------------------------
/installers/Windows/ch341SER.CAT:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/ch341SER.CAT
--------------------------------------------------------------------------------
/installers/Windows/install.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/install.zip
--------------------------------------------------------------------------------
/installers/macOS/uninstall.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/macOS/uninstall.zip
--------------------------------------------------------------------------------
/installers/Windows/octoprint.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/octoprint.ico
--------------------------------------------------------------------------------
/installers/Windows/uninstall.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/Windows/uninstall.zip
--------------------------------------------------------------------------------
/installers/macOS/CH34x_Install.pkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/installers/macOS/CH34x_Install.pkg
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/axes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/axes.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/cube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/cube.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/cut.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/grid.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/logo.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/snap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/snap.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/clone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/clone.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/custom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/custom.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/delete.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/loading.gif
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/merge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/merge.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/reset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/reset.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/rotate.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/scale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/scale.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/sphere.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/sphere.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/apply-cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/apply-cut.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/filament.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/filament.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/hengLiXin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/hengLiXin.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/listener.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/listener.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/shenzhew.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/shenzhew.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/translate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/translate.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/xinyujie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/xinyujie.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/boundaries.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/boundaries.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/measurements.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/measurements.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/models/m3d-pro.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/models/m3d-pro.stl
--------------------------------------------------------------------------------
/octoprint_m33fio/static/models/micro-3d.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/models/micro-3d.stl
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/m3d-pro-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/m3d-pro-black.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-black.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-blue.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-clear.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-green.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-white.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/M3D 2016010812.hex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/M3D 2016010812.hex
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/M3D 2016040401.hex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/M3D 2016040401.hex
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/iMe 1900000125.hex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/iMe 1900000125.hex
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/backlash-layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/backlash-layout.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/backlash-printed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/backlash-printed.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-density-full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-density-full.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-density-high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-density-high.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-density-low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-density-low.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-density-thin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-density-thin.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-line.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-quality-high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-quality-high.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-quality-low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-quality-low.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/graph-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/graph-background.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/import-from-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/import-from-file.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-orange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-orange.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-purple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-purple.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/micro-3d-silver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/micro-3d-silver.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/test-border-good.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/test-border-good.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/test-border-high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/test-border-high.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/test-border-low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/test-border-low.png
--------------------------------------------------------------------------------
/installers/Windows/OctoPrint.url:
--------------------------------------------------------------------------------
1 | [InternetShortcut]
2 | URL=http://localhost:5000
3 | IconFile=%SYSTEMROOT%\System32\octoprint.ico
4 | IconIndex=0
5 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-density-medium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-density-medium.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-density-thick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-density-thick.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-quality-medium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-quality-medium.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/import-from-server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/import-from-server.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/M3D Mod 2116010812.hex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/M3D Mod 2116010812.hex
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/M3D Mod 2116040401.hex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/M3D Mod 2116040401.hex
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/QuickBacklash-v2-X.gcode:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/QuickBacklash-v2-X.gcode
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/QuickBacklash-v2-Y.gcode:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/QuickBacklash-v2-Y.gcode
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/iMe Debug 1800000125.hex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/files/iMe Debug 1800000125.hex
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-honeycomb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-honeycomb.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-quality-extra-low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-quality-extra-low.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-quality-highest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-quality-highest.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_arm7.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_arm7.so
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_i386.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_i386.so
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-density-extra-high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-density-extra-high.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-3dhoneycomb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-3dhoneycomb.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-concentric.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-concentric.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-rectilinear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-rectilinear.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-quality-extra-high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-quality-extra-high.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_i386.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_i386.dll
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_x86-64.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_x86-64.so
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-hilbertcurve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-hilbertcurve.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-octagramspiral.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-octagramspiral.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_i386.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_i386.dylib
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_x86-64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_x86-64.dll
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_x86-64.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_x86-64.dylib
--------------------------------------------------------------------------------
/installers/Linux/OctoPrint.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Encoding=UTF-8
3 | Name=OctoPrint
4 | Type=Link
5 | URL=http://localhost:5000
6 | Icon=/usr/share/icons/octoprint.png
7 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/img/fill-pattern-archimedeanchords.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/img/fill-pattern-archimedeanchords.png
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_arm1176jzf-s.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_arm1176jzf-s.so
--------------------------------------------------------------------------------
/octoprint_m33fio/static/libraries/preprocessor_arm_cortex-a7.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donovan6000/M33-Fio/HEAD/octoprint_m33fio/static/libraries/preprocessor_arm_cortex-a7.so
--------------------------------------------------------------------------------
/babel.cfg:
--------------------------------------------------------------------------------
1 | [python: */**.py]
2 | [jinja2: */**.jinja2]
3 | extensions=jinja2.ext.autoescape, jinja2.ext.with_
4 |
5 | [javascript: */**.js]
6 | extract_messages = gettext, ngettext
7 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | ###
2 | # This file is only here to make sure that something like
3 | #
4 | # pip install -e .
5 | #
6 | # works as expected. Requirements can be found in setup.py.
7 | ###
8 |
9 | .
10 |
--------------------------------------------------------------------------------
/installers/Linux/rc-local.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=/etc/rc.local Compatibility
3 | ConditionPathExists=/etc/rc.local
4 |
5 | [Service]
6 | Type=forking
7 | ExecStart=/etc/rc.local start
8 | TimeoutSec=0
9 | StandardOutput=tty
10 | RemainAfterExit=yes
11 | SysVStartPriority=99
12 |
13 | [Install]
14 | WantedBy=multi-user.target
15 |
--------------------------------------------------------------------------------
/installers/Linux/90-micro-3d-local.rules:
--------------------------------------------------------------------------------
1 | # Run the following commands to install this rule
2 | # sudo cp ./90-micro-3d-local.rules /etc/udev/rules.d/
3 | # sudo udevadm control --reload-rules
4 | # sudo udevadm trigger
5 |
6 | ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2404", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
7 |
--------------------------------------------------------------------------------
/installers/Linux/92-m3d-pro-local.rules:
--------------------------------------------------------------------------------
1 | # Run the following commands to install this rule
2 | # sudo cp ./92-m3d-pro-local.rules /etc/udev/rules.d/
3 | # sudo udevadm control --reload-rules
4 | # sudo udevadm trigger
5 |
6 | ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a21e", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
7 |
--------------------------------------------------------------------------------
/installers/Linux/93-micro+-local.rules:
--------------------------------------------------------------------------------
1 | # Run the following commands to install this rule
2 | # sudo cp ./93-micro+-local.rules /etc/udev/rules.d/
3 | # sudo udevadm control --reload-rules
4 | # sudo udevadm trigger
5 |
6 | ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a21f", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
7 |
--------------------------------------------------------------------------------
/installers/Linux/91-micro-3d-heatbed-local.rules:
--------------------------------------------------------------------------------
1 | # Run the following commands to install this rule
2 | # sudo cp ./91-micro-3d-heatbed-local.rules /etc/udev/rules.d/
3 | # sudo udevadm control --reload-rules
4 | # sudo udevadm trigger
5 |
6 | ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
7 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # This file is for unifying the coding style for different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | end_of_line = lf
8 | charset = utf-8
9 | insert_final_newline = false
10 | trim_trailing_whitespace = true
11 |
12 | [**.py]
13 | indent_style = tab
14 |
15 | [**.js]
16 | indent_style = tab
17 |
18 | [**.h]
19 | indent_style = tab
20 |
21 | [**.cpp]
22 | indent_style = tab
23 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/files/test border.gcode:
--------------------------------------------------------------------------------
1 | G90
2 | G0 X1 Y9.5 Z0.15 F900
3 | G0 Z0.4 E6
4 | G4 S10
5 | G0 E17.3
6 | G0 X102.9 Y9.5 Z0.4 E42.73402
7 | G4 S10
8 | G0 E43.03402
9 | G0 X102.9 Y99 Z0.4 E75.03445
10 | G4 S10
11 | G0 E75.33446
12 | G0 X1 Y99 Z0.4 E111.7685
13 | G4 S10
14 | G0 E112.0685
15 | G0 X1 Y9.5 Z0.4 E144.0689
16 | G4 S10
17 | G0 E144.3689
18 | G0 X-0.5 Y8 Z0.4 E145.8858
19 | G0 X-2 Y6.5 Z2.4 E151.1951
20 | G0 E148.1951
21 |
--------------------------------------------------------------------------------
/installers/macOS/com.octoprint.app.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Label
6 | com.octoprint.app
7 | ProgramArguments
8 |
9 | path to octoprint
10 | serve
11 |
12 | RunAtLoad
13 |
14 | KeepAlive
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/push.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Check if parameters aren't provided
4 | if [ "$#" -ne 3 ] ; then
5 |
6 | # Display error and exit
7 | echo "Provide type, version, and comment parameters, like release 0.1 \"test\""
8 | exit
9 | fi
10 |
11 | # Check if releasing a new version
12 | if [ $1 = "release" ]; then
13 |
14 | # Change version string to version
15 | sed -i "s/.*plugin_version = .*/plugin_version = \"$2\"/" setup.py
16 |
17 | # Otherwise
18 | else
19 |
20 | # Change version string to date
21 | sed -i "s/.*plugin_version = .*/plugin_version = \"$2.`date +%Y%m%d%H`\"/" setup.py
22 | fi
23 |
24 | # Remove backup and python byte code files
25 | find ./ -name '*~' -print0 | xargs -0 rm
26 | find ./ -name '*.pyc' -print0 | xargs -0 rm
27 |
28 | # Update bundled translations
29 | #python setup.py babel_refresh
30 | #pybabel compile -d translations
31 | #python setup.py babel_bundle --locale=
32 | #find "octoprint_m33fio/translations" -maxdepth 1 -type f -delete
33 |
34 | # Push changes
35 | git add .
36 | git commit -m "$3"
37 | git push origin devel
38 |
--------------------------------------------------------------------------------
/octoprint_m33fio/templates/m33fio_navbar.jinja2:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/shared library source/vector.h:
--------------------------------------------------------------------------------
1 | // Header guard
2 | #ifndef VECTOR_H
3 | #define VECTOR_H
4 |
5 |
6 | // Vector class
7 | class Vector {
8 |
9 | // Public
10 | public:
11 |
12 | /*
13 | Name: Constructor
14 | Purpose: Allows setting vector components upon creation
15 | */
16 | Vector(double x = 0, double y = 0, double z = 0, double e = 0);
17 |
18 | /*
19 | Name: Copy Constructor
20 | Purpose: Initializes a copy of a vector
21 | */
22 | Vector(Vector &value);
23 |
24 | /*
25 | Name: Get Length
26 | Purpose: Returns length of vector
27 | */
28 | double getLength() const;
29 |
30 | /*
31 | Name: Normalize
32 | Purpose: Normalizes vector components
33 | */
34 | void normalize();
35 |
36 | /*
37 | Name: Addition operator
38 | Purpose: Allows adding vectors
39 | */
40 | Vector operator+(const Vector &addend) const;
41 | Vector &operator+=(const Vector &addend);
42 |
43 | /*
44 | Name: Subtraction operator
45 | Purpose: Allows subtracting vectors
46 | */
47 | Vector operator-(const Vector &subtrahend) const;
48 | Vector &operator-=(const Vector &subtrahend);
49 |
50 | /*
51 | Name: Multiplication operator
52 | Purpose: Allows scaling a vector
53 | */
54 | Vector operator*(double multiplier) const;
55 | Vector &operator*=(double multiplier);
56 |
57 | /*
58 | Name: Division operator
59 | Purpose: Allows shrinking a vector
60 | */
61 | Vector operator/(double divisor) const;
62 | Vector &operator/=(double divisor);
63 |
64 | /*
65 | Name: Subscript operator
66 | Purpose: Allows addressing vector components
67 | */
68 | const double& operator[](int index) const;
69 | double& operator[](int index);
70 |
71 | /*
72 | Name: Assignment operator
73 | Purpose: Allows copying a vector
74 | */
75 | Vector &operator=(const Vector &vector);
76 |
77 | // Vector components
78 | double x;
79 | double y;
80 | double z;
81 | double e;
82 | };
83 |
84 |
85 | #endif
86 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/js/Detector.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author alteredq / http://alteredqualia.com/
3 | * @author mr.doob / http://mrdoob.com/
4 | */
5 |
6 | var Detector = {
7 |
8 | canvas: !! window.CanvasRenderingContext2D,
9 | webgl: ( function () {
10 |
11 | try {
12 |
13 | var canvas = document.createElement( 'canvas' ); return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) );
14 |
15 | } catch ( e ) {
16 |
17 | return false;
18 |
19 | }
20 |
21 | } )(),
22 | workers: !! window.Worker,
23 | fileapi: window.File && window.FileReader && window.FileList && window.Blob,
24 |
25 | getWebGLErrorMessage: function () {
26 |
27 | var element = document.createElement( 'div' );
28 | element.id = 'webgl-error-message';
29 | element.style.fontFamily = 'monospace';
30 | element.style.fontSize = '13px';
31 | element.style.fontWeight = 'normal';
32 | element.style.textAlign = 'center';
33 | element.style.background = '#fff';
34 | element.style.color = '#000';
35 | element.style.padding = '1.5em';
36 | element.style.width = '400px';
37 | element.style.margin = '5em auto 0';
38 |
39 | if ( ! this.webgl ) {
40 |
41 | element.innerHTML = window.WebGLRenderingContext ? [
42 | 'Your graphics card does not seem to support WebGL.
',
43 | 'Find out how to get it here.'
44 | ].join( '\n' ) : [
45 | 'Your browser does not seem to support WebGL.
',
46 | 'Find out how to get it here.'
47 | ].join( '\n' );
48 |
49 | }
50 |
51 | return element;
52 |
53 | },
54 |
55 | addGetWebGLMessage: function ( parameters ) {
56 |
57 | var parent, id, element;
58 |
59 | parameters = parameters || {};
60 |
61 | parent = parameters.parent !== undefined ? parameters.parent : document.body;
62 | id = parameters.id !== undefined ? parameters.id : 'oldie';
63 |
64 | element = Detector.getWebGLErrorMessage();
65 | element.id = id;
66 |
67 | parent.appendChild( element );
68 |
69 | }
70 |
71 | };
72 |
73 | // browserify support
74 | if ( typeof module === 'object' ) {
75 |
76 | module.exports = Detector;
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/octoprint_m33fio/vector.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | from __future__ import absolute_import
3 |
4 |
5 | # Imports
6 | import math
7 |
8 |
9 | # Vector class
10 | class Vector(object) :
11 |
12 | # Constructor
13 | def __init__(self, x = 0, y = 0, z = 0, e = 0) :
14 |
15 | # Initialize data members
16 | self.x = x
17 | self.y = y
18 | self.z = z
19 | self.e = e
20 |
21 | # Get length
22 | def getLength(self) :
23 |
24 | # Return length
25 | return math.sqrt(self.x * self.x + self.y * self.y + self.z * self.z + self.e * self.e)
26 |
27 | # Normalize
28 | def normalize(self) :
29 |
30 | # Get length
31 | length = self.getLength()
32 |
33 | # Normalize components
34 | self.x /= length
35 | self.y /= length
36 | self.z /= length
37 | self.e /= length
38 |
39 | # Addition operator
40 | def __add__(self, other) :
41 |
42 | # Add components
43 | x = self.x + other.x
44 | y = self.y + other.y
45 | z = self.z + other.z
46 | e = self.e + other.e
47 |
48 | # Return vector
49 | return Vector(x, y, z, e)
50 |
51 | # Subtraction operator
52 | def __sub__(self, other) :
53 |
54 | # Subtract components
55 | x = self.x - other.x
56 | y = self.y - other.y
57 | z = self.z - other.z
58 | e = self.e - other.e
59 |
60 | # Return vector
61 | return Vector(x, y, z, e)
62 |
63 | # Multiplication operator
64 | def __mul__(self, other) :
65 |
66 | # Multiply components
67 | x = self.x * other
68 | y = self.y * other
69 | z = self.z * other
70 | e = self.e * other
71 |
72 | # Return vector
73 | return Vector(x, y, z, e)
74 |
75 | # Division operator
76 | def __div__(self, other) :
77 |
78 | # Divide components
79 | x = self.x / float(other)
80 | y = self.y / float(other)
81 | z = self.z / float(other)
82 | e = self.e / float(other)
83 |
84 | # Return vector
85 | return Vector(x, y, z, e)
86 |
87 | # Get item operator
88 | def __getitem__(self, key) :
89 |
90 | # Return component
91 | return {
92 | 0: self.x,
93 | 1: self.y,
94 | 2: self.z,
95 | 3: self.e,
96 | }[key]
97 |
98 | # Set item operator
99 | def __setitem__(self, key, value) :
100 |
101 | # Set component
102 | if key == 0 :
103 | self.x = value
104 | elif key == 1 :
105 | self.y = value
106 | elif key == 2 :
107 | self.z = value
108 | elif key == 3 :
109 | self.e = value
110 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/js/M3DLoader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author donovan6000 / http://exploitkings.com
3 | */
4 |
5 |
6 | THREE.M3DLoader = function ( manager ) {
7 |
8 | this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
9 |
10 | };
11 |
12 | THREE.M3DLoader.prototype = {
13 |
14 | constructor: THREE.M3DLoader,
15 |
16 | load: function ( url, onLoad, onProgress, onError ) {
17 |
18 | var scope = this;
19 |
20 | var loader = new THREE.FileLoader( scope.manager );
21 | loader.setResponseType( 'arraybuffer' );
22 | loader.load( url, function ( text ) {
23 |
24 | onLoad( scope.parse( text ) );
25 |
26 | }, onProgress, onError );
27 |
28 | },
29 |
30 | parse: function ( data ) {
31 |
32 | var reader = new DataView( data );
33 |
34 | var numberOfVertices = reader.getUint32( 0, true );
35 | var offset = 4;
36 |
37 | var vertices = [];
38 | for ( var i = 0; i < numberOfVertices; i++, offset += 12 ) {
39 |
40 | vertices.push( new THREE.Vector3( reader.getFloat32( offset, true ), reader.getFloat32( offset + 4, true ), reader.getFloat32( offset + 8, true ) ) );
41 |
42 | }
43 |
44 | var numberOfNormals = reader.getUint32( offset, true );
45 | offset += 4;
46 |
47 | var normals = [];
48 | for ( var i = 0; i < numberOfNormals; i++, offset += 12 ) {
49 |
50 | normals.push( new THREE.Vector3( reader.getFloat32( offset, true ), reader.getFloat32( offset + 4, true ), reader.getFloat32( offset + 8, true ) ) );
51 |
52 | }
53 |
54 | var numberOfFaces = reader.getUint32( offset, true );
55 | offset += 4;
56 |
57 | var geometryVertices = [];
58 | var geometryNormals = [];
59 | for ( var i = 0; i < numberOfFaces; i++ ) {
60 |
61 | for ( var j = 0; j < 3; j++, offset += 4 ) {
62 |
63 | var vertex = vertices[ reader.getUint32( offset, true ) ];
64 |
65 | geometryVertices.push( vertex.x, vertex.y, vertex.z );
66 | }
67 |
68 | var vertexNormals = [];
69 | for ( var j = 0; j < 3; j++, offset += 4 ) {
70 |
71 | var normal = normals[ reader.getUint32( offset, true ) ];
72 |
73 | geometryNormals.push( normal.x, normal.y, normal.z );
74 | }
75 | }
76 |
77 | var geometry = new THREE.BufferGeometry();
78 | geometry.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( geometryVertices ), 3 ) );
79 | geometry.addAttribute( 'normal', new THREE.BufferAttribute( new Float32Array( geometryNormals ), 3 ) );
80 |
81 | return geometry;
82 |
83 | }
84 |
85 | };
86 |
--------------------------------------------------------------------------------
/shared library source/Makefile:
--------------------------------------------------------------------------------
1 | # Target platform options: LINUX32, LINUX64, WINDOWS32, WINDOWS64, PI, PI2, ARM7, MACOS32, MACOS64
2 | LIBRARY_NAME = preprocessor
3 | TARGET_PLATFORM = LINUX64
4 | VER = .1
5 |
6 | ifeq ($(TARGET_PLATFORM), LINUX32)
7 | PROG = $(LIBRARY_NAME)_i386.so
8 | CC = g++
9 | CFLAGS = -fPIC -m32 -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
10 | endif
11 |
12 | ifeq ($(TARGET_PLATFORM), LINUX64)
13 | PROG = $(LIBRARY_NAME)_x86-64.so
14 | CC = g++
15 | CFLAGS = -fPIC -m64 -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
16 | endif
17 |
18 | ifeq ($(TARGET_PLATFORM), WINDOWS32)
19 | PROG = $(LIBRARY_NAME)_i386.dll
20 | CC = i686-w64-mingw32-g++
21 | CFLAGS = -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
22 | endif
23 |
24 | ifeq ($(TARGET_PLATFORM), WINDOWS64)
25 | PROG = $(LIBRARY_NAME)_x86-64.dll
26 | CC = x86_64-w64-mingw32-g++
27 | CFLAGS = -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
28 | endif
29 |
30 | ifeq ($(TARGET_PLATFORM), PI)
31 | PROG = $(LIBRARY_NAME)_arm1176jzf-s.so
32 | CC = /opt/arm-toolchain/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
33 | CFLAGS = -fPIC -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
34 | endif
35 |
36 | ifeq ($(TARGET_PLATFORM), PI2)
37 | PROG = $(LIBRARY_NAME)_arm_cortex-a7.so
38 | CC = /opt/arm-toolchain/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
39 | CFLAGS = -fPIC -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
40 | endif
41 |
42 | ifeq ($(TARGET_PLATFORM), ARM7)
43 | PROG = $(LIBRARY_NAME)_arm7.so
44 | CC = /opt/arm-toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++
45 | CFLAGS = -fPIC -mcpu=generic-armv7-a -mfpu=vfp -mfloat-abi=hard -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
46 | endif
47 |
48 | ifeq ($(TARGET_PLATFORM), MACOS32)
49 | PROG = $(LIBRARY_NAME)_i386.dylib
50 | CC = clang++
51 | CFLAGS = -fPIC -m32 -stdlib=libc++ -O3 -Wl,-install_name,$(PROG)$(VER)
52 |
53 | endif
54 |
55 | ifeq ($(TARGET_PLATFORM), MACOS64)
56 | PROG = $(LIBRARY_NAME)_x86-64.dylib
57 | CC = clang++
58 | CFLAGS = -fPIC -m64 -stdlib=libc++ -O3 -Wl,-install_name,$(PROG)$(VER)
59 | endif
60 |
61 | SRCS = preprocessor.cpp gcode.cpp vector.cpp
62 | CFLAGS += -Wall -std=c++11 -fvisibility=hidden -shared
63 |
64 | all:
65 | $(CC) $(CFLAGS) -o ../octoprint_m33fio/static/libraries/$(PROG) $(SRCS)
66 |
67 | clean:
68 | rm -f ../octoprint_m33fio/static/libraries/$(PROG)
69 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/js/STLBinaryExporter.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author kovacsv / http://kovacsv.hu/
3 | * @author mrdoob / http://mrdoob.com/
4 | * @author mudcube / http://mudcu.be/
5 | */
6 |
7 | THREE.STLBinaryExporter = function () {};
8 |
9 | THREE.STLBinaryExporter.prototype = {
10 |
11 | constructor: THREE.STLBinaryExporter,
12 |
13 | parse: ( function () {
14 |
15 | var vector = new THREE.Vector3();
16 | var normalMatrixWorld = new THREE.Matrix3();
17 |
18 | return function parse( scene ) {
19 |
20 | // We collect objects first, as we may need to convert from BufferGeometry to Geometry
21 | var objects = [];
22 | var triangles = 0;
23 | scene.traverse( function ( object ) {
24 |
25 | if ( ! ( object instanceof THREE.Mesh ) ) return;
26 |
27 | var geometry = object.geometry;
28 | if ( geometry instanceof THREE.BufferGeometry ) {
29 |
30 | geometry = new THREE.Geometry().fromBufferGeometry( geometry );
31 |
32 | }
33 |
34 | if ( ! ( geometry instanceof THREE.Geometry ) ) return;
35 | triangles += geometry.faces.length;
36 |
37 | objects.push( {
38 |
39 | geometry: geometry,
40 | matrix: object.matrixWorld
41 |
42 | } );
43 |
44 | } );
45 |
46 | var offset = 80; // skip header
47 | var bufferLength = triangles * 2 + triangles * 3 * 4 * 4 + 80 + 4;
48 | var arrayBuffer = new ArrayBuffer( bufferLength );
49 | var output = new DataView( arrayBuffer );
50 | output.setUint32( offset, triangles, true ); offset += 4;
51 |
52 | // Traversing our collected objects
53 | objects.forEach( function ( object ) {
54 |
55 | var vertices = object.geometry.vertices;
56 | var faces = object.geometry.faces;
57 |
58 | normalMatrixWorld.getNormalMatrix( object.matrix );
59 |
60 | for ( var i = 0, l = faces.length; i < l; i ++ ) {
61 |
62 | var face = faces[ i ];
63 |
64 | vector.copy( face.normal ).applyMatrix3( normalMatrixWorld ).normalize();
65 |
66 | output.setFloat32( offset, vector.x, true ); offset += 4; // normal
67 | output.setFloat32( offset, vector.y, true ); offset += 4;
68 | output.setFloat32( offset, vector.z, true ); offset += 4;
69 |
70 | var indices = [ face.a, face.b, face.c ];
71 |
72 | for ( var j = 0; j < 3; j ++ ) {
73 |
74 | vector.copy( vertices[ indices[ j ] ] ).applyMatrix4( object.matrix );
75 |
76 | output.setFloat32( offset, vector.x, true ); offset += 4; // vertices
77 | output.setFloat32( offset, vector.y, true ); offset += 4;
78 | output.setFloat32( offset, vector.z, true ); offset += 4;
79 |
80 | }
81 |
82 | output.setUint16( offset, 0, true ); offset += 2; // attribute byte count
83 |
84 | }
85 |
86 | } );
87 |
88 | return output;
89 |
90 | };
91 |
92 | }() )
93 |
94 | };
95 |
--------------------------------------------------------------------------------
/installers/macOS/command line tools installer.bash:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Installing the Xcode command line tools on 10.7.x or higher
4 | # Created by rtrouton, modified by donovan6000
5 |
6 | osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}')
7 | cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
8 |
9 | # Installing the latest Xcode command line tools on 10.9.x or higher
10 |
11 | if [[ "$osx_vers" -ge 9 ]]; then
12 |
13 | # Create the placeholder file which is checked by the softwareupdate tool
14 | # before allowing the installation of the Xcode command line tools.
15 |
16 | touch "$cmd_line_tools_temp_file"
17 |
18 | # Find the last listed update in the Software Update feed with "Command Line Tools" in the name
19 |
20 | cmd_line_tools=$(softwareupdate -l | awk '/\*\ Command Line Tools/ { $1=$1;print }' | tail -1 | sed 's/^[[ \t]]*//;s/[[ \t]]*$//;s/*//' | cut -c 2-)
21 |
22 | # Install the command line tools
23 |
24 | softwareupdate -i "$cmd_line_tools"
25 | if [ 0 -ne $? ]; then
26 | if [[ -f "$cmd_line_tools_temp_file" ]]; then
27 | rm "$cmd_line_tools_temp_file"
28 | fi
29 | exit 1
30 | fi
31 |
32 | # Remove the temp file
33 |
34 | if [[ -f "$cmd_line_tools_temp_file" ]]; then
35 | rm "$cmd_line_tools_temp_file"
36 | fi
37 | fi
38 |
39 | # Installing the latest Xcode command line tools on 10.7.x and 10.8.x
40 |
41 | # on 10.7/10.8, instead of using the software update feed, the command line tools are downloaded
42 | # instead from public download URLs, which can be found in the dvtdownloadableindex:
43 | # https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex
44 |
45 | if [[ "$osx_vers" -eq 7 ]] || [[ "$osx_vers" -eq 8 ]]; then
46 |
47 | if [[ "$osx_vers" -eq 7 ]]; then
48 | DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg
49 | fi
50 |
51 | if [[ "$osx_vers" -eq 8 ]]; then
52 | DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_osx_mountain_lion_april_2014.dmg
53 | fi
54 |
55 | TOOLS=cltools.dmg
56 | curl "$DMGURL" -f -o "$TOOLS"
57 | if [ 0 -ne $? ]; then
58 | exit 1
59 | fi
60 | TMPMOUNT=`/usr/bin/mktemp -d /tmp/clitools.XXXX`
61 | hdiutil attach "$TOOLS" -mountpoint "$TMPMOUNT" -nobrowse
62 | # The "-allowUntrusted" flag has been added to the installer
63 | # command to accomodate for now-expired certificates used
64 | # to sign the downloaded command line tools.
65 | installer -allowUntrusted -pkg "$(find $TMPMOUNT -name '*.mpkg')" -target /
66 | if [ 0 -ne $? ]; then
67 | hdiutil detach "$TMPMOUNT"
68 | rm -rf "$TMPMOUNT"
69 | rm "$TOOLS"
70 | exit 1
71 | fi
72 | hdiutil detach "$TMPMOUNT"
73 | rm -rf "$TMPMOUNT"
74 | rm "$TOOLS"
75 | fi
76 |
77 | exit 0
78 |
--------------------------------------------------------------------------------
/installers/macOS/uninstall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Request elevated privileges
4 | [ "$(whoami)" != "root" ] && exec sudo "$0" "$@"
5 |
6 | # Check if not run as root
7 | if [ "$(id -u)" != "0" ]; then
8 |
9 | # Display message
10 | echo
11 | echo 'Root privileges required.'
12 | echo
13 |
14 | # Otherwise
15 | else
16 |
17 | # Stop OctoPrint
18 | sudo -u $SUDO_USER launchctl unload /Library/LaunchAgents/com.octoprint.app.plist
19 |
20 | # Uninstall M33 Fio
21 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall OctoPrint-M3DFio
22 | do
23 | :
24 | done
25 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall OctoPrint-M33Fio
26 | do
27 | :
28 | done
29 |
30 | # Uninstall OctoPrint
31 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall OctoPrint
32 | do
33 | :
34 | done
35 | rm -rf '/Users/'"$SUDO_USER"'/Library/Application Support/OctoPrint'
36 |
37 | # Uninstall PyObjC QTKit framework
38 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall pyobjc-framework-QTKit
39 | do
40 | :
41 | done
42 |
43 | # Uninstall PyObjC Quartz framework
44 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall pyobjc-framework-Quartz
45 | do
46 | :
47 | done
48 |
49 | # Uninstall PyObjC Cocoa framework
50 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall pyobjc-framework-Cocoa
51 | do
52 | :
53 | done
54 |
55 | # Uninstall PyObjC core
56 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall pyobjc-core
57 | do
58 | :
59 | done
60 |
61 | # TODO Uninstall command line tools
62 |
63 | # Uninstall Python
64 | rm -rf /Library/Frameworks/Python.framework/Versions/2.7
65 | rm -rf '/Applications/Python 2.7'
66 | cd /usr/local/bin/
67 | ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7/' | awk '{print $9}' | tr -d @ | xargs rm
68 | pkgutil --forget org.python.Python.PythonApplications-2.7
69 | pkgutil --forget org.python.Python.PythonDocumentation-2.7
70 | pkgutil --forget org.python.Python.PythonFramework-2.7
71 | pkgutil --forget org.python.Python.PythonUnixTools-2.7
72 |
73 | # Uninstall heatbed drivers
74 | kextunload /Library/Extensions/usbserial.kext
75 | rm -rf /Library/Extensions/usbserial.kext
76 | pkgutil --forget com.wch.usbserial.pkg
77 |
78 | # Remove OctoPrint from startup programs
79 | rm '/Library/LaunchAgents/com.octoprint.app.plist'
80 |
81 | # Remove URL link on desktop
82 | rm '/Users/'"$SUDO_USER"'/Desktop/OctoPrint.webloc'
83 |
84 | # Display message
85 | echo
86 | echo 'OctoPrint and M33 Fio have been successfully uninstalled'
87 | echo
88 | fi
89 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Cura/Micro 3D ABS.ini:
--------------------------------------------------------------------------------
1 | [profile]
2 | layer_height = 0.25
3 | bottom_thickness = 0.3
4 | filament_diameter = 1.75
5 | filament_diameter2 = 0
6 | filament_diameter3 = 0
7 | filament_diameter4 = 0
8 | filament_diameter5 = 0
9 | filament_flow = 100
10 | solid_bottom = True
11 | solid_top = True
12 | skirt_gap = 2.0
13 | skirt_line_count = 0
14 | skirt_minimal_length = 0.0
15 | print_speed = 20
16 | travel_speed = 20
17 | fill_overlap = 15
18 | support_type = Lines
19 | support_angle = 50
20 | support_fill_rate = 20.0
21 | support_xy_distance = 0.7
22 | support_z_distance = 0.15
23 | support_dual_extrusion = Both
24 | retraction_enable = True
25 | retraction_amount = 2.4
26 | retraction_speed = 25
27 | retraction_dual_amount = 14.5
28 | retraction_min_travel = 1.5
29 | retraction_minimal_extrusion = 0.1
30 | retraction_hop = 0.1
31 | retraction_combing = All
32 | ooze_shield = False
33 | overlap_dual = 0.0
34 | object_sink = 0
35 | raft_margin = 2.0
36 | raft_line_spacing = 4.0
37 | raft_base_thickness = 0.4
38 | raft_base_linewidth = 2.5
39 | raft_interface_thickness = 0.4
40 | raft_interface_linewidth = 2.0
41 | raft_airgap_all = 0.001
42 | raft_surface_thickness = 0.2
43 | raft_surface_linewidth = 0.25
44 | raft_surface_layers = 2
45 | platform_adhesion = Raft
46 | cool_min_layer_time = 0
47 | cool_min_feedrate = 12
48 | cool_head_lift = True
49 | fan_speed = 0
50 | fan_speed_max = 1
51 | fix_horrible_union_all_type_a = False
52 | fix_horrible_union_all_type_b = False
53 | fix_horrible_extensive_stitching = False
54 | fix_horrible_use_open_bits = False
55 | spiralize = False
56 | simple_mode = False
57 | raft_airgap = 0.499
58 | bottom_layer_speed = 10
59 | fan_enabled = True
60 | fan_full_height = 0.551
61 | wipe_tower_volume = 0.0
62 | support = Everywhere
63 | infill_speed = 0
64 | fill_density = 8.75
65 | inset0_speed = 16
66 | insetx_speed = 17
67 | layer0_width_factor = 100.0
68 | wall_thickness = 1.4
69 | solid_layer_thickness = 2.0
70 | print_bed_temperature = 80
71 | print_temperature = 275
72 | print_temperature2 = 0
73 | print_temperature3 = 0
74 | print_temperature4 = 0
75 | print_temperature5 = 0
76 | wipe_tower = False
77 | nozzle_size = 0.35
78 | brim_line_count = 20
79 | solidarea_speed = 0.0
80 | perimeter_before_infill = False
81 | plugin_config =
82 | object_center_x = -1
83 | object_center_y = -1
84 |
85 | [alterations]
86 | start.gcode = ; Sliced at: {day} {date} {time}
87 | ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
88 | start2.gcode =
89 | start3.gcode =
90 | start4.gcode =
91 | end.gcode =
92 | end2.gcode =
93 | end3.gcode =
94 | end4.gcode =
95 | support_start.gcode =
96 | support_end.gcode =
97 | cool_start.gcode =
98 | cool_end.gcode =
99 | replace.csv =
100 | preswitchextruder.gcode =
101 | postswitchextruder.gcode =
102 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Cura/Micro 3D CAM.ini:
--------------------------------------------------------------------------------
1 | [profile]
2 | layer_height = 0.25
3 | bottom_thickness = 0.3
4 | filament_diameter = 1.75
5 | filament_diameter2 = 0
6 | filament_diameter3 = 0
7 | filament_diameter4 = 0
8 | filament_diameter5 = 0
9 | filament_flow = 100
10 | solid_bottom = True
11 | solid_top = True
12 | skirt_gap = 2.0
13 | skirt_line_count = 0
14 | skirt_minimal_length = 0.0
15 | print_speed = 16
16 | travel_speed = 20
17 | fill_overlap = 15
18 | support_type = Lines
19 | support_angle = 50
20 | support_fill_rate = 20.0
21 | support_xy_distance = 0.7
22 | support_z_distance = 0.15
23 | support_dual_extrusion = Both
24 | retraction_enable = True
25 | retraction_amount = 2.4
26 | retraction_speed = 20
27 | retraction_dual_amount = 14.5
28 | retraction_min_travel = 1.5
29 | retraction_minimal_extrusion = 0.1
30 | retraction_hop = 0.1
31 | retraction_combing = All
32 | ooze_shield = False
33 | overlap_dual = 0.0
34 | object_sink = 0
35 | raft_margin = 2.0
36 | raft_line_spacing = 4.0
37 | raft_base_thickness = 0.4
38 | raft_base_linewidth = 2.5
39 | raft_interface_thickness = 0.4
40 | raft_interface_linewidth = 2.0
41 | raft_airgap_all = 0.001
42 | raft_surface_thickness = 0.2
43 | raft_surface_linewidth = 0.25
44 | raft_surface_layers = 2
45 | platform_adhesion = Raft
46 | cool_min_layer_time = 0
47 | cool_min_feedrate = 12
48 | cool_head_lift = True
49 | fan_speed = 100
50 | fan_speed_max = 255
51 | fix_horrible_union_all_type_a = False
52 | fix_horrible_union_all_type_b = False
53 | fix_horrible_extensive_stitching = False
54 | fix_horrible_use_open_bits = False
55 | spiralize = False
56 | simple_mode = False
57 | raft_airgap = 0.499
58 | bottom_layer_speed = 8
59 | fan_enabled = True
60 | fan_full_height = 0.551
61 | wipe_tower_volume = 0.0
62 | support = Everywhere
63 | infill_speed = 0
64 | fill_density = 8.75
65 | inset0_speed = 12
66 | insetx_speed = 14
67 | layer0_width_factor = 100.0
68 | wall_thickness = 1.4
69 | solid_layer_thickness = 2.0
70 | print_bed_temperature = 60
71 | print_temperature = 215
72 | print_temperature2 = 0
73 | print_temperature3 = 0
74 | print_temperature4 = 0
75 | print_temperature5 = 0
76 | wipe_tower = False
77 | nozzle_size = 0.35
78 | brim_line_count = 20
79 | solidarea_speed = 0.0
80 | perimeter_before_infill = False
81 | plugin_config =
82 | object_center_x = -1
83 | object_center_y = -1
84 |
85 | [alterations]
86 | start.gcode = ; Sliced at: {day} {date} {time}
87 | ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
88 | start2.gcode =
89 | start3.gcode =
90 | start4.gcode =
91 | end.gcode =
92 | end2.gcode =
93 | end3.gcode =
94 | end4.gcode =
95 | support_start.gcode =
96 | support_end.gcode =
97 | cool_start.gcode =
98 | cool_end.gcode =
99 | replace.csv =
100 | preswitchextruder.gcode =
101 | postswitchextruder.gcode =
102 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Cura/Micro 3D FLX.ini:
--------------------------------------------------------------------------------
1 | [profile]
2 | layer_height = 0.25
3 | bottom_thickness = 0.3
4 | filament_diameter = 1.75
5 | filament_diameter2 = 0
6 | filament_diameter3 = 0
7 | filament_diameter4 = 0
8 | filament_diameter5 = 0
9 | filament_flow = 100
10 | solid_bottom = True
11 | solid_top = True
12 | skirt_gap = 2.0
13 | skirt_line_count = 0
14 | skirt_minimal_length = 0.0
15 | print_speed = 16
16 | travel_speed = 20
17 | fill_overlap = 15
18 | support_type = Lines
19 | support_angle = 50
20 | support_fill_rate = 20.0
21 | support_xy_distance = 0.7
22 | support_z_distance = 0.15
23 | support_dual_extrusion = Both
24 | retraction_enable = True
25 | retraction_amount = 2.4
26 | retraction_speed = 20
27 | retraction_dual_amount = 14.5
28 | retraction_min_travel = 1.5
29 | retraction_minimal_extrusion = 0.1
30 | retraction_hop = 0.1
31 | retraction_combing = All
32 | ooze_shield = False
33 | overlap_dual = 0.0
34 | object_sink = 0
35 | raft_margin = 2.0
36 | raft_line_spacing = 4.0
37 | raft_base_thickness = 0.4
38 | raft_base_linewidth = 2.5
39 | raft_interface_thickness = 0.4
40 | raft_interface_linewidth = 2.0
41 | raft_airgap_all = 0.001
42 | raft_surface_thickness = 0.2
43 | raft_surface_linewidth = 0.25
44 | raft_surface_layers = 2
45 | platform_adhesion = Raft
46 | cool_min_layer_time = 0
47 | cool_min_feedrate = 12
48 | cool_head_lift = True
49 | fan_speed = 255
50 | fan_speed_max = 255
51 | fix_horrible_union_all_type_a = False
52 | fix_horrible_union_all_type_b = False
53 | fix_horrible_extensive_stitching = False
54 | fix_horrible_use_open_bits = False
55 | spiralize = False
56 | simple_mode = False
57 | raft_airgap = 0.499
58 | bottom_layer_speed = 8
59 | fan_enabled = True
60 | fan_full_height = 0.301
61 | wipe_tower_volume = 0.0
62 | support = Everywhere
63 | infill_speed = 0
64 | fill_density = 8.75
65 | inset0_speed = 12
66 | insetx_speed = 14
67 | layer0_width_factor = 100.0
68 | wall_thickness = 1.4
69 | solid_layer_thickness = 2.0
70 | print_bed_temperature = 60
71 | print_temperature = 220
72 | print_temperature2 = 0
73 | print_temperature3 = 0
74 | print_temperature4 = 0
75 | print_temperature5 = 0
76 | wipe_tower = False
77 | nozzle_size = 0.35
78 | brim_line_count = 20
79 | solidarea_speed = 0.0
80 | perimeter_before_infill = False
81 | plugin_config =
82 | object_center_x = -1
83 | object_center_y = -1
84 |
85 | [alterations]
86 | start.gcode = ; Sliced at: {day} {date} {time}
87 | ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
88 | start2.gcode =
89 | start3.gcode =
90 | start4.gcode =
91 | end.gcode =
92 | end2.gcode =
93 | end3.gcode =
94 | end4.gcode =
95 | support_start.gcode =
96 | support_end.gcode =
97 | cool_start.gcode =
98 | cool_end.gcode =
99 | replace.csv =
100 | preswitchextruder.gcode =
101 | postswitchextruder.gcode =
102 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Cura/Micro 3D HIPS.ini:
--------------------------------------------------------------------------------
1 | [profile]
2 | layer_height = 0.25
3 | bottom_thickness = 0.3
4 | filament_diameter = 1.75
5 | filament_diameter2 = 0
6 | filament_diameter3 = 0
7 | filament_diameter4 = 0
8 | filament_diameter5 = 0
9 | filament_flow = 100
10 | solid_bottom = True
11 | solid_top = True
12 | skirt_gap = 2.0
13 | skirt_line_count = 0
14 | skirt_minimal_length = 0.0
15 | print_speed = 20
16 | travel_speed = 20
17 | fill_overlap = 15
18 | support_type = Lines
19 | support_angle = 50
20 | support_fill_rate = 20.0
21 | support_xy_distance = 0.7
22 | support_z_distance = 0.15
23 | support_dual_extrusion = Both
24 | retraction_enable = True
25 | retraction_amount = 2.4
26 | retraction_speed = 25
27 | retraction_dual_amount = 14.5
28 | retraction_min_travel = 1.5
29 | retraction_minimal_extrusion = 0.1
30 | retraction_hop = 0.1
31 | retraction_combing = All
32 | ooze_shield = False
33 | overlap_dual = 0.0
34 | object_sink = 0
35 | raft_margin = 2.0
36 | raft_line_spacing = 4.0
37 | raft_base_thickness = 0.4
38 | raft_base_linewidth = 2.5
39 | raft_interface_thickness = 0.4
40 | raft_interface_linewidth = 2.0
41 | raft_airgap_all = 0.001
42 | raft_surface_thickness = 0.2
43 | raft_surface_linewidth = 0.25
44 | raft_surface_layers = 2
45 | platform_adhesion = Raft
46 | cool_min_layer_time = 0
47 | cool_min_feedrate = 12
48 | cool_head_lift = True
49 | fan_speed = 0
50 | fan_speed_max = 1
51 | fix_horrible_union_all_type_a = False
52 | fix_horrible_union_all_type_b = False
53 | fix_horrible_extensive_stitching = False
54 | fix_horrible_use_open_bits = False
55 | spiralize = False
56 | simple_mode = False
57 | raft_airgap = 0.499
58 | bottom_layer_speed = 10
59 | fan_enabled = True
60 | fan_full_height = 0.551
61 | wipe_tower_volume = 0.0
62 | support = Everywhere
63 | infill_speed = 0
64 | fill_density = 8.75
65 | inset0_speed = 16
66 | insetx_speed = 17
67 | layer0_width_factor = 100.0
68 | wall_thickness = 1.4
69 | solid_layer_thickness = 2.0
70 | print_bed_temperature = 80
71 | print_temperature = 265
72 | print_temperature2 = 0
73 | print_temperature3 = 0
74 | print_temperature4 = 0
75 | print_temperature5 = 0
76 | wipe_tower = False
77 | nozzle_size = 0.35
78 | brim_line_count = 20
79 | solidarea_speed = 0.0
80 | perimeter_before_infill = False
81 | plugin_config =
82 | object_center_x = -1
83 | object_center_y = -1
84 |
85 | [alterations]
86 | start.gcode = ; Sliced at: {day} {date} {time}
87 | ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
88 | start2.gcode =
89 | start3.gcode =
90 | start4.gcode =
91 | end.gcode =
92 | end2.gcode =
93 | end3.gcode =
94 | end4.gcode =
95 | support_start.gcode =
96 | support_end.gcode =
97 | cool_start.gcode =
98 | cool_end.gcode =
99 | replace.csv =
100 | preswitchextruder.gcode =
101 | postswitchextruder.gcode =
102 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Cura/Micro 3D PLA.ini:
--------------------------------------------------------------------------------
1 | [profile]
2 | layer_height = 0.25
3 | bottom_thickness = 0.3
4 | filament_diameter = 1.75
5 | filament_diameter2 = 0
6 | filament_diameter3 = 0
7 | filament_diameter4 = 0
8 | filament_diameter5 = 0
9 | filament_flow = 100
10 | solid_bottom = True
11 | solid_top = True
12 | skirt_gap = 2.0
13 | skirt_line_count = 0
14 | skirt_minimal_length = 0.0
15 | print_speed = 16
16 | travel_speed = 20
17 | fill_overlap = 15
18 | support_type = Lines
19 | support_angle = 50
20 | support_fill_rate = 20.0
21 | support_xy_distance = 0.7
22 | support_z_distance = 0.15
23 | support_dual_extrusion = Both
24 | retraction_enable = True
25 | retraction_amount = 2.4
26 | retraction_speed = 20
27 | retraction_dual_amount = 14.5
28 | retraction_min_travel = 1.5
29 | retraction_minimal_extrusion = 0.1
30 | retraction_hop = 0.1
31 | retraction_combing = All
32 | ooze_shield = False
33 | overlap_dual = 0.0
34 | object_sink = 0
35 | raft_margin = 2.0
36 | raft_line_spacing = 4.0
37 | raft_base_thickness = 0.4
38 | raft_base_linewidth = 2.5
39 | raft_interface_thickness = 0.4
40 | raft_interface_linewidth = 2.0
41 | raft_airgap_all = 0.001
42 | raft_surface_thickness = 0.2
43 | raft_surface_linewidth = 0.25
44 | raft_surface_layers = 2
45 | platform_adhesion = Raft
46 | cool_min_layer_time = 0
47 | cool_min_feedrate = 12
48 | cool_head_lift = True
49 | fan_speed = 255
50 | fan_speed_max = 255
51 | fix_horrible_union_all_type_a = False
52 | fix_horrible_union_all_type_b = False
53 | fix_horrible_extensive_stitching = False
54 | fix_horrible_use_open_bits = False
55 | spiralize = False
56 | simple_mode = False
57 | raft_airgap = 0.284
58 | bottom_layer_speed = 8
59 | fan_enabled = True
60 | fan_full_height = 0.301
61 | wipe_tower_volume = 0.0
62 | support = Everywhere
63 | infill_speed = 0
64 | fill_density = 8.75
65 | inset0_speed = 12
66 | insetx_speed = 14
67 | layer0_width_factor = 100.0
68 | wall_thickness = 1.4
69 | solid_layer_thickness = 2.0
70 | print_bed_temperature = 60
71 | print_temperature = 215
72 | print_temperature2 = 0
73 | print_temperature3 = 0
74 | print_temperature4 = 0
75 | print_temperature5 = 0
76 | wipe_tower = False
77 | nozzle_size = 0.35
78 | brim_line_count = 20
79 | solidarea_speed = 0.0
80 | perimeter_before_infill = False
81 | plugin_config =
82 | object_center_x = -1
83 | object_center_y = -1
84 |
85 | [alterations]
86 | start.gcode = ; Sliced at: {day} {date} {time}
87 | ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
88 | start2.gcode =
89 | start3.gcode =
90 | start4.gcode =
91 | end.gcode =
92 | end2.gcode =
93 | end3.gcode =
94 | end4.gcode =
95 | support_start.gcode =
96 | support_end.gcode =
97 | cool_start.gcode =
98 | cool_end.gcode =
99 | replace.csv =
100 | preswitchextruder.gcode =
101 | postswitchextruder.gcode =
102 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Cura/Micro 3D TGH.ini:
--------------------------------------------------------------------------------
1 | [profile]
2 | layer_height = 0.25
3 | bottom_thickness = 0.3
4 | filament_diameter = 1.75
5 | filament_diameter2 = 0
6 | filament_diameter3 = 0
7 | filament_diameter4 = 0
8 | filament_diameter5 = 0
9 | filament_flow = 100
10 | solid_bottom = True
11 | solid_top = True
12 | skirt_gap = 2.0
13 | skirt_line_count = 0
14 | skirt_minimal_length = 0.0
15 | print_speed = 16
16 | travel_speed = 20
17 | fill_overlap = 15
18 | support_type = Lines
19 | support_angle = 50
20 | support_fill_rate = 20.0
21 | support_xy_distance = 0.7
22 | support_z_distance = 0.15
23 | support_dual_extrusion = Both
24 | retraction_enable = True
25 | retraction_amount = 2.4
26 | retraction_speed = 20
27 | retraction_dual_amount = 14.5
28 | retraction_min_travel = 1.5
29 | retraction_minimal_extrusion = 0.1
30 | retraction_hop = 0.1
31 | retraction_combing = All
32 | ooze_shield = False
33 | overlap_dual = 0.0
34 | object_sink = 0
35 | raft_margin = 2.0
36 | raft_line_spacing = 4.0
37 | raft_base_thickness = 0.4
38 | raft_base_linewidth = 2.5
39 | raft_interface_thickness = 0.4
40 | raft_interface_linewidth = 2.0
41 | raft_airgap_all = 0.001
42 | raft_surface_thickness = 0.2
43 | raft_surface_linewidth = 0.25
44 | raft_surface_layers = 2
45 | platform_adhesion = Raft
46 | cool_min_layer_time = 0
47 | cool_min_feedrate = 12
48 | cool_head_lift = True
49 | fan_speed = 255
50 | fan_speed_max = 255
51 | fix_horrible_union_all_type_a = False
52 | fix_horrible_union_all_type_b = False
53 | fix_horrible_extensive_stitching = False
54 | fix_horrible_use_open_bits = False
55 | spiralize = False
56 | simple_mode = False
57 | raft_airgap = 0.499
58 | bottom_layer_speed = 8
59 | fan_enabled = True
60 | fan_full_height = 0.301
61 | wipe_tower_volume = 0.0
62 | support = Everywhere
63 | infill_speed = 0
64 | fill_density = 8.75
65 | inset0_speed = 12
66 | insetx_speed = 14
67 | layer0_width_factor = 100.0
68 | wall_thickness = 1.4
69 | solid_layer_thickness = 2.0
70 | print_bed_temperature = 60
71 | print_temperature = 220
72 | print_temperature2 = 0
73 | print_temperature3 = 0
74 | print_temperature4 = 0
75 | print_temperature5 = 0
76 | wipe_tower = False
77 | nozzle_size = 0.35
78 | brim_line_count = 20
79 | solidarea_speed = 0.0
80 | perimeter_before_infill = False
81 | plugin_config =
82 | object_center_x = -1
83 | object_center_y = -1
84 |
85 | [alterations]
86 | start.gcode = ; Sliced at: {day} {date} {time}
87 | ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
88 | start2.gcode =
89 | start3.gcode =
90 | start4.gcode =
91 | end.gcode =
92 | end2.gcode =
93 | end3.gcode =
94 | end4.gcode =
95 | support_start.gcode =
96 | support_end.gcode =
97 | cool_start.gcode =
98 | cool_end.gcode =
99 | replace.csv =
100 | preswitchextruder.gcode =
101 | postswitchextruder.gcode =
102 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Cura/Micro 3D ABS-R.ini:
--------------------------------------------------------------------------------
1 | [profile]
2 | layer_height = 0.25
3 | bottom_thickness = 0.3
4 | filament_diameter = 1.75
5 | filament_diameter2 = 0
6 | filament_diameter3 = 0
7 | filament_diameter4 = 0
8 | filament_diameter5 = 0
9 | filament_flow = 100
10 | solid_bottom = True
11 | solid_top = True
12 | skirt_gap = 2.0
13 | skirt_line_count = 0
14 | skirt_minimal_length = 0.0
15 | print_speed = 16
16 | travel_speed = 20
17 | fill_overlap = 15
18 | support_type = Lines
19 | support_angle = 50
20 | support_fill_rate = 20.0
21 | support_xy_distance = 0.7
22 | support_z_distance = 0.15
23 | support_dual_extrusion = Both
24 | retraction_enable = True
25 | retraction_amount = 2.4
26 | retraction_speed = 20
27 | retraction_dual_amount = 14.5
28 | retraction_min_travel = 1.5
29 | retraction_minimal_extrusion = 0.1
30 | retraction_hop = 0.1
31 | retraction_combing = All
32 | ooze_shield = False
33 | overlap_dual = 0.0
34 | object_sink = 0
35 | raft_margin = 2.0
36 | raft_line_spacing = 4.0
37 | raft_base_thickness = 0.4
38 | raft_base_linewidth = 2.5
39 | raft_interface_thickness = 0.4
40 | raft_interface_linewidth = 2.0
41 | raft_airgap_all = 0.001
42 | raft_surface_thickness = 0.2
43 | raft_surface_linewidth = 0.25
44 | raft_surface_layers = 2
45 | platform_adhesion = Raft
46 | cool_min_layer_time = 0
47 | cool_min_feedrate = 12
48 | cool_head_lift = True
49 | fan_speed = 100
50 | fan_speed_max = 255
51 | fix_horrible_union_all_type_a = False
52 | fix_horrible_union_all_type_b = False
53 | fix_horrible_extensive_stitching = False
54 | fix_horrible_use_open_bits = False
55 | spiralize = False
56 | simple_mode = False
57 | raft_airgap = 0.499
58 | bottom_layer_speed = 8
59 | fan_enabled = True
60 | fan_full_height = 0.551
61 | wipe_tower_volume = 0.0
62 | support = Everywhere
63 | infill_speed = 0
64 | fill_density = 8.75
65 | inset0_speed = 12
66 | insetx_speed = 14
67 | layer0_width_factor = 100.0
68 | wall_thickness = 1.4
69 | solid_layer_thickness = 2.0
70 | print_bed_temperature = 60
71 | print_temperature = 240
72 | print_temperature2 = 0
73 | print_temperature3 = 0
74 | print_temperature4 = 0
75 | print_temperature5 = 0
76 | wipe_tower = False
77 | nozzle_size = 0.35
78 | brim_line_count = 20
79 | solidarea_speed = 0.0
80 | perimeter_before_infill = False
81 | plugin_config =
82 | object_center_x = -1
83 | object_center_y = -1
84 |
85 | [alterations]
86 | start.gcode = ; Sliced at: {day} {date} {time}
87 | ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
88 | start2.gcode =
89 | start3.gcode =
90 | start4.gcode =
91 | end.gcode =
92 | end2.gcode =
93 | end3.gcode =
94 | end4.gcode =
95 | support_start.gcode =
96 | support_end.gcode =
97 | cool_start.gcode =
98 | cool_end.gcode =
99 | replace.csv =
100 | preswitchextruder.gcode =
101 | postswitchextruder.gcode =
102 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Slic3r/Micro 3D ABS.ini:
--------------------------------------------------------------------------------
1 | # Slic3r profile converted from Cura Micro 3D ABS.ini
2 | avoid_crossing_perimeters = 0
3 | bed_shape = 0x0,200x0,200x200x0x200
4 | bed_temperature = 60
5 | before_layer_gcode =
6 | bottom_solid_layers = 8
7 | bridge_acceleration = 0
8 | bridge_fan_speed = 0
9 | bridge_flow_ratio = 1
10 | bridge_speed = 20
11 | brim_width = 0
12 | complete_objects = 0
13 | default_acceleration = 0
14 | disable_fan_first_layers = 1
15 | dont_support_bridges = 1
16 | duplicate_distance = 6
17 | external_fill_pattern = rectilinear
18 | external_perimeter_speed = 0
19 | external_perimeters_first = 0
20 | extra_perimeters = 1
21 | extruder_clearance_height = 20
22 | extruder_clearance_radius = 20
23 | extruder_offset = 0x0
24 | extrusion_axis = E
25 | extrusion_multiplier = 1.0
26 | extrusion_width = 0
27 | fan_always_on = 0
28 | fan_below_layer_time = 20
29 | filament_colour = #FFFFFF
30 | filament_diameter = 1.75
31 | fill_density = 8.75%
32 | first_layer_acceleration = 0
33 | first_layer_bed_temperature = 0
34 | first_layer_extrusion_width = 100.0%
35 | first_layer_height = 120%
36 | first_layer_speed = 50%
37 | first_layer_temperature = 0
38 | gap_fill_speed = 20
39 | gcode_arcs = 0
40 | gcode_comments = 0
41 | gcode_flavor = reprap
42 | infill_acceleration = 0
43 | infill_every_layers = 2
44 | infill_extruder = 1
45 | infill_extrusion_width = 0
46 | infill_first = 0
47 | infill_only_where_needed = 0
48 | infill_overlap = 15%
49 | infill_speed = 16
50 | interface_shells = 0
51 | layer_gcode =
52 | layer_height = 0.25
53 | max_fan_speed = 0
54 | max_print_speed = 40
55 | max_volumetric_speed = 0
56 | min_fan_speed = 0
57 | min_print_speed = 10
58 | min_skirt_length = 0.0
59 | notes =
60 | nozzle_diameter = 0.35
61 | octoprint_apikey =
62 | octoprint_host =
63 | only_retract_when_crossing_perimeters = 0
64 | ooze_prevention = 0
65 | output_filename_format = [input_filename_base].gcode
66 | overhangs = 1
67 | perimeter_acceleration = 0
68 | perimeter_extruder = 1
69 | perimeter_extrusion_width = 0
70 | perimeter_speed = 20
71 | perimeters = 4
72 | pressure_advance = 0
73 | raft_layers = 2
74 | resolution = 0
75 | retract_before_travel = 1.5
76 | retract_layer_change = 1
77 | retract_length = 2.4
78 | retract_length_toolchange = 3
79 | retract_lift = 0.1
80 | retract_restart_extra = 0
81 | retract_restart_extra_toolchange = 0
82 | retract_speed = 25
83 | seam_position = aligned
84 | skirt_distance = 2.0
85 | skirt_height = 1
86 | skirts = 0
87 | slowdown_below_layer_time = 20
88 | small_perimeter_speed = 0
89 | solid_infill_below_area = 0
90 | solid_infill_every_layers = 0
91 | solid_infill_extruder = 1
92 | solid_infill_extrusion_width = 0
93 | solid_infill_speed = 17
94 | spiral_vase = 0
95 | standby_temperature_delta = -5
96 | support_material = 1
97 | support_material_angle = 0
98 | support_material_contact_distance = 0.15
99 | support_material_enforce_layers = 0
100 | support_material_extruder = 1
101 | support_material_extrusion_width = 0
102 | support_material_interface_extruder = 1
103 | support_material_interface_layers = 0
104 | support_material_interface_spacing = 0
105 | support_material_interface_speed = 100%
106 | support_material_pattern = rectilinear
107 | support_material_spacing = 0.7
108 | support_material_speed = 20.0
109 | support_material_threshold = 50
110 | temperature = 275
111 | thin_walls = 1
112 | toolchange_gcode =
113 | top_infill_extrusion_width = 0
114 | top_solid_infill_speed = 80%
115 | top_solid_layers = 8
116 | travel_speed = 20
117 | use_firmware_retraction = 0
118 | use_relative_e_distances = 0
119 | use_volumetric_e = 0
120 | vibration_limit = 0
121 | wipe = 0
122 | xy_size_compensation = 0
123 | z_offset = 0
124 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Slic3r/Micro 3D HIPS.ini:
--------------------------------------------------------------------------------
1 | # Slic3r profile converted from Cura Micro 3D HIPS.ini
2 | avoid_crossing_perimeters = 0
3 | bed_shape = 0x0,200x0,200x200x0x200
4 | bed_temperature = 60
5 | before_layer_gcode =
6 | bottom_solid_layers = 8
7 | bridge_acceleration = 0
8 | bridge_fan_speed = 0
9 | bridge_flow_ratio = 1
10 | bridge_speed = 20
11 | brim_width = 0
12 | complete_objects = 0
13 | default_acceleration = 0
14 | disable_fan_first_layers = 1
15 | dont_support_bridges = 1
16 | duplicate_distance = 6
17 | external_fill_pattern = rectilinear
18 | external_perimeter_speed = 0
19 | external_perimeters_first = 0
20 | extra_perimeters = 1
21 | extruder_clearance_height = 20
22 | extruder_clearance_radius = 20
23 | extruder_offset = 0x0
24 | extrusion_axis = E
25 | extrusion_multiplier = 1.0
26 | extrusion_width = 0
27 | fan_always_on = 0
28 | fan_below_layer_time = 20
29 | filament_colour = #FFFFFF
30 | filament_diameter = 1.75
31 | fill_density = 8.75%
32 | first_layer_acceleration = 0
33 | first_layer_bed_temperature = 0
34 | first_layer_extrusion_width = 100.0%
35 | first_layer_height = 120%
36 | first_layer_speed = 50%
37 | first_layer_temperature = 0
38 | gap_fill_speed = 20
39 | gcode_arcs = 0
40 | gcode_comments = 0
41 | gcode_flavor = reprap
42 | infill_acceleration = 0
43 | infill_every_layers = 2
44 | infill_extruder = 1
45 | infill_extrusion_width = 0
46 | infill_first = 0
47 | infill_only_where_needed = 0
48 | infill_overlap = 15%
49 | infill_speed = 16
50 | interface_shells = 0
51 | layer_gcode =
52 | layer_height = 0.25
53 | max_fan_speed = 0
54 | max_print_speed = 40
55 | max_volumetric_speed = 0
56 | min_fan_speed = 0
57 | min_print_speed = 10
58 | min_skirt_length = 0.0
59 | notes =
60 | nozzle_diameter = 0.35
61 | octoprint_apikey =
62 | octoprint_host =
63 | only_retract_when_crossing_perimeters = 0
64 | ooze_prevention = 0
65 | output_filename_format = [input_filename_base].gcode
66 | overhangs = 1
67 | perimeter_acceleration = 0
68 | perimeter_extruder = 1
69 | perimeter_extrusion_width = 0
70 | perimeter_speed = 20
71 | perimeters = 4
72 | pressure_advance = 0
73 | raft_layers = 2
74 | resolution = 0
75 | retract_before_travel = 1.5
76 | retract_layer_change = 1
77 | retract_length = 2.4
78 | retract_length_toolchange = 3
79 | retract_lift = 0.1
80 | retract_restart_extra = 0
81 | retract_restart_extra_toolchange = 0
82 | retract_speed = 25
83 | seam_position = aligned
84 | skirt_distance = 2.0
85 | skirt_height = 1
86 | skirts = 0
87 | slowdown_below_layer_time = 20
88 | small_perimeter_speed = 0
89 | solid_infill_below_area = 0
90 | solid_infill_every_layers = 0
91 | solid_infill_extruder = 1
92 | solid_infill_extrusion_width = 0
93 | solid_infill_speed = 17
94 | spiral_vase = 0
95 | standby_temperature_delta = -5
96 | support_material = 1
97 | support_material_angle = 0
98 | support_material_contact_distance = 0.15
99 | support_material_enforce_layers = 0
100 | support_material_extruder = 1
101 | support_material_extrusion_width = 0
102 | support_material_interface_extruder = 1
103 | support_material_interface_layers = 0
104 | support_material_interface_spacing = 0
105 | support_material_interface_speed = 100%
106 | support_material_pattern = rectilinear
107 | support_material_spacing = 0.7
108 | support_material_speed = 20.0
109 | support_material_threshold = 50
110 | temperature = 265
111 | thin_walls = 1
112 | toolchange_gcode =
113 | top_infill_extrusion_width = 0
114 | top_solid_infill_speed = 80%
115 | top_solid_layers = 8
116 | travel_speed = 20
117 | use_firmware_retraction = 0
118 | use_relative_e_distances = 0
119 | use_volumetric_e = 0
120 | vibration_limit = 0
121 | wipe = 0
122 | xy_size_compensation = 0
123 | z_offset = 0
124 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Slic3r/Micro 3D CAM.ini:
--------------------------------------------------------------------------------
1 | # Slic3r profile converted from Cura Micro 3D CAM.ini
2 | avoid_crossing_perimeters = 0
3 | bed_shape = 0x0,200x0,200x200x0x200
4 | bed_temperature = 60
5 | before_layer_gcode =
6 | bottom_solid_layers = 8
7 | bridge_acceleration = 0
8 | bridge_fan_speed = 100
9 | bridge_flow_ratio = 1
10 | bridge_speed = 16
11 | brim_width = 0
12 | complete_objects = 0
13 | default_acceleration = 0
14 | disable_fan_first_layers = 1
15 | dont_support_bridges = 1
16 | duplicate_distance = 6
17 | external_fill_pattern = rectilinear
18 | external_perimeter_speed = 0
19 | external_perimeters_first = 0
20 | extra_perimeters = 1
21 | extruder_clearance_height = 20
22 | extruder_clearance_radius = 20
23 | extruder_offset = 0x0
24 | extrusion_axis = E
25 | extrusion_multiplier = 1.0
26 | extrusion_width = 0
27 | fan_always_on = 0
28 | fan_below_layer_time = 20
29 | filament_colour = #FFFFFF
30 | filament_diameter = 1.75
31 | fill_density = 8.75%
32 | first_layer_acceleration = 0
33 | first_layer_bed_temperature = 0
34 | first_layer_extrusion_width = 100.0%
35 | first_layer_height = 120%
36 | first_layer_speed = 50%
37 | first_layer_temperature = 0
38 | gap_fill_speed = 16
39 | gcode_arcs = 0
40 | gcode_comments = 0
41 | gcode_flavor = reprap
42 | infill_acceleration = 0
43 | infill_every_layers = 2
44 | infill_extruder = 1
45 | infill_extrusion_width = 0
46 | infill_first = 0
47 | infill_only_where_needed = 0
48 | infill_overlap = 15%
49 | infill_speed = 12
50 | interface_shells = 0
51 | layer_gcode =
52 | layer_height = 0.25
53 | max_fan_speed = 100
54 | max_print_speed = 32
55 | max_volumetric_speed = 0
56 | min_fan_speed = 100
57 | min_print_speed = 10
58 | min_skirt_length = 0.0
59 | notes =
60 | nozzle_diameter = 0.35
61 | octoprint_apikey =
62 | octoprint_host =
63 | only_retract_when_crossing_perimeters = 0
64 | ooze_prevention = 0
65 | output_filename_format = [input_filename_base].gcode
66 | overhangs = 1
67 | perimeter_acceleration = 0
68 | perimeter_extruder = 1
69 | perimeter_extrusion_width = 0
70 | perimeter_speed = 16
71 | perimeters = 4
72 | pressure_advance = 0
73 | raft_layers = 2
74 | resolution = 0
75 | retract_before_travel = 1.5
76 | retract_layer_change = 1
77 | retract_length = 2.4
78 | retract_length_toolchange = 3
79 | retract_lift = 0.1
80 | retract_restart_extra = 0
81 | retract_restart_extra_toolchange = 0
82 | retract_speed = 20
83 | seam_position = aligned
84 | skirt_distance = 2.0
85 | skirt_height = 1
86 | skirts = 0
87 | slowdown_below_layer_time = 20
88 | small_perimeter_speed = 0
89 | solid_infill_below_area = 0
90 | solid_infill_every_layers = 0
91 | solid_infill_extruder = 1
92 | solid_infill_extrusion_width = 0
93 | solid_infill_speed = 14
94 | spiral_vase = 0
95 | standby_temperature_delta = -5
96 | support_material = 1
97 | support_material_angle = 0
98 | support_material_contact_distance = 0.15
99 | support_material_enforce_layers = 0
100 | support_material_extruder = 1
101 | support_material_extrusion_width = 0
102 | support_material_interface_extruder = 1
103 | support_material_interface_layers = 0
104 | support_material_interface_spacing = 0
105 | support_material_interface_speed = 100%
106 | support_material_pattern = rectilinear
107 | support_material_spacing = 0.7
108 | support_material_speed = 20.0
109 | support_material_threshold = 50
110 | temperature = 215
111 | thin_walls = 1
112 | toolchange_gcode =
113 | top_infill_extrusion_width = 0
114 | top_solid_infill_speed = 80%
115 | top_solid_layers = 8
116 | travel_speed = 20
117 | use_firmware_retraction = 0
118 | use_relative_e_distances = 0
119 | use_volumetric_e = 0
120 | vibration_limit = 0
121 | wipe = 0
122 | xy_size_compensation = 0
123 | z_offset = 0
124 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Slic3r/Micro 3D FLX.ini:
--------------------------------------------------------------------------------
1 | # Slic3r profile converted from Cura Micro 3D FLX.ini
2 | avoid_crossing_perimeters = 0
3 | bed_shape = 0x0,200x0,200x200x0x200
4 | bed_temperature = 60
5 | before_layer_gcode =
6 | bottom_solid_layers = 8
7 | bridge_acceleration = 0
8 | bridge_fan_speed = 100
9 | bridge_flow_ratio = 1
10 | bridge_speed = 16
11 | brim_width = 0
12 | complete_objects = 0
13 | default_acceleration = 0
14 | disable_fan_first_layers = 1
15 | dont_support_bridges = 1
16 | duplicate_distance = 6
17 | external_fill_pattern = rectilinear
18 | external_perimeter_speed = 0
19 | external_perimeters_first = 0
20 | extra_perimeters = 1
21 | extruder_clearance_height = 20
22 | extruder_clearance_radius = 20
23 | extruder_offset = 0x0
24 | extrusion_axis = E
25 | extrusion_multiplier = 1.0
26 | extrusion_width = 0
27 | fan_always_on = 0
28 | fan_below_layer_time = 20
29 | filament_colour = #FFFFFF
30 | filament_diameter = 1.75
31 | fill_density = 8.75%
32 | first_layer_acceleration = 0
33 | first_layer_bed_temperature = 0
34 | first_layer_extrusion_width = 100.0%
35 | first_layer_height = 120%
36 | first_layer_speed = 50%
37 | first_layer_temperature = 0
38 | gap_fill_speed = 16
39 | gcode_arcs = 0
40 | gcode_comments = 0
41 | gcode_flavor = reprap
42 | infill_acceleration = 0
43 | infill_every_layers = 2
44 | infill_extruder = 1
45 | infill_extrusion_width = 0
46 | infill_first = 0
47 | infill_only_where_needed = 0
48 | infill_overlap = 15%
49 | infill_speed = 12
50 | interface_shells = 0
51 | layer_gcode =
52 | layer_height = 0.25
53 | max_fan_speed = 100
54 | max_print_speed = 32
55 | max_volumetric_speed = 0
56 | min_fan_speed = 100
57 | min_print_speed = 10
58 | min_skirt_length = 0.0
59 | notes =
60 | nozzle_diameter = 0.35
61 | octoprint_apikey =
62 | octoprint_host =
63 | only_retract_when_crossing_perimeters = 0
64 | ooze_prevention = 0
65 | output_filename_format = [input_filename_base].gcode
66 | overhangs = 1
67 | perimeter_acceleration = 0
68 | perimeter_extruder = 1
69 | perimeter_extrusion_width = 0
70 | perimeter_speed = 16
71 | perimeters = 4
72 | pressure_advance = 0
73 | raft_layers = 2
74 | resolution = 0
75 | retract_before_travel = 1.5
76 | retract_layer_change = 1
77 | retract_length = 2.4
78 | retract_length_toolchange = 3
79 | retract_lift = 0.1
80 | retract_restart_extra = 0
81 | retract_restart_extra_toolchange = 0
82 | retract_speed = 20
83 | seam_position = aligned
84 | skirt_distance = 2.0
85 | skirt_height = 1
86 | skirts = 0
87 | slowdown_below_layer_time = 20
88 | small_perimeter_speed = 0
89 | solid_infill_below_area = 0
90 | solid_infill_every_layers = 0
91 | solid_infill_extruder = 1
92 | solid_infill_extrusion_width = 0
93 | solid_infill_speed = 14
94 | spiral_vase = 0
95 | standby_temperature_delta = -5
96 | support_material = 1
97 | support_material_angle = 0
98 | support_material_contact_distance = 0.15
99 | support_material_enforce_layers = 0
100 | support_material_extruder = 1
101 | support_material_extrusion_width = 0
102 | support_material_interface_extruder = 1
103 | support_material_interface_layers = 0
104 | support_material_interface_spacing = 0
105 | support_material_interface_speed = 100%
106 | support_material_pattern = rectilinear
107 | support_material_spacing = 0.7
108 | support_material_speed = 20.0
109 | support_material_threshold = 50
110 | temperature = 220
111 | thin_walls = 1
112 | toolchange_gcode =
113 | top_infill_extrusion_width = 0
114 | top_solid_infill_speed = 80%
115 | top_solid_layers = 8
116 | travel_speed = 20
117 | use_firmware_retraction = 0
118 | use_relative_e_distances = 0
119 | use_volumetric_e = 0
120 | vibration_limit = 0
121 | wipe = 0
122 | xy_size_compensation = 0
123 | z_offset = 0
124 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Slic3r/Micro 3D PLA.ini:
--------------------------------------------------------------------------------
1 | # Slic3r profile converted from Cura Micro 3D PLA.ini
2 | avoid_crossing_perimeters = 0
3 | bed_shape = 0x0,200x0,200x200x0x200
4 | bed_temperature = 60
5 | before_layer_gcode =
6 | bottom_solid_layers = 8
7 | bridge_acceleration = 0
8 | bridge_fan_speed = 100
9 | bridge_flow_ratio = 1
10 | bridge_speed = 16
11 | brim_width = 0
12 | complete_objects = 0
13 | default_acceleration = 0
14 | disable_fan_first_layers = 1
15 | dont_support_bridges = 1
16 | duplicate_distance = 6
17 | external_fill_pattern = rectilinear
18 | external_perimeter_speed = 0
19 | external_perimeters_first = 0
20 | extra_perimeters = 1
21 | extruder_clearance_height = 20
22 | extruder_clearance_radius = 20
23 | extruder_offset = 0x0
24 | extrusion_axis = E
25 | extrusion_multiplier = 1.0
26 | extrusion_width = 0
27 | fan_always_on = 0
28 | fan_below_layer_time = 20
29 | filament_colour = #FFFFFF
30 | filament_diameter = 1.75
31 | fill_density = 8.75%
32 | first_layer_acceleration = 0
33 | first_layer_bed_temperature = 0
34 | first_layer_extrusion_width = 100.0%
35 | first_layer_height = 120%
36 | first_layer_speed = 50%
37 | first_layer_temperature = 0
38 | gap_fill_speed = 16
39 | gcode_arcs = 0
40 | gcode_comments = 0
41 | gcode_flavor = reprap
42 | infill_acceleration = 0
43 | infill_every_layers = 2
44 | infill_extruder = 1
45 | infill_extrusion_width = 0
46 | infill_first = 0
47 | infill_only_where_needed = 0
48 | infill_overlap = 15%
49 | infill_speed = 12
50 | interface_shells = 0
51 | layer_gcode =
52 | layer_height = 0.25
53 | max_fan_speed = 100
54 | max_print_speed = 32
55 | max_volumetric_speed = 0
56 | min_fan_speed = 100
57 | min_print_speed = 10
58 | min_skirt_length = 0.0
59 | notes =
60 | nozzle_diameter = 0.35
61 | octoprint_apikey =
62 | octoprint_host =
63 | only_retract_when_crossing_perimeters = 0
64 | ooze_prevention = 0
65 | output_filename_format = [input_filename_base].gcode
66 | overhangs = 1
67 | perimeter_acceleration = 0
68 | perimeter_extruder = 1
69 | perimeter_extrusion_width = 0
70 | perimeter_speed = 16
71 | perimeters = 4
72 | pressure_advance = 0
73 | raft_layers = 2
74 | resolution = 0
75 | retract_before_travel = 1.5
76 | retract_layer_change = 1
77 | retract_length = 2.4
78 | retract_length_toolchange = 3
79 | retract_lift = 0.1
80 | retract_restart_extra = 0
81 | retract_restart_extra_toolchange = 0
82 | retract_speed = 20
83 | seam_position = aligned
84 | skirt_distance = 2.0
85 | skirt_height = 1
86 | skirts = 0
87 | slowdown_below_layer_time = 20
88 | small_perimeter_speed = 0
89 | solid_infill_below_area = 0
90 | solid_infill_every_layers = 0
91 | solid_infill_extruder = 1
92 | solid_infill_extrusion_width = 0
93 | solid_infill_speed = 14
94 | spiral_vase = 0
95 | standby_temperature_delta = -5
96 | support_material = 1
97 | support_material_angle = 0
98 | support_material_contact_distance = 0.15
99 | support_material_enforce_layers = 0
100 | support_material_extruder = 1
101 | support_material_extrusion_width = 0
102 | support_material_interface_extruder = 1
103 | support_material_interface_layers = 0
104 | support_material_interface_spacing = 0
105 | support_material_interface_speed = 100%
106 | support_material_pattern = rectilinear
107 | support_material_spacing = 0.7
108 | support_material_speed = 20.0
109 | support_material_threshold = 50
110 | temperature = 215
111 | thin_walls = 1
112 | toolchange_gcode =
113 | top_infill_extrusion_width = 0
114 | top_solid_infill_speed = 80%
115 | top_solid_layers = 8
116 | travel_speed = 20
117 | use_firmware_retraction = 0
118 | use_relative_e_distances = 0
119 | use_volumetric_e = 0
120 | vibration_limit = 0
121 | wipe = 0
122 | xy_size_compensation = 0
123 | z_offset = 0
124 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Slic3r/Micro 3D TGH.ini:
--------------------------------------------------------------------------------
1 | # Slic3r profile converted from Cura Micro 3D TGH.ini
2 | avoid_crossing_perimeters = 0
3 | bed_shape = 0x0,200x0,200x200x0x200
4 | bed_temperature = 60
5 | before_layer_gcode =
6 | bottom_solid_layers = 8
7 | bridge_acceleration = 0
8 | bridge_fan_speed = 100
9 | bridge_flow_ratio = 1
10 | bridge_speed = 16
11 | brim_width = 0
12 | complete_objects = 0
13 | default_acceleration = 0
14 | disable_fan_first_layers = 1
15 | dont_support_bridges = 1
16 | duplicate_distance = 6
17 | external_fill_pattern = rectilinear
18 | external_perimeter_speed = 0
19 | external_perimeters_first = 0
20 | extra_perimeters = 1
21 | extruder_clearance_height = 20
22 | extruder_clearance_radius = 20
23 | extruder_offset = 0x0
24 | extrusion_axis = E
25 | extrusion_multiplier = 1.0
26 | extrusion_width = 0
27 | fan_always_on = 0
28 | fan_below_layer_time = 20
29 | filament_colour = #FFFFFF
30 | filament_diameter = 1.75
31 | fill_density = 8.75%
32 | first_layer_acceleration = 0
33 | first_layer_bed_temperature = 0
34 | first_layer_extrusion_width = 100.0%
35 | first_layer_height = 120%
36 | first_layer_speed = 50%
37 | first_layer_temperature = 0
38 | gap_fill_speed = 16
39 | gcode_arcs = 0
40 | gcode_comments = 0
41 | gcode_flavor = reprap
42 | infill_acceleration = 0
43 | infill_every_layers = 2
44 | infill_extruder = 1
45 | infill_extrusion_width = 0
46 | infill_first = 0
47 | infill_only_where_needed = 0
48 | infill_overlap = 15%
49 | infill_speed = 12
50 | interface_shells = 0
51 | layer_gcode =
52 | layer_height = 0.25
53 | max_fan_speed = 100
54 | max_print_speed = 32
55 | max_volumetric_speed = 0
56 | min_fan_speed = 100
57 | min_print_speed = 10
58 | min_skirt_length = 0.0
59 | notes =
60 | nozzle_diameter = 0.35
61 | octoprint_apikey =
62 | octoprint_host =
63 | only_retract_when_crossing_perimeters = 0
64 | ooze_prevention = 0
65 | output_filename_format = [input_filename_base].gcode
66 | overhangs = 1
67 | perimeter_acceleration = 0
68 | perimeter_extruder = 1
69 | perimeter_extrusion_width = 0
70 | perimeter_speed = 16
71 | perimeters = 4
72 | pressure_advance = 0
73 | raft_layers = 2
74 | resolution = 0
75 | retract_before_travel = 1.5
76 | retract_layer_change = 1
77 | retract_length = 2.4
78 | retract_length_toolchange = 3
79 | retract_lift = 0.1
80 | retract_restart_extra = 0
81 | retract_restart_extra_toolchange = 0
82 | retract_speed = 20
83 | seam_position = aligned
84 | skirt_distance = 2.0
85 | skirt_height = 1
86 | skirts = 0
87 | slowdown_below_layer_time = 20
88 | small_perimeter_speed = 0
89 | solid_infill_below_area = 0
90 | solid_infill_every_layers = 0
91 | solid_infill_extruder = 1
92 | solid_infill_extrusion_width = 0
93 | solid_infill_speed = 14
94 | spiral_vase = 0
95 | standby_temperature_delta = -5
96 | support_material = 1
97 | support_material_angle = 0
98 | support_material_contact_distance = 0.15
99 | support_material_enforce_layers = 0
100 | support_material_extruder = 1
101 | support_material_extrusion_width = 0
102 | support_material_interface_extruder = 1
103 | support_material_interface_layers = 0
104 | support_material_interface_spacing = 0
105 | support_material_interface_speed = 100%
106 | support_material_pattern = rectilinear
107 | support_material_spacing = 0.7
108 | support_material_speed = 20.0
109 | support_material_threshold = 50
110 | temperature = 220
111 | thin_walls = 1
112 | toolchange_gcode =
113 | top_infill_extrusion_width = 0
114 | top_solid_infill_speed = 80%
115 | top_solid_layers = 8
116 | travel_speed = 20
117 | use_firmware_retraction = 0
118 | use_relative_e_distances = 0
119 | use_volumetric_e = 0
120 | vibration_limit = 0
121 | wipe = 0
122 | xy_size_compensation = 0
123 | z_offset = 0
124 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/profiles/Slic3r/Micro 3D ABS-R.ini:
--------------------------------------------------------------------------------
1 | # Slic3r profile converted from Cura Micro 3D ABS-R.ini
2 | avoid_crossing_perimeters = 0
3 | bed_shape = 0x0,200x0,200x200x0x200
4 | bed_temperature = 60
5 | before_layer_gcode =
6 | bottom_solid_layers = 8
7 | bridge_acceleration = 0
8 | bridge_fan_speed = 100
9 | bridge_flow_ratio = 1
10 | bridge_speed = 16
11 | brim_width = 0
12 | complete_objects = 0
13 | default_acceleration = 0
14 | disable_fan_first_layers = 1
15 | dont_support_bridges = 1
16 | duplicate_distance = 6
17 | external_fill_pattern = rectilinear
18 | external_perimeter_speed = 0
19 | external_perimeters_first = 0
20 | extra_perimeters = 1
21 | extruder_clearance_height = 20
22 | extruder_clearance_radius = 20
23 | extruder_offset = 0x0
24 | extrusion_axis = E
25 | extrusion_multiplier = 1.0
26 | extrusion_width = 0
27 | fan_always_on = 0
28 | fan_below_layer_time = 20
29 | filament_colour = #FFFFFF
30 | filament_diameter = 1.75
31 | fill_density = 8.75%
32 | first_layer_acceleration = 0
33 | first_layer_bed_temperature = 0
34 | first_layer_extrusion_width = 100.0%
35 | first_layer_height = 120%
36 | first_layer_speed = 50%
37 | first_layer_temperature = 0
38 | gap_fill_speed = 16
39 | gcode_arcs = 0
40 | gcode_comments = 0
41 | gcode_flavor = reprap
42 | infill_acceleration = 0
43 | infill_every_layers = 2
44 | infill_extruder = 1
45 | infill_extrusion_width = 0
46 | infill_first = 0
47 | infill_only_where_needed = 0
48 | infill_overlap = 15%
49 | infill_speed = 12
50 | interface_shells = 0
51 | layer_gcode =
52 | layer_height = 0.25
53 | max_fan_speed = 100
54 | max_print_speed = 32
55 | max_volumetric_speed = 0
56 | min_fan_speed = 100
57 | min_print_speed = 10
58 | min_skirt_length = 0.0
59 | notes =
60 | nozzle_diameter = 0.35
61 | octoprint_apikey =
62 | octoprint_host =
63 | only_retract_when_crossing_perimeters = 0
64 | ooze_prevention = 0
65 | output_filename_format = [input_filename_base].gcode
66 | overhangs = 1
67 | perimeter_acceleration = 0
68 | perimeter_extruder = 1
69 | perimeter_extrusion_width = 0
70 | perimeter_speed = 16
71 | perimeters = 4
72 | pressure_advance = 0
73 | raft_layers = 2
74 | resolution = 0
75 | retract_before_travel = 1.5
76 | retract_layer_change = 1
77 | retract_length = 2.4
78 | retract_length_toolchange = 3
79 | retract_lift = 0.1
80 | retract_restart_extra = 0
81 | retract_restart_extra_toolchange = 0
82 | retract_speed = 20
83 | seam_position = aligned
84 | skirt_distance = 2.0
85 | skirt_height = 1
86 | skirts = 0
87 | slowdown_below_layer_time = 20
88 | small_perimeter_speed = 0
89 | solid_infill_below_area = 0
90 | solid_infill_every_layers = 0
91 | solid_infill_extruder = 1
92 | solid_infill_extrusion_width = 0
93 | solid_infill_speed = 14
94 | spiral_vase = 0
95 | standby_temperature_delta = -5
96 | support_material = 1
97 | support_material_angle = 0
98 | support_material_contact_distance = 0.15
99 | support_material_enforce_layers = 0
100 | support_material_extruder = 1
101 | support_material_extrusion_width = 0
102 | support_material_interface_extruder = 1
103 | support_material_interface_layers = 0
104 | support_material_interface_spacing = 0
105 | support_material_interface_speed = 100%
106 | support_material_pattern = rectilinear
107 | support_material_spacing = 0.7
108 | support_material_speed = 20.0
109 | support_material_threshold = 50
110 | temperature = 240
111 | thin_walls = 1
112 | toolchange_gcode =
113 | top_infill_extrusion_width = 0
114 | top_solid_infill_speed = 80%
115 | top_solid_layers = 8
116 | travel_speed = 20
117 | use_firmware_retraction = 0
118 | use_relative_e_distances = 0
119 | use_volumetric_e = 0
120 | vibration_limit = 0
121 | wipe = 0
122 | xy_size_compensation = 0
123 | z_offset = 0
124 |
--------------------------------------------------------------------------------
/shared library source/gcode.h:
--------------------------------------------------------------------------------
1 | // Header guard
2 | #ifndef GCODE_H
3 | #define GCODE_H
4 |
5 |
6 | // Header files
7 | #include
8 | #include
9 |
10 | using namespace std;
11 |
12 |
13 | // Gcode class
14 | class Gcode {
15 |
16 | // Public
17 | public:
18 |
19 | /*
20 | Name: Constructor
21 | Purpose: Initializes the variable
22 | */
23 | Gcode();
24 |
25 | /*
26 | Name: Copy constructor
27 | Purpose: Initializes the variable if copied
28 | */
29 | Gcode(const Gcode &value);
30 |
31 | /*
32 | Name: Parse line
33 | Purpose: Extracts G-code from the parameter
34 | */
35 | bool parseLine(const char *line);
36 | bool parseLine(const string &line);
37 |
38 | /*
39 | Name: Parse binary
40 | Purpose: Extracts G-code from the binary parameter
41 | */
42 | bool parseBinary(const char *line);
43 |
44 | /*
45 | Name: Get original command
46 | Purpose: Returns the orignal G-code command
47 | */
48 | string getOriginalCommand() const;
49 |
50 | /*
51 | Name: Get binary
52 | Purpose: Returns binary representation of the G-code
53 | */
54 | vector getBinary() const;
55 |
56 | /*
57 | Name: Get ascii
58 | Purpose: Returns Ascii representation of the G-code
59 | */
60 | string getAscii() const;
61 |
62 | /*
63 | Name: Get data type
64 | Purpose: Returns the data type of the G-code
65 | */
66 | uint32_t getDataType() const;
67 |
68 | /*
69 | Name: Has parameter
70 | Purpose: Checks if the G-code has a specific parameter, but does not check if it has a value associated with it
71 | */
72 | bool hasParameter(char parameter) const;
73 |
74 | /*
75 | Name: Remove parameter
76 | Purpose: Removes a specified parameter from the G-cocdde
77 | */
78 | void removeParameter(char parameter);
79 |
80 | /*
81 | Name: Has value
82 | Purpose: Checks if the G-code has a value associated with a specific parameter, so it can't detect flags
83 | */
84 | bool hasValue(char parameter) const;
85 |
86 | /*
87 | Name: Get value
88 | Purpose: Retuns the value associated with a specific parameter
89 | */
90 | string getValue(char parameter) const;
91 |
92 | /*
93 | Name: Set value
94 | Purpose: Sets the value associated with a specific parameter
95 | */
96 | void setValue(char parameter, const string &value);
97 |
98 | /*
99 | Name: Has string
100 | Purpose: Returns if the G-code contained a string as a value for a parameter
101 | */
102 | bool hasString() const;
103 |
104 | /*
105 | Name: Get string
106 | Purpose: Returns the string value associated with a parameter
107 | */
108 | string getString() const;
109 |
110 | /*
111 | Name: Set string
112 | Purpose: Sets the string value associated with a parameter
113 | */
114 | void setString(const string &value);
115 |
116 | /*
117 | Name: Clear
118 | Purpose: Resets G-code to initial state
119 | */
120 | void clear();
121 |
122 | /*
123 | Name: Is host command
124 | Purpose: Returns if the G-code is a host command
125 | */
126 | bool isHostCommand() const;
127 |
128 | /*
129 | Name: Is empty
130 | Purpose: Returns if no G-code has attempted to be parsed yet
131 | */
132 | bool isEmpty() const;
133 |
134 | /*
135 | Name: Assignment operator
136 | Purpose: Allows using the assignment operator
137 | */
138 | Gcode &operator=(const Gcode &value);
139 |
140 | /*
141 | Name: Output stream operator
142 | Purpose: Allows using the output stream operator
143 | */
144 | friend ostream &operator<<(ostream &output, const Gcode &value);
145 |
146 | // Private
147 | private:
148 |
149 | // Original command
150 | string originalCommand;
151 |
152 | // Parameter values
153 | vector parameterValue;
154 |
155 | // Data type
156 | uint32_t dataType;
157 |
158 | // Host command
159 | string hostCommand;
160 | };
161 |
162 |
163 | #endif
164 |
--------------------------------------------------------------------------------
/shared library source/vector.cpp:
--------------------------------------------------------------------------------
1 | // Header files
2 | #include
3 | #include "vector.h"
4 |
5 |
6 | // Supporting function implementation
7 | Vector::Vector(double x, double y, double z, double e) {
8 |
9 | // Initialize vector components
10 | this->x = x;
11 | this->y = y;
12 | this->z = z;
13 | this->e = e;
14 | }
15 |
16 | Vector::Vector(Vector &value) {
17 |
18 | // Copy vector components
19 | x = value.x;
20 | y = value.y;
21 | z = value.z;
22 | e = value.e;
23 | }
24 |
25 | double Vector::getLength() const {
26 |
27 | // Return length
28 | return sqrt(x * x + y * y + z * z + e * e);
29 | }
30 |
31 | void Vector::normalize() {
32 |
33 | // Get length
34 | double length = getLength();
35 |
36 | // Normalize components
37 | x /= length;
38 | y /= length;
39 | z /= length;
40 | e /= length;
41 | }
42 |
43 | Vector Vector::operator+(const Vector &addend) const {
44 |
45 | // Initialize variables
46 | Vector vector;
47 |
48 | // Set vector components
49 | vector.x = x + addend.x;
50 | vector.y = y + addend.y;
51 | vector.z = z + addend.z;
52 | vector.e = e + addend.e;
53 |
54 | // Return vector
55 | return vector;
56 | }
57 |
58 | Vector &Vector::operator+=(const Vector &addend) {
59 |
60 | // Set vector components
61 | x += addend.x;
62 | y += addend.y;
63 | z += addend.z;
64 | e += addend.e;
65 |
66 | // Return self
67 | return *this;
68 | }
69 |
70 | Vector Vector::operator-(const Vector &subtrahend) const {
71 |
72 | // Initialize variables
73 | Vector vector;
74 |
75 | // Set vector components
76 | vector.x = x - subtrahend.x;
77 | vector.y = y - subtrahend.y;
78 | vector.z = z - subtrahend.z;
79 | vector.e = e - subtrahend.e;
80 |
81 | // Return vector
82 | return vector;
83 | }
84 |
85 | Vector &Vector::operator-=(const Vector &subtrahend) {
86 |
87 | // Set vector components
88 | x -= subtrahend.x;
89 | y -= subtrahend.y;
90 | z -= subtrahend.z;
91 | e -= subtrahend.e;
92 |
93 | // Return self
94 | return *this;
95 | }
96 |
97 | Vector Vector::operator*(double multiplier) const {
98 |
99 | // Initialize variables
100 | Vector vector;
101 |
102 | // Set vector components
103 | vector.x = x * multiplier;
104 | vector.y = y * multiplier;
105 | vector.z = z * multiplier;
106 | vector.e = e * multiplier;
107 |
108 | // Return vector
109 | return vector;
110 | }
111 |
112 | Vector &Vector::operator*=(double multiplier) {
113 |
114 | // Set vector components
115 | x *= multiplier;
116 | y *= multiplier;
117 | z *= multiplier;
118 | e *= multiplier;
119 |
120 | // Return self
121 | return *this;
122 | }
123 |
124 | Vector Vector::operator/(double divisor) const {
125 |
126 | // Initialize variables
127 | Vector vector;
128 |
129 | // Set vector components
130 | vector.x = x / divisor;
131 | vector.y = y / divisor;
132 | vector.z = z / divisor;
133 | vector.e = e / divisor;
134 |
135 | // Return vector
136 | return vector;
137 | }
138 |
139 | Vector &Vector::operator/=(double divisor) {
140 |
141 | // Set vector components
142 | x /= divisor;
143 | y /= divisor;
144 | z /= divisor;
145 | e /= divisor;
146 |
147 | // Return self
148 | return *this;
149 | }
150 |
151 | const double& Vector::operator[](int index) const {
152 |
153 | // Return indexed value
154 | switch(index) {
155 |
156 | case 0:
157 | return x;
158 | break;
159 |
160 | case 1:
161 | return y;
162 | break;
163 |
164 | case 2:
165 | return z;
166 | break;
167 |
168 | default:
169 | return e;
170 | }
171 | }
172 |
173 | double &Vector::operator[](int index) {
174 |
175 | // Return indexed value
176 | switch(index) {
177 |
178 | case 0:
179 | return x;
180 | break;
181 |
182 | case 1:
183 | return y;
184 | break;
185 |
186 | case 2:
187 | return z;
188 | break;
189 |
190 | default:
191 | return e;
192 | }
193 | }
194 |
195 | Vector &Vector::operator=(const Vector &vector) {
196 |
197 | // Return self if calling on self
198 | if(this == &vector)
199 | return *this;
200 |
201 | // Copy vector components
202 | x = vector.x;
203 | y = vector.y;
204 | z = vector.z;
205 | e = vector.e;
206 |
207 | // Return self
208 | return *this;
209 | }
210 |
--------------------------------------------------------------------------------
/installers/Windows/M3D_v2.inf:
--------------------------------------------------------------------------------
1 | ; Windows* setup file for M3D printer models ca. 2017.03
2 | ; *Intended for Windows versions 2000, XP, Vista, 7, 8 and 10 (x32 and x64)
3 | ; Copyright (c) 2014-2017 M3D
4 |
5 | [Version]
6 | Signature = "$Windows NT$"
7 |
8 | Class = Ports
9 | ClassGuid = {4D36E978-E325-11CE-BFC1-08002BE10318}
10 | Provider = %ManufacturerName%
11 |
12 | CatalogFile = M3D_v2.cat
13 | ; CatalogFile.NTx86 = M3D_v2_x86.cat
14 | ; CatalogFile.NTIA64 = M3D_v2_ia64.cat
15 | ; CatalogFile.NTAMD64 = M3D_v2_amd64.cat
16 | DriverVer = 03/27/2017,6.2.0.0
17 |
18 | ;----------------------------------------------------------
19 | ; Targets
20 | ;----------------------------------------------------------
21 | [Manufacturer]
22 | %ManufacturerName%=PrinterModels,NT,NTAMD64,NTIA64,NTARM,NTARM64
23 |
24 | [PrinterModels]
25 | %DeviceName_M1%=Device_Install, USB\VID_03EB&PID_2404
26 | %DeviceName_M2%=Device_Install, USB\VID_0483&PID_A21E
27 | %DeviceName_M3%=Device_Install, USB\VID_0483&PID_A21F
28 |
29 | [PrinterModels.NT]
30 | %DeviceName_M1%=Device_Install.NT, USB\VID_03EB&PID_2404
31 | %DeviceName_M2%=Device_Install.NT, USB\VID_0483&PID_A21E
32 | %DeviceName_M3%=Device_Install.NT, USB\VID_0483&PID_A21F
33 |
34 | [PrinterModels.NTAMD64]
35 | %DeviceName_M1%=Device_Install.NTAMD64, USB\VID_03EB&PID_2404
36 | %DeviceName_M2%=Device_Install.NTAMD64, USB\VID_0483&PID_A21E
37 | %DeviceName_M3%=Device_Install.NTAMD64, USB\VID_0483&PID_A21F
38 |
39 | [PrinterModels.NTIA64]
40 | %DeviceName_M1%=Device_Install.NTIA64, USB\VID_03EB&PID_2404
41 | %DeviceName_M2%=Device_Install.NTIA64, USB\VID_0483&PID_A21E
42 | %DeviceName_M3%=Device_Install.NTIA64, USB\VID_0483&PID_A21F
43 |
44 | [PrinterModels.NTARM]
45 | %DeviceName_M1%=Device_Install.NTARM, USB\VID_03EB&PID_2404
46 | %DeviceName_M2%=Device_Install.NTARM, USB\VID_0483&PID_A21E
47 | %DeviceName_M3%=Device_Install.NTARM, USB\VID_0483&PID_A21F
48 |
49 | [PrinterModels.NTARM64]
50 | %DeviceName_M1%=Device_Install.NTARM64, USB\VID_03EB&PID_2404
51 | %DeviceName_M2%=Device_Install.NTARM64, USB\VID_0483&PID_A21E
52 | %DeviceName_M3%=Device_Install.NTARM64, USB\VID_0483&PID_A21F
53 |
54 | [SourceDisksNames]
55 | 1 = %DiskName%
56 |
57 | [SourceDisksFiles]
58 | ; usbser.sys = 1,7_8_10
59 |
60 | ;----------------------------------------------------------
61 | ; Windows (2000 and later) - 32bit
62 | ; Windows (XP and later) - 64bit
63 | ;----------------------------------------------------------
64 | [Device_Install]
65 | CopyFiles=FakeModemCopyFileSection
66 | AddReg=Device_Install.NT.AddReg
67 | Include=mdmcpq.inf
68 |
69 | [Device_Install.NT]
70 | CopyFiles=FakeModemCopyFileSection
71 | AddReg=Device_Install.NT.AddReg
72 | Include=mdmcpq.inf
73 |
74 | [Device_Install.NTAMD64]
75 | CopyFiles=FakeModemCopyFileSection
76 | AddReg=Device_Install.NT.AddReg
77 | Include=mdmcpq.inf
78 |
79 | [Device_Install.NTIA64]
80 | CopyFiles=FakeModemCopyFileSection
81 | AddReg=Device_Install.NT.AddReg
82 | Include=mdmcpq.inf
83 |
84 | [Device_Install.NTARM]
85 | CopyFiles=FakeModemCopyFileSection
86 | AddReg=Device_Install.NT.AddReg
87 | Include=mdmcpq.inf
88 |
89 | [Device_Install.NTARM64]
90 | CopyFiles=FakeModemCopyFileSection
91 | AddReg=Device_Install.NT.AddReg
92 | Include=mdmcpq.inf
93 |
94 | [Device_Install.HW]
95 | ;
96 |
97 | [Device_Install.NT.HW]
98 | ;
99 |
100 | [Device_Install.NTAMD64.HW]
101 | ;
102 |
103 | [Device_Install.NTIA64.HW]
104 | ;
105 |
106 | [Device_Install.NTARM.HW]
107 | ;
108 |
109 | [Device_Install.NTARM64.HW]
110 | ;
111 |
112 | [Device_Install.NT.AddReg]
113 | HKR,,DevLoader,,*ntkern
114 | HKR,,NTMPDriver,,usbser.sys
115 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
116 |
117 | ; [Device_Install.NT.Copy]
118 | ; usbser.sys
119 |
120 | [Device_Install.Services]
121 | AddService = usbser, 0x00000002, WUDFRD_ServiceInstall
122 |
123 | [Device_Install.NT.Services]
124 | AddService = usbser, 0x00000002, WUDFRD_ServiceInstall
125 |
126 | [Device_Install.NTAMD64.Services]
127 | AddService = usbser, 0x00000002, WUDFRD_ServiceInstall
128 |
129 | [Device_Install.NTIA64.Services]
130 | AddService = usbser, 0x00000002, WUDFRD_ServiceInstall
131 |
132 | [Device_Install.NTARM.Services]
133 | AddService = usbser, 0x00000002, WUDFRD_ServiceInstall
134 |
135 | [Device_Install.NTARM64.Services]
136 | AddService = usbser, 0x00000002, WUDFRD_ServiceInstall
137 |
138 | [WUDFRD_ServiceInstall]
139 | DisplayName = %Serial.SvcDesc%
140 | ServiceType = 1 ; SERVICE_KERNEL_DRIVER
141 | StartType = 3 ; SERVICE_DEMAND_START
142 | ErrorControl = 1 ; SERVICE_ERROR_NORMAL
143 | ServiceBinary = %12%\usbser.sys
144 | LoadOrderGroup = Base
145 |
146 | ;--
147 | ;
148 | ;--
149 |
150 | [DestinationDirs]
151 | DefaultDestDir=12 ; DIRID_DRIVERS
152 | ; Device_Install.Copy=12,UMDF
153 | ; Device_Install.NT.Copy=12,UMDF
154 | ; Device_Install.NTAMD64.Copy=12,UMDF
155 | ; Device_Install.NTIA64.Copy=12,UMDF
156 | ; Device_Install.NTARM.Copy=12,UMDF
157 | ; Device_Install.NTARM64.Copy=12,UMDF
158 |
159 | ;----------------------------------------------------------
160 | ; String
161 | ;----------------------------------------------------------
162 |
163 | [Strings]
164 | ManufacturerName = "M3D"
165 | DeviceName_M1 = "The Micro 3D Printer"
166 | DeviceName_M2 = "Pro"
167 | DeviceName_M3 = "Micro+"
168 | DiskName = "M3D Driver Installation Package"
169 | Serial.SvcDesc = "USB Serial Emulation Driver"
170 |
171 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 |
3 | ########################################################################################################################
4 | ### Do not forget to adjust the following variables to your own plugin.
5 |
6 | # The plugin's identifier, has to be unique
7 | plugin_identifier = "m33fio"
8 |
9 | # The plugin's python package, should be "octoprint_", has to be unique
10 | plugin_package = "octoprint_m33fio"
11 |
12 | # The plugin's human readable name. Can be overwritten within OctoPrint's internal data via __plugin_name__ in the
13 | # plugin module
14 | plugin_name = "OctoPrint-M33Fio"
15 |
16 | # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
17 | plugin_version = "1.21"
18 |
19 | # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
20 | # module
21 | plugin_description = """Allows viewing uploaded models, using a Micro 3D printer, modifying a slicer profile and model before slicing, uploading OBJs and other 3D file formats, hosting a webcam stream, and much more"""
22 |
23 | # The plugin's author. Can be overwritten within OctoPrint's internal data via __plugin_author__ in the plugin module
24 | plugin_author = "donovan6000"
25 |
26 | # The plugin's author's mail address.
27 | plugin_author_email = "donovan6000@exploitkings.com"
28 |
29 | # The plugin's homepage URL. Can be overwritten within OctoPrint's internal data via __plugin_url__ in the plugin module
30 | plugin_url = "https://github.com/donovan6000/M33-Fio"
31 |
32 | # The plugin's license. Can be overwritten within OctoPrint's internal data via __plugin_license__ in the plugin module
33 | plugin_license = "GPLv3"
34 |
35 | # Any additional requirements besides OctoPrint should be listed here
36 | plugin_requires = []
37 |
38 | ### --------------------------------------------------------------------------------------------------------------------
39 | ### More advanced options that you usually shouldn't have to touch follow after this point
40 | ### --------------------------------------------------------------------------------------------------------------------
41 |
42 | # Additional package data to install for this plugin. The subfolders "templates", "static" and "translations" will
43 | # already be installed automatically if they exist.
44 | plugin_additional_data = []
45 |
46 | # Any additional python packages you need to install with your plugin that are not contained in .*
47 | plugin_additional_packages = []
48 |
49 | # Any python packages within .* you do NOT want to install with your plugin
50 | plugin_ignored_packages = []
51 |
52 | # Additional parameters for the call to setuptools.setup. If your plugin wants to register additional entry points,
53 | # define dependency links or other things like that, this is the place to go. Will be merged recursively with the
54 | # default setup parameters as provided by octoprint_setuptools.create_plugin_setup_parameters using
55 | # octoprint.util.dict_merge.
56 | #
57 | # Example:
58 | # plugin_requires = ["someDependency==dev"]
59 | # additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/master.zip#egg=someDependency-dev"]}
60 | additional_setup_parameters = {}
61 |
62 | ########################################################################################################################
63 |
64 | from setuptools import setup
65 | import os
66 | import sys
67 | import subprocess
68 |
69 | try:
70 | import octoprint_setuptools
71 | except:
72 | print("Could not import OctoPrint's setuptools, are you sure you are running that under "
73 | "the same python installation that OctoPrint is installed under?")
74 | import sys
75 | sys.exit(-1)
76 |
77 | setup_parameters = octoprint_setuptools.create_plugin_setup_parameters(
78 | identifier=plugin_identifier,
79 | package=plugin_package,
80 | name=plugin_name,
81 | version=plugin_version,
82 | description=plugin_description,
83 | author=plugin_author,
84 | mail=plugin_author_email,
85 | url=plugin_url,
86 | license=plugin_license,
87 | requires=plugin_requires,
88 | additional_packages=plugin_additional_packages,
89 | ignored_packages=plugin_ignored_packages,
90 | additional_data=plugin_additional_data
91 | )
92 |
93 | if len(additional_setup_parameters):
94 | from octoprint.util import dict_merge
95 | setup_parameters = dict_merge(setup_parameters, additional_setup_parameters)
96 |
97 | def findPip() :
98 |
99 | # Created by Gina Häußge
100 | # Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License
101 | python_command = sys.executable
102 | binary_dir = os.path.dirname(python_command)
103 |
104 | pip_command = os.path.join(binary_dir, "pip")
105 | if sys.platform == "win32":
106 | # Windows is a bit special... first of all the file will be called pip.exe, not just pip, and secondly
107 | # for a non-virtualenv install (e.g. global install) the pip binary will not be located in the
108 | # same folder as python.exe, but in a subfolder Scripts, e.g.
109 | #
110 | # C:\Python2.7\
111 | # |- python.exe
112 | # `- Scripts
113 | # `- pip.exe
114 |
115 | # virtual env?
116 | pip_command = os.path.join(binary_dir, "pip.exe")
117 |
118 | if not os.path.isfile(pip_command):
119 | # nope, let's try the Scripts folder then
120 | scripts_dir = os.path.join(binary_dir, "Scripts")
121 | if os.path.isdir(scripts_dir):
122 | pip_command = os.path.join(scripts_dir, "pip.exe")
123 |
124 | if not os.path.isfile(pip_command) or not os.access(pip_command, os.X_OK):
125 | pip_command = None
126 |
127 | return pip_command
128 |
129 | # Uninstall plugins that break M33 Fio if installing M33 Fio
130 | pipCommand = findPip()
131 | if pipCommand is not None and "install" in sys.argv :
132 | subprocess.call([pipCommand, "uninstall", "OctoPrint-M3DFio", "-y"])
133 | subprocess.call([pipCommand, "uninstall", "OctoPrint-Slicer", "-y"])
134 |
135 | setup(**setup_parameters)
136 |
--------------------------------------------------------------------------------
/tools/comparer.cpp:
--------------------------------------------------------------------------------
1 | // Header files
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | using namespace std;
9 |
10 |
11 | // Function prototypes
12 |
13 | // Trim
14 | string trim(const string &text) noexcept;
15 |
16 |
17 | // Main function
18 | int main(int argc, char *argv[]) noexcept {
19 |
20 | // Check if parameters are missing
21 | if(argc < 3) {
22 |
23 | // Display usage
24 | cout << "Missing parameters. Usage: comparer \"base profile\" \"converted and processed profile\"" << endl;
25 |
26 | // Exit failure
27 | return EXIT_FAILURE;
28 | }
29 |
30 | // Initialize settings
31 | unordered_map settings;
32 |
33 | // Check if opening base profile failed
34 | ifstream input(argv[1], ifstream::binary);
35 | if(!input) {
36 |
37 | // Display usage
38 | cout << "Base profile not found" << endl;
39 |
40 | // Exit failure
41 | return EXIT_FAILURE;
42 | }
43 |
44 | // Go through all lines in base profile
45 | while(input.peek() != ifstream::traits_type::eof()) {
46 |
47 | // Get line
48 | string line;
49 | getline(input, line);
50 | line = trim(line);
51 |
52 | // Check if line isn't empty or a comment
53 | if(!line.empty() && line.front() != '#') {
54 |
55 | // Extract name and value from line
56 | string name = trim(line.substr(0, line.find('=')));
57 | string value = trim(line.substr(line.find('=') + 1));
58 |
59 | // Check if value is multiline G-code
60 | if(value == "\"\"\"")
61 |
62 | // Get the rest of the value
63 | while(line != "\"\"\"") {
64 | getline(input, line);
65 | line = trim(line);
66 | value += line;
67 | }
68 |
69 | // Remove trailing zeros from decimal values
70 | string::size_type index = value.find_last_of('.');
71 | if(index != string::npos)
72 | if(stoi(value.substr(index)) == 0)
73 | value = value.substr(0, index);
74 |
75 | // Convert boolean values
76 | if(name == "coolHeadLift" || name == "supportEverywhere")
77 | value = to_string(stoi(value) ? 1 : 0);
78 |
79 | // set useless settings
80 | unordered_set uselessSettings {
81 | "extruderOffset[1].X",
82 | "extruderOffset[2].X",
83 | "extruderOffset[3].X",
84 | "extruderOffset[1].Y",
85 | "extruderOffset[2].Y",
86 | "extruderOffset[3].Y",
87 | "simpleMode",
88 | "skirtMinLength",
89 | "wipeTowerSize",
90 | "infillPattern",
91 | "retractionAmountPrime",
92 | "spiralizeMode",
93 | "enableOozeShield",
94 | "autoCenter"
95 | };
96 |
97 | // Add setting to list if it's not useless
98 | if(uselessSettings.find(name) == uselessSettings.end())
99 | settings[name] = value;
100 | }
101 | }
102 |
103 | // Check if opening converted profile that's been processed by OctoPrint's Cura Engine plugin failed
104 | input.close();
105 | input.open(argv[2], ifstream::binary);
106 | if(!input) {
107 |
108 | // Display usage
109 | cout << "Converted and processed profile not found" << endl;
110 |
111 | // Exit failure
112 | return EXIT_FAILURE;
113 | }
114 |
115 | // Go through all lines in converted profile
116 | while(input.peek() != ifstream::traits_type::eof()) {
117 |
118 | // Get line
119 | string line;
120 | getline(input, line);
121 | line = trim(line);
122 |
123 | // Check if line isn't empty or a comment
124 | if(!line.empty() && line.front() != '#') {
125 |
126 | // Extract name and value from line
127 | string name = trim(line.substr(0, line.find('=')));
128 | string value = trim(line.substr(line.find('=') + 1));
129 |
130 | // Remove trailing zeros from decimal values
131 | string::size_type index = value.find_last_of('.');
132 | if(index != string::npos && value.front() != ';')
133 | if(stoi(value.substr(index + 1)) == 0)
134 | value = value.substr(0, index);
135 |
136 | // Check if setting is added by OctoPrint and doesn't affect the resulting G-code
137 | if(name == "perimeterBeforeInfill" || name == "raftFanSpeed" || name == "skinSpeed" || name == "skirtDistance") {
138 |
139 | // Remove setting from list
140 | if(settings.count(name))
141 | settings.erase(name);
142 |
143 | // Get next line
144 | continue;
145 | }
146 |
147 | // Set useless settings
148 | unordered_set uselessSettings {
149 | "posx",
150 | "posy",
151 | "endCode",
152 | "startCode",
153 | "preSwitchExtruderCode",
154 | "postSwitchExtruderCode"
155 | };
156 |
157 | // Check if settings isn't useless
158 | if(uselessSettings.find(name) == uselessSettings.end()) {
159 |
160 | // Check if setting is new
161 | if(!settings.count(name))
162 |
163 | // Display new setting
164 | cout << "New: " << name << ' ' << value << endl;
165 |
166 | // Otherise check if setting isn't correct
167 | else if(settings[name] != value) {
168 |
169 | // Initialize wrong
170 | bool wrong = true;
171 |
172 | // Check if setting is down skin count and it's greater than expected value
173 | if(name == "downSkinCount" && stoi(value) > stoi(settings[name]))
174 |
175 | // Clear wrong
176 | wrong = false;
177 |
178 | // Otherwise check if setting is initial layer speed and it's less than expected value
179 | else if(name == "initialLayerSpeed" && stoi(value) < stoi(settings[name]))
180 |
181 | // Clear wrong
182 | wrong = false;
183 |
184 | // Otherwise check if setting is raft surface speed and it's less than expected value
185 | else if(name == "raftSurfaceSpeed" && stoi(value) < stoi(settings[name]))
186 |
187 | // Clear wrong
188 | wrong = false;
189 |
190 | // Check if setting is wrong
191 | if(wrong)
192 |
193 | // display wrong setting
194 | cout << "Wrong: " << name << ' ' << settings[name] << ' ' << value << endl;
195 | }
196 | }
197 |
198 | // Remove setting from list
199 | if(settings.count(name))
200 | settings.erase(name);
201 | }
202 | }
203 |
204 | // Display missing settings
205 | for(const decltype(settings)::value_type &setting : settings)
206 | cout << "Missing: " << setting.first << ' ' << setting.second << endl;
207 |
208 | // Return successfully
209 | return EXIT_SUCCESS;
210 | }
211 |
212 |
213 | // Supporting function implementation
214 | string trim(const string &text) noexcept {
215 |
216 | // Get start and end of text without white space
217 | string::const_iterator begin = find_if_not(text.begin(), text.end(), [](char character) noexcept {
218 | return isspace(character);
219 | });
220 |
221 | string::const_iterator end = find_if_not(text.rbegin(), text.rend(), [](char character) noexcept {
222 | return isspace(character);
223 | }).base();
224 |
225 | // Check if text only contains whitespace
226 | if(end <= begin)
227 |
228 | // Return an empty string
229 | return "";
230 |
231 | // Return text without leading and trailing white space
232 | return string(begin, end);
233 | }
234 |
--------------------------------------------------------------------------------
/shared library source/preprocessor.h:
--------------------------------------------------------------------------------
1 | // Header guard
2 | #ifndef PREPROCESSOR_H
3 | #define PREPROCESSOR_H
4 |
5 |
6 | // Header files
7 | #include "gcode.h"
8 | #include "vector.h"
9 |
10 |
11 | // Shared library localization
12 | #ifdef _WIN32
13 | #define EXPORT __declspec(dllexport)
14 | #else
15 | #define EXPORT __attribute__((visibility("default")))
16 | #endif
17 |
18 |
19 | // Private function prototypes
20 |
21 | /*
22 | Name: Calculate plane normal vector
23 | Purpose: Calculates the plane normal vector formed between three vectors
24 | */
25 | Vector calculatePlaneNormalVector(const Vector &v1, const Vector &v2, const Vector &v3);
26 |
27 | /*
28 | Name: Generate plane equation
29 | Purpose: Generates the equation for the plane formed between three vectors
30 | */
31 | Vector generatePlaneEquation(const Vector &v1, const Vector &v2, const Vector &v3);
32 |
33 | /*
34 | Name: Create tack point
35 | Purpose: Creates a delay G-code command if necessary
36 | */
37 | Gcode createTackPoint(const Gcode &point, const Gcode &refrence);
38 |
39 | // C exports
40 | extern "C" {
41 |
42 | /*
43 | Name: Float as int
44 | Purpose: Return the value's integer representation
45 | */
46 | uint32_t floatToInt(float value);
47 |
48 | /*
49 | Name: Min
50 | Purpose: Returns the smaller of two numbers
51 | */
52 | double min(double first, double second);
53 |
54 | /*
55 | Name: Max
56 | Purpose: Returns the larger of two numbers
57 | */
58 | double max(double first, double second);
59 |
60 | /*
61 | Name: Get bounded temperature
62 | Purpose: Gets temperature bounded within a range
63 | */
64 | uint16_t getBoundedTemperature(uint16_t temperature, uint16_t maxTemperature);
65 |
66 | /*
67 | Name: Get distance
68 | Purpose: Returns the distance between two points
69 | */
70 | double getDistance(const Gcode &firstPoint, const Gcode &secondPoint);
71 |
72 | /*
73 | Name: Is sharp corner for thermal bonding
74 | Purpose: Returns if two points make a sharp corner for thermal bonding
75 | */
76 | bool isSharpCornerForThermalBonding(const Gcode &point, const Gcode &refrence);
77 |
78 | /*
79 | Name: Is sharp corner for wave bonding
80 | Purpose: Returns if two points make a sharp corner for wave bonding
81 | */
82 | bool isSharpCornerForWaveBonding(const Gcode &point, const Gcode &refrence);
83 |
84 | /*
85 | Name: Get current adjustment Z
86 | Purpose: Returns the current Z adjustment for wave bonding
87 | */
88 | double getCurrentAdjustmentZ();
89 |
90 | /*
91 | Name: Get height adjustment required
92 | Purpose: Gets the required height adjustment for bed compensation
93 | */
94 | double getHeightAdjustmentRequired(double x, double y);
95 |
96 | /*
97 | Name: Get Z from XY plane
98 | Purpose: Return the Z value of the plane formed between two vectors
99 | */
100 | double getZFromXYAndPlane(const Vector &point, const Vector &planeABC);
101 |
102 | /*
103 | Name: Is point in triangle
104 | Purpose: Returns if the point is inside the triangle formed by three vectors
105 | */
106 | bool isPointInTriangle(const Vector &pt, const Vector &v1, const Vector &v2, const Vector &v3);
107 |
108 | /*
109 | Name: Sign
110 | Purpose: Returns the sign formed by three vectors
111 | */
112 | double sign(const Vector &p1, const Vector &p2, const Vector &p3);
113 |
114 |
115 | // Exported function prototypes
116 |
117 | /*
118 | Name: Set values
119 | Purpose: Sets values to use in the pre-processor
120 | */
121 | EXPORT void setBacklashX(double value);
122 | EXPORT void setBacklashY(double value);
123 | EXPORT void setBacklashSpeed(double value);
124 | EXPORT void setBackRightOrientation(double value);
125 | EXPORT void setBackLeftOrientation(double value);
126 | EXPORT void setFrontLeftOrientation(double value);
127 | EXPORT void setFrontRightOrientation(double value);
128 | EXPORT void setBedHeightOffset(double value);
129 | EXPORT void setBackRightOffset(double value);
130 | EXPORT void setBackLeftOffset(double value);
131 | EXPORT void setFrontLeftOffset(double value);
132 | EXPORT void setFrontRightOffset(double value);
133 | EXPORT void setFilamentTemperature(unsigned short value);
134 | EXPORT void setFilamentType(const char *value);
135 | EXPORT void setUseValidationPreprocessor(bool value);
136 | EXPORT void setUsePreparationPreprocessor(bool value);
137 | EXPORT void setUseWaveBondingPreprocessor(bool value);
138 | EXPORT void setUseThermalBondingPreprocessor(bool value);
139 | EXPORT void setUseBedCompensationPreprocessor(bool value);
140 | EXPORT void setUseBacklashCompensationPreprocessor(bool value);
141 | EXPORT void setUseCenterModelPreprocessor(bool value);
142 | EXPORT void setIgnorePrintDimensionLimitations(bool value);
143 | EXPORT void setUsingHeatbed(bool value);
144 | EXPORT void setPrintingTestBorder(bool value);
145 | EXPORT void setPrintingBacklashCalibration(bool value);
146 | EXPORT void setPrinterColor(const char *value);
147 | EXPORT void setCalibrateBeforePrint(bool value);
148 | EXPORT void setRemoveFanCommands(bool value);
149 | EXPORT void setRemoveTemperatureCommands(bool value);
150 | EXPORT void setUseGpio(bool value);
151 | EXPORT void setGpioLayer(unsigned short value);
152 | EXPORT void setHeatbedTemperature(unsigned short value);
153 | EXPORT void setExternalBedHeight(double value);
154 | EXPORT void setExpandPrintableRegion(bool value);
155 | EXPORT void setMidPrintFilamentChangeLayers(const char *value);
156 | EXPORT void setChangeLedBrightness(bool value);
157 | EXPORT void setFirmwareType(const char *value);
158 | EXPORT void setSkewX(double value);
159 | EXPORT void setSkewY(double value);
160 | EXPORT void setUseSkewCompensationPreprocessor(bool value);
161 |
162 | /*
163 | Name: Get values
164 | Purpose: Returns values calculated by the pre-processor
165 | */
166 | EXPORT double getMaxXExtruderLow();
167 | EXPORT double getMaxXExtruderMedium();
168 | EXPORT double getMaxXExtruderHigh();
169 | EXPORT double getMaxYExtruderLow();
170 | EXPORT double getMaxYExtruderMedium();
171 | EXPORT double getMaxYExtruderHigh();
172 | EXPORT double getMaxZExtruder();
173 | EXPORT double getMinXExtruderLow();
174 | EXPORT double getMinXExtruderMedium();
175 | EXPORT double getMinXExtruderHigh();
176 | EXPORT double getMinYExtruderLow();
177 | EXPORT double getMinYExtruderMedium();
178 | EXPORT double getMinYExtruderHigh();
179 | EXPORT double getMinZExtruder();
180 |
181 | /*
182 | Name: Reset pre-processor settings
183 | Purpose: Resets settings used by the pre-processor
184 | */
185 | EXPORT void resetPreprocessorSettings();
186 |
187 | /*
188 | Name: Collect print information
189 | Purpose: Calculates the minimum and maximum dimensions of the file and returns if the file can successfully be printed
190 | */
191 | EXPORT bool collectPrintInformation(const char *file, bool applyPreprocessors);
192 |
193 | /*
194 | Name: Pre-process
195 | Purpose: Pre-processes a command or file and returns additional commands if pre-processing a command
196 | */
197 | EXPORT const char *preprocess(const char *input, const char *output = NULL, bool lastCommand = false);
198 |
199 | /*
200 | Name: Get detected fan speed
201 | Purpose: Returns the speed of the fan that the print uses
202 | */
203 | EXPORT unsigned char getDetectedFanSpeed();
204 |
205 | /*
206 | Name: Get detected mid-print filament change
207 | Purpose: Returns if the file contains mid-print filament change commands
208 | */
209 | EXPORT bool getDetectedMidPrintFilamentChange();
210 |
211 | /*
212 | Name: Get object successfully centered
213 | Purpose: Returns if the object has been centered
214 | */
215 | EXPORT bool getObjectSuccessfullyCentered();
216 | }
217 |
218 |
219 | #endif
220 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # M33 Fio
2 | © 2015-2017 Exploit Kings. All rights reserved.
3 |
4 | ### Description
5 | M33 Fio is a general purpose plugin for [OctoPrint](http://octoprint.org/) that extends its capabilities to include many useful feature like the ability to use a Micro 3D printer, modify a model before printing it, host a webcam stream, and much more.
6 |
7 | The latest version of M33 Fio is V1.21 released on August 4th, 2017, and an entire changelog for it can be found [here](https://raw.githubusercontent.com/donovan6000/M33-Fio/master/Changelog).
8 |
9 | ### Features
10 | * Adds a model viewer tab to OctoPrint's interface where any uploaded model can be viewed
11 | * Allows importing OBJ, M3D, AMF, VRML, COLLADA, and 3MF files into OctoPrint
12 | * Updates OctoPrint's list of available serial ports in real time
13 | * Includes an OctoPrint instance manager that can create and terminate OctoPrint instances which allows easily running multiple printers on the same host
14 | * Adds support for the [Micro 3D printer](https://www.kickstarter.com/projects/m3d/the-micro-the-first-truly-consumer-3d-printer)
15 | * Wraps groups of buttons in OctoPrint's controls tab into sections that can be collapsed and expanded
16 | * Capable of hosting a webcam stream and configuring OctoPrint to use it
17 | * Disables the hosts sleep functionality when printing
18 | * Includes a slicer profile editor that allows customizing everything in the selected slicer profile before slicing
19 | * Includes a model editor that allows modifying a model before slicing and can perform operations like moving, rotating, scaling, cutting, merging, clonging, and importing other models into the scene
20 | * Allows editing G-code files
21 |
22 | ### Installation
23 | There's installers available for [Windows](https://raw.githubusercontent.com/donovan6000/M33-Fio/master/installers/Windows/install.zip), [macOS](https://raw.githubusercontent.com/donovan6000/M33-Fio/master/installers/macOS/install.zip), and [Linux](https://raw.githubusercontent.com/donovan6000/M33-Fio/master/installers/Linux/install.zip) that install OctoPrint, M33 Fio, and device drivers for the Micro 3D printer and [Micro 3D compatible heatbed](https://www.kickstarter.com/projects/1668748285/the-micro-m3d-compatible-heated-print-bed). These installers all add OctoPrint as a startup program and create a shortcut on the desktop that allows accessing OctoPrint's user interface.
24 |
25 | If you already have OctoPrint installed, M33 Fio can be installed directly from OctoPrint's builtin plugin manager by searching for it in the plugin repository.
26 |
27 | ### Usage
28 | There's no additional setup required if your not using a Micro 3D printer. If you are using a Micro 3D printer then make sure to disable the Settings > M33 Fio > 'Not using a Micro 3D printer' setting to enable all of M33 Fio's features that are Micro 3D printer specific. M33 Fio has been designed to seamlessly integrate into OctoPrint's interface, so you'll experience all of M33 Fio's features by simply using OctoPrint like you normally would.
29 |
30 | ### Known Issues
31 | * Everything works in all versions of OctoPrint >= 1.2.0 except the Micro 3D printer connection routine which only works with versions of OctoPrint >= 1.2.5
32 | * Microsoft Internet Explorer 11 doesn't display webcam stream since it doesn't natively support MJPEG videos
33 | * Microsoft Internet Explorer 11 doesn't resize the slicer profile editor correctly
34 | * Microsoft Internet Explorer 11 doesn't insert a tab character when typing the tab key in the advanced section of the slicer profile editor since it doesn't support using the document.execCommand function with the "insertText" parameter
35 | * Microsoft Edge displays webcam stream as a still image
36 | * Can't host more than one webcam stream at a time since it always hosts on port 4999
37 |
38 | ### Translating
39 | If your interested in translating M33 Fio into a different language, you just need to create a [gettext PO file](https://en.wikipedia.org/wiki/Gettext) for your target language, translate all the text in that file, and bundle that file into M33 Fio. Creating an up-to-date PO file for a specific language can be done with the following commands. A list of language codes can be found [here](http://www.lingoes.net/en/translator/langcode.htm).
40 | ```
41 | python setup.py babel_refresh
42 | python setup.py babel_new --locale=
43 | ```
44 | That will generate a PO file at `translations//LC_MESSAGES/messages.po`. Once that PO file is fully translated into your target language it can be compiled and bundled into the plugin by running the following commands.
45 | ```
46 | python setup.py babel_compile
47 | python setup.py babel_bundle --locale=
48 | ```
49 | Stick to the following guidelines when translating text.
50 | * All text is HTML, so make sure you convert `&`, `<`, and `>` to `&`, `<`, and `>` respectively when they are used as character literals. Do not encode any other characters as HTML entities, and you shouldn't have to use any other HTML entities since the text uses UTF-8 encoding.
51 | * Keep whitespace, like newlines and tabs, formatted the same as they are in the source
52 | * Keep HTML tags, like `…`, the same as they are in the source
53 | * Keep placeholders, like `%(…)d` and `%(…)s` intact, but make sure to move them where they belong to in your target language
54 | * OctoPrint uses the informal version of languages, so try to follow that trend
55 |
56 | ### Images
57 | The slicer profile editor lets you quickly specify the quality and fill options of a print while still giving you the ability to fine tune every available setting.
58 | 
59 | The model editor allows manipulating a model before it's sliced. It can perform all the standard operations like moving, rotating, and scaling.
60 | 
61 | When using a Micro 3D printer, the model editor will change to visualize the printer's dimensions and boundaries.
62 | 
63 | It's easy to print more than one model at a time thanks to the model editor's cloning and importing features.
64 | 
65 | It's even possible to cut and merge models to allow printing files that couldn't normally be printed.
66 | 
67 | The model viewer allows easily seeing how any uploaded model looks.
68 | 
69 | ### Troubleshooting
70 | Q. I receive a message similar to, "It's recommended that you disable this server's sleep functionality while printing if it's not already disabled." What does this mean?
71 |
72 | A. M33 Fio attempts to prevent the server that it's running on from suspending/sleeping while printing, and that message gets displayed if it is unable to do so. Don't be too alarmed by this message since it doesn't mean that the server will go to sleep. It just means that M33 Fio can't prevent it from going to sleep.
73 | ___
74 | Q. How can I use this plugin with a Micro 3D printer?
75 |
76 | A. Disable the Settings > M33 Fio > 'Not using a Micro 3D printer' setting to enable all this plugin's Micro 3D specific functionality.
77 | ___
78 | Q. I can't connect to my Micro 3D printer. I receive an error similar to, "Unexpected error while connecting to serial port: AUTO SerialException: 'could not open port 'COM13': WindowsError(5, 'Access is denied.')'" every time I try to connect."
79 |
80 | A. Close M3D's official software if it's open, and make sure no other programs are currently using the printer. If the problem persists, then restart your computer.
81 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/js/STLLoader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author aleeper / http://adamleeper.com/
3 | * @author mrdoob / http://mrdoob.com/
4 | * @author gero3 / https://github.com/gero3
5 | * @author Mugen87 / https://github.com/Mugen87
6 | *
7 | * Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs.
8 | *
9 | * Supports both binary and ASCII encoded files, with automatic detection of type.
10 | *
11 | * The loader returns a non-indexed buffer geometry.
12 | *
13 | * Limitations:
14 | * Binary decoding supports "Magics" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL).
15 | * There is perhaps some question as to how valid it is to always assume little-endian-ness.
16 | * ASCII decoding assumes file is UTF-8.
17 | *
18 | * Usage:
19 | * var loader = new THREE.STLLoader();
20 | * loader.load( './models/stl/slotted_disk.stl', function ( geometry ) {
21 | * scene.add( new THREE.Mesh( geometry ) );
22 | * });
23 | *
24 | * For binary STLs geometry might contain colors for vertices. To use it:
25 | * // use the same code to load STL as above
26 | * if (geometry.hasColors) {
27 | * material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: THREE.VertexColors });
28 | * } else { .... }
29 | * var mesh = new THREE.Mesh( geometry, material );
30 | */
31 |
32 |
33 | THREE.STLLoader = function ( manager ) {
34 |
35 | this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
36 |
37 | };
38 |
39 | THREE.STLLoader.prototype = {
40 |
41 | constructor: THREE.STLLoader,
42 |
43 | load: function ( url, onLoad, onProgress, onError ) {
44 |
45 | var scope = this;
46 |
47 | var loader = new THREE.FileLoader( scope.manager );
48 | loader.setResponseType( 'arraybuffer' );
49 | loader.load( url, function ( text ) {
50 |
51 | onLoad( scope.parse( text ) );
52 |
53 | }, onProgress, onError );
54 |
55 | },
56 |
57 | parse: function ( data ) {
58 |
59 | var isBinary = function () {
60 |
61 | var expect, face_size, n_faces, reader;
62 | reader = new DataView( binData );
63 | face_size = ( 32 / 8 * 3 ) + ( ( 32 / 8 * 3 ) * 3 ) + ( 16 / 8 );
64 | n_faces = reader.getUint32( 80, true );
65 | expect = 80 + ( 32 / 8 ) + ( n_faces * face_size );
66 |
67 | if ( expect === reader.byteLength ) {
68 |
69 | return true;
70 |
71 | }
72 |
73 | // An ASCII STL data must begin with 'solid ' as the first six bytes.
74 | // However, ASCII STLs lacking the SPACE after the 'd' are known to be
75 | // plentiful. So, check the first 5 bytes for 'solid'.
76 |
77 | // US-ASCII ordinal values for 's', 'o', 'l', 'i', 'd'
78 | var solid = [ 115, 111, 108, 105, 100 ];
79 |
80 | for ( var i = 0; i < 5; i ++ ) {
81 |
82 | // If solid[ i ] does not match the i-th byte, then it is not an
83 | // ASCII STL; hence, it is binary and return true.
84 |
85 | if ( solid[ i ] != reader.getUint8( i, false ) ) return true;
86 |
87 | }
88 |
89 | // First 5 bytes read "solid"; declare it to be an ASCII STL
90 | return false;
91 |
92 | };
93 |
94 | var binData = this.ensureBinary( data );
95 |
96 | return isBinary() ? this.parseBinary( binData ) : this.parseASCII( this.ensureString( data ) );
97 |
98 | },
99 |
100 | parseBinary: function ( data ) {
101 |
102 | var reader = new DataView( data );
103 | var faces = reader.getUint32( 80, true );
104 |
105 | var r, g, b, hasColors = false, colors;
106 | var defaultR, defaultG, defaultB, alpha;
107 |
108 | // process STL header
109 | // check for default color in header ("COLOR=rgba" sequence).
110 |
111 | for ( var index = 0; index < 80 - 10; index ++ ) {
112 |
113 | if ( ( reader.getUint32( index, false ) == 0x434F4C4F /*COLO*/ ) &&
114 | ( reader.getUint8( index + 4 ) == 0x52 /*'R'*/ ) &&
115 | ( reader.getUint8( index + 5 ) == 0x3D /*'='*/ ) ) {
116 |
117 | hasColors = true;
118 | colors = [];
119 |
120 | defaultR = reader.getUint8( index + 6 ) / 255;
121 | defaultG = reader.getUint8( index + 7 ) / 255;
122 | defaultB = reader.getUint8( index + 8 ) / 255;
123 | alpha = reader.getUint8( index + 9 ) / 255;
124 |
125 | }
126 |
127 | }
128 |
129 | var dataOffset = 84;
130 | var faceLength = 12 * 4 + 2;
131 |
132 | var geometry = new THREE.BufferGeometry();
133 |
134 | var vertices = [];
135 | var normals = [];
136 |
137 | for ( var face = 0; face < faces; face ++ ) {
138 |
139 | var start = dataOffset + face * faceLength;
140 | var normalX = reader.getFloat32( start, true );
141 | var normalY = reader.getFloat32( start + 4, true );
142 | var normalZ = reader.getFloat32( start + 8, true );
143 |
144 | if ( hasColors ) {
145 |
146 | var packedColor = reader.getUint16( start + 48, true );
147 |
148 | if ( ( packedColor & 0x8000 ) === 0 ) {
149 |
150 | // facet has its own unique color
151 |
152 | r = ( packedColor & 0x1F ) / 31;
153 | g = ( ( packedColor >> 5 ) & 0x1F ) / 31;
154 | b = ( ( packedColor >> 10 ) & 0x1F ) / 31;
155 |
156 | } else {
157 |
158 | r = defaultR;
159 | g = defaultG;
160 | b = defaultB;
161 |
162 | }
163 |
164 | }
165 |
166 | for ( var i = 1; i <= 3; i ++ ) {
167 |
168 | var vertexstart = start + i * 12;
169 |
170 | vertices.push( reader.getFloat32( vertexstart, true ) );
171 | vertices.push( reader.getFloat32( vertexstart + 4, true ) );
172 | vertices.push( reader.getFloat32( vertexstart + 8, true ) );
173 |
174 | normals.push( normalX, normalY, normalZ );
175 |
176 | if ( hasColors ) {
177 |
178 | colors.push( r, g, b );
179 |
180 | }
181 |
182 | }
183 |
184 | }
185 |
186 | geometry.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( vertices ), 3 ) );
187 | geometry.addAttribute( 'normal', new THREE.BufferAttribute( new Float32Array( normals ), 3 ) );
188 |
189 | if ( hasColors ) {
190 |
191 | geometry.addAttribute( 'color', new THREE.BufferAttribute( new Float32Array( colors ), 3 ) );
192 | geometry.hasColors = true;
193 | geometry.alpha = alpha;
194 |
195 | }
196 |
197 | return geometry;
198 |
199 | },
200 |
201 | parseASCII: function ( data ) {
202 |
203 | var geometry, length, patternFace, patternNormal, patternVertex, result, text;
204 | geometry = new THREE.BufferGeometry();
205 | patternFace = /facet([\s\S]*?)endfacet/g;
206 |
207 | var vertices = [];
208 | var normals = [];
209 |
210 | var normal = new THREE.Vector3();
211 |
212 | while ( ( result = patternFace.exec( data ) ) !== null ) {
213 |
214 | text = result[ 0 ];
215 | patternNormal = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
216 |
217 | while ( ( result = patternNormal.exec( text ) ) !== null ) {
218 |
219 | normal.x = parseFloat( result[ 1 ] );
220 | normal.y = parseFloat( result[ 3 ] );
221 | normal.z = parseFloat( result[ 5 ] );
222 |
223 | }
224 |
225 | patternVertex = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
226 |
227 | while ( ( result = patternVertex.exec( text ) ) !== null ) {
228 |
229 | vertices.push( parseFloat( result[ 1 ] ), parseFloat( result[ 3 ] ), parseFloat( result[ 5 ] ) );
230 | normals.push( normal.x, normal.y, normal.z );
231 |
232 | }
233 |
234 | }
235 |
236 | geometry.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( vertices ), 3 ) );
237 | geometry.addAttribute( 'normal', new THREE.BufferAttribute( new Float32Array( normals ), 3 ) );
238 |
239 | return geometry;
240 |
241 | },
242 |
243 | ensureString: function ( buf ) {
244 |
245 | if ( typeof buf !== "string" ) {
246 |
247 | var array_buffer = new Uint8Array( buf );
248 | var strArray = [];
249 | for ( var i = 0; i < buf.byteLength; i ++ ) {
250 |
251 | strArray.push(String.fromCharCode( array_buffer[ i ] )); // implicitly assumes little-endian
252 |
253 | }
254 | return strArray.join('');
255 |
256 | } else {
257 |
258 | return buf;
259 |
260 | }
261 |
262 | },
263 |
264 | ensureBinary: function ( buf ) {
265 |
266 | if ( typeof buf === "string" ) {
267 |
268 | var array_buffer = new Uint8Array( buf.length );
269 | for ( var i = 0; i < buf.length; i ++ ) {
270 |
271 | array_buffer[ i ] = buf.charCodeAt( i ) & 0xff; // implicitly assumes little-endian
272 |
273 | }
274 | return array_buffer.buffer || array_buffer;
275 |
276 | } else {
277 |
278 | return buf;
279 |
280 | }
281 |
282 | }
283 |
284 | };
285 |
--------------------------------------------------------------------------------
/installers/macOS/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Request elevated privileges
4 | [ "$(whoami)" != "root" ] && exec sudo "$0" "$@"
5 |
6 | # Check if not run as root
7 | if [ "$(id -u)" != "0" ]; then
8 |
9 | # Display message
10 | echo
11 | echo 'Root privileges required.'
12 | echo
13 |
14 | # Otherwise
15 | else
16 |
17 | # Check if connected to the internet
18 | ping -q -t5 -W1 -c1 google.com
19 | if [ $? -eq 0 ]; then
20 |
21 | # Move to temporary location
22 | cd "$TMPDIR"
23 |
24 | # Stop OctoPrint
25 | sudo -u $SUDO_USER launchctl unload /Library/LaunchAgents/com.octoprint.app.plist
26 |
27 | # Install Python
28 | while ! curl -f -o index.html 'https://www.python.org/downloads/mac-osx/'
29 | do
30 | :
31 | done
32 | version="$(perl -nle'print $1 if m/Latest Python 2 Release \- Python ([0-9\.]+)/' index.html)"
33 | rm index.html
34 | while ! curl -f -o python.pkg 'https://www.python.org/ftp/python/'"${version}"'/python-'"${version}"'-macosx10.6.pkg'
35 | do
36 | :
37 | done
38 | while ! installer -allowUntrusted -pkg python.pkg -target /
39 | do
40 | :
41 | done
42 | rm python.pkg
43 |
44 | # Install pip
45 | while ! curl -f -O 'https://bootstrap.pypa.io/get-pip.py'
46 | do
47 | :
48 | done
49 | sudo su <pyobjc\-core\-/' index.html | head -1)"
81 | rm index.html
82 | while ! curl -f -o pyobjc-core.tar.gz ''"${url}"''
83 | do
84 | :
85 | done
86 | sudo -u $SUDO_USER tar zxvf pyobjc-core.tar.gz
87 | rm pyobjc-core.tar.gz
88 | cd pyobjc-core-${version}
89 |
90 | # Patch installer to fix compiling issues
91 | sudo -u $SUDO_USER sed -i '' -e 's/def get_sdk_level()\:/def get_sdk_level()\:\
92 | return None/g' setup.py
93 | sudo -u $SUDO_USER sed -i '' -e 's/if os\.path\.exists('\''\/usr\/bin\/xcodebuild'\'')\:/if False and os\.path\.exists('\''\/usr\/bin\/xcodebuild'\'')\:/g' setup.py
94 |
95 | while ! sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install --user
96 | do
97 | :
98 | done
99 | cd ..
100 | rm -rf pyobjc-core-${version}
101 |
102 | # Install PyObjC Cocoa framework
103 | while ! curl -f -o index.html 'https://pypi.python.org/pypi/pyobjc-framework-Cocoa'
104 | do
105 | :
106 | done
107 | version="$(perl -nle'print $1 if m/pyobjc\-framework\-Cocoa\-([0-9\.]+)\.tar\.gz/' index.html | head -1)"
108 | url="$(perl -nle'print $1 if m/\pyobjc\-framework\-Cocoa\-/' index.html | head -1)"
109 | rm index.html
110 | while ! curl -f -o pyobjc-framework-Cocoa.tar.gz ''"${url}"''
111 | do
112 | :
113 | done
114 | sudo -u $SUDO_USER tar zxvf pyobjc-framework-Cocoa.tar.gz
115 | rm pyobjc-framework-Cocoa.tar.gz
116 | cd pyobjc-framework-Cocoa-${version}
117 |
118 | # Patch installer to fix compiling issues
119 | sudo -u $SUDO_USER sed -i '' -e 's/def get_sdk_level()\:/def get_sdk_level()\:\
120 | return None/g' pyobjc_setup.py
121 | sudo -u $SUDO_USER sed -i '' -e 's/xcodebuild \-version \-sdk macosx Path/echo "\/"/g' pyobjc_setup.py
122 |
123 | while ! sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install --user
124 | do
125 | :
126 | done
127 | cd ..
128 | rm -rf pyobjc-framework-Cocoa-${version}
129 |
130 | # Install PyObjC Quartz framework
131 | while ! curl -f -o index.html 'https://pypi.python.org/pypi/pyobjc-framework-Quartz'
132 | do
133 | :
134 | done
135 | version="$(perl -nle'print $1 if m/pyobjc\-framework\-Quartz\-([0-9\.]+)\.tar\.gz/' index.html | head -1)"
136 | url="$(perl -nle'print $1 if m/\pyobjc\-framework\-Quartz\-/' index.html | head -1)"
137 | rm index.html
138 | while ! curl -f -o pyobjc-framework-Quartz.tar.gz ''"${url}"''
139 | do
140 | :
141 | done
142 | sudo -u $SUDO_USER tar zxvf pyobjc-framework-Quartz.tar.gz
143 | rm pyobjc-framework-Quartz.tar.gz
144 | cd pyobjc-framework-Quartz-${version}
145 |
146 | # Patch installer to fix compiling issues
147 | sudo -u $SUDO_USER sed -i '' -e 's/def get_sdk_level()\:/def get_sdk_level()\:\
148 | return None/g' pyobjc_setup.py
149 | sudo -u $SUDO_USER sed -i '' -e 's/xcodebuild \-version \-sdk macosx Path/echo "\/"/g' pyobjc_setup.py
150 |
151 | while ! sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install --user
152 | do
153 | :
154 | done
155 | cd ..
156 | rm -rf pyobjc-framework-Quartz-${version}
157 |
158 | # Install PyObjC QTKit framework
159 | while ! curl -f -o index.html 'https://pypi.python.org/pypi/pyobjc-framework-QTKit'
160 | do
161 | :
162 | done
163 | version="$(perl -nle'print $1 if m/pyobjc\-framework\-QTKit\-([0-9\.]+)\.tar\.gz/' index.html | head -1)"
164 | url="$(perl -nle'print $1 if m/\pyobjc\-framework\-QTKit\-/' index.html | head -1)"
165 | rm index.html
166 | while ! curl -f -o pyobjc-framework-QTKit.tar.gz ''"${url}"''
167 | do
168 | :
169 | done
170 | sudo -u $SUDO_USER tar zxvf pyobjc-framework-QTKit.tar.gz
171 | rm pyobjc-framework-QTKit.tar.gz
172 | cd pyobjc-framework-QTKit-${version}
173 |
174 | # Patch installer to fix compiling issues
175 | sudo -u $SUDO_USER sed -i '' -e 's/def get_sdk_level()\:/def get_sdk_level()\:\
176 | return None/g' pyobjc_setup.py
177 | sudo -u $SUDO_USER sed -i '' -e 's/xcodebuild \-version \-sdk macosx Path/echo "\/"/g' pyobjc_setup.py
178 |
179 | while ! sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install --user
180 | do
181 | :
182 | done
183 | cd ..
184 | rm -rf pyobjc-framework-QTKit-${version}
185 |
186 | # Install OctoPrint
187 | while ! curl -f -LOk 'https://github.com/foosel/OctoPrint/archive/master.zip'
188 | do
189 | :
190 | done
191 | sudo -u $SUDO_USER unzip master.zip
192 | cd OctoPrint-master
193 | while ! sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install --user
194 | do
195 | :
196 | done
197 | cd ..
198 | sudo -u $SUDO_USER mkdir -p '/Users/'"$SUDO_USER"'/Library/Application Support/OctoPrint'
199 | rm -rf '/Users/'"$SUDO_USER"'/Library/Application Support/OctoPrint/checkout'
200 | #sudo -u $SUDO_USER mv OctoPrint-master '/Users/'"$SUDO_USER"'/Library/Application Support/OctoPrint/checkout'
201 | rm -rf OctoPrint-master
202 | rm master.zip
203 |
204 | # Install M33 Fio
205 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall OctoPrint-M3DFio
206 | do
207 | :
208 | done
209 | while echo 'y' | sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip uninstall OctoPrint-M33Fio
210 | do
211 | :
212 | done
213 | while ! curl -f -LOk 'https://github.com/donovan6000/M33-Fio/archive/master.zip'
214 | do
215 | :
216 | done
217 | while ! sudo -u $SUDO_USER /Library/Frameworks/Python.framework/Versions/2.7/bin/pip install master.zip --user
218 | do
219 | :
220 | done
221 | rm master.zip
222 |
223 | # Install heatbed drivers
224 | while ! curl -f -O 'https://raw.githubusercontent.com/donovan6000/M33-Fio/master/installers/macOS/CH34x_Install.pkg'
225 | do
226 | :
227 | done
228 | while ! installer -allowUntrusted -pkg CH34x_Install.pkg -target /
229 | do
230 | :
231 | done
232 | rm CH34x_Install.pkg
233 |
234 | # Add OctoPrint to startup programs
235 | while ! curl -f -O 'https://raw.githubusercontent.com/donovan6000/M33-Fio/master/installers/macOS/com.octoprint.app.plist'
236 | do
237 | :
238 | done
239 | sed -i '' -e 's/path to octoprint/\/Users\/'"$SUDO_USER"'\/Library\/Python\/2.7\/bin\/octoprint/g' com.octoprint.app.plist
240 | mv com.octoprint.app.plist '/Library/LaunchAgents'
241 |
242 | # Create URL link on desktop
243 | while ! curl -f -O 'https://raw.githubusercontent.com/donovan6000/M33-Fio/master/installers/macOS/shortcut.zip'
244 | do
245 | :
246 | done
247 | sudo -u $SUDO_USER ditto -x -k --sequesterRsrc --rsrc shortcut.zip '/Users/'"$SUDO_USER"'/Desktop'
248 | rm shortcut.zip
249 |
250 | # Start OctoPrint
251 | rm -rf '/Users/'"$SUDO_USER"'/.python-eggs'
252 | sudo -u $SUDO_USER launchctl load /Library/LaunchAgents/com.octoprint.app.plist
253 |
254 | # Display message
255 | echo
256 | echo 'OctoPrint and M33 Fio have been successfully installed. Go to http://localhost:5000 in any web browser to access OctoPrint.'
257 | echo
258 |
259 | # Otherwise
260 | else
261 |
262 | # Display message
263 | echo
264 | echo 'An internet connection is required.'
265 | echo
266 | fi
267 | fi
268 |
--------------------------------------------------------------------------------
/octoprint_m33fio/webcam_server.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: UTF-8 -*-
3 |
4 |
5 | # Imports
6 | import sys
7 | import time
8 | import platform
9 | import threading
10 | import BaseHTTPServer
11 | import SocketServer
12 | import socket
13 |
14 | # Check if using Windows, Linux, or FreeBSD
15 | if platform.uname()[0].startswith("Windows") or platform.uname()[0].startswith("Linux") or platform.uname()[0].startswith("FreeBSD") :
16 |
17 | # Import webcam libraries
18 | import StringIO
19 | from PIL import Image
20 | import pygame.camera
21 |
22 | # Otherwise check if using macOS
23 | elif platform.uname()[0].startswith("Darwin") :
24 |
25 | # Import macOS frameworks
26 | from io import BytesIO
27 | from AppKit import *
28 | from PyObjCTools import AppHelper
29 | from Quartz import *
30 | import QTKit
31 |
32 |
33 | # Check if asking for help
34 | if len(sys.argv) == 2 and (sys.argv[1] == "-h" or sys.argv[1] == "--help") :
35 |
36 | # Display usage
37 | print "Webcam Server: Hosts a webcam's stream and snapshot at /stream.mjpg and /snapshot.jpg\nUsage: python webcam_server.py camera httpPort framesPerSecond width height"
38 |
39 | # Otherwise
40 | else :
41 |
42 | # Check if pygame camers is usable
43 | if "pygame.camera" in sys.modules :
44 |
45 | # Initialize pygame camera
46 | pygame.camera.init()
47 |
48 | # Check if no cameras are detected
49 | if not len(pygame.camera.list_cameras()) :
50 |
51 | # Display message
52 | print "No cameras detected"
53 |
54 | # Exit
55 | exit()
56 |
57 | # Set default camera port
58 | cameraPort = pygame.camera.list_cameras()[0]
59 |
60 | # Otherwise check if QTKit is usable
61 | elif "QTKit" in sys.modules :
62 |
63 | # Check if no cameras are detected
64 | if not len(QTKit.QTCaptureDevice.inputDevices()) :
65 |
66 | # Display message
67 | print "No cameras detected"
68 |
69 | # Exit
70 | exit()
71 |
72 | # Set default camera port
73 | cameraPort = str(QTKit.QTCaptureDevice.inputDevices()[0])
74 |
75 | # Initialize variables
76 | currentFrame = None
77 |
78 | # Set camera port
79 | if len(sys.argv) >= 2 :
80 | cameraPort = sys.argv[1]
81 |
82 | # Set HTTP port
83 | if len(sys.argv) >= 3 :
84 | httpPort = int(sys.argv[2])
85 | else :
86 | httpPort = 4999
87 |
88 | # Set camera frame delay
89 | if len(sys.argv) >= 4 :
90 | cameraFrameDelay = 1.0 / int(sys.argv[3])
91 | else :
92 | cameraFrameDelay = 1.0 / 20
93 |
94 | # Set camera width
95 | if len(sys.argv) >= 5 :
96 | cameraWidth = int(sys.argv[4])
97 | else :
98 | cameraWidth = 640
99 |
100 | # Set camera height
101 | if len(sys.argv) >= 6 :
102 | cameraHeight = int(sys.argv[5])
103 | else :
104 | cameraHeight = 480
105 |
106 | # Create request handler
107 | class requestHandler(BaseHTTPServer.BaseHTTPRequestHandler) :
108 |
109 | # GET request
110 | def do_GET(self) :
111 |
112 | # Wait until a frame has been obtained
113 | while currentFrame is None :
114 | time.sleep(0.1)
115 |
116 | # Check if requesting snapshot
117 | if self.path.split("?")[0] == "/snapshot.jpg" :
118 |
119 | # Send current frame header
120 | self.send_response(200)
121 | self.wfile.write("Content-Type: image/jpeg\r\n")
122 | self.wfile.write("Content-Length: " + str(len(currentFrame)))
123 | self.wfile.write("\r\n\r\n")
124 |
125 | # Send current frame
126 | self.wfile.write(currentFrame)
127 |
128 | # Otherwise check if requesting stream
129 | elif self.path.split("?")[0] == "/stream.mjpg" :
130 |
131 | # Send header
132 | self.send_response(200)
133 | self.wfile.write("Content-Type: multipart/x-mixed-replace;boundary=--frame")
134 |
135 | # Loop forever
136 | while True :
137 |
138 | try :
139 |
140 | # Send current frame header
141 | self.wfile.write("\r\n\r\n")
142 | self.wfile.write("--frame\r\n")
143 | self.wfile.write("Content-Type: image/jpeg\r\n")
144 | self.wfile.write("Content-Length: " + str(len(currentFrame)))
145 | self.wfile.write("\r\n\r\n")
146 |
147 | # Send current frame
148 | self.wfile.write(currentFrame)
149 |
150 | # Delay
151 | time.sleep(cameraFrameDelay)
152 |
153 | except :
154 | break
155 |
156 | # Otherwise
157 | else :
158 |
159 | # Respond with error 404
160 | self.send_response(404)
161 | self.wfile.write("\r\n\r\n")
162 |
163 | # Create threaded HTTP server
164 | class ThreadedHTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer) :
165 |
166 | # On bind
167 | def server_bind(self) :
168 |
169 | # Enable reuse address
170 | if hasattr(socket, "SOL_SOCKET") and hasattr(socket, "SO_REUSEADDR") :
171 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
172 |
173 | # Enable reuse port
174 | if hasattr(socket, "SOL_SOCKET") and hasattr(socket, "SO_REUSEPORT") :
175 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
176 |
177 | # Bind
178 | BaseHTTPServer.HTTPServer.server_bind(self)
179 |
180 | # Start server
181 | try :
182 | server = ThreadedHTTPServer(("", httpPort), requestHandler)
183 | except :
184 |
185 | # Exit
186 | exit()
187 |
188 | serverThread = threading.Thread(target = server.serve_forever)
189 | serverThread.daemon = True
190 | serverThread.start()
191 |
192 | # Get IP address
193 | try :
194 | ipAddress = [l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][:1], [[(s.connect(("8.8.8.8", 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) if l][0][0]
195 | except :
196 | try :
197 | ipAddress = socket.gethostbyname(socket.gethostname())
198 | except :
199 | ipAddress = socket.gethostbyname("localhost")
200 |
201 | # Display hosting information
202 | print "Using webcam device " + str(cameraPort) + " with a resolution of " + str(cameraWidth) + "x" + str(cameraHeight) + " running at " + str(int(1.0 / cameraFrameDelay)) + " frames/second"
203 | print "Hosting webcam still image at http://" + ipAddress + ":" + str(httpPort) + "/snapshot.jpg"
204 | print "Hosting webcam video stream at http://" + ipAddress + ":" + str(httpPort) + "/stream.mjpg"
205 |
206 | # Check if pygame camera is usable
207 | if "pygame.camera" in sys.modules :
208 |
209 | # Check if camera isn't detected
210 | if platform.uname()[0].startswith("Windows") :
211 | cameraPort = int(cameraPort)
212 | if cameraPort not in pygame.camera.list_cameras() :
213 |
214 | # Display message
215 | print "Camera not detected"
216 |
217 | # Exit
218 | exit()
219 |
220 | # Start camera
221 | camera = pygame.camera.Camera(cameraPort, (cameraWidth, cameraHeight))
222 | camera.start()
223 |
224 | # Initialize variables
225 | cameraImage = pygame.Surface((cameraWidth, cameraHeight))
226 |
227 | # Stabilize lighting
228 | for i in xrange(30) :
229 | camera.get_image()
230 |
231 | # Loop forever
232 | while True :
233 |
234 | try :
235 |
236 | # Get image from camera
237 | camera.get_image(cameraImage)
238 |
239 | # Convert image to a JPEG
240 | rawImage = Image.frombytes("RGB", (cameraWidth, cameraHeight), pygame.image.tostring(cameraImage, "RGB", False))
241 | buffer = StringIO.StringIO()
242 | rawImage.save(buffer, "JPEG")
243 |
244 | # Update current frame
245 | currentFrame = buffer.getvalue()
246 |
247 | # Delay
248 | time.sleep(cameraFrameDelay)
249 |
250 | except :
251 | break
252 |
253 | # Otherwise check if QTKit is usable
254 | elif "QTKit" in sys.modules :
255 |
256 | # Camera class
257 | class Camera(NSObject) :
258 |
259 | # Loop
260 | def loop(self) :
261 |
262 | # Check if camera isn't detected
263 | cameras = []
264 | for camera in QTKit.QTCaptureDevice.inputDevices() :
265 | cameras += [str(camera)]
266 | if cameraPort not in cameras :
267 |
268 | # Display message
269 | print "Camera not detected"
270 |
271 | # Exit
272 | exit()
273 |
274 | # Initialize camera
275 | camera = QTKit.QTCaptureDevice.inputDevices()[cameras.index(cameraPort)]
276 | error = None
277 | if not camera.open_(error) :
278 | exit()
279 |
280 | # Create capture session
281 | captureSession = QTKit.QTCaptureSession.alloc().init()
282 |
283 | # Create input device from camera
284 | inputDevice = QTKit.QTCaptureDeviceInput.alloc().initWithDevice_(camera)
285 | if not captureSession.addInput_error_(inputDevice, error) :
286 | exit()
287 |
288 | # Create output device
289 | outputDevice = QTKit.QTCaptureDecompressedVideoOutput.alloc().init()
290 |
291 | # Set fames/second
292 | outputDevice.setMinimumVideoFrameInterval_(cameraFrameDelay)
293 | outputDevice.setAutomaticallyDropsLateVideoFrames_(True)
294 |
295 | # Set camera size
296 | outputDevice.setPixelBufferAttributes_({
297 | kCVPixelBufferWidthKey: cameraWidth,
298 | kCVPixelBufferHeightKey: cameraHeight
299 | })
300 |
301 | # Delegate frame task
302 | outputDevice.setDelegate_(self)
303 | if not captureSession.addOutput_error_(outputDevice, error) :
304 | exit()
305 |
306 | # Start the capture session
307 | captureSession.startRunning()
308 |
309 | # Start main loop
310 | AppHelper.runConsoleEventLoop(installInterrupt = True)
311 |
312 | # Capture video frame
313 | def captureOutput_didOutputVideoFrame_withSampleBuffer_fromConnection_(self, captureOutput, videoFrame, sampleBuffer, connection) :
314 |
315 | # Convert frame to a JPEG
316 | rawImage = CIImage.imageWithCVImageBuffer_(videoFrame)
317 | bitmapRepresentation = NSBitmapImageRep.alloc().initWithCIImage_(rawImage)
318 | bitmapData = bitmapRepresentation.representationUsingType_properties_(NSJPEGFileType, {
319 | NSImageCompressionFactor: 1.0
320 | })
321 |
322 | # Update current frame
323 | output = BytesIO(bitmapData.bytes())
324 | global currentFrame
325 | currentFrame = output.getvalue()
326 | output.close()
327 |
328 | # Camera loop
329 | Camera.alloc().loop()
330 |
--------------------------------------------------------------------------------
/octoprint_m33fio/static/js/AMFLoader.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @author tamarintech / https://tamarintech.com
3 | *
4 | * Description: Early release of an AMF Loader following the pattern of the
5 | * example loaders in the three.js project.
6 | *
7 | * More information about the AMF format: http://amf.wikispaces.com
8 | *
9 | * Usage:
10 | * var loader = new AMFLoader();
11 | * loader.load('/path/to/project.amf', function(objecttree) {
12 | * scene.add(objecttree);
13 | * });
14 | *
15 | * Materials now supported, material colors supported
16 | * Zip support, requires jszip
17 | * TextDecoder polyfill required by some browsers (particularly IE, Edge)
18 | * No constellation support (yet)!
19 | *
20 | */
21 |
22 | THREE.AMFLoader = function ( manager ) {
23 |
24 | this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
25 |
26 | };
27 |
28 | THREE.AMFLoader.prototype = {
29 |
30 | constructor: THREE.AMFLoader,
31 |
32 | load: function ( url, onLoad, onProgress, onError ) {
33 |
34 | var scope = this;
35 |
36 | var loader = new THREE.FileLoader( scope.manager );
37 | loader.setResponseType( 'arraybuffer' );
38 | loader.load( url, function( text ) {
39 |
40 | onLoad( scope.parse( text ) );
41 |
42 | }, onProgress, onError );
43 |
44 | },
45 |
46 | parse: function ( data ) {
47 |
48 | function loadDocument( data ) {
49 |
50 | var view = new DataView( data );
51 | var magic = String.fromCharCode( view.getUint8( 0 ), view.getUint8( 1 ) );
52 |
53 | if ( magic === "PK" ) {
54 |
55 | var zip = null;
56 | var file = null;
57 |
58 | console.log( "Loading Zip" );
59 |
60 | try {
61 |
62 | zip = new JSZip( data );
63 |
64 | } catch ( e ) {
65 |
66 | if ( e instanceof ReferenceError ) {
67 |
68 | console.log( " jszip missing and file is compressed." );
69 | return null;
70 |
71 | }
72 |
73 | }
74 |
75 | for ( file in zip.files ) {
76 |
77 | if ( file.toLowerCase().substr( - 4 ) === '.amf' ) {
78 |
79 | break;
80 |
81 | }
82 |
83 | }
84 |
85 | console.log( " Trying to load file asset: " + file );
86 | view = new DataView( zip.file( file ).asArrayBuffer() );
87 |
88 | }
89 |
90 | if ( TextDecoder === undefined ) {
91 |
92 | console.log( " TextDecoder not present. Please use TextDecoder polyfill." );
93 | return null;
94 |
95 | }
96 |
97 | var fileText = new TextDecoder( 'utf-8' ).decode( view );
98 | var xmlData = new DOMParser().parseFromString( fileText, 'application/xml' );
99 |
100 | if ( xmlData.documentElement.nodeName.toLowerCase() !== "amf" ) {
101 |
102 | console.log( " Error loading AMF - no AMF document found." );
103 | return null;
104 |
105 | }
106 |
107 | return xmlData;
108 |
109 | }
110 |
111 | function loadDocumentScale( node ) {
112 |
113 | var scale = 1.0;
114 | var unit = 'millimeter';
115 |
116 | if ( node.documentElement.attributes[ 'unit' ] !== undefined ) {
117 |
118 | unit = node.documentElement.attributes[ 'unit' ].value.toLowerCase();
119 |
120 | }
121 |
122 | var scaleUnits = {
123 | 'millimeter': 1.0,
124 | 'inch': 25.4,
125 | 'feet': 304.8,
126 | 'meter': 1000.0,
127 | 'micron': 0.001
128 | };
129 |
130 | if ( scaleUnits[ unit ] !== undefined ) {
131 |
132 | scale = scaleUnits[ unit ];
133 |
134 | }
135 |
136 | console.log( " Unit scale: " + scale );
137 | return scale;
138 |
139 | }
140 |
141 | function loadMaterials( node ) {
142 |
143 | var matName = "AMF Material";
144 | var matId = node.attributes[ 'id' ].textContent;
145 | var color = { r: 1.0, g: 1.0, b: 1.0, a: 1.0 };
146 |
147 | var loadedMaterial = null;
148 |
149 | for ( var i = 0; i < node.children.length; i ++ ) {
150 |
151 | var matChildEl = node.children[ i ];
152 |
153 | if ( matChildEl.nodeName === "metadata" && matChildEl.attributes[ 'type' ] !== undefined ) {
154 |
155 | if ( matChildEl.attributes[ 'type' ].value === 'name' ) {
156 |
157 | matname = matChildEl.textContent;
158 |
159 | }
160 |
161 | } else if ( matChildEl.nodeName === 'color' ) {
162 |
163 | color = loadColor( matChildEl );
164 |
165 | }
166 |
167 | }
168 |
169 | loadedMaterial = new THREE.MeshPhongMaterial( {
170 | shading: THREE.FlatShading,
171 | color: new THREE.Color( color.r, color.g, color.b ),
172 | name: matName
173 | } );
174 |
175 | if ( color.a !== 1.0 ) {
176 |
177 | loadedMaterial.transparent = true;
178 | loadedMaterial.opacity = color.a;
179 |
180 | }
181 |
182 | return { 'id': matId, 'material': loadedMaterial };
183 |
184 | }
185 |
186 | function loadColor( node ) {
187 |
188 | var color = { 'r': 1.0, 'g': 1.0, 'b': 1.0, 'a': 1.0 };
189 |
190 | for ( var i = 0; i < node.children.length; i ++ ) {
191 |
192 | var matColor = node.children[ i ];
193 |
194 | if ( matColor.nodeName === 'r' ) {
195 |
196 | color.r = matColor.textContent;
197 |
198 | } else if ( matColor.nodeName === 'g' ) {
199 |
200 | color.g = matColor.textContent;
201 |
202 | } else if ( matColor.nodeName === 'b' ) {
203 |
204 | color.b = matColor.textContent;
205 |
206 | } else if ( matColor.nodeName === 'a' ) {
207 |
208 | color.a = matColor.textContent;
209 |
210 | }
211 |
212 | }
213 |
214 | return color;
215 |
216 | }
217 |
218 | function loadMeshVolume( node ) {
219 |
220 | var volume = { "name": "", "triangles": [], "materialid": null };
221 |
222 | var currVolumeNode = node.firstElementChild;
223 |
224 | if ( node.attributes[ 'materialid' ] !== undefined ) {
225 |
226 | volume.materialId = node.attributes[ 'materialid' ].nodeValue;
227 |
228 | }
229 |
230 | while ( currVolumeNode ) {
231 |
232 | if ( currVolumeNode.nodeName === "metadata" ) {
233 |
234 | if ( currVolumeNode.attributes[ 'type' ] !== undefined ) {
235 |
236 | if ( currVolumeNode.attributes[ 'type' ].value === 'name' ) {
237 |
238 | volume.name = currVolumeNode.textContent;
239 |
240 | }
241 |
242 | }
243 |
244 | } else if ( currVolumeNode.nodeName === "triangle" ) {
245 |
246 | var v1 = currVolumeNode.getElementsByTagName("v1")[0].textContent;
247 | var v2 = currVolumeNode.getElementsByTagName("v2")[0].textContent;
248 | var v3 = currVolumeNode.getElementsByTagName("v3")[0].textContent;
249 |
250 | volume.triangles.push( v1 );
251 | volume.triangles.push( v2 );
252 | volume.triangles.push( v3 );
253 |
254 | }
255 |
256 | currVolumeNode = currVolumeNode.nextElementSibling;
257 |
258 | }
259 |
260 | return volume;
261 |
262 | }
263 |
264 | function loadMeshVertices( node ) {
265 |
266 | var vertArray = [];
267 | var normalArray = [];
268 | var currVerticesNode = node.firstElementChild;
269 |
270 | while ( currVerticesNode ) {
271 |
272 | if ( currVerticesNode.nodeName === "vertex" ) {
273 |
274 | var vNode = currVerticesNode.firstElementChild;
275 |
276 | while ( vNode ) {
277 |
278 | if ( vNode.nodeName === "coordinates" ) {
279 |
280 | var x = vNode.getElementsByTagName("x")[0].textContent;
281 | var y = vNode.getElementsByTagName("y")[0].textContent;
282 | var z = vNode.getElementsByTagName("z")[0].textContent;
283 |
284 | vertArray.push(x);
285 | vertArray.push(y);
286 | vertArray.push(z);
287 |
288 | } else if ( vNode.nodeName === "normal" ) {
289 |
290 | var nx = vNode.getElementsByTagName("nx")[0].textContent;
291 | var ny = vNode.getElementsByTagName("ny")[0].textContent;
292 | var nz = vNode.getElementsByTagName("nz")[0].textContent;
293 |
294 | normalArray.push(nx);
295 | normalArray.push(ny);
296 | normalArray.push(nz);
297 |
298 | }
299 |
300 | vNode = vNode.nextElementSibling;
301 |
302 | }
303 |
304 | }
305 | currVerticesNode = currVerticesNode.nextElementSibling;
306 |
307 | }
308 |
309 | return { "vertices": vertArray, "normals": normalArray };
310 |
311 | }
312 |
313 | function loadObject( node ) {
314 |
315 | var objId = node.attributes[ 'id' ].textContent;
316 | var loadedObject = { "name": "amfobject", "meshes": [] };
317 | var currColor = null;
318 | var currObjNode = node.firstElementChild;
319 |
320 | while ( currObjNode ) {
321 |
322 | if ( currObjNode.nodeName === "metadata" ) {
323 |
324 | if ( currObjNode.attributes[ 'type' ] !== undefined ) {
325 |
326 | if ( currObjNode.attributes[ 'type' ].value === 'name' ) {
327 |
328 | loadedObject.name = currObjNode.textContent;
329 |
330 | }
331 |
332 | }
333 |
334 | } else if ( currObjNode.nodeName === "color" ) {
335 |
336 | currColor = loadColor( currObjNode );
337 |
338 | } else if ( currObjNode.nodeName === "mesh" ) {
339 |
340 | var currMeshNode = currObjNode.firstElementChild;
341 | var mesh = { "vertices": [], "normals": [], "volumes": [], "color": currColor };
342 |
343 | while ( currMeshNode ) {
344 |
345 | if ( currMeshNode.nodeName === "vertices" ) {
346 |
347 | var loadedVertices = loadMeshVertices( currMeshNode );
348 |
349 | mesh.normals = mesh.normals.concat( loadedVertices.normals );
350 | mesh.vertices = mesh.vertices.concat( loadedVertices.vertices );
351 |
352 | } else if ( currMeshNode.nodeName === "volume" ) {
353 |
354 | mesh.volumes.push( loadMeshVolume( currMeshNode ) );
355 |
356 | }
357 |
358 | currMeshNode = currMeshNode.nextElementSibling;
359 |
360 | }
361 |
362 | loadedObject.meshes.push( mesh );
363 |
364 | }
365 |
366 | currObjNode = currObjNode.nextElementSibling;
367 |
368 | }
369 |
370 | return { 'id': objId, 'obj': loadedObject };
371 |
372 | }
373 |
374 | var xmlData = loadDocument( data );
375 | var amfName = "";
376 | var amfAuthor = "";
377 | var amfScale = loadDocumentScale( xmlData );
378 | var amfMaterials = {};
379 | var amfObjects = {};
380 | var children = xmlData.documentElement.children;
381 |
382 | for ( var i = 0; i < children.length; i ++ ) {
383 |
384 | var child = children[ i ];
385 |
386 | if ( child.nodeName === 'metadata' ) {
387 |
388 | if ( child.attributes[ 'type' ] !== undefined ) {
389 |
390 | if ( child.attributes[ 'type' ].value === 'name' ) {
391 |
392 | amfName = child.textContent;
393 |
394 | } else if ( child.attributes[ 'type' ].value === 'author' ) {
395 |
396 | amfAuthor = child.textContent;
397 |
398 | }
399 |
400 | }
401 |
402 | } else if ( child.nodeName === 'material' ) {
403 |
404 | var loadedMaterial = loadMaterials( child );
405 |
406 | amfMaterials[ loadedMaterial.id ] = loadedMaterial.material;
407 |
408 | } else if ( child.nodeName === 'object' ) {
409 |
410 | var loadedObject = loadObject( child );
411 |
412 | amfObjects[ loadedObject.id ] = loadedObject.obj;
413 |
414 | }
415 |
416 | }
417 |
418 | var sceneObject = new THREE.Group();
419 | var defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xaaaaff, shading: THREE.FlatShading } );
420 |
421 | sceneObject.name = amfName;
422 | sceneObject.userData.author = amfAuthor;
423 | sceneObject.userData.loader = "AMF";
424 |
425 | for ( var id in amfObjects ) {
426 |
427 | var part = amfObjects[ id ];
428 | var meshes = part.meshes;
429 | var newObject = new THREE.Group();
430 | newObject.name = part.name || '';
431 |
432 | for ( var i = 0; i < meshes.length; i ++ ) {
433 |
434 | var objDefaultMaterial = defaultMaterial;
435 | var mesh = meshes[ i ];
436 | var vertices = new THREE.BufferAttribute( new Float32Array( mesh.vertices ), 3 );
437 | var normals = null;
438 |
439 | if ( mesh.normals.length ) {
440 |
441 | normals = new THREE.BufferAttribute( new Float32Array( mesh.normals ), 3 );
442 |
443 | }
444 |
445 | if ( mesh.color ) {
446 |
447 | var color = mesh.color;
448 |
449 | objDefaultMaterial = defaultMaterial.clone();
450 | objDefaultMaterial.color = new THREE.Color( color.r, color.g, color.b );
451 |
452 | if ( color.a !== 1.0 ) {
453 |
454 | objDefaultMaterial.transparent = true;
455 | objDefaultMaterial.opacity = color.a;
456 |
457 | }
458 |
459 | }
460 |
461 | var volumes = mesh.volumes;
462 |
463 | for ( var j = 0; j < volumes.length; j ++ ) {
464 |
465 | var volume = volumes[ j ];
466 | var newGeometry = new THREE.BufferGeometry();
467 | var indexes = new Uint32Array( volume.triangles );
468 | var material = objDefaultMaterial;
469 |
470 | newGeometry.setIndex( new THREE.BufferAttribute( indexes, 1 ) );
471 | newGeometry.addAttribute( 'position', vertices.clone() );
472 |
473 | if( normals ) {
474 |
475 | newGeometry.addAttribute( 'normal', normals.clone() );
476 |
477 | }
478 |
479 | if ( amfMaterials[ volume.materialId ] !== undefined ) {
480 |
481 | material = amfMaterials[ volume.materialId ];
482 |
483 | }
484 |
485 | newGeometry.scale( amfScale, amfScale, amfScale );
486 | newObject.add( new THREE.Mesh( newGeometry, material.clone() ) );
487 |
488 | }
489 |
490 | }
491 |
492 | sceneObject.add( newObject );
493 |
494 | }
495 |
496 | return sceneObject;
497 |
498 | }
499 |
500 | };
501 |
--------------------------------------------------------------------------------
/shared library source/eeprom.h:
--------------------------------------------------------------------------------
1 | // Header guard
2 | #ifndef EEPROM_H
3 | #define EEPROM_H
4 |
5 |
6 | // Header files
7 | #include
8 |
9 |
10 | // Definitions
11 |
12 | // EEPROM types
13 | enum EEPROM_TYPES {EEPROM_INT, EEPROM_FLOAT, EEPROM_STRING, EEPROM_BOOL};
14 |
15 | // EEPROM offsets and lengths
16 | #define EEPROM_FIRMWARE_VERSION_OFFSET 0x00
17 | #define EEPROM_FIRMWARE_VERSION_LENGTH 4
18 | #define EEPROM_FIRMWARE_CRC_OFFSET 0x04
19 | #define EEPROM_FIRMWARE_CRC_LENGTH 4
20 | #define EEPROM_LAST_RECORDED_Z_VALUE_OFFSET 0x08
21 | #define EEPROM_LAST_RECORDED_Z_VALUE_LENGTH 4
22 | #define EEPROM_BACKLASH_X_OFFSET 0x0C
23 | #define EEPROM_BACKLASH_X_LENGTH 4
24 | #define EEPROM_BACKLASH_Y_OFFSET 0x10
25 | #define EEPROM_BACKLASH_Y_LENGTH 4
26 | #define EEPROM_BED_ORIENTATION_BACK_RIGHT_OFFSET 0x14
27 | #define EEPROM_BED_ORIENTATION_BACK_RIGHT_LENGTH 4
28 | #define EEPROM_BED_ORIENTATION_BACK_LEFT_OFFSET 0x18
29 | #define EEPROM_BED_ORIENTATION_BACK_LEFT_LENGTH 4
30 | #define EEPROM_BED_ORIENTATION_FRONT_LEFT_OFFSET 0x1C
31 | #define EEPROM_BED_ORIENTATION_FRONT_LEFT_LENGTH 4
32 | #define EEPROM_BED_ORIENTATION_FRONT_RIGHT_OFFSET 0x20
33 | #define EEPROM_BED_ORIENTATION_FRONT_RIGHT_LENGTH 4
34 | #define EEPROM_FILAMENT_COLOR_OFFSET 0x24
35 | #define EEPROM_FILAMENT_COLOR_LENGTH 4
36 | #define EEPROM_FILAMENT_TYPE_AND_LOCATION_OFFSET 0x28
37 | #define EEPROM_FILAMENT_TYPE_AND_LOCATION_LENGTH 1
38 | #define EEPROM_FILAMENT_TEMPERATURE_OFFSET 0x29
39 | #define EEPROM_FILAMENT_TEMPERATURE_LENGTH 1
40 | #define EEPROM_FILAMENT_AMOUNT_OFFSET 0x2A
41 | #define EEPROM_FILAMENT_AMOUNT_LENGTH 4
42 | #define EEPROM_BACKLASH_EXPANSION_X_PLUS_OFFSET 0x2E
43 | #define EEPROM_BACKLASH_EXPANSION_X_PLUS_LENGTH 4
44 | #define EEPROM_BACKLASH_EXPANSION_Y_L_PLUS_OFFSET 0x32
45 | #define EEPROM_BACKLASH_EXPANSION_Y_L_PLUS_LENGTH 4
46 | #define EEPROM_BACKLASH_EXPANSION_Y_R_PLUS_OFFSET 0x36
47 | #define EEPROM_BACKLASH_EXPANSION_Y_R_PLUS_LENGTH 4
48 | #define EEPROM_BACKLASH_EXPANSION_Y_R_MINUS_OFFSET 0x3A
49 | #define EEPROM_BACKLASH_EXPANSION_Y_R_MINUS_LENGTH 4
50 | #define EEPROM_BACKLASH_EXPANSION_Z_OFFSET 0x3E
51 | #define EEPROM_BACKLASH_EXPANSION_Z_LENGTH 4
52 | #define EEPROM_BACKLASH_EXPANSION_E_OFFSET 0x42
53 | #define EEPROM_BACKLASH_EXPANSION_E_LENGTH 4
54 | #define EEPROM_BED_OFFSET_BACK_LEFT_OFFSET 0x46
55 | #define EEPROM_BED_OFFSET_BACK_LEFT_LENGTH 4
56 | #define EEPROM_BED_OFFSET_BACK_RIGHT_OFFSET 0x4A
57 | #define EEPROM_BED_OFFSET_BACK_RIGHT_LENGTH 4
58 | #define EEPROM_BED_OFFSET_FRONT_RIGHT_OFFSET 0x4E
59 | #define EEPROM_BED_OFFSET_FRONT_RIGHT_LENGTH 4
60 | #define EEPROM_BED_OFFSET_FRONT_LEFT_OFFSET 0x52
61 | #define EEPROM_BED_OFFSET_FRONT_LEFT_LENGTH 4
62 | #define EEPROM_BED_HEIGHT_OFFSET_OFFSET 0x56
63 | #define EEPROM_BED_HEIGHT_OFFSET_LENGTH 4
64 | #define EEPROM_RESERVED_OFFSET 0x5A
65 | #define EEPROM_RESERVED_LENGTH 4
66 | #define EEPROM_BACKLASH_SPEED_OFFSET 0x5E
67 | #define EEPROM_BACKLASH_SPEED_LENGTH 4
68 | #define EEPROM_BED_ORIENTATION_VERSION_OFFSET 0x62
69 | #define EEPROM_BED_ORIENTATION_VERSION_LENGTH 1
70 | #define EEPROM_SPEED_LIMIT_X_OFFSET 0x66
71 | #define EEPROM_SPEED_LIMIT_X_LENGTH 4
72 | #define EEPROM_SPEED_LIMIT_Y_OFFSET 0x6A
73 | #define EEPROM_SPEED_LIMIT_Y_LENGTH 4
74 | #define EEPROM_SPEED_LIMIT_Z_OFFSET 0x6E
75 | #define EEPROM_SPEED_LIMIT_Z_LENGTH 4
76 | #define EEPROM_SPEED_LIMIT_E_POSITIVE_OFFSET 0x72
77 | #define EEPROM_SPEED_LIMIT_E_POSITIVE_LENGTH 4
78 | #define EEPROM_SPEED_LIMIT_E_NEGATIVE_OFFSET 0x76
79 | #define EEPROM_SPEED_LIMIT_E_NEGATIVE_LENGTH 4
80 | #define EEPROM_FILAMENT_SIZE_OFFSET 0x82
81 | #define EEPROM_FILAMENT_SIZE_LENGTH 1
82 | #define EEPROM_FILAMENT_UID_OFFSET 0x83
83 | #define EEPROM_FILAMENT_UID_LENGTH 4
84 | #define EEPROM_BED_ORIENTATION_FIRST_SAMPLE_OFFSET 0x106
85 | #define EEPROM_BED_ORIENTATION_FIRST_SAMPLE_LENGTH 4
86 | #define EEPROM_HEATBED_TEMPERATURE_OFFSET 0x28B
87 | #define EEPROM_HEATBED_TEMPERATURE_LENGTH 1
88 | #define EEPROM_SKEW_X_OFFSET 0x28C
89 | #define EEPROM_SKEW_X_LENGTH 4
90 | #define EEPROM_SKEW_Y_OFFSET 0x290
91 | #define EEPROM_SKEW_Y_LENGTH 4
92 | #define EEPROM_EXPAND_PRINTABLE_REGION_OFFSET 0x294
93 | #define EEPROM_EXPAND_PRINTABLE_REGION_LENGTH 1
94 | #define EEPROM_EXTERNAL_BED_HEIGHT_OFFSET 0x295
95 | #define EEPROM_EXTERNAL_BED_HEIGHT_LENGTH 4
96 | #define EEPROM_CALIBRATE_Z0_CORRECTION_OFFSET 0x299
97 | #define EEPROM_CALIBRATE_Z0_CORRECTION_LENGTH 4
98 | #define EEPROM_X_JERK_SENSITIVITY_OFFSET 0x29D
99 | #define EEPROM_X_JERK_SENSITIVITY_LENGTH 1
100 | #define EEPROM_Y_JERK_SENSITIVITY_OFFSET 0x29E
101 | #define EEPROM_Y_JERK_SENSITIVITY_LENGTH 1
102 | #define EEPROM_LAST_RECORDED_X_VALUE_OFFSET 0x29F
103 | #define EEPROM_LAST_RECORDED_X_VALUE_LENGTH 4
104 | #define EEPROM_LAST_RECORDED_Y_VALUE_OFFSET 0x2A3
105 | #define EEPROM_LAST_RECORDED_Y_VALUE_LENGTH 4
106 | #define EEPROM_LAST_RECORDED_X_DIRECTION_OFFSET 0x2A7
107 | #define EEPROM_LAST_RECORDED_X_DIRECTION_LENGTH 1
108 | #define EEPROM_LAST_RECORDED_Y_DIRECTION_OFFSET 0x2A8
109 | #define EEPROM_LAST_RECORDED_Y_DIRECTION_LENGTH 1
110 | #define EEPROM_SAVED_X_STATE_OFFSET 0x2A9
111 | #define EEPROM_SAVED_X_STATE_LENGTH 1
112 | #define EEPROM_SAVED_Y_STATE_OFFSET 0x2AA
113 | #define EEPROM_SAVED_Y_STATE_LENGTH 1
114 | #define EEPROM_FAN_TYPE_OFFSET 0x2AB
115 | #define EEPROM_FAN_TYPE_LENGTH 1
116 | #define EEPROM_FAN_OFFSET_OFFSET 0x2AC
117 | #define EEPROM_FAN_OFFSET_LENGTH 1
118 | #define EEPROM_FAN_SCALE_OFFSET 0x2AD
119 | #define EEPROM_FAN_SCALE_LENGTH 4
120 | #define EEPROM_HEATER_CALIBRATION_MODE_OFFSET 0x2B1
121 | #define EEPROM_HEATER_CALIBRATION_MODE_LENGTH 1
122 | #define EEPROM_X_MOTOR_CURRENT_OFFSET 0x2B2
123 | #define EEPROM_X_MOTOR_CURRENT_LENGTH 2
124 | #define EEPROM_Y_MOTOR_CURRENT_OFFSET 0x2B4
125 | #define EEPROM_Y_MOTOR_CURRENT_LENGTH 2
126 | #define EEPROM_Z_MOTOR_CURRENT_OFFSET 0x2B6
127 | #define EEPROM_Z_MOTOR_CURRENT_LENGTH 2
128 | #define EEPROM_HARDWARE_STATUS_OFFSET 0x2B8
129 | #define EEPROM_HARDWARE_STATUS_LENGTH 2
130 | #define EEPROM_HEATER_TEMPERATURE_MEASUREMENT_B_OFFSET 0x2BA
131 | #define EEPROM_HEATER_TEMPERATURE_MEASUREMENT_B_LENGTH 4
132 | #define EEPROM_HOURS_COUNTER_OFFSET 0x2C0
133 | #define EEPROM_HOURS_COUNTER_LENGTH 4
134 | #define EEPROM_X_MOTOR_STEPS_PER_MM_OFFSET 0x2D6
135 | #define EEPROM_X_MOTOR_STEPS_PER_MM_LENGTH 4
136 | #define EEPROM_Y_MOTOR_STEPS_PER_MM_OFFSET 0x2DA
137 | #define EEPROM_Y_MOTOR_STEPS_PER_MM_LENGTH 4
138 | #define EEPROM_Z_MOTOR_STEPS_PER_MM_OFFSET 0x2DE
139 | #define EEPROM_Z_MOTOR_STEPS_PER_MM_LENGTH 4
140 | #define EEPROM_E_MOTOR_STEPS_PER_MM_OFFSET 0x2E2
141 | #define EEPROM_E_MOTOR_STEPS_PER_MM_LENGTH 4
142 | #define EEPROM_SAVED_Z_STATE_OFFSET 0x2E6
143 | #define EEPROM_SAVED_Z_STATE_LENGTH 2
144 | #define EEPROM_E_MOTOR_CURRENT_OFFSET 0x2E8
145 | #define EEPROM_E_MOTOR_CURRENT_LENGTH 2
146 | #define EEPROM_HEATER_RESISTANCE_M_OFFSET 0x2EA
147 | #define EEPROM_HEATER_RESISTANCE_M_LENGTH 4
148 | #define EEPROM_SERIAL_NUMBER_OFFSET 0x2EF
149 | #define EEPROM_SERIAL_NUMBER_LENGTH 16
150 | #define EEPROM_DECRYPTION_TABLE_OFFSET 0x300
151 | #define EEPROM_DECRYPTION_TABLE_LENGTH 256
152 |
153 | // EEPROM types
154 | #define EEPROM_BACKLASH_X_TYPE EEPROM_FLOAT
155 | #define EEPROM_BACKLASH_Y_TYPE EEPROM_FLOAT
156 | #define EEPROM_BACKLASH_SPEED_TYPE EEPROM_FLOAT
157 | #define EEPROM_BED_ORIENTATION_BACK_RIGHT_TYPE EEPROM_FLOAT
158 | #define EEPROM_BED_ORIENTATION_BACK_LEFT_TYPE EEPROM_FLOAT
159 | #define EEPROM_BED_ORIENTATION_FRONT_LEFT_TYPE EEPROM_FLOAT
160 | #define EEPROM_BED_ORIENTATION_FRONT_RIGHT_TYPE EEPROM_FLOAT
161 | #define EEPROM_BED_OFFSET_BACK_LEFT_TYPE EEPROM_FLOAT
162 | #define EEPROM_BED_OFFSET_BACK_RIGHT_TYPE EEPROM_FLOAT
163 | #define EEPROM_BED_OFFSET_FRONT_RIGHT_TYPE EEPROM_FLOAT
164 | #define EEPROM_BED_OFFSET_FRONT_LEFT_TYPE EEPROM_FLOAT
165 | #define EEPROM_BED_HEIGHT_OFFSET_TYPE EEPROM_FLOAT
166 | #define EEPROM_FILAMENT_TEMPERATURE_TYPE EEPROM_INT
167 | #define EEPROM_SPEED_LIMIT_X_TYPE EEPROM_FLOAT
168 | #define EEPROM_SPEED_LIMIT_Y_TYPE EEPROM_FLOAT
169 | #define EEPROM_SPEED_LIMIT_Z_TYPE EEPROM_FLOAT
170 | #define EEPROM_SPEED_LIMIT_E_POSITIVE_TYPE EEPROM_FLOAT
171 | #define EEPROM_SPEED_LIMIT_E_NEGATIVE_TYPE EEPROM_FLOAT
172 | #define EEPROM_LAST_RECORDED_X_VALUE_TYPE EEPROM_FLOAT
173 | #define EEPROM_LAST_RECORDED_Y_VALUE_TYPE EEPROM_FLOAT
174 | #define EEPROM_LAST_RECORDED_Z_VALUE_TYPE EEPROM_FLOAT
175 | #define EEPROM_X_MOTOR_STEPS_PER_MM_TYPE EEPROM_FLOAT
176 | #define EEPROM_Y_MOTOR_STEPS_PER_MM_TYPE EEPROM_FLOAT
177 | #define EEPROM_Z_MOTOR_STEPS_PER_MM_TYPE EEPROM_FLOAT
178 | #define EEPROM_E_MOTOR_STEPS_PER_MM_TYPE EEPROM_FLOAT
179 | #define EEPROM_X_JERK_SENSITIVITY_TYPE EEPROM_INT
180 | #define EEPROM_Y_JERK_SENSITIVITY_TYPE EEPROM_INT
181 | #define EEPROM_CALIBRATE_Z0_CORRECTION_TYPE EEPROM_FLOAT
182 | #define EEPROM_EXPAND_PRINTABLE_REGION_TYPE EEPROM_BOOL
183 | #define EEPROM_EXTERNAL_BED_HEIGHT_TYPE EEPROM_FLOAT
184 | #define EEPROM_SKEW_X_TYPE EEPROM_FLOAT
185 | #define EEPROM_SKEW_Y_TYPE EEPROM_FLOAT
186 | #define EEPROM_HEATBED_TEMPERATURE_TYPE EEPROM_INT
187 |
188 | // EEPROM default values
189 | #define EEPROM_BACKLASH_X_DEFAULT 0.3
190 | #define EEPROM_BACKLASH_Y_DEFAULT 0.6
191 | #define EEPROM_BACKLASH_SPEED_DEFAULT 1500.0
192 | #define EEPROM_BED_ORIENTATION_BACK_RIGHT_DEFAULT 0.0
193 | #define EEPROM_BED_ORIENTATION_BACK_LEFT_DEFAULT 0.0
194 | #define EEPROM_BED_ORIENTATION_FRONT_LEFT_DEFAULT 0.0
195 | #define EEPROM_BED_ORIENTATION_FRONT_RIGHT_DEFAULT 0.0
196 | #define EEPROM_BED_OFFSET_BACK_LEFT_DEFAULT 0.0
197 | #define EEPROM_BED_OFFSET_BACK_RIGHT_DEFAULT 0.0
198 | #define EEPROM_BED_OFFSET_FRONT_RIGHT_DEFAULT 0.0
199 | #define EEPROM_BED_OFFSET_FRONT_LEFT_DEFAULT 0.0
200 | #define EEPROM_BED_HEIGHT_OFFSET_DEFAULT 0.0
201 | #define EEPROM_FILAMENT_TEMPERATURE_DEFAULT (215 - 100)
202 | #define EEPROM_SPEED_LIMIT_X_DEFAULT 1500.0
203 | #define EEPROM_SPEED_LIMIT_Y_DEFAULT 1500.0
204 | #define EEPROM_SPEED_LIMIT_Z_DEFAULT 60.0
205 | #define EEPROM_SPEED_LIMIT_E_POSITIVE_DEFAULT 102.0
206 | #define EEPROM_SPEED_LIMIT_E_NEGATIVE_DEFAULT 360.0
207 | #define EEPROM_LAST_RECORDED_X_VALUE_DEFAULT 54.0
208 | #define EEPROM_LAST_RECORDED_Y_VALUE_DEFAULT 50.0
209 | #define EEPROM_LAST_RECORDED_Z_VALUE_DEFAULT 5.0
210 | #define EEPROM_X_MOTOR_STEPS_PER_MM_DEFAULT 19.3067875
211 | #define EEPROM_Y_MOTOR_STEPS_PER_MM_DEFAULT 18.00885
212 | #define EEPROM_Z_MOTOR_STEPS_PER_MM_DEFAULT 646.3295
213 | #define EEPROM_E_MOTOR_STEPS_PER_MM_DEFAULT 128.451375
214 | #define EEPROM_X_JERK_SENSITIVITY_DEFAULT 195
215 | #define EEPROM_Y_JERK_SENSITIVITY_DEFAULT 195
216 | #define EEPROM_CALIBRATE_Z0_CORRECTION_DEFAULT 0.0
217 | #define EEPROM_EXPAND_PRINTABLE_REGION_DEFAULT false
218 | #define EEPROM_EXTERNAL_BED_HEIGHT_DEFAULT 0.0
219 | #define EEPROM_SKEW_X_DEFAULT 0.0
220 | #define EEPROM_SKEW_Y_DEFAULT 0.0
221 | #define EEPROM_HEATBED_TEMPERATURE_DEFAULT 70
222 |
223 | // EEPROM min and max values
224 | #define EEPROM_BACKLASH_X_MIN 0.0
225 | #define EEPROM_BACKLASH_X_MAX 2.0
226 | #define EEPROM_BACKLASH_Y_MIN 0.0
227 | #define EEPROM_BACKLASH_Y_MAX 2.0
228 | #define EEPROM_BACKLASH_SPEED_MIN 1.0
229 | #define EEPROM_BACKLASH_SPEED_MAX FLT_MAX
230 | #define EEPROM_BED_ORIENTATION_BACK_RIGHT_MIN -3.0
231 | #define EEPROM_BED_ORIENTATION_BACK_RIGHT_MAX 3.0
232 | #define EEPROM_BED_ORIENTATION_BACK_LEFT_MIN -3.0
233 | #define EEPROM_BED_ORIENTATION_BACK_LEFT_MAX 3.0
234 | #define EEPROM_BED_ORIENTATION_FRONT_LEFT_MIN -3.0
235 | #define EEPROM_BED_ORIENTATION_FRONT_LEFT_MAX 3.0
236 | #define EEPROM_BED_ORIENTATION_FRONT_RIGHT_MIN -3.0
237 | #define EEPROM_BED_ORIENTATION_FRONT_RIGHT_MAX 3.0
238 | #define EEPROM_BED_OFFSET_BACK_RIGHT_MIN -FLT_MAX
239 | #define EEPROM_BED_OFFSET_BACK_RIGHT_MAX FLT_MAX
240 | #define EEPROM_BED_OFFSET_BACK_LEFT_MIN -FLT_MAX
241 | #define EEPROM_BED_OFFSET_BACK_LEFT_MAX FLT_MAX
242 | #define EEPROM_BED_OFFSET_FRONT_LEFT_MIN -FLT_MAX
243 | #define EEPROM_BED_OFFSET_FRONT_LEFT_MAX FLT_MAX
244 | #define EEPROM_BED_OFFSET_FRONT_RIGHT_MIN -FLT_MAX
245 | #define EEPROM_BED_OFFSET_FRONT_RIGHT_MAX FLT_MAX
246 | #define EEPROM_BED_HEIGHT_OFFSET_MIN -FLT_MAX
247 | #define EEPROM_BED_HEIGHT_OFFSET_MAX FLT_MAX
248 | #define EEPROM_FILAMENT_TEMPERATURE_MIN (150 - 100)
249 | #define EEPROM_FILAMENT_TEMPERATURE_MAX (315 - 100)
250 | #define EEPROM_SPEED_LIMIT_X_MIN 120.0
251 | #define EEPROM_SPEED_LIMIT_X_MAX 4800.0
252 | #define EEPROM_SPEED_LIMIT_Y_MIN 120.0
253 | #define EEPROM_SPEED_LIMIT_Y_MAX 4800.0
254 | #define EEPROM_SPEED_LIMIT_Z_MIN 30.0
255 | #define EEPROM_SPEED_LIMIT_Z_MAX 60.0
256 | #define EEPROM_SPEED_LIMIT_E_POSITIVE_MIN 60.0
257 | #define EEPROM_SPEED_LIMIT_E_POSITIVE_MAX 600.0
258 | #define EEPROM_SPEED_LIMIT_E_NEGATIVE_MIN 60.0
259 | #define EEPROM_SPEED_LIMIT_E_NEGATIVE_MAX 720.0
260 | #define EEPROM_LAST_RECORDED_X_VALUE_MIN -FLT_MAX
261 | #define EEPROM_LAST_RECORDED_X_VALUE_MAX FLT_MAX
262 | #define EEPROM_LAST_RECORDED_Y_VALUE_MIN -FLT_MAX
263 | #define EEPROM_LAST_RECORDED_Y_VALUE_MAX FLT_MAX
264 | #define EEPROM_LAST_RECORDED_Z_VALUE_MIN -FLT_MAX
265 | #define EEPROM_LAST_RECORDED_Z_VALUE_MAX FLT_MAX
266 | #define EEPROM_X_MOTOR_STEPS_PER_MM_MIN FLT_MIN
267 | #define EEPROM_X_MOTOR_STEPS_PER_MM_MAX FLT_MAX
268 | #define EEPROM_Y_MOTOR_STEPS_PER_MM_MIN FLT_MIN
269 | #define EEPROM_Y_MOTOR_STEPS_PER_MM_MAX FLT_MAX
270 | #define EEPROM_Z_MOTOR_STEPS_PER_MM_MIN FLT_MIN
271 | #define EEPROM_Z_MOTOR_STEPS_PER_MM_MAX FLT_MAX
272 | #define EEPROM_E_MOTOR_STEPS_PER_MM_MIN FLT_MIN
273 | #define EEPROM_E_MOTOR_STEPS_PER_MM_MAX FLT_MAX
274 | #define EEPROM_X_JERK_SENSITIVITY_MIN 1
275 | #define EEPROM_X_JERK_SENSITIVITY_MAX 255
276 | #define EEPROM_Y_JERK_SENSITIVITY_MIN 1
277 | #define EEPROM_Y_JERK_SENSITIVITY_MAX 255
278 | #define EEPROM_CALIBRATE_Z0_CORRECTION_MIN -FLT_MAX
279 | #define EEPROM_CALIBRATE_Z0_CORRECTION_MAX FLT_MAX
280 | #define EEPROM_EXTERNAL_BED_HEIGHT_MIN 0
281 | #define EEPROM_EXTERNAL_BED_HEIGHT_MAX 50.0
282 | #define EEPROM_SKEW_X_MIN -40.0
283 | #define EEPROM_SKEW_X_MAX 40.0
284 | #define EEPROM_SKEW_Y_MIN -40.0
285 | #define EEPROM_SKEW_Y_MAX 40.0
286 | #define EEPROM_HEATBED_TEMPERATURE_MIN 0
287 | #define EEPROM_HEATBED_TEMPERATURE_MAX 110
288 |
289 |
290 | #endif
291 |
--------------------------------------------------------------------------------
/octoprint_m33fio/gcode.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | from __future__ import absolute_import
3 |
4 |
5 | # Imports
6 | import struct
7 | import re
8 |
9 |
10 | # Gcode class
11 | class Gcode(object) :
12 |
13 | # Constructor
14 | def __init__(self, data = None) :
15 |
16 | # Initialize data members
17 | self.order = "NMGXYZE FTSP IJRD"
18 | self.dataType = 0x1080
19 | self.hostCommand = ""
20 | self.originalCommand = ""
21 | self.parameterValue = []
22 | for i in xrange(len(self.order)) :
23 | self.parameterValue.append(str(""))
24 |
25 | # Parse line if provided
26 | if data != None :
27 | self.parseLine(data)
28 |
29 | # Parse line
30 | def parseLine(self, line) :
31 |
32 | # Reset data type
33 | self.dataType = 0x1080
34 |
35 | # Clear parameter values
36 | for i in xrange(len(self.order)) :
37 | self.parameterValue[i] = ""
38 |
39 | # Clear host command
40 | self.hostCommand = ""
41 |
42 | # Check if line contains a checksum
43 | characterOffset = line.find("*")
44 | if characterOffset != -1 :
45 |
46 | # Remove checksum
47 | line = line[0 : characterOffset]
48 |
49 | # Remove leading and trailing whitespace
50 | line = line.strip()
51 |
52 | # Set original command
53 | self.originalCommand = line
54 |
55 | # Check if line contains a comment
56 | characterOffset = line.find(";")
57 | if characterOffset != -1 :
58 |
59 | # Remove comment
60 | line = line[0 : characterOffset]
61 |
62 | # Check if line is empty
63 | if not line :
64 |
65 | # Return false
66 | return False
67 |
68 | # Check if line is a host command
69 | if line[0] == "@" :
70 |
71 | # Set host command
72 | self.hostCommand = line
73 |
74 | # Return true
75 | return True
76 |
77 | # Parse line for parameters
78 | for match in re.compile("[" + self.order.replace(" ", "") + "][-+]?\\d*(\\.\\d+)?").finditer(line) :
79 |
80 | # Set data type
81 | self.dataType |= (1 << self.order.find(match.group()[0]))
82 |
83 | # Store parameter value
84 | self.parameterValue[self.order.find(match.group()[0])] = match.group()[1 :]
85 |
86 | # Check if match is an M value
87 | if match.group()[0] == "M" :
88 |
89 | # Check if M value contains a string
90 | value = match.group()[1 :]
91 | if value == "23" or value == "28" or value == "29" or value == "30" or value == "32" or value == "117" :
92 |
93 | # Set string parameter
94 | self.parameterValue[15] = line[match.start() + len(match.group()) :]
95 |
96 | # Remove leading and trailing whitespace
97 | self.parameterValue[15] = self.parameterValue[15].strip()
98 |
99 | # Check if string exists
100 | if self.parameterValue[15] :
101 |
102 | # Set data type
103 | self.dataType |= (1 << 15)
104 |
105 | # Stop parsing line
106 | break
107 |
108 | # Return if data wasn't empty
109 | return self.dataType != 0x1080
110 |
111 | # Get original command
112 | def getOriginalCommand(self) :
113 |
114 | # Return original command
115 | return self.originalCommand
116 |
117 | # Get binary
118 | def getBinary(self) :
119 |
120 | # Check if host command
121 | if self.hostCommand != "" :
122 |
123 | # Return host command
124 | return self.hostCommand
125 |
126 | # Initialize request
127 | request = ""
128 |
129 | # Fill first four bytes of request to data type
130 | request += chr(int(self.dataType & 0xFF))
131 | request += chr(int(self.dataType >> 8) & 0xFF)
132 | request += chr(int(self.dataType >> 16) & 0xFF)
133 | request += chr(int(self.dataType >> 24) & 0xFF)
134 |
135 | # Check if command contains a string
136 | if self.parameterValue[15] != "" :
137 |
138 | # Set fifth byte of request to string parameter length
139 | request += chr(len(self.parameterValue[15]))
140 |
141 | # Check if command contains an N value
142 | if self.parameterValue[0] != "" :
143 |
144 | # Set 2 byte integer parameter value
145 | tempNumber = int(self.parameterValue[0])
146 | request += chr(tempNumber & 0xFF)
147 | request += chr((tempNumber >> 8) & 0xFF)
148 |
149 | # Check if command contains an M value
150 | if self.parameterValue[1] != "" :
151 |
152 | # Set 2 byte integer parameter value
153 | tempNumber = int(self.parameterValue[1])
154 | request += chr(tempNumber & 0xFF)
155 | request += chr((tempNumber >> 8) & 0xFF)
156 |
157 | # Check if command contains a G value
158 | if self.parameterValue[2] != "" :
159 |
160 | # Set 2 byte integer parameter value
161 | tempNumber = int(self.parameterValue[2])
162 | request += chr(tempNumber & 0xFF)
163 | request += chr((tempNumber >> 8) & 0xFF)
164 |
165 | # Check if command contains an X value
166 | if self.parameterValue[3] != "" :
167 |
168 | # Set 4 byte float parameter value
169 | tempNumber = struct.pack("f", float(self.parameterValue[3]))
170 | request += tempNumber[0]
171 | request += tempNumber[1]
172 | request += tempNumber[2]
173 | request += tempNumber[3]
174 |
175 | # Check if command contains a Y value
176 | if self.parameterValue[4] != "" :
177 |
178 | # Set 4 byte float parameter value
179 | tempNumber = struct.pack("f", float(self.parameterValue[4]))
180 | request += tempNumber[0]
181 | request += tempNumber[1]
182 | request += tempNumber[2]
183 | request += tempNumber[3]
184 |
185 | # Check if command contains a Z value
186 | if self.parameterValue[5] != "" :
187 |
188 | # Set 4 byte float parameter value
189 | tempNumber = struct.pack("f", float(self.parameterValue[5]))
190 | request += tempNumber[0]
191 | request += tempNumber[1]
192 | request += tempNumber[2]
193 | request += tempNumber[3]
194 |
195 | # Check if command contains an E value
196 | if self.parameterValue[6] != "" :
197 |
198 | # Set 4 byte float parameter value
199 | tempNumber = struct.pack("f", float(self.parameterValue[6]))
200 | request += tempNumber[0]
201 | request += tempNumber[1]
202 | request += tempNumber[2]
203 | request += tempNumber[3]
204 |
205 | # Check if command contains an F value
206 | if self.parameterValue[8] != "" :
207 |
208 | # Set 4 byte float parameter value
209 | tempNumber = struct.pack("f", float(self.parameterValue[8]))
210 | request += tempNumber[0]
211 | request += tempNumber[1]
212 | request += tempNumber[2]
213 | request += tempNumber[3]
214 |
215 | # Check if command contains a T value
216 | if self.parameterValue[9] != "" :
217 |
218 | # Set 1 byte integer parameter value
219 | tempNumber = int(self.parameterValue[9])
220 | request += chr(tempNumber & 0xFF)
221 |
222 | # Check if command contains an S value
223 | if self.parameterValue[10] != "" :
224 |
225 | # Set 4 byte integer parameter value
226 | tempNumber = int(round(float(self.parameterValue[10])))
227 | request += chr(tempNumber & 0xFF)
228 | request += chr((tempNumber >> 8) & 0xFF)
229 | request += chr((tempNumber >> 16) & 0xFF)
230 | request += chr((tempNumber >> 24) & 0xFF)
231 |
232 | # Check if command contains a P value
233 | if self.parameterValue[11] != "" :
234 |
235 | # Set 4 byte integer parameter value
236 | tempNumber = int(round(float(self.parameterValue[11])))
237 | request += chr(tempNumber & 0xFF)
238 | request += chr((tempNumber >> 8) & 0xFF)
239 | request += chr((tempNumber >> 16) & 0xFF)
240 | request += chr((tempNumber >> 24) & 0xFF)
241 |
242 | # Check if command contains an I value
243 | if self.parameterValue[16] != "" :
244 |
245 | # Set 4 byte float parameter value
246 | tempNumber = struct.pack("f", float(self.parameterValue[16]))
247 | request += tempNumber[0]
248 | request += tempNumber[1]
249 | request += tempNumber[2]
250 | request += tempNumber[3]
251 |
252 | # Check if command contains a J value
253 | if self.parameterValue[17] != "" :
254 |
255 | # Set 4 byte float parameter value
256 | tempNumber = struct.pack("f", float(self.parameterValue[17]))
257 | request += tempNumber[0]
258 | request += tempNumber[1]
259 | request += tempNumber[2]
260 | request += tempNumber[3]
261 |
262 | # Check if command contains an R value
263 | if self.parameterValue[18] != "" :
264 |
265 | # Set 4 byte float parameter value
266 | tempNumber = struct.pack("f", float(self.parameterValue[18]))
267 | request += tempNumber[0]
268 | request += tempNumber[1]
269 | request += tempNumber[2]
270 | request += tempNumber[3]
271 |
272 | # Check if command contains a D value
273 | if self.parameterValue[19] != "" :
274 |
275 | # Set 4 byte float parameter value
276 | tempNumber = struct.pack("f", float(self.parameterValue[19]))
277 | request += tempNumber[0]
278 | request += tempNumber[1]
279 | request += tempNumber[2]
280 | request += tempNumber[3]
281 |
282 | # Check if command contains a string
283 | if self.parameterValue[15] != "" :
284 |
285 | # Set string parameter value
286 | request += self.parameterValue[15]
287 |
288 | # Go through all values
289 | sum1 = sum2 = 0
290 | for index in xrange(len(request)) :
291 |
292 | # Set sums
293 | sum1 = (sum1 + struct.unpack("B", request[index])[0]) % 0xFF
294 | sum2 = (sum1 + sum2) % 0xFF
295 |
296 | # Append Fletcher 16 checksum checksum to request
297 | request += chr(sum1)
298 | request += chr(sum2)
299 |
300 | # Return request
301 | return request
302 |
303 | # Get Ascii
304 | def getAscii(self) :
305 |
306 | # Check if host command
307 | if self.hostCommand != "" :
308 |
309 | # Return host command
310 | return self.hostCommand
311 |
312 | # Initialize request
313 | request = ""
314 |
315 | # Go through all values
316 | for i in xrange(len(self.order)) :
317 |
318 | # Check if command contains value and value is valid
319 | if bool(self.dataType & (1 << i)) and bool(0xF0F7F & (1 << i)) :
320 |
321 | # Append parameter identifier and value
322 | request += self.order[i] + self.parameterValue[i] + " "
323 |
324 | # Check if M command contains a string
325 | if i == 1 and bool(self.dataType & (1 << 15)) :
326 |
327 | # Append string to request
328 | request += self.parameterValue[15] + " "
329 |
330 | # Remove last space from request
331 | if request != "" :
332 | request = request[: -1]
333 |
334 | # Return request
335 | return request
336 |
337 | # Get data type
338 | def getDataType(self) :
339 |
340 | # Return data type
341 | return self.dataType
342 |
343 | # Has parameter
344 | def hasParameter(self, parameter) :
345 |
346 | # Check if parameter isn't a space
347 | if parameter != " " :
348 |
349 | # Check if parameter is valid
350 | parameterOffset = self.order.find(parameter)
351 | if parameterOffset != -1 :
352 |
353 | # Return if value is set
354 | return bool(self.dataType & (1 << parameterOffset))
355 |
356 | # Return false
357 | return False
358 |
359 | # Remove parameter
360 | def removeParameter(self, parameter) :
361 |
362 | # Check if parameter isn't a space
363 | if parameter != " " :
364 |
365 | # Check if parameter is valid
366 | parameterOffset = self.order.find(parameter)
367 | if parameterOffset != -1 :
368 |
369 | # Clear data type
370 | self.dataType &= ~(1 << parameterOffset)
371 |
372 | # Clear parameter value
373 | self.parameterValue[parameterOffset] = ""
374 |
375 | # Check if command is now empty
376 | if self.dataType == 0x1080 :
377 |
378 | # Clear original command
379 | self.originalCommand = ""
380 |
381 | # Has value
382 | def hasValue(self, parameter) :
383 |
384 | # Check if parameter isn't a space
385 | if parameter != " " :
386 |
387 | # Check if parameter is valid
388 | parameterOffset = self.order.find(parameter)
389 | if parameterOffset != -1 :
390 |
391 | # Return if parameter's value isn't empty
392 | return self.parameterValue[parameterOffset] != ""
393 |
394 | # Return false
395 | return False
396 |
397 | # Get value
398 | def getValue(self, parameter) :
399 |
400 | # Check if parameter isn't a space
401 | if parameter != " " :
402 |
403 | # Check if parameter is valid
404 | parameterOffset = self.order.find(parameter)
405 | if parameterOffset != -1 :
406 |
407 | # Return parameter's value
408 | return self.parameterValue[parameterOffset]
409 |
410 | # Return empty
411 | return ""
412 |
413 | # Set value
414 | def setValue(self, parameter, value) :
415 |
416 | # Check if parameter isn't a space
417 | if parameter != " " :
418 |
419 | # Check if parameter is valid
420 | parameterOffset = self.order.find(parameter)
421 | if parameterOffset != -1 :
422 |
423 | # Set data type
424 | self.dataType |= (1 << parameterOffset)
425 |
426 | # Set parameter value
427 | self.parameterValue[parameterOffset] = value
428 |
429 | # Has string
430 | def hasString(self) :
431 |
432 | # Return if string is set
433 | return bool(self.dataType & (1 << 15))
434 |
435 | # Get string
436 | def getString(self) :
437 |
438 | # Return string
439 | return self.parameterValue[15]
440 |
441 | # Set string
442 | def setString(self, value) :
443 |
444 | # Set data type
445 | self.dataType |= (1 << 15)
446 |
447 | # Set string value
448 | self.parameterValue[15] = value
449 |
450 | # Clear
451 | def clear(self) :
452 |
453 | # Reset data type
454 | self.dataType = 0x1080
455 |
456 | # Clear parameter values
457 | for i in xrange(len(self.order)) :
458 | self.parameterValue[i] = ""
459 |
460 | # Clear host command
461 | self.hostCommand = ""
462 |
463 | # Clear original command
464 | self.originalCommand = ""
465 |
466 | # Is host command
467 | def isHostCommand(self) :
468 |
469 | # Return if host command is set
470 | return hostCommand != ""
471 |
472 | # Is empty
473 | def isEmpty(self) :
474 |
475 | # Return if doesn't contain any values
476 | return self.dataType == 0x1080
477 |
--------------------------------------------------------------------------------