Hi
I was working on a cga excercise when I got stuck writing this split operation:
BuildVolume -->
split(y){floorHeight("GF") : Volume("GF") | ~1: UpperFloors}
I give me the Mismatched token error ( : | ), I don't know whats wrong, in a previous line I used a similar operation with no errors:
ScopeAligned(yDim) -->
extrude(world.y, 100)
split(y){yDim : BaseVolume | ~1: NIL}
in the excercise they use the 2015 version, I got the 2014, could that be it?, when I add the tilde the error dissappears (pic 2) but that's not how they do it
What I'm not seeing?
Hi Felix.
This is a strange bug in the 2014 version. This does not happen in the 2015 version.
It seems like the function floorHeight("GF") is causing the problem, and you can trick it by multiplying by one, and the compile error goes away:
BuildVolume -->
split(y) { 1*floorHeight("GF") : Volume("GF")
| ~1 : UpperFloors }
As a side note, the rule does not generate the building as intended because the scope.sy value, which is passed to ScopeAligned, is zero. Then, yDim is set to 0 in the ScopeAligned rule. To fix this, pass it a non-zero value so that the BaseVolume has a non-zero height.