X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Offset.cpp;h=7088e97ac01440f8bf32e4a3dbd652d5614e3371;hb=fc72d43b677baa05ae7fd317346fd8b723b799ed;hp=392d07fe0d1b653b6cde1212f6b4896fb4061159;hpb=747178d21dce4fb034ff0e84c1280406ab64d566;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Offset.cpp b/src/SketchAPI/SketchAPI_Offset.cpp index 392d07fe0..7088e97ac 100644 --- a/src/SketchAPI/SketchAPI_Offset.cpp +++ b/src/SketchAPI/SketchAPI_Offset.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 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 @@ -34,13 +34,15 @@ SketchAPI_Offset::SketchAPI_Offset (const std::shared_ptr & th SketchAPI_Offset::SketchAPI_Offset (const std::shared_ptr & theFeature, const std::list > & theObjects, const ModelHighAPI_Double & theOffsetValue, - bool theIsReversed) + const bool theIsReversed, + const std::string & theJointType) : ModelHighAPI_Interface(theFeature) { if (initialize()) { fillAttribute(theObjects, edgesList()); fillAttribute(theOffsetValue, value()); fillAttribute(theIsReversed, reversed()); + fillAttribute(theJointType, joint()); execute(); } @@ -72,6 +74,7 @@ void SketchAPI_Offset::dump (ModelHighAPI_Dumper& theDumper) const AttributeRefListPtr aOffsetObjects = edgesList(); AttributeDoublePtr aValue = value(); AttributeBooleanPtr aReversed = reversed(); + AttributeStringPtr aJoint = joint(); // Check all attributes are already dumped. If not, store the feature as postponed. if (!theDumper.isDumped(aOffsetObjects)) { @@ -80,7 +83,7 @@ void SketchAPI_Offset::dump (ModelHighAPI_Dumper& theDumper) const } theDumper << aBase << " = " << aSketchName << ".addOffset(" << aOffsetObjects << ", " - << aValue << ", " << aReversed << ")" << std::endl; + << aValue << ", " << aReversed << ", " << aJoint << ")" << std::endl; // Dump variables for a list of created features theDumper << "["; @@ -93,13 +96,12 @@ void SketchAPI_Offset::dump (ModelHighAPI_Dumper& theDumper) const } theDumper << "] = " << theDumper.name(aBase) << ".offset()" << std::endl; -//// // Set necessary "auxiliary" flag for created features -//// // (flag is set if it differs to anAux) -//// for (anIt = aList.begin(); anIt != aList.end(); ++anIt) { -//// FeaturePtr aFeature = (*anIt)->feature(); -//// bool aFeatAux = aFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value(); -//// if (aFeatAux != anAux->value()) -//// theDumper << theDumper.name((*anIt)->feature(), false) -//// << ".setAuxiliary(" << aFeatAux << ")" <feature(); + bool aFeatAux = aFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value(); + if (aFeatAux) + theDumper << theDumper.name((*anIt)->feature(), false) + << ".setAuxiliary(" << aFeatAux << ")" <