deltaluca / nape

Haxe/AS3 Physics Engine
http://napephys.com
Other
542 stars 77 forks source link

simple_decomposition internal error #16

Closed profelis closed 12 years ago

profelis commented 12 years ago

Pure as3 project

var geomPoly:GeomPoly = new GeomPoly(newVertices); if (!geomPoly.isSimple()) simpleGeomPolyList = geomPoly.simple_decomposition();

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at zpp_nape.util::ZPP_Set_ZPP_SimpleVert/remove_node()
at zpp_nape.geom::ZPP_Simple$/clip_polygon()
at zpp_nape.geom::ZPP_Simple$/decompose()
at nape.geom::GeomPoly/simple_decomposition()
deltaluca commented 12 years ago

Unfortunately, the simple decomposition is not guaranteed to be 100% robust (monotone and convex should be 100% robust).

However, if you can get me a dump of the input polygon so that I can reproduce the error, then perhaps I can find what degeneracy it triggers and handle it and so improve the algorithm.

profelis commented 12 years ago

unfortunately, I cant add dump. But I know what vertices array has the duplicate vertices. With out duplicates no error

deltaluca commented 12 years ago

sequential duplicates are handled. If you mean duplicates which are not sequential then that is most likely an unhandled case (There are 'a lot' of cases :P)