3D Mode l ing and Printing by Python EuroPython 2016@ Bi l bao, - - PowerPoint PPT Presentation

3d mode l ing and printing by python
SMART_READER_LITE
LIVE PREVIEW

3D Mode l ing and Printing by Python EuroPython 2016@ Bi l bao, - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

EuroPython 2016@Bilbao, Spain

2016/07/22 Takuro Wada

3D Modeling and Printing by Python

slide-2
SLIDE 2

Kabuku Inc. (Japanese Startup)

Software Engineer

Providing services related to 3D printing

Takuro Wada

和 田 拓 朗

taxpon taxpon http://takuro.ws

Hi!

slide-3
SLIDE 3

What is 3D printing?

slide-4
SLIDE 4

Creating products by forming successive layers

  • f material based on 3D Data

What is 3D printing?

slide-5
SLIDE 5

Example

https://en.wikipedia.org/wiki/3D_printing

slide-6
SLIDE 6

What is required for 3D Printing?

slide-7
SLIDE 7

What is required for 3D printing?

3D Data 3D Printer

slide-8
SLIDE 8

How to create 3D Data?

slide-9
SLIDE 9

3D Data Example STL(ASCII)

slide-10
SLIDE 10

Definition of Triangle (polygon)

slide-11
SLIDE 11

Definition of Triangle (polygon) Successive triangle definitions

slide-12
SLIDE 12

Format is so simple

slide-13
SLIDE 13

But creating 3D Data from scratch is so hard task

slide-14
SLIDE 14

3DCG/CAD software

slide-15
SLIDE 15

Many 3D software provides Python API

slide-16
SLIDE 16

Many 3D software provides Python API

You can manipulate 3D data via Python

slide-17
SLIDE 17

Script Modeling

  • You can create 3D model even if you

are not familiar with 3DCG/CAD software

  • You can create shapes that are

difficult for hand creation

  • Modifying shape is easy
slide-18
SLIDE 18

Script Modeling

_人人人人人人人_ >FANTASTIC!!< ‾Y^Y^Y^Y^Y^Y‾ _人人人人人人人_ > GREAT!! < ‾Y^Y^Y^Y^Y^Y‾

  • You can create 3D model even if you

are not familiar with 3DCG/CAD software

  • You can create shapes that are

difficult for hand creation

  • Modifying shape is easy
slide-19
SLIDE 19

Today’s software

_人人人人人人人_ > FREE!! < ‾Y^Y^Y^Y^Y^Y‾

slide-20
SLIDE 20

Script Modeling with Blender and Python

slide-21
SLIDE 21

What is Blender?

  • Developed since 1995
  • Open source software, Multi platform
  • Language: C, C++, Python
  • Python is used as API interface
  • Blender has its own python interpreter in the

software(3.5.1 in Blender2.77a)asyncio!!

slide-22
SLIDE 22

Delete default Object Add cone

slide-23
SLIDE 23
  • P option and script name to execute
slide-24
SLIDE 24
slide-25
SLIDE 25

Making Chain Project

Making Chain

https://flic.kr/p/aA2u7C CC BY-SA 2.0

slide-26
SLIDE 26

https://www.myminifactory.com/object/5943

slide-27
SLIDE 27

https://www.youtube.com/watch?v=z1OSXnCG-jk

slide-28
SLIDE 28

http://afinia.com/3d-printers/h480/

slide-29
SLIDE 29

15cm 15cm

Afinia H480 Bed Size

slide-30
SLIDE 30
slide-31
SLIDE 31
slide-32
SLIDE 32
slide-33
SLIDE 33
slide-34
SLIDE 34
slide-35
SLIDE 35

Decided to create longer one

jumping rope…

Longer one …

https://flic.kr/p/5pT9iD CC BY 2.0

slide-36
SLIDE 36
slide-37
SLIDE 37
slide-38
SLIDE 38
slide-39
SLIDE 39
slide-40
SLIDE 40
slide-41
SLIDE 41

Connect blender and minecraft world using Python

slide-42
SLIDE 42

Convert this kind of 3D data to Minecraft Blocks!!

slide-43
SLIDE 43

Implementation Overview

Convert 3D model into Blocks Transport blocks into Minecraft

Consists of two main pars.

Converting Transporting

slide-44
SLIDE 44

before

Converting

after

slide-45
SLIDE 45

Level of Conversion

slide-46
SLIDE 46

blender add-on

Transporting

Spigot mcpi plugin Raspberry Juice

TCP

  • Spigot=Minecraft mod server
  • Raspberry Juice is plugin for

Spigot

  • Use mcpi (python module

for minecraft) module

slide-47
SLIDE 47
slide-48
SLIDE 48

_人人人人人人人人_ > Success!! < ‾Y^Y^Y^Y^Y^Y^Y‾

\(^o^)/

slide-49
SLIDE 49

Floating Faces!!

slide-50
SLIDE 50

You can live in your face!!

slide-51
SLIDE 51

3D Printed Result

slide-52
SLIDE 52

Github

  • b2mine
  • https://github.com/taxpon/b2mine
slide-53
SLIDE 53

Script Modeling with OpenSCAD and Python

slide-54
SLIDE 54

What is OpenSCAD?

  • CAD software, Open source (GPL)
  • Multi platform(Win, Mac, Linux)
  • Implemented by C++(Qt)
  • Create 3D model using original programming language
  • No GUI to manipulate 3D data
slide-55
SLIDE 55
slide-56
SLIDE 56

Feature of OpenSCAD

  • Very good for Software Engineer
  • Written script can be kicked from command line
  • Generate model in Server
  • Create multiple model with command
slide-57
SLIDE 57

Neck tie composed of multiple characters

slide-58
SLIDE 58
slide-59
SLIDE 59
slide-60
SLIDE 60
slide-61
SLIDE 61
slide-62
SLIDE 62

Generate by 1 command

  • You can pass arguments from command line to OpenSCAD

script

slide-63
SLIDE 63

OpenPySCAD

  • Generate OpenSCAD code from Python code
  • https://github.com/taxpon/openpyscad
  • Install via pip command

$ pip install openpyscad

slide-64
SLIDE 64

OpenPySCAD

  • Union operation

Cube([20, 10, 10]) + Cube([10, 20, 10]) union(){
 cube([20, 10, 10])
 cube([10, 20, 10])
 };

slide-65
SLIDE 65
  • Difference operation

Cube([20, 10, 10]) - Cube([10, 20, 10]) difference(){
 cube([20, 10, 10])
 cube([10, 20, 10])
 };

OpenPySCAD

slide-66
SLIDE 66

OpenPySCAD

  • Rotation

c1 = Cube([20, 10, 10]) c1.rotate([0, 0, 45]) rotate([0, 0, 45]){
 cube([20, 10, 10])
 };

slide-67
SLIDE 67

Conclusion

slide-68
SLIDE 68

Script Modeling is FUN!!

  • Let's start tody

Script Modeling is FUN!!

Let’s start today

https://flic.kr/p/ef4VBP CC BY 2.0

slide-69
SLIDE 69

We are Hiring!!

  • Python Developer
  • C++ Developer
  • Frontend Developer
  • Angular/React
  • You can use 3D printer
  • International members
  • 3 Google Developer Experts

Engineer team

http://www.kabuku.co.jp/#jobs