Wed 19 Sep 2012 05:46:11 PM UTC, comment #3:
The thing is that draw() is intended to draw Geometry. The axes are usually a decoration, not part of the model. We have many other draw... functions for such purposes. If you want to add the axes to the model, convert it to a Formex.
It would be possible to create a wrapper draw function to draw anything, and then call the appropriate specialized function. But the reason to keep them separate is that the arguments are quite different. Thus, unless there is a compelling reason to use draw instead of drawAxes, I intend to remove the actor.
|
Thu 30 Aug 2012 10:00:45 AM UTC, original submission:
Drawing a CoordinateSystem object results in the following TypeError:
Traceback (most recent call last):
File "/home/sofie/pyformex/pyformex/gui/viewport.py", line 846, in paintGL
self.display()
File "/home/sofie/pyformex/pyformex/gui/canvas.py", line 871, in display
actor.draw(canvas=self)
File "/home/sofie/pyformex/pyformex/gui/drawable.py", line 1168, in draw
self.prepare_list(**kargs)
File "/home/sofie/pyformex/pyformex/gui/drawable.py", line 1186, in prepare_list
self.list = self.create_list(**kargs)
File "/home/sofie/pyformex/pyformex/gui/drawable.py", line 1203, in create_list
self.drawGL(**kargs)
File "/home/sofie/pyformex/pyformex/gui/actors.py", line 261, in drawGL
drawPolygons(x,e,mode='flat',color=self.color,alpha=self.alpha)
File "/home/sofie/pyformex/pyformex/gui/drawable.py", line 186, in drawPolygons
drawgl.draw_polygon_elems(x,e,n,color,t,alpha,objtype)
TypeError
:
a float is required
|