import rules

721
1
Jump to solution
10-03-2019 04:32 AM
BilalMustafa
New Contributor III

Hello!

I'm working at a project to modeling a city buildings, my estimated goal is to model each building with its real facade using the facade wizard and I'm doing well so far,  i'm assuming that i can   facade each floor by using the   same procedure but i don't now how

my rule is: 
import gen_Facade_AdvancedFacade :"/شارع السهل/rules/gen_Facade_goolge2_cropped.cga"
import gen_Facade_AdvancedFacade1 :"/شارع السهل/rules/gen_Facade_IMG_3451_cropped.cga"
import gen_Facade_AdvancedFacade2 :"/شارع السهل/rules/gen_Facade_السهل 34 ب_cropped.cga"
import gen_Facade_AdvancedFacade3 :"/شارع السهل/rules/gen_Facade_السهل34 ج_cropped.cga"
import gen_Facade_AdvancedFacade4 :"/شارع السهل/rules/gen_Facade_السهل 34 د_cropped.cga"
import gen_Facade_AdvancedFacade5 :"/شارع السهل/rules/gen_Facade_السهل 34 ه_cropped.cga" 

import Roof_Textures:"/ESRI.lib/rules/Roofs/Roof_Textures.cga"

/* Attributes *************************************/

attr Roof_Ht =2
attr height = 24
attr groundfloor_height = 5.5
attr floor_height = 4.5

roof_tex = "roofs/roof.tif"

@Order(5) @Range("flat","shed","pyramid","gable","hip","half-hip","gablet","gambrel","mansard","gambrel-flat","mansard-flat","vault","dome","saltbox","butterfly")


attr Roof_Form= "flat"
@Order(1) @Range("realistic with facade textures","schematic facades","solid color")
attr Representation = "realistic with facade textures"


#Function###
getFlatRoofTexture = fileRandom("Roofs/Flat/flat*.jpg")
getSlopedRoofTexture = fileRandom("Roofs/Sloped/ceramic*.jpg")


/* Initial Shape starting rule *************/

# extrude the lot to building height
@StartRule
Lot --> extrude(height) Building

Building --> comp(f) {0:Base|1:Roof|2:AA|3:BB|4:CC|5:DD|6:EE|7:FF|8:GG|9=HH|10=II|11=JJ|12=KK|13=LL|14=MM|15=NN|16=OO|17=PP|18=QQ|19:RR |20:SS|21:TT| 22:UU|23:VV|24:WW|25:XX|26:YY|27:ZZ|28:AB|29:AC|30:AD|31:AE}

BB -->
split(y){ groundfloor_height : Floor(split.index) // Groundfloor
| floor_height : Floor(split.index) // First Floor
| floor_height : Floor(split.index) // Second Floor
| {~floor_height : Floor(split.index)}* // Mid Floors
| floor_height : Floor(999) // Top Floor, indexed with 999
| 0.5 : s('1,'1,0.3) LedgeAsset} // The top ledge just below the roof

Now is it possible to insert the facade generating code with the split function like the one bellow:

BB --> 

comp(f) { 2 :gen_Facade_AdvancedFacade3.Facade}
split(y){ groundfloor_height : Floor(split.index) // Groundfloor
| floor_height : Floor(split.index) // First Floor 
| floor_height : Floor(split.index) // Second Floor
| {~floor_height : Floor(split.index)}* // Mid Floors
| floor_height : Floor(999) // Top Floor, indexed with 999
| 0.5 : s('1,'1,0.3) LedgeAsset} // The top ledge just below the roof

or i have to separate  each function in a separate rule then import the rules and mash them together! 

i"m just confused, i read the following questions in the forum:-

cga facade parts

why is my imported rule file not working

importing rules from Other CGA files 

and still have no clue,can you please help me to start on the right way 

0 Kudos
1 Solution

Accepted Solutions
BilalMustafa
New Contributor III

Thank you Guys, I fixed my issue 

View solution in original post

0 Kudos
1 Reply
BilalMustafa
New Contributor III

Thank you Guys, I fixed my issue 

0 Kudos