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

0026568: Modeling Algorithms - Exception when creating pipe

BRepFill_Pipe.cxx:  protection against wrong shape type is added
GeomFill_Sweep.cxx:  protection against using 0-vector to create Direction is added

bug26568: test script is corrected: "TODO ..." is removed
This commit is contained in:
ifv
2020-08-11 17:00:03 +03:00
committed by bugmaster
parent f3269ef5f1
commit ce9aefc8aa
3 changed files with 25 additions and 11 deletions

View File

@@ -760,8 +760,11 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
TopoDS_Face F;
for (ii=InitialLength+1; ii<=myFaces->ColLength(); ii++) {
for (jj=1; jj<=myFaces->RowLength(); jj++) {
F = TopoDS::Face(myFaces->Value(ii, jj));
if (!F.IsNull()) B.Add(result, F);
if (myFaces->Value(ii, jj).ShapeType() == TopAbs_FACE)
{
F = TopoDS::Face(myFaces->Value(ii, jj));
if (!F.IsNull()) B.Add(result, F);
}
}
}

View File

@@ -953,7 +953,12 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
// (2.2.a) Cylindre
// si la line est orthogonale au plan de rotation
SError = error;
gp_Ax3 Axis(CentreOfSurf, Dir.Direction(), DS);
//
gp_Ax3 Axis(CentreOfSurf, Dir.Direction());
if (DS.SquareMagnitude() > gp::Resolution())
{
Axis.SetXDirection(DS);
}
S = new (Geom_CylindricalSurface)
(Axis, L.Distance(CentreOfSurf));
Ok = Standard_True;