b311480e |
1 | // Created on: 1992-06-10 |
2 | // Created by: Laurent BUCHARD |
3 | // Copyright (c) 1992-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 | |
17 | #include <IntRes2d_Transition.ixx> |
18 | |
19 | |
20 | IntRes2d_Transition::IntRes2d_Transition() : tangent(Standard_True), |
21 | posit(IntRes2d_Middle), |
22 | typetra(IntRes2d_Undecided), |
23 | situat(IntRes2d_Unknown), |
24 | oppos(Standard_False) |
25 | { |
26 | } |
27 | |
28 | |
29 | ostream& operator << (ostream& os, IntRes2d_Transition& Trans) { |
30 | |
31 | os << " Position : "; |
32 | if (Trans.PositionOnCurve()==IntRes2d_Head) { |
33 | os << "Debut\n"; |
34 | } |
35 | else if (Trans.PositionOnCurve()==IntRes2d_Middle) { |
36 | os << "Milieu\n"; |
37 | } |
38 | else { |
39 | os << "Fin\n"; |
40 | } |
41 | |
42 | os << " Type de transition : "; |
43 | if (Trans.TransitionType()==IntRes2d_Undecided) { |
44 | os << "Indeterminee\n"; |
45 | } |
46 | else { |
47 | if (Trans.TransitionType()==IntRes2d_In) { |
48 | os << "Entrante\n"; |
49 | } |
50 | else if (Trans.TransitionType()==IntRes2d_Out) { |
51 | os << "Sortante\n"; |
52 | } |
53 | else { |
54 | os << "Touch\n"; |
55 | os << " Position par rapport a l'autre courbe : "; |
56 | if (Trans.Situation()==IntRes2d_Inside) { |
57 | os << "Interieure\n"; |
58 | } |
59 | else if (Trans.Situation()==IntRes2d_Outside) { |
60 | os << "Exterieure\n"; |
61 | } |
62 | else if (Trans.Situation()==IntRes2d_Unknown) { |
63 | os << "Indeterminee\n"; |
64 | } |
65 | os << " Position matiere : "; |
66 | if (Trans.IsOpposite()) { |
67 | os << "Opposee\n"; |
68 | } |
69 | else { |
70 | os << "Idem\n"; |
71 | } |
72 | } |
73 | os << " Cas de tangence : "; |
74 | if (Trans.IsTangent()) { |
75 | os << "Oui\n"; |
76 | } |
77 | else { |
78 | os << "Non\n"; |
79 | } |
80 | } |
81 | os << "\n"; |
82 | return os; |
83 | } |
84 | |
85 | |
86 | |