#include <BRepTools_WireExplorer.hxx>
#include <BRepTools.hxx>
-
+#include <Standard_NullObject.hxx>
//=======================================================================
}
else {
curv1 = BRep_Tool::Curve(Edge1, loc, first1, last1);
+ if (curv1.IsNull())
+ Standard_NullObject::Raise("Null 3D curve in edge");
curv1 =
Handle(Geom_Curve)::DownCast(curv1->Transformed(loc.Transformation()));
ff = first1;
}
else {
curv = BRep_Tool::Curve(Edge2, loc, first2, last2);
+ if (curv.IsNull())
+ Standard_NullObject::Raise("Null 3D curve in edge");
curv =
Handle(Geom_Curve)::DownCast(curv->Transformed(loc.Transformation()));
ff = first2;
}
else {
C1 = BRep_Tool::Curve(Edge1, loc, a1, b1);
+ if (C1.IsNull())
+ Standard_NullObject::Raise("Null 3D curve in edge");
C1 = Handle(Geom_Curve)::DownCast(C1->Transformed(loc.Transformation()));
aa = a1;
bb = b1;
}
else {
C2 = BRep_Tool::Curve(Edge2, loc, a1, b1);
+ if (C2.IsNull())
+ Standard_NullObject::Raise("Null 3D curve in edge");
C2 = Handle(Geom_Curve)::DownCast(C2->Transformed(loc.Transformation()));
if (Edge2.Orientation() == TopAbs_REVERSED) {
C2->Reverse();
}
else {
C1 = BRep_Tool::Curve(Edge1,L1,f1,l1);
+ if (C1.IsNull())
+ Standard_NullObject::Raise("Null 3D curve in edge");
}
if (degen2) {
Extremities(1) = BRep_Tool::Pnt(V2l);
}
else {
C2 = BRep_Tool::Curve(Edge2,L2,f2,l2);
+ if (C2.IsNull())
+ Standard_NullObject::Raise("Null 3D curve in edge");
}
// compute the location