Combine building polygons to 3D shape

2061
4
Jump to solution
03-17-2021 06:15 AM
LeoFro
by
New Contributor

Hello!

The shapefiles I'm working with contains a separate polygon for each different height levels of buildings. Each polygon contains an attribute with the height.

I need to combine the polygons that are intersecting/touching to get a 3D shape without inner walls for each building that I can run rules on.

Screenshot_6.pngScreenshot_7.pngScreenshot_8.png

Is there any way to do this in an automatic or semi-automatic with CGA or Python in CE?

Grateful for any input 😃

// Leo

1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Unfortunately, the "leaf" shapes from separate starting shapes in CE don't really "speak" to each other too well so you will have to work with your starting shape or think about a model export/import workflow.   

For starting shape method,  you can combine the shapes or treat them separately at first and then export them together.  The comp selection, extrude function, occlusion queries and translate functions could be used to prevent overlapping floors.  You could translate your interior shapes up the Y-axis by the height attribute. Then after upper floor extrusion, you could use the comp selection and select everything but the floor.  That would cut out on some shape overlaps by eliminating the floors.

You could create your primitive shapes and export them as a model into .obj or .fbx format.  There are some options at export that might help eliminate coplanar polygons and holes.  Then bring them back in and maybe be able to run a cleanup geometry on the results to eliminate some overlapping faces.  Or clean them up in Blender with boolean modifier like the Union tool (https://docs.blender.org/manual/en/latest/modeling/modifiers/generate/booleans.html)

(or similar program) and then bring them back in CE to continue running your ruleset.

I might have a better answer after I do some experimenting myself.  

View solution in original post

4 Replies
by Anonymous User
Not applicable

Unfortunately, the "leaf" shapes from separate starting shapes in CE don't really "speak" to each other too well so you will have to work with your starting shape or think about a model export/import workflow.   

For starting shape method,  you can combine the shapes or treat them separately at first and then export them together.  The comp selection, extrude function, occlusion queries and translate functions could be used to prevent overlapping floors.  You could translate your interior shapes up the Y-axis by the height attribute. Then after upper floor extrusion, you could use the comp selection and select everything but the floor.  That would cut out on some shape overlaps by eliminating the floors.

You could create your primitive shapes and export them as a model into .obj or .fbx format.  There are some options at export that might help eliminate coplanar polygons and holes.  Then bring them back in and maybe be able to run a cleanup geometry on the results to eliminate some overlapping faces.  Or clean them up in Blender with boolean modifier like the Union tool (https://docs.blender.org/manual/en/latest/modeling/modifiers/generate/booleans.html)

(or similar program) and then bring them back in CE to continue running your ruleset.

I might have a better answer after I do some experimenting myself.  

by Anonymous User
Not applicable

Looking at your model,  your upper floor shapes are combined to the ground floor shape, which is causing the roof to form the way it does.

0 Kudos
LeoFro
by
New Contributor

Thank you for the reply!

I suspected that this would be the case. I'm using occlusion queries (inside and touches) to remove the inner walls for now.

The process will probably be: Extrude Polygons -> Union intersecting shapes -> Import to CE as OBJ

0 Kudos
romainjanil
New Contributor III

you can also generate/convert model to shapes and try to union them after