Select to view content in your preferred language

Rule inline - geometry merge

234
5
3 weeks ago
SteveFox
Emerging Contributor

Hi

 

I've gone through the instructions on this page (https://doc.arcgis.com/en/cityengine/latest/cga/cga-inline-operation.htm) and replicated the FShape pieces (right image). However it appears that when the resulting split shapes aren't equal when modifying the split values, the cleanup geometry doesn't unify the shape (left image)? I'm having the same issue when using inline and cleanup geometry to unify other sub shapes.

 

ThanksFShapePieces-inline-unify.png

0 Kudos
5 Replies
JonasObertuefer
Esri Contributor

Hi @SteveFox,

Thanks for your question. For this example make sure the distances matches in both splits otherwise cleanupGeometry does not work.

JonasObertuefer_0-1758623852611.png

 

Hope this helps!

Best,
Jonas

 

SteveFox
Emerging Contributor

Thanks Jonas, will cleanup geometry still work with splits calling up attribute/s (as it's the same attribute it will be matching in both splits) - it doesn't appear to. 

0 Kudos
JonasObertuefer
Esri Contributor

Hi, not sure if I can follow. Do mean that if you replace the numbers marked in yellow with an attribute it does not work anymore for you? Can you share an example snippet?

0 Kudos
JonasObertuefer
Esri Contributor

Also the upcoming 2025.1 release of CityEngine will introduce the modify/inline(recompose) operation, which heavily simplifies this example:

Init -->
    inline(recompose) FShapePieces
    cleanupGeometry(edges, 0)
    House  

FShapePieces -->
    split(z, noAdjust) 
        {  Width: Done.
        | ~1: split(x) { ~Gap_Width: NIL   | Width: Done. }* }

You can already test the above code when running the 2025.1 beta by joining the early adopter program.

Cheers
Jonas

SteveFox
Emerging Contributor

Thanks Jonas,

Follow up question - is it possible to inline recompose and geometry merge certain pieces? e.g. the front and rear building footprints below, which are the result of the split operation. So that we can then apply different subsequent operations to different buildings. The aim is to create a rule that works in a similar way to how we would normally design a block layout set out via a grid. 

SteveFox_1-1759988983626.png

 

DevelopableArea -->
    split(x, noAdjust) {
        leftbuildingdepth: split(z) { 
            ~1: leftbuildingrear
            | buildingseparation1: NIL 
            | ~1: leftbuildingfront 
        } 
        | buildingseparation2: NIL 
        | ~1: split(z) { 
            buildingreardepth: rearbuilding 
            | buildingseparation3: NIL 
            | ~1: centrebuilding 
            | buildingseparation4: NIL 
            | buildingfrontdepth: frontbuilding 
        }
        | buildingseparation5: split(z) { 
            buildingreardepth: rearbuilding 
            | buildingseparation3: NIL 
            | ~1: NIL 
            | buildingseparation4: NIL 
            | buildingfrontdepth: frontbuilding 
        }
        | buildingrightdepth: split(z) { 
            buildingreardepth: rearbuilding 
            | buildingseparation3: NIL 
            | ~1: rightbuilding 
            | buildingseparation4: NIL 
            | buildingfrontdepth: frontbuilding 
        }
    }

 

 

0 Kudos