Salome HOME
Merge remote-tracking branch 'remotes/origin/Dev_FolderFeature'
authorazv <azv@opencascade.com>
Fri, 1 Dec 2017 12:40:50 +0000 (15:40 +0300)
committerazv <azv@opencascade.com>
Fri, 1 Dec 2017 12:40:50 +0000 (15:40 +0300)
88 files changed:
src/CollectionPlugin/Test/TestGroup1799.py
src/Config/ConfigAPI.i
src/Config/Config_Prop.h
src/Config/Config_swig.h
src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.cpp
src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.h
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Boolean.h
src/FeaturesPlugin/FeaturesPlugin_RemoveSubShapes.cpp
src/FeaturesPlugin/FeaturesPlugin_RemoveSubShapes.h
src/FeaturesPlugin/FeaturesPlugin_Union.cpp
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp
src/FeaturesPlugin/FeaturesPlugin_msg_en.ts
src/FeaturesPlugin/Test/Test2197_3.py
src/FeaturesPlugin/Test/Test2197_4.py
src/FeaturesPlugin/Test/Test2240.py
src/FeaturesPlugin/Test/Test2248.py
src/FeaturesPlugin/Test/Test2304.py [new file with mode: 0644]
src/FeaturesPlugin/Test/TestBooleanFillWithPlane.py [new file with mode: 0644]
src/FeaturesPlugin/Test/TestExtrusion.py
src/FeaturesPlugin/Test/TestRemoveSubShapes.py
src/FeaturesPlugin/Test/TestRemoveSubShapes2.py [new file with mode: 0644]
src/FeaturesPlugin/Test/TestUnionFaces.py [new file with mode: 0644]
src/FeaturesPlugin/icons/keep_subshapes_32x32.png [new file with mode: 0644]
src/FeaturesPlugin/icons/remove_subshapes_32x32.png [new file with mode: 0644]
src/FeaturesPlugin/remove_subshapes_widget.xml
src/FeaturesPlugin/union_widget.xml
src/GDMLAPI/CMakeLists.txt
src/GDMLAPI/GDMLAPI.i
src/GDMLAPI/GDMLAPI_Ellipsoid.cpp [new file with mode: 0644]
src/GDMLAPI/GDMLAPI_Ellipsoid.h [new file with mode: 0644]
src/GDMLAPI/GDMLAPI_swig.h
src/GeomAlgoAPI/CMakeLists.txt
src/GeomAlgoAPI/GeomAlgoAPI_Partition.cpp
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp [new file with mode: 0644]
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.h [new file with mode: 0644]
src/Model/Model_Document.cpp
src/Model/Model_Document.h
src/Model/Model_Objects.cpp
src/Model/Model_Update.cpp
src/Model/Model_Update.h
src/ModelAPI/Test/Test1064.py
src/ModelAPI/Test/Test1757.py
src/ModelAPI/Test/Test2228.py
src/ModelAPI/Test/Test2241.py
src/ModelAPI/Test/TestCustomName_Placement.py
src/ModelHighAPI/ModelHighAPI_Dumper.cpp
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_ActionType.h [new file with mode: 0644]
src/ModuleBase/ModuleBase_ModelWidget.cpp
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_WidgetDoubleValue.h
src/ModuleBase/ModuleBase_WidgetEditor.h
src/ModuleBase/ModuleBase_WidgetExprEditor.h
src/ModuleBase/ModuleBase_WidgetFileSelector.h
src/ModuleBase/ModuleBase_WidgetIntValue.h
src/ModuleBase/ModuleBase_WidgetLineEdit.h
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.h
src/PartSet/PartSet_ExternalObjectsMgr.cpp
src/PartSet/PartSet_Module.cpp
src/PythonAPI/examples/Platine.py
src/PythonAPI/model/gdml/__init__.py
src/PythonAPI/model/tests/tests.py
src/SketchPlugin/SketchPlugin_Projection.cpp
src/SketchPlugin/Test/TestProjectionIntoResult.py
src/SketchPlugin/Test/TestProjectionUpdate.py [new file with mode: 0644]
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_Radius.cpp
src/XGUI/XGUI_DataModel.cpp
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_OperationMgr.h
src/XGUI/XGUI_Workshop.cpp
test.API/SHAPER/Primitives/TestBox.py
test.models/CSWA.py
test.models/angle30.py
test.models/bearing_puller.py
test.models/bushing.py
test.models/case24.py
test.models/clothespin.py
test.models/ecran.py
test.models/gear.py
test.models/piece_02.py
test.models/piece_09.py
test.models/piece_12.py

index d048d7b4a0cc199b579191035a9fe4890d9dac21..5d67a8fd40f9ce419f42c2767968094802a515f6 100644 (file)
@@ -116,11 +116,11 @@ SketchConstraintEqual_5 = Sketch_1.setEqual(SketchLine_7.result(), SketchLine_2.
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r-SketchLine_5f-SketchLine_6f-SketchLine_9r-SketchLine_10r"), model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchCircle_1_2r-SketchLine_7f-SketchLine_9f-SketchLine_12r"), model.selection("FACE", "Sketch_1/Face-SketchLine_4f-SketchCircle_1_2r-SketchLine_8f-SketchLine_11r-SketchLine_12f"), model.selection("FACE", "Sketch_1/Face-SketchLine_2f-SketchLine_3f-SketchCircle_1_2r-SketchLine_10f-SketchLine_11f")], model.selection(), 150, 0)
 Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Extrusion_1_1/To_Face_1"), model.selection("FACE", "Extrusion_1_1/To_Face_4"), model.selection("FACE", "Extrusion_1_1/To_Face_3"), model.selection("FACE", "Extrusion_1_1/To_Face_2")])
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_12"), 150, True)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_15"), 150, True)
 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_7"), 150, True)
 Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Plane_1"), model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("FACE", "Plane_2")])
 Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Partition_1_1_7/Modified_Face_2_4"), 110, True)
-Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Partition_1_1_3/Modified_Face_3_5"), 380, True)
+Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Partition_1_1_5/Modified_Face_3_4"), 380, True)
 Partition_2 = model.addPartition(Part_1_doc, [model.selection("FACE", "Plane_3"), model.selection("COMPSOLID", "Partition_1_1"), model.selection("FACE", "Plane_4")])
 model.do()
 
index deb262c363616f6a5fead39904eef1a410207b89..2bf42f1a044bdbab5330e527da8cfb1d5dde10c8 100644 (file)
@@ -32,3 +32,5 @@
 %include "std_string.i"
 
 %include "Config_ModuleReader.h"
+%include "Config_PropManager.h"
+%include "Config_Prop.h"
index d6ce44e41dbbcd6e7980c10b81c73080780b5ef0..bdaecb59b7bc84d856cd149407fa9c402f4fe6bd 100644 (file)
@@ -26,7 +26,7 @@
 #include <string>
 #include <list>
 
-const static char* SKETCH_TAB_NAME = "Sketch";
+static const char* SKETCH_TAB_NAME = "Sketch";
 
 /*!
  * \class Config_Prop
index c6cf51d51eed73b6472fbc51dc0fde41edb2ff04..cda0700d8d2d2c2d3e455e4312b1de6fdc737fa1 100644 (file)
@@ -22,5 +22,7 @@
 #define SRC_CONFIG_SWIG_H_
 
   #include "Config_ModuleReader.h"
+  #include "Config_Prop.h"
+  #include "Config_PropManager.h"
 
 #endif /* SRC_CONFIG_SWIG_H_ */
index 24447bc00ecb24490d2467f47f47c9eec66e0e84..4d5b40ba324680961b78db3b49932c8ad78c2b51 100644 (file)
@@ -62,7 +62,20 @@ void FeaturesAPI_RemoveSubShapes::setBase(const ModelHighAPI_Selection& theBase)
 void FeaturesAPI_RemoveSubShapes::setSubShapesToKeep(
   const std::list<ModelHighAPI_Selection>& theSubShapes)
 {
-  fillAttribute(theSubShapes, mysubshapes);
+  fillAttribute(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_KEEP_SUBSHAPES(),
+                mycreationMethod);
+  fillAttribute(theSubShapes, mysubshapesToKeep);
+
+  execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_RemoveSubShapes::setSubShapesToRemove(
+  const std::list<ModelHighAPI_Selection>& theSubShapes)
+{
+  fillAttribute(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_REMOVE_SUBSHAPES(),
+                mycreationMethod);
+  fillAttribute(theSubShapes, mysubshapesToRemove);
 
   execute();
 }
@@ -75,12 +88,27 @@ void FeaturesAPI_RemoveSubShapes::dump(ModelHighAPI_Dumper& theDumper) const
 
   AttributeSelectionPtr anAttrBaseShape =
     aBase->selection(FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID());
-  AttributeSelectionListPtr anAttrSubShapes =
-    aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID());
 
-  theDumper << aBase << " = model.addRemoveSubShapes(" << aDocName <<
-    ", " << anAttrBaseShape << ")" << std::endl;
-  theDumper << aBase << ".setSubShapesToKeep(" << anAttrSubShapes << ")" << std::endl;
+  std::string aCreationMethod =
+    aBase->string(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD())->value();
+
+  AttributeSelectionListPtr anAttrSubShapes;
+
+  if (aCreationMethod == FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_KEEP_SUBSHAPES()) {
+    anAttrSubShapes =
+      aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_KEEP_ID());
+  }
+  else {
+    anAttrSubShapes =
+      aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_REMOVE_ID());
+  }
+
+  theDumper << aBase << " = model.addRemoveSubShapes(" << aDocName << ", " << anAttrBaseShape << ")"
+            << std::endl;
+  theDumper << aBase
+    << (aCreationMethod == FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_KEEP_SUBSHAPES() ?
+       ".setSubShapesToKeep(" : ".setSubShapesToRemove(")
+    << anAttrSubShapes << ")" << std::endl;
 }
 
 //==================================================================================================
index cabae5368de9a50b60411a8a2f9dbeab7d324ce9..15a1d04955edbe434da7db64f179da41b877de64 100644 (file)
@@ -50,11 +50,15 @@ public:
   FEATURESAPI_EXPORT
   virtual ~FeaturesAPI_RemoveSubShapes();
 
-  INTERFACE_2(FeaturesPlugin_RemoveSubShapes::ID(),
+  INTERFACE_4(FeaturesPlugin_RemoveSubShapes::ID(),
               base, FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID(),
               ModelAPI_AttributeSelection, /** Base */,
-              subshapes, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID(),
-              ModelAPI_AttributeSelectionList, /** Subshapes */)
+              creationMethod, FeaturesPlugin_RemoveSubShapes::CREATION_METHOD(),
+              ModelAPI_AttributeString, /** Creation method */,
+              subshapesToKeep, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_KEEP_ID(),
+              ModelAPI_AttributeSelectionList, /** Subshapes to keep*/,
+              subshapesToRemove, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_REMOVE_ID(),
+              ModelAPI_AttributeSelectionList, /** Subshapes to remove*/)
 
   /// Modify objects attribute of the feature.
   FEATURESAPI_EXPORT
@@ -64,6 +68,10 @@ public:
   FEATURESAPI_EXPORT
   void setSubShapesToKeep(const std::list<ModelHighAPI_Selection>& theSubShapes);
 
+  /// Modify tools attribute of the feature.
+  FEATURESAPI_EXPORT
+  void setSubShapesToRemove(const std::list<ModelHighAPI_Selection>& theSubShapes);
+
   /// Dump wrapped feature
   FEATURESAPI_EXPORT
   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
index 9fc5d6d3f17e39aa4b34c6f6ea62bea7c047d002..d527286bb8f73fc659bddf2c70240d84f1ceef29 100644 (file)
@@ -156,11 +156,14 @@ ADD_UNIT_TESTS(TestExtrusion.py
                TestBooleanCompSolids.py
                TestBooleanSmash.py
                TestBooleanFill.py
+               TestBooleanFillWithPlane.py
                TestMultiBoolean.py
                TestSerialBoolean.py
                TestIntersection.py
                TestUnion.py
+               TestUnionFaces.py
                TestRemoveSubShapes.py
+               TestRemoveSubShapes2.py
                TestPipe.py
                TestRecover.py
                TestRecover1798.py
@@ -186,4 +189,5 @@ ADD_UNIT_TESTS(TestExtrusion.py
                Test2251.py
                Test2255.py
                Test2289.py
+               Test2304.py
 )
index b51d76b60079f828e22d108873850259b1bce324..08af8844540ac2689460607338268b5610ccc36a 100644 (file)
 #include <ModelAPI_Tools.h>
 
 #include <GeomAlgoAPI_Boolean.h>
+#include <GeomAlgoAPI_MakeShapeCustom.h>
 #include <GeomAlgoAPI_MakeShapeList.h>
 #include <GeomAlgoAPI_Partition.h>
 #include <GeomAlgoAPI_PaveFiller.h>
 #include <GeomAlgoAPI_ShapeTools.h>
+#include <GeomAPI_Face.h>
 #include <GeomAPI_ShapeExplorer.h>
 #include <GeomAPI_ShapeIterator.h>
 
@@ -87,7 +89,7 @@ void FeaturesPlugin_Boolean::execute()
     return;
   OperationType aType = (FeaturesPlugin_Boolean::OperationType)aTypeAttr->value();
 
-  ListOfShape anObjects, aTools, anEdgesAndFaces;
+  ListOfShape anObjects, aTools, anEdgesAndFaces, aPlanes;
   std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape> aCompSolidsObjects;
 
   // Getting objects.
@@ -129,11 +131,12 @@ void FeaturesPlugin_Boolean::execute()
   AttributeSelectionListPtr aToolsSelList = selectionList(FeaturesPlugin_Boolean::TOOL_LIST_ID());
   for(int aToolsIndex = 0; aToolsIndex < aToolsSelList->size(); aToolsIndex++) {
     AttributeSelectionPtr aToolAttr = aToolsSelList->value(aToolsIndex);
-    std::shared_ptr<GeomAPI_Shape> aTool = aToolAttr->value();
+    GeomShapePtr aTool = aToolAttr->value();
     if(!aTool.get()) {
-      return;
-    }
-    if(aTool->shapeType() == GeomAPI_Shape::EDGE ||
+      // It could be a construction plane.
+      ResultPtr aContext = aToolAttr->context();
+      aPlanes.push_back(aToolAttr->context()->shape());
+    } else if(aTool->shapeType() == GeomAPI_Shape::EDGE ||
        aTool->shapeType() == GeomAPI_Shape::FACE) {
       anEdgesAndFaces.push_back(aTool);
     } else {
@@ -147,7 +150,8 @@ void FeaturesPlugin_Boolean::execute()
     case BOOL_CUT:
     case BOOL_COMMON:
     case BOOL_FILL: {
-      if((anObjects.empty() && aCompSolidsObjects.empty()) || aTools.empty()) {
+      if((anObjects.empty() && aCompSolidsObjects.empty())
+          || (aTools.empty() && aPlanes.empty())) {
         std::string aFeatureError = "Error: Not enough objects for boolean operation.";
         setError(aFeatureError);
         return;
@@ -159,25 +163,46 @@ void FeaturesPlugin_Boolean::execute()
         std::shared_ptr<GeomAPI_Shape> anObject = *anObjectsIt;
         ListOfShape aListWithObject;
         aListWithObject.push_back(anObject);
-        GeomAlgoAPI_MakeShape aBoolAlgo;
+        GeomAlgoAPI_MakeShapeList aMakeShapeList;
+        std::shared_ptr<GeomAlgoAPI_MakeShape> aBoolAlgo;
         GeomShapePtr aResShape;
 
         switch(aType) {
           case BOOL_CUT: {
-            aBoolAlgo =
-              GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_CUT);
-            aResShape = aBoolAlgo.shape();
+            aBoolAlgo.reset(new GeomAlgoAPI_Boolean(aListWithObject,
+                                                    aTools,
+                                                    GeomAlgoAPI_Boolean::BOOL_CUT));
+            aResShape = aBoolAlgo->shape();
             break;
           }
           case BOOL_COMMON: {
-            aBoolAlgo =
-              GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_COMMON);
-            aResShape = aBoolAlgo.shape();
+            aBoolAlgo.reset(new GeomAlgoAPI_Boolean(aListWithObject,
+                                                    aTools,
+                                                    GeomAlgoAPI_Boolean::BOOL_COMMON));
+            aResShape = aBoolAlgo->shape();
             break;
           }
           case BOOL_FILL: {
-            aBoolAlgo = GeomAlgoAPI_Partition(aListWithObject, aTools);
-            aResShape = aBoolAlgo.shape();
+              std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints =
+                GeomAlgoAPI_ShapeTools::getBoundingBox(aListWithObject, 1.0);
+
+            // Resize planes.
+            ListOfShape aToolsWithPlanes = aTools;
+            for(ListOfShape::const_iterator anIt = aPlanes.cbegin();
+                                            anIt != aPlanes.cend();
+                                            ++anIt)
+            {
+              GeomShapePtr aPlane = *anIt;
+              GeomShapePtr aTool = GeomAlgoAPI_ShapeTools::fitPlaneToBox(aPlane, aBoundingPoints);
+              std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aMkShCustom(
+                new GeomAlgoAPI_MakeShapeCustom);
+              aMkShCustom->addModified(aPlane, aTool);
+              aMakeShapeList.appendAlgo(aMkShCustom);
+              aToolsWithPlanes.push_back(aTool);
+            }
+
+            aBoolAlgo.reset(new GeomAlgoAPI_Partition(aListWithObject, aToolsWithPlanes));
+            aResShape = aBoolAlgo->shape();
             if(aResShape->shapeType() == GeomAPI_Shape::COMPOUND) {
               int aSubResultsNb = 0;
               GeomAPI_ShapeIterator anIt(aResShape);
@@ -196,7 +221,7 @@ void FeaturesPlugin_Boolean::execute()
         }
 
         // Checking that the algorithm worked properly.
-        if(!aBoolAlgo.isDone()) {
+        if(!aBoolAlgo->isDone()) {
           static const std::string aFeatureError = "Error: Boolean algorithm failed.";
           setError(aFeatureError);
           return;
@@ -206,17 +231,25 @@ void FeaturesPlugin_Boolean::execute()
           setError(aShapeError);
           return;
         }
-        if(!aBoolAlgo.isValid()) {
+        if(!aBoolAlgo->isValid()) {
           std::string aFeatureError = "Error: Resulting shape is not valid.";
           setError(aFeatureError);
           return;
         }
 
+        aMakeShapeList.appendAlgo(aBoolAlgo);
+
         if(GeomAlgoAPI_ShapeTools::volume(aResShape) > 1.e-27) {
           std::shared_ptr<ModelAPI_ResultBody> aResultBody =
             document()->createBody(data(), aResultIndex);
-          loadNamingDS(aResultBody, anObject, aTools, aResShape,
-                       aBoolAlgo, *aBoolAlgo.mapOfSubShapes().get());
+
+          ListOfShape aUsedTools = aTools;
+          if (aType == BOOL_FILL) {
+            aUsedTools.insert(aUsedTools.end(), aPlanes.begin(), aPlanes.end());
+          }
+
+          loadNamingDS(aResultBody, anObject, aUsedTools, aResShape,
+                       aMakeShapeList, *(aBoolAlgo->mapOfSubShapes()), aType == BOOL_FILL);
           setResult(aResultBody, aResultIndex);
           aResultIndex++;
         }
@@ -245,6 +278,7 @@ void FeaturesPlugin_Boolean::execute()
           }
         }
 
+        GeomAlgoAPI_MakeShapeList aMakeShapeList;
         std::shared_ptr<GeomAlgoAPI_MakeShape> aBoolAlgo;
 
         switch(aType) {
@@ -261,7 +295,25 @@ void FeaturesPlugin_Boolean::execute()
             break;
           }
           case BOOL_FILL: {
-            aBoolAlgo.reset(new GeomAlgoAPI_Partition(aUsedInOperationSolids, aTools));
+            std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints =
+              GeomAlgoAPI_ShapeTools::getBoundingBox(aUsedInOperationSolids, 1.0);
+
+            // Resize planes.
+            ListOfShape aToolsWithPlanes = aTools;
+            for(ListOfShape::const_iterator anIt = aPlanes.cbegin();
+                                            anIt != aPlanes.cend();
+                                            ++anIt)
+            {
+              GeomShapePtr aPlane = *anIt;
+              GeomShapePtr aTool = GeomAlgoAPI_ShapeTools::fitPlaneToBox(aPlane, aBoundingPoints);
+              std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aMkShCustom(
+                new GeomAlgoAPI_MakeShapeCustom);
+              aMkShCustom->addModified(aPlane, aTool);
+              aMakeShapeList.appendAlgo(aMkShCustom);
+              aToolsWithPlanes.push_back(aTool);
+            }
+
+            aBoolAlgo.reset(new GeomAlgoAPI_Partition(aUsedInOperationSolids, aToolsWithPlanes));
             break;
           }
         }
@@ -283,7 +335,6 @@ void FeaturesPlugin_Boolean::execute()
           return;
         }
 
-        GeomAlgoAPI_MakeShapeList aMakeShapeList;
         aMakeShapeList.appendAlgo(aBoolAlgo);
         GeomAPI_DataMapOfShapeShape aMapOfShapes;
         aMapOfShapes.merge(aBoolAlgo->mapOfSubShapes());
@@ -309,7 +360,19 @@ void FeaturesPlugin_Boolean::execute()
         if(GeomAlgoAPI_ShapeTools::volume(aResultShape) > 1.e-27) {
           std::shared_ptr<ModelAPI_ResultBody> aResultBody =
             document()->createBody(data(), aResultIndex);
-          loadNamingDS(aResultBody, aCompSolid, aTools, aResultShape, aMakeShapeList, aMapOfShapes);
+
+          ListOfShape aUsedTools = aTools;
+          if (aType == BOOL_FILL) {
+            aUsedTools.insert(aUsedTools.end(), aPlanes.begin(), aPlanes.end());
+          }
+
+          loadNamingDS(aResultBody,
+                       aCompSolid,
+                       aUsedTools,
+                       aResultShape,
+                       aMakeShapeList,
+                       aMapOfShapes,
+                       aType == BOOL_FILL);
           setResult(aResultBody, aResultIndex);
           aResultIndex++;
         }
@@ -626,7 +689,8 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> t
                                           const ListOfShape& theTools,
                                           const std::shared_ptr<GeomAPI_Shape> theResultShape,
                                           GeomAlgoAPI_MakeShape& theMakeShape,
-                                          GeomAPI_DataMapOfShapeShape& theMapOfShapes)
+                                          GeomAPI_DataMapOfShapeShape& theMapOfShapes,
+                                          const bool theIsStoreAsGenerated)
 {
   //load result
   if(theBaseShape->isEqual(theResultShape)) {
@@ -645,7 +709,7 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> t
     const std::string aModFName = "Modified_Face";
 
     theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE,
-      aModifyTag, aModName, theMapOfShapes, false, false, true);
+      aModifyTag, aModName, theMapOfShapes, false, theIsStoreAsGenerated, true);
     theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape,
                                      GeomAPI_Shape::FACE, aDeletedTag);
 
@@ -666,7 +730,7 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> t
       }
       theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter,
         aName == aModEName ? GeomAPI_Shape::EDGE : GeomAPI_Shape::FACE,
-        aTag, aName, theMapOfShapes, false, false, true);
+        aTag, aName, theMapOfShapes, false, theIsStoreAsGenerated, true);
       theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
     }
   }
index 726b33846bc0e402630a422f65e8d146d16cdede..d49820686883058d1991b778f8ab14a0f6c6ec4c 100644 (file)
@@ -95,7 +95,8 @@ private:
                     const ListOfShape& theTools,
                     const std::shared_ptr<GeomAPI_Shape> theResultShape,
                     GeomAlgoAPI_MakeShape& theMakeShape,
-                    GeomAPI_DataMapOfShapeShape& theMapOfShapes);
+                    GeomAPI_DataMapOfShapeShape& theMapOfShapes,
+                    const bool theIsStoreAsGenerated = false);
 };
 
 #endif
index 53d02ab83e183e643c45c03357965aea72d51dc1..2f54129831f54599ecfee4f72b51c36924e03050 100644 (file)
@@ -21,6 +21,7 @@
 #include "FeaturesPlugin_RemoveSubShapes.h"
 
 #include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_ResultCompSolid.h>
 #include <ModelAPI_ResultConstruction.h>
@@ -38,6 +39,7 @@
 
 //==================================================================================================
 FeaturesPlugin_RemoveSubShapes::FeaturesPlugin_RemoveSubShapes()
+: myChangedInCode(false)
 {
 }
 
