0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / Contap / Contap_Line.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-02-05
2// Created by: Jacques GOUSSARD
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 _Contap_Line_HeaderFile
18#define _Contap_Line_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <IntSurf_TypeTrans.hxx>
25#include <Contap_TheHSequenceOfPoint.hxx>
26#include <Contap_IType.hxx>
27#include <gp_Pnt.hxx>
28#include <gp_Dir.hxx>
29#include <Standard_Real.hxx>
30#include <Standard_Integer.hxx>
31#include <gp_Lin.hxx>
32#include <gp_Circ.hxx>
33class IntSurf_LineOn2S;
34class Adaptor2d_HCurve2d;
35class Standard_DomainError;
36class Standard_OutOfRange;
37class IntSurf_PntOn2S;
38class gp_Lin;
39class gp_Circ;
40class Contap_Point;
41
42
43
44class Contap_Line
45{
46public:
47
48 DEFINE_STANDARD_ALLOC
49
50
51 Standard_EXPORT Contap_Line();
52
53 Standard_EXPORT void SetLineOn2S (const Handle(IntSurf_LineOn2S)& L);
54
55 Standard_EXPORT void Clear();
56
57 const Handle(IntSurf_LineOn2S)& LineOn2S() const;
58
59 Standard_EXPORT void ResetSeqOfVertex();
60
61 void Add (const IntSurf_PntOn2S& P);
62
63 Standard_EXPORT void SetValue (const gp_Lin& L);
64
65 Standard_EXPORT void SetValue (const gp_Circ& C);
66
67 Standard_EXPORT void SetValue (const Handle(Adaptor2d_HCurve2d)& A);
68
69 Standard_EXPORT void Add (const Contap_Point& P);
70
71 Standard_Integer NbVertex() const;
72
73 Contap_Point& Vertex (const Standard_Integer Index) const;
74
75 //! Returns Contap_Lin for a line, Contap_Circle for
76 //! a circle, and Contap_Walking for a Walking line,
77 //! Contap_Restriction for a part of boundarie.
78 Contap_IType TypeContour() const;
79
80 Standard_Integer NbPnts() const;
81
82 const IntSurf_PntOn2S& Point (const Standard_Integer Index) const;
83
84 gp_Lin Line() const;
85
86 gp_Circ Circle() const;
87
88 Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& Arc() const;
89
90 //! Set The Tansition of the line.
91 Standard_EXPORT void SetTransitionOnS (const IntSurf_TypeTrans T);
92
93 //! returns IN if at the "left" of the line, the normale of the
94 //! surface is oriented to the observator.
95 Standard_EXPORT IntSurf_TypeTrans TransitionOnS() const;
96
97
98
99
100protected:
101
102
103
104
105
106private:
107
108
109
110 IntSurf_TypeTrans Trans;
111 Handle(IntSurf_LineOn2S) curv;
112 Handle(Contap_TheHSequenceOfPoint) svtx;
113 Handle(Adaptor2d_HCurve2d) thearc;
114 Contap_IType typL;
115 gp_Pnt pt;
116 gp_Dir dir1;
117 gp_Dir dir2;
118 Standard_Real rad;
119
120
121};
122
123
124#include <Contap_Line.lxx>
125
126
127
128
129
130#endif // _Contap_Line_HeaderFile