thebitpusher / boxologic

3D Bin Packing: A set of C programs that calculate the best fit for boxes on a pallet, and visualize the result.
44 stars 14 forks source link

Render box packing results in HTML canvas #9

Closed paultarr closed 8 years ago

paultarr commented 8 years ago

As there are issues with the binaries on the prevous repo I've thrown together a quick HTML5 canvas renderer for the visudat output file (just open this in your browser after the boxologic command has generated a visudat file). Thought this may of help to some users to visualise how the box is actually being packed if they do not have access to a compatible OS.

wknechtel commented 8 years ago

Hello paultarr,

It's a great idea to use the browser for visualization! It's something I hadn't considered before and definitely think it's work pursuing. That said, I can't integrate your pull request for a couple of reasons:

  1. The HTML file only rendered in FireFox. I tried in Safari, Chrome, and FireFox, and FireFox was the only one that rendered anything at all.
  2. From what I could see, the view was top-down. The original visualizer uses a roughly isometric 3D view. Since the algorithm likes to try and put objects in layers where possible, a wireframe 3D view is best suited to this sort of visualization. Here's a sample of the original output:

screen shot 2016-05-06 at 4 29 15 pm

Now that I think about it, three.js might be an ideal framework to build a new visualizer in, as opposed to an OpenGL/WebGL/Native client visualizer. Thanks for the fantastic idea!

Kindest Regards, Bill