question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dataset is non-manifold and cannot be subdivided.

See original GitHub issue

Hi @marcomusy,

I am having the following point clouds (attached files) which I would like to further subdivide.

import os
from glob import glob
import natsort
import vedo as vd


if __name__ == '__main__':

    pcdFiles = natsort.natsorted(glob('**/*.ply', recursive=True))

    for i, pcdFile in enumerate(pcdFiles):
        print(pcdFile)
        s = vd.Mesh(pcdFile).alpha(0.2)
        m = s.subdivide(method=1, N=3)
        # vd.show(m, axes=8)

I tried to use methods 0 or 1 but I am getting the following errors respectively:

For method 0:

airplane_0001.ply
2021-09-27 16:34:47.784 (   0.389s) [        96BBA740]vtkLoopSubdivisionFilte:149   WARN| vtkLoopSubdivisionFilter (0x55b145a98af0): numCellsInLoop < 1: 0
2021-09-27 16:34:47.786 (   0.390s) [        96BBA740]vtkApproximatingSubdivi:112    ERR| vtkLoopSubdivisionFilter (0x55b145a98af0): Subdivision failed.
2021-09-27 16:34:47.786 (   0.390s) [        96BBA740]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x55b145b2a4e0): Algorithm vtkLoopSubdivisionFilter(0x55b145a98af0) returned failure for request: vtkInformation (0x55b1456156a0)
  Debug: Off
  Modified Time: 210649
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0


airplane_0002.ply
2021-09-27 16:34:47.816 (   0.420s) [        96BBA740]vtkLoopSubdivisionFilte:149   WARN| vtkLoopSubdivisionFilter (0x55b1462a5350): numCellsInLoop < 1: 0
2021-09-27 16:34:47.818 (   0.422s) [        96BBA740]vtkApproximatingSubdivi:112    ERR| vtkLoopSubdivisionFilter (0x55b1462a5350): Subdivision failed.
2021-09-27 16:34:47.818 (   0.422s) [        96BBA740]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x55b145615760): Algorithm vtkLoopSubdivisionFilter(0x55b1462a5350) returned failure for request: vtkInformation (0x55b146183e60)
  Debug: Off
  Modified Time: 449068
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0


airplane_0003.ply
2021-09-27 16:34:47.839 (   0.444s) [        96BBA740]vtkLoopSubdivisionFilte:149   WARN| vtkLoopSubdivisionFilter (0x55b1462c1080): numCellsInLoop < 1: 0
2021-09-27 16:34:47.840 (   0.444s) [        96BBA740]vtkApproximatingSubdivi:112    ERR| vtkLoopSubdivisionFilter (0x55b1462c1080): Subdivision failed.
2021-09-27 16:34:47.840 (   0.444s) [        96BBA740]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x55b1462a4b40): Algorithm vtkLoopSubdivisionFilter(0x55b1462c1080) returned failure for request: vtkInformation (0x55b1462be8a0)
  Debug: Off
  Modified Time: 539434
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0


airplane_0004.ply
2021-09-27 16:34:47.862 (   0.466s) [        96BBA740]vtkLoopSubdivisionFilte:149   WARN| vtkLoopSubdivisionFilter (0x55b1462a2630): numCellsInLoop < 1: 0
2021-09-27 16:34:47.863 (   0.467s) [        96BBA740]vtkApproximatingSubdivi:112    ERR| vtkLoopSubdivisionFilter (0x55b1462a2630): Subdivision failed.
2021-09-27 16:34:47.863 (   0.467s) [        96BBA740]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x55b145da4bd0): Algorithm vtkLoopSubdivisionFilter(0x55b1462a2630) returned failure for request: vtkInformation (0x55b1462a47d0)
  Debug: Off
  Modified Time: 748860
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0

For method 1:

airplane_0001.ply
airplane_0002.ply
2021-09-27 16:35:43.543 (   1.378s) [        38451740]vtkLinearSubdivisionFil:68     ERR| vtkLinearSubdivisionFilter (0x55e0a73d7340): Dataset is non-manifold and cannot be subdivided.
2021-09-27 16:35:43.549 (   1.385s) [        38451740]vtkInterpolatingSubdivi:97     ERR| vtkLinearSubdivisionFilter (0x55e0a73d7340): Subdivision failed.
2021-09-27 16:35:43.550 (   1.385s) [        38451740]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x55e0a66ccf40): Algorithm vtkLinearSubdivisionFilter(0x55e0a73d7340) returned failure for request: vtkInformation (0x55e0a73ceb70)
  Debug: Off
  Modified Time: 1690347
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0


airplane_0003.ply
airplane_0004.ply

Any idea what could be the problem and possibly solve it?

Thanks.

pcds.zip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ttsesmcommented, Sep 28, 2021

Thanks Marco,

I’ll check if there is any other lib that might be useful to solve the non-manifold issue, otherwise I will see what I’ll do.

I’ll close this for now.

0reactions
ttsesmcommented, Sep 28, 2021

Just to mention, in case that someone stumbles upon this, that in case that the up-sampling is not mesh dependent someone can use the densify function to up sample points.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clustering fails due to vtkSubdivisionFilter · Issue #5 - GitHub
ERROR:root:Dataset is non-manifold and cannot be subdivided. Edge shared by 4 cells ERROR:root:Subdivision failed.
Read more >
How to fix non-manifold geometry issues on 3D models
A non-manifold geometry is a 3D shape that cannot be unfolded into a 2D surface with all its normals pointing the same direction....
Read more >
Clipping a non-manifold mesh leads to crash with ... - GitLab
I just discovered a crash that stems from trying to clip a non-manifold mesh. I've got two meshes one is linearly subdivided and...
Read more >
What is non-manifold geometry? - Blender Stack Exchange
Non-manifold geometry is essentially geometry which cannot exist in the real world (which is why it's important to have manifold meshes for ...
Read more >
What is a non-manifold mesh and how to fix it - Sinestesia
Edges connected to only one face are called Boundary edges and they are also a non-manifold element.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found