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