demossoft Posted October 15, 2016 Share Posted October 15, 2016 3d bin packing w/ excel input. Hi guys, I just signed up, need to do the below - having trouble. Any help ??? Excel data with Package/Goods name and dimension will be uploaded to System and based upon the given input, system needs to arrange the goods in best possible way in a given Container/Truck. Container/Truck dimension will be predefined in Master data. System should generate a 3D output to see where goods are place and it should be interactive in sense that user can view this from different angle. So far all I have is a blank plane, can't seem to upload my truck.obj model to babylonjs playground. Then where to go from there ??? Help, tnx. Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 15, 2016 Share Posted October 15, 2016 Hi and welcome to the forum. You have obviously created a playground. Even if it appears blank please place a link to it and then the helpful people in the forum can have a look to see what is happening or rather what is not happening. Quote Link to comment Share on other sites More sharing options...
demossoft Posted October 16, 2016 Author Share Posted October 16, 2016 Gotcha http://babylonjs-playground.com/#3FV2X#0 Tnx Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 16, 2016 Share Posted October 16, 2016 Wow, we're already up to #7? http://babylonjs-playground.com/#3FV2X#7 I just added a .obj loader... a pizza box. Should be viewable. (Had SOME problems with it... in my Firefox, though. Inconsistent loading) Anyway, demonsoft... publish your truck.obj in a CORs-clear place (perhaps free github acct), put its URL into this playground, and hit RUN (and maybe SAVE)... see if you can get your .obj to load. What the heck. How to perfectly pack a semi truck, given X packages of X sizes? I'm not going anywhere NEAR the algorithm needed for that. That seems... um... complicated. Welcome to the forum, @demossoft, good to have you with us. demossoft 1 Quote Link to comment Share on other sites More sharing options...
demossoft Posted October 16, 2016 Author Share Posted October 16, 2016 there r lots of existing algorithms online for it like first fit, binary tree etc. Any one is ok for me, i even found one in javascript - just want to learn how to implement it here. Tnx for the comment. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 16, 2016 Share Posted October 16, 2016 Thx. If I were you, I would start with a playground search for 'boundingInfo'. http://doc.babylonjs.com/playground?q=boundingInfo&page=4&max=25&bf=all 86 results, and I went touring them a bit, and there were lots of bounding box operations in those playgrounds. For example... http://www.babylonjs-playground.com/#1HTCCO#21 line 116 - var dimensions = boundingInfo.maximum.subtract(boundingInfo.minimum); Yum! Similar demented behavior seen here... http://www.babylonjs-playground.com/#RXUCB#37 It seems that... var stuff = somemesh.getBoundingInfo() is the start of the fun. The object returned is likely a boundingInfo object with some good stuff on it.... especially a .maximum and a .minimum... which... with some subtraction, can get the bounding box dimensions. That will get you started, right? Hope so. Keep us posted. Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted October 17, 2016 Share Posted October 17, 2016 I work in placing containers in real space. Its very possible to do what you are looking to do. What is required is translation form the 3D world into actual 2D real world coordinates. You have to start by knowing all the real sizes and setting your scene to be of proper size. Its just a bunch of 2D translation math from there. I am a big fan of using particles when you have a lot of like items. Makes handling them easier. You can scale them to the proper size as needed. Also you can use a single texture with several logos in it A B C D etc. and remap them by offsetting the texture as needed. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.