AnsweredAssumed Answered

How do I get rid of the top floors ("penthouse style") of my buildings?

Question asked by re_mei on May 9, 2017
Latest reply on May 9, 2017 by re_mei

Hi,

I am looking for a way to adapt my rule file so that all of my buildings are flat on top, without any "penthouse-style"-like additions on top (see red circles in the image).

red circles indicate parts I want to get rid of

 

I could do this manually by converting the models to shapes and delete all unwanted faces and vertices, but 1) too tedious, and 2) I need to end up with the the models, not the shapes.

 

The cga I am using is a modified version of International City.cga (created on 6 Nov 2013 by Esri R&D Center Zurich).

This is a part of it:

 

# Setback Tower #####
lowHeight   = 50% : 0.3 else: 0.7 // switching between these two values creates visually appealing setbacks
const offset = rand(0.05,0.1)
SetbackTower -->
 case scope.sx < 20 || scope.sz < 20:
  LShape(highriseBuildingHeight*0.3)
 case scope.sx < 30:
  shapeO(scope.sz*0.1,0,scope.sz*0.1,0){ remainder: extrude(buildingHeight*HeightFactor*rand(0.9,1)) RecursiveSetbacks }
  shapeO(0,scope.sx*0.21,0,scope.sx*0.21){ remainder: extrude(buildingHeight*HeightFactor) RecursiveSetbacks }
 case p(0.5):
  shapeO(scope.sz*0.15,0,scope.sz*0.15,0){ remainder: extrude(buildingHeight*HeightFactor*rand(0.9,1)) RecursiveSetbacks }
  shapeO(0,scope.sx*0.21,0,scope.sx*0.21){ remainder: extrude(buildingHeight*HeightFactor) RecursiveSetbacks }
 else:
  shapeO(scope.sz*0.21,0,scope.sz*0.21,0){ remainder: extrude(buildingHeight*HeightFactor) RecursiveSetbacks }
shapeO(0,scope.sx*0.1,0,scope.sx*0.1){ remainder: extrude(buildingHeight*HeightFactor*rand(0.9,1)) RecursiveSetbacks }
RecursiveSetbacks -->
 case scope.sy > 10 && scope.sx > 10 &&  scope.sz > 10:
  split(y){ 'lowHeight : Stories comp(f){top: Roof("flat") } | ~1: RecursiveSetbacksCall(scope.sy) }
 else:
  s('1,5,'1)
  Stories comp(f){top: Roof("rooffloor") }            
   
RecursiveSetbacksCall(h) -->
 t(0,-h,0)
 comp(f){top: alignScopeToAxes(y)
       shapeO(scope.sz*offset,scope.sx*offset,scope.sz*offset,scope.sx*offset)
        { remainder: extrude(h) RecursiveSetbacks } }

I am new to procedural modelling and ot sure if the bold part (split y operation) even is where these additional penthouse-floors are added. What do I need to change to get rid of these top floors on all my models?

 

Can anyone help?

Outcomes