0032641: Coding - get rid of unused forward declarations [IGESAppli to LDOM]
[occt.git] / src / IGESGeom / IGESGeom_OffsetCurve.hxx
1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( TCD )
3 // Copyright (c) 1993-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 _IGESGeom_OffsetCurve_HeaderFile
18 #define _IGESGeom_OffsetCurve_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <Standard_Real.hxx>
25 #include <gp_XYZ.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Boolean.hxx>
28 class gp_Vec;
29
30
31 class IGESGeom_OffsetCurve;
32 DEFINE_STANDARD_HANDLE(IGESGeom_OffsetCurve, IGESData_IGESEntity)
33
34 //! defines IGESOffsetCurve, Type <130> Form <0>
35 //! in package IGESGeom
36 //! An OffsetCurve entity contains the data necessary to
37 //! determine the offset of a given curve C. This entity
38 //! points to the base curve to be offset and contains
39 //! offset distance and other pertinent information.
40 class IGESGeom_OffsetCurve : public IGESData_IGESEntity
41 {
42
43 public:
44
45   
46   Standard_EXPORT IGESGeom_OffsetCurve();
47   
48   //! This method is used to set the fields of the class
49   //! OffsetCurve
50   //! - aBaseCurve         : The curve entity to be offset
51   //! - anOffsetType       : Offset distance flag
52   //! 1 = Single value, uniform distance
53   //! 2 = Varying linearly
54   //! 3 = As a specified function
55   //! - aFunction          : Curve entity, one coordinate of which
56   //! describes offset as a function of its
57   //! parameter (0 unless OffsetType = 3)
58   //! - aFunctionCoord     : Particular coordinate of curve
59   //! describing offset as function of its
60   //! parameters. (used if OffsetType = 3)
61   //! - aTaperedOffsetType : Tapered offset type flag
62   //! 1 = Function of arc length
63   //! 2 = Function of parameter
64   //! (Only used if OffsetType = 2 or 3)
65   //! - offDistance1       : First offset distance
66   //! (Only used if OffsetType = 1 or 2)
67   //! - arcLength1         : Arc length or parameter value of
68   //! first offset distance
69   //! (Only used if OffsetType = 2)
70   //! - offDistance2       : Second offset distance
71   //! - arcLength2         : Arc length or parameter value of
72   //! second offset distance
73   //! (Only used if OffsetType = 2)
74   //! - aNormalVec         : Unit vector normal to plane containing
75   //! curve to be offset
76   //! - anOffsetParam      : Start parameter value of offset curve
77   //! - anotherOffsetParam : End parameter value of offset curve
78   Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aBaseCurve, const Standard_Integer anOffsetType, const Handle(IGESData_IGESEntity)& aFunction, const Standard_Integer aFunctionCoord, const Standard_Integer aTaperedOffsetType, const Standard_Real offDistance1, const Standard_Real arcLength1, const Standard_Real offDistance2, const Standard_Real arcLength2, const gp_XYZ& aNormalVec, const Standard_Real anOffsetParam, const Standard_Real anotherOffsetParam);
79   
80   //! returns the curve to be offset
81   Standard_EXPORT Handle(IGESData_IGESEntity) BaseCurve() const;
82   
83   //! returns the offset distance flag
84   //! 1 = Single value offset (uniform distance)
85   //! 2 = Offset distance varying linearly
86   //! 3 = Offset distance specified as a function
87   Standard_EXPORT Standard_Integer OffsetType() const;
88   
89   //! returns the function defining the offset if at all the offset
90   //! is described as a function or Null Handle.
91   Standard_EXPORT Handle(IGESData_IGESEntity) Function() const;
92   
93   //! returns True if function defining the offset is present.
94   Standard_EXPORT Standard_Boolean HasFunction() const;
95   
96   //! returns particular coordinate of the curve which describes offset
97   //! as a function of its parameters. (only used if OffsetType() = 3)
98   Standard_EXPORT Standard_Integer FunctionParameter() const;
99   
100   //! returns tapered offset type flag (only used if OffsetType() = 2 or 3)
101   //! 1 = Function of arc length
102   //! 2 = Function of parameter
103   Standard_EXPORT Standard_Integer TaperedOffsetType() const;
104   
105   //! returns first offset distance (only used if OffsetType() = 1 or 2)
106   Standard_EXPORT Standard_Real FirstOffsetDistance() const;
107   
108   //! returns arc length or parameter value (depending on value of
109   //! offset distance flag) of first offset distance
110   //! (only used if OffsetType() = 2)
111   Standard_EXPORT Standard_Real ArcLength1() const;
112   
113   //! returns the second offset distance
114   Standard_EXPORT Standard_Real SecondOffsetDistance() const;
115   
116   //! returns arc length or parameter value (depending on value of
117   //! offset distance flag) of second offset distance
118   //! (only used if OffsetType() = 2)
119   Standard_EXPORT Standard_Real ArcLength2() const;
120   
121   //! returns unit vector normal to plane containing curve to be offset
122   Standard_EXPORT gp_Vec NormalVector() const;
123   
124   //! returns unit vector normal to plane containing curve to be offset
125   //! after applying Transf. Matrix
126   Standard_EXPORT gp_Vec TransformedNormalVector() const;
127   
128   Standard_EXPORT void Parameters (Standard_Real& StartParam, Standard_Real& EndParam) const;
129   
130   //! returns Start Parameter value of the offset curve
131   Standard_EXPORT Standard_Real StartParameter() const;
132   
133   //! returns End   Parameter value of the offset curve
134   Standard_EXPORT Standard_Real EndParameter() const;
135
136
137
138
139   DEFINE_STANDARD_RTTIEXT(IGESGeom_OffsetCurve,IGESData_IGESEntity)
140
141 protected:
142
143
144
145
146 private:
147
148
149   Handle(IGESData_IGESEntity) theBaseCurve;
150   Standard_Integer theOffsetType;
151   Handle(IGESData_IGESEntity) theFunction;
152   Standard_Integer theFunctionCoord;
153   Standard_Integer theTaperedOffsetType;
154   Standard_Real theOffsetDistance1;
155   Standard_Real theArcLength1;
156   Standard_Real theOffsetDistance2;
157   Standard_Real theArcLength2;
158   gp_XYZ theNormalVector;
159   Standard_Real theOffsetParam1;
160   Standard_Real theOffsetParam2;
161
162
163 };
164
165
166
167
168
169
170
171 #endif // _IGESGeom_OffsetCurve_HeaderFile