def SetDefaultFrameAxis3DStyle(layer): """ Frame Axis 3D Symbol """ material = QgsPhongMaterialSettings() material.setDiffuse(QColor(0, 0, 255)) material.setAmbient(QColor(0, 0, 255)) symbol = QgsLine3DSymbol() symbol.setWidth(5) symbol.setAltitudeClamping(2) symbol.setMaterial(material) renderer = QgsVectorLayer3DRenderer() renderer.setLayer(layer) renderer.setSymbol(symbol) layer.setRenderer3D(renderer)
def SetDefaultBeams3DStyle(layer): ''' Beams 3D Symbol ''' material = QgsPhongMaterialSettings() material.setDiffuse(QColor(255, 255, 255)) material.setAmbient(QColor(255, 255, 255)) symbol = QgsLine3DSymbol() symbol.setWidth(5) symbol.setAltitudeClamping(2) symbol.setMaterial(material) renderer = QgsVectorLayer3DRenderer() renderer.setLayer(layer) renderer.setSymbol(symbol) layer.setRenderer3D(renderer) return