3D Mode l ing and Printing by Python EuroPython 2016@ Bi l bao, Spain 2016/07/22 Takuro Wada
Hi! Kabuku Inc. (Japanese Startup) 和 田 拓 朗 Software Engineer Takuro Wada Providing services related to 3D printing taxpon taxpon http://takuro.ws
What is 3D printing?
What is 3D printing? Creating products by forming successive layers of material based on 3D Data
Example https://en.wikipedia.org/wiki/3D_printing
What is required for 3D Printing?
What is required for 3D printing? 3D Printer 3D Data
How to create 3D Data?
3D Data Examp l e STL(ASCII)
Definition of Triang l e (po l ygon)
Definition of Triang l e (po l ygon) Successive triang l e definitions
Format is so simple
But creating 3D Data from scratch is so hard task
3DCG/CAD software
Many 3D software provides Python API
Many 3D software provides Python API You can manipulate 3D data via Python
Script Modeling ‣ You can create 3D mode l even if you are not fami l iar with 3DCG/CAD software ‣ You can create shapes that are difficu l t for hand creation ‣ Modifying shape is easy
_人人人人人人人_ _人人人人人人人_ Script Modeling ‣ You can create 3D mode l even if you are not fami l iar with 3DCG/CAD software ‣ You can create shapes that are difficu l t for hand creation ‣ Modifying shape is easy > GREAT !! < > FANTASTIC !!< ‾ Y^Y^Y^Y^Y^Y ‾ ‾ Y^Y^Y^Y^Y^Y ‾
_人人人人人人人_ Today’s software > FREE !! < ‾ Y^Y^Y^Y^Y^Y ‾
Script Modeling with Blender and Python
What is Blender? • Deve l oped since 199 5 • Open source software, Mu l ti p l atform • Language: C, C ++ , Python ‣ Python is used as API interface ‣ B l ender has its own python interpreter in the software ( 3.5. 1 in B l ender 2 . 77 a ) asyncio!!
De l ete defau l t Object Add cone
-P option and script name to execute
Making Chain Project Making Chain https://flic.kr/p/aA2u7C CC BY-SA 2.0
https://www.myminifactory.com/object/5943
https://www.youtube.com/watch?v=z1OSXnCG-jk
http://afinia.com/3d-printers/h480/
Afinia H480 Bed Size 15 cm 15 cm
Decided to create l onger one Longer one … jumping rope… https://flic.kr/p/5pT9iD CC BY 2.0
Connect b l ender and minecraft wor l d using Python
Convert this kind of 3D data to Minecraft B l ocks!!
Implementation Overview Consists of two main pars. Convert 3D mode l Transport b l ocks into B l ocks into Minecraft Converting Transporting
Converting before after
Level of Conversion
Transporting b l ender Spigot add-on p l ugin TCP Raspberry mcpi Juice • Use mcpi (python modu l e • Spigot = Minecraft mod server for minecraft) modu l e • Raspberry Juice is p l ugin for Spigot
_人人人人人人人人_ \ (^o^) / > Success!! < ‾ Y^Y^Y^Y^Y^Y^Y ‾
F l oating Faces!!
You can l ive in your face!!
3D Printed Resu l t
Github • b 2 mine ‣ https://github.com/taxpon/b 2 mine
Script Modeling with OpenSCAD and Python
What is OpenSCAD? • CAD software, Open source (GPL) • Mu l ti p l atform ( Win, Mac, Linux ) • Imp l emented by C ++ (Qt) • Create 3D mode l using origina l programming l anguage • No GUI to manipu l ate 3D data
Feature of OpenSCAD • Very good for Software Engineer • Written script can be kicked from command l ine ‣ Generate mode l in Server ‣ Create mu l tip l e mode l with command
Neck tie composed of mu l tip l e characters
Generate by 1 command ‣ You can pass arguments from command l ine to OpenSCAD script
OpenPySCAD • Generate OpenSCAD code from Python code ‣ https://github.com/taxpon/openpyscad • Insta ll via pip command $ pip install openpyscad
OpenPySCAD • Union operation Cube([20, 10, 10]) + Cube([10, 20, 10]) union(){ cube([20, 10, 10]) cube([10, 20, 10]) };
OpenPySCAD • Difference operation Cube([20, 10, 10]) - Cube([10, 20, 10]) difference(){ cube([20, 10, 10]) cube([10, 20, 10]) };
OpenPySCAD • Rotation c1 = Cube([20, 10, 10]) c1.rotate([0, 0, 45]) rotate([0, 0, 45]){ cube([20, 10, 10]) };
Conclusion
Script Mode l ing is FUN!! Script Modeling is FUN!! • Let's start tody Let’s start today https://flic.kr/p/ef4VBP CC BY 2.0
We are Hiring!! ‣ Python Deve l oper ‣ C ++ Deve l oper ‣ Frontend Deve l oper ‣ Angu l ar/React ‣ You can use 3D printer ‣ Internationa l members ‣ 3 Goog l e Deve l oper Experts Engineer team http://www.kabuku.co.jp/#jobs
Recommend
More recommend