bugpyFormex - Bugs: bug #37476, curve.approximate does not result...

 
 

bug #37476: curve.approximate does not result in equidistant points

Submitted by:  Sofie Van Cauter <svcauter>
Submitted on:  Mon 01 Oct 2012 10:20:35 AM UTC  
 
Category: PluginsSeverity: 3 - Normal
Item Group: Functionality errorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 19 Oct 2012 08:46:38 AM UTC, comment #2:

Fixed in revision 2499.

Sofie Van Cauter <svcauter>
Project Member
Wed 17 Oct 2012 07:18:30 AM UTC, comment #1:

Go ahead!

Benedict Verhegghe <bverheg>
Project Administrator
Mon 01 Oct 2012 10:20:35 AM UTC, original submission:

In the current implementation, the points are not spaced almost equidistantly over the curve if equidistant==True. Only the parameter values are used and not the relative lengths. I suggest to change this to the following code:

if equidistant:
S = self.approximate(npre,equidistant=False)
at = S.atLength(nseg)
else:
S = self
at = arange(nseg+1) * float(S.nparts) / nseg
if self.closed:
at = at[:-1]
X = S.pointsAt(at)
PL = PolyLine(X,closed=S.closed)
return PL.setProp(self.prop)

Sofie Van Cauter <svcauter>
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 svcauter (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):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 19 Oct 2012 08:46:38 AM UTCsvcauterOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1