1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0027894: Crash when calling ShapeUpgrade_UnifySameDomain

- Avoid getting pcurve of edge on not connected face.
- Avoid building wire of empty set of edges.

Small correction of test case for issue CR27894
This commit is contained in:
msv 2017-02-09 15:44:06 +03:00 committed by apn
parent d76b39abf1
commit d3dadd2392
2 changed files with 18 additions and 1 deletions

View File

@ -1374,7 +1374,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
if (IsSameDomain(aFace,anCheckedFace, myLinTol, myAngTol)) {
// hotfix for 27271: prevent merging along periodic direction.
if (IsLikeSeam(edge, aFace, aBaseSurface))
if (IsLikeSeam(edge, anCheckedFace, aBaseSurface))
continue;
// replacing pcurves
@ -1574,6 +1574,8 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
}
sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY());
}
if (sawo.NbEdges() == 0)
continue;
sawo.Perform();
// constructind one degenerative edge

15
tests/bugs/heal/bug27894 Normal file
View File

@ -0,0 +1,15 @@
puts "============"
puts "OCC27894"
puts "============"
puts ""
###############################
## Crash when calling ShapeUpgrade_UnifySameDomain
###############################
stepread [locate_data_file bug27894_usd_raises_Standard_NullObject.stp] a *
renamevar a_1 a
unifysamedom result a
checknbshapes result -m UnifySameDomain -face 18 -edge 45
checkview -display result -2d -path ${imagedir}/${test_image}.png