]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Porting: naming changes in OCCT that caused problems in unit-tests.
authormpv <mpv@opencascade.com>
Fri, 23 Mar 2018 07:31:23 +0000 (10:31 +0300)
committermpv <mpv@opencascade.com>
Fri, 23 Mar 2018 07:31:43 +0000 (10:31 +0300)
src/BuildPlugin/Test/Test2398.py
src/FeaturesPlugin/Test/Test2375.py
src/FeaturesPlugin/Test/Test2394.py
src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeList.cpp
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
src/Model/Model_BodyBuilder.cpp
src/PythonAPI/examples/Platine.py
test.API/SHAPER/Transformations/TestTranslation_2.py

index 2fb40778a2ea4bd58f347c3d8ab034b0896b2405..b6ca3f6a13135e4273548d6aa7d9caa16231cec1 100644 (file)
@@ -92,10 +92,10 @@ model.do()
 from GeomAPI import *
 
 # check fillings
-REF_DATA = [(Filling_1, 718.953160474090168463590089232),
-            (Filling_2, 910.697240711571453175565693527),
-            (Filling_3, 718.950138772744594461983069777),
-            (Filling_4, 910.697500240109889091399963945)]
+REF_DATA = [(Filling_1, 718.953888643813570524798706174),
+            (Filling_2, 910.698815675366518007649574429),
+            (Filling_3, 718.953684242875738164002541453),
+            (Filling_4, 910.697703817550063831731677055)]
 for ref in REF_DATA:
     model.testNbResults(ref[0], 1)
     model.testNbSubResults(ref[0], [0])
index fb13fde517c297df1feeba46250172dfe779261d..16cb0352aac8b8ab30e4ebeb5572d6be94c9d217 100644 (file)
@@ -209,12 +209,12 @@ Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/
 Boolean_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_2_1")])
 Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_3_1")], [model.selection("SOLID", "Boolean_1_1"), model.selection("SOLID", "Boolean_1_2")])
 # skip 3 vertices, limitation