@@ -46,59 +48,141 @@ void FeaturesPlugin_RemoveSubShapes::initAttributes()
 {
   data()->addAttribute(BASE_SHAPE_ID(), ModelAPI_AttributeSelection::typeId());
 
-  data()->addAttribute(SUBSHAPES_ID(), ModelAPI_AttributeSelectionList::typeId());
+  data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+
+  data()->addAttribute(SUBSHAPES_TO_KEEP_ID(), ModelAPI_AttributeSelectionList::typeId());
+
+  data()->addAttribute(SUBSHAPES_TO_REMOVE_ID(), ModelAPI_AttributeSelectionList::typeId());
 }
 
 void FeaturesPlugin_RemoveSubShapes::attributeChanged(const std::string& theID)
 {
   ModelAPI_Feature::attributeChanged(theID);
 
-  if(theID == BASE_SHAPE_ID()) {
-    AttributeSelectionPtr aShapeAttrSelection = selection(BASE_SHAPE_ID());
-    AttributeSelectionListPtr aSubShapesAttrList = selectionList(SUBSHAPES_ID());
-    if(!aShapeAttrSelection.get() || !aSubShapesAttrList.get()) {
-      return;
-    }
+  if (myChangedInCode) return;
 
-    aSubShapesAttrList->clear();
+  AttributeSelectionPtr aShapeAttrSelection = selection(BASE_SHAPE_ID());
+  AttributeSelectionListPtr aSubShapesToKeepAttrList = selectionList(SUBSHAPES_TO_KEEP_ID());
+  AttributeSelectionListPtr aSubShapesToRemoveAttrList = selectionList(SUBSHAPES_TO_REMOVE_ID());
+  if (!aShapeAttrSelection.get()
+      || !aSubShapesToKeepAttrList.get()
+      || !aSubShapesToRemoveAttrList.get())
+  {
+    return;
+  }
 
-    ResultPtr aContext = aShapeAttrSelection->context();
-    ResultCompSolidPtr aResultCompSolid =
-      std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
-    if(!aResultCompSolid.get()) {
-      return;
-    }
+  ResultPtr aContext = aShapeAttrSelection->context();
+  ResultCompSolidPtr aResultCompSolid =
+    std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
+  if(!aResultCompSolid.get()) {
+    aSubShapesToKeepAttrList->clear();
+    aSubShapesToRemoveAttrList->clear();
+    return;
+  }
+  const int aNumOfSubs = aResultCompSolid->numberOfSubs();
 
-    GeomShapePtr aBaseShape = aShapeAttrSelection->value();
-    if(!aBaseShape.get()) {
-      aBaseShape = aContext->shape();
-    }
-    if(!aBaseShape.get()) {
-      return;
-    }
-    GeomAPI_Shape::ShapeType aShapeType = aBaseShape->shapeType();
-    if(aShapeType != GeomAPI_Shape::WIRE
-        && aShapeType != GeomAPI_Shape::SHELL
-        && aShapeType != GeomAPI_Shape::COMPSOLID
-        && aShapeType != GeomAPI_Shape::COMPOUND) {
+  GeomShapePtr aBaseShape = aShapeAttrSelection->value();
+  if(!aBaseShape.get()) {
+    aBaseShape = aContext->shape();
+  }
+
+  myChangedInCode = true;
+
+  if(theID == BASE_SHAPE_ID()) {
+    aSubShapesToKeepAttrList->clear();
+    aSubShapesToRemoveAttrList->clear();
+
+    if (!aBaseShape.get()) {
       return;
     }
+
     for(GeomAPI_ShapeIterator anIt(aBaseShape); anIt.more(); anIt.next()) {
       GeomShapePtr aSubShape = anIt.current();
-      const int aNumOfSubs = aResultCompSolid->numberOfSubs();
       if(aNumOfSubs == 0) {
-        aSubShapesAttrList->append(aContext, aSubShape);
+        aSubShapesToKeepAttrList->append(aContext, aSubShape);
       } else {
         for(int anIndex = 0; anIndex < aResultCompSolid->numberOfSubs(); ++anIndex) {
           ResultBodyPtr aSubResult = aResultCompSolid->subResult(anIndex);
           if(aSubResult->shape()->isEqual(aSubShape)) {
-            aSubShapesAttrList->append(aSubResult, aSubShape);
+            aSubShapesToKeepAttrList->append(aSubResult, aSubShape);
             break;
           }
         }
       }
     }
   }
+  else if (theID == SUBSHAPES_TO_KEEP_ID())
+  {
+    aSubShapesToRemoveAttrList->clear();
+
+    if (!aBaseShape.get()) {
+      return;
+    }
+
+    int anIndex;
+    const int aSubsToKeepNb = aSubShapesToKeepAttrList->size();
+    for(GeomAPI_ShapeIterator anIt(aBaseShape); anIt.more(); anIt.next()) {
+      GeomShapePtr aSubShape = anIt.current();
+      for(anIndex = 0; anIndex < aSubsToKeepNb; ++anIndex) {
+        AttributeSelectionPtr anAttrSelectionInList = aSubShapesToKeepAttrList->value(anIndex);
+        GeomShapePtr aSubShapeToKeep = anAttrSelectionInList->value();
+        if (aSubShapeToKeep.get() && aSubShapeToKeep->isEqual(aSubShape)) {
+          break;
+        }
+      }
+
+      if (anIndex == aSubsToKeepNb) {
+        if(aNumOfSubs == 0) {
+          aSubShapesToRemoveAttrList->append(aContext, aSubShape);
+        } else {
+          for(int anIndex = 0; anIndex < aResultCompSolid->numberOfSubs(); ++anIndex) {
+            ResultBodyPtr aSubResult = aResultCompSolid->subResult(anIndex);
+            if(aSubResult->shape()->isEqual(aSubShape)) {
+              aSubShapesToRemoveAttrList->append(aSubResult, aSubShape);
+              break;
+            }
+          }
+        }
+      }
+    }
+  }
+  else if (theID == SUBSHAPES_TO_REMOVE_ID())
+  {
+    aSubShapesToKeepAttrList->clear();
+
+    if (!aBaseShape.get()) {
+      return;
+    }
+
+    int anIndex;
+    const int aSubsToRemoveNb = aSubShapesToRemoveAttrList->size();
+    for(GeomAPI_ShapeIterator anIt(aBaseShape); anIt.more(); anIt.next()) {
+      GeomShapePtr aSubShape = anIt.current();
+      for(anIndex = 0; anIndex < aSubsToRemoveNb; ++anIndex) {
+        AttributeSelectionPtr anAttrSelectionInList = aSubShapesToRemoveAttrList->value(anIndex);
+        GeomShapePtr aSubShapeToRemove = anAttrSelectionInList->value();
+        if (aSubShapeToRemove.get() && aSubShapeToRemove->isEqual(aSubShape)) {
+          break;
+        }
+      }
+
+      if (anIndex == aSubsToRemoveNb) {
+        if(aNumOfSubs == 0) {
+          aSubShapesToKeepAttrList->append(aContext, aSubShape);
+        } else {
+          for(int anIndex = 0; anIndex < aResultCompSolid->numberOfSubs(); ++anIndex) {
+            ResultBodyPtr aSubResult = aResultCompSolid->subResult(anIndex);
+            if(aSubResult->shape()->isEqual(aSubShape)) {
+              aSubShapesToKeepAttrList->append(aSubResult, aSubShape);
+              break;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  myChangedInCode = false;
 }
 
 //==================================================================================================
@@ -106,7 +190,7 @@ void FeaturesPlugin_RemoveSubShapes::execute()
 {
   // Get base shape and sub-shapes list.
   AttributeSelectionPtr aShapeAttrSelection = selection(BASE_SHAPE_ID());
-  AttributeSelectionListPtr aSubShapesAttrList = selectionList(SUBSHAPES_ID());
+  AttributeSelectionListPtr aSubShapesAttrList = selectionList(SUBSHAPES_TO_KEEP_ID());
   if(!aShapeAttrSelection.get() || !aSubShapesAttrList.get()) {
     return;
   }
index 39cb6fabeafc166a9e99e5084807c03f276b99c3..4bbe6a01c2abf0b3017c5a4be2a92f7038137f6b 100644 (file)
@@ -48,13 +48,42 @@ public:
     return MY_BASE_SHAPE_ID;
   }
 
-  /// Attribute name of sub-shapes.
-  inline static const std::string& SUBSHAPES_ID()
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD()
   {
-    static const std::string MY_SUBSHAPES_ID("subshapes");
+    static const std::string MY_CREATION_METHOD_ID("creation_method");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD_BY_KEEP_SUBSHAPES()
+  {
+    static const std::string MY_CREATION_METHOD_ID("by_keep_subshapes");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD_BY_REMOVE_SUBSHAPES()
+  {
+    static const std::string MY_CREATION_METHOD_ID("by_remove_subshapes");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name of sub-shapes to keep.
+  inline static const std::string& SUBSHAPES_TO_KEEP_ID()
+  {
+    static const std::string MY_SUBSHAPES_ID("subshapes_to_keep");
     return MY_SUBSHAPES_ID;
   }
 
+  /// Attribute name of sub-shapes to remove.
+  inline static const std::string& SUBSHAPES_TO_REMOVE_ID()
+  {
+    static const std::string MY_SUBSHAPES_ID("subshapes_to_remove");
+    return MY_SUBSHAPES_ID;
+  }
+
+
   /// \return the kind of a feature.
   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
   {
@@ -71,6 +100,9 @@ public:
 
   /// Creates a new part document if needed.
   FEATURESPLUGIN_EXPORT virtual void execute();
+
+private:
+  bool myChangedInCode;
 };
 
 #endif
index 2b3188ddcbd4d5f4fcc439063fa034cc734974a5..66bef610ccf6784882a93a7291050995f306fa57 100644 (file)
 #include <GeomAlgoAPI_Boolean.h>
 #include <GeomAlgoAPI_MakeShapeList.h>
 #include <GeomAlgoAPI_PaveFiller.h>
+#include <GeomAlgoAPI_UnifySameDomain.h>
 
 #include <GeomAPI_ShapeExplorer.h>
+#include <GeomAPI_ShapeIterator.h>
 
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_ResultCompSolid.h>
@@ -87,7 +89,7 @@ void FeaturesPlugin_Union::execute()
     anObjects.insert(anObjects.end(), aUsedInOperationSolids.begin(), aUsedInOperationSolids.end());
 
     // Collect solids from compsolid which will not be modified in boolean operation.
-    for(GeomAPI_ShapeExplorer anExp(aCompSolid, GeomAPI_Shape::SOLID); anExp.more(); anExp.next()) {
+    for(GeomAPI_ShapeIterator anExp(aCompSolid); anExp.more(); anExp.next()) {
       std::shared_ptr<GeomAPI_Shape> aSolidInCompSolid = anExp.current();
       ListOfShape::iterator anIt = aUsedInOperationSolids.begin();
       for(; anIt != aUsedInOperationSolids.end(); anIt++) {
@@ -107,31 +109,36 @@ void FeaturesPlugin_Union::execute()
   }
 
   // Fuse objects.
+  std::shared_ptr<GeomAlgoAPI_MakeShape> anAlgo;
   ListOfShape aTools;
-  aTools.splice(aTools.begin(), anObjects, anObjects.begin());
-  std::shared_ptr<GeomAlgoAPI_Boolean> aFuseAlgo(new GeomAlgoAPI_Boolean(anObjects,
-                                                            aTools,
-                                                            GeomAlgoAPI_Boolean::BOOL_FUSE));
+  if (anObjects.front()->shapeType() == GeomAPI_Shape::SOLID) {
+    aTools.splice(aTools.begin(), anObjects, anObjects.begin());
+    anAlgo.reset(new GeomAlgoAPI_Boolean(anObjects,
+                 aTools,
+                 GeomAlgoAPI_Boolean::BOOL_FUSE));
+  } else {
+    anAlgo.reset(new GeomAlgoAPI_UnifySameDomain(anObjects));
+  }
 
   // Checking that the algorithm worked properly.
   GeomAlgoAPI_MakeShapeList aMakeShapeList;
   GeomAPI_DataMapOfShapeShape aMapOfShapes;
-  if(!aFuseAlgo->isDone()) {
+  if(!anAlgo->isDone()) {
     setError("Error: Boolean algorithm failed.");
     return;
   }
-  if(aFuseAlgo->shape()->isNull()) {
+  if(anAlgo->shape()->isNull()) {
     setError("Error: Resulting shape is Null.");
     return;
   }
-  if(!aFuseAlgo->isValid()) {
+  if(!anAlgo->isValid()) {
     setError("Error: Resulting shape is not valid.");
     return;
   }
 
-  GeomShapePtr aShape = aFuseAlgo->shape();
-  aMakeShapeList.appendAlgo(aFuseAlgo);
-  aMapOfShapes.merge(aFuseAlgo->mapOfSubShapes());
+  GeomShapePtr aShape = anAlgo->shape();
+  aMakeShapeList.appendAlgo(anAlgo);
+  aMapOfShapes.merge(anAlgo->mapOfSubShapes());
 
   // Store original shapes for naming.
   anObjects.splice(anObjects.begin(), aTools);
@@ -161,18 +168,21 @@ void FeaturesPlugin_Union::execute()
   }
 
   // Store result and naming.
-  const int aModifyTag = 1;
-  const int aDeletedTag = 2;
-  /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
-  const int aSubsolidsTag = 3;
+  const int aModifyEdgeTag = 1;
+  const int aModifyFaceTag = 2;
+  const int aDeletedTag = 3;
+  /// sub solids will be placed at labels 4, 5 etc. if result is compound of solids
+  const int aSubsolidsTag = 4;
   const std::string aModName = "Modified";
 
   std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
   aResultBody->storeModified(anObjects.front(), aShape, aSubsolidsTag);
 
   for(ListOfShape::const_iterator anIter = anObjects.begin(); anIter != anObjects.end(); ++anIter) {
+    aResultBody->loadAndOrientModifiedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::EDGE,
+                                             aModifyEdgeTag, aModName, aMapOfShapes);
     aResultBody->loadAndOrientModifiedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::FACE,
-                                             aModifyTag, aModName, aMapOfShapes);
+                                             aModifyFaceTag, aModName, aMapOfShapes);
     aResultBody->loadDeletedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
   }
 
index acc2b8becfa8d36a29a2f60c8d31a902f08b70c5..853037100234b21d18cd5330d293e58593c780bd 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "FeaturesPlugin_Validators.h"
 
+#include "FeaturesPlugin_Boolean.h"
 #include "FeaturesPlugin_Union.h"
 
 #include <Events_InfoMessage.h>
@@ -608,8 +609,11 @@ bool FeaturesPlugin_ValidatorBooleanSelection::isValid(const AttributePtr& theAt
     ResultConstructionPtr aResultConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if(aResultConstruction.get()) {
-      theError = "Error: Result construction not allowed for selection.";
-      return false;
+      if (anOperationType != FeaturesPlugin_Boolean::BOOL_FILL
+          || theAttribute->id() != FeaturesPlugin_Boolean::TOOL_LIST_ID()) {
+        theError = "Error: Result construction not allowed for selection.";
+        return false;
+      }
     }
     std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
     GeomShapePtr aContextShape = aContext->shape();
@@ -626,7 +630,7 @@ bool FeaturesPlugin_ValidatorBooleanSelection::isValid(const AttributePtr& theAt
     }
 
     int aShapeType = aShape->shapeType();
-    if(anOperationType == 1) {
+    if(anOperationType == FeaturesPlugin_Boolean::BOOL_FUSE) {
       // Fuse operation. Allow to select edges, faces and solids.
       if(aShapeType != GeomAPI_Shape::EDGE &&
          aShapeType != GeomAPI_Shape::FACE &&
@@ -636,6 +640,14 @@ bool FeaturesPlugin_ValidatorBooleanSelection::isValid(const AttributePtr& theAt
         theError = "Error: Selected shape has the wrong type.";
         return false;
       }
+    } else if (anOperationType == FeaturesPlugin_Boolean::BOOL_FILL) {
+      if(aShapeType != GeomAPI_Shape::FACE &&
+         aShapeType != GeomAPI_Shape::SOLID &&
+         aShapeType != GeomAPI_Shape::COMPSOLID &&
+         aShapeType != GeomAPI_Shape::COMPOUND) {
+        theError = "Error: Selected shape has the wrong type.";
+        return false;
+      }
     } else {
       if(aShapeType != GeomAPI_Shape::SOLID &&
          aShapeType != GeomAPI_Shape::COMPSOLID &&
@@ -759,7 +771,7 @@ bool FeaturesPlugin_ValidatorRemoveSubShapesResult::isValid(
   Events_InfoMessage& theError) const
 {
   static const std::string aBaseShapeID = "base_shape";
-  static const std::string aSubShapesID = "subshapes";
+  static const std::string aSubShapesID = "subshapes_to_keep";
 
   if(theFeature->getKind() != "Remove_SubShapes") {
     theError = "Error: Feature \"%1\" does not supported by this validator.";
@@ -789,6 +801,11 @@ bool FeaturesPlugin_ValidatorRemoveSubShapesResult::isValid(
   }
   GeomShapePtr aResultShape = aBaseShape->emptyCopied();
 
+  if (aSubShapesAttrList->size() == 0) {
+    theError = "Error: Resulting shape is not valid.";
+    return false;
+  }
+
   // Copy sub-shapes from list to new shape.
   for(int anIndex = 0; anIndex < aSubShapesAttrList->size(); ++anIndex) {
     AttributeSelectionPtr anAttrSelectionInList = aSubShapesAttrList->value(anIndex);
@@ -828,11 +845,28 @@ bool FeaturesPlugin_ValidatorUnionSelection::isValid(const AttributePtr& theAttr
   for(int anIndex = 0; anIndex < aBaseObjectsAttrList->size(); ++anIndex) {
     bool isSameFound = false;
     AttributeSelectionPtr anAttrSelectionInList = aBaseObjectsAttrList->value(anIndex);
+    ResultPtr aContext = anAttrSelectionInList->context();
+
+    ResultConstructionPtr aConstruction =
+      std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
+    if(aConstruction.get()) {
+      theError = "Error: Result construction not allowed for selection.";
+      return false;
+    }
+
+    GeomShapePtr aShape = anAttrSelectionInList->value();
+    GeomShapePtr aContextShape = aContext->shape();
+    if (aShape.get() && aContextShape.get() && !aContextShape->isEqual(aShape)) {
+      theError = "Error: Local selection not allowed.";
+      return false;
+    }
+
     ResultCompSolidPtr aResult =
-      std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(anAttrSelectionInList->context());
+      std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
     if(!aResult.get()) {
       continue;
     }
+
     if(aResult->numberOfSubs() > 0) {
       theError = "Error: Whole compsolids not allowed for selection.";
       return false;
@@ -865,17 +899,27 @@ bool FeaturesPlugin_ValidatorUnionArguments::isValid(
   }
 
   // Get all shapes.
+  GeomAPI_Shape::ShapeType aType = GeomAPI_Shape::COMPSOLID;
   ListOfShape aBaseShapesList;
   for(int anIndex = 0; anIndex < aBaseObejctsAttrList->size(); ++anIndex) {
     AttributeSelectionPtr anAttrSelectionInList = aBaseObejctsAttrList->value(anIndex);
     GeomShapePtr aShape = anAttrSelectionInList->value();
+    if (!aShape.get()) {
+      continue;
+    }
     aBaseShapesList.push_back(aShape);
+    aType = aShape->shapeType() == GeomAPI_Shape::FACE ? GeomAPI_Shape::SHELL :
+                                                         GeomAPI_Shape::COMPSOLID;
   }
 
-  // Make componud and find connected.
+  // Make compound and find connected.
   GeomShapePtr aCompound = GeomAlgoAPI_CompoundBuilder::compound(aBaseShapesList);
   ListOfShape aCombined, aFree;
-  GeomAlgoAPI_ShapeTools::combineShapes(aCompound, GeomAPI_Shape::COMPSOLID, aCombined, aFree);
+  GeomAlgoAPI_ShapeTools::combineShapes(
+    aCompound,
+    aType,
+    aCombined,
+    aFree);
 
   if(aFree.size() > 0 || aCombined.size() > 1) {
     theError = "Error: Not all shapes have shared topology.";
index 1e7fab54dc35286a1b64cbf28a722be222dabc24..5a46be2543c0b999757c6df18206e92966c247f5 100644 (file)
   <context>
     <name>Union:GeomValidators_MinObjectsSelected</name>
     <message>
-      <source>Error: Attribute \"%1\" should contain at least %2 items.</source>
-      <translation></translation>
+      <source>Error: Attribute "%1" should contain at least %2 items.</source>
+      <translation>"Base objects" should contain at least 2 items.</translation>
     </message>
   </context>
 </TS>
index e07e3e154ee3f87c02f12aff1b7b1411e29b7a7a..6ce089431641e386e80f32c1eaaecae588be27e1 100644 (file)
@@ -36,7 +36,7 @@ SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(),
 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint())
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_3"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")])
 model.end()
 
 # check that resulting group selection is valid
index 9ebe471a7456f689f499c2a5612d1e081190825c..d68bbf00c05ec1336ae72d513fbaf97c13d6e57f 100644 (file)
@@ -52,7 +52,7 @@ SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.endPoint(),
 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_7")
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5r-SketchLine_6r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&Revolution_1_1/Generated_Face_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3")])
 model.end()
 
 # check that resulting group selection is valid
index 5d629f65db7ae99ada5b542b7a80cc3eb40a6b72..bab4cc8ba57f36153a915d809d509ffe1375a3a5 100644 (file)
@@ -106,7 +106,7 @@ Group_2.result().setName("acier")
 Group_2.result().setColor(170, 85, 0)
 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOY"))
 SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Partition_1_1_1/Modified_Edge_15_18&Partition_1_1_1/Modified_Edge_15_17"))
+SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Partition_1_1_1/Modified_Edge_15_15&Partition_1_1_1/Modified_Edge_15_16"))
 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
 SketchLine_12 = Sketch_3.addLine(30, 0, 30, 10)
 SketchLine_13 = Sketch_3.addLine(30, 10, 40, 10)
index 89f15dd57e38564aa82aab891e05d74fbf80111b..20e48f5b9a5f339618c0318eef7cf59d027fd460 100644 (file)
@@ -48,7 +48,7 @@ SketchConstraintTangent_2 = Sketch_1.setTangent(SketchLine_3.result(), SketchArc
 SketchCircle_1 = Sketch_1.addCircle(-13.45056286489504, 169.4770920976776, 150.6703210346195)
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 10, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_7"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7")])
 model.end()
 
 # check that resulting group selection is valid
diff --git a/src/FeaturesPlugin/Test/Test2304.py b/src/FeaturesPlugin/Test/Test2304.py
new file mode 100644 (file)
index 0000000..cd9c8d6
--- /dev/null
@@ -0,0 +1,69 @@
+## Copyright (C) 2014-2017  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<mailto: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(64.44596912521442, 49.72041166380789, -52.66552315608919, 49.72041166380789)
+SketchLine_2 = Sketch_1.addLine(-52.66552315608919, 49.72041166380789, -52.66552315608919, -67.3910806174957)
+SketchLine_3 = Sketch_1.addLine(-52.66552315608919, -67.3910806174957, 64.44596912521442, -67.3910806174957)
+SketchLine_4 = Sketch_1.addLine(64.44596912521442, -67.3910806174957, 64.44596912521442, 49.72041166380789)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+SketchLine_5 = Sketch_1.addLine(34.99485420240136, 11.60720411663807, -11.7804459691252, 11.60720411663807)
+SketchLine_6 = Sketch_1.addLine(-11.7804459691252, 11.60720411663807, -11.7804459691252, -33.78216123499142)
+SketchLine_7 = Sketch_1.addLine(-11.7804459691252, -33.78216123499142, 34.99485420240136, -33.78216123499142)
+SketchLine_8 = Sketch_1.addLine(34.99485420240136, -33.78216123499142, 34.99485420240136, 11.60720411663807)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
+SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result())
+SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result())
+SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result())
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f")], model.selection(), 100, 100)
+Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3")])
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("FACE", "Face_1_1")])
+model.do()
+model.end()
+
+from GeomAPI import  GeomAPI_Shape
+
+model.testNbResults(Partition_1, 1)
+model.testNbSubResults(Partition_1, [2])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.FACE, [13])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.EDGE, [56])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.VERTEX, [112])
+model.testResultsVolumes(Partition_1, [424620.237783511402085423469543457])
+
+assert(model.checkPythonDump())
diff --git a/src/FeaturesPlugin/Test/TestBooleanFillWithPlane.py b/src/FeaturesPlugin/Test/TestBooleanFillWithPlane.py
new file mode 100644 (file)
index 0000000..dbc2670
--- /dev/null
@@ -0,0 +1,69 @@
+## Copyright (C) 2014-2017  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<mailto: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(50.45430931454487, 141.3050678403047, -211.8625790259634, 141.3050678403047)
+SketchLine_2 = Sketch_1.addLine(-211.8625790259634, 141.3050678403047, -211.8625790259634, -163.3288837233227)
+SketchLine_3 = Sketch_1.addLine(-211.8625790259634, -163.3288837233227, 50.45430931454487, -163.3288837233227)
+SketchLine_4 = Sketch_1.addLine(50.45430931454487, -163.3288837233227, 50.45430931454487, 141.3050678403047)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+SketchLine_5 = Sketch_1.addLine(246.5736143115653, 48.78197815871301, -51.09047583637312, 48.78197815871301)
+SketchLine_6 = Sketch_1.addLine(-51.09047583637312, 48.78197815871301, -51.09047583637312, -104.8260668928192)
+SketchLine_7 = Sketch_1.addLine(-51.09047583637312, -104.8260668928192, 246.5736143115653, -104.8260668928192)
+SketchLine_8 = Sketch_1.addLine(246.5736143115653, -104.8260668928192, 246.5736143115653, 48.78197815871301)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
+SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result())
+SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result())
+SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result())
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 100, 0)
+Boolean_1 = model.addFill(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1_2")], [model.selection("FACE", "PartSet/YOZ")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Boolean_1_1_4/Modified_3"), model.selection("FACE", "Boolean_1_1_4/Modified_Face_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_9"), model.selection("FACE", "Boolean_1_1_4/Modified_2"), model.selection("FACE", "Boolean_1_1_4/Modified_4"), model.selection("FACE", "Boolean_1_1_4/Modified_1"), model.selection("FACE", "Boolean_1_1_4/Modified_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_6"), model.selection("FACE", "Boolean_1_1_3/Modified_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_7"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_9"), model.selection("FACE", "Boolean_1_1_1/Modified_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_5"), model.selection("FACE", "Boolean_1_1_4/Modified_4"), model.selection("FACE", "Boolean_1_1_1/Modified_2"), model.selection("FACE", "Boolean_1_1_3/Modified_4"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_12"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_11"), model.selection("FACE", "Boolean_1_1_3/Modified_3"), model.selection("FACE", "Boolean_1_1_3/Modified_2"), model.selection("FACE", "Boolean_1_1_3/Modified_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_4"), model.selection("FACE", "Boolean_1_1_3/Modified_4"), model.selection("FACE", "Boolean_1_1_4/Modified_Face_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_4"), model.selection("FACE", "_Extrusion_1_1/To_Face_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_2"), model.selection("FACE", "_Extrusion_1_1/From_Face_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_1")])
+model.do()
+model.end()
+
+from GeomAPI import  GeomAPI_Shape
+
+model.testNbResults(Boolean_1, 1)
+model.testNbSubResults(Boolean_1, [4])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.SOLID, [4])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.FACE, [30])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.EDGE, [132])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.VERTEX, [264])
+model.testResultsVolumes(Boolean_1, [11003613.329450136050581932067871094])
+
+assert(model.checkPythonDump())
index 4d3daea4479f0bff6399c6796b338396d77185b6..5e44cac127913e038df1dc283cb72ffa9e22fb89 100644 (file)
@@ -250,9 +250,9 @@ anExtrusionFt.selectionList("base").append(
 anExtrusionFt.string("CreationMethod").setValue("ByPlanesAndOffsets")
 anExtrusionFt.real("to_size").setValue(0) #TODO: remove
 anExtrusionFt.real("from_size").setValue(0) #TODO: remove
-anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_2")
+anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_3")
 anExtrusionFt.real("to_offset").setValue(0)
-anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_1")
+anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_4")
 anExtrusionFt.real("from_offset").setValue(0)
 anExtrusionFt.execute()
 aSession.finishOperation()
index a94dcee60183a4777fe746df64206e78de3513ff..9a10cfab5d2b3a8fdf17d678fb9761f628e893a1 100644 (file)
@@ -87,7 +87,8 @@ anExtrusionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(anExtrusionFeat
 aSession.startOperation()
 aRemoveSubShapesFeature = aPart.addFeature("Remove_SubShapes")
 aRemoveSubShapesFeature.selection("base_shape").setValue(anExtrusionResult, None)
-aRemoveSubShapesFeature.selectionList("subshapes").removeLast();
+aRemoveSubShapesFeature.string("creation_method").setValue("by_keep_subshapes")
+aRemoveSubShapesFeature.selectionList("subshapes_to_keep").removeLast();
 aSession.finishOperation()
 assert (len(aRemoveSubShapesFeature.results()) > 0)
 anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aRemoveSubShapesFeature.firstResult()))
diff --git a/src/FeaturesPlugin/Test/TestRemoveSubShapes2.py b/src/FeaturesPlugin/Test/TestRemoveSubShapes2.py
new file mode 100644 (file)
index 0000000..f630056
--- /dev/null
@@ -0,0 +1,47 @@
+## Copyright (C) 2014-2017  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<mailto: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"))
+SketchCircle_1 = Sketch_1.addCircle(-38.80617495711836, 0.1732418524871273, 42.63017006028262)
+SketchCircle_2 = Sketch_1.addCircle(-117.8044596912521, -0.1732418524871385, 54.50817511994374)
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 10, 0)
+Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPSOLID", "Extrusion_1_1"))
+Remove_SubShapes_1.setSubShapesToRemove([model.selection("SOLID", "Extrusion_1_1_3")])
+model.do()
+model.end()
+
+from GeomAPI import GeomAPI_Shape
+
+model.testNbResults(Remove_SubShapes_1, 1)
+model.testNbSubResults(Remove_SubShapes_1, [2])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.FACE, [10])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.EDGE, [36])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.VERTEX, [72])
+model.testResultsVolumes(Remove_SubShapes_1, [136619.795923917088657617568969727])
+
+assert(model.checkPythonDump())
diff --git a/src/FeaturesPlugin/Test/TestUnionFaces.py b/src/FeaturesPlugin/Test/TestUnionFaces.py
new file mode 100644 (file)
index 0000000..3bbd55f
--- /dev/null
@@ -0,0 +1,45 @@
+## Copyright (C) 2014-2017  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<mailto: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"))
+SketchCircle_1 = Sketch_1.addCircle(-5.197255574614073, 0.1732418524871273, 67.586529314451)
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")])
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "PartSet/YOZ"), model.selection("FACE", "PartSet/XOZ")])
+Union_1 = model.addUnion(Part_1_doc, [model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4")])
+model.do()
+model.end()
+
+from GeomAPI import GeomAPI_Shape
+
+model.testNbResults(Union_1, 1)
+model.testNbSubResults(Union_1, [3])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.FACE, [3])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.EDGE, [10])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.VERTEX, [20])
+
+assert(model.checkPythonDump())
diff --git a/src/FeaturesPlugin/icons/keep_subshapes_32x32.png b/src/FeaturesPlugin/icons/keep_subshapes_32x32.png
new file mode 100644 (file)
index 0000000..45319eb
Binary files /dev/null and b/src/FeaturesPlugin/icons/keep_subshapes_32x32.png differ
diff --git a/src/FeaturesPlugin/icons/remove_subshapes_32x32.png b/src/FeaturesPlugin/icons/remove_subshapes_32x32.png
new file mode 100644 (file)
index 0000000..094f6d4
Binary files /dev/null and b/src/FeaturesPlugin/icons/remove_subshapes_32x32.png differ
index 353881c4554a970d05053b9dfe1498f76634b6f5..92cb0aab07e22f78261d5b8a9d6da33ec3ca9a2a 100644 (file)
@@ -29,12 +29,29 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
     <validator id="GeomValidators_ShapeType" parameters="wire,shell,compsolid,compound"/>
     <validator id="GeomValidators_BodyShapes" parameters="toplevel"/>
   </shape_selector>
-  <multi_selector id="subshapes"
-                  label="Sub-Shapes to keep:"
-                  tooltip="Select shapes to keep."
-                  type_choice="vertices edges wires faces shells solids compsolids compounds"
-                  clear_in_neutral_point="false">
-    <validator id="FeaturesPlugin_ValidatorRemoveSubShapesSelection"/>
-  </multi_selector>
+  <toolbox id="creation_method">
+    <box id="by_remove_subshapes"
+     title="By removing sub-shapes"
+     icon="icons/Features/remove_subshapes_32x32.png">
+      <multi_selector id="subshapes_to_remove"
+                label="Sub-Shapes to remove:"
+                tooltip="Select shapes to remove."
+                type_choice="vertices edges wires faces shells solids compsolids compounds"
+                clear_in_neutral_point="false">
+        <validator id="FeaturesPlugin_ValidatorRemoveSubShapesSelection"/>
+      </multi_selector>
+    </box>
+    <box id="by_keep_subshapes"
+     title="By keeping sub-shapes"
+     icon="icons/Features/keep_subshapes_32x32.png">
+      <multi_selector id="subshapes_to_keep"
+                label="Sub-Shapes to keep:"
+                tooltip="Select shapes to keep."
+                type_choice="vertices edges wires faces shells solids compsolids compounds"
+                clear_in_neutral_point="false">
+        <validator id="FeaturesPlugin_ValidatorRemoveSubShapesSelection"/>
+      </multi_selector>
+    </box>
+  </toolbox>
   <validator id="FeaturesPlugin_ValidatorRemoveSubShapesResult"/>
 </source>
index 1de6e9a6ea243d82ed5026a01d94c50fdd2c5050..2d14a54bd2515186a1ed85813ce7a01d0f8b7bdd 100644 (file)
@@ -23,7 +23,7 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
   <multi_selector id="base_objects"
     label="Base objects:"
     tooltip="Select solids for union."
