]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Task 5.1.3 Sketcher: angle dimension (issue #3061)
authorazv <azv@opencascade.com>
Wed, 11 Dec 2019 12:27:05 +0000 (15:27 +0300)
committerazv <azv@opencascade.com>
Wed, 11 Dec 2019 12:27:05 +0000 (15:27 +0300)
Additional test cases for Angle constraint.

12 files changed:
src/SketchAPI/SketchAPI.i
src/SketchAPI/SketchAPI_ConstraintAngle.cpp
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchAPI/SketchAPI_Sketch.h
src/SketchPlugin/CMakeLists.txt
src/SketchPlugin/Test/TestConstraintAngle_v0_1.py
src/SketchPlugin/Test/TestConstraintAngle_v0_2.py
src/SketchPlugin/Test/TestConstraintAngle_v20191210_1.py [new file with mode: 0644]
src/SketchPlugin/Test/TestConstraintAngle_v20191210_2.py [new file with mode: 0644]
test.hdfs/CMakeLists.txt
test.hdfs/Test3061.hdf [new file with mode: 0644]
test.hdfs/Test3061.py [new file with mode: 0644]

index 08f87c104fe754f46b9de4453fa37d5094c9f3a3..07f596c21909c1356ccbdebbcd58ca112d354aa5 100644 (file)
@@ -47,6 +47,7 @@
 // function with named parameters
 %feature("kwargs") SketchAPI_Ellipse::construction;
 %feature("kwargs") SketchAPI_EllipticArc::construction;
+%feature("kwargs") SketchAPI_Sketch::setAngle;
 
 // shared pointers
 %shared_ptr(SketchAPI_Arc)
index dbc0a3505da72374acf2fdf6f765a46b81ebf19d..4f5eedf235d63b2a44b9977a4256a1ce68f90d09 100644 (file)
@@ -84,6 +84,10 @@ static void calculatePossibleValuesOfAngle(FeaturePtr theFeature,
 static std::string angleTypeToString(FeaturePtr theFeature)
 {
   static const double TOLERANCE = 1.e-7;
+  static const std::string THE_ANGLE_DIRECT("Direct");
+  static const std::string THE_ANGLE_SUPPLEMENTARY("Supplementary");
+  static const std::string THE_ANGLE_BACKWARD("Backward");
+
   double anAngleDirect, anAngleComplmentary, anAngleBackward;
   calculatePossibleValuesOfAngle(theFeature, anAngleDirect, anAngleComplmentary, anAngleBackward);
 
@@ -100,18 +104,17 @@ static std::string angleTypeToString(FeaturePtr theFeature)
   // find the minimal difference
   std::string aType;
   if (isDirect && aDirectDiff < TOLERANCE) {
-    // Nothing to do.
-    // This case is empty and going the first to check the direct angle before the others.
+    aType = THE_ANGLE_DIRECT;
   }
   else if (isComplementary && aComplementaryDiff < TOLERANCE)
-    aType = "Complementary";
+    aType = THE_ANGLE_SUPPLEMENTARY;
   else if (isBackward && aBackwardDiff < TOLERANCE)
-    aType = "Backward";
+    aType = THE_ANGLE_BACKWARD;
   else {
     if (aComplementaryDiff < aDirectDiff && aComplementaryDiff < aBackwardDiff)
-      aType = "Complementary";
+      aType = THE_ANGLE_SUPPLEMENTARY;
     else if (aBackwardDiff < aDirectDiff && aBackwardDiff < aComplementaryDiff)
-      aType = "Backward";
+      aType = THE_ANGLE_BACKWARD;
   }
   return aType;
 }
@@ -124,10 +127,9 @@ void SketchAPI_ConstraintAngle::dump(ModelHighAPI_Dumper& theDumper) const
 
   // calculate angle value as it was just applied to the attributes
   FeaturePtr aBase = feature();
-  std::string aSetterSuffix = angleTypeToString(aBase);
 
   const std::string& aSketchName = theDumper.parentName(aBase);
-  theDumper << aBase << " = " << aSketchName << "." << "setAngle" << aSetterSuffix << "(";
+  theDumper << aBase << " = " << aSketchName << "." << "setAngle(";
 
   bool isFirstAttr = true;
   for (int i = 0; i < CONSTRAINT_ATTR_SIZE; ++i) {
@@ -142,5 +144,6 @@ void SketchAPI_ConstraintAngle::dump(ModelHighAPI_Dumper& theDumper) const
   if (aValueAttr && aValueAttr->isInitialized())
     theDumper << ", " << aValueAttr;
 
-  theDumper << ")" << std::endl;
+  std::string aType = angleTypeToString(aBase);
+  theDumper << ", type = \"" << aType << "\")" << std::endl;
 }
index bb0bcac53c315f4f3d7f1bfee01690b26804a219..6b4548cc08b2e86c076ba1dfb2adcf0cee805208 100644 (file)
@@ -75,6 +75,8 @@
 #include <GeomAPI_ShapeExplorer.h>
 #include <GeomAPI_XY.h>
 #include <GeomAlgoAPI_SketchBuilder.h>
+
+#include <algorithm>
 #include <cmath>
 //--------------------------------------------------------------------------------------
 SketchAPI_Sketch::SketchAPI_Sketch(
@@ -798,18 +800,38 @@ std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::addTrim(
 std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setAngle(
     const ModelHighAPI_RefAttr & theLine1,
     const ModelHighAPI_RefAttr & theLine2,
-    const ModelHighAPI_Double & theValue)
+    const ModelHighAPI_Double & theValue,
+    const std::string& theType)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
       compositeFeature()->addFeature(SketchPlugin_ConstraintAngle::ID());
-  fillAttribute(SketchPlugin_ConstraintAngle::THE_VERSION_0,
-      aFeature->integer(SketchPlugin_ConstraintAngle::VERSION_ID()));
-  fillAttribute(SketcherPrs_Tools::ANGLE_DIRECT,
-      aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID()));
-  // fill the value before lines to avoid calculation of angle value by the Angle feature
-  fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()));
+
+  const int aVersion = theType.empty() ? SketchPlugin_ConstraintAngle::THE_VERSION_0
+                                       : SketchPlugin_ConstraintAngle::THE_VERSION_1;
+  fillAttribute(aVersion, aFeature->integer(SketchPlugin_ConstraintAngle::VERSION_ID()));
+
+  int aType = (int)SketcherPrs_Tools::ANGLE_DIRECT;
+  fillAttribute(aType, aFeature->integer(SketchPlugin_ConstraintAngle::PREV_TYPE_ID()));
+  fillAttribute(aType, aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID()));
+
+  if (aVersion == SketchPlugin_ConstraintAngle::THE_VERSION_0)
+    fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()));
+
   fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
+
+  if (aVersion == SketchPlugin_ConstraintAngle::THE_VERSION_1) {
+    std::string aTypeLC = theType;
+    std::transform(aTypeLC.begin(), aTypeLC.end(), aTypeLC.begin(), ::tolower);
+    if (aTypeLC == "supplementary")
+      aType = (int)SketcherPrs_Tools::ANGLE_COMPLEMENTARY;
+    else if (aTypeLC == "backward")
+      aType = (int)SketcherPrs_Tools::ANGLE_BACKWARD;
+
+    fillAttribute(aType, aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID()));
+    fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()));
+  }
+
   aFeature->execute();
   return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
index a6ce997207990eed4572ad8ec1110b5d09385546..f1787c9360267c1f533f37f541c0ff84a067b53b 100644 (file)
@@ -377,7 +377,8 @@ public:
   std::shared_ptr<ModelHighAPI_Interface> setAngle(
       const ModelHighAPI_RefAttr & theLine1,
       const ModelHighAPI_RefAttr & theLine2,
-      const ModelHighAPI_Double & theValue);
+      const ModelHighAPI_Double & theValue,
+      const std::string& type = std::string());
 
   /// Set complementary angle
   SKETCHAPI_EXPORT
