-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
//
// 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
+// 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>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef FEATURESPLUGIN_SYMMETRY_H_
#include <ModelAPI_Feature.h>
-#include <GeomAlgoAPI_Symmetry.h>
-#include <GeomAlgoAPI_MakeShapeList.h>
-
class GeomAPI_Trsf;
+class GeomAlgoAPI_MakeShapeList;
/** \class FeaturesPlugin_Symmetry
* \ingroup Plugins
return MY_KIND;
}
- /// Creates a new part document if needed.
+ /// Performs the algorithm and stores results it in the data structure.
FEATURESPLUGIN_EXPORT virtual void execute();
/// Request for initialization of data model of the feature: adding all attributes.
FeaturesPlugin_Symmetry();
private:
- /// Obtain list of source objects of the mirror
- bool collectSourceObjects(ListOfShape& theSourceShapes,
- std::list<std::shared_ptr<ModelAPI_Result>>& theSourceResults);
+ /// Calculate symmetry with respect to a point.
+ std::shared_ptr<GeomAPI_Trsf> symmetryByPoint();
- /// Perform symmetry with respect to a point.
- void performSymmetryByPoint();
+ /// Calculate symmetry with respect to an axis.
+ std::shared_ptr<GeomAPI_Trsf> symmetryByAxis();
- /// Perform symmetry with respect to an axis.
- void performSymmetryByAxis();
+ /// Calculate symmetry with respect to a plane.
+ std::shared_ptr<GeomAPI_Trsf> symmetryByPlane();
- /// Perform symmetry with respect to a plane.
- void performSymmetryByPlane();
+ /// Perform the transformation
+ void performSymmetry(std::shared_ptr<GeomAPI_Trsf> theTrsf);
/// Create new result on given shapes and the index of result
- void buildResult(std::shared_ptr<GeomAlgoAPI_Symmetry>& theSymmetryAlgo,
- std::shared_ptr<GeomAPI_Shape> theBaseShape,
- int theResultIndex);
+ void buildResult(const std::shared_ptr<GeomAlgoAPI_MakeShapeList>& theAlgo,
+ const std::list<std::shared_ptr<GeomAPI_Shape> >& theOriginalShapes,
+ std::shared_ptr<GeomAPI_Shape> theTargetShape,
+ int& theResultIndex, std::string &theTextureFile);
/// Create new result for the given part and transformation
void buildResult(std::shared_ptr<ModelAPI_ResultPart> theOriginal,