Hi,

We are developing a simple 3D viewer to display the DEM and overlay a trajectory (vector layer) as a simple 3d lines. It is working fine and vector file is draped on to the terrain. We want to display the vector file as simple 3d lines.

We could see the same in QGIS application by setting the Vector Layer properties 3D View => Render as simple 3D lines.

Trying to set same programmatically, but getting the following error.

   " ..\..\..\src\3d\qgsvectorlayerchunkloader_p.cpp(57) :
(QgsVectorLayerChunkLoader::QgsVectorLayerChunkLoader) [15960ms] Unknown
         3D symbol type for vector layer: line  "

The following code snippet used:

if (pcLyr != nullptr) {

std::unique_ptr< QgsLine3DSymbol > sym = qgis::make_unique< QgsLine3DSymbol >();
  std::unique_ptr< QgsPhongMaterialSettings > mCurrentSettings;

  mCurrentSettings = qgis::make_unique< QgsPhongMaterialSettings >();

  sym->setWidth (1);
  sym->setHeight (0);
  sym->setExtrusionHeight(0);
  sym->setAltitudeClamping(Qgs3DTypes::AltClampAbsolute);
  sym->setAltitudeBinding(Qgs3DTypes::AltBindVertex);
  sym->setRenderAsSimpleLines(true);
  sym->setMaterial(mCurrentSettings->clone());

QgsVectorLayer3DRenderer *pcR = new QgsVectorLayer3DRenderer (sym->clone());
  pcLyr->setRenderer3D(pcR);
}


Can any one help us in this regard?

Regards
Raghunath
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to