Week 3 - Floorplan Manipulation

This week I have been focused on the floorplan manipulation and cleaning up the code to start generating the floorplans, I wanted to have the floorplan generation done this week but the tasks that needed to be done first ended up taking the entire time.

Code Refactoring

Before this week I had been storing just a single spline and a couple of variables because there were some questions still being answered. In order to move forward I had to spend a couple of hours refactoring the code so I can store the data in a better way and adjust the methods to work for any level spline. I added a levelData struct to store the variables that would be different for every level and stored a levels array in the building class. I also moved the code in the construction method into smaller methods.

Dynamic Corners

I added room for a corner mesh since wall segments are usually modeled with corner meshes to close wall gap. Also added some math to adjust the floorplan when the corner length changed.

Segment Size Snapping

I added snapping for manipulating the spline points based on the current segment length.

Dynamic Segment Length

I added floorplan adjustments for when the segment length changes, I used scaling with some additional math to keep the corner length unchanged.

Next Week

I will work on generating footprints using subtractive shape generation and adding multiple floors.