Code Snippet #1

At the heart of the geometric function of Autoarchitect is the Room class and the Pull function. While this is still "at flux", the Pull Loop works as intended. It looks for Rooms that are marked as "Adjacent", based on a previous setting where it pairs rooms according to an adjacency rule. In this file, there are three Rooms, all are adjacent to each other. Throw them randomly in the Rhino space, and the code arranges them neatly next each other.

You will find that Room 2 and Room 3 intersect sometimes. This is intended to be fixed by a later Push Loop, which I have not implemented yet. I figured I might want to register the code here for prosperity.

The code can be found here.

You can download the Grasshopper file where this is implemented here.