-// Copyright (C) 2014-2019 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
//==================================================================================================
void FeaturesAPI_RevolutionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
const ModelHighAPI_Double& theToOffset,
- const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Selection& theFromObject,
const ModelHighAPI_Double& theFromOffset)
{
fillAttribute(FeaturesPlugin_Revolution::CREATION_METHOD_BY_PLANES(), mycreationMethod);
theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
", " << anAttrFromObject << ", " << anAttrFromOffset;
+ } else {
+ // Through All
}
AttributeSelectionListPtr anAttrBoolObjects =
initialize();
}
+//==================================================================================================
+FeaturesAPI_RevolutionCut::FeaturesAPI_RevolutionCut(
+ const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theAxis,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_RevolutionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theAxis, myaxis);
+ fillAttribute(FeaturesPlugin_Revolution::CREATION_METHOD_THROUGH_ALL(), mycreationMethod);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
//==================================================================================================
FeaturesAPI_RevolutionCut::FeaturesAPI_RevolutionCut(
const std::shared_ptr<ModelAPI_Feature>& theFeature,
}
}
+//==================================================================================================
+RevolutionCutPtr addRevolutionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theAxis,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ thePart->addFeature(FeaturesPlugin_RevolutionCut::ID());
+ return RevolutionCutPtr(new FeaturesAPI_RevolutionCut(aFeature, theBaseObjects,
+ theAxis, theBooleanObjects));
+}
+
//==================================================================================================
RevolutionCutPtr addRevolutionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theBaseObjects,
initialize();
}
+//==================================================================================================
+FeaturesAPI_RevolutionFuse::FeaturesAPI_RevolutionFuse(
+ const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theAxis,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_RevolutionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theAxis, myaxis);
+ fillAttribute(FeaturesPlugin_Revolution::CREATION_METHOD_THROUGH_ALL(), mycreationMethod);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
//==================================================================================================
FeaturesAPI_RevolutionFuse::FeaturesAPI_RevolutionFuse(
const std::shared_ptr<ModelAPI_Feature>& theFeature,
}
}
+//==================================================================================================
+RevolutionFusePtr addRevolutionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theAxis,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ thePart->addFeature(FeaturesPlugin_RevolutionFuse::ID());
+ return RevolutionFusePtr(new FeaturesAPI_RevolutionFuse(aFeature, theBaseObjects,
+ theAxis, theBooleanObjects));
+}
+
//==================================================================================================
RevolutionFusePtr addRevolutionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theBaseObjects,