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?
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.
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?