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 2022-07-04 10:57:23

NinoMinicucci
User
Registered: 2022-06-07
Posts: 5

Error in interpolation

Hello everyone, when I try to make the interpolation the following message appears:
FormatError: NodeIDs have holes
Thanks in advance

Offline

#2 2022-07-05 14:58:59

martin_b
User
From: Herzog Ingenieure AG, CH
Registered: 2022-05-06
Posts: 7

Re: Error in interpolation

I am also stuck with the same error message. I believe this happens when the nodes in your quality mesh 2dm aren't numbered nicely, e.g. sometimes a node number is missing, like node number 7 in my example below:

MESH2D
NUM_MATERIALS_PER_ELEM 1
ND        1 2820446.367 1187692.397 0.0
ND        2 2823124.359 1189358.908 0.0
ND        3 2820683.651424662 1187983.899095737 0.0
ND        4 2820245.837641765 1187740.6144312187 0.0
ND        5 2820610.1039499175 1187869.1820767266 0.0
ND        6 2820609.9235256175 1187874.7091020546 0.0
ND        8 2821314.8051662412 1187779.9823836072 0.0
ND        9 2821297.480173442 1187770.2370751575 0.0
ND       10 2820709.435886589 1187890.3518689866 0.0

Actually it should be possible to renumber your mesh with QGIS >= 3.22 (choose "Mesh - reindex faces and vertices" from the Menu bar). But it doesn't seem to change anything to the 2dm file.

/edit: "Mesh - reindex faces and vertices" seems to work now, no idea what I have done before. After doing this the error message won't show up.

Last edited by martin_b (2022-07-05 15:12:53)

Offline

#3 2022-07-06 10:24:21

NinoMinicucci
User
Registered: 2022-06-07
Posts: 5

Re: Error in interpolation

Hi, I believe that this message is relative to how is made the breaklines layer. In facts I would know how much the snap influences the process. To avoid this problem I'm currently using the plugin QCAD.

Offline

#4 2022-07-08 07:47:54

martin_b
User
From: Herzog Ingenieure AG, CH
Registered: 2022-05-06
Posts: 7

Re: Error in interpolation

Nino, can you show me how you use QCAD to avoid the problem?

Offline

#5 2022-07-08 10:06:57

martin_b
User
From: Herzog Ingenieure AG, CH
Registered: 2022-05-06
Posts: 7

Re: Error in interpolation

Unfortunately the QGIS capabilities of mesh editing and renumbering seem to "destroy" the BASEMENT-specific parts of the 2dm, e.g. the z values behind E3T for BASEMENT v3, and also removes the nodestrings. So I am still stuck with the original error "Node IDs have holes".
Maybe the developers can give a hint?

Offline

#6 2022-08-30 14:50:45

Alp-Se.Ri.
User
Registered: 2022-03-23
Posts: 2

Re: Error in interpolation

Hello Martin

I have the same problem, have you found a solution for it in the meantime? Is this effect caused by the breaklines or the BASEMESH algorythm? I am very glad for any hint.

Sebastian

Offline

#7 2022-09-19 10:26:25

martin_b
User
From: Herzog Ingenieure AG, CH
Registered: 2022-05-06
Posts: 7

Re: Error in interpolation

Hi Sebastian, no unfortunately I still get this error which keeps me from working with BASEMENT.
Even the newest BASEMESH version still gets me this "Node IDs have holes" quite a lot.
Strange as this should be a very obvious error which blocks your entire workflow, but the Dev Team and other users do not seem to get this error?

Offline

#8 2022-09-19 10:47:10

martin_b
User
From: Herzog Ingenieure AG, CH
Registered: 2022-05-06
Posts: 7

Re: Error in interpolation

As a follow-up: Nino (Post #3) is right, is has something to do with snapping and the way your breaklines are made. When I got the "Node IDs have holes" error I tried to disable snapping. Consequently I got an error from triangle (Topological error while splitting segment), which often means triangle doesn't like your breaklines. This isn't always obvious, sometimes your breaklines just look fine. In this case try to redraw your breaklines until the error disappears. After that, Interpolation worked for me.

Offline

#9 2022-09-20 11:20:01

leonhard_s
User
Registered: 2021-06-09
Posts: 10

Re: Error in interpolation

Hello everyone,

First, just to confirm: the "Node IDs holes" (and element equivalent) errors are indeed a format issue in the 2DM file.


BASEmesh currently relies on programs adhering to the 2DM format specification and does not perform any silent fixes, primarily to keep the workflow transparent and free of any hidden conversions. However, as 2DM is slowly turning into more of a de facto standard, we are looking into expanding support for technically invalid 2DM files.

However, if such invalid meshes are created by BASEmesh itself, that is a different issue.


The Triangle error "Topological error while splitting segment" indicates that a vertex/node lies on top of a breakline/segment - within Triangle's precision. This causes a degenerate element to be created as part of the triangulation, which causes this error.

As part of the snapping step, BASEmesh will split the given segment at this intersecting point and forward the two non-intersected segments to Triangle. Turning snapping off or lowering the tolerance too much prevents this split, which is why this error does not occur otherwise. But crucially, at the time BASEmesh is done snapping geometries and removing duplicates, no node IDs have been assigned to the vertices, it is just a list of points.
I therefore do not believe this to be related to the node ID issue, although tweaking snapping tolerance may help avoid downstream issues.


There are two more steps in the mesh creation process where IDs could be consumed: Triangle's internal preprocessing and the creation of holes and concavities. However, I ran numerous tests deliberately causing Triangle to merge or eject vertices before or after the triangulation, none of which caused node ID gaps to be created.
If anyone can provide a minimal example of mesh input geometry that produces this error consistently, please do let me know so I may investigate.


Despite not being able to reproduce this issue, I will introduce an extra step to the next BASEmesh release that will fill any node ID gaps as part of the Triangle-to-2DM conversion. This should have negligible impact on performance for valid meshes, but it does add an extra layer of protection against this should there be an edge-case that prevents Triangle from fixing its output ID ranges.


Finally, also coming in the next release of BASEmesh will be a 2DM-specific mesh renumbering utility that will fix node and element ID gaps without changing connectivity or destroying 2DM-specific information. I do not have a hard ETA yet, but I expect this release to be available within the next week or two.

Best,
Leonhard

Offline

#10 2022-09-22 10:55:26

leonhard_s
User
Registered: 2021-06-09
Posts: 10

Re: Error in interpolation

Follow-up specifically regarding Node ID orderings:

Hole markers in Triangle work by first triangulating the entire mesh and subsequently deleting any elements that were within the region that was flagged as a hole. There are circumstances in which this leaves a node in the middle of the carved-out region:

- Adjacent hole regions may leave nodes behind that were part of the boundary between the two holes
- Manually-placed input points (such as elevation grids) may fall within a hole region

In BASEmesh v2.0, these disjoint nodes can cause gaps in the node ID sequence. Upcoming versions will address this issue, for BASEmesh v2.0.11 a workaround may be to set the "j" (jettison) flag in the "Extra arguments" field of the quality meshing tool. This causes Triangle to delete any disjoint nodes along with the last element they were attached to, which avoids this issue.

Best,
Leonhard

Last edited by leonhard_s (2022-09-22 10:55:53)

Offline

Board footer

Powered by FluxBB