Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * File: building_exampe_stackexchange.cga
- * Created: 19 Jul 2018 21:13:58 GMT
- * Author: eric
- */
- version "2018.1"
- attr your_building_height_attribute_name = 10
- @Range("gable", "hip", "pyramid", "shed")
- attr your_roof_form_attribute_name = "hip"
- attr roofAngle = 30
- @StartRule
- footprint -->
- extrude(your_building_height_attribute_name)
- comp(f) {top : roof | front : X. | back : X. | left : X. | right : X. | bottom : X.}
- roof -->
- case your_roof_form_attribute_name == "gable" : roofGable
- case your_roof_form_attribute_name == "hip" : roofHip
- case your_roof_form_attribute_name == "pyramid" : roofPyramid
- else : roofShed
- roofGable -->
- roofGable(roofAngle)
- roofHip -->
- roofHip(roofAngle)
- roofPyramid -->
- roofPyramid(roofAngle)
- roofShed -->
- roofShed(roofAngle)
Add Comment
Please, Sign In to add comment