0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / ChFiDS / ChFiDS_CommonPoint.cxx
CommitLineData
b311480e 1// Created on: 1993-11-30
2// Created by: Isabelle GRIGNON
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23#include <ChFiDS_CommonPoint.ixx>
24
25//=======================================================================
26//function : ChFiDS_CommonPoint
27//purpose :
28//=======================================================================
29
30ChFiDS_CommonPoint::ChFiDS_CommonPoint() :
31tol(0.),
32isonarc(Standard_False),
33isvtx(Standard_False),
34hasvector(Standard_False)
35{
36}
37
38
39//=======================================================================
40//function : Reset
41//purpose :
42//=======================================================================
43
44void ChFiDS_CommonPoint::Reset()
45{
46 tol = 0.;
47 isvtx = Standard_False;
48 isonarc = Standard_False;
49 hasvector = Standard_False;
50}
51
52
53//=======================================================================
54//function : SetArc
55//purpose :
56// 30/09/1997 : PMN On n'ecrabouille plus la tolerance
57//=======================================================================
58
59void ChFiDS_CommonPoint::SetArc(const Standard_Real Tol,
60 const TopoDS_Edge& A,
61 const Standard_Real Param,
62 const TopAbs_Orientation TArc)
63{
64 isonarc = Standard_True;
65 if (Tol > tol) tol = Tol;
66 arc = A;
67 prmarc = Param;
68 traarc = TArc;
69}
70
71//=======================================================================
72//function : SetParameter
73//purpose :
74//=======================================================================
75
76void ChFiDS_CommonPoint::SetParameter(const Standard_Real Param)
77{
78 prmtg = Param;
79}
80
81//=======================================================================
82//function : Arc
83//purpose :
84//=======================================================================
85
86const TopoDS_Edge& ChFiDS_CommonPoint::Arc()const
87{
88 if (!isonarc){
89 Standard_DomainError::Raise("CommonPoint not on Arc");
90 }
91 return arc;
92}
93
94
95//=======================================================================
96//function : TransitionOnArc
97//purpose :
98//=======================================================================
99
100TopAbs_Orientation ChFiDS_CommonPoint::TransitionOnArc()const
101{
102 if (!isonarc){
103 Standard_DomainError::Raise("CommonPoint not on Arc");
104 }
105 return traarc;
106}
107
108
109//=======================================================================
110//function : ParameterOnArc
111//purpose :
112//=======================================================================
113
114Standard_Real ChFiDS_CommonPoint::ParameterOnArc()const
115{
116 if (!isonarc){
117 Standard_DomainError::Raise("CommonPoint not on Arc");
118 }
119 return prmarc;
120}
121
122//=======================================================================
123//function : Parameter
124//purpose :
125//=======================================================================
126
127Standard_Real ChFiDS_CommonPoint::Parameter()const
128{
129 return prmtg;
130}
131
132