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 =
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;
+ }
+ }
+ }
}
}
--- /dev/null
+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
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