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

0024028: It is impossible to create a face based on Geom_RectangularTrimmedSurface by standard methods

1. Trimmed Surfaces were replaced with bases for *.igs and *.stp file format.
BRepLib_MakeFace method sets the TRIMMED surface of Geom_RectangularTrimmedSurface in created face.

2. Adding test case for this fix
This commit is contained in:
nbv
2013-06-24 10:18:18 +04:00
committed by jgv
parent 166d6cd76a
commit 9d109e39c2
4 changed files with 94 additions and 38 deletions

View File

@@ -70,6 +70,8 @@
#include <TopoDS_Compound.hxx>
#include <TopExp_Explorer.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <StepShape_ConnectedEdgeSet.hxx>
#include <StepShape_EdgeBasedWireframeModel.hxx>
@@ -701,8 +703,24 @@ static TopoDS_Face TranslateBoundedSurf (const Handle(StepGeom_Surface) &surf,
if (!StepToGeom_MakeSurface::Convert(surf,theSurf) || //:i6: protection
!theSurf->IsKind(STANDARD_TYPE(Geom_BoundedSurface))) return res;
//gka 11.01.99 file PRO7755.stp entity #2018 surface #1895: error BRepLib_MakeFace func IsDegenerated
BRepBuilderAPI_MakeFace myMkFace(theSurf, TolDegen);
BRepBuilderAPI_MakeFace myMkFace;
Handle(Geom_RectangularTrimmedSurface) RS =
Handle(Geom_RectangularTrimmedSurface)::DownCast(theSurf);
if (!RS.IsNull())
{
Standard_Real umin, umax, vmin, vmax;
theSurf->Bounds(umin, umax, vmin, vmax);
myMkFace = BRepBuilderAPI_MakeFace(RS->BasisSurface(), umin, umax, vmin, vmax, TolDegen);
}
else
{
myMkFace = BRepBuilderAPI_MakeFace(theSurf, TolDegen);
}
return myMkFace.Face();
}