-    type_choice="solids compsolids"
+    type_choice="faces solids compsolids"
     use_choice="false"
     concealment="true">
     <validator id="FeaturesPlugin_ValidatorUnionSelection"/>
index 205d9ddf5fc2cb5800c7d9d41805b0186ab6783b..6654525fa428de3ea445f9bb6f510c47111336d9 100644 (file)
@@ -23,10 +23,12 @@ INCLUDE(Common)
 SET(PROJECT_HEADERS
   GDMLAPI.h
   GDMLAPI_ConeSegment.h
+  GDMLAPI_Ellipsoid.h
 )
 
 SET(PROJECT_SOURCES
   GDMLAPI_ConeSegment.cpp
+  GDMLAPI_Ellipsoid.cpp
 )
 
 SET(PROJECT_LIBRARIES
index 82eb12a37a5b8a8c1f8c3c7fd67181b7330987d5..25516108d34d1ddb4ce0bfb962d969306884fca2 100644 (file)
@@ -45,7 +45,8 @@
 
 // shared pointers
 %shared_ptr(GDMLAPI_ConeSegment)
+%shared_ptr(GDMLAPI_Ellipsoid)
 
 // all supported interfaces
 %include "GDMLAPI_ConeSegment.h"
-
+%include "GDMLAPI_Ellipsoid.h"
diff --git a/src/GDMLAPI/GDMLAPI_Ellipsoid.cpp b/src/GDMLAPI/GDMLAPI_Ellipsoid.cpp
new file mode 100644 (file)
index 0000000..385b5de
--- /dev/null
@@ -0,0 +1,144 @@
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
+
+#include "GDMLAPI_Ellipsoid.h"
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Tools.h>
+
+GDMLAPI_Ellipsoid::GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+  : ModelHighAPI_Interface(theFeature)
+{
+  initialize();
+}
+
+GDMLAPI_Ellipsoid::GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                                     const ModelHighAPI_Double& theAX,
+                                     const ModelHighAPI_Double& theBY,
+                                     const ModelHighAPI_Double& theCZ)
+  : ModelHighAPI_Interface(theFeature)
+{
+  if (initialize()) {
+    setSizes(theAX, theBY, theCZ);
+    fillAttribute("", useZCut1());
+    fillAttribute("", useZCut1());
+  }
+}
+
+GDMLAPI_Ellipsoid::GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                                     const ModelHighAPI_Double& theAX,
+                                     const ModelHighAPI_Double& theBY,
+                                     const ModelHighAPI_Double& theCZ,
+                                     const ModelHighAPI_Double& theZCut1,
+                                     const ModelHighAPI_Double& theZCut2)
+  : ModelHighAPI_Interface(theFeature)
+{
+  if (initialize()) {
+    setSizes(theAX, theBY, theCZ);
+    setZCut1(theZCut1);
+    setZCut2(theZCut2);
+  }
+}
+
+GDMLAPI_Ellipsoid::~GDMLAPI_Ellipsoid()
+{
+}
+
+void GDMLAPI_Ellipsoid::setSizes(const ModelHighAPI_Double& theAX,
+                                 const ModelHighAPI_Double& theBY,
+                                 const ModelHighAPI_Double& theCZ)
+{
+  fillAttribute(theAX, ax());
+  fillAttribute(theBY, by());
+  fillAttribute(theCZ, cz());
+
+  execute();
+}
+
+void GDMLAPI_Ellipsoid::setZCut1(const ModelHighAPI_Double& theZCut1)
+{
+  fillAttribute("true", useZCut1());
+  fillAttribute(theZCut1, zCut1());
+
+  execute();
+}
+
+void GDMLAPI_Ellipsoid::setZCut2(const ModelHighAPI_Double& theZCut2)
+{
+  fillAttribute("true", useZCut2());
+  fillAttribute(theZCut2, zCut2());
+
+  execute();
+}
+
+
+//==================================================================================================
+void GDMLAPI_Ellipsoid::dump(ModelHighAPI_Dumper& theDumper) const
+{
+  FeaturePtr aBase = feature();
+  const std::string& aDocName = theDumper.name(aBase->document());
+
+  AttributeDoublePtr anAttrAX = aBase->real(GDMLPlugin_Ellipsoid::AX_ID());
+  AttributeDoublePtr anAttrBY = aBase->real(GDMLPlugin_Ellipsoid::BY_ID());
+  AttributeDoublePtr anAttrCZ = aBase->real(GDMLPlugin_Ellipsoid::CZ_ID());
+
+  theDumper << aBase << " = model.addEllipsoid(" << aDocName << ", "
+            << anAttrAX << ", " << anAttrBY << ", " << anAttrCZ;
+
+  AttributeStringPtr anAttrUseZCut1 = aBase->string(GDMLPlugin_Ellipsoid::USE_ZCUT1_ID());
+  AttributeDoublePtr anAttrZCut1 = aBase->real(GDMLPlugin_Ellipsoid::ZCUT1_ID());
+  AttributeStringPtr anAttrUseZCut2 = aBase->string(GDMLPlugin_Ellipsoid::USE_ZCUT2_ID());
+  AttributeDoublePtr anAttrZCut2 = aBase->real(GDMLPlugin_Ellipsoid::ZCUT2_ID());
+
+  bool isZCut1 = !anAttrUseZCut1->value().empty();
+  bool isZCut2 = !anAttrUseZCut2->value().empty();
+  if (isZCut1 && isZCut2)
+    theDumper << ", " << anAttrZCut1 << ", " << anAttrZCut2 << ")" << std::endl;
+  else {
+    theDumper << ")" << std::endl;
+
+    if (isZCut1 && !isZCut2)
+      theDumper << theDumper.name(aBase) << ".setZCut1(" << anAttrZCut1 << ")" << std::endl;
+    else if (!isZCut1 && isZCut2)
+      theDumper << theDumper.name(aBase) << ".setZCut2(" << anAttrZCut2 << ")" << std::endl;
+  }
+}
+
+
+//==================================================================================================
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+                          const ModelHighAPI_Double& theAX,
+                          const ModelHighAPI_Double& theBY,
+                          const ModelHighAPI_Double& theCZ)
+{
+  std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(GDMLAPI_Ellipsoid::ID());
+  return EllipsoidPtr(new GDMLAPI_Ellipsoid(aFeature, theAX, theBY, theCZ));
+}
+
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+                          const ModelHighAPI_Double& theAX,
+                          const ModelHighAPI_Double& theBY,
+                          const ModelHighAPI_Double& theCZ,
+                          const ModelHighAPI_Double& theZCut1,
+                          const ModelHighAPI_Double& theZCut2)
+{
+  std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(GDMLAPI_Ellipsoid::ID());
+  return EllipsoidPtr(new GDMLAPI_Ellipsoid(aFeature, theAX, theBY, theCZ, theZCut1, theZCut2));
+}
diff --git a/src/GDMLAPI/GDMLAPI_Ellipsoid.h b/src/GDMLAPI/GDMLAPI_Ellipsoid.h
new file mode 100644 (file)
index 0000000..dcc93ff
--- /dev/null
@@ -0,0 +1,125 @@
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef GDMLAPI_Ellipsoid_H_
+#define GDMLAPI_Ellipsoid_H_
+
+#include "GDMLAPI.h"
+
+#include <GDMLPlugin_Ellipsoid.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Double;
+
+/// \class GDMLAPI_Ellipsoid
+/// \ingroup CPPHighAPI
+/// \brief Interface for primitive Ellipsoid feature.
+class GDMLAPI_Ellipsoid: public ModelHighAPI_Interface
+{
+public:
+  /// Constructor without values.
+  GDMLAPI_EXPORT
+  explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+  /// Constructor with values.
+  GDMLAPI_EXPORT
+  explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                             const ModelHighAPI_Double& theAX,
+                             const ModelHighAPI_Double& theBY,
+                             const ModelHighAPI_Double& theCZ);
+
+  /// Constructor with values.
+  GDMLAPI_EXPORT
+  explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                             const ModelHighAPI_Double& theAX,
+                             const ModelHighAPI_Double& theBY,
+                             const ModelHighAPI_Double& theCZ,
+                             const ModelHighAPI_Double& theZCut1,
+                             const ModelHighAPI_Double& theZCut2);
+
+  /// Destructor.
+  GDMLAPI_EXPORT
+  virtual ~GDMLAPI_Ellipsoid();
+
+  INTERFACE_7(GDMLPlugin_Ellipsoid::ID(),
+              ax, GDMLPlugin_Ellipsoid::AX_ID(),
+                  ModelAPI_AttributeDouble,
+                  /** Ellipsoid size along X axis */,
+              by, GDMLPlugin_Ellipsoid::BY_ID(),
+                  ModelAPI_AttributeDouble,
+                  /** Ellipsoid size along Y axis */,
+              cz, GDMLPlugin_Ellipsoid::CZ_ID(),
+                  ModelAPI_AttributeDouble,
+                  /** Ellipsoid size along Z axis */,
+              useZCut1, GDMLPlugin_Ellipsoid::USE_ZCUT1_ID(),
+                  ModelAPI_AttributeString,
+                  /** First cut of the ellipsoid along Z axis */,
+              zCut1, GDMLPlugin_Ellipsoid::ZCUT1_ID(),
+                  ModelAPI_AttributeDouble,
+                  /** Position of the first cut */,
+              useZCut2, GDMLPlugin_Ellipsoid::USE_ZCUT2_ID(),
+                  ModelAPI_AttributeString,
+                  /** Second cut of the ellipsoid along Z axis */,
+              zCut2, GDMLPlugin_Ellipsoid::ZCUT2_ID(),
+                  ModelAPI_AttributeDouble,
+                  /** Position of the second cut */)
+
+  /// Set dimensions
+  GDMLAPI_EXPORT
+  void setSizes(const ModelHighAPI_Double& theAX,
+                const ModelHighAPI_Double& theBY,
+                const ModelHighAPI_Double& theCZ);
+
+  /// Set Z cut no.1
+  GDMLAPI_EXPORT
+  void setZCut1(const ModelHighAPI_Double& theZCut1);
+
+  /// Set Z cut no.2
+  GDMLAPI_EXPORT
+  void setZCut2(const ModelHighAPI_Double& theZCut2);
+
+  /// Dump wrapped feature
+  GDMLAPI_EXPORT
+  virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+};
+
+/// Pointer on primitive Ellipsoid object
+typedef std::shared_ptr<GDMLAPI_Ellipsoid> EllipsoidPtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create GDML Ellipsoid feature.
+GDMLAPI_EXPORT
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+                          const ModelHighAPI_Double& theAX,
+                          const ModelHighAPI_Double& theBY,
+                          const ModelHighAPI_Double& theCZ);
+
+/// \ingroup CPPHighAPI
+/// \brief Create GDML Ellipsoid feature.
+GDMLAPI_EXPORT
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+                          const ModelHighAPI_Double& theAX,
+                          const ModelHighAPI_Double& theBY,
+                          const ModelHighAPI_Double& theCZ,
+                          const ModelHighAPI_Double& theZCut1,
+                          const ModelHighAPI_Double& theZCut2);
+#endif // GDMLAPI_Ellipsoid_H_
index 2d4d2a705242fe11e767430349b6f5a6827537c2..91571affdf5a9c3391dc62dc16d5b35581cd4aa2 100644 (file)
@@ -25,6 +25,7 @@
 
   #include "GDMLAPI.h"
   #include "GDMLAPI_ConeSegment.h"
+  #include "GDMLAPI_Ellipsoid.h"
 
 #endif // GDMLAPI_swig_H_
 
index 78ca7b9d6f3d226184b19d46e5327797c9de3204..aa563452be9c29f5aa92b63c8de5e1b16c97aab6 100644 (file)
@@ -73,6 +73,7 @@ SET(PROJECT_HEADERS
     GeomAlgoAPI_Symmetry.h
     GeomAlgoAPI_Scale.h
     GeomAlgoAPI_Circ2dBuilder.h
+    GeomAlgoAPI_UnifySameDomain.h
 )
 
 SET(PROJECT_SOURCES
@@ -124,6 +125,7 @@ SET(PROJECT_SOURCES
     GeomAlgoAPI_Symmetry.cpp
     GeomAlgoAPI_Scale.cpp
     GeomAlgoAPI_Circ2dBuilder.cpp
+    GeomAlgoAPI_UnifySameDomain.cpp
 )
 
 SET(PROJECT_LIBRARIES
index 4222649a85985b9020fecba800ecdfe539c93779..de1551c6b375204260eb9c0fba787ae0590bccf8 100644 (file)
 
 #include <GEOMAlgo_Splitter.hxx>
 
+#include <NCollection_Vector.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS_Builder.hxx>
 #include <TopTools_MapOfShape.hxx>
 
+//=================================================================================================
+bool isSubShape(const TopoDS_Shape& theShape, const TopoDS_Shape& theSubShape)
+{
+  for(TopExp_Explorer anExp(theShape, theSubShape.ShapeType()); anExp.More(); anExp.Next()) {
+    if(theSubShape.IsSame(anExp.Current())) {
+      return true;
+    }
+  }
+
+  return false;
+}
+
 //=================================================================================================
 std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Partition::make(const ListOfShape& theObjects,
                                                            const ListOfShape& theTools)
@@ -78,8 +91,10 @@ void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects,
 
   TopTools_MapOfShape ShapesMap;
   // Getting objects.
-  for(ListOfShape::const_iterator
-       anObjectsIt = theObjects.begin(); anObjectsIt != theObjects.end(); anObjectsIt++) {
+  for(ListOfShape::const_iterator anObjectsIt = theObjects.begin();
+      anObjectsIt != theObjects.end();
+      anObjectsIt++)
+  {
     const TopoDS_Shape& aShape = (*anObjectsIt)->impl<TopoDS_Shape>();
     // #2240: decompose compounds to get the valid result
     TopTools_ListOfShape aSimpleShapes;
@@ -112,6 +127,37 @@ void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects,
 #endif
   TopoDS_Shape aResult = anOperation->Shape();
 
+  if(aResult.ShapeType() == TopAbs_COMPOUND) {
+    // Exclude faces and edges which are shared as another sub-shape.
+    NCollection_Vector<TopoDS_Shape> aFacesAndEdges;
+    TopoDS_Compound aTempCompound;
+    TopoDS_Builder aBuilder;
+    aBuilder.MakeCompound(aTempCompound);
+    for(TopoDS_Iterator anIt(aResult);
+        anIt.More();
+        anIt.Next()) {
+      const TopoDS_Shape& aSubShape = anIt.Value();
+      if (aSubShape.ShapeType() == TopAbs_FACE || aSubShape.ShapeType() == TopAbs_EDGE) {
+        aFacesAndEdges.Append(aSubShape);
+      } else {
+        aBuilder.Add(aTempCompound, aSubShape);
+      }
+    }
+
+    for (NCollection_Vector<TopoDS_Shape>::Iterator anIt(aFacesAndEdges);
+        anIt.More();
+        anIt.Next())
+    {
+      const TopoDS_Shape& aSubShape = anIt.Value();
+      if (!isSubShape(aTempCompound, aSubShape))
+      {
+        aBuilder.Add(aTempCompound, aSubShape);
+      }
+    }
+
+    aResult = aTempCompound;
+  }
+
   if(aResult.ShapeType() == TopAbs_COMPOUND) {
     std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
     aGeomShape->setImpl(new TopoDS_Shape(aResult));
index eadaee6c6cce7317ae3b0bcb3205afd579fbbdbf..a6da1e785e24b70d0a84b515c1afd0b7805fbc94 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <BOPAlgo_Builder.hxx>
 #include <BRep_Builder.hxx>
+#include <BRepTools_WireExplorer.hxx>
 #include <BRepTopAdaptor_FClass2d.hxx>
 #include <Geom_Plane.hxx>
 #include <Geom_TrimmedCurve.hxx>
@@ -63,7 +64,7 @@ static TopoDS_Vertex findStartVertex(const TopoDS_Shape& theShape)
   return aStart;
 }
 
-static TopoDS_Vertex findStartVertex(const TopoDS_Shape& theShape,
+static TopoDS_Vertex findStartVertex(const TopoDS_Wire& theWire, const TopoDS_Face& theFace,
     const std::list<std::shared_ptr<GeomAPI_Shape> >& theInitialShapes)
 {
   // Try to find edge lying on the one of original edges.
@@ -80,9 +81,9 @@ static TopoDS_Vertex findStartVertex(const TopoDS_Shape& theShape,
     if (aCurve->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve))
       aCurve = Handle(Geom_TrimmedCurve)::DownCast(aCurve)->BasisCurve();
 
-    TopExp_Explorer anExp(theShape, TopAbs_EDGE);
+    BRepTools_WireExplorer anExp(theWire, theFace);
     for (; anExp.More(); anExp.Next()) {
-      const TopoDS_Edge& aShapeEdge = TopoDS::Edge(anExp.Current());
+      const TopoDS_Edge& aShapeEdge = anExp.Current();
       double aF, aL;
       Handle(Geom_Curve) aShapeCurve = BRep_Tool::Curve(aShapeEdge, aF, aL);
       if (aShapeCurve->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve))
@@ -99,7 +100,7 @@ static TopoDS_Vertex findStartVertex(const TopoDS_Shape& theShape,
   }
 
   // start vertex is not found, use algorithm to search vertex with the greatest coordinates
-  return findStartVertex(theShape);
+  return findStartVertex(theWire);
 }
 
 // returns true if the first shape must be located earlier than the second
@@ -247,7 +248,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
 
       // to make faces equal on different platforms, we will find
       // a vertex lying on an edge with the lowest index in the list of initial edges
-      TopoDS_Vertex aStartVertex = findStartVertex(aWire, theFeatures);
+      TopoDS_Vertex aStartVertex = findStartVertex(aWire, aFace, theFeatures);
 
       TopoDS_Wire aNewWire;
       aBuilder.MakeWire(aNewWire);
@@ -255,12 +256,12 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
       bool aStartFound = false;
 
       // remove internal edges from faces and make wire start from found vertex
-      TopExp_Explorer anExp(aWire, TopAbs_EDGE);
+      BRepTools_WireExplorer anExp(aWire, aFace);
       for (; anExp.More(); anExp.Next()) {
         if (anExp.Current().Orientation() == TopAbs_INTERNAL)
           continue;
         if (!aStartFound) {
-          const TopoDS_Edge& anEdge = TopoDS::Edge(anExp.Current());
+          const TopoDS_Edge& anEdge = anExp.Current();
           TopoDS_Vertex aV1, aV2;
           TopExp::Vertices(anEdge, aV1, aV2, Standard_True);
           if (aV1.IsSame(aStartVertex) == Standard_True)
@@ -277,7 +278,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
         aBuilder.Add(aNewWire, *aSkIt);
 
       // check the wire is empty
-      anExp.Init(aNewWire, TopAbs_EDGE);
+      anExp.Init(aNewWire);
       if (anExp.More())
         aBuilder.Add(aNewFace, aNewWire);
     }
diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
new file mode 100644 (file)
index 0000000..8e8238a
--- /dev/null
@@ -0,0 +1,106 @@
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
+
+#include "GeomAlgoAPI_UnifySameDomain.h"
+
+#include <GeomAlgoAPI_CompoundBuilder.h>
+#include <GeomAlgoAPI_ShapeTools.h>
+
+#include <ShapeUpgrade_UnifySameDomain.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS_Shape.hxx>
+
+//==================================================================================================
+GeomAlgoAPI_UnifySameDomain::GeomAlgoAPI_UnifySameDomain(const ListOfShape& theShapes)
+{
+  build(theShapes);
+}
+
+void GeomAlgoAPI_UnifySameDomain::build(const ListOfShape& theShapes)
+{
+  if(theShapes.empty()) {
+    return;
+  }
+
+  // Make compound.
+  GeomShapePtr aCompound = GeomAlgoAPI_CompoundBuilder::compound(theShapes);
+  ListOfShape aCombined, aFree;
+  GeomAlgoAPI_ShapeTools::combineShapes(
+    aCompound,
+    GeomAPI_Shape::SHELL,
+    aCombined,
+    aFree);
+
+  if(aFree.size() > 0 || aCombined.size() > 1) {
+    return;
+  }
+
+  const TopoDS_Shape& aShell = aCombined.front()->impl<TopoDS_Shape>();
+
+  ShapeUpgrade_UnifySameDomain* aUnifyAlgo = new ShapeUpgrade_UnifySameDomain();
+  this->setImpl(aUnifyAlgo);
+
+  aUnifyAlgo->Initialize(aShell);
+  aUnifyAlgo->UnifyFacesAndEdges();
+  aUnifyAlgo->Build();
+
+  TopoDS_Shape aResult = aUnifyAlgo->Shape();
+  if (aResult.IsNull()) {
+    return;
+  }
+
+  if (aResult.ShapeType() == TopAbs_SHELL) {
+    int aNb = 0;
+    TopoDS_Iterator anIt(aResult);
+    for (; anIt.More(); anIt.Next()) {
+      ++aNb;
+    }
+
+    if (aNb == 1) {
+      anIt.Initialize(aResult);
+      aResult = anIt.Value();
+    }
+  }
+
+  std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+  aShape->setImpl(new TopoDS_Shape(aResult));
+  this->setShape(aShape);
+  this->setDone(true);
+}
+
+//==================================================================================================
+void GeomAlgoAPI_UnifySameDomain::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
+                                  ListOfShape& theHistory)
+{
+  if(!theShape.get()) {
+    return;
+  }
+
+  const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
+  const ShapeUpgrade_UnifySameDomain& aUnifyAlgo = this->impl<ShapeUpgrade_UnifySameDomain>();
+
+  TopoDS_Shape aModifiedShape = aUnifyAlgo.Generated(aShape);
+
+  for(TopExp_Explorer anExp(aModifiedShape, aShape.ShapeType()); anExp.More(); anExp.Next()) {
+    GeomShapePtr aGeomShape(new GeomAPI_Shape());
+    aGeomShape->setImpl(new TopoDS_Shape(anExp.Current()));
+    theHistory.push_back(aGeomShape);
+  }
+}
diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.h b/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.h
new file mode 100644 (file)
index 0000000..a183666
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef GeomAlgoAPI_UnifySameDomain_H_
+#define GeomAlgoAPI_UnifySameDomain_H_
+
+#include "GeomAlgoAPI.h"
+#include "GeomAlgoAPI_MakeShape.h"
+
+#include <GeomAPI_Shape.h>
+
+/// \class GeomAlgoAPI_UnifySameDomain
+/// \ingroup DataAlgo
+/// \brief This tool tries to unify faces and edges of the shape which lies on the same geometry.
+class GeomAlgoAPI_UnifySameDomain: public GeomAlgoAPI_MakeShape
+{
+public:
+  /// Constructor.
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_UnifySameDomain(const ListOfShape& theShapes);
+
+  /// \return the list of shapes modified from the shape \a theShape.
+  /// \param[in] theShape base shape.
+  /// \param[out] theHistory modified shapes.
+  GEOMALGOAPI_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape> theShape,
+                                           ListOfShape& theHistory);
+
+private:
+  /// Builds resulting shape.
+  void build(const ListOfShape& theShapes);
+};
+
+#endif
index 9f4b130cc5d5cd43411fa020bea68e8768c9e63f..c422dcf526c085a63aef1a4116c1ec1dddf5384e 100755 (executable)
@@ -1870,3 +1870,15 @@ void Model_Document::eraseAllFeatures()
   if (myObjs)
     myObjs->eraseAllFeatures();
 }
+
+void Model_Document::setExecuteFeatures(const bool theFlag)
+{
+  myExecuteFeatures = theFlag;
+  const std::set<int> aSubs = subDocuments();
+  std::set<int>::iterator aSubIter = aSubs.begin();
+  for (; aSubIter != aSubs.end(); aSubIter++) {
+    if (!subDoc(*aSubIter)->myObjs)
+      continue;
+    subDoc(*aSubIter)->setExecuteFeatures(theFlag);
+  }
+}
index 68f2fcce9d7958d2da46a53e29dc5e47bc217a4a..0f6b32ed6e8093863a453ecf130ee42d200155d7 100644 (file)
@@ -249,7 +249,10 @@ class Model_Document : public ModelAPI_Document
 
   ///! Returns true if parametric updater need to execute feature on recomputartion
   ///! On abort, undo or redo it is not necessary: results in document are updated automatically
-  bool& executeFeatures() {return myExecuteFeatures;}
+  bool executeFeatures() {return myExecuteFeatures;}
+
+  ///! On abort, undo or redo it is not necessary: results in document are updated automatically
+  void setExecuteFeatures(const bool theFlag);
 
   //! Registers the name of the shape for the topological naming needs
   void addNamingName(const TDF_Label theLabel, std::string theName);
index 0cb746e38d448daee9bc40e243fd6363ae115e38..3a933410b1bdb405ffb5fead5fb907c5e5e9e414 100644 (file)
@@ -81,7 +81,7 @@ void Model_Objects::setOwner(DocumentPtr theDoc)
   myDoc = theDoc;
   // update all fields and recreate features and result objects if needed
   TDF_LabelList aNoUpdated;
-  synchronizeFeatures(aNoUpdated, true, true, true, true);
+  synchronizeFeatures(aNoUpdated, true, false, true, true);
   myHistory.clear();
 }
 
@@ -927,8 +927,8 @@ void Model_Objects::synchronizeFeatures(
     myHistory.clear();
   }
 
-  if (theExecuteFeatures)
-    anOwner->executeFeatures() = false;
+  if (!theExecuteFeatures)
+    anOwner->setExecuteFeatures(false);
   aLoop->activateFlushes(isActive);
 
   if (theFlush) {
@@ -941,8 +941,8 @@ void Model_Objects::synchronizeFeatures(
     aLoop->flush(aRedispEvent);
     aLoop->flush(aToHideEvent);
   }
-  if (theExecuteFeatures)
-    anOwner->executeFeatures() = true;
+  if (!theExecuteFeatures)
+    anOwner->setExecuteFeatures(true);
 }
 
 /// synchronises back references for the given object basing on the collected data
index 4274d9c5e037da15b727e7a340718375f23c942b..8e2ac8137228b26224f0245b17bd2d08095d3399 100755 (executable)
@@ -90,6 +90,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
   bool isNotExecuted = theFeature->isPersistentResult() &&
     !std::dynamic_pointer_cast<Model_Document>((theFeature)->document())->executeFeatures();
   if (isNotExecuted) {
+    redisplayWithResults(theFeature, ModelAPI_StateNothing, false); // redisplay even not executed
     if (!theReason.get()) // no reason => no construction reason
       return false;
     if (myNotPersistentRefs.find(theFeature) == myNotPersistentRefs.end()) {
@@ -104,7 +105,10 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
 
   // update arguments for "apply button" state change
   if ((!theFeature->isPreviewNeeded() && !myIsFinish) || myIsPreviewBlocked) {
-    myProcessOnFinish.insert(theFeature);
+    if (theReason.get())
+      myProcessOnFinish[theFeature].insert(theReason);
+    else if (myProcessOnFinish.find(theFeature) == myProcessOnFinish.end())
+      myProcessOnFinish[theFeature] = std::set<std::shared_ptr<ModelAPI_Feature> >();
 #ifdef DEB_UPDATE
       std::cout<<"*** Add process on finish "<<theFeature->name()<<std::endl;
 #endif
@@ -319,10 +323,20 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
     if (theMessage->eventID() == kOpFinishEvent) {
       myIsFinish = true;
       // add features that wait for finish as modified
-      std::set<std::shared_ptr<ModelAPI_Feature> >::iterator aFeature = myProcessOnFinish.begin();
-      for(; aFeature != myProcessOnFinish.end(); aFeature++)
-        if ((*aFeature)->data()->isValid()) // there may be already removed wait for features
-          addModified(*aFeature, FeaturePtr());
+      std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >::
+        iterator aFeature = myProcessOnFinish.begin();
+      for(; aFeature != myProcessOnFinish.end(); aFeature++) {
+        if (aFeature->first->data()->isValid()) {// there may be already removed while wait
+          if (aFeature->second.empty()) {
+            addModified(aFeature->first, FeaturePtr());
+            continue;
+          }
+          std::set<std::shared_ptr<ModelAPI_Feature> >::iterator aReasons;
+          for(aReasons = aFeature->second.begin(); aReasons != aFeature->second.end(); aReasons++) {
+            addModified(aFeature->first, *aReasons);
+          }
+        }
+      }
       myIsFinish = false;
     }
     // processed features must be only on finish, so clear anyway (to avoid reimport on load)
@@ -628,7 +642,8 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
   return true;
 }
 
-void Model_Update::redisplayWithResults(FeaturePtr theFeature, const ModelAPI_ExecState theState)
+void Model_Update::redisplayWithResults(
+  FeaturePtr theFeature, const ModelAPI_ExecState theState, bool theUpdateState)
 {
   // make updated and redisplay all results
   static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
@@ -641,7 +656,8 @@ void Model_Update::redisplayWithResults(FeaturePtr theFeature, const ModelAPI_Ex
     if (!aRes->isDisabled()) {
       // update state only for enabled results
       // (Placement Result Part may make the original Part Result as invalid)
-      aRes->data()->execState(theState);
+      if (theUpdateState)
+        aRes->data()->execState(theState);
     }
     if (theFeature->data()->updateID() > aRes->data()->updateID()) {
       aRes->data()->setUpdateID(theFeature->data()->updateID());
@@ -650,7 +666,8 @@ void Model_Update::redisplayWithResults(FeaturePtr theFeature, const ModelAPI_Ex
   }
   // to redisplay "presentable" feature (for ex. distance constraint)
   ModelAPI_EventCreator::get()->sendUpdated(theFeature, EVENT_DISP);
-  theFeature->data()->execState(theState);
+  if (theUpdateState)
+    theFeature->data()->execState(theState);
 }
 
 /// Updates the state by the referenced object: if something bad with it, set state for this one
index cef7c0b49c4484241fb791aa0b132bee4b7dacbc..9a6ecc711bb27da78d47103aaec41dab8d9a67e9 100644 (file)
@@ -56,8 +56,10 @@ class Model_Update : public Events_Listener
   bool myIsFinish;
   /// try if processing is currently performed
   bool myIsProcessed;
-  /// set that contains features that must be executed only on finish of the operation
-  std::set<std::shared_ptr<ModelAPI_Feature> > myProcessOnFinish;
+  /// map that contains features that must be executed only on finish of the operation
+  /// the value in map is the set of reasons
+  std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >
+    myProcessOnFinish;
   /// to avoid infinitive cycling: feature -> count of the processing periods during this update
   std::map<std::shared_ptr<ModelAPI_Feature>, int > myProcessed;
   /// if preview in hte property panel is blocked and
@@ -89,7 +91,7 @@ protected:
 
   /// Sends the redisplay events for feature and results, updates the updated status
   void redisplayWithResults(std::shared_ptr<ModelAPI_Feature> theFeature,
-    const ModelAPI_ExecState theState);
+    const ModelAPI_ExecState theState, bool theUpdateState = true);
 
   /// On operation start/end/abort the "Just" fileds must be cleared and processed in the right way
   //! \param theFlushRedisplay a boolean value if the redisplay signal should be flushed
index d94163a191e231dab4433599a4676e5ada4a8c41..bd2599e08c9ca09a496b8c57848ff9458289c8a2 100644 (file)
@@ -93,7 +93,7 @@ aSession.setActiveDocument(aPartSet)
 aPlane = aPartSet.addFeature("Plane")
 aPlane.string("creation_method").setValue("by_other_plane")
 aPlane.string("by_other_plane_option").setValue("by_distance_from_other")
-aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_1")
+aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_2")
 aPlane.real("distance").setValue(0.001)
 aPlane.boolean("reverse").setValue(False)
 aSession.finishOperation()
index 8c300a57886effcf4f02b764f1dc0f22db8030dd..431f7300d10ecd8a6a7ced984063650190976512 100644 (file)
@@ -125,6 +125,6 @@ import ModelAPI
 
 assert(ModelAPI.ModelAPI_Session.get().validators().validate(Sketch_4.feature()))
 assert(ModelAPI.ModelAPI_Session.get().validators().validate(ExtrusionCut_2.feature()))
-assert(Sketch_3.feature().selection("External").namingName() == "Extrusion_1_1/Modfied_6")
+assert(Sketch_3.feature().selection("External").namingName() == "_Extrusion_1_1/Modfied_4")
 
 assert(model.checkPythonDump())
index 8515a6f9664c1a564a774ba2860ef9d5be048ed5..0926071b411a39f5574b4cc39a7d44986d6ab46a 100644 (file)
@@ -59,7 +59,7 @@ Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/
 Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Extrusion_4_1")])
 Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1"), model.selection("FACE", "Face_1_1")])
 Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "Extrusion_1_1"))
-Remove_SubShapes_1.setSubShapesToKeep([model.selection("COMPSOLID", "Partition_1_1_1"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4"), model.selection("FACE", "Partition_1_1_5"), model.selection("FACE", "Partition_1_1_6"), model.selection("FACE", "Partition_1_1_7")])
+Remove_SubShapes_1.setSubShapesToKeep([model.selection("COMPSOLID", "Partition_1_1_1")])
 model.end()
 
 
@@ -67,10 +67,5 @@ model.end()
 from ModelAPI import *
 aFactory = ModelAPI_Session.get().validators()
 assert(aFactory.validate(Remove_SubShapes_1.feature()))
-assert(Remove_SubShapes_1.subshapes().size() == 6)
-assert(Remove_SubShapes_1.subshapes().value(0).namingName() == "Partition_1_1_1")
-assert(Remove_SubShapes_1.subshapes().value(1).namingName() == "Partition_1_1_3")
-assert(Remove_SubShapes_1.subshapes().value(2).namingName() == "Partition_1_1_4")
-assert(Remove_SubShapes_1.subshapes().value(3).namingName() == "Partition_1_1_5")
-assert(Remove_SubShapes_1.subshapes().value(4).namingName() == "Partition_1_1_6")
-assert(Remove_SubShapes_1.subshapes().value(5).namingName() == "Partition_1_1_7")
+assert(Remove_SubShapes_1.subshapesToKeep().size() == 1)
+assert(Remove_SubShapes_1.subshapesToKeep().value(0).namingName() == "Partition_1_1_1")
index 168d1cd214a1c45f1e8ded404a39073512a077f7..dd5e5f8694c59b07eb34c221463c36216f277c4d 100644 (file)
@@ -99,7 +99,7 @@ Face_3 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-Sketc
 Face_4 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_11_2"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchLine_10r-SketchArc_2_2f")])
 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOY"))
 SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Edge_4&Face_1_1/Edge_5"))
+SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Edge_6&Face_1_1/Edge_7"))
 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
 SketchLine_12 = Sketch_3.addLine(30, 0, 30, 10)
 SketchLine_13 = Sketch_3.addLine(30, 10, 40, 10)
@@ -121,19 +121,19 @@ model.do()
 Face_5 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_11r-SketchLine_12r-SketchLine_13r-SketchLine_14r")])
 MultiTranslation_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
 Recover_1 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"))
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"))
 Translation_1.result().setName("Translation_1_1")
 MultiTranslation_2 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
 Recover_2 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Face_4_1/Edge_8&Face_4_1/Edge_9"))
+Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_2&Face_4_1/Edge_3"))
 Translation_2.result().setName("Translation_2_1")
 MultiTranslation_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "l", 4)
 Recover_3 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Translation_2_1/Translated_Edge_1_4&Translation_2_1/Translated_Edge_1_1"))
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Translation_2_1/Translated_Edge_1_4&Translation_2_1/Translated_Edge_1_3"))
 Translation_3.result().setName("Translation_3_1")
 MultiTranslation_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "l", 3)
 Recover_4 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Face_4_1/Edge_1&Face_4_1/Edge_2"))
+Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_1&Face_4_1/Edge_9"))
 Translation_4.result().setName("Translation_4_1")
 MultiTranslation_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "l", 2)
 Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "MultiTranslation_4_1_2"), model.selection("FACE", "MultiTranslation_1_1_8"), model.selection("FACE", "MultiTranslation_1_1_4"), model.selection("FACE", "MultiTranslation_1_1_3"), model.selection("FACE", "MultiTranslation_1_1_6"), model.selection("FACE", "MultiTranslation_1_1_2"), model.selection("FACE", "MultiTranslation_1_1_7"), model.selection("FACE", "MultiTranslation_2_1_3"), model.selection("FACE", "MultiTranslation_3_1_4"), model.selection("FACE", "MultiTranslation_2_1_8"), model.selection("FACE", "MultiTranslation_2_1_4"), model.selection("FACE", "MultiTranslation_2_1_7"), model.selection("FACE", "MultiTranslation_4_1_3"), model.selection("FACE", "MultiTranslation_1_1_1"), model.selection("FACE", "MultiTranslation_5_1_2"), model.selection("FACE", "MultiTranslation_4_1_1"), model.selection("FACE", "MultiTranslation_5_1_1"), model.selection("FACE", "MultiTranslation_3_1_3"), model.selection("FACE", "MultiTranslation_3_1_2"), model.selection("FACE", "MultiTranslation_3_1_1"), model.selection("FACE", "MultiTranslation_2_1_6"), model.selection("FACE", "MultiTranslation_2_1_2"), model.selection("FACE", "MultiTranslation_2_1_5"), model.selection("FACE", "MultiTranslation_2_1_1"), model.selection("FACE", "MultiTranslation_1_1_5")])
