Created
August 12, 2025 10:17
-
-
Save aspose-com-gists/4d74342e6c8c11c523a2b1597bb77dba to your computer and use it in GitHub Desktop.
Build an OBJ to U3D Converter in C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Aspose.ThreeD; | |
using Aspose.ThreeD.Formats; | |
namespace AsposeThreeD | |
{ | |
class Graphics | |
{ | |
// Convert OBJ to PLY in C# | |
static void Main(string[] args) | |
{ | |
// Define the directory path. | |
String dataDir = "data"; | |
License lic = new License(); | |
lic.SetLicense("License.lic"); | |
// Create an object of the Scene class. | |
Scene scene = new Scene(); | |
// Invoke the Open method to load the Source OBJ file. | |
scene.Open(dataDir + "Aspose3D.obj"); | |
// Initialize an instance of the U3dSaveOptions class to access the options for exporting scene as U3D file. | |
var u3dSaveOptions = new U3dSaveOptions(); | |
// The Save method will save the output file in U3D file format. | |
scene.Save(dataDir + "/sample.u3d", u3dSaveOptions); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment