I am working on a rule where a land lot goes through a series of checks, and can only continue to the next part of the rule once all check conditions are met.
I need to check the following:
- the area of the shape needs to be larger than 100
- the length of the first edge needs to be greater than 25
I’ve got my rule set up so as follows:
attr AreaPass = false
attr LinePass = false
Shape -->
case geometry.area >= 1000:
set(AreaPass, true)
print(geometry.area + " is area")
print(AreaPass + " is area")
LineCheck
else:
color(1,0,0) #color the shape to show an error
LineCheck -->
comp(e) {0: FrontLine}
FrontLine -->
case scope.sx >= 25:
set(LinePass, true)
print (scope.sx + " is scope.sx")
print (LinePass + " is scope.sx")
TestsHavePassed
else:
color(1,0,0) ##fail
TestsHavePassed -->
case LinePass == true && AreaPass == true:
print ("pass")
color(0,1,0) #color the LOT green to show that it passed
extrude(10) #Extrude the LOT shape by x meters to show that it passed
else:
color(1,0,0) ##fail
print ("fail")<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The issue is that I can't extrude the original lot face by x meters because by this point I've split the object and only have an edge left to work with. Is there any way to run a geometry area test AND an edge test, and if they both satisfy their conditions, then an operation will continue on the original input shape?