]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1379: boolean error message in revolution cut operation
authordbv <dbv@opencascade.com>
Wed, 22 Aug 2018 11:58:18 +0000 (14:58 +0300)
committerdbv <dbv@opencascade.com>
Wed, 22 Aug 2018 11:58:18 +0000 (14:58 +0300)
Added small fix and fixed test.

src/FeaturesPlugin/Test/Test1379.py
src/PartSet/PartSet_TreeNodes.cpp

index ca70c5283f849b9c22c7cd9753bbd122705bcc7c..43cdb6491e707048f9eebd0e89347d769377c1f7 100644 (file)
@@ -206,6 +206,12 @@ SketchLine_21 = Sketch_3.addLine(0.008999999999999999, 0.042, 0.029, 0.042)
 SketchLine_21.setName("SketchLine_9")
 SketchLine_21.result().setName("SketchLine_9")
 SketchLine_21.result().setColor(0, 150, 0)
+SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), False)
+SketchLine_22 = SketchProjection_6.createdFeature()
+SketchLine_22.setName("SketchLine_10")
+SketchLine_22.result().setName("SketchLine_10")
+SketchConstraintCoincidence_25 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_22.result())
+SketchConstraintCoincidence_25.setName("SketchConstraintCoincidence_9")
 SketchConstraintCoincidence_26 = Sketch_3.setCoincident(SketchLine_19.startPoint(), SketchLine_21.endPoint())
 SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_10")
 SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_20.endPoint())
@@ -213,9 +219,6 @@ SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_11")
 SketchConstraintHorizontal_6 = Sketch_3.setHorizontal(SketchLine_21.result())
 SketchConstraintAngle_2 = Sketch_3.setAngle(SketchLine_20.result(), SketchLine_21.result(), 25)
 SketchProjection_7 = Sketch_3.addProjection(model.selection("VERTEX", "PartSet/Sketch_1/Vertex-SketchLine_17s-SketchLine_16e"), False)
-SketchPoint_2 = SketchProjection_7.createdFeature()
-SketchConstraintCoincidence_28 = Sketch_3.setCoincident(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_20.endPoint())
-SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_12")
 SketchConstraintLength_6 = Sketch_3.setLength(SketchLine_21.result(), 0.02)
 RevolutionCut_1.setNestedSketch(Sketch_3)
 model.end()
index 515f7cb0314b8bebbdec69ea7f2e4f815a07f720..dbdbc4214b4c447ed92b43e2935a5dfb7b5a6141 100644 (file)
@@ -195,7 +195,7 @@ int PartSet_ObjectNode::numberOfSubs() const
   else {
     CompositeFeaturePtr aCompFeature =
       std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(myObject);
-    if (aCompFeature.get())
+    if (aCompFeature.get() && aCompFeature->data()->isValid())
       return aCompFeature->numberOfSubs(true);
     else {
       ResultFieldPtr aFieldRes = std::dynamic_pointer_cast<ModelAPI_ResultField>(myObject);