mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-05 11:24:17 +03:00
Fix for crash when selected shape without surface
This commit is contained in:
parent
e6853e7836
commit
2a1a7f5f5d
@ -76,7 +76,8 @@ void BRepAdaptor_Surface::Initialize(const TopoDS_Face& F,
|
||||
if (aSurface.IsNull ())
|
||||
return;
|
||||
|
||||
if (Restriction) {
|
||||
if (Restriction)
|
||||
{
|
||||
Standard_Real umin, umax, vmin, vmax;
|
||||
BRepTools::UVBounds (F, umin, umax, vmin, vmax);
|
||||
mySurf.Load (aSurface, umin, umax, vmin, vmax);
|
||||
@ -425,6 +426,10 @@ 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)));
|
||||
|
@ -803,6 +803,11 @@ 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user