Post on 12-Apr-2017
Tomer Galon
Product Manager, Autodesk
Introduction to Forge 3D Print API with Sample Applications
Ania Lipka
Principal Developer, Autodesk
Who We Are
Ania LipkaPrincipal Developer
Tomer GalonProduct Manager
• 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
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
Successful Prints
Failed Prints
Forge 3D Print API
Build a reliable and customized printing workflow from a model to the printer
Forge 3D Print API
PrinterDefinition
printer typesprofilesmaterials
Printer Management
registrationstatusjobmanagement
PrintPreparation
analyzerepairorient and positionscalesupport and slice
Customer Case Study: Dremel
Printer Registration
Forge
Data
ManagementOAuth 3D Print Firmware API
Web App
Architecture
3D Printer
REST / Faye APIREST API
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
• Remove Duplicate Triangles
• Remove Degenerate Faces
• Fix Incorrectly Oriented Triangles
• Close Trivial Holes
• Fix Non-Manifold Geometries
Repairing 3D Models for Printing
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)
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)
Support Generation - Examples
Support Generation - Examples
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)
baseURL = "developer.api.autodesk.com"
url = baseURL + "/print/trays/prepare"
payLoad = { “id": “trayId ” }
response = requests.post(url, json=payLoad) ⇒ trayId
Prepare Tray (python)
Slicing
baseURL = "developer.api.autodesk.com"
url = baseURL + "/print/trays/generatePrintable"
payLoad = { “id": “trayId ” }
response = requests.post(url, json=payLoad)
=> taskId ⇒ fileId
Generate Printable (python)
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)
Printer Simulator
• You don’t need to have a real printer
• Shows how to connect the firmware to Forge
• Source code on GitHub
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
Q&A
Expert Table
@AutodeskForge
#ForgeDevCon