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

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Dernier (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

From Code to Coffee Table with Blender and Sly