Hi,
Hmm, I did not get it to work as I would like to.
I sent two new images I hope to get my idea clearer.
I would like to split the block (?) in a controlled way, not using type in the Block Parameters.
This is the end result I like to get. Here I have used Type Skeleton Subdivision. The problem using type is that it will not split the block as I would like to.
If its possible, can You send me a code for that???
I used the code You send me but did only manage to split extruded volume and I did't manage to offset the to generate some space between them.
Here is the code:
/**
* File: TL Fastigh med rapport.cga
* Created: 11 Nov 2014 13:01:21 GMT
* Author: tslm01
*/
version "2014.0"
attr transp = 0.5
attr hojd = 0
attr indrag = 5
attr byggnadfarg = "#804000"
attr gronomradefarg = "#299A1D"
Lot -->
split(x) { '0.3: Half. | ~1: Half. } Fastighet
report("Fastighet area (m2)", geometry.area())
Fastighet -->
offset (- indrag) OffsetFastighet
report ("Fastighet area (m2)", geometry.area())
OffsetFastighet -->
comp(f) {inside: Byggnad
| border: Gronomrade}
Byggnad -->
extrude(hojd)
color (byggnadfarg)
set (material.color.a, transp)
report ("Byggnad höjd (m)", hojd())
report("Byggnad area (m2)", geometry.area(bottom))
report ("Byggnad volym (m3)", geometry.volume())
Gronomrade -->
color (gronomradefarg)
report("Grönområden area (m2)", geometry.area())
Does it make sense?
Best regarde Tomas