1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_Transform.h
4 // Created: 29 July 2015
5 // Author: Dmitry Bobylev
7 #ifndef GeomAlgoAPI_Transform_H_
8 #define GeomAlgoAPI_Transform_H_
10 #include <GeomAlgoAPI.h>
11 #include <GeomAlgoAPI_MakeShape.h>
12 #include <GeomAPI_DataMapOfShapeShape.h>
13 #include <GeomAPI_Shape.h>
14 #include <GeomAPI_Trsf.h>
16 /** \class GeomAlgoAPI_Transform
18 * \brief Creates a copy of the object by transformating it.
20 class GeomAlgoAPI_Transform : public GeomAPI_Interface
23 /** \brief Creates an object which is obtained from current object by transformating it.
24 * \param[in] theSourceShape a shape to be transformed.
25 * \param[in] theTrsf transformation.
27 GEOMALGOAPI_EXPORT GeomAlgoAPI_Transform(std::shared_ptr<GeomAPI_Shape> theSourceShape,
28 std::shared_ptr<GeomAPI_Trsf> theTrsf);
30 /// \return true if algorithm succeed.
31 GEOMALGOAPI_EXPORT const bool isDone() const
34 /// \return true if resulting shape is valid.
35 GEOMALGOAPI_EXPORT const bool isValid() const;
37 /// \return true if resulting shape has volume.
38 GEOMALGOAPI_EXPORT const bool hasVolume() const;
40 /// \return result of the transformation algorithm.
41 GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& shape() const;
43 /// \return map of sub-shapes of the result. To be used for History keeping.
44 GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_DataMapOfShapeShape> mapOfShapes() const;
46 /// \return interface for for History processing.
47 GEOMALGOAPI_EXPORT std::shared_ptr<GeomAlgoAPI_MakeShape> makeShape() const;
49 /// \return the transformation.
50 GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_Trsf> transformation() const;
53 /// Builds resulting shape.
54 void build(std::shared_ptr<GeomAPI_Shape> theSourceShape,
55 std::shared_ptr<GeomAPI_Trsf> theTrsf);
60 std::shared_ptr<GeomAPI_Trsf> myTrsf;
61 std::shared_ptr<GeomAPI_Shape> myShape;
62 std::shared_ptr<GeomAPI_DataMapOfShapeShape> myMap;
63 std::shared_ptr<GeomAlgoAPI_MakeShape> myMkShape;