attr steps = "#FFFFFF" //have shown this as colour but actually want to have steps as a //recursion extruding away from the BaseSide if possible. BaseVolume --> comp(f) {side : BaseSide(comp.index) | bottom : NIL | top : extrude(height - Roof_Height) Mass } BaseSide (myIndex) --> case myIndex == 3 && scope.sx >= 1.5: split(x) {~1: color(grey) | 1.5 : color(steps) | ~1 color(grey)} else : color(grey)
@Group ("Building Main") attr buildingHeight = 5 @Group ("Building Main") @Range(1, 20) attr wallID = 3 @Group ("Building Main") attr baseHeight = 0.8 Lot --> extrude(world.y, buildingHeight) comp(f) { side = Facades | top : Roof.} # note the # which puts all sides in 1 shape ! Facades --> comp(f) {wallID : DoorFacade | all : WallWithWindows} minWallWidth = 0.3 # don't make an attr to keep the variation ! @Group ("Doors") attr doorWidth = 1 @Group ("Doors") attr doorHeight = 2.0 DoorFacade --> case scope.sx < doorWidth + 2 * minWallWidth : Wall else : 33%: # door centered split(x) { ~1 : WallWithWindows | doorWidth : DoorPart | ~1 :WallWithWindows} 33%: # door left split(x) { minWallWidth : WallWithWindows | doorWidth : DoorPart | ~1 :WallWithWindows} else : # door right split(x) { ~1 : WallWithWindows | doorWidth : DoorPart | minWallWidth :WallWithWindows} @Group ("Windows") attr windowBaseHeight = 0.8 @Group ("Windows") attr windowHeight = 1.2 @Group ("Windows") attr windowWidth = 1.0 windowDist = rand(.5,2) # don't make an attr to keep the variation ! WallWithWindows --> case scope.sx <= minWallWidth : Wall else : split(y) {windowBaseHeight + baseHeight : Wall | windowHeight : WindowArea | ~1 : Wall} WindowArea --> split(x) {{~windowDist : Wall | windowWidth : Window}* | ~windowDist : Wall} Window --> color(.3,.3,.4) DoorPart --> split(y) {baseHeight : Base | doorHeight : Door | ~1 : Wall} Door --> color(.3,.2,.2) @Group ("Steps") attr stepHeight = 0.19 @Group ("Steps") attr stepDepth = 0.27 Base --> split(y) {~stepHeight : Step(split.total - split.index)}* Step(index) --> extrude(stepDepth * index) Wall --> color(.8,.7,.7)
Ultimately it'd be so nice to be able to select a wall manually and then say right I'd like to use this code on this wall but that code on the others but I don't believe this is possible...
const doorSide = 33% : "left" 33%: "right" else : "center"
case doorSide == "left" : split() ..
33% : split() left ..
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.