Class: QgsPolygon3DSymbol

class qgis.3d.QgsPolygon3DSymbol

Bases: qgis._3d.QgsAbstract3DSymbol

Constructor for QgsPolygon3DSymbol

QgsPolygon3DSymbol(QgsPolygon3DSymbol)

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.

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

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

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

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 material used for shading of the symbol

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) → Qgs3DTypes.AltitudeBinding

Returns method that determines how altitude is bound to individual vertices

Return type

Qgs3DTypes.AltitudeBinding

altitudeClamping(self) → Qgs3DTypes.AltitudeClamping

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

Return type

Qgs3DTypes.AltitudeClamping

clone(self) → QgsAbstract3DSymbol
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) → QgsPhongMaterialSettings

Returns material used for shading of the symbol

Return type

QgsPhongMaterialSettings

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters
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: Qgs3DTypes.AltitudeBinding)

Sets method that determines how altitude is bound to individual vertices

Parameters

altBinding (Qgs3DTypes.AltitudeBinding) –

setAltitudeClamping(self, altClamping: Qgs3DTypes.AltitudeClamping)

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

Parameters

altClamping (Qgs3DTypes.AltitudeClamping) –

setCullingMode(self, mode: Qgs3DTypes.CullingMode)

Sets front/back culling mode

Parameters

mode (Qgs3DTypes.CullingMode) –

setEdgeColor(self, color: Union[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: QgsPhongMaterialSettings)

Sets material used for shading of the symbol

Parameters

material (QgsPhongMaterialSettings) –

type(self) → str
Return type

str

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