1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0023182: During STEP translation isn't checked for validity flag IsClosed

Added check for consistency properties of closure and existence of free boundaries in shell (modified ShapeFix_Shell::Perform()
Added new message in SHMessage/SHAPE.us)
This commit is contained in:
ama
2012-06-08 12:37:19 +04:00
parent 0f5cd7d5bb
commit a929ed86fb
2 changed files with 22 additions and 1 deletions

View File

@@ -160,7 +160,8 @@ Faces were incorrectly oriented in the shell, corrected
.FixAdvShell.FixOrientation.MSG5
Faces were incorrectly oriented in the shell, not corrected
!
.FixAdvShell..MSG0
.FixAdvShell.FixClosedFlag.MSG0
Shell has incorrect flag isClosed
!
.FixAdvShell..MSG5
!

View File

@@ -46,6 +46,7 @@
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <ShapeAnalysis_Shell.hxx>
#include <ShapeExtend.hxx>
#include <ShapeBuild_ReShape.hxx>
#include <Message_Msg.hxx>
@@ -148,6 +149,25 @@ Standard_Boolean ShapeFix_Shell::Perform(const Handle(Message_ProgressIndicator)
TopoDS_Shape newsh = Context()->Apply(myShell);
if ( NeedFix ( myFixOrientationMode) )
FixFaceOrientation(TopoDS::Shell(newsh));
TopoDS_Shape aNewsh = Context()->Apply (newsh);
ShapeAnalysis_Shell aSas;
for (TopExp_Explorer aShellExp (aNewsh, TopAbs_SHELL); aShellExp.More(); aShellExp.Next())
{
TopoDS_Shell aCurShell = TopoDS::Shell (aShellExp.Current());
if (aCurShell.Closed())
{
aSas.LoadShells (aCurShell);
aSas.CheckOrientedShells (aCurShell, Standard_True);
if (aSas.HasFreeEdges())
{
aCurShell.Closed (Standard_False);
SendWarning (Message_Msg ("FixAdvShell.FixClosedFlag.MSG0"));//Shell has incorrect flag isClosed
}
aSas.Clear();
}
}
if ( status )
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
if(Status(ShapeExtend_DONE2))