Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Here is a proposed patch :
add a new js.poly2tri.fatal() function, used by js.poly2tri for all fatal
messages. By default, for backward compatibility, this function still uses
window.alert(), but it can be easily replaced by a custom handler e.g. to throw
an exception
js.poly2tri.fatal = function(message) {
throw new Error(message);
};
patch here:
https://code.google.com/r/remiturboult-poly2tri-js/source/detail?r=06e1da5929dea
dadf4c71803558afa8a867d49aa
(it's a clone)
Original comment by remi.tur...@gmail.com
on 14 Mar 2013 at 9:06
patched!
btw there is an issue with the recursive
js.poly2tri.SweepContext.prototype.MeshClean
This has been fixed in some implementations of Poly2Tri. The issue is that the
recursive depth can cause stack overflow.
Maybe you can implement suggested solutions in the javascript version?
You can see https://code.google.com/p/poly2tri/issues/detail?id=65
or look at the current java implementation.
Original comment by thahlen@gmail.com
on 14 Mar 2013 at 9:34
I will look at it
(but I have no problem triangulating 10000 points in JavaScript).
Before, I will add some automated unit tests to this JavaScript version.
Original comment by remi.tur...@gmail.com
on 17 Mar 2013 at 7:21
here is a fix for the recursive MeshClean (also issue 57 and issue 65 in C++
version)
https://code.google.com/r/remiturboult-poly2tri-js-2/source/detail?r=1ca24c7253f
106aceda119cda3e5cb23f8f4116e
You can pull it directly
(or give me permission to do it).
Original comment by remi.tur...@gmail.com
on 21 Mar 2013 at 10:35
Have given you access to commit. Let me know if there is any problems.
Original comment by thahlen@gmail.com
on 21 Mar 2013 at 10:50
Original comment by thahlen@gmail.com
on 21 Mar 2013 at 4:50
I cleaned up the error handling in the latests commits, and used standard
exceptions for errors.
Original comment by remi.tur...@gmail.com
on 21 Mar 2013 at 6:05
Original issue reported on code.google.com by
remi.tur...@gmail.com
on 14 Mar 2013 at 9:00