mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -96,6 +96,7 @@
|
||||
|
||||
#include <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <BRepBuilderAPI_FindPlane.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
@@ -391,18 +392,24 @@ void BRepOffsetAPI_ThruSections::Build()
|
||||
myWires = WorkingSections;
|
||||
}
|
||||
|
||||
// Calculate the resulting shape
|
||||
if (myWires.Length() == 2 || myIsRuled) {
|
||||
// create a ruled shell
|
||||
CreateRuled();
|
||||
try {
|
||||
// Calculate the resulting shape
|
||||
if (myWires.Length() == 2 || myIsRuled) {
|
||||
// create a ruled shell
|
||||
CreateRuled();
|
||||
}
|
||||
else {
|
||||
// create a smoothed shell
|
||||
CreateSmoothed();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// create a smoothed shell
|
||||
CreateSmoothed();
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
NotDone();
|
||||
return;
|
||||
}
|
||||
// Encode the Regularities
|
||||
BRepLib::EncodeRegularity(myShape);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -882,6 +889,8 @@ static Handle(Geom_BSplineCurve) EdgeToBSpline (const TopoDS_Edge& theEdge)
|
||||
TopLoc_Location aLoc;
|
||||
Standard_Real aFirst, aLast;
|
||||
Handle(Geom_Curve) aCurve = BRep_Tool::Curve (theEdge, aLoc, aFirst, aLast);
|
||||
if (aCurve.IsNull())
|
||||
Standard_NullObject::Raise("Null 3D curve in edge");
|
||||
|
||||
// convert its part used by edge to bspline; note that if edge curve is bspline,
|
||||
// conversion made via trimmed curve is still needed -- it will copy it, segment
|
||||
|
Reference in New Issue
Block a user