Introduction

This post highlights the key features of aspose-3d-foss for Python — a FOSS library for loading, exporting, and traversing 3D scenes in Python. The library provides a Scene hierarchy with Node, Mesh, Camera, and Light objects, format-specific I/O for OBJ, STL, and glTF, and inspection of keyframe animation data.

Developers can compute axis-aligned bounding boxes to determine object extents and optimize rendering pipelines. Transformations (including translation, rotation, and scaling) allow precise control over entity placement within a scene.

For interoperability, Aspose.3D provides native support for the STL (Stereo Lithography) format, widely used in 3D printing and CAD workflows.

Quick Start

Install the package from PyPI and import the core classes:

asposefoss/3d is not yet published — build from source until it ships. See the project README for build instructions.

Key Highlights

  • Support for Camera and Light objects enables realistic scene lighting and view configuration in 3D visualizations and game development
  • Animation inspection via AnimationClip, AnimationNode, and KeyframeSequence classes with interpolation modes including LINEAR, BEZIER, B_SPLINE, and CARDINAL_SPLINE
  • Precise control over animation extrapolation using Extrapolation and ExtrapolationType ensures consistent behavior beyond keyframe ranges
  • Native support for the 3MF (3D Manufacturing Format) via FileFormat.MICROSOFT_3MF_FORMAT streamlines 3D printing and manufacturing pipelines
  • Hierarchical scene graph with Node, Entity, and A3DObject classes for attaching meshes, cameras, and lights to the scene tree
from aspose.threed.entities import Camera

# Create a Camera instance
cam = Camera("main")

# Access the name property
print(cam.name)   # "main"

Getting Started

Use Scene, Mesh, and Node to build a 3D scene programmatically in Python, including polygon mesh building, material assignment for OBJ files, and export to multiple formats. The following example creates a triangular mesh and attaches it to the scene root node:

from aspose.threed import Scene
from aspose.threed.entities import Mesh

# Create a scene, attach a mesh, and inspect it
scene = Scene()
mesh = Mesh("triangle")
mesh.create_polygon(0, 1, 2)

node = scene.root_node.create_child_node("Shape", mesh)
print(node.name)          # "Shape"
print(mesh.polygon_count)  # 1

See Also

Explore related capabilities in Aspose.3D for Python, including mesh manipulation, scene graph traversal, and export to glTF and OBJ formats.