 Okay so welcome after the lunch please welcome Takuro Wada who's going to be talking about 3d modeling and printing by Python. So thank you for coming this talk and I'm gonna talk about 3d modeling printing and by Python. So first of all let me introduce myself in brief. My name is Takuro and I am a software engineer in Kabuku and Kabuku is a Japanese state which provides services related to 3d printing and who uses 3d printing before. Okay okay so I like to explain first about 3d printing today. So what is 3d printing? Literally 3d printing is creating products by forming accessible layers of material based on 3d data. So this is an example of 3d printer. This is a most prevailing method of 3d printer which is called FDM and in this method this method use plastic tube and melting it to create layers. So okay so what is required for 3d printing? So as I said 3d printing is create a successful material layer based on 3d data. So we need 3d data and 3d printer. So regarding 3d data 3d printer please buy it or you can use 3d printer service bureau or like shape width or scrub tail or Rinkaku. So regarding 3d data you can get by multiple way. For example you can buy 3d data from some website or you can download 3d data from some other website or of course you can create your own 3d data by yourself. And today I'm going to focus on creating 3d data so I like to talk about it and so how to create 3d data. So I like to introduce one example of 3d data format which is called STL and STL has two type format binaries and ASCII and this is ASCII. So seeing this format you can see second from second line to eighth line. There is a definition of triangle which is called polygon and the 3d model is consist of a bunch of polygons. So the format is so simple. So you can also find successful line, successful triangle definition is following the first triangle definition. So it's very, that's it, so simple. So format is so simple. So you can write your program to create this kind of data structure but creating this kind of 3d data from scratch is so hard task. So because you have to do some complicated matrix calculation or vector calculation so it's not good idea to create software from scratch. So many people using these kind of existing software like Maya, 3ds Max, Blender or Solidworks or Ryan Serres and fortunately this kind of software provided in the Python API. So that means you can manipulate or control your 3d data through Python scripts. And I'm not familiar with using 3d Caldo 3ds software so I started to create 3d model using Python script and I'm calling this method of 3d model creation as script modeling. So let me introduce script modeling. Script modeling, if you do script modeling you can create a 3d model even if you are not familiar with 3d cg or caldo software. So it's very good for software engineer like me and you can create shapes that are difficult for hand creation. And modifying shape is easier because as many programs those kind of program has some parameter to define the shape so if you change such kind of parameter you can change the resulting shape. So it's great and fantastic so I'm so excited to start this project. And today's software I will I'm going to talk about two software, Blender and OpenScap and it's free to use so you can start your script modeling today. Okay so let's start from Blender. So what is Blender? Blender is developed since 1995 so it's a little younger than Python and this is OpenSoftware and multi-platform Windows Mac Linux and this is developed by Shea, Shea++ and Python. And Python is used as API interface and Blender has its own Python interpreter in the software so the latest version of Blender is 2.778 so it's including 3.5.1 Python so you can use async.io in the script. Okay so this is a brief example of the Blender Python script. This script consists of two parts. First part is the rating default object part so if you run Blender there are default objects in the center cube and camera and lights so you have to do this kind of object before doing your job. So the upper part is the rating default object and this add-con method is doing the job. So this program is simply adding a cone in the scene. If you want to run your script in Blender, you can type this cone in your terminal, Blender, space, minus, large p, space, script name and then if you run this command, a cone will appear. So it's so basic script so because it's so basic script it may be not interesting. So I'd like to introduce my past project. One project is making chain and this is a 3d printed chain and this is originally made by the others and this is amazing. This is interesting chain and this is all 3d printed without assembling process. So when I sell this chain for this past time it's so amazing, so impressive. So the length of chain is not wrong so 5 maybe from 5 to 10 centimeters so I want to create a longer one. So I started this project and I have this printer called Affinia in my company and Affinia is one of the most famous printers all over the world and this is Affinia bed size. Bed is a 3d printed project will be placed on so the size of bed will define the maximum size of the 3d printed project, a product and when I think making one chain, the shape of chain is important so I had some ideas like this spiral based approach. So after thinking spiral one is better than in terms of space efficiency so I used this idea. Then I created a Python program to create this kind of chain so it's very simple place one module, move it, rotate, move it, rotate, move it, rotate so it's this kind of simple process and when I ran this script I got this result so it's interesting 3D circle and of course I 3d printed it so I was a little excited to see it because it's like a kind of cake so it's very good for me and after taking support material this is this beginning chain and the length of the chain is about one meter and after creating this chain as I said this is one meter so I want to create more longer one because I like jumping rope so my idea is to jump in rope with this chain so I decided to create more longer one so as I said the good point of script modeling is it's easy to change parameters so in this case I changed only this number from 200 to 500 so this is a printed one so to this chain the length is about 2.5 meters and I have to take all support materials and it took maybe eight hours and this is a result chain and yeah and when I try to jump in chain this chain was broken with one so sorry yeah so this is a chain project and the next project is Minecraft so maybe all of you know this software and what I do is what I did is connecting Alborinda and Minecraft world using of course Python script and specifically I convert this kind of ordinary 3d data into 3d block data and the transport the 3d block data into Minecraft so this software consists of two main parts one is combating 3d model into blocks so it's converting part and the other is transporting blocks into Minecraft so transporting part so regarding convert converting part is this so left side showed the original model and the right side shows converted model and there is a variable conversion so you can see the yeah rubber the changing rebel six seven eight original three five six seven so yeah this is a convergent part and trans regarding transporting part I used mcpi module and mcpi is Python module for Minecraft and I used Minecraft mode subba which calls pilot embedded with raspberry just plug in so after those of implementation I finally succeeded to send my face to Minecraft world so success I was so thank you so much and I tried so many times for testing there are so many protein place in my minecraft world and of course this place is consists of the normal Minecraft object you can dig the face and of course you can live in your face that's fantastic isn't it and of course I 3d printed it but it's a no car so I cannot understand with my eye okay so the program is this project is published in github so if you are interested in the project please have a look and this is a brand a project and the next I will talk about openscat so what is openscat openscat is chaos software whereas Brenda is 3d CG software and this is also open source with DPL and the module platform Windows Mac Linux and this software is implemented by she press press with cute framework and you can create 3d module using original programming language which is a little similar to JavaScript but it's not JavaScript and there is no GUI to manipulate or create 3d data in this software so if you want to manipulate 3d software using sorry if you manipulate your 3d data using this software you have to write your screen it's very interesting concept and this is the screenshot of the software left side show the code and right side show the shape created from the left side call and feature up 3d openscat it's very good for software engineer like me so it's very simple concept it's easy to understand and the written script can be kicked from a command line so you can generate your module in server or you can create multiple module well with a single command that's so cool so let me introduce my past project I've created this next time this nectar is composed of multiple characters and there is a bunch of name of my company's colleague so there is mark there is many letters and this is a 3d model so well when I think creation of this model I have to create all alphabet so a to z like this and there are four kind of modules so I have to create a four kind times 26 characters so 104 model I have to create like this so creating by hand is so annoying task so I created this base module and applied this module to this script so you can parse arguments from command line to open scale script yeah so in this case I passed the character information like a to open scale script then open scout will create the whole of the character in the script so it's very interesting so open scale is so awesome software I think but writing open chat original script a little hard because the that's run which has no high functional syntax or there is no class or there is no object there is no inheritance so if you try if you are trying to create some complicated object it's a little difficult so I created Python library this Python library open pie escape so this library generate open scout code from Python code I've already published this library to get help so you can check it and I also register to pipe I so you can install this software VIP command okay so let me introduce the open pie escape so if you want to apply union operation you you write only this upper side as operation because I implement them down though as operator so you can use this operator and then this is generated open scout code yeah it's very intuitive icing and different operation is the same so you can use subtracts operator to create difference operation and if you want to apply a rotation you will create cube object and add a prior rotate method to the object then this open scout code which be generated so if you want to apply so many types of method or for example rotate scale transform union difference intersection to one object the next river is so high in open scout source code so it's very hard to maintenance I think so if you use this open scout open pie a scale script you you didn't you were a boy such can hide nested problem so let's demo okay the left side is a screen of open scale and the right side is a Python code so first import okay so if you run this script you can see the cube and if you want to add some cube to this field oh it's so small this is a union object and if I'm now using odd operator and if you change this subtract operator you will see the subtracted object and my rival is holding debug method in open scout so you can apply debug method and the subtracted object we see this kind of style yeah it's very intuitive I think and another example of course this is a normal Python script so you can create class so in the class I'm creating empty object and odd cube with translation so if I run oh sorry if I run this script oh you will see this kind shape so this is not interesting but you can apply this kind of approach to use 3d modeling creation I think okay so back to stride okay so conclusion of my presentation script modeling is fun so let's start today okay and finally my company is hiring Python developer she press press developer front-end developer and if you join my company you can use 3d printer for free as you like and we have so international members from England Sweden Germany Eston in Australia and we have we also have three Google developer experts so we are very interested in working in Japan or working in my company please talk to me later or see this top board that is thanks you have any questions hello thanks for your talk it's great and what do you use for scanning those faces because I guess this is scant or modeled my face yes and the others I use the scanner which is called sense provided by 3d systems okay yeah thank you any more questions thanks for presentation really engaging I think in an interesting way maybe with engaging kids I think I feel like a kid I want to play with these things one technical question yeah your open pi s cad yeah yeah and your demo when you are you actually saving it to a file oh yeah so you create a script and you at some point you said blah blah blah example dot yeah yeah yeah when you run it it passes that file into open s cad is that the way it goes or do you communicate directly with open s cat now in regarding the function open s cat is watching the part change so yeah just I'm overwriting fire then open a scale detect the change of fire and reload it okay thank you I'm still got some time for questions anybody else so why not rendering directly the stl file from the python model maybe as an extra option three rendering the object yeah directly to the free representation to an stl object or any other kind of 3d representation instead of using the s cad you mean why are we why I'm using stl okay in my minecraft project open pi scale so yeah so yeah finally I will export stl to 3d printed but in this under in this software I'm trying to some prototyping in the screen so I finally I created I finally I created just shape I want I will export it to stl okay anybody else so thank you very much again