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
Florian Foinant-Willig
4abf89322e 0033743: Modeling Algorithm - fix crash with BRepFilletAPI_MakeChamfer
Handle a case where a newly created face does not contain a required
edge. Since the null edge was passed in, the algorithm would eventually
crash when trying to access its members.
2024-06-19 21:18:57 +02:00

View File

@@ -1249,12 +1249,22 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine,
TopoDS_Face newface = Fv;
newface.Orientation(TopAbs_FORWARD);
TopExp_Explorer ex;
Standard_Boolean found = 0;
for(ex.Init(newface,TopAbs_EDGE); ex.More(); ex.Next()){
if(ex.Current().IsSame(E)){
newedge = TopoDS::Edge(ex.Current());
found = 1;
break;
}
}
if (!found){
// E not in newface, the state is preserved and False is returned
HS->Initialize(F);
W = CP.ParameterOnArc();
pc = BRep_Tool::CurveOnSurface(E,F,Uf,Ul);
pons = pc->Value(W);
return Standard_False;
}
HC->Initialize(newedge,Fv);
pons = HC->Value(W);
HCref->Initialize(E,F);