AnsweredAssumed Answered

Is automatic seed update possible with Python?

Question asked by mucmuc1 on Jul 27, 2019
Latest reply on Aug 17, 2019 by mucmuc1

  Hello guys, there is something I cant resolve.

  In my project, I randomly determine the horizontal and vertical dimensions of buildings with cga rule.For example between 10-20 meters.

   What I want to do is regenerate shape until BuildingFootprint Area / Parcel Area > 0.3 when BuildingFootprint Area / Parcel Area < 0.3.

   My problem is ;  If the conditions do not occur, the cga rule does not regenerate the seed values.If conditions do not occur, can a python script be written to automatically update seed values and regenerate shapes until the condition occurs?

   If you can, can you help me with this, because I don't know about Python scripting.

 

Here is my cga rule :

*************************************************************************************

attr BuildingX = rand (8,30)
attr BuildingZ = rand (8,30)


attr GFAR = BuildingX*BuildingZ/geometry.area

 

Lot-->
split(x) { ~1 : Space | BuildingX : split(z) { ~1 : Space | BuildingZ : Building | ~1 : Space } | ~1 : Space }

 

Building-->
case GFAR > 0.3 : Building
else:CorrectBuilding

CorrectBuilding-->extrude(8)

***************************************************************************************

Outcomes