SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
From Code to Coffee Table
with Blender and Sly
Matt Meshulam
ChiPy 2015-03-12
About Me
By day - Developer Experience at
Member of Pumping Station: One
Side projects involving electronics, music,
woodworking, Python, cooking, visual art
The Metropol Table
https://www.youtube.com/watch?v=o1QxFu2VxCU
Conception
CNC enables novel construction methods
that require unique, high precision parts.
Fabrication tools exist, but what about
upstream design tools?
I want a new coffee table.
Fabrication Software
● Vectric VCarve -
Convert vector images
to G-code toolpaths
● ShopBot software -
Calibrate axes and run
G-code on the ShopBot
G-code (yuck!)
Metropol Parasol, Seville, Spain
Study 1: ShopBotsaurus Rex
Pattern via http://www.instructables.com/id/Build-a-6-0-tall-Wooden-T-Rex-Model/
Study 2: Design composeable parts
Create a 3D model in Blender
Use 123D Make to convert model into fab-
able parts
Blender model
123D Make
Autodesk 123D Make
:-)
● Free
● Designed for CNC
construction
● Many cool built-in
features
:-(
● Unstable
● GUI only
● Hard to extend
A better design tool?
● Artistic/exploratory workflow
● Precise and reproducible operations
● Output in a useful format (2D vector
shapes)
● Aware of physical 3D concepts (e.g.
intersection)
Existing programmatic CAD tools
OpenSCAD
FreeCAD
PythonOCC
Cadquery
Why Blender?
● Intended for artistic uses
● Awesome Python API
● Large user base
● Open source
Why NOT Blender?
● It’s not CAD
● Mesh-based
● Poor support for physical construction
A Quick Tour of Blender
bpy - Main Blender Python module
Programmatic equivalent of the GUI
Highly imperative - Operations apply to the
global selection context
Great for macros/automation, not for
complex apps
A bpy operation - No arg for what you’re resizing!
bmesh - Low level mesh interface
Meshes are Python objects
A BMesh object contains:
- Vertices
- Edges (2 verts)
- Faces (3+ verts)
bmesh (cont’d)
Users must ensure mesh consistency
Tightly coupled to C data structures - be
careful directly modifying mesh data!
http://www.blender.org/api/blender_python_api_2_73a_release/bmesh.html
bmesh.ops - BMesh Operations
Most GUI (bpy) ops have underlying BMesh
implementations
(Mostly) well documented
bmesh.ops - Example
Blender’s classes for 3D math: Matrix, Vector,
etc.
Available as a standalone module
mathutils
Wait, what are we trying to do again?
Wait, what are we trying to do again?
Introducing Sly
A Python library for 3D construction from 2D parts
Uses Blender for I/O, but fairly decoupled
Only ~350 SLoC
Two core concepts
Slice - A 2D polygon (with thickness)
positioned in 3D space.
Cut - Material to be removed from a slice so
it can interlock with another slice
Let’s see it in action!
Manually sculpted mesh
Mirroring and smoothing - Blender mesh modifiers
Specify slice locations
and orientations
Extract slices from
selected mesh
Apply an operation
to each one
Add slices to vector
output and Blender
scene
Script generates slices
Rendered slices include cutouts
Generated vectors,
manually positioned
Sly implementation
Extracting slices from a model:
Sly implementation (cont’d)
Shapely - http://toblerity.org/shapely/
● Great polygon library
● GIS-focused but general purpose
● Support for geometric operations:
intersections, unions, etc.
● Slices use Shaply polygons internally
Sly Roadmap
● Installer, tests, docs
● Command line operation
● Better Blender GUI integration
● Smart slice placement
● Output to G-code?
● Different construction modes?
Want more?
In-depth sessions at PS:1 starting in April, email me to
get notified: matt@meshul.am
Contribute on GitHub: github.com/meshulam/sly
Thanks!
Twitter: @mattmeshulam
GitHub: meshulam

Contenu connexe

Similaire à From Code to Coffee Table with Blender and Sly

Interview with Anatoliy Kuznetsov, the author of BitMagic C++ library
Interview with Anatoliy Kuznetsov, the author of BitMagic C++ libraryInterview with Anatoliy Kuznetsov, the author of BitMagic C++ library
Interview with Anatoliy Kuznetsov, the author of BitMagic C++ libraryPVS-Studio
 
IRJET- Pick and Place Robot for Color based Sorting
IRJET-  	  Pick and Place Robot for Color based SortingIRJET-  	  Pick and Place Robot for Color based Sorting
IRJET- Pick and Place Robot for Color based SortingIRJET Journal
 
Point cloud mesh-investigation_report-lihang
Point cloud mesh-investigation_report-lihangPoint cloud mesh-investigation_report-lihang
Point cloud mesh-investigation_report-lihangLihang Li
 
Designing, Fabricating, and Building an Electronic Badge
Designing, Fabricating, and Building an Electronic BadgeDesigning, Fabricating, and Building an Electronic Badge
Designing, Fabricating, and Building an Electronic BadgeJim Apger
 
Textile product simulation Report
Textile product simulation ReportTextile product simulation Report
Textile product simulation ReportHashim Ali
 
Digital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC MillingDigital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC MillingMassimo Menichinelli
 
Copy of Copy of Untitled presentation (1).pdf
Copy of Copy of Untitled presentation (1).pdfCopy of Copy of Untitled presentation (1).pdf
Copy of Copy of Untitled presentation (1).pdfjosephdonnelly2024
 
Cd general presentation_201306_eng_03
Cd general presentation_201306_eng_03Cd general presentation_201306_eng_03
Cd general presentation_201306_eng_03Victor Mitov
 
3-Axis Drawing Machine
3-Axis Drawing Machine3-Axis Drawing Machine
3-Axis Drawing MachineAhmad Moharib
 
Design, Analysis and Fabrication of Pick & Place Colour Sorting Robotic Arm
Design, Analysis and Fabrication of Pick & Place Colour Sorting Robotic ArmDesign, Analysis and Fabrication of Pick & Place Colour Sorting Robotic Arm
Design, Analysis and Fabrication of Pick & Place Colour Sorting Robotic ArmIRJET Journal
 

Similaire à From Code to Coffee Table with Blender and Sly (20)

AutoCAD Tutorial AB.pptx
AutoCAD Tutorial AB.pptxAutoCAD Tutorial AB.pptx
AutoCAD Tutorial AB.pptx
 
Interview with Anatoliy Kuznetsov, the author of BitMagic C++ library
Interview with Anatoliy Kuznetsov, the author of BitMagic C++ libraryInterview with Anatoliy Kuznetsov, the author of BitMagic C++ library
Interview with Anatoliy Kuznetsov, the author of BitMagic C++ library
 
IRJET- Pick and Place Robot for Color based Sorting
IRJET-  	  Pick and Place Robot for Color based SortingIRJET-  	  Pick and Place Robot for Color based Sorting
IRJET- Pick and Place Robot for Color based Sorting
 
Point cloud mesh-investigation_report-lihang
Point cloud mesh-investigation_report-lihangPoint cloud mesh-investigation_report-lihang
Point cloud mesh-investigation_report-lihang
 
Project report
Project reportProject report
Project report
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
CityEngine-OpenDS
CityEngine-OpenDSCityEngine-OpenDS
CityEngine-OpenDS
 
Designing, Fabricating, and Building an Electronic Badge
Designing, Fabricating, and Building an Electronic BadgeDesigning, Fabricating, and Building an Electronic Badge
Designing, Fabricating, and Building an Electronic Badge
 
Textile product simulation Report
Textile product simulation ReportTextile product simulation Report
Textile product simulation Report
 
Digital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC MillingDigital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC Milling
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Copy of Copy of Untitled presentation (1).pdf
Copy of Copy of Untitled presentation (1).pdfCopy of Copy of Untitled presentation (1).pdf
Copy of Copy of Untitled presentation (1).pdf
 
Cd general presentation_201306_eng_03
Cd general presentation_201306_eng_03Cd general presentation_201306_eng_03
Cd general presentation_201306_eng_03
 
3-Axis Drawing Machine
3-Axis Drawing Machine3-Axis Drawing Machine
3-Axis Drawing Machine
 
Engineering Portfolio
Engineering PortfolioEngineering Portfolio
Engineering Portfolio
 
lec1b.ppt
lec1b.pptlec1b.ppt
lec1b.ppt
 
Fab Academy 2015: CNC Milling
Fab Academy 2015: CNC MillingFab Academy 2015: CNC Milling
Fab Academy 2015: CNC Milling
 
Mini Project- Dual Processor Computation
Mini Project- Dual Processor ComputationMini Project- Dual Processor Computation
Mini Project- Dual Processor Computation
 
15793804.ppt
15793804.ppt15793804.ppt
15793804.ppt
 
Design, Analysis and Fabrication of Pick & Place Colour Sorting Robotic Arm
Design, Analysis and Fabrication of Pick & Place Colour Sorting Robotic ArmDesign, Analysis and Fabrication of Pick & Place Colour Sorting Robotic Arm
Design, Analysis and Fabrication of Pick & Place Colour Sorting Robotic Arm
 

Dernier

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

From Code to Coffee Table with Blender and Sly