]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Debug of Selector refactoring basing on case24 big model test.
authormpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:16:40 +0000 (11:16 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:45:52 +0000 (11:45 +0300)
src/Selector/Selector_Modify.cpp
test.models/case24.py

index e17ae2d338a98c9219a6c17a8fbcbf5e575dd06b..5ac20366add5f40cae96261222b68d69f2c3983a 100644 (file)
@@ -187,6 +187,10 @@ bool Selector_Modify::select(NCollection_List<Handle(TNaming_NamedShape)>& theMo
       } else if (aCommon.Extent() == 1) {
         return true; // simple modification
       }
+      // weak naming between the common results
+      Selector_NExplode aNexp(aCommon);
+      myWeakIndex = aNexp.index(theValue);
+      return myWeakIndex != -1;
     }
     // weak naming case
     TopoDS_ListOfShape aCommon;
index 1a79ffb342a77cfc50cb297c15939281f55929d3..2681525fedfb1d4f761d10e6faaa2d8184d723b9 100644 (file)
@@ -687,7 +687,7 @@ SketchConstraintCoincidence_129 = Sketch_10.setCoincident(SketchArc_11.startPoin
 SketchConstraintCoincidence_129.setName("SketchConstraintCoincidence_127")
 SketchConstraintTangent_19 = Sketch_10.setTangent(SketchArc_11.results()[1], SketchLine_78.result())
 SketchConstraintTangent_19.setName("SketchConstraintTangent_24")
-SketchPoint_8 = Sketch_10.addPoint(model.selection("VERTEX", "[RevolutionFuse_3_1/Modified_Face&Sketch_3/SketchLine_15&weak_name_2][RevolutionFuse_1_1/Generated_Face&Sketch_3/SketchLine_20][(RevolutionFuse_1_1/Generated_Face&Sketch_3/SketchLine_20)(RevolutionFuse_3_1/Modified_Face&Sketch_3/SketchArc_3_2)(ExtrusionCut_2_1/Modified_Face&Sketch_5/SketchLine_40)]"))
+SketchPoint_8 = Sketch_10.addPoint(model.selection("VERTEX", "[RevolutionFuse_3_1/Modified_Face&Sketch_3/SketchLine_15&weak_name_2][RevolutionFuse_1_1/Generated_Face&Sketch_3/SketchLine_20][RevolutionFuse_3_1/Modified_Face&RevolutionFuse_1_1/To_Face]"))
 SketchConstraintCoincidence_130 = Sketch_10.setCoincident(SketchArc_11.endPoint(), SketchPoint_8.result())
 SketchConstraintCoincidence_130.setName("SketchConstraintCoincidence_128")
 SketchArc_12 = Sketch_10.addArc(64.00001789135865, 23.01137360115889, 64, 20, 61.15622559702543, 22.02080994708722, True)
@@ -698,7 +698,7 @@ SketchConstraintCoincidence_131 = Sketch_10.setCoincident(SketchArc_12.startPoin
 SketchConstraintCoincidence_131.setName("SketchConstraintCoincidence_129")
 SketchConstraintTangent_20 = Sketch_10.setTangent(SketchArc_12.results()[1], SketchLine_77.result())
 SketchConstraintTangent_20.setName("SketchConstraintTangent_25")
-SketchPoint_9 = Sketch_10.addPoint(model.selection("VERTEX", "[RevolutionFuse_3_1/Modified_Face&Sketch_4/SketchLine_22&weak_name_2][RevolutionFuse_2_1/Generated_Face&Sketch_4/SketchLine_27][(RevolutionFuse_2_1/Generated_Face&Sketch_4/SketchLine_27)(RevolutionFuse_3_1/Modified_Face&Sketch_4/SketchArc_4_2)(ExtrusionCut_2_1/Modified_Face&Sketch_5/SketchLine_40)]"))
+SketchPoint_9 = Sketch_10.addPoint(model.selection("VERTEX", "[RevolutionFuse_3_1/Modified_Face&Sketch_4/SketchLine_22&weak_name_2][RevolutionFuse_2_1/Generated_Face&Sketch_4/SketchLine_27][RevolutionFuse_3_1/Modified_Face&RevolutionFuse_2_1/From_Face]"))
 SketchConstraintCoincidence_132 = Sketch_10.setCoincident(SketchArc_12.endPoint(), SketchPoint_9.result())
 SketchConstraintCoincidence_132.setName("SketchConstraintCoincidence_130")
 SketchLine_79 = Sketch_10.addLine(61.15622559702543, 22.02080994708722, 59.81204392543111, 22.0208099470871)
@@ -788,8 +788,10 @@ SketchMultiRotation_2 = Sketch_11.addRotation([SketchCircle_3.results()[1], Sket
 [SketchCircle_4, SketchCircle_5, SketchCircle_6, SketchCircle_7] = SketchMultiRotation_2.rotated()
 model.do()
 RevolutionCut_1 = model.addRevolutionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_9")], model.selection("EDGE", "PartSet/OZ"), 0, 360, [model.selection("SOLID", "ExtrusionFuse_3_1")])
-ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_11/Face-SketchCircle_4_2f-SketchCircle_6_2r_wire"), model.selection("WIRE", "Sketch_11/Face-SketchCircle_3_2f-SketchCircle_2_2r_wire"), model.selection("WIRE", "Sketch_11/Face-SketchCircle_5_2f-SketchCircle_7_2r_wire")], model.selection(), 30, -15, [model.selection("SOLID", "RevolutionCut_1_1")])
-ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_11/Face-SketchCircle_2_2r_wire"), model.selection("FACE", "Sketch_11/Face-SketchCircle_6_2f"), model.selection("WIRE", "Sketch_11/Face-SketchCircle_7_2f_wire")], model.selection(), 30, 2, [model.selection("SOLID", "ExtrusionCut_3_1")])
+ExtrusionCut_3_objects_1 = [model.selection("WIRE", "Sketch_11/Face-SketchCircle_4_2f-SketchCircle_6_2r_wire"), model.selection("WIRE", "Sketch_11/Face-SketchCircle_3_2f-SketchCircle_2_2r_wire"), model.selection("WIRE", "Sketch_11/Face-SketchCircle_5_2f-SketchCircle_7_2r_wire")]
+ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_3_objects_1, model.selection(), 30, -15, [model.selection("SOLID", "RevolutionCut_1_1")])
+ExtrusionCut_4_objects_1 = [model.selection("WIRE", "Sketch_11/Face-SketchCircle_2_2r_wire"), model.selection("FACE", "Sketch_11/Face-SketchCircle_6_2f"), model.selection("WIRE", "Sketch_11/Face-SketchCircle_7_2f_wire")]
+ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_4_objects_1, model.selection(), 30, 2, [model.selection("SOLID", "ExtrusionCut_3_1")])
 
 # Test reexecution after parameter change
 Parameter_R.setValue(5)