mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024105: ShapeFix algorithm produces not correct result.
Small correction. Adding test cases for issue CR24105
This commit is contained in:
parent
cc9d78dbca
commit
d3c5411b48
@ -443,7 +443,7 @@ Standard_Boolean ShapeFix_Face::Perform()
|
|||||||
}
|
}
|
||||||
if ( theAdvFixWire->Perform() ) {
|
if ( theAdvFixWire->Perform() ) {
|
||||||
//fixed = Standard_True;
|
//fixed = Standard_True;
|
||||||
isfixReorder = ((theAdvFixWire->StatusReorder(ShapeExtend_DONE) && !theAdvFixWire->StatusReorder(ShapeExtend_DONE5)) || isfixReorder);
|
isfixReorder = (theAdvFixWire->StatusReorder(ShapeExtend_DONE) || isfixReorder);
|
||||||
fixed = (theAdvFixWire->StatusSmall(ShapeExtend_DONE) ||
|
fixed = (theAdvFixWire->StatusSmall(ShapeExtend_DONE) ||
|
||||||
theAdvFixWire->StatusConnected(ShapeExtend_DONE) ||
|
theAdvFixWire->StatusConnected(ShapeExtend_DONE) ||
|
||||||
theAdvFixWire->StatusEdgeCurves(ShapeExtend_DONE) ||
|
theAdvFixWire->StatusEdgeCurves(ShapeExtend_DONE) ||
|
||||||
@ -480,7 +480,9 @@ Standard_Boolean ShapeFix_Face::Perform()
|
|||||||
}
|
}
|
||||||
if(fixed || isfixReorder) {
|
if(fixed || isfixReorder) {
|
||||||
myFace = tmpFace;
|
myFace = tmpFace;
|
||||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
|
if (!theAdvFixWire->StatusReorder(ShapeExtend_DONE5)) {
|
||||||
|
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
30
tests/bugs/heal/bug24105_1
Executable file
30
tests/bugs/heal/bug24105_1
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
puts "================"
|
||||||
|
puts "OCC24105"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
######################################################################################
|
||||||
|
# ShapeFix algorithm produces not correct result
|
||||||
|
# 1. geom/imps7/H6
|
||||||
|
######################################################################################
|
||||||
|
|
||||||
|
catch {pload XDE}
|
||||||
|
|
||||||
|
restore [locate_data_file bug24105_shape.brep] s
|
||||||
|
|
||||||
|
settolerance s 1.e-7
|
||||||
|
|
||||||
|
fixshape result s
|
||||||
|
|
||||||
|
set square 313292
|
||||||
|
|
||||||
|
set nb_v_good 12
|
||||||
|
set nb_e_good 20
|
||||||
|
set nb_w_good 9
|
||||||
|
set nb_f_good 9
|
||||||
|
set nb_sh_good 1
|
||||||
|
set nb_sol_good 1
|
||||||
|
set nb_compsol_good 0
|
||||||
|
set nb_compound_good 0
|
||||||
|
set nb_shape_good 52
|
||||||
|
|
||||||
|
set 2dviewer 1
|
30
tests/bugs/heal/bug24105_2
Executable file
30
tests/bugs/heal/bug24105_2
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
puts "================"
|
||||||
|
puts "OCC24105"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
######################################################################################
|
||||||
|
# ShapeFix algorithm produces not correct result
|
||||||
|
# 2. geom/SWIG_scripts/C9
|
||||||
|
######################################################################################
|
||||||
|
|
||||||
|
catch {pload XDE}
|
||||||
|
|
||||||
|
restore [locate_data_file bug24105_shape1.brep] s
|
||||||
|
|
||||||
|
settolerance s 1.e-7
|
||||||
|
|
||||||
|
fixshape result s
|
||||||
|
|
||||||
|
set square 123446
|
||||||
|
|
||||||
|
set nb_v_good 33
|
||||||
|
set nb_e_good 52
|
||||||
|
set nb_w_good 23
|
||||||
|
set nb_f_good 21
|
||||||
|
set nb_sh_good 1
|
||||||
|
set nb_sol_good 1
|
||||||
|
set nb_compsol_good 0
|
||||||
|
set nb_compound_good 1
|
||||||
|
set nb_shape_good 132
|
||||||
|
|
||||||
|
set 2dviewer 1
|
27
tests/bugs/heal/bug24111
Executable file
27
tests/bugs/heal/bug24111
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
puts "================"
|
||||||
|
puts "OCC24111"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
######################################################################################
|
||||||
|
# Shape Healing produces invalid face
|
||||||
|
######################################################################################
|
||||||
|
|
||||||
|
catch {pload XDE}
|
||||||
|
|
||||||
|
restore [locate_data_file bug24111_shape.brep] a
|
||||||
|
|
||||||
|
fixshape result a
|
||||||
|
|
||||||
|
set square 15902.8
|
||||||
|
|
||||||
|
set nb_v_good 14
|
||||||
|
set nb_e_good 15
|
||||||
|
set nb_w_good 1
|
||||||
|
set nb_f_good 1
|
||||||
|
set nb_sh_good 0
|
||||||
|
set nb_sol_good 0
|
||||||
|
set nb_compsol_good 0
|
||||||
|
set nb_compound_good 0
|
||||||
|
set nb_shape_good 31
|
||||||
|
|
||||||
|
set 2dviewer 1
|
Loading…
x
Reference in New Issue
Block a user