0025748: Parallel version of progress indicator
[occt.git] / src / StepToTopoDS / StepToTopoDS_MakeTransformed.hxx
1 // Created on: 1997-04-28
2 // Created by: Christian CAILLET
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _StepToTopoDS_MakeTransformed_HeaderFile
18 #define _StepToTopoDS_MakeTransformed_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <gp_Trsf.hxx>
25 #include <StepToTopoDS_Root.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Message_ProgressRange.hxx>
28
29 class StepGeom_Axis2Placement3d;
30 class StepGeom_CartesianTransformationOperator3d;
31 class gp_Trsf;
32 class TopoDS_Shape;
33 class StepRepr_MappedItem;
34 class Transfer_TransientProcess;
35
36 //! Produces instances by Transformation of a basic item
37 class StepToTopoDS_MakeTransformed  : public StepToTopoDS_Root
38 {
39 public:
40
41   DEFINE_STANDARD_ALLOC
42
43   
44   Standard_EXPORT StepToTopoDS_MakeTransformed();
45   
46   //! Computes a transformation to pass from an Origin placement to
47   //! a Target placement. Returns True when done
48   //! If not done, the transformation will by Identity
49   Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_Axis2Placement3d)& Origin, const Handle(StepGeom_Axis2Placement3d)& Target);
50   
51   //! Computes a transformation defined by an operator 3D
52   Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator);
53   
54   //! Returns the computed transformation (Identity if not yet or
55   //! if failed)
56   Standard_EXPORT const gp_Trsf& Transformation() const;
57   
58   //! Applies the computed transformation to a shape
59   //! Returns False if the transformation is Identity
60   Standard_EXPORT Standard_Boolean Transform (TopoDS_Shape& shape) const;
61   
62   //! Translates a MappedItem. More precisely
63   //! A MappedItem has a MappingSource and a MappingTarget
64   //! MappingSource has a MappedRepresentation and a MappingOrigin
65   //! MappedRepresentation is the basic item to be instanced
66   //! MappingOrigin is the starting placement
67   //! MappingTarget is the final placement
68   //!
69   //! Hence, the transformation from MappingOrigin and MappingTarget
70   //! is computed, the MappedRepr. is converted to a Shape, then
71   //! transformed as an instance of this Shape
72   Standard_EXPORT TopoDS_Shape TranslateMappedItem (const Handle(StepRepr_MappedItem)& mapit,
73                                                     const Handle(Transfer_TransientProcess)& TP,
74                                                     const Message_ProgressRange& theProgress = Message_ProgressRange());
75
76
77
78
79 protected:
80
81
82
83
84
85 private:
86
87
88
89   gp_Trsf theTrsf;
90
91
92 };
93
94
95
96
97
98
99
100 #endif // _StepToTopoDS_MakeTransformed_HeaderFile