@@ -151,7 +151,7 @@ Shell_1 = model.addShell(Part_1_doc, [model.selection("FACE", "MultiTranslation_
 Shell_1.result().setName("Shell_1_1")
 Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_4_1"), model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("SHELL", "Shell_1_1")])
 Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "Face_3_1"))
-Remove_SubShapes_1.setSubShapesToKeep([model.selection("FACE", "Partition_1_1_2"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4"), model.selection("FACE", "Partition_1_1_5"), model.selection("FACE", "Partition_1_1_6"), model.selection("FACE", "Partition_1_1_7"), model.selection("FACE", "Partition_1_1_8"), model.selection("FACE", "Partition_1_1_9"), model.selection("FACE", "Partition_1_1_10"), model.selection("FACE", "Partition_1_1_11"), model.selection("FACE", "Partition_1_1_12"), model.selection("FACE", "Partition_1_1_13"), model.selection("FACE", "Partition_1_1_14"), model.selection("FACE", "Partition_1_1_15"), model.selection("FACE", "Partition_1_1_16"), model.selection("FACE", "Partition_1_1_17"), model.selection("FACE", "Partition_1_1_18"), model.selection("FACE", "Partition_1_1_19"), model.selection("FACE", "Partition_1_1_20"), model.selection("FACE", "Partition_1_1_21"), model.selection("FACE", "Partition_1_1_22"), model.selection("FACE", "Partition_1_1_23"), model.selection("FACE", "Partition_1_1_24"), model.selection("FACE", "Partition_1_1_25"), model.selection("FACE", "Partition_1_1_26"), model.selection("FACE", "Partition_1_1_27"), model.selection("FACE", "Partition_1_1_28"), model.selection("FACE", "Partition_1_1_29"), model.selection("FACE", "Partition_1_1_30"), model.selection("FACE", "Partition_1_1_31"), model.selection("FACE", "Partition_1_1_32"), model.selection("FACE", "Partition_1_1_33"), model.selection("FACE", "Partition_1_1_34"), model.selection("FACE", "Partition_1_1_35"), model.selection("FACE", "Partition_1_1_36"), model.selection("FACE", "Partition_1_1_37"), model.selection("FACE", "Partition_1_1_38"), model.selection("FACE", "Partition_1_1_39"), model.selection("FACE", "Partition_1_1_40"), model.selection("FACE", "Partition_1_1_41"), model.selection("FACE", "Partition_1_1_42"), model.selection("FACE", "Partition_1_1_43"), model.selection("FACE", "Partition_1_1_44"), model.selection("FACE", "Partition_1_1_45"), model.selection("FACE", "Partition_1_1_46"), model.selection("FACE", "Partition_1_1_47"), model.selection("FACE", "Partition_1_1_48"), model.selection("FACE", "Partition_1_1_49"), model.selection("FACE", "Partition_1_1_50"), model.selection("FACE", "Partition_1_1_51"), model.selection("FACE", "Partition_1_1_52"), model.selection("FACE", "Partition_1_1_53"), model.selection("FACE", "Partition_1_1_54"), model.selection("FACE", "Partition_1_1_55"), model.selection("FACE", "Partition_1_1_56"), model.selection("FACE", "Partition_1_1_57")])
+Remove_SubShapes_1.setSubShapesToKeep([model.selection("FACE", "Partition_1_1_2"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4"), model.selection("FACE", "Partition_1_1_5"), model.selection("FACE", "Partition_1_1_6"), model.selection("FACE", "Partition_1_1_7"), model.selection("FACE", "Partition_1_1_8"), model.selection("FACE", "Partition_1_1_9")])
 model.end()
 
 # move groups
@@ -161,16 +161,27 @@ Part_1_doc.moveFeature(Group_2.feature(), Group_1.feature())
 Part_1_doc.moveFeature(Group_3.feature(), Group_2.feature())
 model.end()
 
-# check that groups 2 and 3 are correct, but Group_1 elements are removed (because shell is removed)
+# check that group 2 is correct, but Group_1 and Group_3 elements are removed (because shell is removed)
 from ModelAPI import *
 aFactory = ModelAPI_Session.get().validators()
-for Group in [Group_1, Group_2, Group_3]:
-  if Group != Group_1:
-    assert(aFactory.validate(Group.feature()))
-  assert(Group.groupList().size() != 0)
-  for a in range(Group.groupList().size()):
-    if Group == Group_1:
-      assert(len(Group.groupList().value(a).namingName()) == 0)
-    else:
-      assert(Group.groupList().value(a).value().shapeTypeStr() == "FACE")
-      assert(len(Group.groupList().value(a).namingName()) > 0)
+
+assert(Group_1.groupList().size() != 0)
+for a in range(Group_1.groupList().size()):
+  assert(len(Group_1.groupList().value(a).namingName()) == 0)
+
+assert(aFactory.validate(Group_3.feature()))
+assert(Group_3.groupList().size() != 0)
+for a in range(Group_3.groupList().size()):
+  assert(Group_3.groupList().value(a).value().shapeTypeStr() == "FACE")
+  assert(len(Group_3.groupList().value(a).namingName()) > 0)
+
+# for Group in [Group_1, Group_2, Group_3]:
+#   if Group == Group_2:
+#     assert(aFactory.validate(Group.feature()))
+#   assert(Group.groupList().size() != 0)
+#   for a in range(Group.groupList().size()):
+#     if Group != Group_2:
+#       assert(len(Group.groupList().value(a).namingName()) == 0)
+#     else:
+#       assert(Group.groupList().value(a).value().shapeTypeStr() == "FACE")
+#       assert(len(Group.groupList().value(a).namingName()) > 0)
index 2d86f757d51dcf73f7c3f90941f269a797620fdb..b8cd116e425e83ba8d5f85ae79fa1b7996053fea 100644 (file)
@@ -46,7 +46,7 @@ Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/
 Extrusion_1.result().setName("prism")
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), 360, 0)
 Revolution_1.result().setName("spinner")
-Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_Edge_1&spinner/Base_Edge_2"), model.selection("FACE", "prism/Generated_Face_1"), False, True)
+Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_Edge_1&spinner/Base_Edge_1"), model.selection("FACE", "prism/Generated_Face_2"), False, True)
 model.do()
 
 assert(Placement_1.result().name() == Revolution_1.result().name()), "Placement name '{}' != '{}'".format(Placement_1.result().name(), Revolution_1.result().name())
index cf1c1f49a586a5b6a5f451635e0758e54097e5b8..8ada778b1a9b540b519f473c8b50abc0e2ea6942 100644 (file)
@@ -1007,18 +1007,19 @@ ModelHighAPI_Dumper& operator<<(ModelHighAPI_Dumper& theDumper,
     else {
       FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
       theDumper.dumpFeature(aFeature, true);
-      // dump all referred features for the "Copy"
+      // dump the Projection feature which produces this "Copy" entity
       AttributeBooleanPtr aCopyAttr = aFeature->boolean("Copy");
       if (aCopyAttr.get() && aCopyAttr->value())
       {
         const std::set<AttributePtr>& aRefs = aFeature->data()->refsToMe();
         std::set<AttributePtr>::iterator aRefIt = aRefs.begin();
         for (; aRefIt != aRefs.end(); ++aRefIt)
-        {
-          FeaturePtr anOwner = ModelAPI_Feature::feature((*aRefIt)->owner());
-          if (anOwner && !theDumper.isDumped(anOwner))
-            theDumper.dumpFeature(anOwner, true);
-        }
+          if ((*aRefIt)->id() == "ProjectedFeature")
+          { // process projection only
+            FeaturePtr anOwner = ModelAPI_Feature::feature((*aRefIt)->owner());
+            if (anOwner && !theDumper.isDumped(anOwner))
+              theDumper.dumpFeature(anOwner, true);
+          }
       }
     }
   }
index 48070d0ad2c2ea75c2af87d0cd1c717286d4bcca..cb40f7222e31aa572d7f5efde477570c881dae8a 100644 (file)
@@ -32,6 +32,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS})
 SET(PROJECT_HEADERS
   ModuleBase.h
   ModuleBase_ActionInfo.h
+  ModuleBase_ActionType.h
   ModuleBase_Definitions.h
   ModuleBase_DoubleSpinBox.h
   ModuleBase_Events.h
diff --git a/src/ModuleBase/ModuleBase_ActionType.h b/src/ModuleBase/ModuleBase_ActionType.h
new file mode 100644 (file)
index 0000000..864c5e6
--- /dev/null
@@ -0,0 +1,38 @@
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef ModuleBase_ActionType_H_
+#define ModuleBase_ActionType_H_
+
+#include <ModuleBase.h>
+
+/*!
+ * Structure to describe widget processed types of actions.
+ */
+enum MODULEBASE_EXPORT ModuleBase_ActionType
+{
+  ActionEnter,
+  ActionEscape,
+  ActionDelete,
+  ActionUndo,
+  ActionRedo
+};
+
+#endif /* ModuleBase_ActionType_H_ */
index 3fa0b14d0930a8df3d649c640d6a5f51b996feef..ff4f88a9dc1b875f95a3f3ce23a1505da7afa2b2 100644 (file)
@@ -406,6 +406,37 @@ void ModuleBase_ModelWidget::updateObject(ObjectPtr theObject)
   }
 }
 
+bool ModuleBase_ModelWidget::canProcessAction(ModuleBase_ActionType theActionType,
+                                              bool& isActionEnabled)
+{
+  isActionEnabled = false;
+  switch (theActionType) {
+    case ActionEnter: return false;
+    case ActionEscape: return false;
+    case ActionDelete: return true;
+    case ActionUndo:
+    case ActionRedo:
+    default:
+      return false;
+  }
+}
+
+bool ModuleBase_ModelWidget::processAction(ModuleBase_ActionType theActionType)
+{
+  switch (theActionType) {
+    case ActionEnter:
+      return processEnter();
+    case ActionEscape:
+      return processEscape();
+    case ActionDelete:
+      return processDelete();
+    case ActionUndo:
+    case ActionRedo:
+    default:
+      return false;
+  }
+}
+
 bool ModuleBase_ModelWidget::processEnter()
 {
   return false;
index fbd0d6e11ce1d20dd76ad564e75f05244d4382d1..4882e290317761c872cc6d83df7e62b6eccece0b 100644 (file)
@@ -22,6 +22,7 @@
 #define MODULEBASE_MODELWIDGET_H
 
 #include <ModuleBase.h>
+#include <ModuleBase_ActionType.h>
 #include <ModuleBase_OperationFeature.h>
 #include <ModelAPI_Feature.h>
 
@@ -240,14 +241,13 @@ Q_OBJECT
   /// \return Current Editing mode
   bool isEditingMode() const { return myIsEditing; }
 
-  /// Returns true if the event is processed. The default implementation is empty, returns false.
-  virtual bool processEnter();
-
-  /// Returns true if the event is processed. The default implementation is empty, returns false.
-  virtual bool processEscape();
+  /// Returns true if the action can be processed. By default it is empty and returns false.
+  /// \param theActionType an action type
+  /// \param isActionEnabled if true, the enable state of the action
+  virtual bool canProcessAction(ModuleBase_ActionType theActionType, bool& isActionEnabled);
 
   /// Returns true if the event is processed. The default implementation is empty, returns false.
-  virtual bool processDelete();
+  virtual bool processAction(ModuleBase_ActionType theActionType);
 
   /// Sends Update and Redisplay for the given object
   /// \param theObj is updating object
@@ -343,6 +343,15 @@ protected:
   /// The method called when widget is activated
   virtual void activateCustom() {};
 
+    //// Returns true if the event is processed. The default implementation is empty, returns false.
+  virtual bool processEnter();
+
+  //// Returns true if the event is processed. The default implementation is empty, returns false.
+  virtual bool processEscape();
+
+  //// Returns true if the event is processed. The default implementation is empty, returns false.
+  virtual bool processDelete();
+
 protected slots:
   /// Processing of values changed in model widget by store the current value to the feature
   void onWidgetValuesChanged();
index 07a22802d59fbcf19f28c364d2aa46f78df5326d..347f3ca99700be165d63dccdbc6ddda2602ae558 100644 (file)
@@ -59,15 +59,15 @@ Q_OBJECT
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
 
-  /// Returns true if the event is processed.
-  virtual bool processEnter();
-
  public slots:
  // Delayed value chnged: when user starts typing something,
  // it gives him a 0,5 second to finish typing, when sends valueChnaged() signal
 //  void onValueChanged();
 
 protected:
+  /// Returns true if the event is processed.
+  virtual bool processEnter();
+
   /// Saves the internal parameters to the given feature
   /// \return True in success
   virtual bool storeValueCustom();
index 757165744253c45657caa6f25a7e2b52ccdc92ba..4c485d19974c8543045c5be5a6c38d22b5fecb19 100644 (file)
@@ -68,6 +68,7 @@ Q_OBJECT
   /// \param theY the Y coordinate
   void setCursorPosition(const int theX, const int theY);
 
+protected:
   /// Returns true if the event is processed.
   virtual bool processEnter();
 
index 8099dd0262e0a26ea640cab0225b6503ca825de4..310021975840233f1702942a2edbd228b0aeeb44 100644 (file)
@@ -123,14 +123,14 @@ class MODULEBASE_EXPORT ModuleBase_WidgetExprEditor : public ModuleBase_ModelWid
   /// Redefinition of virtual method
   virtual QList<QWidget*> getControls() const;
 
-  /// Returns true if the event is processed.
-  virtual bool processEnter();
-
 protected slots:
   /// A slot for processing text changed event
   void onTextChanged();
 
 protected:
+  /// Returns true if the event is processed.
+  virtual bool processEnter();
+
   /// Do not initialize value on the widget activation
   virtual void initializeValueByActivate();
 
index be59f13b45627748a4164123f81c4f8885498641..e337845e94de3c38ebdb99b38892066cd7b4e59a 100644 (file)
@@ -66,9 +66,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW
   /// exists and has supported format
   bool isCurrentPathValid();
 
-  /// Reject the current editor dialog if it is shown and returns true.
-  virtual bool processEscape();
-
 public slots:
    /// Processing of path selection button press
   void onPathSelectionBtn();
@@ -77,6 +74,9 @@ public slots:
   void onPathChanged();
 
 protected:
+  /// Reject the current editor dialog if it is shown and returns true.
+  virtual bool processEscape();
+
   /// Saves the internal parameters to the given feature
   /// \return True in success
   virtual bool storeValueCustom();
index 4a13ed44254e28b69a56c588e715d916694203f6..0394458c98641ae2b6f823607523651330216679 100644 (file)
@@ -56,10 +56,10 @@ Q_OBJECT
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
 
+protected:
   /// Returns true if the event is processed.
   virtual bool processEnter();
 
-protected:
   /// Saves the internal parameters to the given feature
   /// \return True in success
   virtual bool storeValueCustom();
index ac67b871378f4914be06bdba58a449fe442e35ab..aee98f9f418735dec8293e96aacafc87091852fd 100644 (file)
@@ -52,10 +52,10 @@ class MODULEBASE_EXPORT ModuleBase_WidgetLineEdit : public ModuleBase_ModelWidge
   /// Redefinition of virtual method
   virtual QList<QWidget*> getControls() const;
 
+protected:
   /// Returns true if the event is processed.
   virtual bool processEnter();
 
-protected:
   /// Saves the internal parameters to the given feature
   /// \return True in success
   virtual bool storeValueCustom();
index d144f33821c377a605e3bed8e80daee5059919a8..973b9b6ec5aeaa7d02d27de41f478b5d5fac19bc 100755 (executable)
@@ -58,6 +58,8 @@
 
 const int ATTRIBUTE_SELECTION_INDEX_ROLE = Qt::UserRole + 1;
 
+//#define DEBUG_UNDO_REDO
+
 /**
 * Customization of a List Widget to make it to be placed on full width of container
 */
@@ -99,11 +101,27 @@ protected:
 #endif
 };
 
+#ifdef DEBUG_UNDO_REDO
+void printHistoryInfo(const QString& theMethodName, int theCurrentHistoryIndex,
+  QList<QList<std::shared_ptr<ModuleBase_ViewerPrs> > > theSelectedHistoryValues)
+{
+  QStringList aSizes;
+  for (int i = 0; i < theSelectedHistoryValues.size(); i++)
+    aSizes.append(QString::number(theSelectedHistoryValues[i].size()));
+
+  std::cout << theMethodName.toStdString()
+            << "  current = " << theCurrentHistoryIndex
+            << " size(history) =  " << theSelectedHistoryValues.size()
+            << " (" << aSizes.join(", ").toStdString() << ")"
+            << std::endl;
+}
+#endif
+
 ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParent,
                                                                ModuleBase_IWorkshop* theWorkshop,
                                                                const Config_WidgetAPI* theData)
 : ModuleBase_WidgetSelector(theParent, theWorkshop, theData),
-  myIsSetSelectionBlocked(false)
+  myIsSetSelectionBlocked(false), myCurrentHistoryIndex(-1)
 {
   QGridLayout* aMainLay = new QGridLayout(this);
   ModuleBase_Tools::adjustMargins(aMainLay);
@@ -186,6 +204,8 @@ void ModuleBase_WidgetMultiSelector::activateCustom()
 
   myWorkshop->module()->activateCustomPrs(myFeature,
                             ModuleBase_IModule::CustomizeHighlightedObjects, true);
+  clearSelectedHistory();
+  myWorkshop->updateCommandStatus();
 }
 
 //********************************************************************
@@ -194,6 +214,8 @@ void ModuleBase_WidgetMultiSelector::deactivate()
   ModuleBase_WidgetSelector::deactivate();
 
   myWorkshop->module()->deactivateCustomPrs(ModuleBase_IModule::CustomizeHighlightedObjects, true);
+  clearSelectedHistory();
+  myWorkshop->updateCommandStatus();
 }
 
 //********************************************************************
@@ -309,6 +331,63 @@ void ModuleBase_WidgetMultiSelector::getHighlighted(QList<ModuleBase_ViewerPrsPt
     convertIndicesToViewerSelection(anAttributeIds, theValues);
 }
 
+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::canProcessAction(ModuleBase_ActionType theActionType,
+                                                      bool& isActionEnabled)
+{
+  isActionEnabled = false;
+  bool aCanProcess = false;
+  switch (theActionType) {
+    case ActionUndo:
+    case ActionRedo: {
+      aCanProcess = true;
+      isActionEnabled = theActionType == ActionUndo ? myCurrentHistoryIndex > 0
+          : (mySelectedHistoryValues.size() > 0 &&
+             myCurrentHistoryIndex < mySelectedHistoryValues.size() - 1);
+    }
+    break;
+    default:
+    break;
+  }
+  return aCanProcess;
+}
+
+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::processAction(ModuleBase_ActionType theActionType)
+{
+  switch (theActionType) {
+    case ActionUndo:
+    case ActionRedo: {
+      if (theActionType == ActionUndo)
+        myCurrentHistoryIndex--;
+      else
+        myCurrentHistoryIndex++;
+      QList<ModuleBase_ViewerPrsPtr> aSelected = mySelectedHistoryValues[myCurrentHistoryIndex];
+      // equal vertices should not be used here
+      ModuleBase_ISelection::filterSelectionOnEqualPoints(aSelected);
+      bool isDone = setSelection(aSelected,
+                                 false /*need not validate because values already was in list*/);
+      updateOnSelectionChanged(isDone);
+
+      myWorkshop->updateCommandStatus();
+#ifdef DEBUG_UNDO_REDO
+      printHistoryInfo(QString("processAction %1").arg(theActionType == ActionUndo ? "Undo"
+        : "Redo"), myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
+      return true;
+    }
+    default:
+      return ModuleBase_ModelWidget::processAction(theActionType);
+  }
+}
+
+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::activateSelectionAndFilters(bool toActivate)
+{
+  myWorkshop->updateCommandStatus(); // update enable state of Undo/Redo application actions
+  return ModuleBase_WidgetSelector::activateSelectionAndFilters(toActivate);
+}
+
 //********************************************************************
 bool ModuleBase_WidgetMultiSelector::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs)
 {
@@ -340,6 +419,8 @@ bool ModuleBase_WidgetMultiSelector::isValidSelectionCustom(const ModuleBase_Vie
 //********************************************************************
 bool ModuleBase_WidgetMultiSelector::processDelete()
 {
+  appendFirstSelectionInHistory();
+
   // find attribute indices to delete
   std::set<int> anAttributeIds;
   getSelectedAttributeIndices(anAttributeIds);
@@ -392,6 +473,7 @@ bool ModuleBase_WidgetMultiSelector::processDelete()
       }
     }
   }
+  appendSelectionInHistory();
   return aDone;
 }
 
@@ -443,6 +525,8 @@ void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()
   // may be the feature's result is not displayed, but attributes should be
   myWorkshop->module()->customizeObject(myFeature, ModuleBase_IModule::CustomizeArguments,
                             true); /// hope that something is redisplayed by object updated
+  // clear history should follow after set selected to do not increase history by setSelected
+  clearSelectedHistory();
 }
 
 //********************************************************************
@@ -462,7 +546,47 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged()
       }
     }
   }
+  appendFirstSelectionInHistory();
   ModuleBase_WidgetSelector::onSelectionChanged();
