bugpyFormex - Bugs: bug #43241, The new approximate fails with...

 
 

bug #43241: The new approximate fails with chordal on polylines

Submitted by:  francesco <francio>
Submitted on:  Wed 17 Sep 2014 09:37:19 AM UTC  
 
Category: PluginsSeverity: 3 - Normal
Item Group: Functionality errorStatus: Fixed
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.

 

Thu 18 Sep 2014 06:15:47 PM UTC, comment #5:

I believe the original problem is fixed in 4214264.

Coarsening a PolyLine is fixed in e0f5f5b.

Benedict Verhegghe <bverheg>
Project Administrator
Wed 17 Sep 2014 11:17:08 AM UTC, comment #4:

Actually what I was looking for is an optimized resample of the curve. any way we can include that or do you know any algorythm that can do it?
for example if 2 or more parts are almost straight i would like to resample the bezier with lesser points in that region? how could that be done?

francesco <francio>
Project Member
Wed 17 Sep 2014 10:58:19 AM UTC, comment #3:

ok so we must overwrite it and chekc what needs to be done for nurbs.
the example raises this error
'NurbsCurve' object has no attribute 'approximate'.

simplifyPoints coarsen the number of coords using similar approach as the chordal distance. it is indeed a very nice algorythm, but it is iterative. I pick this name becuase this kind of algorythms are called line simplification algorithms and the name is kind of clear to the user. In future i ll try to implement more of this algorythms, and the symplifyPoints will have a method parameter to select them

francesco <francio>
Project Member
Wed 17 Sep 2014 10:42:17 AM UTC, comment #2:

Curve.approximate should not be used on a PolyLine: approximate() tries to create a good PolyLine approximation of a curve and a PolyLine is always exact.
We should override the method in the PolyLine class, or just return the original (in case of the cordal method, the nseg method can be useful on PolyLine).

Another thing is if you want to coarsen a PolyLine: isn't that what the simplifyPoints does?

Benedict Verhegghe <bverheg>
Project Administrator
Wed 17 Sep 2014 10:20:15 AM UTC, comment #1:

I dont really get this chordal method, it allows only refinement of the single parts, not in a global sense, so actually it always give #of new coords >= ncoords?

francesco <francio>
Project Member
Wed 17 Sep 2014 09:37:19 AM UTC, original submission:

the atChordal uses self.degree which is not an attribute
of polylines. so or we add a degree attribute for comptibility
or we make a check on the attribute

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 18 Sep 2014 06:15:47 PM UTCbverhegCategoryNone=>Plugins
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1