0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis
[occt.git] / src / BRepBlend / BRepBlend_Extremity.cxx
1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15
16 #include <Adaptor2d_HCurve2d.hxx>
17 #include <Adaptor3d_HVertex.hxx>
18 #include <BRepBlend_Extremity.hxx>
19 #include <BRepBlend_PointOnRst.hxx>
20 #include <gp_Pnt.hxx>
21 #include <gp_Vec.hxx>
22 #include <IntSurf_Transition.hxx>
23 #include <Standard_DomainError.hxx>
24 #include <Standard_OutOfRange.hxx>
25
26 BRepBlend_Extremity::BRepBlend_Extremity (): 
27        pt(gp_Pnt(0,0,0)),
28        tang(gp_Vec(0,0,0)),
29        param(0.0),  u(0.0), v(0.0), tol(0.0),
30        isvtx(Standard_False), hastang(Standard_False)
31 {
32 }
33
34 BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
35                                   const Standard_Real U,
36                                   const Standard_Real V,
37                                   const Standard_Real Param,
38                                   const Standard_Real Tol) :
39        pt(P),
40        tang(gp_Vec(0,0,0)),
41        param(Param),u(U),v(V),tol(Tol),isvtx(Standard_False),
42        hastang(Standard_False)
43 {
44 }
45
46
47 BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
48                                   const Standard_Real U,
49                                   const Standard_Real V,
50                                   const Standard_Real Param,
51                                   const Standard_Real Tol,
52                                   const Handle(Adaptor3d_HVertex)& Vtx) :
53        vtx(Vtx),pt(P),
54        tang(gp_Vec(0,0,0)),
55        param(Param),u(U),v(V),tol(Tol),isvtx(Standard_True),
56        hastang(Standard_False)
57 {}
58
59
60 BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
61                                   const Standard_Real W,
62                                   const Standard_Real Param,
63                                   const Standard_Real Tol) :
64        pt(P),
65        tang(gp_Vec(0,0,0)),
66        param(Param),u(W),v(0.0),
67        tol(Tol),isvtx(Standard_False),
68        hastang(Standard_False)
69 {}
70
71
72 void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
73                                 const Standard_Real U,
74                                 const Standard_Real V,
75                                 const Standard_Real Param,
76                                 const Standard_Real Tol)
77 {
78   pt    = P;
79   u     = U;
80   v     = V;
81   param = Param;
82   tol   = Tol;
83   isvtx = Standard_False;
84   seqpt.Clear();
85 }
86
87
88 void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
89                                 const Standard_Real U,
90                                 const Standard_Real V,
91                                 const Standard_Real Param,
92                                 const Standard_Real Tol,
93                                 const Handle(Adaptor3d_HVertex)& Vtx)
94 {
95   pt    = P;
96   u     = U;
97   v     = V;
98   param = Param;
99   tol   = Tol;
100   isvtx = Standard_True;
101   vtx   = Vtx;
102   seqpt.Clear();
103 }
104
105 void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
106                                 const Standard_Real W,
107                                 const Standard_Real Param,
108                                 const Standard_Real Tol)
109 {
110   pt    = P;
111   u     = W;
112   param = Param;
113   tol   = Tol;
114   isvtx = Standard_False;
115   seqpt.Clear();
116 }
117
118
119 void BRepBlend_Extremity::SetVertex (const Handle(Adaptor3d_HVertex)& V)
120 {
121   isvtx = Standard_True;
122   vtx   = V;
123 }
124
125 void BRepBlend_Extremity::AddArc (const Handle(Adaptor2d_HCurve2d)& A,
126                               const Standard_Real Param,
127                               const IntSurf_Transition& TLine,
128                               const IntSurf_Transition& TArc)
129 {
130   seqpt.Append(BRepBlend_PointOnRst(A,Param,TLine,TArc));
131 }
132