Salome HOME
updated copyright message
[modules/shaper.git] / src / SketchAPI / SketchAPI_Sketch.cpp
index c191b45a2907b9f6301c7293e5630f16d91878dd..823897f5a6e2213e98c2a0e07d3fa8fd79e7f0ec 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2021  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  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
@@ -930,11 +930,12 @@ std::shared_ptr<SketchAPI_Mirror> SketchAPI_Sketch::addMirror(
 std::shared_ptr<SketchAPI_Offset> SketchAPI_Sketch::addOffset(
     const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
     const ModelHighAPI_Double & theValue,
-    const bool theReversed)
+    const bool theReversed,
+    const std::string & theJointType)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Offset::ID());
-  return OffsetPtr(new SketchAPI_Offset(aFeature, theObjects, theValue, theReversed));
+  return OffsetPtr(new SketchAPI_Offset(aFeature, theObjects, theValue, theReversed, theJointType));
 }
 
 //--------------------------------------------------------------------------------------
@@ -1631,34 +1632,6 @@ void SketchAPI_Sketch::dump(ModelHighAPI_Dumper& theDumper) const
     std::list<std::list<ResultPtr> > aFaces;
     edgesOfSketchFaces(aCompFeat, aFaces);
 
-    /// remove faces that must not be dumped
-    std::vector< std::list<std::list<ResultPtr>>::iterator> aFacesToRemove;
-    for(auto itFaces = aFaces.begin(); itFaces != aFaces.end(); ++itFaces)
-    {
-      auto & facesGroup = *itFaces;
-      std::vector<std::list<ResultPtr>::iterator> subFacestoRemove;
-      for(auto itGroup = facesGroup.begin(); itGroup != facesGroup.end(); ++itGroup)
-      {
-        FeaturePtr aFeature = ModelAPI_Feature::feature(*itGroup);
-        if(theDumper.isDumped(aFeature)){
-          subFacestoRemove.push_back(itGroup);
-        }
-      }
-      for(auto itGroup :subFacestoRemove){
-        facesGroup.erase(itGroup);
-      }
-
-      if(!facesGroup.size()){
-        aFacesToRemove.push_back(itFaces);
-      }
-    }
-    for(auto itFaces :aFacesToRemove){
-      aFaces.erase(itFaces);
-    }
-
-    if(!aFaces.size())
-      return;
-
     const std::string& aSketchName = theDumper.name(aBase);
     std::string aMethodName(".changeFacesOrder");
     std::string aSpaceShift(aSketchName.size() + aMethodName.size(), ' ');