Aspose.3D FOSS for Python

API reference for aspose-3d-foss 26.1.0 (Python 3.7 – 3.12, MIT license).

All classes are imported from the aspose.threed package or its sub-packages. The root import is:

import aspose.threed
##or selectively:
from aspose.threed import Scene, Node
from aspose.threed.entities import Mesh, Camera, Light
from aspose.threed.formats import ObjLoadOptions, StlSaveOptions, GltfSaveOptions
from aspose.threed.utilities import Vector3, Matrix4, BoundingBox
from aspose.threed.animation import AnimationClip, KeyFrame

Core Scene Graph

ClassDescription
SceneTop-level container for all 3D scene data. Holds the root node, asset metadata, and animation clips. Exposes from_file(), open(), and save() as the primary I/O entry points.
NodeA named node in the scene hierarchy. Owns a list of child nodes and a list of attached Entity objects such as meshes, cameras, and lights. Carries a local Transform.
EntityAbstract base class for all objects that can be attached to a Node. Provides name and identity but no geometry of its own.
SceneObjectBase class shared by Node and Entity. Provides the property collection interface used for user-defined metadata.
A3DObjectRoot base class for all Aspose.3D managed objects. Exposes the name property and the Properties collection.
INamedObjectInterface that guarantees a name property. Implemented by Node, Entity, and several format-specific descriptor types.

Geometry and Mesh

ClassDescription
MeshPolygon mesh entity. Stores control points (vertex positions as Vector4), polygon face lists (lists of control-point indices), and vertex element layers (normals, UVs, vertex colours).
GeometryAbstract base for mesh-like geometry types. Defines the control-point array and the collection of VertexElement layers. Mesh inherits from Geometry.
VertexElementAbstract base for a data layer attached to geometry (normals, UVs, colours, etc.). Carries mapping_mode, reference_mode, and a data list.
VertexElementNormalStores one normal vector per vertex or per polygon corner, depending on mapping_mode. Data values are Vector4 instances with w unused.
VertexElementUVStores texture-coordinate pairs (Vector2) per vertex or per polygon corner. A mesh may carry multiple UV layers for different texture channels.
VertexElementVertexColorStores per-vertex or per-corner RGBA colour data as Vector4 (r, g, b, a in the range 0–1).
VertexElementSmoothingGroupStores per-polygon smoothing group integer IDs, used by the OBJ importer to reproduce the original smoothing group assignments from the source file.
VertexElementTypeEnumeration identifying the semantic role of a vertex element layer: NORMAL, UV, VERTEX_COLOR, SMOOTHING_GROUP, and others. Pass values to Mesh.get_element().
MappingModeEnumeration controlling which primitive a vertex element value maps to: CONTROL_POINT, POLYGON_VERTEX, POLYGON, EDGE, or ALL_SAME.
ReferenceModeEnumeration controlling how values are indexed: DIRECT (one value per mapping primitive) or INDEX_TO_DIRECT (values array plus a separate indices array).
PolygonModifierStatic utility class with methods to triangulate Mesh objects and entire Scene graphs.

Transform and Spatial

ClassDescription
TransformLocal transformation attached to a Node. Provides translation, rotation (as Quaternion), and scale components, plus convenience properties for Euler angles.
GlobalTransformRead-only view of a node’s world-space transformation after composing all ancestor transforms. Accessed via Node.global_transform.
AssetInfoMetadata block attached to a Scene. Stores authoring application name, unit name, unit scale factor, coordinate system axis definitions, and creation/modification timestamps.

Materials and Shading

ClassDescription
MaterialAbstract base class for all material types. Provides a name and a property collection for numeric and colour parameters.
LambertMaterialDiffuse-only material model. Stores ambient colour, diffuse colour, emissive colour, and transparency. Loaded from OBJ files that use basic Ka/Kd/Ke declarations.
PhongMaterialExtends LambertMaterial with specular colour and shininess (specular exponent). Loaded from OBJ files that use Ks/Ns declarations.
PbrMaterialPhysically Based Rendering material. Stores albedo, metallic factor, roughness factor, and associated textures. Used by glTF 2.0 and other PBR-capable formats.

Camera and Lighting

ClassDescription
CameraCamera entity. Only projection_type and name are functional in this edition; all other numeric properties (near_plane, far_plane, field_of_view, aspect_ratio) are stubs that return default values. Attached to a Node to define viewpoint transforms.
LightLight-source entity. Stores light type (light_type). Inherits from Camera as a stub class.
LightTypeEnumeration of supported light categories: POINT, DIRECTIONAL, SPOT, AREA, VOLUME.
ProjectionTypeEnumeration of camera projection modes: PERSPECTIVE and ORTHOGRAPHIC.

Math Utilities

ClassDescription
Vector2Double-precision 2-component vector (x, y). Used for UV texture coordinates.
Vector3Double-precision 3-component vector (x, y, z). Used for positions, directions, and scale.
Vector4Double-precision 4-component vector (x, y, z, w). Used for control points (homogeneous positions) and normal data.
FVector2Single-precision 2-component float vector. Used internally for compact storage in vertex element data arrays.
FVector3Single-precision 3-component float vector. Appears in vertex element data arrays for normals and tangents.
FVector4Single-precision 4-component float vector. The storage type of VertexElementFVector.data.
QuaternionUnit quaternion for representing rotations (w, x, y, z). Used by Transform.rotation.
Matrix44×4 double-precision transformation matrix. Used for world/local transform computations and can be constructed from TRS decompositions.
BoundingBoxAxis-aligned bounding box defined by minimum and maximum Vector3 corners. Used for spatial queries and frustum culling helpers.

Animation

