[QGIS-Developer] QgsMeshLayer object has no attribute triangularMesh

Jorge Almerio jorgealmerio at yahoo.com.br
Tue Jun 30 09:23:01 PDT 2020


Hi devs,

 

I still can not get the triangular mesh from a Mesh Layer using Qgis version
3.14.0-Pi.

The triangularMesh() attribute is present in the API documentation

https://qgis.org/api/classQgsMeshLayer.html#ae5d4ae367cfbd2abf6920d26701f014
3. 

But I get an Error:

AttributeError: 'QgsMeshLayer' object has no attribute 'triangularMesh'

 

 

Is it possible to return the triangular mesh? I would like to use the
triangular mesh for make an exact profile/cross section from the mesh using
a polyline. The others plugins, like Crayfish and Profile tools does this
profile using a defined interval offset, so it's accuracy depends on this
interval.

 

My code below returns

AttributeError: 'QgsMeshLayer' object has no attribute 'triangularMesh'

:

proj = QgsProject.instance()

mdtLyr = proj.mapLayersByName("RA04_Surface")[0]

mdtLyr.updateTriangularMesh()

triang = mdtLyr.triangularMesh()

 

Best regards,

 

Jorge Almerio

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200630/26629682/attachment.html>


More information about the QGIS-Developer mailing list