phetsims / kite

A library for creating, manipulating and displaying 2D shapes in JavaScript.
MIT License
13 stars 6 forks source link

Shape.union takes a really long time and sometimes says "Error: TODO: Need to implement more advanced disambiguation" #98

Open samreid opened 2 years ago

samreid commented 2 years ago

@marlitas and I were able to reproduce the bug reported in https://github.com/phetsims/mean-share-and-balance/issues/87 in both Mac/Safari and Mac/Chrome. We isolated the problem to Shape.union which is being called in BeakerNode.

Perhaps the shapes being passed to Shape.union are triggering a difficult situation or corner case that kite is struggling with.

@marlitas and I will look for another way to render BeakerNode for the moment, but wanted to raise this issue for @jonathanolson to investigate. May be best to collaborate with @marlitas to discuss how to trigger the error case.

@marlitas wonders if this is related to: https://github.com/phetsims/kite/issues/97

zepumph commented 1 year ago

https://github.com/phetsims/kite/commit/eff96db2248ba0d720a6039d3a712e5eeb9af7b6 will unblock MSS so that things can be graceful in production, @jonathanolson would like to fix this at some point though!