When I iterate over the path iterator, I find many DUPLICATE CONSECUTIVE POINTS.
Is there some way to get a PathIterator from an Area that will not have duplicate consecutive points?
One question is whether or not you have discovered any practical problems from these extra points or is it just that they seem superflous?
These are most likely due to the fact that Area has no "setting" for degree of error so it is probably a bit too exacting on what it considers to be "identical geometry". Are the points exact duplicates or are they off by the last couple of decimal places?
The problem is that when you perform intersection calculations you never really end up with the exact coordinate of the intersection because floating point doesn't have infinite precision. When those numbers then come back to try to interact with each other in later parts of the calculation the algorithms end up concluding that they are different coordinates and so what was intersected and sliced cannot be reconnected in all cases.
If we added some kind of "precision limit" then we could decide that all coordinates within a certain distance from each other were the same and then set both to, say, the average of the two.
This lack of a settable limit on its precision not only leads to lots of "geometry dirt" in its output, but also can lead to it taking quadratically longer to work on a path as you perform more operations.
You might look at:
4818309 - Area on Area ops insert unwanted vertices 4798837 - Area subtrac method duplicates points
They show that the coordinates really are different if that is the same problem you are seeing. These should probably be turned into an RFE to add the precision limit since their answer isn't really "wrong" in the absolute sense of the word, just sub-optimal for programmers...
...jim
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".