bugpyFormex - Bugs: bug #37224, TypeError when drawing...

 
 

bug #37224: TypeError when drawing CoordinateSystem object

Submitted by:  Sofie Van Cauter <svcauter>
Submitted on:  Thu 30 Aug 2012 10:00:45 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: Benedict Verhegghe <bverheg>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 20 Sep 2012 10:35:36 AM UTC, comment #4:

Removed the actor in revision 2441.

Sofie Van Cauter <svcauter>
Project Member
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.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 10 Sep 2012 06:55:10 AM UTC, comment #2:

I think it's more convenient for the user (or at least for me) to call the general 'draw' function whenever possible instead of the object-specific drawing functions.

Sofie Van Cauter <svcauter>
Project Member
Sun 09 Sep 2012 06:59:43 PM UTC, comment #1:

Use drawAxes(CS) instead of draw(CS).

I suggest we just remove CoordinateSystem.actor, unless someone has a need for using draw(CS).

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
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

Sofie Van Cauter <svcauter>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bverheg (Posted a comment)
  • -unavailable- added by svcauter (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 20 Sep 2012 10:35:36 AM UTCsvcauterOpen/ClosedOpen=>Closed
    Sun 09 Sep 2012 06:59:43 PM UTCbverhegStatusNone=>Wont Fix

    Back to the top


    Powered by Savane 3.1-cleanup1