import Plant:"/ESRI.lib/rules/Plants/Plant_Loader.cga" import Text:"/ESRI.lib/rules/General/Text.cga" PlantNumber = Plant.nPlants @Hidden attr SubSplit = 0 @Hidden attr Length = 0 @StartRule Area--> alignScopeToGeometry(yUp,1) s(PlantNumber*20,0,20) set(Length,scope.sx) plantpoints(0) plantpoints(counter)--> case SubSplit <= PlantNumber: split(x) {Length/PlantNumber:plantArea(SubSplit) | ~1: set(SubSplit, SubSplit+1) plantpoints(SubSplit)} else: NIL plantArea(plantnum)--> comp(f) {top=PlacePlant(plantnum)[Ground]} PlacePlant(plantnum)--> set(Plant.Name, Plant._commonName(SubSplit)) set(Plant.Height, Plant._heightMax(SubSplit)) set(Plant.Radius, Plant._radius(SubSplit,Plant.Height)) Plant.Generate set (Text.Text,Plant.Name) set (Text.Size,2) rotate(abs, world, 270,180,270) t(Plant.Height,0,scope.sy/2-Text.Size) Text.Generate Ground--> color("#56a554")
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。