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:
@@ -21,6 +21,7 @@
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
@@ -69,8 +70,8 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
|
||||
// if shape replaced, apply modifications to the result recursively
|
||||
Standard_Boolean aConsLoc = ModeConsiderLocation();
|
||||
if ( (aConsLoc && ! newsh.IsPartner (shape)) ||
|
||||
(!aConsLoc &&! newsh.IsSame ( shape )) ) {
|
||||
|
||||
(!aConsLoc &&! newsh.IsSame ( shape )) )
|
||||
{
|
||||
TopoDS_Shape res = Apply ( newsh, until );
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
|
||||
return res;
|
||||
@@ -124,8 +125,10 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
|
||||
sbe.CopyRanges ( TopoDS::Edge ( result ), TopoDS::Edge ( shape ));
|
||||
}
|
||||
result.Orientation(orient);
|
||||
result.Closed (BRep_Tool::IsClosed (result));
|
||||
myStatus = locStatus;
|
||||
Replace ( shape, result );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user