bugpyFormex - Bugs: bug #40149, splitByConnection alters prop nr

 
 

bug #40149: splitByConnection alters prop nr

Submitted by:  gianluca de santis <gianlucadesi>
Submitted on:  Mon 30 Sep 2013 04:15:59 PM UTC  
 
Category: CoreSeverity: 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.

 

Mon 30 Sep 2013 06:34:41 PM UTC, comment #4:

We believe this issue has been fixed in commit 2d2018197.
Please test and close bug if appropriately fixed.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 30 Sep 2013 06:18:14 PM UTC, comment #3:

This is caused by splitByConnection setting the properties so it can use the splitProp method. The latter documents that the returned objects have the property of the selector, but that is ok because it is also the original property of the elements.

In the case of splitByConnection however, the user might indeed expect to get the original property values, and that would be in line with the pyFormex philosophy.

I think the easiest/best solution is to add an optional 'prop' argument to splitProp, so that you do not need to overwrite the properties in order to do the split.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 30 Sep 2013 04:15:59 PM UTC, comment #2:

This item has been reassigned from the project pyFormex support tracker to your tracker.

The original report is still available at support #108403

Following are the information included in the original report:

[field #0] Item ID: 108403
[field #1] Group ID: 10866
[field #2] Open/Closed: Open
[field #3] Severity: 2 - Minor
[field #4] Privacy: Public
[field #9] Category: None
[field #10] Submitted by: gianlucadesi
[field #11] Assigned to: bverheg
[field #12] Submitted on: Mon 30 Sep 2013 05:21:56 PM CEST
[field #13] Summary: splitByConnection alters prop nr
[field #14] Original Submission: When a mesh has already property numbers and one needs to split it into unconnected parts the splitByConnection does the job, but also replace the prop with different properties. Maybe an option could be added to avoid that properties are lost?
Or maybe an option to return the elem indices instead of new meshes?

[field #16] Item Group: None
[field #17] Status: None
[field #18] Component Version: None
[field #19] Operating System: None
[field #20] Reproducibility: None
[field #21] Size (loc): None
[field #22] Fixed Release: None
[field #23] Planned Release: None
[field #24] Effort: 0.00
[field #28] Priority: 5 - Normal
[field #31] Percent Complete: 0%
[field #33] Release: None
[field #58] Custom Select Box #1: None
[field #59] Custom Select Box #2: None
[field #60] Custom Select Box #3: None
[field #61] Custom Select Box #4: None
[field #62] Custom Select Box #5: None
[field #63] Custom Select Box #6: None
[field #64] Custom Select Box #7: None
[field #65] Custom Select Box #8: None
[field #66] Custom Select Box #9: None
[field #67] Custom Select Box #10: None

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 30 Sep 2013 03:34:04 PM UTC, comment #1:

It seems that splitByConnection changes prop nr in the output meshes (and it should not) and also in the input mesh.

Example:

from simple import sphere
s=sphere(1).setProp(1)+sphere(2).trl([2., 0., 0.]).setProp(2)
s.prop[range(5)]=3
draw(s.trl([0., 3., 0.]))
s1 = s.splitByConnection()
draw(s1)
draw(s.trl([0., -3., 0.]))#also s has new prop nr!!!
zoomAll()
exit()

from simple import sphere
s=sphere(1).setProp(1)+sphere(2).trl([2., 0., 0.]).setProp(2)
s.prop[range(5)]=3
draw(s.trl([0., 3., 0.]))
s1 = s.splitByConnection()
draw(s1)
draw(s.trl([0., -3., 0.]))
zoomAll()
exit()

gianluca de santis <gianlucadesi>
Project Member
Mon 30 Sep 2013 04:15:59 PM UTC, original submission:

When a mesh has already property numbers and one needs to split it into unconnected parts the splitByConnection does the job, but also replace the prop with different properties. Maybe an option could be added to avoid that properties are lost?
Or maybe an option to return the elem indices instead of new meshes?

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 30 Jan 2014 10:12:17 AM UTCbverhegStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 30 Sep 2013 06:34:41 PM UTCbverhegStatusIn Progress=>Ready For Test
    Mon 30 Sep 2013 06:18:14 PM UTCbverhegCategoryNone=>Core
      Severity2 - Minor=>3 - Normal
      Item GroupNone=>Functionality error
      StatusNone=>In Progress
      Assigned toNone=>bverheg
    Mon 30 Sep 2013 04:15:59 PM UTCbverhegReassign itempyFormex, sr #108403=>pyFormex, bug #40149

    Back to the top


    Powered by Savane 3.1-cleanup1