Your First Aspose.3D Application

How to Create the Application

The steps below creates the application using the Aspose.3D API:

  1. Create an instance of the Scene class.
  2. If you have a license, then apply it. If you are using the evaluation version, skip the license related code lines.
  3. Create a new 3D file, or open an existing 3D file.
  4. Access the scene contents in the 3D file.
  5. Generate the modified 3D file.

The implementation of the above steps is demonstrated in the examples below.

How to Create a New Scene Document

The following example creates a new 3D scene file from scratch. First, create a 3D scene and then save the file in FBX format.

import aspose.threed as a3d
# For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
# The path to the documents directory.
# Create an object of the Scene class
scene = a3d.Scene()
# Save 3D scene document
scene.Save("document.fbx", a3d.FileFormat.FBX7500ASCII)

How to Open an Existing File

The following example opens an existing 3D template file named “document.fbx”.

import aspose.threed as a3d
# For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
# The path to the documents directory.
# Initialize a Scene class object
scene = Scene()
# Load an existing 3D document
scene.open("document.fbx")