How can a create gable roofs in City Engine 2014.1 so that they are created along the Z axis instead of X axis?
You might also try reduceGeometry(edges, 0.1) to reduce the vertex count - the 0.1 part... look in the help manual because I can't remember the exact details of the tolerance parameter.
You may have unnecessary points in your footprints - simplify them to just 4 vertices and I think you should get better results.
I tried the rule that you wrote but I got weird roofs. The top of the roof should be even. The shapes came from Open Street Map OSM file.
Gable always follows longest axis, or we would simply use rotateScope(). I tried that first. Here is how I did this (rule is attached):
version "2014.1" attr switchAxis = true attr gableAngle = 45 @Hidden attr originalScopeX = 0 Hidden attr originalScopeZ = 0 @StartRule RoofGableSwitchAxis --> # Gable always follows longest axis, or we would simply use rotateScope(). case switchAxis: roofGable(gableAngle) set(originalScopeX, scope.sx) set(originalScopeZ, scope.sz) rotate(rel, scope, 0,90,0) s(originalScopeZ,'scope.sx/originalScopeZ,originalScopeX) center(xz) else: roofGable(gableAngle)
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.