bugpyFormex - Bugs: bug #47704, formex.projectOnPlane does not...

 
 

bug #47704: formex.projectOnPlane does not work if n is specified as a list of three floats

Submitted by:  Nic Debusschere <ndbussch>
Submitted on:  Fri 15 Apr 2016 09:09:13 AM 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 23 May 2016 07:16:40 AM UTC, comment #4:

Closing the bug, as it seems fixed.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Thu 12 May 2016 07:18:55 PM UTC, comment #3:

Fixed in 15b3ea3

Should now work in all cases:
n specified as int or single or multiple lists of floats
P specified as single or multiple lists of floats

(as long as multiple lists have same number of triplets as the
number of points).

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Thu 12 May 2016 04:49:21 PM UTC, comment #2:

While this solution would work in case of a single n and P, it would still not work if multiple n's or P's are specified, which the docstring claims it can handle.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Fri 15 Apr 2016 09:14:49 AM UTC, comment #1:

It could be solved by changing this line in coords.projectOnPlane

return self - x*n

to

return self - (xn).reshape(self.shape)

Nic Debusschere <ndbussch>
Project Member
Fri 15 Apr 2016 09:09:13 AM UTC, original submission:

Formex('1234').projectOnPlane(n=[0,0,1])
File "/home/nic/pyformex/pyformex/geometry.py", line 180, in newf
return self._set_coords(coords_func(self.coords,args,*kargs))
File "/home/nic/pyformex/pyformex/coords.py", line 1581, in projectOnPlane
return self - x*n
ValueError: operands could not be broadcast together with shapes (4,2,3) (8,3)

Nic Debusschere <ndbussch>
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 ndbussch (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 23 May 2016 07:16:40 AM UTCbverhegStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 12 May 2016 07:18:55 PM UTCbverhegStatusConfirmed=>Ready For Test
      Assigned toNone=>bverheg
    Thu 12 May 2016 04:49:21 PM UTCbverhegCategoryNone=>Core
      Item GroupNone=>Functionality error
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1