+  appendSelectionInHistory();
+}
+
+void ModuleBase_WidgetMultiSelector::appendFirstSelectionInHistory()
+{
+  if (mySelectedHistoryValues.empty()) {
+    myCurrentHistoryIndex++;
+    mySelectedHistoryValues.append(getAttributeSelection());
+
+#ifdef DEBUG_UNDO_REDO
+    printHistoryInfo("appendSelectionInHistory", myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
+  }
+}
+
+void ModuleBase_WidgetMultiSelector::appendSelectionInHistory()
+{
+  while (myCurrentHistoryIndex != mySelectedHistoryValues.count() - 1)
+    mySelectedHistoryValues.removeLast();
+
+  QList<ModuleBase_ViewerPrsPtr> aSelected = getFilteredSelected();
+  myCurrentHistoryIndex++;
+  mySelectedHistoryValues.append(aSelected);
+  myWorkshop->updateCommandStatus();
+
+#ifdef DEBUG_UNDO_REDO
+  printHistoryInfo("appendSelectionInHistory", myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
+}
+
+void ModuleBase_WidgetMultiSelector::clearSelectedHistory()
+{
+  mySelectedHistoryValues.clear();
+  myCurrentHistoryIndex = -1;
+  myWorkshop->updateCommandStatus();
+
+#ifdef DEBUG_UNDO_REDO
+  printHistoryInfo("clearSelectedHistory", myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
 }
 
 void ModuleBase_WidgetMultiSelector::updateFocus()
index 2e43e575d1f93c0f9382e81a342c513cfb0325c4..74b0ff510ea36567495b8204b91dbfb30d0653ae 100755 (executable)
@@ -88,14 +88,23 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge
   /// \param theValues a list of presentations
   virtual void getHighlighted(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
 
+  /// Returns true if the action can be processed. By default it is empty and returns false.
+  /// \param theActionType an action type
+  /// \param isActionEnabled if true, the enable state of the action
+  virtual bool canProcessAction(ModuleBase_ActionType theActionType, bool& isActionEnabled);
+
+  /// Returns true if the event is processed. The default implementation is empty, returns false.
+  virtual bool processAction(ModuleBase_ActionType theActionType);
+
+  /// Activate or deactivate selection and selection filters
+  /// \return true if the selection filter of the widget is activated in viewer context
+  virtual bool activateSelectionAndFilters(bool toActivate);
+
   /// Checks the widget validity. By default, it returns true.
   /// \param thePrs a selected presentation in the view
   /// \return a boolean value
   virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
 
-  /// Returns true if the event is processed. The default implementation is empty, returns false.
-  virtual bool processDelete();
-
 public slots:
   /// Slot is called on selection type changed
   void onSelectionTypeChanged();
@@ -115,6 +124,9 @@ protected slots:
   void onListSelection();
 
 protected:
+  /// Returns true if the event is processed. The default implementation is empty, returns false.
+  virtual bool processDelete();
+
   /// The methiod called when widget is activated
   virtual void activateCustom();
 
@@ -122,8 +134,19 @@ protected:
   /// \return True in success
   virtual bool storeValueCustom();
 
+  /// restire type of selection by feature attribute
   virtual bool restoreValueCustom();
 
+  /// Creates an element of the attribute current selection if history is empty
+  virtual void appendFirstSelectionInHistory();
+
+  /// Create an element in the history that stores the current selection,
+  /// position in the history is incremented
+  void appendSelectionInHistory();
+
+  /// Clear list of stored selected items, reset current position into '-1'
+  void clearSelectedHistory();
+
   /// Set the focus on the last item in  the list
   virtual void updateFocus();
 
@@ -215,6 +238,11 @@ protected:
 
   /// A flag to block set selection perform if the method is in process
   bool myIsSetSelectionBlocked;
+
+  /// A container of selected objects
+  QList<QList<std::shared_ptr<ModuleBase_ViewerPrs> > > mySelectedHistoryValues;
+  /// Position in a container of selected values
+  int myCurrentHistoryIndex;
 };
 
 #endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */
index a33d6c39168c31af1885e267f36d7d9930e9ef39..793940ccab1e13b733d4cef8ba3c6ab6a40a1d2d 100755 (executable)
@@ -77,7 +77,7 @@ ObjectPtr PartSet_ExternalObjectsMgr::externalObject(const ObjectPtr& theSelecte
     FeaturePtr aCreatedFeature;
     aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape,
       theSelectedObject, theSketch, theTemporary, aCreatedFeature);
-    if (aSelectedObject.get() && theTemporary)
+    if (aCreatedFeature.get() && theTemporary)
         myExternalObjectValidated = aCreatedFeature;
   }
   return aSelectedObject;
index 3ec2c8552780c7a37e387bf9fbb4d5cfb9acb311..f6131c3fe37b61a13c8aa19504a8b202efcfa33f 100755 (executable)
@@ -1004,8 +1004,6 @@ void PartSet_Module::onViewTransformed(int theTrsfType)
     SketcherPrs_Tools::setArrowSize(aLen);
     const double aCurScale = aViewer->activeView()->Camera()->Scale();
     aViewer->SetScale(aViewer->activeView(), aCurScale);
-    double aTextHeight = SketcherPrs_Tools::getConfigTextHeight();
-    SketcherPrs_Tools::setTextHeight (aTextHeight);
     bool isModified = false;
     QList<AISObjectPtr> aPrsList = aDisplayer->displayedPresentations();
     foreach (AISObjectPtr aAIS, aPrsList) {
@@ -1014,7 +1012,6 @@ void PartSet_Module::onViewTransformed(int theTrsfType)
       Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAisObj);
       if (!aDim.IsNull()) {
         aDim->DimensionAspect()->ArrowAspect()->SetLength(aLen);
-        aDim->DimensionAspect()->TextAspect()->SetHeight(aTextHeight);
         aContext->Redisplay(aDim, false);
         isModified = true;
       }
index 32428becf16d9d52d25c50425887f0a3138eecce..800ce0e05fbec009dcfc5543ffc70186ca71dc30 100644 (file)
@@ -132,7 +132,7 @@ def bottom_body():
 
 def body_3():
     # Create XOZ sketch
-    sketch = model.addSketch(part, "Boolean_1_1/Modified_2")
+    sketch = model.addSketch(part, "Boolean_1_1/Modified_3")
 
     # Create base polygon
     H, L, l, r = 28, 40, 8, 12
@@ -170,7 +170,7 @@ def body_3():
     sketch.setRadius(arc, r)
 
     # Binding
-    bottom_e = sketch.addLine("Boolean_1_1/Modified_7&Boolean_1_1/Modified_5")
+    bottom_e = sketch.addLine("Boolean_1_1/Modified_8&Boolean_1_1/Modified_5")
     sketch.setCoincident(bottom_e, bottom.startPoint())
     sketch.setCoincident(bottom_e.startPoint(), bottom.endPoint())
 
@@ -196,7 +196,7 @@ def body_4():
     sketch.setCoincident(bottom_e.endPoint(), bottom.startPoint())
     sketch.setCoincident(bottom_e.startPoint(), left.startPoint())
 
-    left_e = sketch.addLine("Boolean_2_1/Modified_6&Boolean_2_1/Modified_8")
+    left_e = sketch.addLine("Boolean_2_1/Modified_6&Boolean_2_1/Modified_7")
     sketch.setCoincident(left_e.startPoint(), left.endPoint())
 
     model.do()  #!!!
index 428c1be61cfbd88b60827eb40411921325513105..ffc05033b93a12be9e36491e7cdb915bc2bb5ba2 100644 (file)
@@ -1,5 +1,5 @@
 """Package for GDML plugin for the Parametric Geometry API of the Modeler.
 """
 
-from GDMLAPI import addConeSegment
+from GDMLAPI import addConeSegment, addEllipsoid
 
index 49fdcdd1306ebc165b4a42158f609de2001c8357..0b49118b289a8eef36e4d72ecc3c90c74508489f 100644 (file)
@@ -266,3 +266,13 @@ def assertSketchArc(theArcFeature):
   aDistCE = sketcher.tools.distancePointPoint(aCenterPnt, aEndPnt)
   assert math.fabs(aDistCS - aDistCE) < TOLERANCE, "Wrong arc: center-start distance {}, center-end distance {}".format(aDistCS, aDistCE)
   assert math.fabs(aRadius.value() -aDistCS) < TOLERANCE, "Wrong arc: radius is {0}, expected {1}".format(aRadius.value(), aDistCS)
+
+def checkBooleansResult(theFeature,theModel,NbRes,NbSubRes,NbSolid,NbFace,NbEdge,NbVertex):
+  """ Tests numbers of sub-shapes in results (used in Boolean operations tests)
+  """
+  theModel.testNbResults(theFeature, NbRes)
+  theModel.testNbSubResults(theFeature,NbSubRes)
+  theModel.testNbSubShapes(theFeature, GeomAPI_Shape.SOLID, NbSolid )
+  theModel.testNbSubShapes(theFeature, GeomAPI_Shape.FACE, NbFace)
+  theModel.testNbSubShapes(theFeature, GeomAPI_Shape.EDGE, NbEdge)
+  theModel.testNbSubShapes(theFeature, GeomAPI_Shape.VERTEX, NbVertex)
index 3d783a40850a9c902b5b2db01cfe41b1d25dfc27..1981738505a0213ab9350ba4701f6598f3f229ee 100644 (file)
@@ -162,7 +162,8 @@ void SketchPlugin_Projection::computeProjection(const std::string& theID)
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(lastResult());
   if (aResult && aResult->shape() && theID == EXTERNAL_FEATURE_ID()) {
     aResult->setShape(std::shared_ptr<GeomAPI_Edge>());
-    aProjection->selection(EXTERNAL_ID())->setValue(lastResult(), lastResult()->shape());
+    if (aProjection)
+      aProjection->selection(EXTERNAL_ID())->setValue(lastResult(), lastResult()->shape());
   }
 
   if (aVertex) {
index 6ec5968e51fb9224ed09312732217cb2f2526780..adfd8ebcc316eeaec98e351e605599b44e3e00ae 100644 (file)
@@ -95,19 +95,19 @@ aProjectedList = [("EDGE", "Sketch_1/Edge-SketchCircle_1_2"),
                   ("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"),
                   #
                   ("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/From_Face_1"),
-                  ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1"),
+                  ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_1"),
                   ("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/From_Face_1"),
-                  ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"),
+                  ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"),
                   #
-                  ("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"),
-                  ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2"),
-                  ("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"),
+                  ("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_3"),
+                  ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"),
                   ("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_1"),
+                  ("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"),
                   #
                   ("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"),
-                  ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"),
+                  ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"),
                   ("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1"),
-                  ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_1")
+                  ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1")
                   ]
 
 # Test projection to the same plane
@@ -129,12 +129,12 @@ Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To
 testProjections(Part_1_doc, Sketch_6, aProjectedList, aFailedIDs)
 
 # Test projection to orthogonal side face of the prism
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
 aFailedIDs = set([0, 1, 18, 20, 26, 28])
 testProjections(Part_1_doc, Sketch_7, aProjectedList, aFailedIDs)
 
 # Test projection to slope side face of the prism
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"))
 aFailedIDs = set([0, 1])
 testProjections(Part_1_doc, Sketch_8, aProjectedList, aFailedIDs)
 
diff --git a/src/SketchPlugin/Test/TestProjectionUpdate.py b/src/SketchPlugin/Test/TestProjectionUpdate.py
new file mode 100644 (file)
index 0000000..e3312d0
--- /dev/null
@@ -0,0 +1,42 @@
+## Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+##
+
+"""
+    Check that there is no crash while changing the projecting feature
+"""
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(20, -50, 70, 50)
+model.do()
+
+Sketch_2 = model.addSketch(partSet, model.defaultPlane("YOZ"))
+SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s"), True)
+model.do()
+
+# change the feature projected (no crash expected)
+SketchProjection_1.setExternalFeature(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"))
+model.do()
+
+model.end()
index d1735600bd935f063824ce95a6954cb9cce69d59..c8f79b464d7f1b696f4b4a56cf0b1e8fc69688cc 100644 (file)
@@ -281,7 +281,7 @@ void SketcherPrs_Angle::ComputeSelection(const Handle(SelectMgr_Selection)& aSel
     return;
   }
   }
-  SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+  SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
   AIS_AngleDimension::ComputeSelection(aSelection, aMode);
 }
 
index 5f9b54cff59faad8698f26c9d2715c414c016ef8..12e9e1270ee0a6352d324ac84066a855f4c4a695 100644 (file)
@@ -311,6 +311,6 @@ void SketcherPrs_LengthDimension::ComputeSelection(const Handle(SelectMgr_Select
     return;
   }
   }
-  SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+  SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
   AIS_LengthDimension::ComputeSelection(aSelection, aMode);
 }
index 3381d5d63a81921dcb339e33a31362801fcd7b7f..8fa795e90b4e94c4d29122700ac908c701c1476a 100644 (file)
@@ -202,6 +202,6 @@ void SketcherPrs_Radius::ComputeSelection(const Handle(SelectMgr_Selection)& aSe
     return;
   }
   }
-  SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+  SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
   AIS_RadiusDimension::ComputeSelection(aSelection, aMode);
 }
index 49d973ddd0cabdd8a733008a4961a012cccb15e7..d428a2c501986816457ec569efff57f10207b880 100644 (file)
@@ -1119,6 +1119,8 @@ XGUI_DataModel::VisibilityState
 
   ObjectPtr aObj = object(theIndex);
   if (aObj.get()) {
+    if (aObj->groupName() == ModelAPI_ResultParameter::group())
+      return NoneState;
     ResultPtr aResObj = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
     if (aResObj.get()) {
       XGUI_Displayer* aDisplayer = myWorkshop->displayer();
index cfdf139121f21e2ab9ed886f06c8b7790819d12a..50f690425b92de3e73a40b4e3ce721691c1bb6cb 100644 (file)
@@ -202,6 +202,18 @@ ModuleBase_Operation* XGUI_OperationMgr::previousOperation(ModuleBase_Operation*
   return myOperations.at(idx - 1);
 }
 
+ModuleBase_ModelWidget* XGUI_OperationMgr::activeWidget() const
+{
+  ModuleBase_ModelWidget* anActiveWidget = 0;
+  ModuleBase_Operation* anOperation = currentOperation();
+  if (anOperation) {
+    ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
+    if (aPanel)
+      anActiveWidget = aPanel->activeWidget();
+  }
+  return anActiveWidget;
+}
+
 bool XGUI_OperationMgr::startOperation(ModuleBase_Operation* theOperation)
 {
   if (hasOperation())
@@ -697,7 +709,7 @@ bool XGUI_OperationMgr::onKeyPressed(QObject *theObject, QKeyEvent* theEvent)
         ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
         ModuleBase_ModelWidget* anActiveWgt = aPanel->activeWidget();
         if (anActiveWgt)
-          isAccepted = anActiveWgt && anActiveWgt->processEscape();
+          isAccepted = anActiveWgt && anActiveWgt->processAction(ActionEscape);
       }
       // default Escape button functionality
       if (!isAccepted && aOperation) {
@@ -737,7 +749,7 @@ bool XGUI_OperationMgr::onProcessEnter(QObject* theObject)
     }
   }
   if (!isAborted) {
-    isAccepted = anActiveWgt && anActiveWgt->processEnter();
+    isAccepted = anActiveWgt && anActiveWgt->processAction(ActionEnter);
     if (!isAccepted) {
       isAccepted =
         myWorkshop->module()->processEnter(anActiveWgt ? anActiveWgt->attributeID() : "");
@@ -784,7 +796,7 @@ bool XGUI_OperationMgr::onProcessDelete(QObject* theObject)
       if (isPPChildObject) {
         anActiveWgt = aPanel->activeWidget();
         if (anActiveWgt) {
-          isAccepted = anActiveWgt->processDelete();
+          isAccepted = anActiveWgt->processAction(ActionDelete);
         }
       }
     }
index 2c5eb00757834767951a87d088953bf8d9d00217..a2e2f0ed0d3176d4a8632d3acfa4c54e9e901e16 100755 (executable)
@@ -113,6 +113,10 @@ public:
   /// else, or if there is no parent - returns NULL
   ModuleBase_Operation* previousOperation(ModuleBase_Operation* theOperation) const;
 
+  /// Returns an active widget of the current operation.
+  /// \return widget or NULL
+  ModuleBase_ModelWidget* activeWidget() const;
+
   /// Start the operation and append it to the stack of operations
   /// \param theOperation the started operation
   /// \return the state whether the current operation is started
index ab4b9b109dfed0dcc9d5bf806e06c0ceb2ffa002..5112ff24ccbbfe703fcaa1763a46c9c50d8d787f 100755 (executable)
@@ -55,6 +55,8 @@
 #include <AppElements_Workbench.h>
 #endif
 
+#include <Config_XMLReader.h>
+
 #include <ModelAPI_AttributeDocRef.h>
 #include <ModelAPI_AttributeIntArray.h>
 #include <ModelAPI_AttributeDouble.h>
@@ -295,8 +297,7 @@ void XGUI_Workshop::startApplication()
   Config_PropManager::registerProp("Plugins", "default_path", "Default Path",
                                    Config_Prop::Directory, "");
 
-  std::string aDir = getenv(QString("%1Resources").arg(
-    ModuleBase_Preferences::resourceMgr()->appName()).toLatin1());
+  std::string aDir = Config_XMLReader::resourcesConfigFile();
   Config_PropManager::registerProp("Plugins", "import_initial_path", "Import initial directory",
                                    Config_Prop::Directory, aDir);
 
@@ -327,7 +328,7 @@ void XGUI_Workshop::startApplication()
 #ifdef _DEBUG
   bool aNewPart = Config_PropManager::boolean("Plugins", "create_part_by_start");
   if (aNewPart) {
-      module()->launchOperation("Part", false);
+      module()->launchOperation("Part", false); // PartSetPlugin_Part::ID()
   }
 #endif
 }
@@ -870,6 +871,22 @@ void XGUI_Workshop::openDirectory(const QString& theDirectory)
 #ifndef HAVE_SALOME
   myMainWindow->setCurrentDir(myCurrentDir, true);
 #endif
+
+#ifdef _DEBUG
+  bool aNewPart = Config_PropManager::boolean("Plugins", "create_part_by_start");
+  if (aNewPart) {
+
+    DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
+    int aSize = aRootDoc->size(ModelAPI_ResultPart::group());
+    if (aSize > 0 ) {
+      ObjectPtr aObject = aRootDoc->object(ModelAPI_ResultPart::group(), 0);
+      ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
+      if (aPart.get())
+        aPart->activate();
+    }
+  }
+#endif
+
   QApplication::restoreOverrideCursor();
 }
 
@@ -1001,6 +1018,10 @@ bool XGUI_Workshop::onSaveAs()
 //******************************************************
 void XGUI_Workshop::onUndo(int theTimes)
 {
+  ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+  if (anActiveWidget && anActiveWidget->processAction(ActionUndo))
+    return;
+
   objectBrowser()->treeView()->setCurrentIndex(QModelIndex());
   SessionPtr aMgr = ModelAPI_Session::get();
   std::list<std::string> aUndoList = aMgr->undoList();
@@ -1024,6 +1045,10 @@ void XGUI_Workshop::onUndo(int theTimes)
 //******************************************************
 void XGUI_Workshop::onRedo(int theTimes)
 {
+  ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+  if (anActiveWidget && anActiveWidget->processAction(ActionRedo))
+    return;
+
   // the viewer update should be blocked in order to avoid the features blinking. For the created
   // feature a results are created, the flush of the created signal caused the viewer redisplay for
   // each created result. After a redisplay signal is flushed. So, the viewer update is blocked
@@ -1073,13 +1098,13 @@ void XGUI_Workshop::onRedo(int theTimes)
 //******************************************************
 void XGUI_Workshop::onWidgetStateChanged(int thePreviousState)
 {
-  ModuleBase_ModelWidget* anActiveWidget = 0;
-  ModuleBase_Operation* anOperation = myOperationMgr->currentOperation();
-  if (anOperation) {
-    ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
-    if (aPanel)
-      anActiveWidget = aPanel->activeWidget();
-  }
+  ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+  //ModuleBase_Operation* anOperation = myOperationMgr->currentOperation();
+  //if (anOperation) {
+  //  ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
+  //  if (aPanel)
+  //    anActiveWidget = aPanel->activeWidget();
+  //}
   if (anActiveWidget)
     operationMgr()->onValidateOperation();
 
@@ -1208,10 +1233,24 @@ void XGUI_Workshop::updateCommandStatus()
   if (aMgr->hasModuleDocument()) {
     foreach(QAction* aCmd, aCommands) {
       QString aId = aCmd->data().toString();
-      if (aId == "UNDO_CMD")
-        aCmd->setEnabled(myModule->canUndo());
-      else if (aId == "REDO_CMD")
-        aCmd->setEnabled(myModule->canRedo());
+      if (aId == "UNDO_CMD") {
+        bool isActionEnabled = false;
+        // if ultimate is true -> using result of operation only, or using OR combination
+        ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+        if (anActiveWidget && anActiveWidget->canProcessAction(ActionUndo, isActionEnabled))
+          aCmd->setEnabled(isActionEnabled);
+        else
+          aCmd->setEnabled(myModule->canUndo());
+      }
+      else if (aId == "REDO_CMD") {
+        bool isActionEnabled = false;
+        // if ultimate is true -> using result of operation only, or using OR combination
+        ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+        if (anActiveWidget && anActiveWidget->canProcessAction(ActionRedo, isActionEnabled))
+          aCmd->setEnabled(isActionEnabled);
+        else
+          aCmd->setEnabled(myModule->canRedo());
+      }
       else
         // Enable all commands
         aCmd->setEnabled(true);
@@ -2201,6 +2240,15 @@ void XGUI_Workshop::showObjects(const QObjectPtrList& theList, bool isVisible)
     aObj->setDisplayed(isVisible);
   }
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+#ifndef WIN32
+  // Necessary for update icons in ObjectBrowser on Linux
+  QModelIndexList aIndexes = mySelector->selection()->selectedIndexes();
+  foreach (QModelIndex aIdx, aIndexes) {
+    if (aIdx.column() == 0) {
+      myObjectBrowser->treeView()->update(aIdx);
+    }
+  }
+#endif
 }
 
 //**************************************************************
@@ -2226,6 +2274,15 @@ void XGUI_Workshop::showOnlyObjects(const QObjectPtrList& theList)
     aObj->setDisplayed(true);
   }
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+#ifndef WIN32
+  // Necessary for update icons in ObjectBrowser on Linux
+  QModelIndexList aIndexes = mySelector->selection()->selectedIndexes();
+  foreach (QModelIndex aIdx, aIndexes) {
+    if (aIdx.column() == 0) {
+      myObjectBrowser->treeView()->update(aIdx);
+    }
+  }
+#endif
 }
 
 
index 95e76725ba00f75c8cf3e224bda0ee3e1e059a11..772056c0a4731b86c15ddd631a455f69598adbed 100644 (file)
@@ -82,7 +82,7 @@ Box_12 = model.addBox(Part_1_doc, Point_1, Point_5)
 Box_13 = model.addBox(Part_1_doc, Vertex_3, Point_2)
 Box_14 = model.addBox(Part_1_doc, Point_2, Vertex_3)
 Box_15 = model.addBox(Part_1_doc, model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s-SketchLine_4e"), model.selection("VERTEX", "Sketch_2/Vertex-SketchLine_7s-SketchLine_6e"))
-Box_16 = model.addBox(Part_1_doc, model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_2&Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_1"))
+Box_16 = model.addBox(Part_1_doc, model.selection("VERTEX", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/Generated_Face_2&Extrusion_2_1/To_Face_1"))
 Box_17 = model.addBox(Part_1_doc, model.selection("VERTEX", "Vertex_1_1"), model.selection("VERTEX", "Vertex_2_1"))
 Box_18 = model.addBox(Part_1_doc, "dx", "dy", "dz")
 model.do()
index cc859057daa165dce839162f71b195789ec73864..7029f13964babaeabd6584891ea42243dfeaba2a 100644 (file)
@@ -95,7 +95,7 @@ SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_15")
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f-SketchLine_9f-SketchLine_10f-SketchArc_1_2r-SketchArc_2_2r")], model.selection(), "b/2", "b/2")
 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
-SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_1"))
+SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"))
 SketchCircle_1 = Sketch_2.addCircle(-15, 35.00000000000001, 25)
 SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchPoint_2.result(), SketchCircle_1.center())
 SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_16")
@@ -104,14 +104,14 @@ model.do()
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_1_2f")], model.selection(), 0, 13, [model.selection("SOLID", "Extrusion_1_1")])
 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"))
-SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
-SketchLine_11 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
+SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
+SketchLine_11 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
 SketchArc_3 = Sketch_3.addArc(-15, 35.00000000000001, -15, 46.0103340429751, -17.02045759563166, 24.17663606626138, True)
 SketchConstraintCoincidence_16 = Sketch_3.setCoincident(SketchPoint_3.result(), SketchArc_3.center())
 SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_17")
 SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_11.result(), SketchArc_3.startPoint())
 SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_18")
-SketchArc_4 = Sketch_3.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
+SketchArc_4 = Sketch_3.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
 SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchArc_3.endPoint(), SketchArc_4.results()[1])
 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_19")
 SketchLine_12 = Sketch_3.addLine(-15, 46.0103340429751, -15, 35.00000000000001)
@@ -130,7 +130,7 @@ model.do()
 ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchArc_3_2f-SketchLine_12f-SketchArc_5_2r")], model.selection(), 5, 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
 ExtrusionFuse_1.result().setName("ExtrusionFuse_1_1")
 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/To_Face_1"))
-SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionFuse_1_1/Modfied_5&ExtrusionFuse_1_1/Modfied_4&ExtrusionFuse_1_1/To_Face_1"))
+SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionFuse_1_1/Modfied_4&ExtrusionFuse_1_1/Modfied_5&ExtrusionFuse_1_1/To_Face_1"))
 SketchCircle_2 = Sketch_4.addCircle(-15, 35.00000000000001, 5)
 SketchConstraintCoincidence_24 = Sketch_4.setCoincident(SketchPoint_4.result(), SketchCircle_2.center())
 SketchConstraintCoincidence_24.setName("SketchConstraintCoincidence_25")
@@ -169,13 +169,13 @@ model.do()
 ExtrusionFuse_3 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchArc_7_2f-SketchArc_8_2r-SketchLine_13r-SketchArc_9_2r")], model.selection(), 0, 8, [model.selection("SOLID", "ExtrusionFuse_2_1")])
 ExtrusionFuse_3.result().setName("ExtrusionFuse_3_1")
 Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_3_1/Modfied_3"))
-SketchLine_14 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_5"))
+SketchLine_14 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7"))
 SketchArc_10 = Sketch_6.addArc(55, 35, 55, 15, 35, 35, True)
 SketchConstraintCoincidence_34 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.center())
 SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_35")
 SketchConstraintCoincidence_35 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.startPoint())
 SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_36")
-SketchLine_15 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_4"))
+SketchLine_15 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_8"))
 SketchConstraintDistance_8 = Sketch_6.setDistance(SketchArc_10.center(), SketchLine_15.result(), 35)
 SketchLine_16 = Sketch_6.addLine(35, 35, 35, 48)
 SketchConstraintCoincidence_36 = Sketch_6.setCoincident(SketchArc_10.endPoint(), SketchLine_16.startPoint())
@@ -201,7 +201,7 @@ ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Ske
 ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
 Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_2_1/Modfied_4"))
 SketchCircle_4 = Sketch_7.addCircle(45, 35, 5)
-SketchLine_20 = Sketch_7.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_1&ExtrusionCut_2_1/Modfied_4"))
+SketchLine_20 = Sketch_7.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_4"))
 SketchConstraintDistance_9 = Sketch_7.setDistance(SketchCircle_4.center(), SketchLine_20.result(), 10)
 SketchConstraintRadius_6 = Sketch_7.setRadius(SketchCircle_4.results()[1], "10/2")
 SketchLine_21 = Sketch_7.addLine(35, 35, 45, 35)
@@ -215,7 +215,7 @@ SketchConstraintHorizontal_4 = Sketch_7.setHorizontal(SketchLine_21.result())
 model.do()
 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_7/Face-SketchCircle_4_2f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/From_Face_1"), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
 ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
 SketchLine_22 = Sketch_8.addLine(55, 25, 5.000000000000002, 25)
 SketchLine_23 = Sketch_8.addLine(5.000000000000002, 25, 5.000000000000002, 13)
 SketchLine_24 = Sketch_8.addLine(5.000000000000002, 13, 55, 13)
@@ -234,15 +234,15 @@ SketchConstraintHorizontal_6 = Sketch_8.setHorizontal(SketchLine_24.result())
 SketchConstraintVertical_8 = Sketch_8.setVertical(SketchLine_25.result())
 SketchConstraintLength_2 = Sketch_8.setLength(SketchLine_22.result(), 50)
 SketchConstraintLength_3 = Sketch_8.setLength(SketchLine_25.result(), 12)
-SketchProjection_1 = Sketch_8.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_1&ExtrusionCut_2_1/Modfied_2"))
+SketchProjection_1 = Sketch_8.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_1"))
 SketchLine_26 = SketchProjection_1.createdFeature()
 SketchConstraintCoincidence_48 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_26.result())
 SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_49")
-SketchLine_27 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Extrusion_1_1/Generated_Face_8"))
+SketchLine_27 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Extrusion_1_1/Generated_Face_4"))
 SketchConstraintCoincidence_49 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_27.result())
 SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_50")
 model.do()
-ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), 0, [model.selection("SOLID", "ExtrusionCut_3_1")])
+ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"), 0, [model.selection("SOLID", "ExtrusionCut_3_1")])
 ExtrusionCut_4.result().setName("ExtrusionCut_4_1")
 Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/Modfied_2"))
 SketchLine_28 = Sketch_9.addLine(25, -45, 18.44853578320836, -63)
