mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 18:20:35 +05:00
0023331: EDF 13477 - Problem with Fuse. Avoid application crush.
This commit is contained in:
parent
8422ddce7f
commit
08869a9687
@ -644,7 +644,7 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
TopoDS_Wire aWireFixed = sfw->Wire();
|
TopoDS_Wire aWireFixed = sfw->Wire();
|
||||||
aContext->Replace(aWire,aWireFixed);
|
aContext->Replace(aWire,aWireFixed);
|
||||||
// add resulting wire
|
// add resulting wire
|
||||||
if(isEdge3d) {
|
if (isEdge3d) {
|
||||||
B.Add(aResult,aWireFixed);
|
B.Add(aResult,aWireFixed);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -655,19 +655,20 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
ShapeAnalysis_WireOrder sawo(Standard_False, 0);
|
ShapeAnalysis_WireOrder sawo(Standard_False, 0);
|
||||||
ShapeAnalysis_Edge sae;
|
ShapeAnalysis_Edge sae;
|
||||||
Standard_Integer aLastEdge = nbEdges;
|
Standard_Integer aLastEdge = nbEdges;
|
||||||
for(Standard_Integer j = 1; j <= nbEdges; j++) {
|
for (Standard_Integer j = 1; j <= nbEdges; j++) {
|
||||||
Standard_Real f,l;
|
Standard_Real f,l;
|
||||||
//smh protection on NULL pcurve
|
//smh protection on NULL pcurve
|
||||||
Handle(Geom2d_Curve) c2d;
|
Handle(Geom2d_Curve) c2d;
|
||||||
if(!sae.PCurve(sbwd->Edge(j),aResult,c2d,f,l)) {
|
if (!sae.PCurve(sbwd->Edge(j),aResult,c2d,f,l)) {
|
||||||
aLastEdge--;
|
aLastEdge--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY());
|
sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY());
|
||||||
}
|
}
|
||||||
|
if (aLastEdge > 0) {
|
||||||
sawo.Perform();
|
sawo.Perform();
|
||||||
|
|
||||||
// constructind one degenerative edge
|
// constructing one degenerative edge
|
||||||
gp_XY aStart, anEnd, tmp;
|
gp_XY aStart, anEnd, tmp;
|
||||||
Standard_Integer nbFirst = sawo.Ordered(1);
|
Standard_Integer nbFirst = sawo.Ordered(1);
|
||||||
TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
|
TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
|
||||||
@ -691,6 +692,7 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
B.Add(aResult,aW);
|
B.Add(aResult,aW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// perform substitution of face
|
// perform substitution of face
|
||||||
aContext->Replace(aContext->Apply(aFace),aResult);
|
aContext->Replace(aContext->Apply(aFace),aResult);
|
||||||
|
Loading…
Reference in New Issue
Block a user