Hi,
I would like to control the splits blocks created when I creates streets, not using type under Block Parameters.
In some cases a block needs to be split in half, with the same area, and in some cases the blocks needs to be split in trees parts, and so on.
Is there a way to control this?
And if there are can some one show me the code to do that? I am still learning and have a looong way left:)
Best regards Tomas
Hi !
Yes, thinks like this are possible ..
Can you post a few pictures of what you imagine ?
Let me know ..
Matt
Matthias Buehler
Head of 3D Technologies
twitter: @MattB3D
-------------------------------------
Garsdale Design Limited
Hi,
Good. I like to cut the area (lot and building) along the pink line in a way that I control if it will split the lot in exactly half, or like 10m from the lefthand side.
Your work is awesome...
Tomas
Thanks for the kind words !
Yes, you can do these things, but you need to do them in CGA.
E.g.
BlockShape -->
split(x) { '0.5: Half. | ~1: Half. }
Matthias Buehler
Head of 3D Technologies
twitter: @MattB3D
-----------------------------------
Garsdale Design Limited
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
Hi again,
Here is the result when I use the code You sent me.
Ah, I think I understand now what you need (I'm not perfectly sure).
1 Offset
2 Split in Half with middle part left out (basically the parcelling is done in CGA)
3 extrude to volume
-->
Use 'NO SUBDIVISION' as subdivision type. This way, you get only 1 block shape.
Then use for example this code:
attr blockOffset = 3
attr distance = 2
attr buildingHeight = 10
Lot -->
offset(-blockOffset)
comp(f) {border: Done. | inside: Inside }
Inside -->
alignScopeToGeometry(yUp, any, longest)
split(x) {{~1: Footprint | distance: NIL}* | ~1: Footprint}
Footprint -->
extrude(world.y, buildingHeight)
Hi again,
Forgive me for taking your time. Your code does not share the blocks in a way that I want, the pink line indicates the block devided with your code . The green shows how I want to devide. I want to make one block to two or more blocks. I have devided it with a road with 0 feet in spread. Is it possible to split the blocks in that way without using a road?
If there are no other way how to prevent the Sidewalks to bend in the crossings?
Best regards and happy weekend!!
Hey ..
So you have 2 blocks with a street that is 0 wide. All you need to do is use CGA to split the 1 big block shape into 2 smaller block shapes first.
CGA can ONLY operate on 1 shape. It can not synchronize things with other shapes. So GCA cannot alter or influence the dynamic subdivision, since that only produces the shapes on which a CGA rule is applied.
Ok ? Or did I miss a point ?
m.
Matthias Buehler
Head of 3D Technologies
twitter: @MattB3D
----------------------------------
Garsdale Design Limited
Hey,
Yes I would like to use CGA to split the 1 big block shape into 2 smaller block shapes.
I do not know how the CGA code should bee written... I do not want to use the road that is 0 wide.
Could You help me with the code, please?:-)?