You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nkint I've taken your gist and put it in a codesandbox here. Also fixed it and added some comments. The main issue is a division-by-zero case when all input points are planar (i.e. at least one dimension of the source bounding box size is zero). I've added a safeDiv() helper fn, which should be added to thi.ng/math and the same fix should also be applied to the existing 2d version... The other comment left in the code is about your result assumption and hope it makes sense...
Hi!
This is a kind of feature request, I'd like to have
fitIntoBounds3
as we havefitIntoBounds2
for 2dIShape
but for 3dVec[]
.I've tried to implement it by myself and it seems to work well with some 3d random mesh (an icosahedron) but not working for some dumb test points.
Here is the gist. Any help/hint is really appreciated.
The text was updated successfully, but these errors were encountered: