1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_Placement.h
5 // Author: Artem ZHIDKOV
7 #ifndef GeomAlgoAPI_Placement_H_
8 #define GeomAlgoAPI_Placement_H_
10 #include <GeomAlgoAPI.h>
11 #include <GeomAlgoAPI_MakeShape.h>
13 #include <GeomAPI_Shape.h>
14 #include <GeomAPI_Trsf.h>
16 /// \class GeomAlgoAPI_Placement
18 /// \brief Creates the copied object which sub-element is placed on the given element
19 class GeomAlgoAPI_Placement : public GeomAlgoAPI_MakeShape
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 against the destination plane
29 /// \param[in] theIsCentering indicates the planes should be centered
30 /// \param[in] theSimpleTransform makes just transformation of shape without changing of topology or geometry
31 GEOMALGOAPI_EXPORT GeomAlgoAPI_Placement(const std::shared_ptr<GeomAPI_Shape> theSourceSolid,
32 const std::shared_ptr<GeomAPI_Shape> theDestSolid,
33 const std::shared_ptr<GeomAPI_Shape> theSourceShape,
34 const std::shared_ptr<GeomAPI_Shape> theDestShape,
35 const bool theIsReverse = false,
36 const bool theIsCentering = false,
37 const bool theSimpleTransform = false);
39 /// Returns the simple transformation
40 GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_Trsf> transformation() const;
43 /// builds resulting shape
44 void build(const std::shared_ptr<GeomAPI_Shape>& theSourceSolid,
45 const std::shared_ptr<GeomAPI_Shape>& theDestSolid,
46 const std::shared_ptr<GeomAPI_Shape>& theSourceShape,
47 const std::shared_ptr<GeomAPI_Shape>& theDestShape,
48 const bool theIsReverse,
49 const bool theIsCentering,
50 const bool theSimpleTransform);
53 std::shared_ptr<GeomAPI_Trsf> myTrsf; ///< transformation of the shape in case theSimpleTransform