mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0028589: Data Exchange - Writing face with NaturalRestriction flag to IGES
Add additional check for infinite surfaces Correction of test case for issue CR28589
This commit is contained in:
parent
bbdf3b5c66
commit
521efa926d
@ -26,6 +26,7 @@
|
|||||||
#include <Geom2d_Curve.hxx>
|
#include <Geom2d_Curve.hxx>
|
||||||
#include <Geom_ConicalSurface.hxx>
|
#include <Geom_ConicalSurface.hxx>
|
||||||
#include <Geom_CylindricalSurface.hxx>
|
#include <Geom_CylindricalSurface.hxx>
|
||||||
|
#include <Geom_Plane.hxx>
|
||||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||||
#include <Geom_SphericalSurface.hxx>
|
#include <Geom_SphericalSurface.hxx>
|
||||||
#include <Geom_Surface.hxx>
|
#include <Geom_Surface.hxx>
|
||||||
@ -313,10 +314,16 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// protection against faces on infinite surfaces with mistaken natural restriction flag
|
||||||
|
Standard_Boolean isWholeSurface = BRep_Tool::NaturalRestriction(start);
|
||||||
|
if ((Surf->IsKind(STANDARD_TYPE(Geom_Plane)) ||
|
||||||
|
Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
|
||||||
|
Surf->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) && !IOuter.IsNull())
|
||||||
|
isWholeSurface = Standard_False;
|
||||||
// returns the TrimmedSurface
|
// returns the TrimmedSurface
|
||||||
// --------------------------
|
// --------------------------
|
||||||
Handle(IGESGeom_TrimmedSurface) TrimmedSurf = new IGESGeom_TrimmedSurface;
|
Handle(IGESGeom_TrimmedSurface) TrimmedSurf = new IGESGeom_TrimmedSurface;
|
||||||
if (BRep_Tool::NaturalRestriction(start)) {
|
if (isWholeSurface) {
|
||||||
//if face bounds and surface bounds are same, outer wire is unnecessary
|
//if face bounds and surface bounds are same, outer wire is unnecessary
|
||||||
TrimmedSurf-> Init (ISurf, Standard_False, NULL, Tab);
|
TrimmedSurf-> Init (ISurf, Standard_False, NULL, Tab);
|
||||||
}
|
}
|
||||||
|
8
tests/bugs/iges/bug28589
Normal file
8
tests/bugs/iges/bug28589
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#######################################################################
|
||||||
|
# Data Exchange - Writing face with NaturalRestriction flag to IGES
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug28589.brep] face
|
||||||
|
brepiges face ${imagedir}/${casename}.igs
|
||||||
|
igesbrep ${imagedir}/${casename}.igs result *
|
||||||
|
checknbshapes result -shape 10
|
Loading…
x
Reference in New Issue
Block a user