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

Submitter:  Nic Debusschere <ndbussch>
Submitted:  Fri 15 Apr 2016 09:09:13 AM UTC
   
 
Category:  Core 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
   

Mon 23 May 2016 07:16:40 AM UTC, comment #4: 

Closing the bug, as it seems fixed.

Benedict Verhegghe <bverheg>
Group administrator
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>
Group administrator
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>
Group administrator
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 - (x*n).reshape(*self.shape)

Nic Debusschere <ndbussch>
Group 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>
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 ndbussch (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
    2016-05-23 bverheg StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-05-12 bverheg StatusConfirmed Ready For Test
        Assigned toNone bverheg
    2016-05-12 bverheg CategoryNone Core
        Item GroupNone Functionality error
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code