Code Monkey home page Code Monkey logo

Comments (8)

ranahanocka avatar ranahanocka commented on May 22, 2024 2

Hi @liangqianqian123 ,

When encountering "bad" (valence 3) vertices (aka "invalids"), we clean them if possible. The issue is that these "valence 3" vertices cause many edges to be unable to be collapsed. See this illustration, on the left is a valid edge collapse, on the right is a collapse which results in a non-manifold geometry:
image
When we encounter such a vertex we clean it.

from meshcnn.

chengzg avatar chengzg commented on May 22, 2024

@ranahanocka , Thanks for the reply. I also encounter a problem about the invalid edges.
In my case, the __remove_triplete get asserted after getting the invalid_edges.
The invalid_edges = [3534, 3547, 3543].

  def __remove_triplete(mesh, mask, edge_groups, invalid_edges):
        vertex = set(mesh.edges[invalid_edges[0]])
        for edge_key in invalid_edges:
            vertex &= set(mesh.edges[edge_key])
            mask[edge_key] = False
            MeshPool.__remove_group(mesh, edge_groups, edge_key)
        mesh.edges_count -= 3
        vertex = list(vertex)
        assert(len(vertex) == 1)

The assert(len(vertex) ==1) is triggered. I debugged a little bit is that: it seems it is caused by wrong neighbour information. The label information is as below:
edge id: gemm_edge
3534 [3547 3543 3547 3543]
3543 [3547 3534 3547 3534]
3547 [3543 3534 3543 3534]

Have you encounter this problem before? What could be the reason and any recommendation to solve the problem?

Thanks & Regards,
Spencer

from meshcnn.

chengzg avatar chengzg commented on May 22, 2024

@ranahanocka , I found the answer from #7, so it is caused due to a very small connected but isolated component. Do you have any idea that how we can solve it in programming way?

from meshcnn.

ranahanocka avatar ranahanocka commented on May 22, 2024

Hi @chengzg ,

You can remove small connected components using meshlab (via scripting).

from meshcnn.

chengzg avatar chengzg commented on May 22, 2024

Hi @ranahanocka ,

Thanks very much for your reply.

I am thinking of solving the problem in MeshCNN code. For example, in the scenario mentioned above, i could delete the whole triangle or adding another array to reduce its priority to be collapsed. Do you think will it work?

Also you added the assert there, it must be some reason. May i know what problem you have experienced before?

Thanks & Regards,
Spencer

from meshcnn.

ranahanocka avatar ranahanocka commented on May 22, 2024

Hi @chengzg ,

It is certainly possible, but it is more complicated. I believe meshlab is an easier approach. Here is a script which will do it

<!DOCTYPE FilterScript>
<FilterScript>
 <filter name="Remove Isolated pieces (wrt Face Num.)">
  <Param type="RichInt" value="25" name="MinComponentSize"/>
 </filter>
 <filter name="Remove Unreferenced Vertex"/>
</FilterScript>

You need to save that to a file and call it something that ends with .mlx, for example remove_island.mlx. Also, install meshlab and then you can call it from the command line:

meshlabserver -i cube.obj -s remove_island.mlx -o cube_out.obj

where cube.obj is the input file and cube_out.obj is the output file.

from meshcnn.

ranahanocka avatar ranahanocka commented on May 22, 2024

Also you added the assert there, it must be some reason. May i know what problem you have experienced before?

So if the smallest connected component (a pyramid object) cannot have any more edges removed. It is the smallest genus-0 primitive that exists. Basically, removing an edge on this small object will result in non-manifold geometry.

from meshcnn.

chengzg avatar chengzg commented on May 22, 2024

@ranahanocka ,

Again thanks very much for your reply.

Thanks & Regards,
Spencer

from meshcnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.