summaryrefslogtreecommitdiff
path: root/inc/Contap_ContourGen_1.gxx
blob: 291c8c9064b2fa7767e8f3e5a3e139fda9b3f4f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#include <Standard_ConstructionError.hxx>


Contap_ContourGen::Contap_ContourGen () : 
       done(Standard_False),modeset(Standard_False)
{}

Contap_ContourGen::Contap_ContourGen (const gp_Vec& Direction) :

       done(Standard_False),modeset(Standard_True)
{
  mySFunc.Set(Direction);
  myAFunc.Set(Direction);
}


Contap_ContourGen::Contap_ContourGen (const gp_Vec& Direction,
				const Standard_Real Angle) :

       done(Standard_False),modeset(Standard_True)
{
  mySFunc.Set(Direction,Angle);
  myAFunc.Set(Direction,Angle);
}

Contap_ContourGen::Contap_ContourGen (const gp_Pnt& Eye) :

       done(Standard_False),modeset(Standard_True)
{
  mySFunc.Set(Eye);
  myAFunc.Set(Eye);
}


Contap_ContourGen::Contap_ContourGen (const TheSurface& Surf,
				const Handle(TheTopolTool)& Domain,
				const gp_Vec& Direction) :

       done(Standard_False),modeset(Standard_True)
{
  Perform(Surf,Domain,Direction);
}


Contap_ContourGen::Contap_ContourGen (const TheSurface& Surf,
				const Handle(TheTopolTool)& Domain,
				const gp_Vec& Direction,
				const Standard_Real Angle) :

       done(Standard_False),modeset(Standard_True)
{
  Perform(Surf,Domain,Direction,Angle);
}


Contap_ContourGen::Contap_ContourGen (const TheSurface& Surf,
				const Handle(TheTopolTool)& Domain,
				const gp_Pnt& Eye) :

       done(Standard_False),modeset(Standard_True)
{
  Perform(Surf,Domain,Eye);
}


void Contap_ContourGen::Init (const gp_Vec& Direction)

{
  done = Standard_False;
  modeset = Standard_True;
  mySFunc.Set(Direction);
  myAFunc.Set(Direction);
}


void Contap_ContourGen::Init(const gp_Vec& Direction,
			  const Standard_Real Angle)
{
  done = Standard_False;
  modeset = Standard_True;
  mySFunc.Set(Direction,Angle);
  myAFunc.Set(Direction,Angle);
}

void Contap_ContourGen::Init (const gp_Pnt& Eye)
{
  done = Standard_False;
  modeset = Standard_True;
  mySFunc.Set(Eye);
  myAFunc.Set(Eye);
}


void Contap_ContourGen::Perform (const TheSurface& Surf,
			      const Handle(TheTopolTool)& Domain)
{
  if (!modeset) {Standard_ConstructionError::Raise();}
  mySFunc.Set(Surf);
  myAFunc.Set(Surf);

  GeomAbs_SurfaceType typS = TheSurfaceTool::GetType(Surf);
  switch (typS) {
  case GeomAbs_Plane:
  case GeomAbs_Sphere:
  case GeomAbs_Cylinder:
  case GeomAbs_Cone:
    {
      PerformAna(Domain); //Surf,Domain,Direction,0.,gp_Pnt(0.,0.,0.),1);
    }
    break;

  default:
    {
      Perform(Domain); //Surf,Domain,Direction,0.,gp_Pnt(0.,0.,0.),1);
    }
    break;
  }

}
			      

void Contap_ContourGen::Perform (const TheSurface& Surf,
			      const Handle(TheTopolTool)& Domain,
			      const gp_Vec& Direction)

{
  Init(Direction);
  Perform(Surf,Domain);
}

void Contap_ContourGen::Perform (const TheSurface& Surf,
			      const Handle(TheTopolTool)& Domain,
			      const gp_Vec& Direction,
			      const Standard_Real Angle)

{
  Init(Direction,Angle);
  Perform(Surf,Domain);
}


void Contap_ContourGen::Perform (const TheSurface& Surf,
			      const Handle(TheTopolTool)& Domain,
			      const gp_Pnt& Eye)

{
  Init(Eye);
  Perform(Surf,Domain);
}