1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

Compare commits

...

1 Commits

Author SHA1 Message Date
astromko
e5f2b4bd62 0031041: Modeling Algorithms - Crash in BRepOffsetAPI_MakePipeShell
Since some part of the code was commented, the TheV contains just an initial value and we don't have to execute the code under contions "if(!TheV.IsNull())" because this code expects not initial value in the TheV.
2024-07-08 12:45:30 +01:00

View File

@@ -313,27 +313,11 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
}
if (Bof) throw Standard_ConstructionError("Interval non trouve !!");
//Search of the <Ind1> by vertex <TheV>
if (!TheV.IsNull())
for (Ind1 = 1; Ind1 <= myLaw->NbLaw(); Ind1++)
{
TopoDS_Edge anEdge = myLaw->Edge(Ind1);
TopoDS_Vertex V1, V2;
TopExp::Vertices(anEdge, V1, V2);
if (V1.IsSame(TheV) || V2.IsSame(TheV))
break;
}
////////////////////
// Positioning on the localized edge (or 2 Edges)
Standard_Real Angle;
Place.SetLocation(myLaw->Law(Ind1));
if(TheV.IsNull())
Place.Perform(Precision::Confusion());
else {
Place.Perform(SearchParam(myLaw, Ind1, TheV),
Precision::Confusion());
}
Place.Perform(Precision::Confusion());
myTrsf = Place.Transformation(WithContact, WithCorrection);
myIndex = Ind1;
@@ -342,13 +326,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
if (Ind2) {
Place.SetLocation(myLaw->Law(Ind2));
if (TheV.IsNull())
Place.Perform(Precision::Confusion());
else {
if (Ind1 == Ind2) TheV.Reverse();
Place.Perform(SearchParam(myLaw, Ind2,TheV),
Precision::Confusion());
}
if (Place.Angle() > Angle) {
myTrsf = Place.Transformation(WithContact, WithCorrection);
myIndex = Ind2;