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.
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());
{
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);
}
}
return E1;
}
+#ifdef DRAW
//=======================================================================
//function : Bubble
//purpose : Sets in increasing order the sequence of vertices.
V1 = V2;
}
}
+#endif
+
//======================== END OF STATIC FUNCTIONS ============
#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;
+++ /dev/null
-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
-
-shape aShape C
-add f1 aShape
-add f2 aShape
-
-set status 0
-set Numbers 11
-
-for {set i 0} {$i < ${Numbers}} {incr i} {
- puts "i=$i"
- rollingball result aShape 15 @ f1 f2
-
- checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 8
-
- set aFile $imagedir/${test_image}.brep
- puts "aFile=${aFile}"
- file delete ${aFile}
- if { [file exists ${aFile}] } {
- puts "There is old ${aFile} file; Error"
- set status 1
- }
-
- save result ${aFile}
- catch {exec chmod 777 ${aFile}}
- if { ![file exists ${aFile}] } {
- puts "There is not ${aFile} file; save command: Error"
- set status 1
- }
-
- set fp [open ${aFile} "r"]
- set Log [read -nonewline ${fp}]
- close ${fp}
- #
- if {$i == 0} {
- set Standard_Log ${Log}
- } else {
- set info_result [string compare ${Log} ${Standard_Log}]
- if {${info_result} == 0} {
- # Log == Standard_Log
- puts "Log == Standard_Log"
- } else {
- # Log != Standard_Log
- set status 1
- puts "Log != Standard_Log"
- }
- }
-}
-
-# Resume
-puts ""
-if {${status} == 0} {
- puts "OK ${BugNumber}"
-} else {
- puts "Faulty ${BugNumber}"
-}
-
-checkprops result -s 8464.91
-checkshape result
-checkview -display result -2d -path ${imagedir}/${test_image}.png
--- /dev/null
+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
+
+shape aShape C
+add f1 aShape
+add f2 aShape
+
+set status 0
+set Numbers 11
+
+for {set i 0} {$i < ${Numbers}} {incr i} {
+ puts "i=$i"
+ rollingball result aShape 15 @ f1 f2
+
+ checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 8
+
+ set aFile $imagedir/${test_image}.brep
+ puts "aFile=${aFile}"
+ file delete ${aFile}
+ if { [file exists ${aFile}] } {
+ puts "There is old ${aFile} file; Error"
+ set status 1
+ }
+
+ save result ${aFile}
+ catch {exec chmod 777 ${aFile}}
+ if { ![file exists ${aFile}] } {
+ puts "There is not ${aFile} file; save command: Error"
+ set status 1
+ }
+
+ set fp [open ${aFile} "r"]
+ set Log [read -nonewline ${fp}]
+ close ${fp}
+ #
+ if {$i == 0} {
+ set Standard_Log ${Log}
+ } else {
+ set info_result [string compare ${Log} ${Standard_Log}]
+ if {${info_result} == 0} {
+ # Log == Standard_Log
+ puts "Log == Standard_Log"
+ } else {
+ # Log != Standard_Log
+ set status 1
+ puts "Log != Standard_Log"
+ }
+ }
+}
+
+# Resume
+puts ""
+if {${status} == 0} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+checkprops result -s 8464.91
+checkshape result
+checkview -display result -2d -path ${imagedir}/${test_image}.png
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
#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
#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
#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