X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Sketch.cpp;h=34503d972d49f04a3484a5eb3b588b722169c504;hb=9afbc5fb015e5ff91689e1ef3f4da286347fbda5;hp=c191b45a2907b9f6301c7293e5630f16d91878dd;hpb=1fd15bed1c62f994a3438bc4a12f44d0361f98c9;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index c191b45a2..34503d972 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2021 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // 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,13 @@ std::shared_ptr SketchAPI_Sketch::addMirror( std::shared_ptr SketchAPI_Sketch::addOffset( const std::list > & theObjects, const ModelHighAPI_Double & theValue, - const bool theReversed) + const bool theReversed, + const std::string & theJointType, + const bool theApprox) { std::shared_ptr 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, theApprox)); } //-------------------------------------------------------------------------------------- @@ -1631,34 +1633,6 @@ void SketchAPI_Sketch::dump(ModelHighAPI_Dumper& theDumper) const std::list > aFaces; edgesOfSketchFaces(aCompFeat, aFaces); - /// remove faces that must not be dumped - std::vector< std::list>::iterator> aFacesToRemove; - for(auto itFaces = aFaces.begin(); itFaces != aFaces.end(); ++itFaces) - { - auto & facesGroup = *itFaces; - std::vector::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(), ' ');