0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / IGESGeom / IGESGeom_RuledSurface.hxx
1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( Kiran )
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_RuledSurface_HeaderFile
18 #define _IGESGeom_RuledSurface_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <IGESData_IGESEntity.hxx>
25 #include <Standard_Boolean.hxx>
26 class IGESData_IGESEntity;
27
28
29 class IGESGeom_RuledSurface;
30 DEFINE_STANDARD_HANDLE(IGESGeom_RuledSurface, IGESData_IGESEntity)
31
32 //! defines IGESRuledSurface, Type <118> Form <0-1>
33 //! in package IGESGeom
34 //! A ruled surface is formed by moving a line connecting points
35 //! of equal relative arc length or equal relative parametric
36 //! value on two parametric curves from a start point to a
37 //! terminate point on the curves. The parametric curves may be
38 //! points, lines, circles, conics, rational B-splines,
39 //! parametric splines or any parametric curve defined in
40 //! the IGES specification.
41 class IGESGeom_RuledSurface : public IGESData_IGESEntity
42 {
43
44 public:
45
46   
47   Standard_EXPORT IGESGeom_RuledSurface();
48   
49   //! This method is used to set the fields of the class
50   //! RuledSurface
51   //! - aCurve       : First parametric curve
52   //! - anotherCurve : Second parametric curve
53   //! - aDirFlag     : Direction Flag
54   //! 0 = Join first to first, last to last
55   //! 1 = Join first to last, last to first
56   //! - aDevFlag     : Developable Surface Flag
57   //! 1 = Developable
58   //! 0 = Possibly not
59   Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aCurve, const Handle(IGESData_IGESEntity)& anotherCurve, const Standard_Integer aDirFlag, const Standard_Integer aDevFlag);
60   
61   //! Sets <me> to be Ruled by Parameter (Form 1) if <mode> is
62   //! True, or Ruled by Length (Form 0) else
63   Standard_EXPORT void SetRuledByParameter (const Standard_Boolean mode);
64   
65   //! Returns True if Form is 1
66   Standard_EXPORT Standard_Boolean IsRuledByParameter() const;
67   
68   //! returns the first curve
69   Standard_EXPORT Handle(IGESData_IGESEntity) FirstCurve() const;
70   
71   //! returns the second curve
72   Standard_EXPORT Handle(IGESData_IGESEntity) SecondCurve() const;
73   
74   //! return the sense of direction
75   //! 0 = Join first to first, last to last
76   //! 1 = Join first to last, last to first
77   Standard_EXPORT Standard_Integer DirectionFlag() const;
78   
79   //! returns True if developable else False
80   Standard_EXPORT Standard_Boolean IsDevelopable() const;
81
82
83
84
85   DEFINE_STANDARD_RTTIEXT(IGESGeom_RuledSurface,IGESData_IGESEntity)
86
87 protected:
88
89
90
91
92 private:
93
94
95   Handle(IGESData_IGESEntity) theCurve1;
96   Handle(IGESData_IGESEntity) theCurve2;
97   Standard_Integer theDirFlag;
98   Standard_Integer theDevFlag;
99
100
101 };
102
103
104
105
106
107
108
109 #endif // _IGESGeom_RuledSurface_HeaderFile