Hi everyone,
I've been having a big problem combining CGA rules and imported line/street data.
I managed to get close to a sollution at some point - but it is still not 100% solved.
My issue is that I wrote some rules for buildings with 1 specific house front, that mandatory has to be the smallest side,
facing the street.
For tests I used the following code with a setup shown in the screenshot below.
My problem is that in most cases it works, deciding to color the smallest face, facing the street "red".
However in some cases it does not.
I also did try cutting out the section from (F--> to frontA2 -->) which also works in many cases but in a few still defines the larger faces as "smaller" (red) because the scope is aligned differently.
Obviously I also tried saving out precise numbers as attributes, however I could not pass down this information to compare both faces against each other (this seems to still be a general CGA nono)
I might also add that I use a trial version and thus can't really use Python to deal with this issue.
Any help would be great.
@Start
LotInner --> NIL
Lot -->
CornerRecursion(geometry.nVertices - 1, 0)
CornerRecursion ( edgeID, nStreetEdges ) -->
case edgeID >= 0 :
case streetWidth(edgeID) > 0 :
#print (edgeID)
CornerRecursion ( edgeID - 1, nStreetEdges + 1 )
else:
#print (edgeID)
CornerRecursion ( edgeID - 1, nStreetEdges )
else:
case nStreetEdges >= 2 :
IsCornerLot
else:
IsNotCornerLot
IsCornerLot -->
Lot2
IsNotCornerLot -->
color("#00ff00")
Lot2 -->
offset (-3)
comp(f) { inside: I | border: NIL }
I -->
innerRect()
extrude(world.y, 10)
F
F -->
comp(f) {street.front : frontA2 | all : NIL}
frontA2 -->
alignScopeToGeometry(yUp, largest, world.lowest)
F3
F3 -->
case scope.sx < scope.sz:
comp(f) {object.front : MainF | object.left : B2 | object.back : MainF | object.right : B2}
else:
comp(f) {object.front : B1 | object.left : MainF | object.back : B1 | object.right : MainF}
MainF -->
comp(f) {street.front : MainF2 | all : Rear}
MainF2 --> color(1,0,0)
[ATTACH=CONFIG]33493[/ATTACH]