Generating editable building faces

07-09-2018 11:43 AM
New Contributor II

Hi all,

I want to write a rule to mass a footprint and create separate floors that can be edited with handles. Is there a way to generate masses with procedural editable faces?

I used a scaling factor with handles on the X and Y axis for rectangular shapes, however scaling doesn't work the same with other shapes. I was wondering if there's a way to generate editable faces that can be pushed and pulled with handles or moved around, just like when you're using the shape creation tools?


0 Kudos
2 Replies
by Anonymous User
Not applicable

Hi Sadra,

This is an interesting and challenging problem. Right now you're limited to setbacks from cardinal sides (front, left, right, back) or as you've been doing scaling the whole object. We'd typically approach this by using a procedural rule for usage or facade on top of a form created using the push/pull tools. We don't have a per-edge setback function yet, but that is something we are working on for the 2019.0 release to support procedural building and zoning forms. Once we have that then we'll have the best of both worlds, manual and procedural modeling of specific form.

Chris Wilkins (one of our resident CGA experts) took a shot at improving on the cardinal side workflow by using convexify to split a u-shaped building into parts. I'm attaching the sample code here.

* File: Geonet_SadraDehghan.cga
* Created: 18 Jul 2018 11:55:28 GMT
* Author: chri7180

version "2018.1"

attr FloorHeight = 4
#attr FloorCount =

@Handle(shape=Split1A, axis=x, type=move, skin=singleArrow)
attr split1 = 0

@Handle(shape=Split2A, axis=y, type=move, skin=singleArrow)
attr split2 = 0

@Handle(shape=Split3A, axis=x, type=move, skin=singleArrow)
attr split3 = 0

@Handle(shape=Split4A, axis=y, type=move, skin=singleArrow)
attr split4 = 0

Footprint -->
# Assume shape is flat.
alignScopeToGeometry(zUp, any, longest)

AlignedScope -->
comp(f){all: ConvexPart}

ConvexPart -->

Split1 -->
case split1 > 0: split(x){split1: NIL | ~1: Split1A}
else: Split1A

Split1A --> Split2

Split2 -->
case split2 > 0: split(y){split2: NIL | ~1: Split2A}
else: Split2A

Split2A -->

Split3 -->
case split3 > 0: split(x){split3: NIL | ~1: Split3A}
else: Split3A

Split3A --> Split4

Split4 -->
case split4 > 0: split(y){split4: NIL| ~1: Split4A}
else: Split4A

Split4A --> X. #extrude(FloorHeight)

However it still doesn't get us all the way to what you want. We're working on it though. 

Eric Wittner

0 Kudos
New Contributor II

Thanks for your help! Looking forward to the 2019 release!

0 Kudos