-Group_1_objects = [model.selection("VERTEX", "Revolution_1_1/Generated_Face_2&Boolean_2_1/Modified_Face_3"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&Revolution_1_1/Generated_Face_2"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5033"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5031"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5043"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_2_1/Modfied_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5069"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_8"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5082"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5024"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5022"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_8"), model.selection("VERTEX", "Extrusion_1_2/Lateral_4"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_5"), model.selection("VERTEX", "Revolution_1_1/Generated_Face_4&ExtrusionCut_3_1/Modfied_2"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_2"), model.selection("VERTEX", "Boolean_2_1/Modified_Face_2&Boolean_1_1/Modified_Face_1"), model.selection("VERTEX", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5095"), model.selection("VERTEX", "ExtrusionCut_3_1/Lateral_5004"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_3_1/Modfied_3"), model.selection("VERTEX", "Extrusion_1_1/Lateral_4"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5006"), model.selection("VERTEX", "Boolean_2_1/Modified_Face_1&Boolean_1_2/Modified_Face_1"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5004"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_4&ExtrusionCut_2_1/Modfied_12"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_4"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5108"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_3"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5015"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5013"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_3&ExtrusionCut_2_1/Modfied_10"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_3")]
+Group_1_objects = [model.selection("VERTEX", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("VERTEX", "Revolution_1_1/Generated_Face_4&ExtrusionCut_3_1/Modfied_2"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&Revolution_1_1/Generated_Face_2"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_2"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_3_1/Modfied_3"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_4"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_3"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_3"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_5"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_6"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_8"), model.selection("VERTEX", "Revolution_1_1/Generated_Face_2&Boolean_2_1/Modified_Face_1"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_2_1/Modfied_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5095"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_7"), model.selection("VERTEX", "ExtrusionCut_3_1/Lateral_5004"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_4&ExtrusionCut_2_1/Modfied_9"), model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_3&ExtrusionCut_2_1/Modfied_8"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5108"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5082"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5069"), model.selection("VERTEX", "ExtrusionCut_1_1/Lateral_5043"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5024"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5006"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5015"), model.selection("VERTEX", "Extrusion_1_1/Lateral_4"), model.selection("VERTEX", "Extrusion_1_2/Lateral_4"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5033"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5031"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5022"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5004"), model.selection("VERTEX", "ExtrusionCut_2_1/Vertex_5013"), model.selection("VERTEX", "Boolean_1_2/Modified_Face_2&Boolean_1_2/Modified_Face_1"), model.selection("VERTEX", "Boolean_1_1/Modified_Face_2&Boolean_1_1/Modified_Face_1")]
 Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
 # skip 3 edges, limitation
-Group_2_objects = [model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_10&ExtrusionCut_2_1/Modfied_11"), model.selection("EDGE", "Boolean_2_1/Modified_Face_3&ExtrusionCut_2_1/Modfied_11"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_3&ExtrusionCut_2_1/Modfied_10"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5011"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&Boolean_2_1/Modified_Face_3"), model.selection("EDGE", "Boolean_2_1/Modified_Face_1&Boolean_1_2/Modified_Face_1"), model.selection("EDGE", "Boolean_2_1/Modified_Face_3&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "Boolean_1_2/Modified_Edge_1"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_4&ExtrusionCut_2_1/Modfied_12"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_12&ExtrusionCut_2_1/Modfied_13"), model.selection("EDGE", "Boolean_2_1/Modified_Face_3&ExtrusionCut_2_1/Modfied_13"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5002"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_3_1/Modfied_3"), model.selection("EDGE", "Boolean_1_1/Modified_Edge_1"), model.selection("EDGE", "Boolean_2_1/Modified_Face_2&Boolean_1_1/Modified_Face_1"), model.selection("EDGE", "Boolean_2_1/Modified_Face_3&ExtrusionCut_2_1/Modfied_9"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Boolean_2_1/Modified_Face_3&Boolean_2_1/Modified_Face_2"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&ExtrusionCut_3_1/Modfied_2"), model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_2"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_8&ExtrusionCut_2_1/Modfied_9"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_8"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_4&Boolean_2_1/Modified_Face_3"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Boolean_2_1/Modified_Face_3"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_3&Boolean_2_1/Modified_Face_3"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_5"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_6"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_6"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_5"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_5&Boolean_2_1/Modified_Face_3"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_6&Boolean_2_1/Modified_Face_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_6&ExtrusionCut_2_1/Modfied_7"), model.selection("EDGE", "Boolean_2_1/Modified_Face_3&ExtrusionCut_2_1/Modfied_7"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_2_1/Modfied_6"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5029"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_8"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_8"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_8&Boolean_2_1/Modified_Face_3"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5020")]
+Group_2_objects = [model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "Boolean_2_1/Modified_Face_1&ExtrusionCut_2_1/Generated_Face_1"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_3&ExtrusionCut_2_1/Modfied_8"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5011"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "Boolean_1_2/Modified_Face_2&Boolean_1_2/Modified_Face_1"), model.selection("EDGE", "Boolean_2_1/Modified_Face_1&Boolean_1_2/Modified_Face_2"), model.selection("EDGE", "Boolean_1_2/Modified_Edge_1"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_4&ExtrusionCut_2_1/Modfied_9"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_9&ExtrusionCut_2_1/Generated_Face_1"), model.selection("EDGE", "Boolean_2_1/Modified_Face_1&ExtrusionCut_2_1/Generated_Face_1"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5002"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_3_1/Modfied_3"), model.selection("EDGE", "Boolean_1_1/Modified_Edge_1"), model.selection("EDGE", "Boolean_1_1/Modified_Face_2&Boolean_1_1/Modified_Face_1"), model.selection("EDGE", "Boolean_2_1/Modified_Face_1&ExtrusionCut_2_1/Generated_Face_1"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Boolean_2_1/Modified_Face_1&Boolean_1_1/Modified_Face_2"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&ExtrusionCut_3_1/Modfied_2"), model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_2_1/Modfied_2"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_7"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_4&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_4"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_3&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_5"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_6"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_6"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_5"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_5&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_6&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Boolean_2_1/Modified_Face_1&ExtrusionCut_2_1/Generated_Face_1"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_2_1/Modfied_6"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5029"), model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&ExtrusionCut_1_1/Modfied_8"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_8"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_8&Boolean_2_1/Modified_Face_1"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2"), model.selection("EDGE", "ExtrusionCut_2_1/Lateral_5020")]
 Group_2 = model.addGroup(Part_1_doc, Group_2_objects)
