mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-07 18:30:55 +03:00
0029861: Modeling Algorithms - BiTgte_Blend gives exception
The algorithm has been corrected to avoid exception. Now both Draw commands "brollingball" and "rollingball" give correct results. Test cases "offset faces_type_a A3, A4, A9" are good now.
This commit is contained in:
parent
b5ea631975
commit
59694b5da3
@ -555,6 +555,7 @@ void BRepAlgo_Loop::Perform()
|
||||
TopTools_IndexedDataMapOfShapeListOfShape MVE;
|
||||
|
||||
// add cut edges.
|
||||
TopTools_MapOfShape Emap;
|
||||
for (itl.Initialize(myEdges); itl.More(); itl.Next())
|
||||
{
|
||||
const TopTools_ListOfShape* pLCE = myCutEdges.Seek (itl.Value());
|
||||
@ -562,6 +563,8 @@ void BRepAlgo_Loop::Perform()
|
||||
{
|
||||
for (itl1.Initialize(*pLCE); itl1.More(); itl1.Next()) {
|
||||
TopoDS_Edge& E = TopoDS::Edge(itl1.Value());
|
||||
if (!Emap.Add(E))
|
||||
continue;
|
||||
StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute);
|
||||
}
|
||||
}
|
||||
|
@ -693,6 +693,7 @@ static TopoDS_Edge FindCreatedEdge
|
||||
return E1;
|
||||
}
|
||||
|
||||
#ifdef DRAW
|
||||
//=======================================================================
|
||||
//function : Bubble
|
||||
//purpose : Sets in increasing order the sequence of vertices.
|
||||
@ -826,6 +827,8 @@ static void CutEdge (const TopoDS_Edge& E,
|
||||
V1 = V2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//======================== END OF STATIC FUNCTIONS ============
|
||||
|
||||
|
||||
@ -2317,25 +2320,6 @@ void BiTgte_Blend::ComputeShape()
|
||||
#endif
|
||||
// end debug
|
||||
|
||||
//
|
||||
// modify the tubes on edge for partition of edges.
|
||||
//
|
||||
Standard_Integer NbS = NbSurfaces();
|
||||
for (Standard_Integer i = 1; i <= NbS; i++) {
|
||||
const TopoDS_Shape& S1 = SupportShape1(i);
|
||||
|
||||
if ( S1.ShapeType() == TopAbs_EDGE) {
|
||||
const TopoDS_Edge& E1 = TopoDS::Edge(S1);
|
||||
// it is required to replace in F the cut edges of E1, that
|
||||
// represent CutE
|
||||
const TopTools_ListOfShape& VonE = myCutEdges(E1);
|
||||
TopTools_ListOfShape NewE;
|
||||
CutEdge(E1,VonE,NewE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TopTools_DataMapOfShapeShape Created;
|
||||
|
||||
TopTools_ListOfShape Empty;
|
||||
|
0
tests/bugs/modalg_2/bug22864 → tests/bugs/modalg_2/bug22864_1
Executable file → Normal file
0
tests/bugs/modalg_2/bug22864 → tests/bugs/modalg_2/bug22864_1
Executable file → Normal file
21
tests/bugs/modalg_2/bug22864_2
Normal file
21
tests/bugs/modalg_2/bug22864_2
Normal file
@ -0,0 +1,21 @@
|
||||
puts "============"
|
||||
puts "OCC22864"
|
||||
puts "============"
|
||||
puts ""
|
||||
##############################################################################################
|
||||
# The algorithm BiTgte_Blend obtains instable results
|
||||
##############################################################################################
|
||||
|
||||
set BugNumber OCC22864
|
||||
|
||||
restore [locate_data_file bug22864_face1.brep] f1
|
||||
restore [locate_data_file bug22864_face2.brep] f2
|
||||
|
||||
compound f1 f2 s
|
||||
|
||||
brollingball result s 15 @ f1 f2
|
||||
|
||||
checkshape result
|
||||
checknbshapes result -vertex 7 -edge 9 -wire 4 -face 3 -shell 1
|
||||
checkprops result -s 39642.2
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
24
tests/bugs/modalg_2/bug22864_3
Normal file
24
tests/bugs/modalg_2/bug22864_3
Normal file
@ -0,0 +1,24 @@
|
||||
puts "============"
|
||||
puts "OCC22864"
|
||||
puts "============"
|
||||
puts ""
|
||||
##############################################################################################
|
||||
# The algorithm BiTgte_Blend obtains instable results
|
||||
##############################################################################################
|
||||
|
||||
set BugNumber OCC22864
|
||||
|
||||
sphere s1 10
|
||||
sphere s2 10
|
||||
mkface f1 s1
|
||||
mkface f2 s2
|
||||
scalexyz f1 f1 2 2 1
|
||||
scalexyz f2 f2 0.5 0.5 2
|
||||
compound f1 f2 s
|
||||
|
||||
brollingball result s 2. @ f1 f2
|
||||
|
||||
checkshape result
|
||||
checknbshapes result -vertex 6 -edge 11 -wire 5 -face 5 -shell 1
|
||||
checkprops result -s 3750.55
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
23
tests/bugs/modalg_2/bug22864_4
Normal file
23
tests/bugs/modalg_2/bug22864_4
Normal file
@ -0,0 +1,23 @@
|
||||
puts "TODO OCC29957 ALL: Error : The area of result shape is"
|
||||
|
||||
puts "============"
|
||||
puts "OCC22864"
|
||||
puts "============"
|
||||
puts ""
|
||||
##############################################################################################
|
||||
# The algorithm BiTgte_Blend obtains instable results
|
||||
##############################################################################################
|
||||
|
||||
set BugNumber OCC22864
|
||||
|
||||
cone s1 0 0 0 0 0 1 30 0
|
||||
mkface f1 s1 0 2.*pi -40 0
|
||||
cone s2 25 0 -15 1 0 0 10 0
|
||||
mkface f2 s2 0 2.*pi -55 0
|
||||
compound f1 f2 s
|
||||
|
||||
brollingball result s 2. @ f1 f2
|
||||
|
||||
checkprops result -s 3523.97
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
22
tests/bugs/modalg_7/bug29861
Normal file
22
tests/bugs/modalg_7/bug29861
Normal file
@ -0,0 +1,22 @@
|
||||
puts "============"
|
||||
puts "OCC29861"
|
||||
puts "============"
|
||||
puts ""
|
||||
##############################################################################################
|
||||
# Modeling Algorithms - BiTgte_Blend gives exception
|
||||
##############################################################################################
|
||||
|
||||
set BugNumber OCC29861
|
||||
|
||||
cylinder s1 0 360 0 0 0 1 0 1 0 160
|
||||
cylinder s2 0 0 0 0 1 0 80
|
||||
mkface f1 s1 0 2.*pi -113.2000012 113.2000012
|
||||
mkface f2 s2 0 2.*pi 168.4 600
|
||||
compound f1 f2 s
|
||||
|
||||
brollingball result s 30 @ f1 f2
|
||||
|
||||
checkshape result
|
||||
checknbshapes result -vertex 10 -edge 17 -wire 7 -face 6 -shell 1
|
||||
checkprops result -s 246256
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
@ -1,7 +1,4 @@
|
||||
#old file ofcb19
|
||||
puts "TODO CR25925 ALL: ERROR. offsetperform operation not done."
|
||||
puts "TODO CR25925 ALL: Error: The command cannot be built"
|
||||
puts "TODO CR26556 ALL: Error : The offset cannot be built."
|
||||
|
||||
restore [locate_data_file CHE_bb17.rle] s
|
||||
OFFSETSHAPE -0.04 {s_4 s_9 s_3 s_5 s_2 s_7 s_11} $calcul $type
|
||||
|
@ -1,7 +1,4 @@
|
||||
#old file ofcb23
|
||||
puts "TODO CR25925 ALL: ERROR. offsetperform operation not done."
|
||||
puts "TODO CR25925 ALL: Error: The command cannot be built"
|
||||
puts "TODO CR26556 ALL: Error : The offset cannot be built."
|
||||
|
||||
restore [locate_data_file CHE_cc3.rle] s
|
||||
OFFSETSHAPE -0.01 {s_6} $calcul $type
|
||||
|
@ -1,7 +1,4 @@
|
||||
#old file ofsb20
|
||||
puts "TODO CR25925 ALL: ERROR. offsetperform operation not done."
|
||||
puts "TODO CR25925 ALL: Error: The command cannot be built"
|
||||
puts "TODO CR26556 ALL: Error : The offset cannot be built."
|
||||
|
||||
restore [locate_data_file CHE_bb20.rle] s
|
||||
OFFSETSHAPE -0.1 {s_4 s_7} $calcul $type
|
||||
|
Loading…
x
Reference in New Issue
Block a user