Instantly share code, notes, and snippets.

Embed
What would you like to do?

Python dans la fabrication numérique et l'impression 3D

Meetup Python Nantes février 2018

Arthur Lutz



Disclaimer

don't do this at home

I do this at home

not my day job


Programme

  • introduction (vectoriel, commande numérique, etc.)

  • conception avec python (inkscape, blender, freecad)

  • l'impression 3D (cura, octoprint, printrun)

  • la découpe laser (Laserengraver_smoothie)

  • prototypage electronique (micropython, wipy)


Introduction


Scalable Vector Graphics (SVG)

  • dessin vectoriel

source wikipedia


Gcode

G90 ; use absolute positioning for the XYZ axes  
G1 X10 F3600 ; move to the X=10mm position on the bed  
G1 X20 F3600 ; move to X=20mm

Impression 3D


Extrusion 3D

  • retrait par couches de matière
  • découpe d'un matériaux
    • (par exemple les "foam cutters")

PCBs

source: wikipedia


Conception


inkscape: de l'image au SVG

(pas en python)

Ouvrir l'image > Path > Tracebitmat

du SVG à la découpe laser

http://fablabo.net/wiki/Raster2Gcode


inkscape & python

  • extensions en python (et aussi en perl, ruby, shell)

inkscape: du SVG à la 3D

Paths to OpenSCAD


inkscape : extensions

http://wiki.inkscape.org/wiki/index.php/Extension_repository

  • ImprovedGears
  • InkscapeLasertcutBox
  • Gcode tools (inclus dans inkscape)

blender & python

https://docs.blender.org/api/current/


freecad & python

View > Panels > Python console

Freecad exemple

import Part

doc = FreeCAD.newDocument()
myshape = Part.makeSphere(10)
shapeobj = doc.addObject("Part::Feature",
                         "MyShape")
shapeobj.Shape = myshape
doc.recompute()

Freecad copie d'écran


openscad & python

https://github.com/SolidCode/SolidPython


Autres


python & impression 3D


Printrun

http://www.pronterface.com/


Cura

https://ultimaker.com/en/products/ultimaker-cura-software


Cura - sous le capot


Octoprint


Plugins Python pour Octoprint

import octoprint.plugin
# ...
__plugin_name__ = "My Plugin"
def __plugin_load__():
    # whatever you need to do to load your plugin, 
    # if anything at all
    pass

(prototypage) éléctronique


kicad

http://kicad-pcb.org/


fritzing

http://fritzing.org/

fritzing-parts (scripts python) : https://github.com/fritzing/fritzing-parts


fritzing to 3D print

https://github.com/fritzing/fzz2scad


micropython

https://micropython.org/


micropython - conférences


wipy

micropython sur ESP avec du wifi

https://pycom.io/


micro:bit

http://microbit.org/


micro:bit & python

https://python-editor-1-0-0.microbit.org/help.html


raspberry pi & python

GPIO !


from gpiozero import LED
from time import sleep

led = LED(17)

while True:
    led.on()
    sleep(1)
    led.off()
    sleep(1)


Bonus : Mission Pinball Framework


Fin

à vous!

questions / suggestions

Contacts :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment