BasicOperations/FBModelCube.py

BasicOperations/FBModelCube.py
1 # Copyright 2009 Autodesk, Inc. All rights reserved.
2 # Use of this software is subject to the terms of the Autodesk license agreement
3 # provided at the time of installation or download, or which otherwise accompanies
4 # this software in either electronic or hard copy form.
5 #
6 # Topic: FBModelCube, FBModelTransformationType, FBModelShadingMode
7 #
8 
9 
10 from pyfbsdk import FBModelCube, FBVector3d, FBModelTransformationType, FBModelShadingMode
11 
12 # Create the cube.
13 lCube = FBModelCube('aFBModelCube')
14 
15 lCube.SetVector( FBVector3d( 50, 50, 50 ) )
16 lCube.SetVector( FBVector3d( 25, 25, 25 ), FBModelTransformationType.kModelScaling )
17 lCube.SetVector( FBVector3d( 15, 25, 35 ), FBModelTransformationType.kModelRotation )
18 
19 # Let's use a different shading mode.
20 lCube.ShadingMode = FBModelShadingMode.kFBModelShadingWire
21 
22 # The object must be set visible to be present in the system.
23 lCube.Visible = True
24 lCube.Show = True
25 # Cleanup.
26 del( lCube, FBModelCube, FBVector3d, FBModelTransformationType, FBModelShadingMode )