Class: 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.
Class Hierarchy¶
Base classes¶
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects. |
Methods
Returns whether also triangles facing the other side will be created. |
|
Returns method that determines how altitude is bound to individual vertices |
|
Returns method that determines altitude (whether to clamp to feature to terrain) |
|
Returns front/back culling mode |
|
Returns edge lines color |
|
Returns width of edge lines (in pixels) |
|
Returns whether edge highlighting is enabled |
|
Returns extrusion height (in map units) |
|
Returns height (altitude) of the symbol (in map units) |
|
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders) |
|
Returns material settings used for shading of the symbol |
|
Returns vertical offset of the symbol (in map units) |
|
Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs) |
|
Sets whether also triangles facing the other side will be created. |
|
Sets method that determines how altitude is bound to individual vertices |
|
Sets method that determines altitude (whether to clamp to feature to terrain) |
|
Sets front/back culling mode |
|
Sets edge lines color |
|
Sets width of edge lines (in pixels) |
|
Sets whether edge highlighting is enabled |
|
Sets extrusion height (in map units) |
|
Sets height (altitude) of the symbol (in map units) |
|
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders) |
|
Sets the material settings used for shading of the symbol. |
|
Sets vertical offset of the symbol (in map units) |
|
Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs) |
Static Methods
Creates a new QgsPolygon3DSymbol. |
- class qgis._3d.QgsPolygon3DSymbol[source]¶
Bases:
QgsAbstract3DSymbol
- addBackFaces(self) bool [source]¶
Returns whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
Added in version 3.2.
- Return type:
bool
- altitudeBinding(self) Qgis.AltitudeBinding [source]¶
Returns method that determines how altitude is bound to individual vertices
- Return type:
- altitudeClamping(self) Qgis.AltitudeClamping [source]¶
Returns method that determines altitude (whether to clamp to feature to terrain)
- Return type:
- static create() QgsAbstract3DSymbol | None [source]¶
Creates a new QgsPolygon3DSymbol.
Caller takes ownership of the returned symbol.
- Return type:
Optional[QgsAbstract3DSymbol]
- cullingMode(self) Qgs3DTypes.CullingMode [source]¶
Returns front/back culling mode
- Return type:
- edgeWidth(self) float [source]¶
Returns width of edge lines (in pixels)
Added in version 3.8.
- Return type:
float
- edgesEnabled(self) bool [source]¶
Returns whether edge highlighting is enabled
Added in version 3.8.
- Return type:
bool
- height(self) float [source]¶
Returns height (altitude) of the symbol (in map units)
Deprecated since version 3.36: Use
offset()
instead.- Return type:
float
- invertNormals(self) bool [source]¶
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
- Return type:
bool
- materialSettings(self) QgsAbstractMaterialSettings | None [source]¶
Returns material settings used for shading of the symbol
- Return type:
Optional[QgsAbstractMaterialSettings]
- offset(self) float [source]¶
Returns vertical offset of the symbol (in map units)
Added in version 3.36.
- Return type:
float
- renderedFacade(self) int [source]¶
Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)
Added in version 3.16.
- Return type:
int
- setAddBackFaces(self, add: bool)[source]¶
Sets whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
Added in version 3.2.
- Parameters:
add (bool)
- setAltitudeBinding(self, altBinding: Qgis.AltitudeBinding)[source]¶
Sets method that determines how altitude is bound to individual vertices
- Parameters:
altBinding (Qgis.AltitudeBinding)
- setAltitudeClamping(self, altClamping: Qgis.AltitudeClamping)[source]¶
Sets method that determines altitude (whether to clamp to feature to terrain)
- Parameters:
altClamping (Qgis.AltitudeClamping)
- setCullingMode(self, mode: Qgs3DTypes.CullingMode)[source]¶
Sets front/back culling mode
- Parameters:
mode (Qgs3DTypes.CullingMode)
- setEdgeColor(self, color: QColor | Qt.GlobalColor)[source]¶
Sets edge lines color
Added in version 3.8.
- Parameters:
color (Union[QColor, Qt.GlobalColor])
- setEdgeWidth(self, width: float)[source]¶
Sets width of edge lines (in pixels)
Added in version 3.8.
- Parameters:
width (float)
- setEdgesEnabled(self, enabled: bool)[source]¶
Sets whether edge highlighting is enabled
Added in version 3.8.
- Parameters:
enabled (bool)
- setExtrusionHeight(self, extrusionHeight: float)[source]¶
Sets extrusion height (in map units)
- Parameters:
extrusionHeight (float)
- setHeight(self, height: float)[source]¶
Sets height (altitude) of the symbol (in map units)
Deprecated since version 3.36: Use
setOffset()
instead.- Parameters:
height (float)
- setInvertNormals(self, invert: bool)[source]¶
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
- Parameters:
invert (bool)
- setMaterialSettings(self, materialSettings: QgsAbstractMaterialSettings | None)[source]¶
Sets the
material
settings used for shading of the symbol.Ownership of
material
is transferred to the symbol.- Parameters:
materialSettings (Optional[QgsAbstractMaterialSettings])