0024750: Replace instantiations of TCollection generic classes by NCollection templat...
[occt.git] / src / Contap / Contap_Point.lxx
CommitLineData
b311480e 1// Created on: 1993-03-04
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1993-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
733a0e55 17#include <Standard_DomainError.hxx>
7fd59977 18
19inline void Contap_Point::SetValue (const gp_Pnt& Pt,
20 const Standard_Real U,
21 const Standard_Real V)
22{
23 pt = Pt;
24 uparam = U;
25 vparam = V;
26 onarc = Standard_False;
27 isvtx = Standard_False;
28 ismult= Standard_False;
29 myInternal = Standard_False;
30}
31
32inline void Contap_Point::SetParameter (const Standard_Real Para) {
33
34 paraline = Para;
35}
36
e2065c2f 37inline void Contap_Point::SetVertex(const Handle(Adaptor3d_HVertex)& V) {
7fd59977 38
39 isvtx = Standard_True;
40 vtx = V;
41}
42
e2065c2f 43inline void Contap_Point::SetArc (const Handle(Adaptor2d_HCurve2d)& A,
7fd59977 44 const Standard_Real Param,
45 const IntSurf_Transition& TLine,
46 const IntSurf_Transition& TArc) {
47
48 onarc = Standard_True;
49 arc = A;
50 prmarc = Param;
51 traline = TLine;
52 traarc = TArc;
53}
54
55inline void Contap_Point::SetMultiple ()
56{
57 ismult = Standard_True;
58}
59
60inline void Contap_Point::SetInternal ()
61{
62 myInternal = Standard_True;
63}
64
65
66inline Standard_Boolean Contap_Point::IsMultiple () const
67{
68 return ismult;
69}
70
71inline Standard_Boolean Contap_Point::IsInternal () const
72{
73 return myInternal;
74}
75
76inline const gp_Pnt& Contap_Point::Value () const {
77
78 return pt;
79}
80
81inline Standard_Real Contap_Point::ParameterOnLine () const {
82
83 return paraline;
84}
85
86inline void Contap_Point::Parameters (Standard_Real& U1,
87 Standard_Real& V1) const {
88
89 U1 = uparam;
90 V1 = vparam;
91}
92
93inline Standard_Boolean Contap_Point::IsOnArc () const{
94 return onarc;
95}
96
857ffd5e 97inline const Handle(Adaptor2d_HCurve2d)& Contap_Point::Arc () const {
7fd59977 98
99 if (!onarc) {Standard_DomainError::Raise();}
100 return arc;
101}
102
103inline const IntSurf_Transition& Contap_Point::TransitionOnLine () const {
104
105 if (!onarc) {Standard_DomainError::Raise();}
106 return traline;
107}
108
109inline const IntSurf_Transition& Contap_Point::TransitionOnArc () const {
110
111 if (!onarc) {Standard_DomainError::Raise();}
112 return traarc;
113}
114
115inline Standard_Real Contap_Point::ParameterOnArc () const {
116
117 if (!onarc) {Standard_DomainError::Raise();}
118 return prmarc;
119}
120
121inline Standard_Boolean Contap_Point::IsVertex () const {
122 return isvtx;
123}
124
857ffd5e 125inline const Handle(Adaptor3d_HVertex)& Contap_Point::Vertex () const {
7fd59977 126
127 if (!isvtx) {Standard_DomainError::Raise();}
128 return vtx;
129}