rendergather / carve

Automatically exported from code.google.com/p/carve
Other
0 stars 0 forks source link

Duplicated nodes not cleared? #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Dear all,

I run the intersect by the following command:
intersect aa.ply A_MINUS_B bb.ply >cc.ply

The program gave error message:
uncontained hole loop does not share vertices with any face loop!
uncontained hole loop does not share vertices with any face loop!
uncontained hole loop does not share vertices with any face loop!
uncontained hole loop does not share vertices with any face loop!

After checked the output result cc.ply, I found that there are several 
duplicated nodes. Is there any bug?

Thanks,
Tang Laoya

/// aa.ply
ply
format ascii 1.0
element vertex 18
property double x
property double y
property double z
element face 20
property list ushort ushort vertex_indices
end_header
1 -2  -2
1 0   -2
1 2   -2
-2 -2 -2
-2 0  -2
-2 2  -2
1 -2   0
1 0    0
1 2    0
-2 -2  0
-2 0   0
-2 2   0
1 -2   2
1 0    2
1 2    2
-2 -2  2
-2 0   2
-2 2   2
4 0 1 7 6
4 1 2 8 7
4 6 7 13 12
4 7 8 14 13
4 2 5 11 8
4 8 11 17 14
4 4 10 11 5
4 3 9 10 4
4 9 15 16 10
4 10 16 17 11
4 0 6 9 3
4 6 12 15 9
4 0 3 4 1
4 1 4 5 2
4 12 13 16 15
4 13 14 17 16
4 6 7 10 9
4 7 8 11 10
4 7 10 16 13
4 1 4 10 7

/// bb.ply
ply
format ascii 1.0
element vertex 8
property double x
property double y
property double z
element face 6
property list ushort ushort vertex_indices
end_header
2 1 -1
2 1 1
2 -1 1
2 -1 -1
-1 1 -1
-1 1 1
-1 -1 1
-1 -1 -1
4 0 1 2 3
4 4 7 6 5
4 0 4 5 1
4 1 5 6 2
4 3 2 6 7
4 0 3 7 4

Original issue reported on code.google.com by tanglaoy...@gmail.com on 16 Apr 2014 at 8:40

GoogleCodeExporter commented 9 years ago
Still the same ply files, the following code could lead to the mesh 
simplification crash. Do I miss anything? Is there any error in the input ply 
file?

Thanks,
Tang Laoya

/// read aa.ply and bb.ply to poly1 and poly2
...
    carve::csg::CSG csg;
    /// this line is used to enable triangulation after boolean operations
  csg.hooks.registerHook(new carve::csg::CarveTriangulatorWithImprovement, carve::csg::CSG::Hooks::PROCESS_OUTPUT_FACE_BIT);
  carve::mesh::MeshSet<3> *is_poly = csg.compute(&poly1,&poly2,csg.A_MINUS_B);
  carve::mesh::MeshSimplifier simplifier;

/// code crash at here:
  simplifier.simplify(is_poly, 1e-5, 1e-5, M_PI/180.0, 1e-5);
...

Original comment by tanglaoy...@gmail.com on 17 Apr 2014 at 7:56