Skip to content
Sections
Personal tools
You are here: Home » BALLView » Support » PythonScripts » Scripts » CreateRepresentation.py

CreateRepresentation.py

Document Actions
How to create a new Representation with usermade GeometricObjects in BALLView.
t1 = Tube()
t2 = Sphere()
t1.setVertex1(Vector3(2,3,4))
t1.setVertex2(Vector3(4,5,6))
t2.setPosition(Vector3(4,5,6))
t1.setRadius(2)
t2.setRadius(2)
t1.setColor(ColorRGBA(1.0,1.0,1.0))
t2.setColor(ColorRGBA(1.0,1.0,1.0))
r = Representation()
r.insert(t1)
r.insert(t2)
getMainControl().insert(r)
getMainControl().update(r)
 
 

Powered by Plone

This site conforms to the following standards: