Access scope of front side before comp split?

562
5
04-24-2012 01:55 PM
MarieSaldana1
New Contributor
Hi Matthias!

I have a question that has to do with models built on sloped lots.

Following your example, I started with the base volume:
Lot -->
 alignScopeToAxes(y)
 LotAligned(scope.sy)
     
LotAligned(yDim) -->
 alignScopeToAxes(y)
 extrude(world.y, 100)
 split(y) {yDim : BaseVolume | ~1 : NIL}


Then I want to do something to the top only if the front face exceeds a certain y scope. But I don't know how to access the y scope of the just the front without doing a component split first, and then I can't apply this to the top face, which is already split off.

Any suggestions?

Thanks!

-Marie

PS. One related question: I was trying to deal with this by setting a boolean attribute, i.e:
BaseVolume-->
 comp(f) {front: BaseFacade | left : BaseSide | right : BaseSide| back : BaseSide | bottom : NIL | top : setPivot (yzx,4) Ground Row }

BaseFacade  -->
 case scope.sy >= floorHeight: set(multistory, true)
 else:  BaseSide 


However, this doesn't work. Any ideas?

Thank you...
0 Kudos
5 Replies
MatthiasBuehler1
Frequent Contributor II
hi ..

this is directly not possible, sadly.


maybe you can play additionally with geometry.lowerheight .. it may help you ?

[[ I think this is an undocumented geometric value. it's the height value of the lowest vertex of the extruded volume's top face ]]

Lot -->
extrude(world.y, 50)
split(y){geometry.lowerheight : X. | ~1 : NIL}


usually, the best strategy on sloped buildings is to decide if
1] all facades have synchronized floor levels. this is done by splitting the 3d volume into floor volumes, then comp(f) to get the facades.
2] all facades create independent floor levels. for this, you can comp(f) directly on the extruded volume.

I can post more later .. have a quick meeting now .. ;)
0 Kudos
MarieSaldana1
New Contributor
Hey, thanks for the response.

I managed to work around it more or less but it would be immensely helpful to set an attribute for type:

attr multistory = false

BaseFacade  -->
 case scope.sy >= floorHeight: set(multistory, true)
 else:  BaseSide


I'm wondering why this doesn't work? I am able to set other attributes, like height.

Thanks!

M
0 Kudos
MatthiasBuehler1
Frequent Contributor II
attr multistory = false

BaseFacade  -->
    case scope.sy >=
        floorHeight:
            set(multistory, true)
            Shape.
    else:
        BaseSide.


Try this, should work. (did not test the code). I assume you just need to define a Shape or NIL or something in the code.
0 Kudos
MarieSaldana1
New Contributor
Hmm... that didn't work for me. Let me know if you think of something.
:)
Thank you!
Marie
0 Kudos
MatthiasBuehler1
Frequent Contributor II
maybe like so ?


attr floorHeight = 3


@Hidden
attr multistory = false


Lot -->
 alignScopeToAxes(y)
 LotAligned(scope.sy)
     
LotAligned(yDim) -->
 alignScopeToAxes(y)
 extrude(world.y, 100)
 split(y) {yDim : BaseVolume | ~1 : NIL}

BaseVolume -->
 comp(f) {side : alignScopeToAxes(y) BaseFacade(scope.sy) | top : Top. | all : NIL }


BaseFacade(yDim) -->
    case yDim >=
        floorHeight:
            set(multistory, true)
            Printer
    else:
        Printer

Printer -->
 print (multistory)
0 Kudos