GithubHelp home page GithubHelp logo

rajajawahar / model.derivative-swift-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from autodesk-forge/model.derivative-swift-sample

0.0 0.0 0.0 211 KB

Generate thumbnail from files: This sample shows how you can use the Data Management API to upload files to your application's own private bucket on OSS, get it translated using the Model Derivative API and then retrieve the generated thumbnail

License: MIT License

Swift 100.00%

model.derivative-swift-sample's Introduction

Swift sample for Forge API's

Platforms Swift XCode License OAuth2 OSS Model-Derivative

Description

This sample shows how you can use the Data Management API to upload files to your application's own private bucket on OSS, get it translated using the Model Derivative API and then retrieve the generated thumbnail. The front-end will look like this:

Thumbnail

thumbnail

Note: you can only get simple files translated, i.e. files which reference other files (like an Inventor assembly) will have no geometry in their translated version.

Setup

  • Apply for your own credentials (API keys) from developer.autodesk.com
  • Fill the form's Consumer Key & Consumer Secret with your Forge app's credentials
  • Click Generate Token in order to authenticate with the Forge webservices. This will fill the Access Token text field of the form
  • Specify a Bucket Name you want to use. Note that it needs to be lower case characters and numbers and needs to be globally unique. One easy way to make sure that it will be unique is to use the lower case version of your Consumer Key as the first part of the Bucket Name and then add something to that
  • Click Upload File to create the new bucket and upload a file to it. This will also start the translation process and will write information about how far the translation got
  • The Urn's field will keep a list of all the files that got uploaded to your bucket. Once the translation finished for a specific item then the thumbnail for it will become available. Now when you select an item from the Urn's list then the file's thumbnail will appear in the bottom part of the form

License

That samples are licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Adam Nagy (Forge Partner Development)
http://forge.autodesk.com

model.derivative-swift-sample's People

Contributors

adamenagy avatar kimekeunkyung avatar jaylimboonkiat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.