Skip to content

Instantly share code, notes, and snippets.

@aspose-com-kb
Last active November 26, 2022 07:19
Show Gist options
  • Save aspose-com-kb/cec7b3a25a43bc98c01e2237e1471ba6 to your computer and use it in GitHub Desktop.
Save aspose-com-kb/cec7b3a25a43bc98c01e2237e1471ba6 to your computer and use it in GitHub Desktop.
Code to Convert FBX to STL in C#. For more details: https://kb.aspose.com/3d/net/how-to-convert-fbx-to-stl-in-csharp/
using Aspose.ThreeD;
namespace AsposeProjects
{
class Program
{
static void Main(string[] args) // Main function to convert FBX to STL using C#
{
// Initialize license
License lic = new License();
lic.SetLicense("Aspose.Total.lic");
// Load the input FBX file
Scene document = Scene.FromFile("test.fbx");
// Create StlSaveOptions class object
Aspose.ThreeD.Formats.StlSaveOptions options = new Aspose.ThreeD.Formats.StlSaveOptions();
// Convert FBX to STL file
document.Save("output.stl", options);
System.Console.WriteLine("FBX to STL is converted successfully");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment