Skip to content

Instantly share code, notes, and snippets.

@blog-aspose-cloud
Last active October 20, 2024 19:56
OBJ to STL Converter

Wavefront OBJ to STL conversion using Java REST API

Converting OBJ to STL is essential for streamlining 3D model usage across various applications, as both formats are widely used in 3D modeling and printing. This article explains the details for converting OBJ to STL using Java REST API, and ensures compatibility with a broader range of software and tools. All this conversion is performed using Aspose.3D Cloud SDK for Java.

For further details, please visit OBJ to STL Conversion in Java.

obj to stl

Important Links

Home | Product Page | Docs | API Reference | Cloud Dashboard | Code Samples | Source Code | Blog | Free Support | Free Trial

Java REST API to convert OBJ to STL online
// Get clientId and clientSecret from https://dashboard.aspose.cloud/
String clientId = "XXXXX-XXXXX-XXXXX-XXXXX-f5a14a4b6466";
String clientSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
// create an instance of Aspose.3D cloud
ThreeDCloudApi threeDCloudApi = new ThreeDCloudApi("client_credentials", clientId, clientSecret);
// name of input OBJ file
String inputFile = "myInput.obj";
// resultant STL format
String newformat = "stlascii";
// name of resultant file
String resultantFileName = "resultant.stl";
// Storage for resultant file. If no information for storage is specified, then default storage is used.
String storage = "internal";
// initialize the conversion operation
var response = threeDCloudApi.postConvertByFormat(inputFile, newformat, resultantFileName, folder, true, storage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment