0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepBlend / BRepBlend_Extremity.cxx
CommitLineData
b311480e 1// Copyright (c) 1995-1999 Matra Datavision
973c2be1 2// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 3//
973c2be1 4// This file is part of Open CASCADE Technology software library.
b311480e 5//
d5f74e42 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
973c2be1 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.
b311480e 11//
973c2be1 12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
b311480e 14
42cf5bc1 15
16#include <Adaptor2d_HCurve2d.hxx>
17#include <Adaptor3d_HVertex.hxx>
18#include <BRepBlend_Extremity.hxx>
04f7bd75 19#include <BRepBlend_PointOnRst.hxx>
42cf5bc1 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>
04f7bd75 25
26BRepBlend_Extremity::BRepBlend_Extremity ():
7fd59977 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
04f7bd75 34BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
7fd59977 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
04f7bd75 47BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
7fd59977 48 const Standard_Real U,
49 const Standard_Real V,
50 const Standard_Real Param,
51 const Standard_Real Tol,
04f7bd75 52 const Handle(Adaptor3d_HVertex)& Vtx) :
7fd59977 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
04f7bd75 60BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
7fd59977 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),tol(Tol),isvtx(Standard_False),
67 hastang(Standard_False)
68{}
69
70
04f7bd75 71void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
7fd59977 72 const Standard_Real U,
73 const Standard_Real V,
74 const Standard_Real Param,
75 const Standard_Real Tol)
76{
77 pt = P;
78 u = U;
79 v = V;
80 param = Param;
81 tol = Tol;
82 isvtx = Standard_False;
83 seqpt.Clear();
84}
85
86
04f7bd75 87void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
7fd59977 88 const Standard_Real U,
89 const Standard_Real V,
90 const Standard_Real Param,
91 const Standard_Real Tol,
04f7bd75 92 const Handle(Adaptor3d_HVertex)& Vtx)
7fd59977 93{
94 pt = P;
95 u = U;
96 v = V;
97 param = Param;
98 tol = Tol;
99 isvtx = Standard_True;
100 vtx = Vtx;
101 seqpt.Clear();
102}
103
04f7bd75 104void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
7fd59977 105 const Standard_Real W,
106 const Standard_Real Param,
107 const Standard_Real Tol)
108{
109 pt = P;
110 u = W;
111 param = Param;
112 tol = Tol;
113 isvtx = Standard_False;
114 seqpt.Clear();
115}
116
117
04f7bd75 118void BRepBlend_Extremity::SetVertex (const Handle(Adaptor3d_HVertex)& V)
7fd59977 119{
120 isvtx = Standard_True;
121 vtx = V;
122}
123
04f7bd75 124void BRepBlend_Extremity::AddArc (const Handle(Adaptor2d_HCurve2d)& A,
7fd59977 125 const Standard_Real Param,
126 const IntSurf_Transition& TLine,
127 const IntSurf_Transition& TArc)
128{
04f7bd75 129 seqpt.Append(BRepBlend_PointOnRst(A,Param,TLine,TArc));
7fd59977 130}
131