mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0030149: BRepMesh_Delaun: free triangle is left in the mesh after cleanup of auxiliary items
Remove free triangles connected to triangles over nodes of super triangle. Modification of improved test case.
This commit is contained in:
parent
bf5f0ca20a
commit
060fc60338
@ -682,7 +682,7 @@ void BRepMesh_Delaun::cleanupMesh()
|
||||
if ( anEdges[aCurEdgeIdx] != aFreeEdgeId )
|
||||
continue;
|
||||
|
||||
for ( Standard_Integer anOtherEdgeIt = 1; anOtherEdgeIt <= 2; ++anOtherEdgeIt )
|
||||
for ( Standard_Integer anOtherEdgeIt = 1; anOtherEdgeIt <= 2 && isCanNotBeRemoved; ++anOtherEdgeIt )
|
||||
{
|
||||
Standard_Integer anOtherEdgeId = ( aCurEdgeIdx + anOtherEdgeIt ) % 3;
|
||||
const BRepMesh_PairOfIndex& anOtherEdgePair =
|
||||
@ -691,7 +691,27 @@ void BRepMesh_Delaun::cleanupMesh()
|
||||
if ( anOtherEdgePair.Extent() < 2 )
|
||||
{
|
||||
isCanNotBeRemoved = Standard_False;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int aTriIdx = 1; aTriIdx <= anOtherEdgePair.Extent () && isCanNotBeRemoved; ++aTriIdx)
|
||||
{
|
||||
if (anOtherEdgePair.Index (aTriIdx) == aTriId)
|
||||
continue;
|
||||
|
||||
Standard_Integer v[3];
|
||||
const BRepMesh_Triangle& aCurTriangle = GetTriangle (anOtherEdgePair.Index (aTriIdx));
|
||||
myMeshData->ElementNodes (aCurTriangle, v);
|
||||
for (int aNodeIdx = 0; aNodeIdx < 3 && isCanNotBeRemoved; ++aNodeIdx)
|
||||
{
|
||||
if (v[aNodeIdx] == mySupVert[0] ||
|
||||
v[aNodeIdx] == mySupVert[1] ||
|
||||
v[aNodeIdx] == mySupVert[2])
|
||||
{
|
||||
isCanNotBeRemoved = Standard_False;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
26
tests/bugs/mesh/bug30149
Normal file
26
tests/bugs/mesh/bug30149
Normal file
@ -0,0 +1,26 @@
|
||||
puts "======="
|
||||
puts "0030149: BRepMesh_Delaun: free triangle is left in the mesh after cleanup of auxiliary items"
|
||||
puts "======="
|
||||
puts ""
|
||||
|
||||
pload XDE
|
||||
|
||||
stepread [locate_data_file bug30149_comb_bug.step] a *
|
||||
renamevar a_1 result
|
||||
|
||||
tclean result
|
||||
incmesh result 1
|
||||
|
||||
set info_bad [tricheck result]
|
||||
if { [regexp "Not connected mesh inside face" $info_bad] } {
|
||||
puts "Error : Mesh contains free triangle"
|
||||
}
|
||||
|
||||
checktrinfo result -tri 32 -nod 54
|
||||
|
||||
vinit
|
||||
vtop
|
||||
vsetdispmode 1
|
||||
vdisplay result
|
||||
vfit
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
@ -1,6 +1,6 @@
|
||||
set TheFileName shading_wrongshape_007.brep
|
||||
if { [string compare $command "shading"] == 0 } {
|
||||
set bug_freelinks "OCC22687"
|
||||
## set bug_freelinks "OCC22687"
|
||||
set bug_freenodes "OCC22687"
|
||||
set nbfreenodes(All) 6
|
||||
set nbfree(All) 3
|
||||
|
Loading…
x
Reference in New Issue
Block a user