ROOF design Problem

2941
3
05-13-2014 12:31 AM
Amirimohammed
New Contributor
Helloo everybody :
i have a probleme and i hope someone will help me to solve it.
my problem is to design a roof with a solar panel or to put the solar on the top of the roof.
i looket the example of redlands developpement, but i'm a beginner for using city engine, then i didnt understant the majorité of the rules in the redlands example. so can someone help to do this.


this is a picture of my building

[ATTACH=CONFIG]33771[/ATTACH]
0 Kudos
3 Replies
by Anonymous User
Not applicable
Hi,
Here is a rule for this:
Chris

version "2013.1"

HouseFootprint -->
 extrude(8)
 comp(f) {
  top: Gable |
  side: Facade. 
  # Period stops execution, instead of calling another rule
  # and names the final shape.
 }
 
 
Gable -->
 roofGable(30)
 comp(f) {
  # Send slanted roof shapes to two rules here:
  aslant: RoofToTexture SolarPanelMount |
  side: RoofFacade.
 }
 
SolarPanelMount -->
 # Use comp.index == 0 or 1 to identify face.
 # I first tried using geometry.isOriented(world.south).
 case comp.index == 1:
  split(x) {
   '0.1 : NIL |
   '0.8 : 
    split(y) {
     '0.1 : NIL |
     '0.8 : SolarPanels |
     '0.1 : NIL
    } |
   '0.1 : NIL
  }
 else:
  NIL
 
SolarPanels -->
 t(0,0,1)
 color(1,0,0)
 # Code here to make this shape into panels.
 SolarPanelsTextured.
 
RoofToTexture -->
 # Texturing Code Here
 TexturedRoof.


[ATTACH=CONFIG]33817[/ATTACH]
0 Kudos
Amirimohammed
New Contributor
hello
thanks for your proposition
it's a good exemple for designing solar panel independtly of the roofs
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hey Chris,


Why do you distinguish between "case comp.index == 1 and 0" ?

m.
0 Kudos