mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +03:00
0026644: ShapeUpgrade_UnifySameDomain - strange behavior
Made modification to get valid shape after operation ShapeUpgrade_UnifySameDomain for non-manifold input shape Test case for issue CR26644
This commit is contained in:
parent
6e66a3fa15
commit
598f4391a8
@ -1072,23 +1072,17 @@ static void putIntWires(TopoDS_Shape& theFace, TopTools_SequenceOfShape& theWire
|
|||||||
|
|
||||||
void ShapeUpgrade_UnifySameDomain::UnifyFaces()
|
void ShapeUpgrade_UnifySameDomain::UnifyFaces()
|
||||||
{
|
{
|
||||||
//Handle(ShapeBuild_ReShape) myContext = new ShapeBuild_ReShape;
|
// creating map of edge faces
|
||||||
TopoDS_Shape aResShape = myContext->Apply(myShape);
|
TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
|
||||||
|
TopExp::MapShapesAndAncestors(myShape, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
|
||||||
// processing each shell
|
// processing each shell
|
||||||
TopExp_Explorer exps;
|
TopExp_Explorer exps;
|
||||||
for (exps.Init(myShape, TopAbs_SHELL); exps.More(); exps.Next()) {
|
for (exps.Init(myShape, TopAbs_SHELL); exps.More(); exps.Next()) {
|
||||||
TopoDS_Shell aShell = TopoDS::Shell(exps.Current());
|
TopoDS_Shell aShell = TopoDS::Shell(exps.Current());
|
||||||
|
|
||||||
// creating map of edge faces
|
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
|
|
||||||
TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
|
|
||||||
|
|
||||||
// map of processed shapes
|
// map of processed shapes
|
||||||
TopTools_MapOfShape aProcessed;
|
TopTools_MapOfShape aProcessed;
|
||||||
|
|
||||||
//Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
|
|
||||||
|
|
||||||
Standard_Integer NbModif = 0;
|
Standard_Integer NbModif = 0;
|
||||||
Standard_Boolean hasFailed = Standard_False;
|
Standard_Boolean hasFailed = Standard_False;
|
||||||
Standard_Real tol = Precision::Confusion();
|
Standard_Real tol = Precision::Confusion();
|
||||||
|
46
tests/bugs/heal/bug26644
Normal file
46
tests/bugs/heal/bug26644
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC26644"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# ShapeUpgrade_UnifySameDomain - strange behavior
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug26644_input.brep] a
|
||||||
|
|
||||||
|
# 1
|
||||||
|
checkarea a 158.466 1e-1 0.01
|
||||||
|
|
||||||
|
nbshapes a -t
|
||||||
|
|
||||||
|
vinit
|
||||||
|
vsetdispmode 1
|
||||||
|
vclear
|
||||||
|
vdisplay a
|
||||||
|
vfit
|
||||||
|
vdump ${imagedir}/${casename}_1.png
|
||||||
|
|
||||||
|
# 2
|
||||||
|
unifysamedom r a +f +e -b
|
||||||
|
|
||||||
|
checkshape r f
|
||||||
|
|
||||||
|
checkarea a 158.466 1e-1 0.01
|
||||||
|
|
||||||
|
set nbshapes_expected "
|
||||||
|
Number of shapes in shape
|
||||||
|
VERTEX : 32
|
||||||
|
EDGE : 50
|
||||||
|
WIRE : 23
|
||||||
|
FACE : 23
|
||||||
|
SHELL : 3
|
||||||
|
SOLID : 3
|
||||||
|
COMPSOLID : 0
|
||||||
|
COMPOUND : 1
|
||||||
|
SHAPE : 135
|
||||||
|
"
|
||||||
|
checknbshapes r -ref ${nbshapes_expected} -t -m "Shape Upgrade"
|
||||||
|
|
||||||
|
vclear
|
||||||
|
vdisplay r
|
||||||
|
vdump ${imagedir}/${casename}_2.png
|
Loading…
x
Reference in New Issue
Block a user