evil-mad / EggBot

Software for The Original EggBot
GNU General Public License v3.0
287 stars 140 forks source link

eggbot_stretch works well for spheres, but... #37

Open ShelMi opened 8 years ago

ShelMi commented 8 years ago

This is not, by a long shot, a big deal - but I think the stretch algorithm could have just a little bit of refinement added to it. The current version, nice as it is, nonetheless maps the stretch function as though the print were on a sphere.

I wonder if the data/methods presented at http://www.takayaiwamoto.com/Egg_Draw/Real_Chicken_Egg.html might be used to do a more accurate mapping of SVG coordinates to the egg ovoid. A rough test, based on the below image, shows that the differential error between a sphere and the large end of an egg may be as much as 33%.

I say this in the full realization that +/- nobody will really notice the difference, but I still would be happy to take a shot at it. If further data presents itself, one might even consider having separate settings for ostrich, duck, chicken.

stretch for ovoid 01

oskay commented 8 years ago

It does indeed model a sphere. However, often times, that's exactly what people are printing on. Also, we have learned over the past couple of years that there is tremendous variation, even in just chicken eggs. :)

If we add support for proper egg shapes, then...

None of these is to say that it shouldn't be pursued, just some food for thought.

ShelMi commented 8 years ago

Points taken.

I have a substitute suggestion which I have been using for a few days, and I like having the additional flexibility that comes with the options in this substitute "advanced stretch".

I still am thinking about a user-friendly method for un-egg-shaping the plot, but that will have to wait for a future day. 8^)

proposed advanced stretch

eggbot_advanced_stretch 01.zip

ShelMi commented 8 years ago

I needed greater-than-integer percent precision when I was doing a stretch, so have a new version with no other changes than allowing up to 4 digits past the decimal point in the expand percent field.

eggbot_advanced_stretch 02.zip

[EDIT] Just realized that 4 digits was overkill - changed from 4 digits to 2 digits precision in version 03.

eggbot_advanced_stretch 03.zip

oskay commented 8 years ago

I would suggest splitting your GUI into at least two tabs, to make the interface more compact. Perhaps a "description" and "help" tab in addition to the main "stretch" tab.