bugpyFormex - Bugs: bug #42016, pickElements in gl2

 
 

bug #42016: pickElements in gl2

Submitter:  gianluca de santis <gianlucadesi>
Submitted:  Mon 31 Mar 2014 02:08:59 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Item Group:  Functionality error Status:  Fixed
Privacy:  Public Assigned to:  bverheg
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
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>
Group administrator
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>
Group 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>
Group administrator
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>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-22 bverheg Open/ClosedOpen Closed
    2014-04-01 bverheg StatusNone Fixed
        Assigned toNone bverheg
    2014-03-31 bverheg CategoryNone GUI
        Item GroupNone Functionality error

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code