bugpyFormex - Bugs: bug #42080, Pick elements with...

 
 

bug #42080: Pick elements with filter='connected' works for surface but not for mesh

Submitter:  gianluca de santis <gianlucadesi>
Submitted:  Wed 09 Apr 2014 12:40:37 PM UTC
   
 
Category:  Core Severity:  3 - Normal
Item Group:  Feature request Status:  Fixed
Privacy:  Public Assigned to:  bverheg
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 26 May 2014 09:55:36 AM UTC, comment #4: 

reachableFrom has been made a supported Mesh method. It does however not contain the mask argument. Therefore, the function with the mask argument has been retained in mesh_ext under the name connectedElements (mainly for use in the interactive picking functions).

Benedict Verhegghe <bverheg>
Group administrator
Wed 16 Apr 2014 01:46:15 PM UTC, comment #3: 

In commit fe717d3 (and 4f70d80) connectedElements has been replaced with reachableFrom (in mesh_ext.py). This solves this bug. Please test the new function in the attached example.

(file #31184)

gianluca de santis <gianlucadesi>
Group Member
Wed 09 Apr 2014 02:59:49 PM UTC, comment #2: 

In attachment a version of connectedElements with level parameter.
AdjacentTo is not the same as connectedElements because adjacentTo='directly connected to target' whereas connectedElements = 'directly or indirectly connected to target'.

To further generalize a maskedFrontWalk should be implemented (maskedEdgeFrontWalk is already in mesh.py).

For the moment, I would suggest to comment the connectedElements in trisurface.py and add the new connectedElements in mesh.py

(file #31145)

gianluca de santis <gianlucadesi>
Group Member
Wed 09 Apr 2014 01:00:00 PM UTC, comment #1: 

The 'connected' filter was added for surface operations, when we did not have such general Mesh operations yet.
Now, connectedElements should be removed, and Mesh.adjacentTo should be used instead.

Also, the 'connected' filter should get a level parameter like in adjacentTo.


Benedict Verhegghe <bverheg>
Group administrator
Wed 09 Apr 2014 12:40:37 PM UTC, original submission:  

Pick elements with filter='connected' selects the closest element and the elements connected to the closest element.
This gives error on a mesh because

pyformex/gui/viewport.py", line 648, in pick
   
conn_elems = self.actors[closest_actor].object.connectedElements(closest_elem, self.selection.get(closest_actor))

At the moment connectedElements is in trisurface.py so the picking with filter='connected' works for surfaces but not for meshes. The function connectedElements should be moved up in mesh.py.

Of course, picking with filter='connected' does not (and should not) work with a Formex. When picking on a Formex the picking should be ignored or raise an error?

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:
   

Attached Files
file #31184:  reachableFrom.py added by gianlucadesi (2KiB - text/x-python)
file #31145:  connectedElements.py added by gianlucadesi (2KiB - text/x-python)

 

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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-26 bverheg StatusReady For Test Fixed
        Assigned toNone bverheg
        Open/ClosedOpen Closed
    2014-04-16 gianlucadesi StatusNone Ready For Test
    2014-04-16 gianlucadesi Attached File- Added reachableFrom.py, #31184
    2014-04-09 gianlucadesi Attached File- Added connectedElements.py, #31145
    2014-04-09 bverheg Item GroupNone Feature request

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code