forge - devcon 2016: introduction to forge 3d print api through sample applications

28
Tomer Galon Product Manager, Autodesk Introduction to Forge 3D Print API with Sample Applications Ania Lipka Principal Developer, Autodesk

Upload: autodesk

Post on 12-Apr-2017

254 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Tomer Galon

Product Manager, Autodesk

Introduction to Forge 3D Print API with Sample Applications

Ania Lipka

Principal Developer, Autodesk

Page 2: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Who We Are

Ania LipkaPrincipal Developer

Tomer GalonProduct Manager

Page 3: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

• 3D Print API Overview

• How Dremel leverages Forge

• Print Preparation

• Printer Simulator

• Sending a print to the printer

• Connect to Service Bureaus

• Q/A

Agenda

Page 4: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Spark Is Now Forge 3D Print API

• Spark Forge

• Most APIs are already in Forge

• Service Bureau API coming soon

• Migrate apps from Spark to Forge

• See Migration Guide on Spark Developers Portal

Page 5: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Successful Prints

Page 6: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Failed Prints

Page 7: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Forge 3D Print API

Build a reliable and customized printing workflow from a model to the printer

Page 8: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Forge 3D Print API

PrinterDefinition

printer typesprofilesmaterials

Printer Management

registrationstatusjobmanagement

PrintPreparation

analyzerepairorient and positionscalesupport and slice

Page 9: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Customer Case Study: Dremel

Page 10: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Printer Registration

Page 11: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Forge

Data

ManagementOAuth 3D Print Firmware API

Web App

Architecture

3D Printer

REST / Faye APIREST API

Page 12: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

1. Register your 3D printer

2. Upload a 3D model file (obj, stl, 3mf)

3. Repair the Mesh

4. Prepare a Tray

5. Generate a Printable file (.gcode or .png)

6. Submit a Job and start printing

3D Printing in 6 Simple Steps

Page 13: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

• Remove Duplicate Triangles

• Remove Degenerate Faces

• Fix Incorrectly Oriented Triangles

• Close Trivial Holes

• Fix Non-Manifold Geometries

Repairing 3D Models for Printing

Page 14: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

baseURL = "developer.api.autodesk.com"

url = baseURL + "/geom/meshes/import"

payLoad = {

"file_id": “urn:..../oss/v2/buckets/b1/objects/model.obj”,

"name": “Mesh 1” }

response = requests.post(url, json=payLoad)

⇒ taskId => meshId

Import Mesh (python)

Page 15: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

baseURL = "developer.api.autodesk.com"

url = baseURL + "/geom/meshes/repair"

payLoad = { "id": meshId,

”all": True }

response = requests.post(url, json=payLoad)

⇒ taskId => meshId

Repair Mesh (python)

Page 16: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications
Page 17: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Support Generation - Examples

Page 18: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Support Generation - Examples

Page 19: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

baseURL = "developer.api.autodesk.com"

url = baseURL + "/print/trays"

payLoad = {

"printer_type_id": “7FAF097F-DB2E-45DC-9395-A30210E789AA”,

"profile_id": “34F0E39A-9389-42BA-AB5A-4F2CD59C98E4”,

"mesh_ids": [ meshId1, meshId2, ..] }

response = requests.post(url, json=payLoad) ⇒ trayId

Create Tray (python)

Page 20: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

baseURL = "developer.api.autodesk.com"

url = baseURL + "/print/trays/prepare"

payLoad = { “id": “trayId ” }

response = requests.post(url, json=payLoad) ⇒ trayId

Prepare Tray (python)

Page 21: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Slicing

Page 22: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

baseURL = "developer.api.autodesk.com"

url = baseURL + "/print/trays/generatePrintable"

payLoad = { “id": “trayId ” }

response = requests.post(url, json=payLoad)

=> taskId ⇒ fileId

Generate Printable (python)

Page 23: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

baseURL = "developer.api.autodesk.com"

url = baseURL + "/print/printers/” + printerId + "/jobs”

payLoad = { “printer_id": “printerId ”,

“id”: fileId }

response = requests.post(url, json=payLoad)

⇒ jobId

Create Print Job (python)

Page 24: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Printer Simulator

• You don’t need to have a real printer

• Shows how to connect the firmware to Forge

• Source code on GitHub

Page 25: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications
Page 26: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Resources

3D Print API:

Print Simulator:

Sample Code:

https://developer.autodesk.com/en/docs/print/v1/

https://github.com/spark3dp/print-simulator

https://github.com/spark3dp/forge-webapp-samples

Page 27: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications

Q&A

Expert Table

@AutodeskForge

#ForgeDevCon

Page 28: Forge - DevCon 2016: Introduction to Forge 3D Print API Through Sample Applications