Intersecting shapes in one floor shape

1583
1
10-16-2014 07:21 AM
LR
by
Occasional Contributor III

Hi.

I have two buildings that are intersecting each other, but one floor shape. I "solved" this by first convexifying, then extruding the two main shapes, then extruding the side facade of the smaller shape and then giving the structures roofs. However this does not seem very elegant. Can it be done in another way?

The problem is basically that the smallest part is occupied by  both buildings and the geometry of them should remain simple to build a roof easily. The current roof works, but a more complex one would be problematic. Could I at least merge the green and pink parts? I tried innerRect but this obviously only works for one of the buildings. "Filling up" the leftover shape's missing corner also doesn't work.

cga:

version "2014.0"

attr maxLength = scope.sx

Lot -->

  convexify(maxLength)

  //comp(f){all:randomcolor}

  comp(f){

  0: green |

  1:red |

  2:blue

  }

randomcolor --> color(rand,rand,rand)

green --> color("#00ff00")

  extrude(10)

  comp(f){

  4:ExtrudeMe |

  top: Roof |

  side: Undefined

  }

blue --> color("#0000FF")

  extrude(10)

  comp(f){

  top: Roof |

  side: Undefined

  }

ExtrudeMe -->

  color(1,0,1)

  extrude(3.7420570850372314) //scope.sx from dark green part

  comp(f){

  4:RoofPink |

  top: Undefined |

  side: Undefined

  }

Roof -->

  roofGable(30,0,0,false)

RoofPink -->

  roofGable(30,0,0,false,90)

  print ("hello")

Screenshots for clarity:

Screenshot__0000_Layer-3.png

Screenshot__0001_Layer-2.png

pink: side-extrusion of the green building

Screenshot__0002_Layer-1.png

Tags (1)
0 Kudos
1 Reply
by Anonymous User
Not applicable

I've got no idea... Buehler!

But thanks for sharing this, since it illuminates the convexify CGA operation.

0 Kudos