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

 
 

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

Submitted by:  gianluca de santis <gianlucadesi>
Submitted on:  Wed 09 Apr 2014 12:40:37 PM UTC  
 
Category: CoreSeverity: 3 - Normal
Item Group: Feature requestStatus: 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.

 

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>
Project AdministratorIn charge of this item.
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>
Project 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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project Member

 

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

Attach File(s):
   
   
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
  • -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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 May 2014 09:55:36 AM UTCbverhegStatusReady For Test=>Fixed
      Assigned toNone=>bverheg
      Open/ClosedOpen=>Closed
    Wed 16 Apr 2014 01:46:44 PM UTCgianlucadesiStatusNone=>Ready For Test
    Wed 16 Apr 2014 01:46:15 PM UTCgianlucadesiAttached File-=>Added reachableFrom.py, #31184
    Wed 09 Apr 2014 02:59:49 PM UTCgianlucadesiAttached File-=>Added connectedElements.py, #31145
    Wed 09 Apr 2014 01:00:00 PM UTCbverhegItem GroupNone=>Feature request

    Back to the top


    Powered by Savane 3.1-cleanup1