bugpyFormex - Bugs: bug #43339, Geometry._set_coords_inplace...

 
 

bug #43339: Geometry._set_coords_inplace raises error with somme coords methods

Submitter:  francesco <francio>
Submitted:  Wed 01 Oct 2014 09:18:19 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
   

Wed 01 Oct 2014 03:35:28 PM UTC, comment #2: 

This is fixed in 947d8e3.

Benedict Verhegghe <bverheg>
Group administrator
Wed 01 Oct 2014 03:08:45 PM UTC, comment #1: 

The error occurs in then spherical() transformation, which however works fine in a Formex and Mesh. An obvious workaround thus goes over a transformation to Formex (and back if needed).


l=l.trl(2,rh).toFormex().spherical().toCurve()


Formex and Mesh have their own implementation of set_coords, forcing the argument to be Coords, while Curve and its subclasses like PolyLine, inherit it from Geometry. We should fix it there.

I decreased the severity because there is a workaround (now).

Benedict Verhegghe <bverheg>
Group administrator
Wed 01 Oct 2014 09:18:19 AM UTC, original submission:  

some coords methods return a numpy array instead of Coords and the check of the Coords type in _set_coords_inplace fails.

I am not sure at which level should be fixed or the best (read Benedict ) way to do it
try.

from pyformex.plugins.curve import *
l=PolyLine([origin(),[-30,0,0]]).approx(nseg=100)
rh=10
l=l.trl(2,rh).spherical()


fails with error

 File "/home/Francesco/pyformex/pyformex/geometry.py", line 155, in newf
    return self._set_coords(coords_func(self.coords,*args,**kargs))
  File "/home/Francesco/pyformex/pyformex/geometry.py", line 179, in _set_coords_copy
    return self.copy()._set_coords_inplace(coords)
  File "/home/Francesco/pyformex/pyformex/geometry.py", line 172, in _set_coords_inplace
    raise ValueError("Invalid reinitialization of Geometry coords")
ValueError: Invalid reinitialization of Geometry coords

francesco <francio>
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 francio (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-01 bverheg StatusNone Fixed
        Open/ClosedOpen Closed
    2014-10-01 bverheg Severity4 - Important 3 - Normal

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code