ClassDescription
AnimationClipNamed container for a set of animated channels covering one playback range. A Scene may hold multiple clips (e.g., “Walk”, “Run”).
AnimationNodeBinds an AnimationClip to a specific scene node or property. Acts as the bridge between clip data and scene graph objects.
AnimationChannelA single animated property stream within a clip, targeting a named property on an object (e.g., Transform.translation.x).
KeyFrameA single time–value sample within a KeyframeSequence. Stores the time (in seconds) and the value at that time.
KeyframeSequenceAn ordered list of KeyFrame objects for one scalar channel, together with interpolation and extrapolation settings.
InterpolationEnumeration of interpolation modes between keyframes: CONSTANT, LINEAR, BEZIER, B_SPLINE, CARDINAL_SPLINE, TCB_SPLINE.
ExtrapolationTypeEnumeration of behaviours beyond the first and last keyframe: CONSTANT, GRADIENT, CYCLE, CYCLE_RELATIVE, OSCILLATE.

Format I/O

SymbolDescription
Scene.from_file(path)Static method. Opens the file at path, detects the format from the extension, and returns a populated Scene. Raises on file-not-found or unsupported format.
Scene.open(path, options=None)Instance method. Opens a file into an existing Scene instance, optionally using a format-specific LoadOptions subclass.
Scene.save(path, options=None)Instance method. Serialises the scene to path using the format inferred from the extension, optionally using a format-specific SaveOptions subclass.
FileFormatRegistry of supported file formats. Contains entries such as FileFormat.WAVEFRONT_OBJ(), FileFormat.GLTF2(), FileFormat.FBX7400ASCII(), FileFormat.COLLADA.
IOServiceInternal I/O abstraction used by format importers and exporters. Not typically used directly by application code.
LoadOptionsBase class for all format-specific load-option objects. Subclassed by ObjLoadOptions, StlLoadOptions, GltfLoadOptions, FbxLoadOptions, ColladaLoadOptions, ThreeMfLoadOptions.
SaveOptionsBase class for all format-specific save-option objects. Subclassed by ObjSaveOptions, StlSaveOptions, GltfSaveOptions, FbxSaveOptions, ColladaSaveOptions, ThreeMfSaveOptions.

OBJ Format

ClassDescription
ObjImporterInternal importer class that parses Wavefront OBJ and MTL files. Invoked automatically by Scene.from_file() for .obj extensions.
ObjLoadOptionsLoad options for Wavefront OBJ files. Key properties: flip_coordinate_system, scale, enable_materials, normalize_normal.
ObjSaveOptionsSave options for Wavefront OBJ output. Controls normals, UVs, material references, and point-cloud mode.
ObjFormatFormat descriptor for Wavefront OBJ. Accessible as FileFormat.WAVEFRONT_OBJ().

STL Format

ClassDescription
StlImporterInternal importer that reads both binary and ASCII STL files. Selected automatically by extension.
StlExporterInternal exporter that writes STL.
StlLoadOptionsLoad options for STL files. Supports flip_coordinate_system and scale.
StlSaveOptionsSave options for STL output. Controls binary_mode, scale, and flip_coordinate_system.
StlFormatFormat descriptor for STL.

glTF Format

ClassDescription
GltfLoadOptionsLoad options for glTF 2.0 and GLB files. Key property: flip_tex_coord_v.
GltfSaveOptionsSave options for glTF 2.0 output. Use binary_mode=True for a self-contained GLB package.
GltfFormatFormat descriptor for glTF 2.0 / GLB. Accessible as FileFormat.GLTF2().

FBX Format

ClassDescription
FbxLoadOptionsLoad options for FBX files. Key properties: keep_builtin_global_settings, compatible_mode.
FbxSaveOptionsSave options for FBX output. Controls compression, texture embedding, and material properties.
FbxFormatFormat descriptor for FBX. Accessible as FileFormat.FBX7400ASCII().

COLLADA Format

ClassDescription
ColladaLoadOptionsLoad options for COLLADA (.dae) files. Controls axis remapping and unit scale on import.
ColladaSaveOptionsSave options for COLLADA output. Controls indented, flip_coordinate_system, and material export.
ColladaFormatFormat descriptor for COLLADA. Accessible as FileFormat.COLLADA.

3MF Format

ClassDescription
ThreeMfLoadOptionsLoad options for 3MF (.3mf) files.
ThreeMfSaveOptionsSave options for 3MF output. 3MF is the preferred format for 3D printing workflows.
ThreeMfFormatFormat descriptor for 3MF. Accessible as FileFormat.MICROSOFT_3MF_FORMAT().

Enumerations

EnumerationDescription
AxisIdentifies a coordinate axis: X_AXIS, Y_AXIS, Z_AXIS. Used in coordinate-system remapping options.
CoordinateSystemSpecifies handedness convention: RIGHT_HAND or LEFT_HAND.
TextureMappingIdentifies how a texture is mapped to geometry: DIFFUSE, SPECULAR, EMISSIVE, NORMAL, AMBIENT, etc.
BooleanOperationCSG Boolean operation type recorded in source files: ADD (union), SUB (subtraction), INTERSECT.

Properties System

ClassDescription
PropertyA single named typed property on an A3DObject. Stores the property name, type descriptor, and current value.
PropertyCollectionIterable collection of Property objects attached to an A3DObject. Supports lookup by name and iteration over all defined properties.
CustomObjectA lightweight A3DObject subclass that carries only a name and an arbitrary PropertyCollection. Used for storing user-defined metadata on scene objects.

Image and Render

ClassDescription
ImageRenderOptionsOptions for software rasterisation when rendering a scene to an image buffer. Stores background colour, image dimensions, and camera reference. This feature is available in supported configurations.

See Also