Flex walls to accommodate fixed size panels

I have inherited a project in which wall layouts need to be altered / manipulated to accommodate panels of a set size. The original design used 1000mm wide panels but this has had to be changed to 1200mm and so someone suggested using GD to ‘flex’ the walls within boundaries to try and find a solution(s).

Initially I grabbed the location lines of all the walls, sorting them by type, found the intersections between the interior and exterior wall (lines) and then reconstructed them from points while binding the ends of the internal walls that intersect with the exterior ones using sliders. This worked well and I was able to run some actual GD studies but, I realised that my calculations based on splitting each wall by the panel size would be wrong as I wasn’t taking the actual wall width into account while at the same time beginning to feel that this approach may be difficult / impossible to scale up to be used across all walls … :unamused:

Here’s that graph -

So I went back to the Revit project and unjoined all the walls so that the location lines would actually represent the lengths of the walls thinking that I could probably find wall intersections some other way. This proved correct where the interior walls touched one of the four exterior walls but when trying to find a way to discover which (interior) walls were connected to each other everything started to get a complicated very quickly - not to mention some issues I came up against with geometry and bounding box intersections that I think may be down to rounding errors. Anyway, I have now been banging my head against these walls (sorry :grin:) for a couple of weeks and have been getting nowhere fast.

I’ve also created a version of the project that uses curtain walls for all the walls but tbh that doesn’t really seem to help. The architect doesn’t use Revit and provided plans and elevations so the (very basic) revit project was created by us simply as a way of getting the layout into dynamo.

Does this sound like a problem anyone else has come up against? Am I approaching this problem in the wrong way? Any suggestions or tips would be amazing.

Here’s the actual graph and revit file …

Joined_Walls_05.dyn (937.2 KB)
WallCleanUp_anon__06_01_21.rvt (2.1 MB)

Thanks