index c660b7aeb3ffad83dbcdf0577fd387857bb26390..ca43e4d405b60c44a4f5fbfcc598e1236ce54a60 100644 (file)
@@ -211,6 +211,10 @@ ADD_UNIT_TESTS(
   TestChangeSketchPlane3.py
   TestChangeSketchPlane4.py
   TestConstraintAngle.py
+  TestConstraintAngle_v0_1.py
+  TestConstraintAngle_v0_2.py
+  TestConstraintAngle_v20191210_1.py
+  TestConstraintAngle_v20191210_2.py
   TestConstraintAngleEllipse.py
   TestConstraintCoincidence.py
   TestConstraintCoincidenceEllipse.py
index 3590d66a4d3621c9775672578af29e66594f672b..ff630924cca6f84a6bbf1efa6856334f6c1a8989 100644 (file)
@@ -1,3 +1,22 @@
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 from salome.shaper import model
 
 model.begin()
index 77dc918e278c85158b6cbfc33f50860231f58198..5aeaf5f91d0112da2ef85ec930df577d7cdc2518 100644 (file)
@@ -1,3 +1,22 @@
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 from salome.shaper import model
 
 model.begin()
diff --git a/src/SketchPlugin/Test/TestConstraintAngle_v20191210_1.py b/src/SketchPlugin/Test/TestConstraintAngle_v20191210_1.py
new file mode 100644 (file)
index 0000000..4ddb918
--- /dev/null
@@ -0,0 +1,261 @@
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(-17.48270627886662, -77.57247534383079, 0.4653113240225388, -68.74815303974528)
+SketchLine_2 = Sketch_1.addLine(0.4653113240225388, -68.74815303974528, 8.542125432770632, -50.45156664083665)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchLine_3 = Sketch_1.addLine(8.542125432770632, -50.45156664083665, -8.178735979228234, 7.171456480488104)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchLine_4 = Sketch_1.addLine(-17.48270627886662, -77.57247534383079, -36.90385046950819, -72.79553507559329)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.startPoint())
+SketchLine_5 = Sketch_1.addLine(-48.71075203912585, -56.65251567631857, -36.90385046950819, -72.79553507559329)
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.endPoint())
+SketchLine_6 = Sketch_1.addLine(-48.71075203912585, -56.65251567631857, -47.37883052420096, -36.69691533260352)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_6.startPoint())
+SketchLine_7 = Sketch_1.addLine(-30.39232801419296, -18.99499937550162, -47.37883052420096, -36.69691533260352)
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.endPoint())
+SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_1.result(), SketchLine_2.result(), 140, type = "Direct")
+SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_2.result(), 140, type = "Direct")
+SketchConstraintAngle_3 = Sketch_1.setAngle(SketchLine_1.result(), SketchLine_4.result(), 140, type = "Direct")
+SketchConstraintAngle_4 = Sketch_1.setAngle(SketchLine_6.result(), SketchLine_5.result(), 140, type = "Direct")
+SketchConstraintAngle_5 = Sketch_1.setAngle(SketchLine_5.result(), SketchLine_4.result(), 140, type = "Direct")
+SketchConstraintAngle_6 = Sketch_1.setAngle(SketchLine_6.result(), SketchLine_7.result(), 140, type = "Direct")
+SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_2.result(), 20)
+SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_1.result())
+SketchConstraintEqual_2 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_4.result())
+SketchConstraintEqual_3 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_5.result())
+SketchConstraintEqual_4 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_6.result())
+SketchLine_8 = Sketch_1.addLine(14.775406531722, -47.38691166633646, -20.64529817713098, 1.042146531487715)
+SketchPoint_1 = Sketch_1.addPoint(2.968504962104344, -31.24389226706174)
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_3.result())
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_8.result())
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_2.endPoint(), SketchPoint_1.coordinates(), 20, True)
+SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_8.startPoint(), SketchPoint_1.coordinates(), 20, True)
+SketchConstraintDistance_3 = Sketch_1.setDistance(SketchPoint_1.coordinates(), SketchLine_3.endPoint(), 40, True)
+SketchConstraintEqual_5 = Sketch_1.setEqual(SketchLine_3.result(), SketchLine_8.result())
+SketchLine_9 = Sketch_1.addLine(19.58460105006861, -42.37517030669127, -30.26368721382418, -8.981336187802668)
+SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_9.result())
+SketchConstraintEqual_6 = Sketch_1.setEqual(SketchLine_3.result(), SketchLine_9.result())
+SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_9.startPoint(), SketchPoint_1.coordinates(), 20, True)
+SketchConstraintAngle_7 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_8.result(), 20, type = "Direct")
+SketchConstraintAngle_8 = Sketch_1.setAngle(SketchLine_9.result(), SketchLine_8.result(), 20, type = "Direct")
+SketchLine_10 = Sketch_1.addLine(3.875430505227681, -29.75334619738324, -48.69363438803513, -0.8311502875301234)
+SketchPoint_2 = Sketch_1.addPoint(-13.64759112585992, -20.1126142274322)
+SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_10.result())
+SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_9.result())
+SketchConstraintDistance_5 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchLine_10.startPoint(), 20, True)
+SketchConstraintDistance_6 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchLine_9.endPoint(), 20, True)
+SketchConstraintEqual_7 = Sketch_1.setEqual(SketchLine_9.result(), SketchLine_10.result())
+SketchLine_11 = Sketch_1.addLine(0.001529676402264532, -26.13785899518266, -31.94417752476854, -12.03580011868412)
+SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_11.result())
+SketchConstraintDistance_7 = Sketch_1.setDistance(SketchLine_11.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_9 = Sketch_1.setAngle(SketchLine_9.result(), SketchLine_10.result(), 175, type = "Direct")
+SketchConstraintAngle_10 = Sketch_1.setAngle(SketchLine_11.result(), SketchLine_10.result(), 5, type = "Direct")
+SketchLine_12 = Sketch_1.addLine(5.283311970593094, -26.56404104269606, -51.50939731876596, -7.20976059690448)
+SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_12.result())
+SketchConstraintEqual_8 = Sketch_1.setEqual(SketchLine_9.result(), SketchLine_12.result())
+SketchConstraintDistance_8 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchLine_12.startPoint(), 20, True)
+SketchConstraintAngle_11 = Sketch_1.setAngle(SketchLine_12.result(), SketchLine_11.result(), 5, type = "Direct")
+SketchLine_13 = Sketch_1.addLine(25.19469725542325, -29.66649476390714, -33.06873531650151, -15.33567395919474)
+SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_13.result())
+SketchConstraintEqual_9 = Sketch_1.setEqual(SketchLine_12.result(), SketchLine_13.result())
+SketchConstraintDistance_9 = Sketch_1.setDistance(SketchLine_13.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_12 = Sketch_1.setAngle(SketchLine_12.result(), SketchLine_13.result(), 175, type = "Direct")
+SketchLine_14 = Sketch_1.addLine(25.87956617560386, -26.24481087018098, -33.41116977659181, -17.04651590605781)
+SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_14.result())
+SketchConstraintDistance_10 = Sketch_1.setDistance(SketchLine_14.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_13 = Sketch_1.setAngle(SketchLine_13.result(), SketchLine_14.result(), 5, type = "Direct")
+SketchConstraintEqual_10 = Sketch_1.setEqual(SketchLine_13.result(), SketchLine_14.result())
+SketchLine_15 = Sketch_1.addLine(26.26360956157018, -22.77645725728195, -33.60319146957497, -18.78069271250733)
+SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_15.result())
+SketchConstraintEqual_11 = Sketch_1.setEqual(SketchLine_14.result(), SketchLine_15.result())
+SketchConstraintDistance_11 = Sketch_1.setDistance(SketchLine_15.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_14 = Sketch_1.setAngle(SketchLine_15.result(), SketchLine_14.result(), 5, type = "Direct")
+SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchLine_7.startPoint(), SketchLine_15.result())
+
+SketchLine_16 = Sketch_1.addLine(60.00388909712782, -76.09960829009104, 78.00643494689578, -67.38706888260469)
+SketchLine_17 = Sketch_1.addLine(78.00643494689578, -67.38706888260469, 86.19687277706721, -49.141063069)
+SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint())
+SketchLine_18 = Sketch_1.addLine(86.19687277706721, -49.141063069, 69.83467154684908, 8.584826884311665)
+SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint())
+SketchLine_19 = Sketch_1.addLine(60.00388909712782, -76.09960829009104, 40.61282650688053, -71.20198727360641)
+SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchLine_16.startPoint(), SketchLine_19.startPoint())
+SketchLine_20 = Sketch_1.addLine(28.90654086978602, -54.98585713775849, 40.61282650688053, -71.20198727360641)
+SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchLine_19.endPoint(), SketchLine_20.endPoint())
+SketchLine_21 = Sketch_1.addLine(28.90654086978602, -54.98585713775849, 30.36253333631381, -35.03892539532215)
+SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchLine_20.startPoint(), SketchLine_21.startPoint())
+SketchLine_22 = Sketch_1.addLine(47.45878924889096, -17.44298467461911, 30.36253333631381, -35.03892539532215)
+SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_21.endPoint(), SketchLine_22.endPoint())
+SketchConstraintAngle_15 = Sketch_1.setAngle(SketchLine_16.result(), SketchLine_17.result(), 40, type = "Supplementary")
+SketchConstraintAngle_16 = Sketch_1.setAngle(SketchLine_18.result(), SketchLine_17.result(), 40, type = "Supplementary")
+SketchConstraintAngle_17 = Sketch_1.setAngle(SketchLine_16.result(), SketchLine_19.result(), 40, type = "Supplementary")
+SketchConstraintAngle_18 = Sketch_1.setAngle(SketchLine_21.result(), SketchLine_20.result(), 40, type = "Supplementary")
+SketchConstraintAngle_19 = Sketch_1.setAngle(SketchLine_20.result(), SketchLine_19.result(), 40, type = "Supplementary")
+SketchConstraintAngle_20 = Sketch_1.setAngle(SketchLine_21.result(), SketchLine_22.result(), 40, type = "Supplementary")
+SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_17.result(), 20)
+SketchConstraintEqual_12 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_16.result())
+SketchConstraintEqual_13 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_19.result())
+SketchConstraintEqual_14 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_20.result())
+SketchConstraintEqual_15 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_21.result())
+SketchLine_23 = Sketch_1.addLine(92.44909133742235, -46.11522988707736, 57.3302344261388, 2.533160520466375)
+SketchPoint_3 = Sketch_1.addPoint(80.74280570032784, -29.89909975122945)
+SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchLine_18.result())
+SketchConstraintCoincidence_25 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchLine_23.result())
+SketchConstraintDistance_12 = Sketch_1.setDistance(SketchLine_17.endPoint(), SketchPoint_3.coordinates(), 20, True)
+SketchConstraintDistance_13 = Sketch_1.setDistance(SketchLine_23.startPoint(), SketchPoint_3.coordinates(), 20, True)
+SketchConstraintDistance_14 = Sketch_1.setDistance(SketchPoint_3.coordinates(), SketchLine_18.endPoint(), 40, True)
+SketchConstraintEqual_16 = Sketch_1.setEqual(SketchLine_18.result(), SketchLine_23.result())
+SketchLine_24 = Sketch_1.addLine(97.289359083568, -41.13349208617944, 47.64969893384747, -7.430315081329468)
+SketchConstraintCoincidence_26 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchLine_24.result())
+SketchConstraintEqual_17 = Sketch_1.setEqual(SketchLine_18.result(), SketchLine_24.result())
+SketchConstraintDistance_15 = Sketch_1.setDistance(SketchLine_24.startPoint(), SketchPoint_3.coordinates(), 20, True)
+SketchConstraintAngle_21 = Sketch_1.setAngle(SketchLine_18.result(), SketchLine_23.result(), 160, type = "Supplementary")
+SketchConstraintAngle_22 = Sketch_1.setAngle(SketchLine_24.result(), SketchLine_23.result(), 160, type = "Supplementary")
+SketchLine_25 = Sketch_1.addLine(81.65898287743471, -28.41422234660911, 29.27079119639352, 0.8343224443798635)
+SketchPoint_4 = Sketch_1.addPoint(64.19625231708766, -18.66470741627946)
+SketchConstraintCoincidence_27 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_25.result())
+SketchConstraintCoincidence_28 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_24.result())
+SketchConstraintDistance_16 = Sketch_1.setDistance(SketchPoint_4.coordinates(), SketchLine_25.startPoint(), 20, True)
+SketchConstraintDistance_17 = Sketch_1.setDistance(SketchPoint_4.coordinates(), SketchLine_24.endPoint(), 20, True)
+SketchConstraintEqual_18 = Sketch_1.setEqual(SketchLine_24.result(), SketchLine_25.result())
+SketchLine_26 = Sketch_1.addLine(95.51651619313817, -32.72404055044315, 45.95024650348294, -10.47426958610802)
+SketchConstraintCoincidence_29 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_26.result())
+SketchConstraintDistance_18 = Sketch_1.setDistance(SketchLine_26.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_23 = Sketch_1.setAngle(SketchLine_24.result(), SketchLine_25.result(), 5, type = "Supplementary")
+SketchConstraintAngle_24 = Sketch_1.setAngle(SketchLine_26.result(), SketchLine_25.result(), 5, type = "Supplementary")
+SketchLine_27 = Sketch_1.addLine(83.08667026246893, -25.23373396888348, 26.41541642632507, -5.526654311071399)
+SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_27.result())
+SketchConstraintEqual_19 = Sketch_1.setEqual(SketchLine_24.result(), SketchLine_27.result())
+SketchConstraintDistance_19 = Sketch_1.setDistance(SketchPoint_4.coordinates(), SketchLine_27.startPoint(), 20, True)
+SketchConstraintAngle_25 = Sketch_1.setAngle(SketchLine_27.result(), SketchLine_26.result(), 5, type = "Supplementary")
+SketchLine_28 = Sketch_1.addLine(102.9783774975822, -28.45994944924871, 44.80518972684035, -13.76708639979482)
+SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_28.result())
+SketchConstraintEqual_20 = Sketch_1.setEqual(SketchLine_27.result(), SketchLine_28.result())
+SketchConstraintDistance_20 = Sketch_1.setDistance(SketchLine_28.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_26 = Sketch_1.setAngle(SketchLine_27.result(), SketchLine_28.result(), 5, type = "Supplementary")
+SketchLine_29 = Sketch_1.addLine(103.6845113974033, -25.04259067061018, 44.45212277692985, -15.47576578911409)
+SketchConstraintCoincidence_32 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_29.result())
+SketchConstraintDistance_21 = Sketch_1.setDistance(SketchLine_29.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_27 = Sketch_1.setAngle(SketchLine_28.result(), SketchLine_29.result(), 175, type = "Supplementary")
+SketchConstraintEqual_21 = Sketch_1.setEqual(SketchLine_28.result(), SketchLine_29.result())
+SketchLine_30 = Sketch_1.addLine(104.0901158019603, -21.57669234933498, 44.24932057465131, -17.20871494975169)
+SketchConstraintCoincidence_33 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_30.result())
+SketchConstraintEqual_22 = Sketch_1.setEqual(SketchLine_29.result(), SketchLine_30.result())
+SketchConstraintDistance_22 = Sketch_1.setDistance(SketchLine_30.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_28 = Sketch_1.setAngle(SketchLine_30.result(), SketchLine_29.result(), 175, type = "Supplementary")
+SketchConstraintCoincidence_34 = Sketch_1.setCoincident(SketchLine_22.startPoint(), SketchLine_30.result())
+
+SketchLine_31 = Sketch_1.addLine(138.7804692087479, -78.2421341225341, 156.7284871354776, -69.4178124771163)
+SketchLine_32 = Sketch_1.addLine(156.7284871354776, -69.4178124771163, 164.8053019156854, -51.12122637461573)
+SketchConstraintCoincidence_35 = Sketch_1.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
+SketchLine_33 = Sketch_1.addLine(164.8053019156854, -51.12122637461573, 148.0844426183728, 6.501797360341752)
+SketchConstraintCoincidence_36 = Sketch_1.setCoincident(SketchLine_32.endPoint(), SketchLine_33.startPoint())
+SketchLine_34 = Sketch_1.addLine(138.7804692087479, -78.2421341225341, 119.3593251934135, -73.46519314156717)
+SketchConstraintCoincidence_37 = Sketch_1.setCoincident(SketchLine_31.startPoint(), SketchLine_34.startPoint())
+SketchLine_35 = Sketch_1.addLine(107.5524242162226, -57.32217330899532, 119.3593251934135, -73.46519314156717)
+SketchConstraintCoincidence_38 = Sketch_1.setCoincident(SketchLine_34.endPoint(), SketchLine_35.endPoint())
+SketchLine_36 = Sketch_1.addLine(107.5524242162226, -57.32217330899532, 108.8843464634908, -37.36657301415998)
+SketchConstraintCoincidence_39 = Sketch_1.setCoincident(SketchLine_35.startPoint(), SketchLine_36.startPoint())
+SketchLine_37 = Sketch_1.addLine(125.8708496231354, -19.66465768043951, 108.8843464634908, -37.36657301415998)
+SketchConstraintCoincidence_40 = Sketch_1.setCoincident(SketchLine_36.endPoint(), SketchLine_37.endPoint())
+SketchConstraintAngle_29 = Sketch_1.setAngle(SketchLine_31.result(), SketchLine_32.result(), 220, type = "Backward")
+SketchConstraintAngle_30 = Sketch_1.setAngle(SketchLine_33.result(), SketchLine_32.result(), 220, type = "Backward")
+SketchConstraintAngle_31 = Sketch_1.setAngle(SketchLine_31.result(), SketchLine_34.result(), 220, type = "Backward")
+SketchConstraintAngle_32 = Sketch_1.setAngle(SketchLine_36.result(), SketchLine_35.result(), 220, type = "Backward")
+SketchConstraintAngle_33 = Sketch_1.setAngle(SketchLine_35.result(), SketchLine_34.result(), 220, type = "Backward")
+SketchConstraintAngle_34 = Sketch_1.setAngle(SketchLine_36.result(), SketchLine_37.result(), 220, type = "Backward")
+SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_32.result(), 20)
+SketchConstraintEqual_23 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_31.result())
+SketchConstraintEqual_24 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_34.result())
+SketchConstraintEqual_25 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_35.result())
+SketchConstraintEqual_26 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_36.result())
+SketchLine_38 = Sketch_1.addLine(171.0385831271055, -48.05657162886843, 135.6178801955327, 0.3724878688471688)
+SketchPoint_5 = Sketch_1.addPoint(159.2316821499145, -31.91355179629657)
+SketchConstraintCoincidence_41 = Sketch_1.setCoincident(SketchPoint_5.coordinates(), SketchLine_33.result())
+SketchConstraintCoincidence_42 = Sketch_1.setCoincident(SketchPoint_5.coordinates(), SketchLine_38.result())
+SketchConstraintDistance_23 = Sketch_1.setDistance(SketchLine_32.endPoint(), SketchPoint_5.coordinates(), 20, True)
+SketchConstraintDistance_24 = Sketch_1.setDistance(SketchLine_38.startPoint(), SketchPoint_5.coordinates(), 20, True)
+SketchConstraintDistance_25 = Sketch_1.setDistance(SketchPoint_5.coordinates(), SketchLine_33.endPoint(), 40, True)
+SketchConstraintEqual_27 = Sketch_1.setEqual(SketchLine_33.result(), SketchLine_38.result())
+SketchLine_39 = Sketch_1.addLine(175.8477778293761, -43.04483044571408, 125.9994907909914, -9.650994497461493)
+SketchConstraintCoincidence_43 = Sketch_1.setCoincident(SketchPoint_5.coordinates(), SketchLine_39.result())
+SketchConstraintEqual_28 = Sketch_1.setEqual(SketchLine_33.result(), SketchLine_39.result())
+SketchConstraintDistance_26 = Sketch_1.setDistance(SketchLine_39.startPoint(), SketchPoint_5.coordinates(), 20, True)
+SketchConstraintAngle_35 = Sketch_1.setAngle(SketchLine_33.result(), SketchLine_38.result(), 340, type = "Backward")
+SketchConstraintAngle_36 = Sketch_1.setAngle(SketchLine_39.result(), SketchLine_38.result(), 340, type = "Backward")
+SketchLine_40 = Sketch_1.addLine(160.1386077477389, -30.42300575990098, 107.5695439158812, -1.500807920835093)
+SketchPoint_6 = Sketch_1.addPoint(142.615586470453, -20.78227314687903)
+SketchConstraintCoincidence_44 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_40.result())
+SketchConstraintCoincidence_45 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_39.result())
+SketchConstraintDistance_27 = Sketch_1.setDistance(SketchPoint_6.coordinates(), SketchLine_40.startPoint(), 20, True)
+SketchConstraintDistance_28 = Sketch_1.setDistance(SketchPoint_6.coordinates(), SketchLine_39.endPoint(), 20, True)
+SketchConstraintEqual_29 = Sketch_1.setEqual(SketchLine_39.result(), SketchLine_40.result())
+SketchLine_41 = Sketch_1.addLine(147.1612701207084, -22.78891223719074, 124.3190003679524, -12.70545836667124)
+SketchConstraintCoincidence_46 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_41.result())
+SketchConstraintDistance_29 = Sketch_1.setDistance(SketchLine_41.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_37 = Sketch_1.setAngle(SketchLine_39.result(), SketchLine_40.result(), 185, type = "Backward")
+SketchConstraintAngle_38 = Sketch_1.setAngle(SketchLine_41.result(), SketchLine_40.result(), 355, type = "Backward")
+SketchLine_42 = Sketch_1.addLine(161.5464893301474, -27.23370065688114, 104.7537807510641, -7.879418126874779)
+SketchConstraintCoincidence_47 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_42.result())
+SketchConstraintEqual_30 = Sketch_1.setEqual(SketchLine_39.result(), SketchLine_42.result())
+SketchConstraintDistance_30 = Sketch_1.setDistance(SketchPoint_6.coordinates(), SketchLine_42.startPoint(), 20, True)
+SketchConstraintAngle_39 = Sketch_1.setAngle(SketchLine_42.result(), SketchLine_41.result(), 355, type = "Backward")
+SketchLine_43 = Sketch_1.addLine(181.4578745011218, -30.33615510881286, 123.1944424551186, -16.0053321659121)
+SketchConstraintCoincidence_48 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_43.result())
+SketchConstraintEqual_31 = Sketch_1.setEqual(SketchLine_42.result(), SketchLine_43.result())
+SketchConstraintDistance_31 = Sketch_1.setDistance(SketchLine_43.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_40 = Sketch_1.setAngle(SketchLine_42.result(), SketchLine_43.result(), 185, type = "Backward")
+SketchLine_44 = Sketch_1.addLine(182.1427435468735, -26.91447124022047, 122.8520079322427, -17.71617410020831)
+SketchConstraintCoincidence_49 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_44.result())
+SketchConstraintDistance_32 = Sketch_1.setDistance(SketchLine_44.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_41 = Sketch_1.setAngle(SketchLine_43.result(), SketchLine_44.result(), 355, type = "Backward")
+SketchConstraintEqual_32 = Sketch_1.setEqual(SketchLine_43.result(), SketchLine_44.result())
+SketchLine_45 = Sketch_1.addLine(182.5267870601237, -23.44611764141531, 122.6599861756176, -19.45035089961089)
+SketchConstraintCoincidence_50 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_45.result())
+SketchConstraintEqual_33 = Sketch_1.setEqual(SketchLine_44.result(), SketchLine_45.result())
+SketchConstraintDistance_33 = Sketch_1.setDistance(SketchLine_45.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_42 = Sketch_1.setAngle(SketchLine_45.result(), SketchLine_44.result(), 355, type = "Backward")
+SketchConstraintCoincidence_51 = Sketch_1.setCoincident(SketchLine_37.startPoint(), SketchLine_45.result())
+model.do()
+Extrusion_1_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_9f-SketchLine_15f-SketchLine_7f-SketchLine_6r-SketchLine_5f-SketchLine_4r"), model.selection("FACE", "Sketch_1/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchLine_24f-SketchLine_30f-SketchLine_22f-SketchLine_21r-SketchLine_20f-SketchLine_19r"), model.selection("FACE", "Sketch_1/Face-SketchLine_31f-SketchLine_32f-SketchLine_33f-SketchLine_39f-SketchLine_45f-SketchLine_37f-SketchLine_36r-SketchLine_35f-SketchLine_34r")]
+Extrusion_1 = model.addExtrusion(Part_1_doc, Extrusion_1_objects, model.selection(), 10, 0)
+model.do()
+
+model.end()
+
+from GeomAPI import *
+
+REF_VOLUME = 25018.7130187615
+
+model.testNbResults(Extrusion_1, 3)
+model.testNbSubResults(Extrusion_1, [0, 0, 0])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.SOLID, [1, 1, 1])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [11, 11, 11])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [54, 54, 54])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [108, 108, 108])
+model.testResultsVolumes(Extrusion_1, [REF_VOLUME, REF_VOLUME, REF_VOLUME])
+
+assert(model.checkPythonDump())
diff --git a/src/SketchPlugin/Test/TestConstraintAngle_v20191210_2.py b/src/SketchPlugin/Test/TestConstraintAngle_v20191210_2.py
new file mode 100644 (file)
index 0000000..5abdc94
--- /dev/null
@@ -0,0 +1,262 @@
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+model.addParameter(Part_1_doc, "Ang", "140")
+model.addParameter(Part_1_doc, "dAng", "5")
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(-17.48270627886662, -77.57247534383079, 0.4653113240225388, -68.74815303974528)
+SketchLine_2 = Sketch_1.addLine(0.4653113240225388, -68.74815303974528, 8.542125432770632, -50.45156664083665)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchLine_3 = Sketch_1.addLine(8.542125432770632, -50.45156664083665, -8.178735979228234, 7.171456480488104)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchLine_4 = Sketch_1.addLine(-17.48270627886662, -77.57247534383079, -36.90385046950819, -72.79553507559329)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.startPoint())
+SketchLine_5 = Sketch_1.addLine(-48.71075203912585, -56.65251567631857, -36.90385046950819, -72.79553507559329)
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.endPoint())
+SketchLine_6 = Sketch_1.addLine(-48.71075203912585, -56.65251567631857, -47.37883052420096, -36.69691533260352)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_6.startPoint())
+SketchLine_7 = Sketch_1.addLine(-30.39232801419296, -18.99499937550162, -47.37883052420096, -36.69691533260352)
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.endPoint())
+SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_1.result(), SketchLine_2.result(), "Ang", type = "Direct")
+SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_2.result(), "Ang", type = "Direct")
+SketchConstraintAngle_3 = Sketch_1.setAngle(SketchLine_1.result(), SketchLine_4.result(), "Ang", type = "Direct")
+SketchConstraintAngle_4 = Sketch_1.setAngle(SketchLine_6.result(), SketchLine_5.result(), "Ang", type = "Direct")
+SketchConstraintAngle_5 = Sketch_1.setAngle(SketchLine_5.result(), SketchLine_4.result(), "Ang", type = "Direct")
+SketchConstraintAngle_6 = Sketch_1.setAngle(SketchLine_6.result(), SketchLine_7.result(), "Ang", type = "Direct")
+SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_2.result(), 20)
+SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_1.result())
+SketchConstraintEqual_2 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_4.result())
+SketchConstraintEqual_3 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_5.result())
+SketchConstraintEqual_4 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_6.result())
+SketchLine_8 = Sketch_1.addLine(14.775406531722, -47.38691166633646, -20.64529817713098, 1.042146531487715)
+SketchPoint_1 = Sketch_1.addPoint(2.968504962104344, -31.24389226706174)
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_3.result())
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_8.result())
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_2.endPoint(), SketchPoint_1.coordinates(), 20, True)
+SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_8.startPoint(), SketchPoint_1.coordinates(), 20, True)
+SketchConstraintDistance_3 = Sketch_1.setDistance(SketchPoint_1.coordinates(), SketchLine_3.endPoint(), 40, True)
+SketchConstraintEqual_5 = Sketch_1.setEqual(SketchLine_3.result(), SketchLine_8.result())
+SketchLine_9 = Sketch_1.addLine(19.58460105006861, -42.37517030669127, -30.26368721382418, -8.981336187802668)
+SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_9.result())
+SketchConstraintEqual_6 = Sketch_1.setEqual(SketchLine_3.result(), SketchLine_9.result())
+SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_9.startPoint(), SketchPoint_1.coordinates(), 20, True)
+SketchConstraintAngle_7 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_8.result(), "(180-Ang)/2", type = "Direct")
+SketchConstraintAngle_8 = Sketch_1.setAngle(SketchLine_9.result(), SketchLine_8.result(), "(180-Ang)/2", type = "Direct")
+SketchLine_10 = Sketch_1.addLine(3.875430505227681, -29.75334619738324, -48.69363438803513, -0.8311502875301234)
+SketchPoint_2 = Sketch_1.addPoint(-13.64759112585992, -20.1126142274322)
+SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_10.result())
+SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_9.result())
+SketchConstraintDistance_5 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchLine_10.startPoint(), 20, True)
+SketchConstraintDistance_6 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchLine_9.endPoint(), 20, True)
+SketchConstraintEqual_7 = Sketch_1.setEqual(SketchLine_9.result(), SketchLine_10.result())
+SketchLine_11 = Sketch_1.addLine(0.001529676402264532, -26.13785899518266, -31.94417752476854, -12.03580011868412)
+SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_11.result())
+SketchConstraintDistance_7 = Sketch_1.setDistance(SketchLine_11.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_9 = Sketch_1.setAngle(SketchLine_9.result(), SketchLine_10.result(), "180-dAng", type = "Direct")
+SketchConstraintAngle_10 = Sketch_1.setAngle(SketchLine_11.result(), SketchLine_10.result(), "dAng", type = "Direct")
+SketchLine_12 = Sketch_1.addLine(5.283311970593094, -26.56404104269606, -51.50939731876596, -7.20976059690448)
+SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_12.result())
+SketchConstraintEqual_8 = Sketch_1.setEqual(SketchLine_9.result(), SketchLine_12.result())
+SketchConstraintDistance_8 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchLine_12.startPoint(), 20, True)
+SketchConstraintAngle_11 = Sketch_1.setAngle(SketchLine_12.result(), SketchLine_11.result(), "dAng", type = "Direct")
+SketchLine_13 = Sketch_1.addLine(25.19469725542325, -29.66649476390714, -33.06873531650151, -15.33567395919474)
+SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_13.result())
+SketchConstraintEqual_9 = Sketch_1.setEqual(SketchLine_12.result(), SketchLine_13.result())
+SketchConstraintDistance_9 = Sketch_1.setDistance(SketchLine_13.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_12 = Sketch_1.setAngle(SketchLine_12.result(), SketchLine_13.result(), "180-dAng", type = "Direct")
+SketchLine_14 = Sketch_1.addLine(25.87956617560386, -26.24481087018098, -33.41116977659181, -17.04651590605781)
+SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_14.result())
+SketchConstraintDistance_10 = Sketch_1.setDistance(SketchLine_14.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_13 = Sketch_1.setAngle(SketchLine_13.result(), SketchLine_14.result(), "dAng", type = "Direct")
+SketchConstraintEqual_10 = Sketch_1.setEqual(SketchLine_13.result(), SketchLine_14.result())
+SketchLine_15 = Sketch_1.addLine(26.26360956157018, -22.77645725728195, -33.60319146957497, -18.78069271250733)
+SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_15.result())
+SketchConstraintEqual_11 = Sketch_1.setEqual(SketchLine_14.result(), SketchLine_15.result())
+SketchConstraintDistance_11 = Sketch_1.setDistance(SketchLine_15.endPoint(), SketchPoint_2.coordinates(), 20, True)
+SketchConstraintAngle_14 = Sketch_1.setAngle(SketchLine_15.result(), SketchLine_14.result(), "dAng", type = "Direct")
+SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchLine_7.startPoint(), SketchLine_15.result())
+SketchLine_16 = Sketch_1.addLine(60.00388909712782, -76.09960829009104, 78.00643494689578, -67.38706888260469)
+SketchLine_17 = Sketch_1.addLine(78.00643494689578, -67.38706888260469, 86.19687277706721, -49.141063069)
+SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint())
+SketchLine_18 = Sketch_1.addLine(86.19687277706721, -49.141063069, 69.83467154684908, 8.584826884311665)
+SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint())
+SketchLine_19 = Sketch_1.addLine(60.00388909712782, -76.09960829009104, 40.61282650688053, -71.20198727360641)
+SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchLine_16.startPoint(), SketchLine_19.startPoint())
+SketchLine_20 = Sketch_1.addLine(28.90654086978602, -54.98585713775849, 40.61282650688053, -71.20198727360641)
+SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchLine_19.endPoint(), SketchLine_20.endPoint())
+SketchLine_21 = Sketch_1.addLine(28.90654086978602, -54.98585713775849, 30.36253333631381, -35.03892539532215)
+SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchLine_20.startPoint(), SketchLine_21.startPoint())
+SketchLine_22 = Sketch_1.addLine(47.45878924889096, -17.44298467461911, 30.36253333631381, -35.03892539532215)
+SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_21.endPoint(), SketchLine_22.endPoint())
+SketchConstraintAngle_15 = Sketch_1.setAngle(SketchLine_16.result(), SketchLine_17.result(), "180-Ang", type = "Supplementary")
+SketchConstraintAngle_16 = Sketch_1.setAngle(SketchLine_18.result(), SketchLine_17.result(), "180-Ang", type = "Supplementary")
+SketchConstraintAngle_17 = Sketch_1.setAngle(SketchLine_16.result(), SketchLine_19.result(), "180-Ang", type = "Supplementary")
+SketchConstraintAngle_18 = Sketch_1.setAngle(SketchLine_21.result(), SketchLine_20.result(), "180-Ang", type = "Supplementary")
+SketchConstraintAngle_19 = Sketch_1.setAngle(SketchLine_20.result(), SketchLine_19.result(), "180-Ang", type = "Supplementary")
+SketchConstraintAngle_20 = Sketch_1.setAngle(SketchLine_21.result(), SketchLine_22.result(), "180-Ang", type = "Supplementary")
+SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_17.result(), 20)
+SketchConstraintEqual_12 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_16.result())
+SketchConstraintEqual_13 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_19.result())
+SketchConstraintEqual_14 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_20.result())
+SketchConstraintEqual_15 = Sketch_1.setEqual(SketchLine_17.result(), SketchLine_21.result())
+SketchLine_23 = Sketch_1.addLine(92.44909133742235, -46.11522988707736, 57.3302344261388, 2.533160520466375)
+SketchPoint_3 = Sketch_1.addPoint(80.74280570032784, -29.89909975122945)
+SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchLine_18.result())
+SketchConstraintCoincidence_25 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchLine_23.result())
+SketchConstraintDistance_12 = Sketch_1.setDistance(SketchLine_17.endPoint(), SketchPoint_3.coordinates(), 20, True)
+SketchConstraintDistance_13 = Sketch_1.setDistance(SketchLine_23.startPoint(), SketchPoint_3.coordinates(), 20, True)
+SketchConstraintDistance_14 = Sketch_1.setDistance(SketchPoint_3.coordinates(), SketchLine_18.endPoint(), 40, True)
+SketchConstraintEqual_16 = Sketch_1.setEqual(SketchLine_18.result(), SketchLine_23.result())
+SketchLine_24 = Sketch_1.addLine(97.289359083568, -41.13349208617944, 47.64969893384747, -7.430315081329468)
+SketchConstraintCoincidence_26 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchLine_24.result())
+SketchConstraintEqual_17 = Sketch_1.setEqual(SketchLine_18.result(), SketchLine_24.result())
+SketchConstraintDistance_15 = Sketch_1.setDistance(SketchLine_24.startPoint(), SketchPoint_3.coordinates(), 20, True)
+SketchConstraintAngle_21 = Sketch_1.setAngle(SketchLine_18.result(), SketchLine_23.result(), "90+Ang/2", type = "Supplementary")
+SketchConstraintAngle_22 = Sketch_1.setAngle(SketchLine_24.result(), SketchLine_23.result(), "90+Ang/2", type = "Supplementary")
+SketchLine_25 = Sketch_1.addLine(81.65898287743471, -28.41422234660911, 29.27079119639352, 0.8343224443798635)
+SketchPoint_4 = Sketch_1.addPoint(64.19625231708766, -18.66470741627946)
+SketchConstraintCoincidence_27 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_25.result())
+SketchConstraintCoincidence_28 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_24.result())
+SketchConstraintDistance_16 = Sketch_1.setDistance(SketchPoint_4.coordinates(), SketchLine_25.startPoint(), 20, True)
+SketchConstraintDistance_17 = Sketch_1.setDistance(SketchPoint_4.coordinates(), SketchLine_24.endPoint(), 20, True)
+SketchConstraintEqual_18 = Sketch_1.setEqual(SketchLine_24.result(), SketchLine_25.result())
+SketchLine_26 = Sketch_1.addLine(95.51651619313817, -32.72404055044315, 45.95024650348294, -10.47426958610802)
+SketchConstraintCoincidence_29 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_26.result())
+SketchConstraintDistance_18 = Sketch_1.setDistance(SketchLine_26.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_23 = Sketch_1.setAngle(SketchLine_24.result(), SketchLine_25.result(), "dAng", type = "Supplementary")
+SketchConstraintAngle_24 = Sketch_1.setAngle(SketchLine_26.result(), SketchLine_25.result(), "dAng", type = "Supplementary")
+SketchLine_27 = Sketch_1.addLine(83.08667026246893, -25.23373396888348, 26.41541642632507, -5.526654311071399)
+SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_27.result())
+SketchConstraintEqual_19 = Sketch_1.setEqual(SketchLine_24.result(), SketchLine_27.result())
+SketchConstraintDistance_19 = Sketch_1.setDistance(SketchPoint_4.coordinates(), SketchLine_27.startPoint(), 20, True)
+SketchConstraintAngle_25 = Sketch_1.setAngle(SketchLine_27.result(), SketchLine_26.result(), "dAng", type = "Supplementary")
+SketchLine_28 = Sketch_1.addLine(102.9783774975822, -28.45994944924871, 44.80518972684035, -13.76708639979482)
+SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_28.result())
+SketchConstraintEqual_20 = Sketch_1.setEqual(SketchLine_27.result(), SketchLine_28.result())
+SketchConstraintDistance_20 = Sketch_1.setDistance(SketchLine_28.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_26 = Sketch_1.setAngle(SketchLine_27.result(), SketchLine_28.result(), "dAng", type = "Supplementary")
+SketchLine_29 = Sketch_1.addLine(103.6845113974033, -25.04259067061018, 44.45212277692985, -15.47576578911409)
+SketchConstraintCoincidence_32 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_29.result())
+SketchConstraintDistance_21 = Sketch_1.setDistance(SketchLine_29.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_27 = Sketch_1.setAngle(SketchLine_28.result(), SketchLine_29.result(), "180-dAng", type = "Supplementary")
+SketchConstraintEqual_21 = Sketch_1.setEqual(SketchLine_28.result(), SketchLine_29.result())
+SketchLine_30 = Sketch_1.addLine(104.0901158019603, -21.57669234933498, 44.24932057465131, -17.20871494975169)
+SketchConstraintCoincidence_33 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchLine_30.result())
+SketchConstraintEqual_22 = Sketch_1.setEqual(SketchLine_29.result(), SketchLine_30.result())
+SketchConstraintDistance_22 = Sketch_1.setDistance(SketchLine_30.endPoint(), SketchPoint_4.coordinates(), 20, True)
+SketchConstraintAngle_28 = Sketch_1.setAngle(SketchLine_30.result(), SketchLine_29.result(), "180-dAng", type = "Supplementary")
+SketchConstraintCoincidence_34 = Sketch_1.setCoincident(SketchLine_22.startPoint(), SketchLine_30.result())
+
+SketchLine_31 = Sketch_1.addLine(138.7804692087479, -78.2421341225341, 156.7284871354776, -69.4178124771163)
+SketchLine_32 = Sketch_1.addLine(156.7284871354776, -69.4178124771163, 164.8053019156854, -51.12122637461573)
+SketchConstraintCoincidence_35 = Sketch_1.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
+SketchLine_33 = Sketch_1.addLine(164.8053019156854, -51.12122637461573, 148.0844426183728, 6.501797360341752)
+SketchConstraintCoincidence_36 = Sketch_1.setCoincident(SketchLine_32.endPoint(), SketchLine_33.startPoint())
+SketchLine_34 = Sketch_1.addLine(138.7804692087479, -78.2421341225341, 119.3593251934135, -73.46519314156717)
+SketchConstraintCoincidence_37 = Sketch_1.setCoincident(SketchLine_31.startPoint(), SketchLine_34.startPoint())
+SketchLine_35 = Sketch_1.addLine(107.5524242162226, -57.32217330899532, 119.3593251934135, -73.46519314156717)
+SketchConstraintCoincidence_38 = Sketch_1.setCoincident(SketchLine_34.endPoint(), SketchLine_35.endPoint())
+SketchLine_36 = Sketch_1.addLine(107.5524242162226, -57.32217330899532, 108.8843464634908, -37.36657301415998)
+SketchConstraintCoincidence_39 = Sketch_1.setCoincident(SketchLine_35.startPoint(), SketchLine_36.startPoint())
+SketchLine_37 = Sketch_1.addLine(125.8708496231354, -19.66465768043951, 108.8843464634908, -37.36657301415998)
+SketchConstraintCoincidence_40 = Sketch_1.setCoincident(SketchLine_36.endPoint(), SketchLine_37.endPoint())
+SketchConstraintAngle_29 = Sketch_1.setAngle(SketchLine_31.result(), SketchLine_32.result(), "360-Ang", type = "Backward")
+SketchConstraintAngle_30 = Sketch_1.setAngle(SketchLine_33.result(), SketchLine_32.result(), "360-Ang", type = "Backward")
+SketchConstraintAngle_31 = Sketch_1.setAngle(SketchLine_31.result(), SketchLine_34.result(), "360-Ang", type = "Backward")
+SketchConstraintAngle_32 = Sketch_1.setAngle(SketchLine_36.result(), SketchLine_35.result(), "360-Ang", type = "Backward")
+SketchConstraintAngle_33 = Sketch_1.setAngle(SketchLine_35.result(), SketchLine_34.result(), "360-Ang", type = "Backward")
+SketchConstraintAngle_34 = Sketch_1.setAngle(SketchLine_36.result(), SketchLine_37.result(), "360-Ang", type = "Backward")
+SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_32.result(), 20)
+SketchConstraintEqual_23 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_31.result())
+SketchConstraintEqual_24 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_34.result())
+SketchConstraintEqual_25 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_35.result())
+SketchConstraintEqual_26 = Sketch_1.setEqual(SketchLine_32.result(), SketchLine_36.result())
+SketchLine_38 = Sketch_1.addLine(171.0385831271055, -48.05657162886843, 135.6178801955327, 0.3724878688471688)
+SketchPoint_5 = Sketch_1.addPoint(159.2316821499145, -31.91355179629657)
+SketchConstraintCoincidence_41 = Sketch_1.setCoincident(SketchPoint_5.coordinates(), SketchLine_33.result())
+SketchConstraintCoincidence_42 = Sketch_1.setCoincident(SketchPoint_5.coordinates(), SketchLine_38.result())
+SketchConstraintDistance_23 = Sketch_1.setDistance(SketchLine_32.endPoint(), SketchPoint_5.coordinates(), 20, True)
+SketchConstraintDistance_24 = Sketch_1.setDistance(SketchLine_38.startPoint(), SketchPoint_5.coordinates(), 20, True)
+SketchConstraintDistance_25 = Sketch_1.setDistance(SketchPoint_5.coordinates(), SketchLine_33.endPoint(), 40, True)
+SketchConstraintEqual_27 = Sketch_1.setEqual(SketchLine_33.result(), SketchLine_38.result())
+SketchLine_39 = Sketch_1.addLine(175.8477778293761, -43.04483044571408, 125.9994907909914, -9.650994497461493)
+SketchConstraintCoincidence_43 = Sketch_1.setCoincident(SketchPoint_5.coordinates(), SketchLine_39.result())
+SketchConstraintEqual_28 = Sketch_1.setEqual(SketchLine_33.result(), SketchLine_39.result())
+SketchConstraintDistance_26 = Sketch_1.setDistance(SketchLine_39.startPoint(), SketchPoint_5.coordinates(), 20, True)
+SketchConstraintAngle_35 = Sketch_1.setAngle(SketchLine_33.result(), SketchLine_38.result(), "360-(180-Ang)/2", type = "Backward")
+SketchConstraintAngle_36 = Sketch_1.setAngle(SketchLine_39.result(), SketchLine_38.result(), "360-(180-Ang)/2", type = "Backward")
+SketchLine_40 = Sketch_1.addLine(160.1386077477389, -30.42300575990098, 107.5695439158812, -1.500807920835093)
+SketchPoint_6 = Sketch_1.addPoint(142.615586470453, -20.78227314687903)
+SketchConstraintCoincidence_44 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_40.result())
+SketchConstraintCoincidence_45 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_39.result())
+SketchConstraintDistance_27 = Sketch_1.setDistance(SketchPoint_6.coordinates(), SketchLine_40.startPoint(), 20, True)
+SketchConstraintDistance_28 = Sketch_1.setDistance(SketchPoint_6.coordinates(), SketchLine_39.endPoint(), 20, True)
+SketchConstraintEqual_29 = Sketch_1.setEqual(SketchLine_39.result(), SketchLine_40.result())
+SketchLine_41 = Sketch_1.addLine(147.1612701207084, -22.78891223719074, 124.3190003679524, -12.70545836667124)
+SketchConstraintCoincidence_46 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_41.result())
+SketchConstraintDistance_29 = Sketch_1.setDistance(SketchLine_41.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_37 = Sketch_1.setAngle(SketchLine_39.result(), SketchLine_40.result(), "180+dAng", type = "Backward")
+SketchConstraintAngle_38 = Sketch_1.setAngle(SketchLine_41.result(), SketchLine_40.result(), "360-dAng", type = "Backward")
+SketchLine_42 = Sketch_1.addLine(161.5464893301474, -27.23370065688114, 104.7537807510641, -7.879418126874779)
+SketchConstraintCoincidence_47 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_42.result())
+SketchConstraintEqual_30 = Sketch_1.setEqual(SketchLine_39.result(), SketchLine_42.result())
+SketchConstraintDistance_30 = Sketch_1.setDistance(SketchPoint_6.coordinates(), SketchLine_42.startPoint(), 20, True)
+SketchConstraintAngle_39 = Sketch_1.setAngle(SketchLine_42.result(), SketchLine_41.result(), "360-dAng", type = "Backward")
+SketchLine_43 = Sketch_1.addLine(181.4578745011218, -30.33615510881286, 123.1944424551186, -16.0053321659121)
+SketchConstraintCoincidence_48 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_43.result())
+SketchConstraintEqual_31 = Sketch_1.setEqual(SketchLine_42.result(), SketchLine_43.result())
+SketchConstraintDistance_31 = Sketch_1.setDistance(SketchLine_43.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_40 = Sketch_1.setAngle(SketchLine_42.result(), SketchLine_43.result(), "180+dAng", type = "Backward")
+SketchLine_44 = Sketch_1.addLine(182.1427435468735, -26.91447124022047, 122.8520079322427, -17.71617410020831)
+SketchConstraintCoincidence_49 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_44.result())
+SketchConstraintDistance_32 = Sketch_1.setDistance(SketchLine_44.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_41 = Sketch_1.setAngle(SketchLine_43.result(), SketchLine_44.result(), "360-dAng", type = "Backward")
+SketchConstraintEqual_32 = Sketch_1.setEqual(SketchLine_43.result(), SketchLine_44.result())
+SketchLine_45 = Sketch_1.addLine(182.5267870601237, -23.44611764141531, 122.6599861756176, -19.45035089961089)
+SketchConstraintCoincidence_50 = Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_45.result())
+SketchConstraintEqual_33 = Sketch_1.setEqual(SketchLine_44.result(), SketchLine_45.result())
+SketchConstraintDistance_33 = Sketch_1.setDistance(SketchLine_45.endPoint(), SketchPoint_6.coordinates(), 20, True)
+SketchConstraintAngle_42 = Sketch_1.setAngle(SketchLine_45.result(), SketchLine_44.result(), "360-dAng", type = "Backward")
+SketchConstraintCoincidence_51 = Sketch_1.setCoincident(SketchLine_37.startPoint(), SketchLine_45.result())
+model.do()
+Extrusion_1_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_9f-SketchLine_15f-SketchLine_7f-SketchLine_6r-SketchLine_5f-SketchLine_4r"), model.selection("FACE", "Sketch_1/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchLine_24f-SketchLine_30f-SketchLine_22f-SketchLine_21r-SketchLine_20f-SketchLine_19r"), model.selection("FACE", "Sketch_1/Face-SketchLine_31f-SketchLine_32f-SketchLine_33f-SketchLine_39f-SketchLine_45f-SketchLine_37f-SketchLine_36r-SketchLine_35f-SketchLine_34r")]
+Extrusion_1 = model.addExtrusion(Part_1_doc, Extrusion_1_objects, model.selection(), 10, 0)
+model.do()
+
+model.end()
+
+from GeomAPI import *
+
+REF_VOLUME = 25018.7130187615
+
+model.testNbResults(Extrusion_1, 3)
+model.testNbSubResults(Extrusion_1, [0, 0, 0])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.SOLID, [1, 1, 1])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [11, 11, 11])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [54, 54, 54])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [108, 108, 108])
+model.testResultsVolumes(Extrusion_1, [REF_VOLUME, REF_VOLUME, REF_VOLUME])
+
+assert(model.checkPythonDump())
index a8e5ca417ead1a93deff2523f8c6711d831e2f74..dd856efbc55bdde1d890a1a149084c4a55e2d5a6 100644 (file)
@@ -21,51 +21,55 @@ ENABLE_TESTING()
 
 SET(RESTRICTED_ROOT_DIR $ENV{RESTRICTED_ROOT_DIR} CACHE PATH "Path to the restricted repository")
 
