bugpyFormex - Bugs: bug #42016, pickElements in gl2

 
 

bug #42016: pickElements in gl2

Submitted by:  gianluca de santis <gianlucadesi>
Submitted on:  Mon 31 Mar 2014 02:08:59 PM UTC  
 
Category: GUISeverity: 3 - Normal
Item Group: Functionality errorStatus: Fixed
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 22 May 2014 02:40:38 PM UTC, comment #5:

The last sentence of previous comment should obviously read:
You can noW select...

Closing the bug

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Tue 01 Apr 2014 09:41:38 AM UTC, comment #4:

Commit eb918d1 adds an extra subselection mode in the status bar during picking actions. You can not select to pick objects by 'any vertex' or by 'all vertices'.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 31 Mar 2014 03:40:40 PM UTC, comment #3:

That should be easy to do: the Actor.inside function (in opengl/drawable) already has an argument sel='any' or 'all'.

It is called from opengl/canvas.py, Canvas.pick_parts, passing always 'any'. The sel argument could be moved up in the pick_parts parameter list, and the pick_elements could pass sel='all' instead.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 31 Mar 2014 03:27:08 PM UTC, comment #2:

For the tim being, when picking a single element pyFormex could return THE element of which ALL points fall in the rectangle. This would solve the problem of the current element picking: when picking an element (ie. picking a point of an element) one random element of the many elements attached to the point is returned (probably it is not randomly, but it seems to be the element closest to the observer). Could this be easily done?

gianluca de santis <gianlucadesi>
Project Member
Mon 31 Mar 2014 02:48:04 PM UTC, comment #1:

Modern OpenGL implementations do not provide picking functionality. Therefore, in the new gl2 engine, we have to implement it ourselves. Currently this is done by testing which points of the geometrical entities fall inside the pick rectangle.
This means that any pick operation is limited to a finite number of points of the geometry. Currently these are only the vertices, and therefore you need to pick a vertex to pick an element.

We could add more points to the test (element centroids, edge midpoints, ...) but this would still leave you unable to pick an element where you can not access any of these points in the current rendering. And because the points are not clearly visible on the rendering, picking might still be tricky.

Therefore, we will implement another technique, using the color buffer of the rendering engine (rendering to an offscreen buffer). That would allow picking by any area of an element.

However, as there remain a lot of things to fix in gl2, the timeframe for the realization of this will largely depend upon other developers stepping in to help.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 31 Mar 2014 02:08:59 PM UTC, original submission:

pickElements (or the equivalemnt
pick_elements() in tools_menu does not work as expected with filter single:
if you click at the center of an elements you do not get anything. In order to select something you need to click a region including a vertex. In that case the face which is closest to the operator is picked. This makes difficult the selection of a single elements. Till some weeks ago the picking worked fine: if you pick (the center of) one element you select that element.
Could this be related to gl2?

gianluca de santis <gianlucadesi>
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 gianlucadesi (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 May 2014 02:40:38 PM UTCbverhegOpen/ClosedOpen=>Closed
    Tue 01 Apr 2014 09:41:38 AM UTCbverhegStatusNone=>Fixed
      Assigned toNone=>bverheg
    Mon 31 Mar 2014 02:48:04 PM UTCbverhegCategoryNone=>GUI
      Item GroupNone=>Functionality error

    Back to the top


    Powered by Savane 3.1-cleanup1