-Group_3_objects = [model.selection("FACE", "ExtrusionCut_2_1/Modfied_3"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_11"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_10"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"), model.selection("FACE", "Boolean_1_2/Modified_Face_1"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_4"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_12"), model.selection("FACE", "Boolean_1_1/Modified_Face_1"), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_9"), model.selection("FACE", "Boolean_2_1/Modified_Face_3"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_2"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_8"), model.selection("FACE", "Boolean_2_1/Modified_Face_2"), model.selection("FACE", "ExtrusionCut_3_1/Modfied_2"), model.selection("FACE", "Revolution_1_1/Generated_Face_4"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_13"), model.selection("FACE", "Boolean_2_1/Modified_Face_1"), model.selection("FACE", "Revolution_1_1/Generated_Face_2"), model.selection("FACE", "ExtrusionCut_3_1/Modfied_3"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_5"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_6"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_5"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_7"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_6"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_8")]
+Group_3_objects = [model.selection("FACE", "ExtrusionCut_2_1/Modfied_3"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face_1"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_8"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"), model.selection("FACE", "Boolean_1_2/Modified_Face_1"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_4"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_9"), model.selection("FACE", "Boolean_1_1/Modified_Face_1"), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face_1"), model.selection("FACE", "Boolean_2_1/Modified_Face_1"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_2"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_7"), model.selection("FACE", "Boolean_1_1/Modified_Face_2"), model.selection("FACE", "ExtrusionCut_3_1/Modfied_2"), model.selection("FACE", "Revolution_1_1/Generated_Face_4"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face_1"), model.selection("FACE", "Boolean_1_2/Modified_Face_2"), model.selection("FACE", "Revolution_1_1/Generated_Face_2"), model.selection("FACE", "ExtrusionCut_3_1/Modfied_3"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_5"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_6"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_5"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face_1"), model.selection("FACE", "ExtrusionCut_2_1/Modfied_6"), model.selection("FACE", "ExtrusionCut_1_1/Modfied_8")]
 Group_3 = model.addGroup(Part_1_doc, Group_3_objects)
 model.end()
 
index fae2d1a1e26bc0c636ff80ddac0f513fea103701..e5e950d461fd67949e9c6fa70f8bf96f52ca3f3a 100644 (file)
@@ -88,13 +88,13 @@ Extrusion_1.setNestedSketch(Sketch_2)
 Boolean_1 = model.addFill(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1")])
 
 Point_2 = model.addPoint(Part_1_doc, "x", "y", "-z")
-Axis_4 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Boolean_1_1_2/Modified_Face_1&Boolean_1_1_2/Modified_Face_3&Boolean_1_1_2/Modified_Face_4"))
+Axis_4 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Boolean_1_1_2/Modified_Face_3&Boolean_1_1_2/Modified_Face_2&Boolean_1_1_2/Modified_Face_1"))
 Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "Axis_1"), model.selection("VERTEX", "Point_1"), True)
 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), "haut_ext_tuyau", True)
 Plane_5.result().setName("Plane_2 arrivee tuyau")
-Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Boolean_1_1_2/Modified_Face_5"), model.selection("EDGE", "Boolean_1_1_2/Modified_Face_5&Boolean_1_1_2/Modified_Face_2"), 45)
-Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Boolean_1_1_2/Modified_Face_6"), model.selection("EDGE", "Boolean_1_1_2/Modified_Face_6&Boolean_1_1_2/Modified_Face_2"), 45)
-Plane_8 = model.addPlane(Part_1_doc, model.selection("FACE", "Boolean_1_1_2/Modified_Face_6"), model.selection("EDGE", "Boolean_1_1_2/Modified_Face_6&Boolean_1_1_2/Modified_Face_5"), "90+45")
+Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1"), 45)
+Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/From_Face_1"), 45)
+Plane_8 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_4"), "90+45")
 
 Boolean_2 = model.addFill(Part_1_doc, [model.selection("SOLID", "Boolean_1_1_1")], [model.selection("FACE", "Plane_5")])
 Boolean_3 = model.addFill(Part_1_doc, [model.selection("SOLID", "Boolean_2_1_2")], [model.selection("FACE", "Plane_3")])
@@ -171,7 +171,7 @@ model.do()
 Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchArc_2_2f-SketchLine_18r")], model.selection("EDGE", "Sketch_4/Edge-SketchLine_18"), 0, 180)
 
 Boolean_5 = model.addCut(Part_1_doc, [model.selection("SOLID", "Revolution_2_1")], [model.selection("SOLID", "Extrusion_3_1")])
-Boolean_5.result().setName("demi-sphère")
+Boolean_5.result().setName("demi-sphere")
 
 Plane_9 = model.addPlane(Part_1_doc, model.selection("VERTEX", "Extrusion_2_1/Generated_Face_10&Extrusion_2_1/Generated_Face_1&Extrusion_2_1/From_Face_4"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_10&Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_4"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_2&Extrusion_2_1/Generated_Face_10&Extrusion_2_1/To_Face_4"))
 Plane_10 = model.addPlane(Part_1_doc, model.selection("VERTEX", "Extrusion_2_1/Generated_Face_12&Extrusion_2_1/Generated_Face_11&Extrusion_2_1/To_Face_1"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_13&Extrusion_2_1/Generated_Face_12&Extrusion_2_1/To_Face_1"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_13&Extrusion_2_1/Generated_Face_12&Extrusion_2_1/From_Face_1"))
@@ -186,7 +186,7 @@ Plane_15 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Shape
 Plane_16 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Shape6"), model.selection("EDGE", "Recover_1_1/Shape3&Recover_1_1/Shape6"), 45)
 
 Boolean_6_objects_2 = [model.selection("FACE", "Plane_6"), model.selection("FACE", "Plane_7"), model.selection("FACE", "Plane_8"), model.selection("FACE", "Plane_9"), model.selection("FACE", "Plane_10"), model.selection("FACE", "Plane_11"), model.selection("FACE", "Plane_12"), model.selection("FACE", "Plane_13")]
-Boolean_6 = model.addFill(Part_1_doc, [model.selection("SOLID", "demi-sphère")], Boolean_6_objects_2)
+Boolean_6 = model.addFill(Part_1_doc, [model.selection("SOLID", "demi-sphere")], Boolean_6_objects_2)
 
 Union_2_objects = [model.selection("SOLID", "Boolean_6_1_16"), model.selection("SOLID", "Boolean_6_1_13"), model.selection("SOLID", "Boolean_6_1_14")]
 Union_2 = model.addUnion(Part_1_doc, Union_2_objects)
@@ -205,7 +205,7 @@ Union_6.result().subResult(2).setColor(102, 51, 102)
 Union_6.result().subResult(3).setColor(76, 76, 153)
 Union_6.result().subResult(4).setColor(0, 0, 254)
 
-Partition_1_objects = [model.selection("SOLID", "Recover_1_1"), model.selection("COMPSOLID", "Union_1_1"), model.selection("COMPSOLID", "Extrusion_2_1"), model.selection("COMPSOLID", "demi-sphère")]
+Partition_1_objects = [model.selection("SOLID", "Recover_1_1"), model.selection("COMPSOLID", "Union_1_1"), model.selection("COMPSOLID", "Extrusion_2_1"), model.selection("COMPSOLID", "demi-sphere")]
 Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
 Partition_1.result().setColor(102, 0, 0)
 Partition_1.result().subResult(0).setColor(255, 255, 0)
index 7cf3b3fb44c74768de6adb32fa4162565cc9fe33..1c615ced3505a04201f1ab6bfe933ba95f5e71c9 100644 (file)
@@ -126,13 +126,18 @@ void GeomAlgoAPI_MakeShapeList::result(const std::shared_ptr<GeomAPI_Shape> theS
     for(NCollection_Map<TopoDS_Shape>::Iterator
         aShapeIt(anAlgoShapes); aShapeIt.More(); aShapeIt.Next()) {
       bool hasResults = false;
+      bool anArgumentIsInResult = false;
       std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape);
       aShape->setImpl(new TopoDS_Shape(aShapeIt.Value()));
       ListOfShape aGeneratedShapes;
       aMakeShape->generated(aShape, aGeneratedShapes);
-      for(ListOfShape::const_iterator
-          anIt = aGeneratedShapes.cbegin(); anIt != aGeneratedShapes.cend(); anIt++) {
+      for (ListOfShape::const_iterator
+        anIt = aGeneratedShapes.cbegin(); anIt != aGeneratedShapes.cend(); anIt++) {
         const TopoDS_Shape& anItShape = (*anIt)->impl<TopoDS_Shape>();
+        if (anItShape.IsSame(aShapeIt.Value())) {
+          anArgumentIsInResult = true;
+          continue;
+        }
         aTempShapes.Add(anItShape);
         if(aResultShapesMap.Add(anItShape) == Standard_True) {
           aResultShapesList.Append(anItShape);
@@ -144,13 +149,17 @@ void GeomAlgoAPI_MakeShapeList::result(const std::shared_ptr<GeomAPI_Shape> theS
       for(ListOfShape::const_iterator
           anIt = aModifiedShapes.cbegin(); anIt != aModifiedShapes.cend(); anIt++) {
         const TopoDS_Shape& anItShape = (*anIt)->impl<TopoDS_Shape>();
+        if (anItShape.IsSame(aShapeIt.Value())) {
+          anArgumentIsInResult = true;
+          continue;
+        }
         aTempShapes.Add(anItShape);
         if(aResultShapesMap.Add(anItShape) == Standard_True) {
           aResultShapesList.Append(anItShape);
         }
         hasResults = true;
       }
-      if(hasResults) {
+      if(hasResults && !anArgumentIsInResult) {
         const TopoDS_Shape& aTopoDSShape = aShapeIt.Value();
         if(aResultShapesMap.Remove(aTopoDSShape) == Standard_True) {
           for(NCollection_List<TopoDS_Shape>::Iterator
index fb16992265f63c3f81be2b98ca1cad3634dfddbb..ce3f7c82e6231e754610a8916f61cae427f1f21a 100644 (file)
@@ -114,7 +114,7 @@ bool isFirst(const TopoDS_Shape& theFirst, const TopoDS_Shape& theSecond,
     if (!theAreaToIndex.IsBound(aShape)) { // fill the list of curve indices
       NCollection_List<int> aNewList;
       TopExp_Explorer anEdgesExp(aShape, TopAbs_EDGE);
-      for(; anEdgesExp.More(); anEdgesExp.Next()) {
+      for (; anEdgesExp.More(); anEdgesExp.Next()) {
         double aFirst, aLast;
         Handle(Geom_Curve) aCurve = BRep_Tool::Curve(
           TopoDS::Edge(anEdgesExp.Current()), aFirst, aLast);
@@ -124,24 +124,34 @@ bool isFirst(const TopoDS_Shape& theFirst, const TopoDS_Shape& theSecond,
           aNewList.Append(theCurveToIndex.Find(aCurve));
         }
       }
-      NCollection_Array1<int> aNewArray(1, aNewList.Extent());
-      NCollection_List<int>::Iterator aListIter(aNewList);
-      for(int anIndex = 1; aListIter.More(); aListIter.Next(), anIndex++) {
-        aNewArray.SetValue(anIndex, aListIter.Value());
+      if (aNewList.Extent()) {
+        NCollection_Array1<int> aNewArray(1, aNewList.Extent());
+        NCollection_List<int>::Iterator aListIter(aNewList);
+        for (int anIndex = 1; aListIter.More(); aListIter.Next(), anIndex++) {
+          aNewArray.SetValue(anIndex, aListIter.Value());
+        }
+        std::sort(aNewArray.begin(), aNewArray.end());
+        theAreaToIndex.Bind(aShape, aNewArray);
       }
-      std::sort(aNewArray.begin(), aNewArray.end());
-      theAreaToIndex.Bind(aShape, aNewArray);
     }
   }
-  // compare lists of indices one by one to find chich list indices are lower
-  NCollection_Array1<int>::Iterator aFirstList(theAreaToIndex.ChangeFind(theFirst));
-  NCollection_Array1<int>::Iterator aSecondList(theAreaToIndex.ChangeFind(theSecond));
-  for(; aFirstList.More() && aSecondList.More(); aFirstList.Next(), aSecondList.Next()) {
-    if (aFirstList.Value() < aSecondList.Value()) return true;
-    if (aFirstList.Value() > aSecondList.Value()) return false;
+  bool isFirst;
+  bool aGeomCompare = !theAreaToIndex.IsBound(theFirst) || !theAreaToIndex.IsBound(theSecond);
+  if (!aGeomCompare) {
+    // compare lists of indices one by one to find chich list indices are lower
+    NCollection_Array1<int>::Iterator aFirstList(theAreaToIndex.ChangeFind(theFirst));
+    NCollection_Array1<int>::Iterator aSecondList(theAreaToIndex.ChangeFind(theSecond));
+    for (; aFirstList.More() && aSecondList.More(); aFirstList.Next(), aSecondList.Next()) {
+      if (aFirstList.Value() < aSecondList.Value()) return true;
+      if (aFirstList.Value() > aSecondList.Value()) return false;
+    }
+    aGeomCompare = !aFirstList.More() && !aSecondList.More();
+    isFirst = !aFirstList.More();
+  } else {
+    isFirst = !theAreaToIndex.IsBound(theFirst);
   }
   // if faces are identical by curves names (circle splitted by line in seam-point), use parameters
-  if (!aFirstList.More() && !aSecondList.More()) {
+  if (aGeomCompare) {
     GProp_GProps aGProps;
     BRepGProp::SurfaceProperties(theFirst, aGProps);
     gp_Pnt aCentre1 = aGProps.CentreOfMass();
@@ -150,7 +160,7 @@ bool isFirst(const TopoDS_Shape& theFirst, const TopoDS_Shape& theSecond,
     return aCentre1.X() + aCentre1.Y() + aCentre1.Z() < aCentre2.X() + aCentre2.Y() + aCentre2.Z();
   }
   // if in first list there is no elements left, it is the first
-  return !aFirstList.More();
+  return isFirst;
 }
 
 // sorts faces (in theAreas list) to make persistent order: by initial shapes edges
index 290d5bd5297366c56e1f1e6f2e2b948a9bb68670..1671f382ce341f46dc3ee5c9145f8ee62f3ed6c5 100644 (file)
@@ -95,13 +95,15 @@ void GeomAlgoAPI_UnifySameDomain::modified(const std::shared_ptr<GeomAPI_Shape>
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
   const ShapeUpgrade_UnifySameDomain& aUnifyAlgo = this->impl<ShapeUpgrade_UnifySameDomain>();
 
-  const TopTools_ListOfShape& aMList = aUnifyAlgo.History()->Generated(aShape);
-  for(TopTools_ListIteratorOfListOfShape aModified(aMList); aModified.More(); aModified.Next()) {
-
-    for(TopExp_Explorer anExp(aModified.Value(), aShape.ShapeType()); anExp.More(); anExp.Next()) {
-      GeomShapePtr aGeomShape(new GeomAPI_Shape());
-      aGeomShape->setImpl(new TopoDS_Shape(anExp.Current()));
-      theHistory.push_back(aGeomShape);
+  for (int aIsModified = 0; aIsModified <= 1; aIsModified++) {
+    const TopTools_ListOfShape& aMList = aIsModified ?
+      aUnifyAlgo.History()->Modified(aShape) : aUnifyAlgo.History()->Generated(aShape);
+    for (TopTools_ListIteratorOfListOfShape aModified(aMList); aModified.More(); aModified.Next()) {
+      for (TopExp_Explorer anExp(aModified.Value(), aShape.ShapeType()); anExp.More(); anExp.Next()) {
+        GeomShapePtr aGeomShape(new GeomAPI_Shape());
+        aGeomShape->setImpl(new TopoDS_Shape(anExp.Current()));
+        theHistory.push_back(aGeomShape);
+      }
     }
   }
 }
index 9633826011ce623cb10f03dc8b2073b19a1bd2b1..6155c39237185d0a6d6becafcef6d7014be38c44 100755 (executable)
@@ -360,13 +360,19 @@ void Model_BodyBuilder::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
   TopoDS_Shape aShapeIn = theShapeIn->impl<TopoDS_Shape>();
   TopTools_MapOfShape aView;
   TopExp_Explorer ShapeExplorer (aShapeIn, (TopAbs_ShapeEnum)theKindOfShape);
+  GeomShapePtr aResultShape = shape();
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& aRoot = ShapeExplorer.Current ();
     if (!aView.Add(aRoot)) continue;
     std::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
     aRShape->setImpl((new TopoDS_Shape(aRoot)));
     if (theMS->isDeleted (aRShape)) {
-      builder(theTag)->Delete(aRoot);
+      if (!aResultShape->isSubShape(aRShape, false)) {
+          ListOfShape aHist;
+          theMS->modified(aRShape, aHist);
+          if (aHist.size() == 0 || (aHist.size() == 1 && aHist.front()->isSame(aRShape)))
+            builder(theTag)->Delete(aRoot);
+      }
     }
   }
 }
index aad9beb92d98a9730d5f7fa0dc174bcd15cc5abb..25e45babf3944046ff05b24c50499ff5f7d204d6 100644 (file)
@@ -170,7 +170,7 @@ def body_3():
     sketch.setRadius(arc, r)
 
     # Binding
-    bottom_e = sketch.addLine("Boolean_1_1/Modified_Face_8&Boolean_1_1/Modified_Face_5")
+    bottom_e = sketch.addLine("Boolean_1_1/Modified_Face_7&Extrusion_2_1/To_Face_1")
     sketch.setCoincident(bottom_e, bottom.startPoint())
     sketch.setCoincident(bottom_e.startPoint(), bottom.endPoint())
 
@@ -192,11 +192,11 @@ def body_4():
     left, diagonal, bottom = model.addPolygon(sketch, *geom_points)
 
     # Binding
-    bottom_e = sketch.addLine("Boolean_2_1/Modified_Face_3&Boolean_2_1/Modified_Face_4")
+    bottom_e = sketch.addLine("Boolean_2_1/Modified_Face_2&Boolean_2_1/Modified_Face_4")
     sketch.setCoincident(bottom_e.endPoint(), bottom.startPoint())
     sketch.setCoincident(bottom_e.startPoint(), left.startPoint())
 
-    left_e = sketch.addLine("Boolean_2_1/Modified_Face_6&Boolean_2_1/Modified_Face_7")
+    left_e = sketch.addLine("Boolean_2_1/Modified_Face_5&Extrusion_3_1/Generated_Face_2")
     sketch.setCoincident(left_e.startPoint(), left.endPoint())
 
     model.do()  #!!!
index 0f3e3e9e2158dccd1bf4e610aabb06661d4f6d90..a78c57eb1cfd860a586f672e52a1cef8b66a3296 100644 (file)
@@ -289,12 +289,13 @@ model.testNbSubShapes(Translation_42, GeomAPI_Shape.FACE, [18])
 model.testHaveNamingFaces(Translation_42, model, Part_1_doc)
 
 # Translation 43
-model.testNbResults(Translation_43, 1)
-model.testNbSubResults(Translation_43, [3])
-model.testNbSubShapes(Translation_43, GeomAPI_Shape.COMPSOLID, [1])
-model.testNbSubShapes(Translation_43, GeomAPI_Shape.SOLID, [3])
-model.testNbSubShapes(Translation_43, GeomAPI_Shape.FACE, [18])
-model.testHaveNamingFaces(Translation_43, model, Part_1_doc)
+# It is concealed by Partition_9
+#model.testNbResults(Translation_43, 1)
+#model.testNbSubResults(Translation_43, [3])
+#model.testNbSubShapes(Translation_43, GeomAPI_Shape.COMPSOLID, [1])
+#model.testNbSubShapes(Translation_43, GeomAPI_Shape.SOLID, [3])
+#model.testNbSubShapes(Translation_43, GeomAPI_Shape.FACE, [18])
+#model.testHaveNamingFaces(Translation_43, model, Part_1_doc)
 
 # Translation 44
 model.testNbResults(Translation_44, 1)