Class: QgsPolygon3DSymbol

class qgis._3d.QgsPolygon3DSymbol

Bases: QgsAbstract3DSymbol

3D symbol that draws polygon geometries as planar polygons, optionally extruded (with added walls).

Warning

This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.

New in version 3.0.

QgsPolygon3DSymbol() Constructor for QgsPolygon3DSymbol

Methods

addBackFaces

Returns whether also triangles facing the other side will be created.

altitudeBinding

Returns method that determines how altitude is bound to individual vertices

altitudeClamping

Returns method that determines altitude (whether to clamp to feature to terrain)

clone

rtype:

QgsAbstract3DSymbol

compatibleGeometryTypes

rtype:

object

copyBaseSettings

Copies base class settings from this object to a destination object.

create

Creates a new QgsPolygon3DSymbol.

cullingMode

Returns front/back culling mode

edgeColor

Returns edge lines color

edgeWidth

Returns width of edge lines (in pixels)

edgesEnabled

Returns whether edge highlighting is enabled

extrusionHeight

Returns extrusion height (in map units)

height

Returns height (altitude) of the symbol (in map units)

invertNormals

Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)

material

Returns material used for shading of the symbol

readXml

param elem:

renderedFacade

Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)

setAddBackFaces

Sets whether also triangles facing the other side will be created.

setAltitudeBinding

Sets method that determines how altitude is bound to individual vertices

setAltitudeClamping

Sets method that determines altitude (whether to clamp to feature to terrain)

setCullingMode

Sets front/back culling mode

setDefaultPropertiesFromLayer

param layer:

setEdgeColor

Sets edge lines color

setEdgeWidth

Sets width of edge lines (in pixels)

setEdgesEnabled

Sets whether edge highlighting is enabled

setExtrusionHeight

Sets extrusion height (in map units)

setHeight

Sets height (altitude) of the symbol (in map units)

setInvertNormals

Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)

setMaterial

Sets the material settings used for shading of the symbol.

setRenderedFacade

Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)

type

rtype:

str

writeXml

param elem:

addBackFaces(self) bool

Returns whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices

New in version 3.2.

Return type:

bool

altitudeBinding(self) Qgis.AltitudeBinding

Returns method that determines how altitude is bound to individual vertices

Return type:

Qgis.AltitudeBinding

altitudeClamping(self) Qgis.AltitudeClamping

Returns method that determines altitude (whether to clamp to feature to terrain)

Return type:

Qgis.AltitudeClamping

clone(self) QgsAbstract3DSymbol
Return type:

QgsAbstract3DSymbol

compatibleGeometryTypes(self) object
Return type:

object

copyBaseSettings(self, destination: QgsAbstract3DSymbol)

Copies base class settings from this object to a destination object.

create() QgsAbstract3DSymbol

Creates a new QgsPolygon3DSymbol.

Caller takes ownership of the returned symbol.

Return type:

QgsAbstract3DSymbol

cullingMode(self) Qgs3DTypes.CullingMode

Returns front/back culling mode

Return type:

Qgs3DTypes.CullingMode

edgeColor(self) QColor

Returns edge lines color

New in version 3.8.

Return type:

QColor

edgeWidth(self) float

Returns width of edge lines (in pixels)

New in version 3.8.

Return type:

float

edgesEnabled(self) bool

Returns whether edge highlighting is enabled

New in version 3.8.

Return type:

bool

extrusionHeight(self) float

Returns extrusion height (in map units)

Return type:

float

height(self) float

Returns height (altitude) of the symbol (in map units)

Return type:

float

invertNormals(self) bool

Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)

Return type:

bool

material(self) QgsAbstractMaterialSettings

Returns material used for shading of the symbol

Return type:

QgsAbstractMaterialSettings

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters:
renderedFacade(self) int

Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)

New in version 3.16.

Return type:

int

setAddBackFaces(self, add: bool)

Sets whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices

New in version 3.2.

Parameters:

add (bool) –

setAltitudeBinding(self, altBinding: Qgis.AltitudeBinding)

Sets method that determines how altitude is bound to individual vertices

Parameters:

altBinding (Qgis.AltitudeBinding) –

setAltitudeClamping(self, altClamping: Qgis.AltitudeClamping)

Sets method that determines altitude (whether to clamp to feature to terrain)

Parameters:

altClamping (Qgis.AltitudeClamping) –

setCullingMode(self, mode: Qgs3DTypes.CullingMode)

Sets front/back culling mode

Parameters:

mode (Qgs3DTypes.CullingMode) –

setDefaultPropertiesFromLayer(self, layer: QgsVectorLayer)
Parameters:

layer (QgsVectorLayer) –

setEdgeColor(self, color: QColor | Qt.GlobalColor)

Sets edge lines color

New in version 3.8.

Parameters:

color (Union[QColor) –

setEdgeWidth(self, width: float)

Sets width of edge lines (in pixels)

New in version 3.8.

Parameters:

width (float) –

setEdgesEnabled(self, enabled: bool)

Sets whether edge highlighting is enabled

New in version 3.8.

Parameters:

enabled (bool) –

setExtrusionHeight(self, extrusionHeight: float)

Sets extrusion height (in map units)

Parameters:

extrusionHeight (float) –

setHeight(self, height: float)

Sets height (altitude) of the symbol (in map units)

Parameters:

height (float) –

setInvertNormals(self, invert: bool)

Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)

Parameters:

invert (bool) –

setMaterial(self, material: QgsAbstractMaterialSettings)

Sets the material settings used for shading of the symbol.

Ownership of material is transferred to the symbol.

Parameters:

material (QgsAbstractMaterialSettings) –

setRenderedFacade(self, side: int)

Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)

New in version 3.16.

Parameters:

side (int) –

type(self) str
Return type:

str

writeXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters: