bugpyFormex - Bugs: bug #38113, correction for...

 
 

bug #38113: correction for coords.projectOnPlane

Submitted by:  None
Submitted on:  Fri 18 Jan 2013 08:58:02 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.

 

Sat 19 Jan 2013 11:45:50 AM UTC, comment #1:

You are correct. This has been fixed in commit 4ee899.
Actually, I used x.reshape(1,-1) to avoid the .T

x = dotpr(n,(x-P)).reshape(-1,1)
return self - x*n

I guess that the error was undetected for so long because the function was mostly used with a single plane. And the only cases of projections on multiple planes that I could find used parallel planes with a single normal, in which case the function worked well.

I'm closing the bug, but if anyone finds misbehavior because of the change, please reopen.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Fri 18 Jan 2013 08:58:02 AM UTC, original submission:

I think projectOnPLane in coords.py should be modified:

(1402) - return self + outer(x,n).reshape(self.shape)
(1402) + return self+(n.T*x).T

When,
shape(a)=(i,j)
shape(b)=(k,l)
then,
shape(outer(a,b))=(ij,kl)
Here,
shape(x)= (1) or (k)
shape(n)= (1,3) or (k,3)
Thus,
shape(outer(x,n))= (1,3), (k,3), (1,3k) or (k,3k)
where (1,3k) and (k,3k) are not reshapeable to self.shape(=(3) or (k,3))
I think (n.T*x).T should do fine instead, but it should be checked as I assume that projectOnPLane has been used in multiple script already.

Anonymous

 

(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)
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 19 Jan 2013 11:45:50 AM UTCbverhegCategoryNone=>Core
      StatusNone=>Fixed
      Assigned toNone=>bverheg
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1