You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ExternalRing-->
setback(3){ all: ExternalRing | remainder: AreaDivider }
color ("#ffcf54")
You can use a combination of split or splitArea to subdive a block or lot to have variation
you can use stochastic percentage assignment, similar to how you would do it in an attribute
to determine outcomes INSIDE the rule
////////////////////////////////////////////////////////////////////////////////////////
// X AXIS LANE DIVIDER /////////////////////////////////////////////////////////////////
//Five//////////////////////////////////////
case float(listLast(getTreeKey())) % 5 == 0:
Five
Rack
rotate(rel, object, 0, rand(360), 0)
//KIOSKS////////////////////////////////////
//Three/////////////////////////////////////
case float(listLast(getTreeKey())) % 3 == 0:
scatter(surface, 3, uniform){ #primitiveQuad(2,3)
label("kiosk")
/*CheckOverlap*/ }
Three
#Kiosks
//FURNITURE&TREES/////////////////////////////////
//Two////////////////////////////////////////////
case float(listLast(getTreeKey())) % 2 == 0:
#you might want to consider scattering the kios at the larger block and then removving the ones that clash with one another and with other objects.
scatter(surface, 2, uniform){ Benches }
scatter(surface, 2, uniform){ Trees }
Two
//One//////////////////////////////////////
else:
One
else :
# rotate(rel, object, 0, rand(360),0)
primitiveQuad(meterConverter.feet(6), meterConverter.feet(9))
extrude(meterConverter.feet(6))
color ("#eb4034")
# reduceGeometry(0.5) This makes half of the box. Commenting it.
Hello @htarrido-cuny
In this rule, the reports and the CheckOverlap rule are not working. How can we fix this?
`/**
*/
version "2019.0"
import meterConverter: "meterToFeet.cga"
@enum(1,2,3)
attr LOD = 1
const EventDensity = meterConverter.sqmeterTosqft(6) #sqft/person
const textureFolder = "assets/textures/"
@StartRule
you can use offset OR you can use the setback funcion:
BlockDivision-->
setback(3){ all: ExternalRing | remainder: AreaDivider }
report ( "BalanceSpaceArea", geometry.area() )
report ( "PeoplePerEvent", geometry.area()/EventDensity )
ExternalRing-->
setback(3){ all: ExternalRing | remainder: AreaDivider }
color ("#ffcf54")
You can use a combination of split or splitArea to subdive a block or lot to have variation
you can use stochastic percentage assignment, similar to how you would do it in an attribute
to determine outcomes INSIDE the rule
////////////////////////////////////////////////////////////////////////////////////////
// X AXIS LANE DIVIDER /////////////////////////////////////////////////////////////////
AreaDivider -->
split(z){ rand(5,10): WideLanes
| rand(1,2) : Separator
| rand(4,5) : NarrowLanes
| rand(1,2) : Separator
| rand(5,10): WideLanes
| rand(1,2) : Separator }*
Separator-->
color ("#cfcfcf")
NarrowLanes-->
color ("#b3b3b3")
WideLanes -->
case float(listLast(getTreeKey())) % 2 == 0:
split(x){rand(10,20): selectOddLanes }*
else:
Second
////////////////////////////////////////////////////////////////////////////////////////
// TILES IN WIDE LANES /////////////////////////////////////////////////////////////////
selectOddLanes -->
//Seven/////////////////////////////////////
case float(listLast(getTreeKey())) % 7 == 0:
scatter(surface, 2, uniform){ Benches }
Seven
////////////////////////////////////////////////////////////////////////////
//KIOSKS///////////////////////////////////////////////////////////////////
Kiosks-->
case LOD == 2 :
rotate(rel, object, 0, rand(360),0)
i("StreetVendor.dae", yUp, keepSizeAlignPosition)
///////////////////////////////////////////////////////////////////////////////
//RACK/////////////////////////////////////////////////////////////////////////
Rack-->
case LOD == 2 :
#rotate(rel, object, 0, rand(360),0)
i("RackVendorsShelter.dae", yUp, keepSizeAlignPosition)
///////////////////////////////////////////////////////////////////////////////
//BENCHES//////////////////////////////////////////////////////////////////////
Benches-->
primitiveQuad(rand(5, 7), rand (5,7))
color ("#3d694b")
#LittleBench
#BigBench
LittleBench-->
rotate(rel, object, 0, rand(360),0)
i("Garden+Bench.dae", yUp, keepSizeAlignPosition)
reduceGeometry(0.5)
BigBench-->
rotate(rel, object, 0, rand(360),0)
i("Garden+Bench3.dae", yUp, keepSizeAlignPosition)
reduceGeometry(0.5)
///////////////////////////////////////////////////////////////////////////////
//TREES////////////////////////////////////////////////////////////////////////
Trees-->
case LOD == 2 :
rotate(rel, object, 0, rand(360),0)
i("Tree.dae", yUp, keepSizeAlignPosition)
///////////////////////////////////////////////////////////////////////////////
//TEXTURES/////////////////////////////////////////////////////////////////////
Second-->
color ("#e88079")
Five-->
case LOD == 2 :
tileUV(0,2,2) texture(textureFolder + "ConcreteTiles.jpg")
Three-->
case LOD == 2 :
tileUV(0,2,2) texture(textureFolder + "ConcreteTiles.jpg")
Two-->
case LOD == 2 :
tileUV(0,2,2) texture(textureFolder + "Grass+Concrete.jpg")
One-->
#color ("#cfcfcf")
split(z){ 0.5 : split(x){ rand(1,3) : Separator | ~7 : Two }
| 0.5 : Separator }*
Seven-->
split(z){ 0.5 : split(x){ rand(1,3) : Two | ~7 : Separator }
| 0.5 : Separator }*
`
The text was updated successfully, but these errors were encountered: