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
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)
- rtype:
QgsAbstract3DSymbol
- rtype:
List[Qgis.GeometryType]
Copies base class settings from this object to a
destination
object.Creates a new QgsPolygon3DSymbol.
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)
- param elem:
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
- param layer:
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)
- rtype:
str
- 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:
- altitudeClamping(self) Qgis.AltitudeClamping ¶
Returns method that determines altitude (whether to clamp to feature to terrain)
- Return type:
- clone(self) QgsAbstract3DSymbol ¶
- Return type:
- compatibleGeometryTypes(self) List[Qgis.GeometryType] ¶
- Return type:
List[Qgis.GeometryType]
- 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:
- cullingMode(self) Qgs3DTypes.CullingMode ¶
Returns front/back culling mode
- Return type:
- 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)
Deprecated since version QGIS: 3.36. Use
offset()
instead.- 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
- materialSettings(self) QgsAbstractMaterialSettings ¶
Returns material settings used for shading of the symbol
- Return type:
- offset(self) float ¶
Returns vertical offset of the symbol (in map units)
New in version 3.36.
- Return type:
float
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement) –
context (QgsReadWriteContext) –
- 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)
Deprecated since version QGIS: 3.36. Use
setOffset()
instead.- 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) –
- setMaterialSettings(self, materialSettings: QgsAbstractMaterialSettings)¶
Sets the
material
settings used for shading of the symbol.Ownership of
material
is transferred to the symbol.- Parameters:
materialSettings (QgsAbstractMaterialSettings) –
- setOffset(self, offset: float)¶
Sets vertical offset of the symbol (in map units)
New in version 3.36.
- Parameters:
offset (float) –
- 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:
elem (QDomElement) –
context (QgsReadWriteContext) –