Select to view content in your preferred language

Built form - four towers on a podium

1261
2
Jump to solution
10-09-2016 02:48 PM
CoMAGOL_ADMINISTRATOR
Regular Contributor

We're writing a write a built form rule that consists of a podium and four towers. Each tower is to have their own configurable setbacks.

We've tried placing a splitArea command with a splitArea command, but this simply creates 

splitArea(z) { ~1 : splitArea(x) { '0.5: TowerLots}*
| ~1 : splitArea(x) {'1 : TowerLots}*
}

split.index 0 is tower 1

split.index 1 is tower 1

split.index 2 is tower 2

split.index 3 is tower 2

Multi-tower podium

Wondering if anyone has any ideas on how best to split the podium into four so we can assign a tower to each of the split indexes?

i.e.

split.index 0 is tower 1

split.index 1 is tower 2

split.index 2 is tower 3

split.index 3 is tower 4

Thanks.

0 Kudos
1 Solution

Accepted Solutions
LR
by
Frequent Contributor

The split.index is overwritten on a new split. You're splitting once, creating two polygons (index 0 and 1), and then you're splitting those too, creating index 0 and 1 or each. AFAIK you'd have to store the index info somewhere, like this:

attr CumulativeSplitIndex = ""

@StartRule 
 Lot --> 
 splitArea(z){ '0.5: TowerLots1}* 
 
TowerLots1 -->
 set(CumulativeSplitIndex, "z"+split.index)
 splitArea(x){ '0.5: TowerLots2}* 
 
TowerLots2 -->
 set(CumulativeSplitIndex, CumulativeSplitIndex+"x"+split.index)
 print (CumulativeSplitIndex)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This should give you addressable lots for a conditional rule. Alternatively, you could of course do it all manually, like this:

attr SetBack_1 = 0
attr SetBack_2 = 0
attr SetBack_3 = 0
attr SetBack_4 = 0

@StartRule 
 Lot --> 
 splitArea(z) {
 '0.5: Split_Z_1 | '0.5: Split_Z_2
 }
 
Split_Z_1 -->
 splitArea(x) {
 '0.5: Split_X_1_1 | '0.5: Split_X_1_2
 }
 
 
Split_Z_2 -->
 splitArea(x) {
 '0.5: Split_X_2_1 | '0.5: Split_X_2_2
 }
 
Split_X_1_1 -->
 setback(SetBack_1){all: X | remainder: Tower}
# repeat for rest 
 
Tower --> extrude (10)

View solution in original post

2 Replies
LR
by
Frequent Contributor

The split.index is overwritten on a new split. You're splitting once, creating two polygons (index 0 and 1), and then you're splitting those too, creating index 0 and 1 or each. AFAIK you'd have to store the index info somewhere, like this:

attr CumulativeSplitIndex = ""

@StartRule 
 Lot --> 
 splitArea(z){ '0.5: TowerLots1}* 
 
TowerLots1 -->
 set(CumulativeSplitIndex, "z"+split.index)
 splitArea(x){ '0.5: TowerLots2}* 
 
TowerLots2 -->
 set(CumulativeSplitIndex, CumulativeSplitIndex+"x"+split.index)
 print (CumulativeSplitIndex)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This should give you addressable lots for a conditional rule. Alternatively, you could of course do it all manually, like this:

attr SetBack_1 = 0
attr SetBack_2 = 0
attr SetBack_3 = 0
attr SetBack_4 = 0

@StartRule 
 Lot --> 
 splitArea(z) {
 '0.5: Split_Z_1 | '0.5: Split_Z_2
 }
 
Split_Z_1 -->
 splitArea(x) {
 '0.5: Split_X_1_1 | '0.5: Split_X_1_2
 }
 
 
Split_Z_2 -->
 splitArea(x) {
 '0.5: Split_X_2_1 | '0.5: Split_X_2_2
 }
 
Split_X_1_1 -->
 setback(SetBack_1){all: X | remainder: Tower}
# repeat for rest 
 
Tower --> extrude (10)
CoMAGOL_ADMINISTRATOR
Regular Contributor

Thanks very much LR that's done the trick!

0 Kudos