Hi,
I'm trying to create a T-shape (to ultimately put into a recursive extrude floor function). I'm trying to make the setback adjust according to the respective split part. Does anyone have any suggestions? Apologies I don't have a lot of cga coding experience. Thanks!
version "2023.1"
######################################################
#ATTRIBUTES
######################################################
//Initial shape with attributes for width or setback
attr frontSetback = 3
attr rearSetback = 3
attr sideSetback1 = 3
attr sideSetback2 = 6
attr LotArea = 0 # used to calc FSR
attr width = 0
######################################################
#FUNCTIONS#
######################################################
######################################################
#RULES
######################################################
LotInner -->
Lot
Lot -->
shapeO(frontSetback,sideSetback1,rearSetback,sideSetback1) { shape: Border | remainder: Footprint }
split(z){ ~23 : Part("Front") | ~40 : Part("Rear")}
Part(name) -->
case name == "Front" : setDimensions(3)
case name == "Rear" : setDimensions(6)
else: Nil
setDimensions(newWidth) -->
s(newWidth,'1,'1)
color("#FF0000")
X