index 14fbe4b7074a40d2604c8bfbb1449799895d9ec2..8bed73f7c2ca3fc2b5251eecc66efd1c4f38ef93 100644 (file)
@@ -498,18 +498,18 @@ Boolean_5.result().setName("Boolean_5_1")
 Boolean_6 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_5_1")], [model.selection("SOLID", "Boolean_3_1")])
 Boolean_6.result().setName("Boolean_6_1")
 Extrusion_8 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_10r-SketchLine_11r-SketchLine_8r-SketchLine_3r-SketchLine_9r-SketchLine_6r-SketchArc_1_2r-SketchArc_2_2f")], model.selection(), 55, 55)
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_7"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_1"))
 SketchLine_54 = Sketch_7.addLine(55, -9.237604307034024, 55, -60)
 SketchLine_54.setName("SketchLine_66")
 SketchLine_54.result().setName("SketchLine_66")
-SketchPoint_6 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_7&Extrusion_8_1/Generated_Face_6&Extrusion_8_1/To_Face_1"))
+SketchPoint_6 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_2&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/To_Face_1"))
 SketchLine_55 = Sketch_7.addLine(55, -9.237604307034024, 55, -70)
 SketchLine_55.setName("SketchLine_57")
 SketchLine_55.result().setName("SketchLine_57")
 SketchLine_55.setAuxiliary(True)
 SketchConstraintCoincidence_91 = Sketch_7.setCoincident(SketchLine_55.startPoint(), SketchPoint_6.result())
 SketchConstraintCoincidence_91.setName("SketchConstraintCoincidence_95")
-SketchPoint_7 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_7&Extrusion_8_1/To_Face_1"))
+SketchPoint_7 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/To_Face_1"))
 SketchConstraintCoincidence_92 = Sketch_7.setCoincident(SketchLine_55.endPoint(), SketchPoint_7.result())
 SketchConstraintCoincidence_92.setName("SketchConstraintCoincidence_96")
 SketchLine_56 = Sketch_7.addLine(45.00000000000001, -70, -45.00000000000001, -70)
@@ -521,7 +521,7 @@ SketchLine_57.result().setName("SketchLine_58")
 SketchLine_57.setAuxiliary(True)
 SketchConstraintCoincidence_93 = Sketch_7.setCoincident(SketchLine_55.endPoint(), SketchLine_57.startPoint())
 SketchConstraintCoincidence_93.setName("SketchConstraintCoincidence_97")
-SketchPoint_8 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_7&Extrusion_8_1/From_Face_1"))
+SketchPoint_8 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/From_Face_1"))
 SketchConstraintCoincidence_94 = Sketch_7.setCoincident(SketchLine_57.endPoint(), SketchPoint_8.result())
 SketchConstraintCoincidence_94.setName("SketchConstraintCoincidence_98")
 SketchLine_58 = Sketch_7.addLine(-55.00000000000001, -59.99999999999999, -55, -9.237604307034024)
@@ -531,7 +531,7 @@ SketchLine_59 = Sketch_7.addLine(-55, -70, -55, -9.237604307034024)
 SketchLine_59.setAuxiliary(True)
 SketchConstraintCoincidence_95 = Sketch_7.setCoincident(SketchLine_57.endPoint(), SketchLine_59.startPoint())
 SketchConstraintCoincidence_95.setName("SketchConstraintCoincidence_99")
-SketchPoint_9 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_7&Extrusion_8_1/Generated_Face_6&Extrusion_8_1/From_Face_1"))
+SketchPoint_9 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_2&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/From_Face_1"))
 SketchConstraintCoincidence_96 = Sketch_7.setCoincident(SketchLine_59.endPoint(), SketchPoint_9.result())
 SketchConstraintCoincidence_96.setName("SketchConstraintCoincidence_100")
 SketchLine_60 = Sketch_7.addLine(-55, -9.237604307034024, -61.32702426187202, -9.237604307034024)
@@ -611,7 +611,7 @@ SketchConstraintRadius_15 = Sketch_7.setRadius(SketchCircle_6.results()[1], 5)
 SketchCircle_7 = Sketch_7.addCircle(-44, -20.23760430703402, 5)
 SketchConstraintRadius_16 = Sketch_7.setRadius(SketchCircle_7.results()[1], 5)
 SketchConstraintDistance_31 = Sketch_7.setDistance(SketchCircle_6.center(), SketchLine_54.result(), 11)
-SketchLine_66 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_8_1/Generated_Face_7&Extrusion_8_1/Generated_Face_6"))
+SketchLine_66 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_8_1/Generated_Face_2&Extrusion_8_1/Generated_Face_1"))
 SketchLine_66.setName("SketchLine_69")
 SketchLine_66.result().setName("SketchLine_69")
 SketchConstraintDistance_32 = Sketch_7.setDistance(SketchCircle_6.center(), SketchLine_66.result(), 11)
@@ -620,18 +620,18 @@ SketchConstraintDistance_34 = Sketch_7.setDistance(SketchCircle_7.center(), Sket
 model.do()
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_7/Wire-SketchLine_66f-SketchLine_67f-SketchLine_68f-SketchLine_60f-SketchLine_61f-SketchLine_62f-SketchLine_63f-SketchLine_64f-SketchArc_14_2r-SketchArc_15_2r"), model.selection("FACE", "Sketch_7/Face-SketchCircle_4_2f"), model.selection("FACE", "Sketch_7/Face-SketchCircle_5_2f"), model.selection("FACE", "Sketch_7/Face-SketchCircle_7_2f"), model.selection("FACE", "Sketch_7/Face-SketchCircle_6_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Extrusion_8_1")])
 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_5"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_3"))
 SketchLine_67 = Sketch_8.addLine(55, -34.06366588218793, 55, 66.69872981077805)
 SketchLine_67.setName("SketchLine_79")
 SketchLine_67.result().setName("SketchLine_79")
-SketchPoint_10 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_5"))
+SketchPoint_10 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_3"))
 SketchLine_68 = Sketch_8.addLine(55, -34.06366588218793, 55, 76.69872981077803)
 SketchLine_68.setName("SketchLine_70")
 SketchLine_68.result().setName("SketchLine_70")
 SketchLine_68.setAuxiliary(True)
 SketchConstraintCoincidence_116 = Sketch_8.setCoincident(SketchLine_68.startPoint(), SketchPoint_10.result())
 SketchConstraintCoincidence_116.setName("SketchConstraintCoincidence_120")
-SketchPoint_11 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_5&Extrusion_8_1/Generated_Face_4"))
+SketchPoint_11 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_3&Extrusion_8_1/Generated_Face_4"))
 SketchConstraintCoincidence_117 = Sketch_8.setCoincident(SketchLine_68.endPoint(), SketchPoint_11.result())
 SketchConstraintCoincidence_117.setName("SketchConstraintCoincidence_121")
 SketchLine_69 = Sketch_8.addLine(45, 76.69872981077805, -44.9999999570576, 76.69872981077805)
@@ -643,7 +643,7 @@ SketchLine_70.result().setName("SketchLine_71")
 SketchLine_70.setAuxiliary(True)
 SketchConstraintCoincidence_118 = Sketch_8.setCoincident(SketchLine_68.endPoint(), SketchLine_70.startPoint())
 SketchConstraintCoincidence_118.setName("SketchConstraintCoincidence_122")
-SketchPoint_12 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_5&Extrusion_8_1/Generated_Face_4"))
+SketchPoint_12 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_3&Extrusion_8_1/Generated_Face_4"))
 SketchConstraintCoincidence_119 = Sketch_8.setCoincident(SketchLine_70.endPoint(), SketchPoint_12.result())
 SketchConstraintCoincidence_119.setName("SketchConstraintCoincidence_123")
 SketchLine_71 = Sketch_8.addLine(-55, 66.69872976783566, -55, -34.06366588218793)
@@ -653,7 +653,7 @@ SketchLine_72 = Sketch_8.addLine(-55, 76.69872981077803, -55, -34.06366588218793
 SketchLine_72.setAuxiliary(True)
 SketchConstraintCoincidence_120 = Sketch_8.setCoincident(SketchLine_70.endPoint(), SketchLine_72.startPoint())
 SketchConstraintCoincidence_120.setName("SketchConstraintCoincidence_124")
-SketchPoint_13 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_5"))
+SketchPoint_13 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_3"))
 SketchConstraintCoincidence_121 = Sketch_8.setCoincident(SketchLine_72.endPoint(), SketchPoint_13.result())
 SketchConstraintCoincidence_121.setName("SketchConstraintCoincidence_125")
 SketchLine_73 = Sketch_8.addLine(-55, -34.06366588218793, -83.25521566485324, -34.06366588218793)
index f5f3a09f5d39e4f2079a5c002915b9300cc84d8c..fc234273f2010e96e3b1491f6c0df56bc22c9f8c 100644 (file)
@@ -100,14 +100,14 @@ SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_5.startPoint(
 SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_35")
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_4r-SketchArc_1_2f-SketchArc_2_2f-SketchLine_28r-SketchLine_29r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_5"))
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_2"))
 SketchLine_8 = Sketch_2.addLine(0, 0, 25, 43.30127018922193)
 SketchLine_8.setName("SketchLine_5")
 SketchLine_8.result().setName("SketchLine_5")
 SketchLine_8.setAuxiliary(True)
 SketchPoint_3 = Sketch_2.addPoint(model.selection("VERTEX", "PartSet/Origin"))
 SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_8.startPoint(), SketchPoint_3.result())
-SketchCircle_1 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_6&Revolution_1_1/Generated_Face_5"))
+SketchCircle_1 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1"))
 SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchCircle_1.results()[1])
 SketchLine_9 = Sketch_2.addLine(39.43375672974064, -43.30127018922192, 15.87711932209923, -2.499977343709401)
 SketchLine_9.setName("SketchLine_10")
@@ -117,7 +117,7 @@ SketchLine_10.setName("SketchLine_6")
 SketchLine_10.result().setName("SketchLine_6")
 SketchLine_10.setAuxiliary(True)
 SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchPoint_3.result())
-SketchCircle_2 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_6&Revolution_1_1/Generated_Face_5"))
+SketchCircle_2 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1"))
 SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchCircle_2.results()[1])
 SketchLine_11 = Sketch_2.addLine(15.87713238415337, 2.499999967850816, 39.43375672974065, 43.30127018922192)
 SketchLine_12 = Sketch_2.addLine(model.selection("EDGE", "PartSet/OX"))
@@ -228,7 +228,7 @@ SketchLine_22.result().setName("SketchLine_19")
 SketchConstraintDistance_9 = Sketch_2.setDistance(SketchArc_9.center(), SketchPoint_3.coordinates(), 21)
 SketchConstraintDistance_9.setName("SketchConstraintDistance_8")
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_10r-SketchLine_11r-SketchArc_3_2f-SketchArc_4_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_14r-SketchArc_7_2f-SketchLine_15r-SketchArc_8_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_12r-SketchArc_5_2f-SketchLine_13r-SketchArc_6_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchArc_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchArc_9_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchArc_11_2f")], model.selection(), model.selection(), 10, model.selection("FACE", "Revolution_1_1/Generated_Face_2"), 10)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_10r-SketchLine_11r-SketchArc_3_2f-SketchArc_4_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_14r-SketchArc_7_2f-SketchLine_15r-SketchArc_8_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_12r-SketchArc_5_2f-SketchLine_13r-SketchArc_6_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchArc_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchArc_9_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchArc_11_2f")], model.selection(), model.selection(), 10, model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 10)
 Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_4"), model.selection("SOLID", "Extrusion_1_5")])
 Boolean_1.result().setName("Boolean_1_1")
 Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_1_1")], [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_3"), model.selection("SOLID", "Extrusion_1_6")])
@@ -565,7 +565,7 @@ SketchLine_99 = Sketch_10.addLine(model.selection("EDGE", "PartSet/OY"))
 SketchConstraintDistance_35 = Sketch_10.setDistance(SketchLine_98.endPoint(), SketchLine_99.result(), "Thickness")
 model.do()
 Revolution_2 = model.addRevolution(Part_5_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_6r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), 360, 0)
-Sketch_11 = model.addSketch(Part_5_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_5"))
+Sketch_11 = model.addSketch(Part_5_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_1"))
 SketchCircle_14 = Sketch_11.addCircle(0, 0, 8.5)
 SketchCircle_14.setAuxiliary(True)
 SketchPoint_8 = Sketch_11.addPoint(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s-SketchLine_6e"))
@@ -607,7 +607,7 @@ SketchConstraintCoincidence_248 = Sketch_12.setCoincident(SketchLine_106.startPo
 SketchConstraintHorizontal_20 = Sketch_12.setHorizontal(SketchLine_107.result())
 SketchConstraintVertical_20 = Sketch_12.setVertical(SketchLine_106.result())
 SketchConstraintAngle_8 = Sketch_12.setAngle(SketchLine_108.result(), SketchLine_107.result(), 30)
-SketchLine_109 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"))
+SketchLine_109 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_3"))
 SketchConstraintCoincidence_249 = Sketch_12.setCoincident(SketchLine_108.endPoint(), SketchLine_109.result())
 SketchProjection_2 = Sketch_12.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
 SketchLine_110 = SketchProjection_2.createdFeature()
index fa58032322e899abf8136ebfd558cfab0764b312..f095cbb63e47ed54c2132aa19d46cd8d08a99de7 100644 (file)
@@ -583,7 +583,7 @@ SketchLine_379 = Sketch_3.addLine(model.selection("EDGE", "PartSet/OY"))
 SketchConstraintDistance_13 = Sketch_3.setDistance(SketchCircle_4.center(), SketchLine_379.result(), 15)
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_8f-SketchLine_9f-SketchLine_11f-SketchLine_12f-SketchLine_13f-SketchLine_14f")], model.selection("EDGE", "PartSet/OX"), 360, 0)
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_1_2r-SketchLine_382f-SketchLine_383f-SketchLine_20f-SketchArc_2_2r-SketchLine_21f-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f-SketchLine_36f-SketchLine_37f-SketchLine_38f-SketchLine_39f-SketchLine_40f-SketchLine_41f-SketchLine_42f-SketchLine_43f-SketchLine_44f-SketchLine_45f-SketchLine_46f-SketchLine_47f-SketchLine_48f-SketchLine_49f-SketchLine_50f-SketchLine_51f-SketchLine_52f-SketchLine_53f-SketchLine_54f-SketchLine_55f-SketchLine_56f-SketchLine_57f-SketchLine_58f-SketchLine_59f-SketchLine_60f-SketchLine_61f-SketchLine_62f-SketchLine_63f-SketchLine_64f-SketchLine_65f-SketchLine_66f-SketchLine_67f-SketchLine_68f-SketchLine_69f-SketchLine_70f-SketchLine_71f-SketchLine_72f-SketchLine_73f-SketchLine_74f-SketchLine_75f-SketchLine_76f-SketchLine_77f-SketchLine_78f-SketchLine_79f-SketchLine_80f-SketchLine_81f-SketchLine_82f-SketchLine_83f-SketchLine_84f-SketchLine_85f-SketchLine_86f-SketchLine_87f-SketchLine_88f-SketchLine_89f-SketchLine_90f-SketchLine_91f-SketchLine_92f-SketchLine_93f-SketchLine_94f-SketchLine_95f-SketchLine_96f-SketchLine_97f-SketchLine_98f-SketchLine_99f-SketchLine_100f-SketchLine_101f-SketchLine_102f-SketchLine_103f-SketchLine_104f-SketchLine_105f-SketchLine_106f-SketchLine_107f-SketchLine_108f-SketchLine_109f-SketchLine_110f-SketchLine_111f-SketchLine_112f-SketchLine_113f-SketchLine_114f-SketchLine_115f-SketchLine_116f-SketchLine_117f-SketchLine_118f-SketchLine_119f-SketchLine_120f-SketchLine_121f-SketchLine_122f-SketchLine_123f-SketchLine_124f-SketchLine_125f-SketchLine_126f-SketchLine_127f-SketchLine_128f-SketchLine_129f-SketchLine_130f-SketchLine_131f-SketchLine_132f-SketchLine_133f-SketchLine_134f-SketchLine_135f-SketchLine_136f-SketchLine_137f-SketchLine_138f-SketchLine_139f-SketchLine_140f-SketchLine_141f-SketchLine_142f-SketchLine_143f-SketchLine_144f-SketchLine_145f-SketchLine_146f-SketchLine_147f-SketchLine_148f-SketchLine_149f-SketchLine_150f-SketchLine_151f-SketchLine_152f-SketchLine_153f-SketchLine_154f-SketchLine_155f-SketchLine_156f-SketchLine_157f-SketchLine_158f-SketchLine_159f-SketchLine_160f-SketchLine_161f-SketchLine_162f-SketchLine_163f-SketchLine_164f-SketchLine_165f-SketchLine_166f-SketchLine_167f-SketchLine_168f-SketchLine_169f-SketchLine_170f-SketchLine_171f-SketchLine_172f-SketchLine_173f-SketchLine_174f-SketchLine_175f-SketchLine_176f-SketchLine_177f-SketchLine_178f-SketchLine_179f-SketchLine_180f-SketchLine_181f-SketchLine_182f-SketchLine_183f-SketchLine_184f-SketchLine_185f-SketchLine_186f-SketchLine_187f-SketchLine_188f-SketchLine_189f-SketchLine_190f-SketchLine_191f-SketchLine_192f-SketchLine_193f-SketchLine_194f-SketchLine_195f-SketchLine_196f-SketchLine_197f-SketchLine_198f-SketchLine_199f-SketchArc_3_2r-SketchArc_4_2r-SketchArc_5_2r-SketchArc_6_2r-SketchArc_7_2r-SketchArc_8_2r-SketchArc_9_2r-SketchArc_10_2r-SketchArc_11_2r-SketchArc_12_2r-SketchArc_13_2r-SketchArc_14_2r-SketchArc_15_2r-SketchArc_16_2r-SketchArc_17_2r-SketchArc_18_2r-SketchArc_19_2r-SketchArc_20_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_23_2r-SketchArc_24_2r-SketchArc_25_2r-SketchArc_26_2r-SketchArc_27_2r-SketchArc_28_2r-SketchArc_29_2r-SketchArc_30_2r-SketchArc_31_2r-SketchArc_32_2r-SketchArc_33_2r-SketchArc_34_2r-SketchArc_35_2r-SketchArc_36_2r-SketchArc_37_2r-SketchArc_38_2r-SketchArc_39_2r-SketchArc_40_2r-SketchArc_41_2r-SketchArc_42_2r-SketchArc_43_2r-SketchArc_44_2r-SketchArc_45_2r-SketchArc_46_2r-SketchArc_47_2r-SketchArc_48_2r-SketchArc_49_2r-SketchArc_50_2r-SketchArc_51_2r-SketchArc_52_2r-SketchArc_53_2r-SketchArc_54_2r-SketchArc_55_2r-SketchArc_56_2r-SketchArc_57_2r-SketchArc_58_2r-SketchArc_59_2r-SketchArc_60_2r-SketchArc_61_2r-SketchArc_62_2r-SketchArc_63_2r-SketchArc_64_2r-SketchArc_65_2r-SketchArc_66_2r-SketchArc_67_2r-SketchArc_68_2r-SketchArc_69_2r-SketchArc_70_2r-SketchArc_71_2r-SketchArc_72_2r-SketchArc_73_2r-SketchArc_74_2r-SketchArc_75_2r-SketchArc_76_2r-SketchArc_77_2r-SketchArc_78_2r-SketchArc_79_2r-SketchArc_80_2r-SketchArc_81_2r-SketchArc_82_2r-SketchArc_83_2r-SketchArc_84_2r-SketchArc_85_2r-SketchArc_86_2r-SketchArc_87_2r-SketchArc_88_2r-SketchArc_89_2r-SketchArc_90_2r-SketchArc_91_2r-SketchArc_92_2r-SketchArc_93_2r-SketchArc_94_2r-SketchArc_95_2r-SketchArc_96_2r-SketchArc_97_2r-SketchArc_98_2r-SketchArc_99_2r-SketchArc_100_2r-SketchArc_101_2r-SketchArc_102_2r-SketchArc_103_2r-SketchArc_104_2r-SketchArc_105_2r-SketchArc_106_2r-SketchArc_107_2r-SketchArc_108_2r-SketchArc_109_2r-SketchArc_110_2r-SketchArc_111_2r-SketchArc_112_2r-SketchArc_113_2r-SketchArc_114_2r-SketchArc_115_2r-SketchArc_116_2r-SketchArc_117_2r-SketchArc_118_2r-SketchArc_119_2r-SketchArc_120_2r-SketchArc_121_2r-SketchArc_122_2r-SketchArc_123_2r-SketchArc_124_2r-SketchArc_125_2r-SketchArc_126_2r-SketchArc_127_2r-SketchArc_128_2r-SketchArc_129_2r-SketchArc_130_2r-SketchArc_131_2r-SketchArc_132_2r-SketchArc_133_2r-SketchArc_134_2r-SketchArc_135_2r-SketchArc_136_2r-SketchArc_137_2r-SketchArc_138_2r-SketchArc_139_2r-SketchArc_140_2r-SketchArc_141_2r-SketchArc_142_2r-SketchArc_143_2r-SketchArc_144_2r-SketchArc_145_2r-SketchArc_146_2r-SketchArc_147_2r-SketchArc_148_2r-SketchArc_149_2r-SketchArc_150_2r-SketchArc_151_2r-SketchArc_152_2r-SketchArc_153_2r-SketchArc_154_2r-SketchArc_155_2r-SketchArc_156_2r-SketchArc_157_2r-SketchArc_158_2r-SketchArc_159_2r-SketchArc_160_2r-SketchArc_161_2r-SketchArc_162_2r-SketchArc_163_2r-SketchArc_164_2r-SketchArc_165_2r-SketchArc_166_2r-SketchArc_167_2r-SketchArc_168_2r-SketchArc_169_2r-SketchArc_170_2r-SketchArc_171_2r-SketchArc_172_2r-SketchArc_173_2r-SketchArc_174_2r-SketchArc_175_2r-SketchArc_176_2r-SketchArc_177_2r-SketchArc_178_2r-SketchArc_179_2r-SketchArc_180_2r-SketchLine_200f-SketchLine_201f-SketchLine_202f-SketchLine_203f-SketchLine_204f-SketchLine_205f-SketchLine_206f-SketchLine_207f-SketchLine_208f-SketchLine_209f-SketchLine_210f-SketchLine_211f-SketchLine_212f-SketchLine_213f-SketchLine_214f-SketchLine_215f-SketchLine_216f-SketchLine_217f-SketchLine_218f-SketchLine_219f-SketchLine_220f-SketchLine_221f-SketchLine_222f-SketchLine_223f-SketchLine_224f-SketchLine_225f-SketchLine_226f-SketchLine_227f-SketchLine_228f-SketchLine_229f-SketchLine_230f-SketchLine_231f-SketchLine_232f-SketchLine_233f-SketchLine_234f-SketchLine_235f-SketchLine_236f-SketchLine_237f-SketchLine_238f-SketchLine_239f-SketchLine_240f-SketchLine_241f-SketchLine_242f-SketchLine_243f-SketchLine_244f-SketchLine_245f-SketchLine_246f-SketchLine_247f-SketchLine_248f-SketchLine_249f-SketchLine_250f-SketchLine_251f-SketchLine_252f-SketchLine_253f-SketchLine_254f-SketchLine_255f-SketchLine_256f-SketchLine_257f-SketchLine_258f-SketchLine_259f-SketchLine_260f-SketchLine_261f-SketchLine_262f-SketchLine_263f-SketchLine_264f-SketchLine_265f-SketchLine_266f-SketchLine_267f-SketchLine_268f-SketchLine_269f-SketchLine_270f-SketchLine_271f-SketchLine_272f-SketchLine_273f-SketchLine_274f-SketchLine_275f-SketchLine_276f-SketchLine_277f-SketchLine_278f-SketchLine_279f-SketchLine_280f-SketchLine_281f-SketchLine_282f-SketchLine_283f-SketchLine_284f-SketchLine_285f-SketchLine_286f-SketchLine_287f-SketchLine_288f-SketchLine_289f-SketchLine_290f-SketchLine_291f-SketchLine_292f-SketchLine_293f-SketchLine_294f-SketchLine_295f-SketchLine_296f-SketchLine_297f-SketchLine_298f-SketchLine_299f-SketchLine_300f-SketchLine_301f-SketchLine_302f-SketchLine_303f-SketchLine_304f-SketchLine_305f-SketchLine_306f-SketchLine_307f-SketchLine_308f-SketchLine_309f-SketchLine_310f-SketchLine_311f-SketchLine_312f-SketchLine_313f-SketchLine_314f-SketchLine_315f-SketchLine_316f-SketchLine_317f-SketchLine_318f-SketchLine_319f-SketchLine_320f-SketchLine_321f-SketchLine_322f-SketchLine_323f-SketchLine_324f-SketchLine_325f-SketchLine_326f-SketchLine_327f-SketchLine_328f-SketchLine_329f-SketchLine_330f-SketchLine_331f-SketchLine_332f-SketchLine_333f-SketchLine_334f-SketchLine_335f-SketchLine_336f-SketchLine_337f-SketchLine_338f-SketchLine_339f-SketchLine_340f-SketchLine_341f-SketchLine_342f-SketchLine_343f-SketchLine_344f-SketchLine_345f-SketchLine_346f-SketchLine_347f-SketchLine_348f-SketchLine_349f-SketchLine_350f-SketchLine_351f-SketchLine_352f-SketchLine_353f-SketchLine_354f-SketchLine_355f-SketchLine_356f-SketchLine_357f-SketchLine_358f-SketchLine_359f-SketchLine_360f-SketchLine_361f-SketchLine_362f-SketchLine_363f-SketchLine_364f-SketchLine_365f-SketchLine_366f-SketchLine_367f-SketchLine_368f-SketchLine_369f-SketchLine_370f-SketchLine_371f-SketchLine_372f-SketchLine_373f-SketchLine_374f-SketchLine_375f-SketchLine_376f-SketchLine_377f-SketchCircle_3_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_7"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_1_2r-SketchLine_382f-SketchLine_383f-SketchLine_20f-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f-SketchLine_36f-SketchLine_37f-SketchLine_38f-SketchLine_39f-SketchLine_40f-SketchLine_41f-SketchLine_42f-SketchLine_43f-SketchLine_44f-SketchLine_45f-SketchLine_46f-SketchLine_47f-SketchLine_48f-SketchLine_49f-SketchLine_50f-SketchLine_51f-SketchLine_52f-SketchLine_53f-SketchLine_54f-SketchLine_55f-SketchLine_56f-SketchLine_57f-SketchLine_58f-SketchLine_59f-SketchLine_60f-SketchLine_61f-SketchLine_62f-SketchLine_63f-SketchLine_64f-SketchLine_65f-SketchLine_66f-SketchLine_67f-SketchLine_68f-SketchLine_69f-SketchLine_70f-SketchLine_71f-SketchLine_72f-SketchLine_73f-SketchLine_74f-SketchLine_75f-SketchLine_76f-SketchLine_77f-SketchLine_78f-SketchLine_79f-SketchLine_80f-SketchLine_81f-SketchLine_82f-SketchLine_83f-SketchLine_84f-SketchLine_85f-SketchLine_86f-SketchLine_87f-SketchLine_88f-SketchLine_89f-SketchLine_90f-SketchLine_91f-SketchLine_92f-SketchLine_93f-SketchLine_94f-SketchLine_95f-SketchLine_96f-SketchLine_97f-SketchLine_98f-SketchLine_99f-SketchLine_100f-SketchLine_101f-SketchLine_102f-SketchLine_103f-SketchLine_104f-SketchLine_105f-SketchLine_106f-SketchLine_107f-SketchLine_108f-SketchLine_109f-SketchLine_110f-SketchLine_111f-SketchLine_112f-SketchLine_113f-SketchLine_114f-SketchLine_115f-SketchLine_116f-SketchLine_117f-SketchLine_118f-SketchLine_119f-SketchLine_120f-SketchLine_121f-SketchLine_122f-SketchLine_123f-SketchLine_124f-SketchLine_125f-SketchLine_126f-SketchLine_127f-SketchLine_128f-SketchLine_129f-SketchLine_130f-SketchLine_131f-SketchLine_132f-SketchLine_133f-SketchLine_134f-SketchLine_135f-SketchLine_136f-SketchLine_137f-SketchLine_138f-SketchLine_139f-SketchLine_140f-SketchLine_141f-SketchLine_142f-SketchLine_143f-SketchLine_144f-SketchLine_145f-SketchLine_146f-SketchLine_147f-SketchLine_148f-SketchLine_149f-SketchLine_150f-SketchLine_151f-SketchLine_152f-SketchLine_153f-SketchLine_154f-SketchLine_155f-SketchLine_156f-SketchLine_157f-SketchLine_158f-SketchLine_159f-SketchLine_160f-SketchLine_161f-SketchLine_162f-SketchLine_163f-SketchLine_164f-SketchLine_165f-SketchLine_166f-SketchLine_167f-SketchLine_168f-SketchLine_169f-SketchLine_170f-SketchLine_171f-SketchLine_172f-SketchLine_173f-SketchLine_174f-SketchLine_175f-SketchLine_176f-SketchLine_177f-SketchLine_178f-SketchLine_179f-SketchLine_180f-SketchLine_181f-SketchLine_182f-SketchLine_183f-SketchLine_184f-SketchLine_185f-SketchLine_186f-SketchLine_187f-SketchLine_188f-SketchLine_189f-SketchLine_190f-SketchLine_191f-SketchLine_192f-SketchLine_193f-SketchLine_194f-SketchLine_195f-SketchLine_196f-SketchLine_197f-SketchLine_198f-SketchLine_199f-SketchArc_2_2r-SketchArc_3_2r-SketchArc_4_2r-SketchArc_5_2r-SketchArc_6_2r-SketchArc_7_2r-SketchArc_8_2r-SketchArc_9_2r-SketchArc_10_2r-SketchArc_11_2r-SketchArc_12_2r-SketchArc_13_2r-SketchArc_14_2r-SketchArc_15_2r-SketchArc_16_2r-SketchArc_17_2r-SketchArc_18_2r-SketchArc_19_2r-SketchArc_20_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_23_2r-SketchArc_24_2r-SketchArc_25_2r-SketchArc_26_2r-SketchArc_27_2r-SketchArc_28_2r-SketchArc_29_2r-SketchArc_30_2r-SketchArc_31_2r-SketchArc_32_2r-SketchArc_33_2r-SketchArc_34_2r-SketchArc_35_2r-SketchArc_36_2r-SketchArc_37_2r-SketchArc_38_2r-SketchArc_39_2r-SketchArc_40_2r-SketchArc_41_2r-SketchArc_42_2r-SketchArc_43_2r-SketchArc_44_2r-SketchArc_45_2r-SketchArc_46_2r-SketchArc_47_2r-SketchArc_48_2r-SketchArc_49_2r-SketchArc_50_2r-SketchArc_51_2r-SketchArc_52_2r-SketchArc_53_2r-SketchArc_54_2r-SketchArc_55_2r-SketchArc_56_2r-SketchArc_57_2r-SketchArc_58_2r-SketchArc_59_2r-SketchArc_60_2r-SketchArc_61_2r-SketchArc_62_2r-SketchArc_63_2r-SketchArc_64_2r-SketchArc_65_2r-SketchArc_66_2r-SketchArc_67_2r-SketchArc_68_2r-SketchArc_69_2r-SketchArc_70_2r-SketchArc_71_2r-SketchArc_72_2r-SketchArc_73_2r-SketchArc_74_2r-SketchArc_75_2r-SketchArc_76_2r-SketchArc_77_2r-SketchArc_78_2r-SketchArc_79_2r-SketchArc_80_2r-SketchArc_81_2r-SketchArc_82_2r-SketchArc_83_2r-SketchArc_84_2r-SketchArc_85_2r-SketchArc_86_2r-SketchArc_87_2r-SketchArc_88_2r-SketchArc_89_2r-SketchArc_90_2r-SketchArc_91_2r-SketchArc_92_2r-SketchArc_93_2r-SketchArc_94_2r-SketchArc_95_2r-SketchArc_96_2r-SketchArc_97_2r-SketchArc_98_2r-SketchArc_99_2r-SketchArc_100_2r-SketchArc_101_2r-SketchArc_102_2r-SketchArc_103_2r-SketchArc_104_2r-SketchArc_105_2r-SketchArc_106_2r-SketchArc_107_2r-SketchArc_108_2r-SketchArc_109_2r-SketchArc_110_2r-SketchArc_111_2r-SketchArc_112_2r-SketchArc_113_2r-SketchArc_114_2r-SketchArc_115_2r-SketchArc_116_2r-SketchArc_117_2r-SketchArc_118_2r-SketchArc_119_2r-SketchArc_120_2r-SketchArc_121_2r-SketchArc_122_2r-SketchArc_123_2r-SketchArc_124_2r-SketchArc_125_2r-SketchArc_126_2r-SketchArc_127_2r-SketchArc_128_2r-SketchArc_129_2r-SketchArc_130_2r-SketchArc_131_2r-SketchArc_132_2r-SketchArc_133_2r-SketchArc_134_2r-SketchArc_135_2r-SketchArc_136_2r-SketchArc_137_2r-SketchArc_138_2r-SketchArc_139_2r-SketchArc_140_2r-SketchArc_141_2r-SketchArc_142_2r-SketchArc_143_2r-SketchArc_144_2r-SketchArc_145_2r-SketchArc_146_2r-SketchArc_147_2r-SketchArc_148_2r-SketchArc_149_2r-SketchArc_150_2r-SketchArc_151_2r-SketchArc_152_2r-SketchArc_153_2r-SketchArc_154_2r-SketchArc_155_2r-SketchArc_156_2r-SketchArc_157_2r-SketchArc_158_2r-SketchArc_159_2r-SketchArc_160_2r-SketchArc_161_2r-SketchArc_162_2r-SketchArc_163_2r-SketchArc_164_2r-SketchArc_165_2r-SketchArc_166_2r-SketchArc_167_2r-SketchArc_168_2r-SketchArc_169_2r-SketchArc_170_2r-SketchArc_171_2r-SketchArc_172_2r-SketchArc_173_2r-SketchArc_174_2r-SketchArc_175_2r-SketchArc_176_2r-SketchArc_177_2r-SketchArc_178_2r-SketchArc_179_2r-SketchArc_180_2r-SketchLine_21f-SketchLine_200f-SketchLine_201f-SketchLine_202f-SketchLine_203f-SketchLine_204f-SketchLine_205f-SketchLine_206f-SketchLine_207f-SketchLine_208f-SketchLine_209f-SketchLine_210f-SketchLine_211f-SketchLine_212f-SketchLine_213f-SketchLine_214f-SketchLine_215f-SketchLine_216f-SketchLine_217f-SketchLine_218f-SketchLine_219f-SketchLine_220f-SketchLine_221f-SketchLine_222f-SketchLine_223f-SketchLine_224f-SketchLine_225f-SketchLine_226f-SketchLine_227f-SketchLine_228f-SketchLine_229f-SketchLine_230f-SketchLine_231f-SketchLine_232f-SketchLine_233f-SketchLine_234f-SketchLine_235f-SketchLine_236f-SketchLine_237f-SketchLine_238f-SketchLine_239f-SketchLine_240f-SketchLine_241f-SketchLine_242f-SketchLine_243f-SketchLine_244f-SketchLine_245f-SketchLine_246f-SketchLine_247f-SketchLine_248f-SketchLine_249f-SketchLine_250f-SketchLine_251f-SketchLine_252f-SketchLine_253f-SketchLine_254f-SketchLine_255f-SketchLine_256f-SketchLine_257f-SketchLine_258f-SketchLine_259f-SketchLine_260f-SketchLine_261f-SketchLine_262f-SketchLine_263f-SketchLine_264f-SketchLine_265f-SketchLine_266f-SketchLine_267f-SketchLine_268f-SketchLine_269f-SketchLine_270f-SketchLine_271f-SketchLine_272f-SketchLine_273f-SketchLine_274f-SketchLine_275f-SketchLine_276f-SketchLine_277f-SketchLine_278f-SketchLine_279f-SketchLine_280f-SketchLine_281f-SketchLine_282f-SketchLine_283f-SketchLine_284f-SketchLine_285f-SketchLine_286f-SketchLine_287f-SketchLine_288f-SketchLine_289f-SketchLine_290f-SketchLine_291f-SketchLine_292f-SketchLine_293f-SketchLine_294f-SketchLine_295f-SketchLine_296f-SketchLine_297f-SketchLine_298f-SketchLine_299f-SketchLine_300f-SketchLine_301f-SketchLine_302f-SketchLine_303f-SketchLine_304f-SketchLine_305f-SketchLine_306f-SketchLine_307f-SketchLine_308f-SketchLine_309f-SketchLine_310f-SketchLine_311f-SketchLine_312f-SketchLine_313f-SketchLine_314f-SketchLine_315f-SketchLine_316f-SketchLine_317f-SketchLine_318f-SketchLine_319f-SketchLine_320f-SketchLine_321f-SketchLine_322f-SketchLine_323f-SketchLine_324f-SketchLine_325f-SketchLine_326f-SketchLine_327f-SketchLine_328f-SketchLine_329f-SketchLine_330f-SketchLine_331f-SketchLine_332f-SketchLine_333f-SketchLine_334f-SketchLine_335f-SketchLine_336f-SketchLine_337f-SketchLine_338f-SketchLine_339f-SketchLine_340f-SketchLine_341f-SketchLine_342f-SketchLine_343f-SketchLine_344f-SketchLine_345f-SketchLine_346f-SketchLine_347f-SketchLine_348f-SketchLine_349f-SketchLine_350f-SketchLine_351f-SketchLine_352f-SketchLine_353f-SketchLine_354f-SketchLine_355f-SketchLine_356f-SketchLine_357f-SketchLine_358f-SketchLine_359f-SketchLine_360f-SketchLine_361f-SketchLine_362f-SketchLine_363f-SketchLine_364f-SketchLine_365f-SketchLine_366f-SketchLine_367f-SketchLine_368f-SketchLine_369f-SketchLine_370f-SketchLine_371f-SketchLine_372f-SketchLine_373f-SketchLine_374f-SketchLine_375f-SketchLine_376f-SketchLine_377f-SketchCircle_3_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_4_2f")], model.selection(), 30, 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
 ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
index c0d1c6eb329bdf42a3bd1027ece543567293bbc9..569774775979a22d82aededb3bbcea0d71b763f1 100644 (file)
@@ -136,7 +136,7 @@ SketchLine_15.result().setName("SketchLine_19")
 SketchLine_16 = Sketch_3.addLine(-20, 0, 0, 0)
 SketchLine_16.setName("SketchLine_15")
 SketchLine_16.result().setName("SketchLine_15")
-SketchPoint_2 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_7&ExtrusionFuse_2_1/Modfied_5&ExtrusionFuse_2_1/Modfied_8&ExtrusionFuse_2_1/Modfied_11"))
+SketchPoint_2 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_7&ExtrusionFuse_2_1/Modfied_6&ExtrusionFuse_2_1/Modfied_8&ExtrusionFuse_2_1/Modfied_9"))
 SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchLine_16.endPoint(), SketchPoint_2.result())
 SketchLine_17 = Sketch_3.addLine(0, 0, 0, -20)
 SketchLine_17.setName("SketchLine_16")
@@ -656,7 +656,7 @@ Sketch_10 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOY"))
 SketchLine_77 = Sketch_10.addLine(64, 20, 89, 20)
 SketchLine_77.setName("SketchLine_76")
 SketchLine_77.result().setName("SketchLine_76")
-SketchPoint_4 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_2_1/Modfied_11&RevolutionFuse_2_1/Modfied_13&RevolutionFuse_3_1/Modfied_15&RevolutionFuse_3_1/Modfied_4"))
+SketchPoint_4 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_2_1/Modfied_11&RevolutionFuse_2_1/Modfied_15&RevolutionFuse_3_1/Modfied_15&RevolutionFuse_3_1/Modfied_4"))
 SketchConstraintCoincidence_122 = Sketch_10.setCoincident(SketchLine_77.startPoint(), SketchPoint_4.result())
 SketchConstraintCoincidence_122.setName("SketchConstraintCoincidence_120")
 SketchPoint_5 = Sketch_10.addPoint(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s-SketchLine_8e-SketchLine_4e"))
@@ -665,10 +665,10 @@ SketchConstraintCoincidence_123.setName("SketchConstraintCoincidence_121")
 SketchLine_78 = Sketch_10.addLine(64, -20, 89, -20)
 SketchLine_78.setName("SketchLine_77")
 SketchLine_78.result().setName("SketchLine_77")
-SketchPoint_6 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_1_1/Modfied_4&RevolutionFuse_1_1/Modfied_9&RevolutionFuse_3_1/Modfied_17&RevolutionFuse_3_1/Modfied_8"))
+SketchPoint_6 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_1_1/Modfied_4&RevolutionFuse_1_1/Modfied_10&RevolutionFuse_3_1/Modfied_17&RevolutionFuse_3_1/Modfied_8"))
 SketchConstraintCoincidence_124 = Sketch_10.setCoincident(SketchLine_78.startPoint(), SketchPoint_6.result())
 SketchConstraintCoincidence_124.setName("SketchConstraintCoincidence_122")
-SketchPoint_7 = Sketch_10.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_2&RevolutionFuse_1_1/Modfied_4&ExtrusionFuse_2_1/Modfied_1&RevolutionFuse_3_1/Modfied_17"))
+SketchPoint_7 = Sketch_10.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_3&RevolutionFuse_1_1/Modfied_4&ExtrusionFuse_2_1/Modfied_4&RevolutionFuse_3_1/Modfied_17"))
 SketchConstraintCoincidence_125 = Sketch_10.setCoincident(SketchLine_78.endPoint(), SketchPoint_7.result())
 SketchConstraintCoincidence_125.setName("SketchConstraintCoincidence_123")
 SketchArc_10 = Sketch_10.addArc(89.00000104846708, 1.669244441022778e-015, 89, -20, 89, 20, False)
@@ -691,7 +691,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", "ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_7&RevolutionFuse_3_1/Modfied_8&RevolutionFuse_3_1/Modfied_24&RevolutionFuse_3_1/Modfied_9"))
+SketchPoint_8 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_3_1/Modfied_9&RevolutionFuse_3_1/Modfied_8&ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_7&RevolutionFuse_3_1/Modfied_24"))
 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)
@@ -702,7 +702,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", "ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_3&RevolutionFuse_3_1/Modfied_4&RevolutionFuse_3_1/Modfied_24&RevolutionFuse_3_1/Modfied_5"))
+SketchPoint_9 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_3_1/Modfied_5&RevolutionFuse_3_1/Modfied_4&ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_3&RevolutionFuse_3_1/Modfied_24"))
 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)
