Maybe this question was asked before but I could not find anything about it and it affects all my projects 😕
So basically I want CGA to measure my extrusion distance from the HIGHEST vertex of each shape instead of the lowest which is the rule default of extrude(world.up.flatTop). Because when the my buildings are aligned to terrain and extruded based on lowest vertex my building look shorter than they are supposed to in terms of height.
Picture attached
You are applying the split along the y extent which starts at the lowest y coordinate. The orange ground floor has a height of 3, but because the initial shape is non-planar the height is lower at some vertices.
Here is a modification to you rule.
Lot--> alignScopeToAxes(y) Extrude(scope.sy) Extrude(nonPlanarHeight) --> extrude(world.up.flatTop, height + nonPlanarHeight) Building(nonPlanarHeight) Building(nonPlanarHeight) --> split(y) { nonPlanarHeight : Basement | { ~floorheight : Floor. }* } Basement --> color("#fc824e")<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Hi Jafar!
You could add the current geometry height to the extrusion height.
For example
Lot --> extrude(world.up.flatTop, myHeight + geometry.height)<SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
or
Lot --> alignScopeToAxes(y) extrude(world.up.flatTop, myHeight + scope.sy) <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
Hope that helps!
Thanks for your answer Martin,
but this CGA adds an extra basement to my highest vertex where the extrusion is supposed to be based on. See attachment please. In this case there is a 4 floored building with floorheight of 3 meters. And I want to be extruded to 4*3=12 meters from the highest vertex of the lot.
I want the total height to be not more than 12.50 meters
thank you. it worked. but I still don't get why there's not a simple option/command to choose whether you want the extrusion to be measured from the lowest or highest vertex of a nonplanar shape.
one more question, is nonPlanarHeight a pre-defined function (couldn't find anything about it in CE Help) in here or it is just a symbolic word you put for sync purposes? I am trying to understand the code so I can further develop it myself. thanks in advance for your time
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.