0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / StepToTopoDS / StepToTopoDS_MakeTransformed.hxx
CommitLineData
42cf5bc1 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>
27class StepGeom_Axis2Placement3d;
28class StepGeom_CartesianTransformationOperator3d;
29class gp_Trsf;
30class TopoDS_Shape;
31class StepRepr_MappedItem;
32class Transfer_TransientProcess;
33
34
35//! Produces instances by Transformation of a basic item
36class StepToTopoDS_MakeTransformed : public StepToTopoDS_Root
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
42
43 Standard_EXPORT StepToTopoDS_MakeTransformed();
44
45 //! Computes a transformation to pass from an Origin placement to
46 //! a Target placement. Returns True when done
47 //! If not done, the transformation will by Identity
48 Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_Axis2Placement3d)& Origin, const Handle(StepGeom_Axis2Placement3d)& Target);
49
50 //! Computes a transformation defined by an operator 3D
51 Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator);
52
53 //! Returns the computed transformation (Identity if not yet or
54 //! if failed)
55 Standard_EXPORT const gp_Trsf& Transformation() const;
56
57 //! Applies the computed transformation to a shape
58 //! Returns False if the transformation is Identity
59 Standard_EXPORT Standard_Boolean Transform (TopoDS_Shape& shape) const;
60
61 //! Translates a MappedItem. More precisely
62 //! A MappedItem has a MappingSource and a MappingTarget
63 //! MappingSource has a MappedRepresentation and a MappingOrigin
64 //! MappedRepresentation is the basic item to be instanced
65 //! MappingOrigin is the starting placement
66 //! MappingTarget is the final placement
67 //!
68 //! Hence, the transformation from MappingOrigin and MappingTarget
69 //! is computed, the MappedRepr. is converted to a Shape, then
70 //! transformed as an instance of this Shape
71 Standard_EXPORT TopoDS_Shape TranslateMappedItem (const Handle(StepRepr_MappedItem)& mapit, const Handle(Transfer_TransientProcess)& TP);
72
73
74
75
76protected:
77
78
79
80
81
82private:
83
84
85
86 gp_Trsf theTrsf;
87
88
89};
90
91
92
93
94
95
96
97#endif // _StepToTopoDS_MakeTransformed_HeaderFile