mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0032291: Modeling Algorithms - General Fuse produces wrong number of solids
Modify method IntWalk_IWalking::ComputeCloseLine: add new flag "isOnDegeneratedBorder" to reach the border successfully.
This commit is contained in:
parent
96815dec17
commit
c194e1bc39
@ -178,7 +178,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
|||||||
#ifdef CHRONO
|
#ifdef CHRONO
|
||||||
Chronrsnld.Stop();
|
Chronrsnld.Stop();
|
||||||
#endif
|
#endif
|
||||||
|
Standard_Boolean isOnDegeneratedBorder = Standard_False;
|
||||||
|
|
||||||
if (Cadre) { // update of limits.
|
if (Cadre) { // update of limits.
|
||||||
BornInf(1) = Um;BornSup(1) = UM;BornInf(2) = Vm;BornSup(2) = VM;
|
BornInf(1) = Um;BornSup(1) = UM;BornInf(2) = Vm;BornSup(2) = VM;
|
||||||
}
|
}
|
||||||
@ -262,6 +263,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
|||||||
/ (uv[aCoordIdx - 1] - uvprev[aCoordIdx - 1]) );
|
/ (uv[aCoordIdx - 1] - uvprev[aCoordIdx - 1]) );
|
||||||
Standard_Integer aFixIdx = aCoordIdx == 1? 2 : 1; // Fixing index;
|
Standard_Integer aFixIdx = aCoordIdx == 1? 2 : 1; // Fixing index;
|
||||||
Uvap(aFixIdx) = uv[aFixIdx - 1] + (uv[aFixIdx - 1] - uvprev[aFixIdx - 1]) * aScaleCoeff;
|
Uvap(aFixIdx) = uv[aFixIdx - 1] + (uv[aFixIdx - 1] - uvprev[aFixIdx - 1]) * aScaleCoeff;
|
||||||
|
isOnDegeneratedBorder = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -307,6 +309,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
|||||||
if (N <= 0) { // jag 941017
|
if (N <= 0) { // jag 941017
|
||||||
MakeWalkingPoint(2,Uvap(1),Uvap(2),Func,Psol);
|
MakeWalkingPoint(2,Uvap(1),Uvap(2),Func,Psol);
|
||||||
Tgtend = Func.IsTangent(); // jag 940616
|
Tgtend = Func.IsTangent(); // jag 940616
|
||||||
|
if (isOnDegeneratedBorder)
|
||||||
|
Tgtend = Standard_True;
|
||||||
N = -N;
|
N = -N;
|
||||||
}
|
}
|
||||||
Arrive = (wd2[I].etat == 12); // the line is open
|
Arrive = (wd2[I].etat == 12); // the line is open
|
||||||
@ -315,6 +319,9 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
|||||||
aStatus = TestDeflection(Func, Arrive,Uvap,StatusPrecedent,
|
aStatus = TestDeflection(Func, Arrive,Uvap,StatusPrecedent,
|
||||||
NbDivision,PasC,StepSign);
|
NbDivision,PasC,StepSign);
|
||||||
|
|
||||||
|
if (isOnDegeneratedBorder && Tgtend)
|
||||||
|
aStatus = IntWalk_ArretSurPoint;
|
||||||
|
|
||||||
StatusPrecedent = aStatus;
|
StatusPrecedent = aStatus;
|
||||||
if (aStatus == IntWalk_PasTropGrand) {// division of the step
|
if (aStatus == IntWalk_PasTropGrand) {// division of the step
|
||||||
Arrive = Standard_False;
|
Arrive = Standard_False;
|
||||||
|
@ -19,16 +19,18 @@ checkprops result -s 8206.54
|
|||||||
set nbshapes_expected "
|
set nbshapes_expected "
|
||||||
Number of shapes in shape
|
Number of shapes in shape
|
||||||
VERTEX : 5
|
VERTEX : 5
|
||||||
EDGE : 9
|
EDGE : 8
|
||||||
WIRE : 4
|
WIRE : 4
|
||||||
FACE : 4
|
FACE : 4
|
||||||
SHELL : 1
|
SHELL : 1
|
||||||
SOLID : 1
|
SOLID : 1
|
||||||
COMPSOLID : 0
|
COMPSOLID : 0
|
||||||
COMPOUND : 1
|
COMPOUND : 1
|
||||||
SHAPE : 25
|
SHAPE : 24
|
||||||
"
|
"
|
||||||
checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations common"
|
checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations common"
|
||||||
|
|
||||||
|
set tolres [checkmaxtol result]
|
||||||
|
|
||||||
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
||||||
|
@ -19,16 +19,18 @@ checkprops result -s 34566
|
|||||||
set nbshapes_expected "
|
set nbshapes_expected "
|
||||||
Number of shapes in shape
|
Number of shapes in shape
|
||||||
VERTEX : 13
|
VERTEX : 13
|
||||||
EDGE : 21
|
EDGE : 20
|
||||||
WIRE : 8
|
WIRE : 8
|
||||||
FACE : 8
|
FACE : 8
|
||||||
SHELL : 1
|
SHELL : 1
|
||||||
SOLID : 1
|
SOLID : 1
|
||||||
COMPSOLID : 0
|
COMPSOLID : 0
|
||||||
COMPOUND : 1
|
COMPOUND : 1
|
||||||
SHAPE : 53
|
SHAPE : 52
|
||||||
"
|
"
|
||||||
checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations cut"
|
checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations cut"
|
||||||
|
|
||||||
|
set tolres [checkmaxtol result]
|
||||||
|
|
||||||
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
||||||
|
29
tests/bugs/modalg_7/bug32291
Normal file
29
tests/bugs/modalg_7/bug32291
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
puts "======================================================="
|
||||||
|
puts " 0032291: General Fuse produces wrong number of solids"
|
||||||
|
puts "======================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug32291.brep] s
|
||||||
|
|
||||||
|
explode s
|
||||||
|
baddobjects s_1
|
||||||
|
baddtools s_2 s_3 s_4 s_5 s_6 s_7 s_8
|
||||||
|
bfillds
|
||||||
|
bbuild result
|
||||||
|
|
||||||
|
checkshape result
|
||||||
|
|
||||||
|
checknbshapes result -vertex 79 -edge 176 -wire 112 -face 112 -shell 18 -solid 18
|
||||||
|
|
||||||
|
set tolres [checkmaxtol result]
|
||||||
|
|
||||||
|
if { ${tolres} > 7.e-5} {
|
||||||
|
puts "Error: bad tolerance of result"
|
||||||
|
}
|
||||||
|
|
||||||
|
axo
|
||||||
|
clear
|
||||||
|
explode result So
|
||||||
|
fit
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user