Miscellany package Question

Hi all,

I was trying this package out and following the scripts on Twitter here:

It was leaving spaces between my boxes like this, so anyone have a clue about how to fix this? I am trying to sort the solids by volume but it’s not helping :frowning:


Dont know the package, but could you show us the defination and what you had tried so far

Hi @garbo.zhu,

I’m the author of the Miscellany package (although not of the underlying EB-AFIT algorithm itself, I can’t claim credit for that!). If you post your definition as @sovitek suggests then we will be able to help more. However some initial thoughts:

  1. If you are supplying a list of items for a single container, then the order is not important because EB-AFIT determines the order. If you are looking for an algorithm that packs in order then this isn’t the most appropriate. You would be looking for a Next-Fit online or First-Fit offline algorithm. I would like to implement some of these in Miscellany but I haven’t done so yet apart from some very specific book-placing methods not in the released package (but in the develop branch on GitHub).

  2. I need to update the package to correct some orientation issues. The original algorithm used Y as the up axis, whereas Dynamo uses Z. It’s a matter of swapping over some of the outputs.I haven’t updated the package for a few years but I am giving a presentation that makes use of it in June at BILT Virtual so there is the incentive for me to finally sort this out.

  3. There is also an small bug in EB-AFIT that has only recently been fixed and I need to pull that through into the Miscellany implementation, I haven’t yet tested and assessed it yet.



Hey @Thomas_Corrie!

That’s exciting! I am looking forward to all the updates and the conference.

As for the script, I followed the twitter screenshot, please let me know if there’s anything I can change!

@sovitek here it is! thanks!

1 Like

Can you upload the actual definition (the one on twitter was created by John, not me, so I don’t have it hand)? And ideally the underlying geometry you are using it on? At the moment it’s a bit abstract to run a test on

Thats geat but @garbo.zhu cant see whats going on in that image…post the dyn file and zoom in the image

@sovitek @Thomas_Corrie Here you go guys!! Thanks for helping!!
The test file is what I am trying to run the script on, just a bunch of walls. We are trying to see how many panels can fit into a van.
Van Packing.dyn (65.9 KB)
test file.rvt (3.2 MB)

1 Like

I get reasonable results with a run using your definition (the only change I made was to replace the Lunchbox node near the start with OOTB ones but that doesn’t affect the result). There were 26 items that were too large for the containers

The EB-AFIT algorithm works in a layer method and doesn’t necessarily eliminate gaps if it cannot fill the rest of a layer with a remaining item. If you look in section, you can see some seemingly anomalous gaps caused by very thin items (arrow in red) that push up the top of the layer.

The examples given in the paper describing the algorithm are for more “boxy” items and in my experience they tend to work better than longer or very thin items.


In the unreleased update of Miscellany I added the ability to restrict the rotation of items to avoid, say, thin vertical elements disrupting the pack like these. I will incorporate the recent fixes in the underlying algorithm implementation and update Miscellany but I’m not sure that will necessarily change much in terms of what you are trying to achieve.

1 Like

Nice one, good to know for next time you go shopping in Ikea :wink:


Hey @Thomas_Corrie,

I will replace the Lunchbox Script at the front and give this a try!
The solution, for now, will probably be for me to move those items manually in Revit.
Excited to see the new update of the Miscellany!!


1 Like