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

0030052: Data Exchange - STEP import missing surfaces

Changes made for #31233 are reverted.

Correction in the ShapeFix_ComposeShell:
 Modification of the method SplitByLine in order to find all points of the intersection for case when initial curve shifts in the positive or negative direction
 to avoid splitting edge when split point lies in the limits of the tolerance of the vertex.
 to correct shift of the pcurves for case when initial shift is more than 1 in the method ShapeFix_ComposeShell::SplitByLine

In the method ShapeFix_Face::FixMissingSeam added removing small edges having length less than working precision and removing wires having area less than working precision

Modified test cases; added test for related issue: bugs step bug31301
This commit is contained in:
gka
2020-02-26 16:35:58 +03:00
committed by bugmaster
parent 22fa1da36e
commit 6a9f983a16
15 changed files with 190 additions and 225 deletions

View File

@@ -1863,13 +1863,56 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
mySurf = new ShapeAnalysis_Surface ( RTS );
myResult = CompShell.Result();
// if ( myFace.Orientation() == TopAbs_REVERSED ) res.Reverse();
Context()->Replace ( myFace, myResult );
// Remove small wires and / or faces that can be generated by ComposeShell
// (see tests bugs step bug30052_4, de step_3 E6)
Standard_Integer nbFaces = 0;
TopExp_Explorer expF ( myResult, TopAbs_FACE );
for (; expF.More(); expF.Next() )
{
TopoDS_Face aFace = TopoDS::Face(expF.Value());
TopExp_Explorer aExpW(aFace, TopAbs_WIRE);
Standard_Integer nbWires = 0;
for( ;aExpW.More(); aExpW.Next() )
{
ShapeFix_Wire aSfw(TopoDS::Wire(aExpW.Value()), aFace, Precision());
aSfw.SetContext(Context());
if(aSfw.NbEdges())
aSfw.FixSmall (Standard_True, Precision());
if(!aSfw.NbEdges())
{
Context()->Remove(aExpW.Value());
continue;
}
nbWires++;
}
if(!nbWires)
{
Context()->Remove(aFace);
continue;
}
nbFaces++;
}
myResult = Context()->Apply(myResult);
for (TopExp_Explorer exp ( myResult, TopAbs_FACE ); exp.More(); exp.Next() ) {
myFace = TopoDS::Face ( exp.Current() );
myFace = TopoDS::Face ( Context()->Apply(exp.Current() ));
if( myFace.IsNull())
continue;
if(nbFaces > 1)
{
FixSmallAreaWire(Standard_True);
TopoDS_Shape aShape = Context()->Apply(myFace);
if(aShape.IsNull() )
continue;
myFace = TopoDS::Face(aShape);
}
BRepTools::Update(myFace); //:p4
}
myResult = Context()->Apply(myResult);
SendWarning ( Message_Msg ( "FixAdvFace.FixMissingSeam.MSG0" ) );// Missing seam-edge added
return Standard_True;
}