1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-26 10:19:45 +03:00

Revert "Fix for crash when selected shape without surface"

This reverts commit 0f587dacc8f0519cb14a8e2a0e3f71b3b42a8df6.
This commit is contained in:
dbv 2016-10-18 09:57:18 +03:00 committed by aba
parent 2a1a7f5f5d
commit a5b83dcd65
2 changed files with 9 additions and 19 deletions

View File

@ -72,19 +72,18 @@ void BRepAdaptor_Surface::Initialize(const TopoDS_Face& F,
{
myFace = F;
TopLoc_Location L;
const Handle (Geom_Surface)& aSurface = BRep_Tool::Surface (F, L);
if (aSurface.IsNull ())
const Handle(Geom_Surface)& aSurface = BRep_Tool::Surface(F, L);
if (aSurface.IsNull())
return;
if (Restriction)
{
Standard_Real umin, umax, vmin, vmax;
BRepTools::UVBounds (F, umin, umax, vmin, vmax);
mySurf.Load (aSurface, umin, umax, vmin, vmax);
if (Restriction) {
Standard_Real umin,umax,vmin,vmax;
BRepTools::UVBounds(F,umin,umax,vmin,vmax);
mySurf.Load(aSurface,umin,umax,vmin,vmax);
}
else
mySurf.Load (aSurface);
myTrsf = L.Transformation ();
else
mySurf.Load(aSurface);
myTrsf = L.Transformation();
}
@ -426,10 +425,6 @@ Handle(Adaptor3d_HCurve) BRepAdaptor_Surface::BasisCurve() const
Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::BasisSurface() const
{
if(mySurf.Surface().IsNull())
{
return Handle(Adaptor3d_HSurface)();
}
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface();
HS->ChangeSurface().Load
(Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));

View File

@ -803,11 +803,6 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
myDone = Standard_False;
myF.SetPoint(P);
if (myS->BasisSurface ().IsNull ())
{
return;
}
if(myAlgo == Extrema_ExtAlgo_Grad)
{
BuildGrid(P);