Class: QgsPoint3DSymbol

3D symbol that draws point geometries as 3D objects using one of the predefined shapes.

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

Inheritance diagram of qgis._3d.QgsPoint3DSymbol

Base classes

QgsAbstract3DSymbol

Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.

Enums

Shape

alias of Point3DShape

Methods

altitudeClamping

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

billboardHeight

Returns how much the billboard should be elevated upwards

billboardSymbol

Returns a symbol for billboard

materialSettings

Returns material settings used for shading of the symbol

setAltitudeClamping

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

setBillboardSymbol

Set symbol for billboard and the ownership is transferred

setMaterialSettings

Sets the material settings used for shading of the symbol.

setShape

Sets 3D shape for points

setShapeProperties

Sets a key-value dictionary of point shape properties.

setTransform

Sets transform for individual objects represented by the symbol

shape

Returns 3D shape for points

shapeProperties

Returns a key-value dictionary of point shape properties.

shapeProperty

Returns the value for a specific shape property.

transform

Returns transform for individual objects represented by the symbol

Static Methods

create

Creates a new QgsPoint3DSymbol.

shapeFromString

Returns shape enum value from a string

shapeToString

Returns string from a shape enum value

class qgis._3d.QgsPoint3DSymbol[source]

Bases: QgsAbstract3DSymbol

__init__()

Constructor for QgsPoint3DSymbol with default QgsMarkerSymbol as the billboardSymbol

__init__(other: QgsPoint3DSymbol)
Parameters:

other (QgsPoint3DSymbol)

Shape

alias of Point3DShape

altitudeClamping(self) Qgis.AltitudeClamping[source]

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

Return type:

Qgis.AltitudeClamping

billboardHeight(self) float[source]

Returns how much the billboard should be elevated upwards

Return type:

float

billboardSymbol(self) QgsMarkerSymbol | None[source]

Returns a symbol for billboard

Return type:

Optional[QgsMarkerSymbol]

static create() QgsAbstract3DSymbol | None[source]

Creates a new QgsPoint3DSymbol.

Caller takes ownership of the returned symbol.

Return type:

Optional[QgsAbstract3DSymbol]

materialSettings(self) QgsAbstractMaterialSettings | None[source]

Returns material settings used for shading of the symbol

Return type:

Optional[QgsAbstractMaterialSettings]

setAltitudeClamping(self, altClamping: Qgis.AltitudeClamping)[source]

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

Parameters:

altClamping (Qgis.AltitudeClamping)

setBillboardSymbol(self, symbol: QgsMarkerSymbol | None)[source]

Set symbol for billboard and the ownership is transferred

Parameters:

symbol (Optional[QgsMarkerSymbol])

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])

setShape(self, shape: Qgis.Point3DShape)[source]

Sets 3D shape for points

Parameters:

shape (Qgis.Point3DShape)

setShapeProperties(self, properties: Dict[str, Any])[source]

Sets a key-value dictionary of point shape properties.

The available properties depend on the point shape().

Cylinders (Qgis.Point3DShape.Cylinder)

  • radius

  • length

Spheres (Qgis.Point3DShape.Sphere)

  • radius

Cones (Qgis.Point3DShape.Cone)

  • length

  • topRadius

  • bottomRadius

Cubes (Qgis.Point3DShape.Cube)

  • size

Torus (Qgis.Point3DShape.Torus)

  • radius

  • minorRadius

Flat Planes (Qgis.Point3DShape.Plane)

  • size

Extruded Text (Qgis.Point3DShape.ExtrudedText)

  • depth

  • text (string)

Models (Qgis.Point3DShape.Model)

  • model (path to model file)

See also

shapeProperty()

param properties:

type properties:

Dict[str, Any]

setTransform(self, transform: QMatrix4x4)[source]

Sets transform for individual objects represented by the symbol

Parameters:

transform (QMatrix4x4)

shape(self) Qgis.Point3DShape[source]

Returns 3D shape for points

Return type:

Qgis.Point3DShape

static shapeFromString(shape: str | None) Qgis.Point3DShape[source]

Returns shape enum value from a string

Parameters:

shape (Optional[str])

Return type:

Qgis.Point3DShape

shapeProperties(self) Dict[str, Any][source]

Returns a key-value dictionary of point shape properties.

In most cases callers should use shapeProperty() instead, to correctly handle default values when a property has not been explicitly set.

See also

setShapeProperties() for a description of available properties.

See also

shapeProperty()

Return type:

Dict[str, Any]

shapeProperty(self, property: str | None) Any[source]

Returns the value for a specific shape property.

This method accounts for default property values for the symbol’s shape(), used when the property has not been explicitly set.

See also

setShapeProperties() for a description of available properties.

Added in version 3.36.

Parameters:

property (Optional[str])

Return type:

Any

static shapeToString(shape: Qgis.Point3DShape) str[source]

Returns string from a shape enum value

Parameters:

shape (Qgis.Point3DShape)

Return type:

str

transform(self) QMatrix4x4[source]

Returns transform for individual objects represented by the symbol

Return type:

QMatrix4x4