mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0025202: Incorrect value of IsClosed flag in shapes produced by some algorithms
Method BRep_Tool::IsClosed() extended to analyze closure of wires in addition to shells and solids. External and Internal edges and vertices are ignored in this check. Analysis of compounds is disabled. Update of flag Closed according to actual state is added in most places where new shells are constructed. Draw-command and test case for issue CR25202
This commit is contained in:
@@ -371,9 +371,14 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape,
|
||||
B.Add (S,newsh);
|
||||
}
|
||||
}
|
||||
|
||||
if ( (modif < 0 && buildmode < 2) || (modif == 0 && buildmode < 1) )
|
||||
return C;
|
||||
else return S;
|
||||
else
|
||||
{
|
||||
S.Closed (BRep_Tool::IsClosed (S));
|
||||
return S;
|
||||
}
|
||||
}
|
||||
|
||||
if (st == TopAbs_SHELL) {
|
||||
@@ -406,7 +411,11 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape,
|
||||
}
|
||||
if ( (modif < 0 && buildmode < 2) || (modif == 0 && buildmode < 1) )
|
||||
return C;
|
||||
else return S;
|
||||
else
|
||||
{
|
||||
S.Closed (BRep_Tool::IsClosed (S));
|
||||
return S;
|
||||
}
|
||||
}
|
||||
cout<<"BRepTools_ReShape::Apply NOT YET IMPLEMENTED"<<endl;
|
||||
return shape;
|
||||
@@ -543,8 +552,10 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape,
|
||||
}
|
||||
|
||||
result.Orientation(orien);
|
||||
result.Closed (BRep_Tool::IsClosed (result));
|
||||
myStatus = locStatus;
|
||||
Replace ( shape, result );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user