1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025568: SIGSEGV in thrusections with edge without 3D curve

-Set algorithm flag NotDone if there is a non-degenerated edge with absent 3D curve.
-Check IsDone flag in thrusection command.
-Add test case bugs/modalg_5/bug25568.

Small correction of test case for issue CR25568
This commit is contained in:
msv
2014-12-11 16:42:45 +03:00
committed by bugmaster
parent 70d08ce5b2
commit a4bb1420ca
4 changed files with 63 additions and 13 deletions

View File

@@ -61,7 +61,7 @@
#include <BRepTools_WireExplorer.hxx>
#include <BRepTools.hxx>
#include <Standard_NullObject.hxx>
//=======================================================================
@@ -96,6 +96,8 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
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;
@@ -161,6 +163,8 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
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;
@@ -339,6 +343,8 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
}
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;
@@ -362,6 +368,8 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
}
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();
@@ -663,6 +671,8 @@ void BRepFill_Generator::Perform()
}
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);
@@ -671,6 +681,8 @@ void BRepFill_Generator::Perform()
}
else {
C2 = BRep_Tool::Curve(Edge2,L2,f2,l2);
if (C2.IsNull())
Standard_NullObject::Raise("Null 3D curve in edge");
}
// compute the location