Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Placement.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Placement.h
4 // Created:     2 Dec 2014
5 // Author:      Artem ZHIDKOV
6
7 #ifndef GeomAlgoAPI_Placement_H_
8 #define GeomAlgoAPI_Placement_H_
9
10 #include <GeomAlgoAPI.h>
11 #include <GeomAlgoAPI_MakeShape.h>
12
13 #include <GeomAPI_Shape.h>
14 #include <GeomAPI_Trsf.h>
15
16 /// \class GeomAlgoAPI_Placement
17 /// \ingroup DataAlgo
18 /// \brief Creates the copied object which sub-element is placed on the given element
19 class GeomAlgoAPI_Placement : public GeomAlgoAPI_MakeShape
20 {
21 public:
22   /// \brief Creates an object which is obtained from current object by transformation calculated
23   ///        as a movement of the source object to be coincident with the destination object
24   /// \param[in] theSourceSolid  a shape to be moved
25   /// \param[in] theDestSolid    invariant shape
26   /// \param[in] theSourceShape  a shape on the solid to be made coincident with destination object
27   /// \param[in] theDestShape    destination object
28   /// \param[in] theIsReverse    indicates that the solid materials should be on the same side 
29   ///                            against the destination plane
30   /// \param[in] theIsCentering  indicates the planes should be centered
31   /// \param[in] theSimpleTransform makes just transformation of shape 
32   ///                               without changing of topology or geometry
33   GEOMALGOAPI_EXPORT GeomAlgoAPI_Placement(const std::shared_ptr<GeomAPI_Shape> theSourceSolid,
34                                            const std::shared_ptr<GeomAPI_Shape> theDestSolid,
35                                            const std::shared_ptr<GeomAPI_Shape> theSourceShape,
36                                            const std::shared_ptr<GeomAPI_Shape> theDestShape,
37                                            const bool theIsReverse = false,
38                                            const bool theIsCentering = false,
39                                            const bool theSimpleTransform = false);
40
41   /// Returns the simple transformation
42   GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_Trsf> transformation() const;
43
44 private:
45   /// builds resulting shape
46   void build(const std::shared_ptr<GeomAPI_Shape>& theSourceSolid,
47              const std::shared_ptr<GeomAPI_Shape>& theDestSolid,
48              const std::shared_ptr<GeomAPI_Shape>& theSourceShape,
49              const std::shared_ptr<GeomAPI_Shape>& theDestShape,
50              const bool theIsReverse,
51              const bool theIsCentering,
52              const bool theSimpleTransform);
53
54 private:
55   std::shared_ptr<GeomAPI_Trsf> myTrsf; ///< transformation of the shape in case theSimpleTransform
56 };
57
58 #endif