Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Non-manifold geometry triangulation #1028

Open
kersh1337228 opened this issue Sep 13, 2024 · 0 comments
Open

[Bug]: Non-manifold geometry triangulation #1028

kersh1337228 opened this issue Sep 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kersh1337228
Copy link

What happened?

Short description:

Non-manifold meshes are returned by GetGeometry() function althought ones must be manifold.
Non-manifold here means mesh has more than 2 triangles per edge (4 in model attached).

Detailed description:

Calculating volumes of triangulated meshes is quite straightforward when next conditions are satisfied:

  • manifold;
  • closed;
  • consistently oriented indices (no normals flipped).

Then volume can be easily calculated using signed volumes method.

Calculating volume using this approach succeeds when meshes given are manifold: in this case the result using manual calculation and BIMVision matches exactly. However there are meshes in model given which appear to be non-manifold when loaded using GetGeometry() function and manifold while loaded by BIMVision (BIMVision calculates volume successfully while manually inspecting mesh loaded using GetGeometry() shows it is non manifold).

Here is an example for model attached that you can easily check yourself:

  • use GetGeometry on line with id 557526;
  • check if geometry returned is manifold (whether edges with more than 2 triangles exist);

4 triangles for 1 edge are (<triangle index>: <vertices coordinates>):

431: [
    [3.30261492729187, 10.859160423278809, -1.1873899698257446],
    [3.658644914627075, 10.574810028076172, -1.1674100160598755],
    [8.253544807434082, 6.904950141906738, -0.7966499924659729]
],
430: [
    [3.658644914627075, 10.574810028076172, -1.1674100160598755],
    [1.7518450021743774, 12.097729682922363, -1.1707700490951538],
    [3.30261492729187, 10.859160423278809, -1.1873899698257446]
],
403: [
    [3.30261492729187, 10.859160423278809, -1.1873899698257446],
    [3.658644914627075, 10.574810028076172, -1.1674100160598755],
    [3.403404951095581, 10.222060203552246, -1.1777900457382202]
],
432: [
    [4.005034923553467, 10.298150062561035, -1.165719985961914],
    [3.658644914627075, 10.574810028076172, -1.1674100160598755],
    [3.30261492729187, 10.859160423278809, -1.1873899698257446]
]

Common edge here is obviously:

[
    [3.30261492729187, 10.859160423278809, -1.1873899698257446],
    [3.658644914627075, 10.574810028076172, -1.1674100160598755]
]

Version

0.0.57

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

Problematic model

Screenshot of geometry mentioned in example (left - manual calculation, right - BIMVision):
img

@kersh1337228 kersh1337228 added the bug Something isn't working label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant