Non Continuous Facades

799
3
02-26-2014 09:15 AM
AvgiSotiropoulou
New Contributor
Hey!!
I am writing a CGA code to build a 3D city model from polygons feature class and I am facing a big issue. The majority of the facades is non continuous so when I assign the code each part of the facade is splitting separately. For example in the Ground-floor's Front facade I want to be created one Entrance Tile and in case there is more space some windows. But since each part of the front facade is splitting separately the outcome is not the desirable, is there any solution to this? 

GroundFloor_FrontFacade--> split(x){'0.1:Wall|2:Entrance_Tile|0.20:Wall|{~1:Windows_Tile}|'0.1:Wall}

[ATTACH=CONFIG]31785[/ATTACH]

Entrance_Tile= red, Windows_Tile=blue
0 Kudos
3 Replies
MatthiasBuehler1
Frequent Contributor
Hi,


in this regard, CGA is still limited.


One thing you can do after extruding is :
comp(f) {front = FrontShape} // Note the = that puts all selected shapes in 1 resulting shape, not n new shapes.

attr ID = 0

FrontShape -->
    comp(f) {sel (ID): DoorWall. | all : WindowWall. } // sel() casts a string to a selector.


But of course, you need to set the ID manually, since CGA cannot evaluate which one is the best for a door.

ok ?

matt
0 Kudos
AvgiSotiropoulou
New Contributor
Cool!! Thanks a lot Mathias 🙂 It is very helpful !!

I faced though a new problem,  the continuous facades were becoming either Doors or Windows.
I managed to solve this by
      adding a new attribute :  @Range("continuous","non continuous")
                                          attr Facade_is =  ""

      and then: FrontShape --> case Facade_is =="continuous": split(x) {2: Door|~1:WindowWall}
                                            else:comp(f) {(ID): DoorWall| all : WindowWall }

I guess from what you said that there is not an automatically way through this?
0 Kudos
MatthiasBuehler1
Frequent Contributor
computers are dumb, so if you code stuff, you need to explicitly tell the computer what to do.. Such things can not be automatted.

Otherwise, we'd soon face angry machines, controlled by 'SkyNet' .. 🙂
0 Kudos