+set(hdfFilesRestr "")
 if (EXISTS ${RESTRICTED_ROOT_DIR})
   file(GLOB hdfFilesRestr "${RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/*.hdf")
+endif()
+
+file(GLOB hdfFilesCur "${CMAKE_CURRENT_SOURCE_DIR}/*.hdf")
+set(hdfFilesRestr ${hdfFilesCur} ${hdfFilesRestr})
 
-  if (WIN32) # different separators and path to libraries variable name
-    SET(_JUSTPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};$ENV{PATH}")
-    STRING(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}")
-    STRING(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}")
-    SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};$ENV{PYTHONPATH}")
-    STRING(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}")
-    STRING(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}")
-  else()
-    SET(_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:$ENV{LD_LIBRARY_PATH}")
-    SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}")
-  endif()
+if (WIN32) # different separators and path to libraries variable name
+  SET(_JUSTPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};$ENV{PATH}")
+  STRING(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}")
+  STRING(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}")
+  SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};$ENV{PYTHONPATH}")
+  STRING(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}")
+  STRING(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}")
+else()
+  SET(_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:$ENV{LD_LIBRARY_PATH}")
+  SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}")
+endif()
 
-  foreach(eachFilePath ${hdfFilesRestr})
-    # Strip the ".hdf" suffix
-    GET_FILENAME_COMPONENT(aTestName ${eachFilePath} NAME_WE)
-    # Check corresponding ".py" file with reference data exists
-    IF(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${aTestName}.py")
-      MESSAGE(WARNING "File ${aTestName}.py containing reference data does not exist")
-      continue()
-    ENDIF()
+foreach(eachFilePath ${hdfFilesRestr})
+  # Strip the ".hdf" suffix
+  GET_FILENAME_COMPONENT(aTestName ${eachFilePath} NAME_WE)
+  # Check corresponding ".py" file with reference data exists
+  IF(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${aTestName}.py")
+    MESSAGE(WARNING "File ${aTestName}.py containing reference data does not exist")
+    continue()
+  ENDIF()
 
-    # Add "SubprojectName_" prefix
-    GET_FILENAME_COMPONENT(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-    SET(aTestName "${aSubprojectName}_${aTestName}")
+  # Add "SubprojectName_" prefix
+  GET_FILENAME_COMPONENT(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+  SET(aTestName "${aSubprojectName}_${aTestName}")
 
-    # Full path to the python test file being executed
-    SET(aTestFilePath "${eachFilePath}")
-    IF(EXISTS ${aTestFilePath})
-      ADD_TEST(NAME ${aTestName} COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/test.py" "$ENV{KERNEL_ROOT_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" "${aTestFilePath}")
-      if (WIN32) # different path to libraries variable name
-        SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH}"
-          LABELS "models_hdf")
-      else()
-        SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH}"
-          LABELS "models_hdf")
-      endif()
-      # Debug output...
-      # MESSAGE(STATUS "Test added: ${aTestName} file: ${aTestFilePath}")
-    ELSE(EXISTS ${aTestFilePath})
-      MESSAGE(WARNING "Can not find the test file: ${aTestFilePath}")
-    ENDIF(EXISTS ${aTestFilePath})
-  endforeach(eachFilePath ${ARGN})
+  # Full path to the python test file being executed
+  SET(aTestFilePath "${eachFilePath}")
+  IF(EXISTS ${aTestFilePath})
+    ADD_TEST(NAME ${aTestName} COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/test.py" "$ENV{KERNEL_ROOT_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" "${aTestFilePath}")
+    if (WIN32) # different path to libraries variable name
+      SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH}"
+        LABELS "models_hdf")
+    else()
+      SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH}"
+        LABELS "models_hdf")
+    endif()
+    # Debug output...
+    # MESSAGE(STATUS "Test added: ${aTestName} file: ${aTestFilePath}")
+  ELSE(EXISTS ${aTestFilePath})
+    MESSAGE(WARNING "Can not find the test file: ${aTestFilePath}")
+  ENDIF(EXISTS ${aTestFilePath})
+endforeach(eachFilePath ${ARGN})
 
-  ADD_CUSTOM_TARGET(run_hdf_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L "models_hdf")
-endif()
+ADD_CUSTOM_TARGET(run_hdf_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L "models_hdf")
diff --git a/test.hdfs/Test3061.hdf b/test.hdfs/Test3061.hdf
new file mode 100644 (file)
index 0000000..d277aad
Binary files /dev/null and b/test.hdfs/Test3061.hdf differ
diff --git a/test.hdfs/Test3061.py b/test.hdfs/Test3061.py
new file mode 100644 (file)
index 0000000..f477663
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+if __name__ == "__main__":
+  aPartFeature = locals()["Part_1"]
+  model.testNbResults(aPartFeature, 1)
+  model.testNbSubResults(aPartFeature, [0])
+  model.testNbSubShapes(aPartFeature, GeomAPI_Shape.SOLID, [3])
+  model.testNbSubShapes(aPartFeature, GeomAPI_Shape.FACE, [33])
+  model.testNbSubShapes(aPartFeature, GeomAPI_Shape.EDGE, [162])
+  model.testNbSubShapes(aPartFeature, GeomAPI_Shape.VERTEX, [324])
+  model.testResultsVolumes(aPartFeature, [75056.139056284388])