mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0030146: Visualization - exception during attempt to display Edge without geometry
StdPrs_ToolRFace no skips curves with NULL curves. Code has been cleaned up from duplicated checks, redundant casts and dummy Adaptor2d_Curve2dPtr typedef. StdSelect_BRepSelectionTool::GetSensitiveForFace() now catches Standard_NullObject exception to skip invalid Edges.
This commit is contained in:
@@ -168,6 +168,19 @@ Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& theCrv,
|
||||
Load(theCrv, theUFirst, theULast);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Reset
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Geom2dAdaptor_Curve::Reset()
|
||||
{
|
||||
myTypeCurve = GeomAbs_OtherCurve;
|
||||
myCurve.Nullify();
|
||||
myCurveCache.Nullify();
|
||||
myNestedEvaluator.Nullify();
|
||||
myBSplineCurve.Nullify();
|
||||
myFirst = myLast = 0.0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Load
|
||||
|
@@ -68,7 +68,10 @@ public:
|
||||
|
||||
//! ConstructionError is raised if Ufirst>Ulast
|
||||
Standard_EXPORT Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast);
|
||||
|
||||
|
||||
//! Reset currently loaded curve (undone Load()).
|
||||
Standard_EXPORT void Reset();
|
||||
|
||||
void Load (const Handle(Geom2d_Curve)& C);
|
||||
|
||||
//! ConstructionError is raised if Ufirst>Ulast
|
||||
|
Reference in New Issue
Block a user