사용자 사례

리뷰 보기

Aspose.3D는 개발자가 3D 장면과 모델을 프로그래밍적으로 만들고, 조작하고 변환할 수 있는 Python 용 오픈소스 3d 파일 형식 라이브러리입니다.이 도서관은 강력한 I/O 파일 및 장점 그래픽 처리를 제공함으로써 현대적인 3 D 작업 흐름을 지원합니다.

도서관은 PBR 재료 지원을 가진 glTF (GL 전송 형식)에 대한 완전한 지원, 그것은 웹 및 실시간 렌더링 파이프라인에 적합합니다. 그것의 이라크 노드 구조는 복잡한 모델을위한 스케일 가능한 장면 관리를 가능하게하는 부모-아동 관계를 사용하여 3D 장상의 직관적인 조직을 허용한다.

어떻게 작동하는지

Aspose.3D for Python은 3D 장면과 모델에 대한 프로그래밍 컨트롤을 제공하며, 구조화된 개체 모델을 통해 3d 모양을 통합합니다. Scene, Node,그리고, 그리고 Entity.개발자는 STL (3D 인쇄에 널리 사용되는)와 같은 기존 형식을 충전하거나 핵심 원시를 사용하여 스크래치에서 장면을 구축 할 수 있습니다. Mesh.도서관은 메쉬와 엔티트 관리를 지원하며, 궤도 데이터, 대형 토폴리오 및 공간 관계의 검사 및 수정이 가능합니다.

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

# Create a Mesh instance
mesh = Mesh()

# Access mesh data (control_points and edges are properties, not method calls)
vertices = mesh.control_points
edges = mesh.edges

코드 예제

이 예제는 OBJ 파일에서 3D 모델을 로드 옵션으로 업로드 한 다음 스케치 그래프를 통과하여 메쉬 지질학을 검사하는 것을 보여줍니다. Scene.from_file() 단 하나의 파일 경로만 받아 들일 수 있습니다; 사용 scene.open() 옵션을 통과하십시오.

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

# Import an OBJ file with load options
# Note: Scene.from_file() takes only a file path argument.
# To pass options, use scene.open() instead.
options = ObjLoadOptions()
options.enable_materials = True
options.flip_coordinate_system = False

scene = Scene()
scene.open("model.obj", options)

# Access imported data
for node in scene.root_node.child_nodes:
    if node.entity and isinstance(node.entity, Mesh):
        mesh = node.entity
        print(f"Mesh: {node.name}")
        print(f"  Vertices: {len(mesh.control_points)}")
        print(f"  Polygons: {mesh.polygon_count}")

또한 보기

Aspose.3D는 시각화 도구 및 상호 작용을위한 강력한 3D Python 개발을 가능하게합니다.개발자는 3d 장면을 만들고 조작할 수 있으며, OBJ 파일을 재료로 가져올 수 있습니다. ObjLoadOptions.enable_materials, OBJ 파일을 사용하여 수출 ObjExporter, 그리고 낮은 수준의 벡터 수학을 사용하여 내장된 유형을 실행합니다. Vector4 그리고 Matrix4.

 한국어