幻灯片-CityEngine城市引擎

规则内联 – 几何合并

我已按照此页面上的说明(https://doc.arcgis.com/en/cityengine/latest/cga/cga-inline-operation.htm)复制了 FShape 的各个部分(右图)。但是,当修改分割值时,如果分割后的形状不相等,清理几何体似乎无法统一形状(左图)?我在使用内联几何体和清理几何体统一其他子形状时也遇到了同样的问题。

d2b5ca33bd20251019181247

谢谢

回复:

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

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

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 
        }
    }

 

请登录后发表评论

    没有回复内容