index 66761864def3791c24259fab943e984a162b90fb..368df3b77d10c96c80931b4ab85891efcdb35e72 100644 (file)
@@ -147,7 +147,7 @@ SketchLine_14.result().setName("SketchLine_16")
 SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchArc_3.endPoint(), SketchLine_14.result())
 SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_24")
 SketchConstraintRadius_2 = Sketch_2.setRadius(SketchArc_3.results()[1], 6)
-SketchLine_15 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_1"))
+SketchLine_15 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_12"))
 SketchLine_15.setName("SketchLine_17")
 SketchLine_15.result().setName("SketchLine_17")
 SketchConstraintDistance_8 = Sketch_2.setDistance(SketchArc_3.startPoint(), SketchLine_15.result(), 6)
@@ -182,12 +182,12 @@ SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_30")
 model.do()
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_3_2r-SketchLine_18r-SketchLine_19r-SketchLine_20r-SketchLine_21r-SketchLine_22r")], model.selection(), 7, 15, [model.selection("SOLID", "Extrusion_1_1")])
 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_9"))
 SketchLine_21 = Sketch_3.addLine(28, -6, -4.270492394552598, -6.000000000000001)
 SketchLine_21.setName("SketchLine_23")
 SketchLine_21.result().setName("SketchLine_23")
 SketchLine_21.setAuxiliary(True)
-SketchLine_22 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
+SketchLine_22 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_9"))
 SketchLine_22.setName("SketchLine_24")
 SketchLine_22.result().setName("SketchLine_24")
 SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_22.result())
@@ -305,27 +305,27 @@ SketchConstraintCoincidence_51.setName("SketchConstraintCoincidence_55")
 SketchConstraintMiddle_2 = Sketch_3.setMiddlePoint(SketchLine_34.result(), SketchPoint_4.coordinates())
 SketchConstraintCoincidence_52 = Sketch_3.setCoincident(SketchPoint_4.coordinates(), SketchLine_21.result())
 SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_56")
-SketchLine_35 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&ExtrusionCut_1_1/Modfied_4"))
+SketchLine_35 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&ExtrusionCut_1_1/Modfied_3"))
 SketchLine_35.setName("SketchLine_37")
 SketchLine_35.result().setName("SketchLine_37")
 SketchConstraintCoincidence_53 = Sketch_3.setCoincident(SketchLine_25.startPoint(), SketchLine_35.result())
 SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_57")
 SketchConstraintLength_10 = Sketch_3.setLength(SketchLine_24.result(), 31)
 SketchConstraintLength_10.setName("SketchConstraintLength_11")
-SketchLine_36 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchLine_36 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_5"))
 SketchLine_36.setName("SketchLine_38")
 SketchLine_36.result().setName("SketchLine_38")
 SketchConstraintCoincidence_54 = Sketch_3.setCoincident(SketchLine_30.startPoint(), SketchLine_36.result())
 SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_58")
 SketchConstraintEqual_2 = Sketch_3.setEqual(SketchLine_30.result(), SketchLine_25.result())
 model.do()
-ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
+ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
 ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_1"))
 SketchLine_37 = Sketch_4.addLine(0.4324637622511017, 3.581086955422081, 1.55585595716119, 2.812450190483599)
 SketchLine_37.setName("SketchLine_39")
 SketchLine_37.result().setName("SketchLine_39")
-SketchLine_38 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_11"))
+SketchLine_38 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
 SketchLine_38.setName("SketchLine_40")
 SketchLine_38.result().setName("SketchLine_40")
 SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchLine_37.startPoint(), SketchLine_38.result())
@@ -373,7 +373,7 @@ SketchLine_41.result().setName("SketchLine_43")
 model.do()
 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_2"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
 ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_12"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
+Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_1"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
 SketchArc_4 = Sketch_5.addArc(25.00007393928819, -7.521062532210847, 22.00014787857639, -7.5, 28, -7.5, True)
 SketchPoint_5 = Sketch_5.addPoint(22.00014787857639, -7.5)
@@ -1088,7 +1088,7 @@ SketchLine_120.result().setName("SketchLine_16")
 SketchConstraintCoincidence_193 = Sketch_12.setCoincident(SketchArc_26.endPoint(), SketchLine_120.result())
 SketchConstraintCoincidence_193.setName("SketchConstraintCoincidence_24")
 SketchConstraintRadius_13 = Sketch_12.setRadius(SketchArc_26.results()[1], 6)
-SketchLine_121 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_1"))
+SketchLine_121 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_12"))
 SketchLine_121.setName("SketchLine_17")
 SketchLine_121.result().setName("SketchLine_17")
 SketchConstraintDistance_25 = Sketch_12.setDistance(SketchArc_26.startPoint(), SketchLine_121.result(), 6)
@@ -1123,12 +1123,12 @@ SketchConstraintCoincidence_199.setName("SketchConstraintCoincidence_30")
 model.do()
 ExtrusionCut_10 = model.addExtrusionCut(Part_2_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_3_2r-SketchLine_18r-SketchLine_19r-SketchLine_20r-SketchLine_21r-SketchLine_22r")], model.selection(), 7, 15, [model.selection("SOLID", "Extrusion_1_1")])
 ExtrusionCut_10.result().setName("ExtrusionCut_1_1")
-Sketch_13 = model.addSketch(Part_2_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
+Sketch_13 = model.addSketch(Part_2_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_9"))
 SketchLine_127 = Sketch_13.addLine(28, -6, -4.270492394552598, -6.000000000000001)
 SketchLine_127.setName("SketchLine_23")
 SketchLine_127.result().setName("SketchLine_23")
 SketchLine_127.setAuxiliary(True)
-SketchLine_128 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
+SketchLine_128 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_9"))
 SketchLine_128.setName("SketchLine_24")
 SketchLine_128.result().setName("SketchLine_24")
 SketchConstraintCoincidence_200 = Sketch_13.setCoincident(SketchLine_127.startPoint(), SketchLine_128.result())
@@ -1246,27 +1246,27 @@ SketchConstraintCoincidence_224.setName("SketchConstraintCoincidence_55")
 SketchConstraintMiddle_10 = Sketch_13.setMiddlePoint(SketchLine_140.result(), SketchPoint_28.coordinates())
 SketchConstraintCoincidence_225 = Sketch_13.setCoincident(SketchPoint_28.coordinates(), SketchLine_127.result())
 SketchConstraintCoincidence_225.setName("SketchConstraintCoincidence_56")
-SketchLine_141 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&ExtrusionCut_1_1/Modfied_4"))
+SketchLine_141 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&ExtrusionCut_1_1/Modfied_3"))
 SketchLine_141.setName("SketchLine_37")
 SketchLine_141.result().setName("SketchLine_37")
 SketchConstraintCoincidence_226 = Sketch_13.setCoincident(SketchLine_131.startPoint(), SketchLine_141.result())
 SketchConstraintCoincidence_226.setName("SketchConstraintCoincidence_57")
 SketchConstraintLength_27 = Sketch_13.setLength(SketchLine_130.result(), 31)
 SketchConstraintLength_27.setName("SketchConstraintLength_11")
-SketchLine_142 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchLine_142 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_5"))
 SketchLine_142.setName("SketchLine_38")
 SketchLine_142.result().setName("SketchLine_38")
 SketchConstraintCoincidence_227 = Sketch_13.setCoincident(SketchLine_136.startPoint(), SketchLine_142.result())
 SketchConstraintCoincidence_227.setName("SketchConstraintCoincidence_58")
 SketchConstraintEqual_5 = Sketch_13.setEqual(SketchLine_136.result(), SketchLine_131.result())
 model.do()
-ExtrusionCut_11 = model.addExtrusionCut(Part_2_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
+ExtrusionCut_11 = model.addExtrusionCut(Part_2_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
 ExtrusionCut_11.result().setName("ExtrusionCut_2_1")
 Sketch_14 = model.addSketch(Part_2_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_1"))
 SketchLine_143 = Sketch_14.addLine(0.4324637622511017, 3.581086955422081, 1.55585595716119, 2.812450190483599)
 SketchLine_143.setName("SketchLine_39")
 SketchLine_143.result().setName("SketchLine_39")
-SketchLine_144 = Sketch_14.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_11"))
+SketchLine_144 = Sketch_14.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
 SketchLine_144.setName("SketchLine_40")
 SketchLine_144.result().setName("SketchLine_40")
 SketchConstraintCoincidence_228 = Sketch_14.setCoincident(SketchLine_143.startPoint(), SketchLine_144.result())
@@ -1314,7 +1314,7 @@ SketchLine_147.result().setName("SketchLine_43")
 model.do()
 ExtrusionCut_12 = model.addExtrusionCut(Part_2_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_2"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
 ExtrusionCut_12.result().setName("ExtrusionCut_3_1")
-Plane_9 = model.addPlane(Part_2_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_12"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
+Plane_9 = model.addPlane(Part_2_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_1"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
 Sketch_15 = model.addSketch(Part_2_doc, model.selection("FACE", "Plane_1"))
 SketchArc_27 = Sketch_15.addArc(25.00007393928819, -7.521062532210847, 22.00014787857639, -7.5, 28, -7.5, True)
 SketchPoint_29 = Sketch_15.addPoint(22.00014787857639, -7.5)
index 5bd4027865556ebb7986cb883624c5c21129606c..8f5c6417c76764f524391ca60044cb8b6cf8655b 100644 (file)
@@ -118,9 +118,9 @@ model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_10f-SketchLine_11f-SketchLine_12f-SketchLine_13f-SketchLine_4f-SketchLine_8f-SketchLine_9f-SketchArc_1_2r-SketchArc_2_2f")], model.selection(), "307/2.", "307/2.")
 Extrusion_1.setName("Profil")
 Extrusion_1.result().setName("Extrusion_1_1")
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_7"))
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
 SketchLine_14 = Sketch_2.addLine(149.5, -2.3, 153.5, -2.3)
-SketchPoint_1 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"))
+SketchPoint_1 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
 SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchPoint_1.result())
 SketchLine_15 = Sketch_2.addLine(153.5, -2.3, 153.5, 7.7)
 SketchLine_16 = Sketch_2.addLine(153.5, 7.7, 149.5, 7.7)
@@ -150,25 +150,25 @@ SketchConstraintLength_5 = Sketch_2.setLength(SketchLine_21.result(), 10)
 SketchConstraintLength_5.setName("SketchConstraintLength_6")
 SketchConstraintDistance_2 = Sketch_2.setDistance(SketchLine_16.endPoint(), SketchLine_21.result(), 299)
 SketchConstraintEqual_1 = Sketch_2.setEqual(SketchLine_16.result(), SketchLine_20.result())
-SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_1"))
+SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1"))
 SketchPoint_2.setName("SketchPoint_4")
 SketchPoint_2.result().setName("SketchPoint_4")
 SketchConstraintCoincidence_34 = Sketch_2.setCoincident(SketchLine_19.startPoint(), SketchPoint_2.coordinates())
 SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_39")
 model.do()
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_6"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
 ExtrusionCut_1.setName("Decoupe_Angle")
 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_2"))
 SketchLine_22 = Sketch_3.addLine(153.5, -10.3, 153.5, -8.3)
 SketchLine_22.setName("SketchLine_29")
 SketchLine_22.result().setName("SketchLine_29")
-SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_9&ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_8"))
+SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
 SketchPoint_3.setName("SketchPoint_5")
 SketchPoint_3.result().setName("SketchPoint_5")
 SketchConstraintCoincidence_35 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchPoint_3.result())
 SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_40")
-SketchLine_23 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_8"))
+SketchLine_23 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
 SketchLine_23.setName("SketchLine_30")
 SketchLine_23.result().setName("SketchLine_30")
 SketchConstraintCoincidence_36 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_23.result())
@@ -207,16 +207,16 @@ Sketch_3.result().setName("Sketch_4")
 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), 0, 10, [model.selection("SOLID", "ExtrusionCut_1_1")])
 ExtrusionCut_2.setName("Chamfrein_1")
 ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_7"))
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_5"))
 SketchLine_30 = Sketch_4.addLine(-149.5, 10.3, -149.5, 8.3)
 SketchLine_30.setName("SketchLine_35")
 SketchLine_30.result().setName("SketchLine_35")
-SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_7&ExtrusionCut_1_1/Modfied_6"))
+SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_5&ExtrusionCut_1_1/Modfied_6"))
 SketchPoint_4.setName("SketchPoint_6")
 SketchPoint_4.result().setName("SketchPoint_6")
 SketchConstraintCoincidence_42 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchPoint_4.result())
 SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_43")
-SketchLine_31 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_7"))
+SketchLine_31 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_5"))
 SketchLine_31.setName("SketchLine_36")
 SketchLine_31.result().setName("SketchLine_36")
 SketchConstraintCoincidence_43 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_31.result())
@@ -291,16 +291,16 @@ SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_59")
 model.do()
 Sketch_4.setName("Sketch_5")
 Sketch_4.result().setName("Sketch_5")
-ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_5")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_5"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
+ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_5")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_7"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
 ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_9"))
+Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"))
 SketchLine_40 = Sketch_5.addLine(152.2999838762584, -21.04999053274691, 153.5, -21.04999053274714)
 SketchLine_40.setName("SketchLine_58")
 SketchLine_40.result().setName("SketchLine_58")
 SketchLine_41 = Sketch_5.addLine(152.2999838292651, -45.04999053274704, 153.5, -45.04999053274702)
 SketchLine_41.setName("SketchLine_57")
 SketchLine_41.result().setName("SketchLine_57")
-SketchLine_42 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_1_1/Modfied_9"))
+SketchLine_42 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_1_1/Modfied_3"))
 SketchLine_42.setName("SketchLine_46")
 SketchLine_42.result().setName("SketchLine_46")
 SketchLine_43 = Sketch_5.addLine(150.8, -45.04999053274702, 153.5, -45.04999053274702)
index e0c52c036a2de0439c1d203770e253291185241b..065a84dbf35bdfd5599268b9730e6e39eef7fda6 100644 (file)
@@ -164,7 +164,7 @@ SketchConstraintLength_9 = Sketch_3.setLength(SketchLine_84.result(), "2*R_fille
 SketchConstraintLength_10 = Sketch_3.setLength(SketchLine_83.result(), "2*R_fillet")
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1")], model.selection("EDGE", "PartSet/Sketch_1/Edge-SketchLine_1"), 360, 0)
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_5"))
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_1"))
 SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "PartSet/Origin"))
 SketchLine_86 = Sketch_4.addLine(0, -13.49999999999519, 3.1, -13.49999999999519)
 SketchLine_87 = Sketch_4.addLine(model.selection("EDGE", "PartSet/OZ"))
@@ -196,7 +196,7 @@ SketchConstraintCoincidence_61 = Sketch_4.setCoincident(SketchPoint_6.coordinate
 SketchConstraintCoincidence_62 = Sketch_4.setCoincident(SketchPoint_6.coordinates(), SketchLine_89.result())
 SketchConstraintDistance_6 = Sketch_4.setDistance(SketchPoint_6.coordinates(), SketchLine_86.result(), 24.5)
 model.do()
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_1"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
 RevolutionCut_1 = model.addRevolutionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection("EDGE", "PartSet/OX"), 0, 360, [model.selection("SOLID", "ExtrusionCut_1_1")])
 RevolutionCut_1.result().setName("RevolutionCut_1_1")
index 92d8e891f89540de33fefe940a9d4f7ca6553cb0..e9a036f831b45550b4701d9a5437b72eb7b4712e 100644 (file)
@@ -72,26 +72,26 @@ SketchConstraintTangent_8 = Sketch_1.setTangent(SketchArc_4.results()[1], Sketch
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_3f-SketchLine_5r-SketchLine_6r-SketchArc_1_2f-SketchArc_2_2f-SketchArc_3_2f-SketchArc_4_2f")], model.selection(), 76, 0)
 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
-SketchLine_7 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"))
+SketchLine_7 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"))
 SketchLine_7.setName("SketchLine_8")
 SketchLine_7.result().setName("SketchLine_8")
 SketchLine_8 = Sketch_2.addLine(21, 45.99999999998655, 20.99999999998684, 0)
 SketchLine_8.setName("SketchLine_9")
 SketchLine_8.result().setName("SketchLine_9")
 SketchLine_8.setAuxiliary(True)
-SketchLine_9 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"))
+SketchLine_9 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
 SketchLine_9.setName("SketchLine_10")
 SketchLine_9.result().setName("SketchLine_10")
 SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_8.startPoint(), SketchLine_9.result())
 SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_18")
-SketchLine_10 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"))
+SketchLine_10 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"))
 SketchLine_10.setName("SketchLine_11")
 SketchLine_10.result().setName("SketchLine_11")
 SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_10.result())
 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_19")
 SketchConstraintMiddle_1 = Sketch_2.setMiddlePoint(SketchLine_8.startPoint(), SketchLine_9.result())
 SketchConstraintMiddle_2 = Sketch_2.setMiddlePoint(SketchLine_8.endPoint(), SketchLine_10.result())
