I have a polygon layer (consist of buildings) and it has different attributes including the height attribute. I want to use that height in order to extrude my all polygons or give height to my building then export the dxf file. Want to give that height to my all polygons using the PyQGIS. I am able to find extrude documentation but unable to locate any working example as I am confused with two parameters of extrude which is x and y. I guess it should be consist of one parameter of height only.
extrude(self, x: float, y: float) → QgsGeometry Returns an extruded version of this geometry.
Some code which I have applied without any success(no visual appearance change of polygone)
#getting the desired layer if QgsProject.instance().mapLayersByName(layerUpdateName): layerUpdate = QgsProject.instance().mapLayersByName(layerUpdateName); for lu in layerUpdate.getFeatures(): print (lu["Height"]) #lu.geometry().extrude(lu["Height"],lu["Height"]) #testExtrude(lu,lu.geometry()) #geom = lu.geometry().asPolygone() lu.setGeometry(lu.geometry().extrude(lu["Height"],lu["Height"]))