Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 22, 2021 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/48c3e21ff6a4a08171f83eaa871ae100 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/48c3e21ff6a4a08171f83eaa871ae100 to your computer and use it in GitHub Desktop.
Convert OBJ 3D Object File to FBX or STL Programmatically in Java
// Load input OBJ file with Scene class.
Scene scene = new Scene("scene.obj");
// Initialize FBXSaveOptions object with SaveFormat enumeration.
FbxSaveOptions options = new FbxSaveOptions(FileFormat.FBX7400ASCII);
// Convert OBJ to FBX file.
scene.save("Test.fbx", options);
// Load input OBJ file with Scene class.
Scene scene = new Scene("scene.obj");
// Initialize STLSaveOptions class object.
StlSaveOptions saveSTLOpts = new StlSaveOptions();
// Convert OBJ to STL file.
scene.save("test.stl", saveSTLOpts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment