Select to view content in your preferred language

geometry.isOriented and even issue on roofs.

3796
7
Jump to solution
08-17-2015 04:45 AM
KennethLindhardt
Deactivated User

My first question is, that I would like to sort the roof splits by orientation, so I would like to know which roof sides that are orientated south, to know which roof sides to assign sun panels on, for further visualization and analyzing.

I have create the simple rule, so geometry.isOriented(world.south) should turn red. This seems only to have an impact on roofs with a little more complexity than a simple rectangular building. So why is that, And how could I filter out the south roofs probably? This is only the case, when the roofs are on top of an extrusion. If the created directly on the ground, it works as expected, I’m guessing the orientation get’s confused at some point 

Roof_orientation.PNG

Start-->

extrude(10)colorRule

colorRule-->

comp(f) {top : Next | all : NIL}

Next-->

roofGable(45,0,0,true) Next2

Next2-->

comp(f) {horizontal : X.  | aslant :  Next4}

Next4-->

case geometry.isOriented(world.south) : color(1,0,0)

case geometry.isOriented(world.north) : color(1,.8,0)

case geometry.isOriented(world.east) : color(1,0,1)

case geometry.isOriented(world.west) : color(0,0,0)

else : color (.5,.5,.5)

My second question is about a roof gable with more complexity than the rectangular building, is resulting in 1 gable is finish as the gableroof, but the other is a hiproof, and as you may see, only a part of the roof is orientated world.north. I think this worked for me in the pass, by using the even function, set to true, but this has no effect at all. The purple faces, in this case orientated east, shoulp, from my point of view, be gables.

Around 60% af all my buildings are gable roofs, and almost all has a little entrance or something poking out of the facades, which is resulting in a lot of odd looking buildings. 

Gable.PNG

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Comp() the faces of the roof, rotate them to be vertical, run the sun orientation test, rotate them back by the same amount.

Chris

View solution in original post

7 Replies
BenLeslie1
Frequent Contributor

Part of the problem is your roof angle of 45 degrees.

If you choose a shallower angle such as 30, you'll get no south orientented faces - they are all facing up.  So use a steeper angle i.e. 50 and you'll get more consistent results - by using 45 the angle is right on the cusp of facing up and facing south so the results are inconsistent.

If you want to use a shallower angle you need to find a way of manipulating the Scope so up-facing faces are detected as facing towards a compass point.

by Anonymous User
Not applicable

Comp() the faces of the roof, rotate them to be vertical, run the sun orientation test, rotate them back by the same amount.

Chris

KennethLindhardt
Deactivated User

Thanks a lot guys, that helped me out a lot. Success!

What about, does anyone knows how to prevent a gable roof to a hip in one of the gables, if the footprint has more than just a rectangle? Even does not seem to work, and I can’t remember if I had the same issues prior v. 2015 

Tag.png

0 Kudos
BenLeslie1
Frequent Contributor

My guess is that you have an unnecessary vertex on your original shapes somewhere along the edge where the hip-end is being created.  Use the Cleanup Shapes tool or manually delete the superfluous vertex.

For the nextdoor building where you're also getting hips I think you might have to draw it as two separate boxes.

KennethLindhardt
Deactivated User

That was my guess to begin with as well, but actually this is just a basic shape drawn with the polygonal shape creation, so there’s nothing to clean up on. I can reproduce this every time, and I have checked some other scenes, with the exact same issue. Am I expecting something not possible?

BenLeslie1
Frequent Contributor

Ah.... It's caused by the line coming from the porch roof to the hip end.  You might have to draw the main house and the porch as two boxes - hold shift when drawing so they remain completely separate.

0 Kudos
KennethLindhardt
Deactivated User

Hi Ben, thanks for that.

That will then create a roof on the porch, not being able to align to the main building house. My little picture example, is just me trying to figure out why my roofs looks so odd. I got 10.000 building footprints, where over half is with gable roofs, and I guess many of them are with some kind of geometry poking out of the building, so I was hoping someone has come around this issue in some way procedurally

0 Kudos