User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2020-04-07 18:13:07

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 278

2dm saving bug (comp. QGIS)

Hi,

I think I've found a bug in basemesh: in a 2dm file I generated with basemesh, the nodes (lines starting with ND) are not ordered (#1 is not the first). Basement works like a charm, but qgis does not import the 2dm file as mesh layer.

I changed manually the order of the ND lines ordering them from 1 to the last and everything works!

Not sure if you want this to be fixed by QGIS or if it's easier to fix it with basemesh, but I'm sure you'd like to know it!

Cheers

Matteo

Offline

#2 2020-04-08 08:40:33

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: 2dm saving bug (comp. QGIS)

Hi Matteo

This should definitely be fixed in BASEmesh. Which version are you using?

Best
Matthias

Offline

#3 2020-04-09 14:35:49

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 278

Re: 2dm saving bug (comp. QGIS)

Hi Matthias,

I am using the 1.4.5

Cheers

Offline

#4 2020-04-16 08:01:23

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: 2dm saving bug (comp. QGIS)

Hi Matteo

This issue should be solved now.

Best regards
Mathias

Offline

#5 2020-04-17 09:32:15

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 278

Re: 2dm saving bug (comp. QGIS)

Great!
Thanks!
Matteo

Offline

#6 2020-04-20 17:30:00

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 278

Re: 2dm saving bug (comp. QGIS)

Hi Matthias,

I believe you tried to sort the mesh elements ID with .sort(), am I right?

Because I get the error: AttributeError: 'dict_keys' object has no attribute 'sort'.

I had a look at the scripts (mesh.py and meshConversion.py, which I have under AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\BASEmesh\tools): with dictionaries you could use sorted(blablabla) instead of .sort() and the problem is solved!

Cheers,
Matteo

Last edited by Matteo Facchini (2020-04-20 17:30:31)

Offline

#7 2020-05-20 12:28:27

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: 2dm saving bug (comp. QGIS)

Sorry about that! Should be solved now! smile Thanks for the hint!

Offline

Board footer

Powered by FluxBB