Select to view content in your preferred language

# Applying a split across a building regardless of previous splits

2831
3
10-16-2014 08:47 AM
by
Regular Contributor

I created a building using vertical splits because some elements (the entrance part) didn't line up with the rest and to keep the number of splits to a minimum. However, now I'd like to split the building horizontally to color its floors separately. Is that possible while retaining the current structure?

Here's a photoshop mockup of what I'm trying to do:

Tags (2)
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Here's one way to do it:

version "2014.1"

attr floorCount = 4

attr floorHeight = 4

Shape -->

extrude(floorCount * floorHeight)

SplitIntoFloors

SplitIntoFloors -->

split(y) {floorHeight: Floor}*

Floor -->

case floorIndex == 0: color(1,0,0) FacadeVerticalSplits(true)

split(x) {

'0.4: VerticalSplittingLeft |

'0.2: EntranceOrWindows(isGroundFloor) |

'0.4: VerticalSplittingRight

}

EntranceOrWindows(isGroundFloor) -->

case isGroundFloor: Entrance

else: EntranceWindows

Entrance --> YourOldCodeHereForGroundFloor.

EntranceWindows --> YourOldCodeHereForWindowsAboveEntrance.

VerticalSplittingLeft  --> YourOldCodeHereForLeftSide.

VerticalSplittingRight --> YourOldCodeHereForRightSide.

3 Replies
by Anonymous User
Not applicable

Here's one way to do it:

version "2014.1"

attr floorCount = 4

attr floorHeight = 4

Shape -->

extrude(floorCount * floorHeight)

SplitIntoFloors

SplitIntoFloors -->

split(y) {floorHeight: Floor}*

Floor -->

case floorIndex == 0: color(1,0,0) FacadeVerticalSplits(true)

split(x) {

'0.4: VerticalSplittingLeft |

'0.2: EntranceOrWindows(isGroundFloor) |

'0.4: VerticalSplittingRight

}

EntranceOrWindows(isGroundFloor) -->

case isGroundFloor: Entrance

else: EntranceWindows

Entrance --> YourOldCodeHereForGroundFloor.

EntranceWindows --> YourOldCodeHereForWindowsAboveEntrance.

VerticalSplittingLeft  --> YourOldCodeHereForLeftSide.

VerticalSplittingRight --> YourOldCodeHereForRightSide.

by Anonymous User
Not applicable

But if you do it that way, you must be OK with the vertical section over the entrance being slightly different as in below image:

by
Regular Contributor

Hmm that's what I wanted to avoid.. but I guess it's probably better to just rewrite the script and do the coloring like in your example. Thanks!