mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028715: Invalid shape produced by reading of attached STEP file. Regression from OCCT-6.9.1 to OCCT-7.0.0.
Corrections: to use fixed shape as result in the non-manifold mode was made. Regression was due to using modified initial shape as result in the previous version OCCT. At present initial shape is not modified during ShapeProcessing. Therefore modification to use fixed result was made. Additionally using of nonManifold flag is added to ShapeProcessing.
This commit is contained in:
@@ -243,6 +243,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
|
||||
aPSentry.Next();
|
||||
|
||||
myResult = Context()->Apply(S);
|
||||
|
||||
if ( NeedFix(myFixSameParameterMode) )
|
||||
{
|
||||
SameParameter(myResult, Standard_False, theProgress);
|
||||
@@ -269,6 +270,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
myResult = Context()->Apply(myResult);
|
||||
|
||||
if ( !fft.IsNull() )
|
||||
|
@@ -70,6 +70,7 @@ ShapeFix_Shell::ShapeFix_Shell()
|
||||
myFixOrientationMode = -1;
|
||||
myFixFace = new ShapeFix_Face;
|
||||
myNbShells =0;
|
||||
myNonManifold = Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -84,6 +85,7 @@ ShapeFix_Shell::ShapeFix_Shell(const TopoDS_Shell& shape)
|
||||
myFixOrientationMode = -1;
|
||||
myFixFace = new ShapeFix_Face;
|
||||
Init(shape);
|
||||
myNonManifold = Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -138,9 +140,10 @@ Standard_Boolean ShapeFix_Shell::Perform(const Handle(Message_ProgressIndicator)
|
||||
if ( !aPSentry.More() )
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
TopoDS_Shape newsh = Context()->Apply(myShell);
|
||||
if ( NeedFix ( myFixOrientationMode) )
|
||||
FixFaceOrientation(TopoDS::Shell(newsh));
|
||||
FixFaceOrientation(TopoDS::Shell(newsh), Standard_True, myNonManifold);
|
||||
|
||||
TopoDS_Shape aNewsh = Context()->Apply (newsh);
|
||||
ShapeAnalysis_Shell aSas;
|
||||
@@ -853,7 +856,10 @@ static void CreateClosedShell(TopTools_SequenceOfShape& OpenShells,
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ShapeFix_Shell::FixFaceOrientation(const TopoDS_Shell& shell,const Standard_Boolean isAccountMultiConex,const Standard_Boolean NonManifold)
|
||||
Standard_Boolean ShapeFix_Shell::FixFaceOrientation(
|
||||
const TopoDS_Shell& shell,
|
||||
const Standard_Boolean isAccountMultiConex,
|
||||
const Standard_Boolean NonManifold)
|
||||
{
|
||||
//myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
|
||||
Standard_Boolean done = Standard_False;
|
||||
@@ -1101,6 +1107,7 @@ void ShapeFix_Shell::SetMaxTolerance (const Standard_Real maxtol)
|
||||
ShapeFix_Root::SetMaxTolerance ( maxtol );
|
||||
myFixFace->SetMaxTolerance ( maxtol );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NbShells
|
||||
//purpose :
|
||||
@@ -1110,3 +1117,13 @@ Standard_Integer ShapeFix_Shell::NbShells() const
|
||||
{
|
||||
return myNbShells;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetNonManifoldFlag
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void ShapeFix_Shell::SetNonManifoldFlag(const Standard_Boolean isNonManifold)
|
||||
{
|
||||
myNonManifold = isNonManifold;
|
||||
}
|
||||
|
@@ -73,7 +73,10 @@ public:
|
||||
//! If this mode is equal to Standard_True one non-manifold will be created from shell
|
||||
//! contains multishared edges. Else if this mode is equal to Standard_False only
|
||||
//! manifold shells will be created. By default - Standard_False.
|
||||
Standard_EXPORT Standard_Boolean FixFaceOrientation (const TopoDS_Shell& shell, const Standard_Boolean isAccountMultiConex = Standard_True, const Standard_Boolean NonManifold = Standard_False);
|
||||
Standard_EXPORT Standard_Boolean FixFaceOrientation (
|
||||
const TopoDS_Shell& shell,
|
||||
const Standard_Boolean isAccountMultiConex = Standard_True,
|
||||
const Standard_Boolean NonManifold = Standard_False);
|
||||
|
||||
//! Returns fixed shell (or subset of oriented faces).
|
||||
Standard_EXPORT TopoDS_Shell Shell();
|
||||
@@ -114,7 +117,8 @@ public:
|
||||
//! FixFaceOrientation, by default True.
|
||||
Standard_Integer& FixOrientationMode();
|
||||
|
||||
|
||||
//! Sets NonManifold flag
|
||||
Standard_EXPORT virtual void SetNonManifoldFlag(const Standard_Boolean isNonManifold);
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(ShapeFix_Shell,ShapeFix_Root)
|
||||
@@ -129,7 +133,7 @@ protected:
|
||||
Standard_Integer myFixFaceMode;
|
||||
Standard_Integer myFixOrientationMode;
|
||||
Standard_Integer myNbShells;
|
||||
|
||||
Standard_Boolean myNonManifold;
|
||||
|
||||
private:
|
||||
|
||||
|
Reference in New Issue
Block a user