For a simple solution, try this:
Take your base shape (always "the current single layer that this level of the mam is building").
||Pin it, and stack the pinned one on the original. All crystal shapes will break, leaving gaps with pins underneath. All empty segments won't have gotten pins, so there is now a gap with no pin underneath for each of those.||
||Stack a layer of pins on top: Anything solid will hold up the pins. Anything that WAS crystal will have a pin fall one level down. Anything that was empty will have a pin fall three levels down, all the way to the floor where we will never look at it again.||
||Remove the top layer of the shape (any pins that were held up by solid objects).|| Look at the remaining top layer, it is your original shape with pins where the crystals were.
Was your layer all crystal? Then you have ||pins on pins|| and the result of ||removing the top layer|| is "all pins". Did your layer have pins but not crystals? They didn't go anywhere. Was it all solid? You ||dropped pins on it then took them off, leaving|| the original.