-SketchLine_11 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
+SketchLine_11 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"))
 SketchLine_11.setName("SketchLine_12")
 SketchLine_11.result().setName("SketchLine_12")
 SketchPoint_1 = Sketch_2.addPoint(20.99999999999342, 22.99999999999327)
@@ -139,12 +139,12 @@ SketchLine_13 = Sketch_3.addLine(41.99999999999999, 22.99999999998655, 0, 22.999
 SketchLine_13.setName("SketchLine_14")
 SketchLine_13.result().setName("SketchLine_14")
 SketchLine_13.setAuxiliary(True)
-SketchLine_14 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_3"))
+SketchLine_14 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_5"))
 SketchLine_14.setName("SketchLine_15")
 SketchLine_14.result().setName("SketchLine_15")
 SketchConstraintCoincidence_26 = Sketch_3.setCoincident(SketchLine_13.startPoint(), SketchLine_14.result())
 SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_27")
-SketchLine_15 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_2_1/Modfied_2"))
+SketchLine_15 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_2_1/Modfied_2"))
 SketchLine_15.setName("SketchLine_16")
 SketchLine_15.result().setName("SketchLine_16")
 SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_13.endPoint(), SketchLine_15.result())
@@ -153,7 +153,7 @@ SketchLine_16 = Sketch_3.addLine(21, 45.99999999998655, 20.99999999998684, 0)
 SketchLine_16.setName("SketchLine_17")
 SketchLine_16.result().setName("SketchLine_17")
 SketchLine_16.setAuxiliary(True)
-SketchLine_17 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_5"))
+SketchLine_17 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_3"))
 SketchLine_17.setName("SketchLine_18")
 SketchLine_17.result().setName("SketchLine_18")
 SketchConstraintCoincidence_28 = Sketch_3.setCoincident(SketchLine_16.startPoint(), SketchLine_17.result())
@@ -186,24 +186,24 @@ SketchConstraintDistance_5 = Sketch_3.setDistance(SketchCircle_6.center(), Sketc
 model.do()
 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_5_2f-SketchCircle_6_2r-SketchCircle_7_2r")], model.selection(), 15, 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
 ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_5"))
-SketchProjection_1 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"))
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
+SketchProjection_1 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"))
 SketchLine_19 = SketchProjection_1.createdFeature()
 SketchLine_19.setName("SketchLine_20")
 SketchLine_19.result().setName("SketchLine_20")
-SketchProjection_2 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_4"))
+SketchProjection_2 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
 SketchLine_20 = SketchProjection_2.createdFeature()
 SketchLine_20.setName("SketchLine_21")
 SketchLine_20.result().setName("SketchLine_21")
 SketchLine_21 = Sketch_4.addLine(4.999999999999999, -28, 37, -28)
 SketchLine_21.setName("SketchLine_22")
 SketchLine_21.result().setName("SketchLine_22")
-SketchLine_22 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"))
+SketchLine_22 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_3"))
 SketchLine_22.setName("SketchLine_23")
 SketchLine_22.result().setName("SketchLine_23")
 SketchConstraintCoincidence_34 = Sketch_4.setCoincident(SketchLine_21.startPoint(), SketchLine_22.result())
 SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_35")
-SketchLine_23 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
+SketchLine_23 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_4"))
 SketchLine_23.setName("SketchLine_24")
 SketchLine_23.result().setName("SketchLine_24")
 SketchConstraintCoincidence_35 = Sketch_4.setCoincident(SketchLine_21.endPoint(), SketchLine_23.result())
@@ -292,19 +292,19 @@ SketchConstraintVertical_2 = Sketch_5.setVertical(SketchLine_30.result())
 SketchConstraintVertical_3 = Sketch_5.setVertical(SketchLine_31.result())
 SketchConstraintEqual_8 = Sketch_5.setEqual(SketchLine_29.result(), SketchLine_28.result())
 SketchConstraintEqual_9 = Sketch_5.setEqual(SketchLine_31.result(), SketchLine_30.result())
-SketchLine_32 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_1"))
+SketchLine_32 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_7&Extrusion_2_1/To_Face_1"))
 SketchLine_32.setName("SketchLine_33")
 SketchLine_32.result().setName("SketchLine_33")
 SketchConstraintDistance_7 = Sketch_5.setDistance(SketchLine_30.endPoint(), SketchLine_32.result(), 2)
-SketchLine_33 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_5&Extrusion_2_1/To_Face_1"))
+SketchLine_33 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/To_Face_1"))
 SketchLine_33.setName("SketchLine_34")
 SketchLine_33.result().setName("SketchLine_34")
 SketchConstraintDistance_8 = Sketch_5.setDistance(SketchLine_31.startPoint(), SketchLine_33.result(), 2)
-SketchLine_34 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_7&Extrusion_2_1/To_Face_1"))
+SketchLine_34 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_1"))
 SketchLine_34.setName("SketchLine_35")
 SketchLine_34.result().setName("SketchLine_35")
 SketchConstraintDistance_9 = Sketch_5.setDistance(SketchLine_29.startPoint(), SketchLine_34.result(), 2)
-SketchLine_35 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/To_Face_1"))
+SketchLine_35 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_5&Extrusion_2_1/To_Face_1"))
 SketchLine_35.setName("SketchLine_36")
 SketchLine_35.result().setName("SketchLine_36")
 SketchConstraintDistance_10 = Sketch_5.setDistance(SketchLine_28.startPoint(), SketchLine_35.result(), 2)
@@ -430,29 +430,29 @@ SketchConstraintLength_3 = Sketch_6.setLength(SketchLine_38.result(), 42)
 SketchConstraintLength_4 = Sketch_6.setLength(SketchLine_43.result(), 20)
 SketchConstraintLength_5 = Sketch_6.setLength(SketchLine_44.result(), 15)
 SketchConstraintLength_6 = Sketch_6.setLength(SketchLine_39.result(), 42)
-SketchProjection_3 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"))
+SketchProjection_3 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"))
 SketchLine_46 = SketchProjection_3.createdFeature()
 SketchLine_46.setName("SketchLine_47")
 SketchLine_46.result().setName("SketchLine_47")
-SketchProjection_4 = Sketch_6.addProjection(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&Extrusion_1_1/Generated_Face_3"))
+SketchProjection_4 = Sketch_6.addProjection(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&Extrusion_1_1/Generated_Face_5"))
 SketchLine_47 = SketchProjection_4.createdFeature()
 SketchLine_47.setName("SketchLine_48")
 SketchLine_47.result().setName("SketchLine_48")
-SketchProjection_5 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"))
+SketchProjection_5 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"))
 SketchLine_48 = SketchProjection_5.createdFeature()
 SketchLine_48.setName("SketchLine_49")
 SketchLine_48.result().setName("SketchLine_49")
 SketchConstraintDistance_13 = Sketch_6.setDistance(SketchLine_38.endPoint(), SketchLine_46.result(), 2)
 SketchConstraintDistance_14 = Sketch_6.setDistance(SketchLine_38.startPoint(), SketchLine_47.result(), 17)
 model.do()
-ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_6")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), -2, model.selection(), -2, [model.selection("SOLID", "ExtrusionCut_5_2")])
+ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_6")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_5"), -2, model.selection(), -2, [model.selection("SOLID", "ExtrusionCut_5_2")])
 ExtrusionCut_6.result().setName("ExtrusionCut_6_1")
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_7"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"))
 SketchLine_49 = Sketch_7.addLine(0, -22.99999999998656, -76, -22.99999999998655)
 SketchLine_49.setName("SketchLine_50")
 SketchLine_49.result().setName("SketchLine_50")
 SketchLine_49.setAuxiliary(True)
-SketchLine_50 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_3_1/Modfied_4"))
+SketchLine_50 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_3_1/Modfied_4"))
 SketchLine_50.setName("SketchLine_51")
 SketchLine_50.result().setName("SketchLine_51")
 SketchConstraintCoincidence_74 = Sketch_7.setCoincident(SketchLine_49.startPoint(), SketchLine_50.result())
@@ -465,12 +465,12 @@ SketchLine_51 = Sketch_7.addLine(-38, -40.99999999998656, -38, -4.99999999998656
 SketchLine_51.setName("SketchLine_52")
 SketchLine_51.result().setName("SketchLine_52")
 SketchLine_51.setAuxiliary(True)
-SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_4_2/Modfied_4"))
+SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_4_2/Modfied_4"))
 SketchLine_52.setName("SketchLine_53")
 SketchLine_52.result().setName("SketchLine_53")
 SketchConstraintCoincidence_76 = Sketch_7.setCoincident(SketchLine_51.startPoint(), SketchLine_52.result())
 SketchConstraintCoincidence_76.setName("SketchConstraintCoincidence_77")
-SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7"))
+SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_1"))
 SketchLine_53.setName("SketchLine_54")
 SketchLine_53.result().setName("SketchLine_54")
 SketchConstraintCoincidence_77 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchLine_53.result())
@@ -492,7 +492,7 @@ SketchProjection_6 = Sketch_8.addProjection(model.selection("EDGE", "Sketch_2/Ed
 SketchLine_54 = SketchProjection_6.createdFeature()
 SketchLine_54.setName("SketchLine_55")
 SketchLine_54.result().setName("SketchLine_55")
-SketchProjection_7 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_3_1/Modfied_4"))
+SketchProjection_7 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_3_1/Modfied_4"))
 SketchLine_55 = SketchProjection_7.createdFeature()
 SketchLine_55.setName("SketchLine_56")
 SketchLine_55.result().setName("SketchLine_56")
@@ -517,11 +517,11 @@ SketchConstraintMiddle_23 = Sketch_8.setMiddlePoint(SketchLine_56.result(), Sket
 SketchConstraintCoincidence_83 = Sketch_8.setCoincident(SketchLine_57.result(), SketchPoint_5.coordinates())
 SketchConstraintCoincidence_83.setName("SketchConstraintCoincidence_84")
 SketchConstraintPerpendicular_1 = Sketch_8.setPerpendicular(SketchLine_57.result(), SketchLine_56.result())
-SketchProjection_8 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_4_2/Modfied_4"))
+SketchProjection_8 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_4_2/Modfied_4"))
 SketchLine_58 = SketchProjection_8.createdFeature()
 SketchLine_58.setName("SketchLine_59")
 SketchLine_58.result().setName("SketchLine_59")
-SketchProjection_9 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_1"))
+SketchProjection_9 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7"))
 SketchLine_59 = SketchProjection_9.createdFeature()
 SketchLine_59.setName("SketchLine_60")
 SketchLine_59.result().setName("SketchLine_60")
index 7af290633ca584f0a6b72d0f458d2553a4177c17..969bfacd3aa66644f548a112c670f865715b94d6 100644 (file)
@@ -149,11 +149,11 @@ SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_1.result(), SketchA
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_10.result(), "d1*coeff")
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchArc_1_2f-SketchLine_3f-SketchArc_2_2r-SketchLine_4f-SketchArc_3_2r-SketchLine_5f-SketchArc_4_2f-SketchLine_6f-SketchLine_7r-SketchLine_8r-SketchArc_5_2r-SketchLine_9r-SketchArc_6_2f-SketchLine_10r-SketchArc_7_2f-SketchLine_11r-SketchArc_8_2r-SketchLine_12r-SketchLine_13r")], model.selection(), "epaisseur_plat*coeff", 0)
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_19"), "d2*coeff", True)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), "d2*coeff", True)
 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
-SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_14&Extrusion_1_1/Generated_Face_13"))
+SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), False)
 SketchLine_14 = SketchProjection_1.createdFeature()
-SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_12&Extrusion_1_1/To_Face_1"))
+SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/To_Face_1"), False)
 SketchLine_15 = SketchProjection_2.createdFeature()
 SketchLine_16 = Sketch_2.addLine(-24.99999999999999, -35.00000000000001, -31.24999999999999, -35.00000000000001)
 SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_14).endPoint(), SketchLine_16.startPoint())
@@ -215,9 +215,9 @@ SketchConstraintDistance_13 = Sketch_2.setDistance(SketchArc_10.startPoint(), Sk
 #SketchConstraintDistance_14 = Sketch_2.setDistance(SketchLine_17.startPoint(), SketchLine_23.result(), "(e3-epaisseur_plat)*coeff")
 model.do()
 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_16r-SketchArc_9_2f-SketchLine_17r-SketchArc_10_2f-SketchLine_18r-SketchLine_19r-SketchLine_20r-SketchArc_11_2r-SketchLine_21r-SketchArc_12_2r-SketchLine_22r-SketchLine_23f")], model.selection(), "d6*coeff", 0)
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_2_1/Generated_Face_9"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_2_1/Generated_Face_3"))
 SketchLine_24 = Sketch_3.addLine(46.25, 22.91561885925604, 51.3, 20.00000000000001)
-SketchLine_25 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_9&Extrusion_2_1/To_Face_1"))
+SketchLine_25 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/To_Face_1"))
 #SketchConstraintCoincidence_41 = Sketch_3.setCoincident(SketchLine_24.startPoint(), SketchLine_25.result())
 SketchLine_26 = Sketch_3.addLine(51.3, 20.00000000000001, 62.50000000000001, 20.00000000000001)
 SketchConstraintCoincidence_42 = Sketch_3.setCoincident(SketchLine_24.endPoint(), SketchLine_26.startPoint())
@@ -245,9 +245,9 @@ SketchConstraintVertical_12 = Sketch_3.setVertical(SketchLine_27.result())
 SketchConstraintVertical_13 = Sketch_3.setVertical(SketchLine_33.result())
 SketchConstraintVertical_14 = Sketch_3.setVertical(SketchLine_31.result())
 SketchConstraintAngle_1 = Sketch_3.setAngleComplementary(SketchLine_26.result(), SketchLine_24.result(), "angle")
-SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_8&Extrusion_2_1/Generated_Face_7"))
+SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_5&Extrusion_2_1/Generated_Face_4"))
 SketchLine_34 = SketchProjection_3.createdFeature()
-SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_11&Extrusion_2_1/Generated_Face_10"))
+SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_2&Extrusion_2_1/Generated_Face_1"))
 SketchLine_35 = SketchProjection_4.createdFeature()
 SketchConstraintCoincidence_51 = Sketch_3.setCoincident(SketchLine_28.endPoint(), SketchLine_34.result())
 SketchConstraintDistance_15 = Sketch_3.setDistance(SketchLine_31.result(), SketchLine_33.endPoint(), "(d6-d5)*coeff")
@@ -263,13 +263,13 @@ ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Ske
 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_30r-SketchLine_31r-SketchLine_32r-SketchLine_33r")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face_1"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
 ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
-Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_19"), "d3*coeff", True)
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), "d3*coeff", True)
 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
-SketchProjection_5 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_16&Extrusion_1_1/To_Face_1"))
+SketchProjection_5 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1"))
 SketchLine_36 = SketchProjection_5.createdFeature()
 SketchProjection_6 = Sketch_4.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_8&ExtrusionCut_2_1/Modfied_9"))
 SketchLine_37 = SketchProjection_6.createdFeature()
-SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_15&Extrusion_1_1/Generated_Face_14"))
+SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"))
 SketchLine_38 = SketchProjection_7.createdFeature()
 SketchLine_39 = Sketch_4.addLine(-25, -35.00000000000001, -31.24999999999999, -35.00000000000001)
 SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_37).startPoint(), SketchLine_39.startPoint())
@@ -305,23 +305,23 @@ SketchConstraintDistance_19 = Sketch_4.setDistance(SketchLine_41.endPoint(), Ske
 SketchConstraintDistance_20 = Sketch_4.setDistance(SketchLine_41.startPoint(), SketchLine_39.result(), "h2")
 model.do()
 Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_39r-SketchArc_13_2f-SketchLine_40r-SketchLine_41r-SketchLine_42r-SketchArc_14_2r-SketchLine_43r-SketchLine_44f")], model.selection(), 0, "e1*coeff")
-Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_6"))
+Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"))
 SketchCircle_1 = Sketch_5.addCircle(70, 17.5, 3.125)
-SketchLine_45 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_5"))
+SketchLine_45 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_1_1/Modfied_4"))
 SketchConstraintDistance_21 = Sketch_5.setDistance(SketchCircle_1.center(), SketchLine_45.result(), "d9*coeff")
-SketchProjection_8 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchProjection_8 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_12&Extrusion_1_1/Generated_Face_11"))
 SketchLine_46 = SketchProjection_8.createdFeature()
-SketchProjection_9 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_19"))
+SketchProjection_9 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_1"))
 SketchLine_47 = SketchProjection_9.createdFeature()
 SketchConstraintDistance_22 = Sketch_5.setDistance(SketchCircle_1.center(), SketchLine_47.result(), "d1*coeff")
 SketchConstraintRadius_7 = Sketch_5.setRadius(SketchCircle_1.results()[1], "r_trou")
 model.do()
-ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
+ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_6"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
 ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_14"))
+Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_6"))
 SketchCircle_2 = Sketch_6.addCircle(70, -17.5, 5)
-SketchLine_48 = Sketch_6.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_14&Extrusion_1_1/To_Face_1"))
-SketchProjection_10 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_19&Extrusion_1_1/Generated_Face_18"))
+SketchLine_48 = Sketch_6.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"))
+SketchProjection_10 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"))
 SketchLine_49 = SketchProjection_10.createdFeature()
 SketchConstraintDistance_23 = Sketch_6.setDistance(SketchCircle_2.center(), SketchLine_49.result(), "d1*coeff")
 SketchConstraintDistance_23.setName("SketchConstraintDistance_24")
@@ -330,15 +330,15 @@ SketchLine_50 = Sketch_6.addLine(model.selection("EDGE", "Sketch_1/Edge-SketchLi
 SketchConstraintDistance_24 = Sketch_6.setDistance(SketchCircle_2.center(), SketchLine_50.result(), "d_trou")
 SketchConstraintDistance_24.setName("SketchConstraintDistance_25")
 model.do()
-ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_2_2f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
+ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_2_2f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_16"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
 ExtrusionCut_4.result().setName("ExtrusionCut_4_1")
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_12"))
 SketchLine_51 = Sketch_7.addLine(110, 21.46600893000899, 110, 7.22841614740048)
 SketchLine_51.setAuxiliary(True)
-SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_12&Extrusion_1_1/Generated_Face_11"))
 SketchConstraintCoincidence_65 = Sketch_7.setCoincident(SketchLine_51.startPoint(), SketchLine_52.result())
 SketchConstraintCoincidence_66 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchLine_52.result())
-SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/From_Face_1&Extrusion_1_1/Generated_Face_8"))
+SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/From_Face_1&Extrusion_1_1/Generated_Face_12"))
 SketchArc_15 = Sketch_7.addArc(102.5, 7.22841614740048, 110, 7.22841614740048, 104.5, 0, True)
 SketchConstraintCoincidence_67 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchArc_15.startPoint())
 SketchConstraintTangent_29 = Sketch_7.setTangent(SketchLine_51.result(), SketchArc_15.results()[1])
@@ -355,11 +355,11 @@ SketchConstraintLength_5 = Sketch_7.setLength(SketchLine_54.result(), "5.5*coeff
 SketchLine_56 = Sketch_7.addLine(110, 12.5, 0, 12.5)
 SketchLine_56.setAuxiliary(True)
 SketchConstraintCoincidence_73 = Sketch_7.setCoincident(SketchLine_56.startPoint(), SketchLine_52.result())
-SketchLine_57 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_19"))
+SketchLine_57 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_1"))
 SketchConstraintCoincidence_74 = Sketch_7.setCoincident(SketchLine_56.endPoint(), SketchLine_57.result())
 SketchConstraintMiddle_1 = Sketch_7.setMiddlePoint(SketchLine_56.endPoint(), SketchLine_57.result())
 SketchConstraintMiddle_2 = Sketch_7.setMiddlePoint(SketchLine_56.startPoint(), SketchLine_52.result())
-SketchProjection_11 = Sketch_7.addProjection(model.selection("EDGE", "Extrusion_1_1/To_Face_1&ExtrusionCut_4_1/Modfied_1"))
+SketchProjection_11 = Sketch_7.addProjection(model.selection("EDGE", "Extrusion_1_1/To_Face_1&ExtrusionCut_4_1/Modfied_2"))
 SketchLine_58 = SketchProjection_11.createdFeature()
 SketchLine_59 = Sketch_7.addLine(55.00000000000002, 0, 55.00000000000002, 25)
 SketchLine_59.setAuxiliary(True)
index 871763ffc462cff2e9e3bc7a9c24405060b9d6fd..f4159d38f069bd1a5ea1572e64cc53f86ceeef3a 100644 (file)
@@ -354,7 +354,7 @@ ExtrusionCut_4.result().setName("ExtrusionCut_4_1")
 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), "22.5*coeff", False)
 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), "45*coeff", True)
 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
-SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"))
+SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_1"))
 SketchLine_18 = SketchProjection_3.createdFeature()
 SketchLine_18.setName("SketchLine_4")
 SketchLine_18.result().setName("SketchLine_4")
@@ -435,7 +435,7 @@ SketchConstraintDistance_13.setName("SketchConstraintDistance_11")
 SketchConstraintDistance_14 = Sketch_3.setDistance(SketchLine_23.result(), SketchLine_25.startPoint(), "2.5*coeff")
 SketchConstraintDistance_14.setName("SketchConstraintDistance_12")
 model.do()
-Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_9r-SketchLine_12r-SketchLine_14r-SketchLine_26r-SketchLine_27r-SketchLine_28r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), 0, model.selection(), 0)
+Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_9r-SketchLine_12r-SketchLine_14r-SketchLine_26r-SketchLine_27r-SketchLine_28r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), 0, model.selection(), 0)
 Boolean_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Extrusion_3_1")], [model.selection("SOLID", "ExtrusionCut_4_1")])
 Boolean_1.result().setName("Boolean_1_1")
 ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "Boolean_1_1_1")])
@@ -526,7 +526,7 @@ SketchConstraintDistance_16.setName("SketchConstraintDistance_10")
 SketchConstraintLength_10 = Sketch_4.setLength(SketchLine_36.result(), 12.975642079145)
 SketchConstraintLength_10.setName("SketchConstraintLength_7")
 model.do()
-Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_19f-SketchLine_20f-SketchLine_24f-SketchLine_21f-SketchLine_22f-SketchLine_23f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), 0, model.selection(), 0)
+Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_19f-SketchLine_20f-SketchLine_24f-SketchLine_21f-SketchLine_22f-SketchLine_23f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), 0, model.selection(), 0)
 Boolean_2 = model.addSmash(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_6_1_1"), model.selection("SOLID", "Extrusion_4_1")], [model.selection("SOLID", "ExtrusionCut_6_1_2")])
 Boolean_2.result().setName("Boolean_2_1")
 ExtrusionCut_7 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Boolean_2_1_1")])
@@ -635,12 +635,12 @@ SketchConstraintRadius_13 = Sketch_6.setRadius(SketchArc_20.results()[1], "r1*co
 SketchConstraintRadius_13.setName("SketchConstraintRadius_10")
 model.do()
 Extrusion_6 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchLine_33r-SketchArc_6_2r-SketchLine_36r-SketchLine_37f")], model.selection(), "77*coeff-h_p*coeff", 0)
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_6_1/Generated_Face_3"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_6_1/Generated_Face_1"))
 SketchLine_46 = Sketch_7.addLine(37, -8.881784197001252e-16, -22, 1.665334536937735e-15)
 SketchLine_46.setName("SketchLine_38")
 SketchLine_46.result().setName("SketchLine_38")
 SketchLine_46.setAuxiliary(True)
-SketchLine_47 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_3&Extrusion_6_1/To_Face_1"))
+SketchLine_47 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_1&Extrusion_6_1/To_Face_1"))
 SketchLine_47.setName("SketchLine_39")
 SketchLine_47.result().setName("SketchLine_39")
 SketchConstraintCoincidence_69 = Sketch_7.setCoincident(SketchLine_46.startPoint(), SketchLine_47.result())
@@ -677,19 +677,19 @@ model.do()
 ExtrusionCut_9 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_7/Wire-SketchCircle_10_2f")], model.selection(), 0, "10*coeff", [model.selection("SOLID", "Extrusion_6_1")])
 ExtrusionCut_9.result().setName("ExtrusionCut_9_1")
 ExtrusionCut_10 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchArc_7_2r-SketchArc_10_2f-SketchLine_44r-SketchArc_12_2r-SketchArc_13_2r-SketchLine_48r-SketchLine_43f-SketchArc_14_2f"), model.selection("FACE", "Sketch_1/Face-SketchCircle_11_2f"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_50f-SketchArc_15_2f-SketchArc_16_2r-SketchLine_51r-SketchArc_17_2r-SketchLine_52f"), model.selection("FACE", "Sketch_1/Face-SketchLine_53f-SketchArc_18_2r-SketchLine_54f-SketchArc_19_2r-SketchArc_20_2f-SketchLine_55r-SketchArc_21_2f-SketchArc_22_2r"), model.selection("FACE", "Sketch_1/Face-SketchArc_8_2r-SketchArc_9_2f-SketchLine_42r-SketchLine_45f-SketchLine_46r-SketchArc_11_2r")], model.selection(), model.selection("FACE", "ExtrusionCut_3_2/Modfied_1"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_8_1_2")])
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_9_1/Modfied_2"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_9_1/Modfied_1"))
 SketchLine_50 = Sketch_8.addLine(37, 14.80042035331162, 37, -14)
 SketchLine_50.setName("SketchLine_56")
 SketchLine_50.result().setName("SketchLine_56")
 SketchLine_50.setAuxiliary(True)
-SketchLine_51 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_9_1/Modfied_2&Extrusion_6_1/To_Face_1"))
+SketchLine_51 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_9_1/Modfied_1&Extrusion_6_1/To_Face_1"))
 SketchLine_51.setName("SketchLine_57")
 SketchLine_51.result().setName("SketchLine_57")
 SketchConstraintCoincidence_73 = Sketch_8.setCoincident(SketchLine_50.startPoint(), SketchLine_51.result())
 SketchConstraintCoincidence_73.setName("SketchConstraintCoincidence_81")
 SketchConstraintCoincidence_74 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchLine_51.result())
 SketchConstraintCoincidence_74.setName("SketchConstraintCoincidence_82")
-SketchLine_52 = Sketch_8.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_4&ExtrusionCut_9_1/Modfied_2"))
+SketchLine_52 = Sketch_8.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_4&ExtrusionCut_9_1/Modfied_1"))
 SketchLine_52.setName("SketchLine_58")
 SketchLine_52.result().setName("SketchLine_58")
 SketchArc_21 = Sketch_8.addArc(34, -14, 37, -14, 34.00000001126211, -17, True)
@@ -733,19 +733,19 @@ SketchArc_22.result().setName("SketchArc_24")
 SketchArc_22.results()[1].setName("SketchArc_24_2")
 model.do()
 ExtrusionCut_11 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchArc_23_2r-SketchLine_59f-SketchLine_60r"), model.selection("WIRE", "Sketch_8/Wire-SketchArc_24_2r-SketchLine_62f-SketchLine_63r")], model.selection(), 0, "100*coeff", [model.selection("SOLID", "ExtrusionCut_9_1")])
-Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_5_1/Generated_Face_3"))
+Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_5_1/Generated_Face_1"))
 SketchLine_58 = Sketch_9.addLine(-32, -19, -32, -3.575047476349699)
 SketchLine_58.setName("SketchLine_64")
 SketchLine_58.result().setName("SketchLine_64")
 SketchLine_58.setAuxiliary(True)
-SketchLine_59 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_3&Extrusion_5_1/Generated_Face_2"))
+SketchLine_59 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_1&Extrusion_5_1/Generated_Face_2"))
 SketchLine_59.setName("SketchLine_65")
 SketchLine_59.result().setName("SketchLine_65")
 SketchConstraintCoincidence_81 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchLine_59.result())
 SketchConstraintCoincidence_81.setName("SketchConstraintCoincidence_89")
 SketchConstraintCoincidence_82 = Sketch_9.setCoincident(SketchLine_58.endPoint(), SketchLine_59.result())
 SketchConstraintCoincidence_82.setName("SketchConstraintCoincidence_90")
-SketchLine_60 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_3&Extrusion_5_1/From_Face_1"))
+SketchLine_60 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_1&Extrusion_5_1/From_Face_1"))
 SketchLine_60.setName("SketchLine_66")
 SketchLine_60.result().setName("SketchLine_66")
 SketchArc_23 = Sketch_9.addArc(-29, -19, -32, -19, -29.00002201340376, -22, False)