machinabio / limbforge-service

Single-purpose microservice to generate STLs from parametric CAD designs.
Apache License 2.0
3 stars 1 forks source link

CAD Preview Endpoint #12

Open kaitlynhova opened 7 years ago

kaitlynhova commented 7 years ago

follow up to https://github.com/machinabio/limbforge-service/issues/11

  1. Create the CAD Preview endpoint in shift
  2. Implement the changes in Limbforge's front end app.
luzlab commented 7 years ago

GET /cad/preview/DEVICEorTD_SLUG?C1=12.0&C2=28

Returns File (Binary STL)

luzlab commented 7 years ago

I'm going to break this up into 3 endpoints. GET /cad/preview/DEVICEorTD_SLUG/sync?C1=12.0&C2=28 - returns immediately if already cached, otherwise blocks until component is generated.

GET /cad/preview/DEVICEorTD_SLUG?C1=12.0&C2=28 - returns immediately if already cached, otherwise returns 503 (Service Temporarily Unavailable) and generates a request to generate the component.

GET /cad/preview/DEVICEorTD_SLUG/info?C1=12.0&C2=28 - returns information about the component (cached, generated date, size, etc).