×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Need help writing script

Need help writing script

Need help writing script

(OP)
I need some help getting started. In simple terms, I want a script that will tell me how many jelly beans I can fit into different standard size jars.

Here is Jelly Bean-A. How many can I fit into Jar-A or how many can I fit info Jar-B, etc.  

RE: Need help writing script

Hi,

Probably you will need to work with Measure Inertia workbench in order to measure the volumes of the Jar and Jelly Bean and then you can simply divide the values.

Regards
Fernando

RE: Need help writing script

You will also have to apply some packing density fudge factor to get a reasnoble estimate (i.e. jelly beans are not going to tesserlate exactly into the jar)

RE: Need help writing script

(OP)
Thanks for the tips. Maybe jelly beans in a jar was not a good example. Say it was a all the same size shoe boxes going into a bigger box.  

RE: Need help writing script

Approximation based on a bit of empirical studies is probably your best bet unless you want the complexity-level to increase drastically.
If you are really looking to find the optimal packing for a set of objects with an arbitrary shape (jelly bean) withing a given volume you should look into Space Packing algorithms. But for large sets this can take a long time so is better done in more optimized code, not script.
Daniel Bosia at Arup AGU has done some interesting work in this field -> Watercube Stadium in Beijing amongst others

/Thomas

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources