summaryrefslogtreecommitdiff
path: root/src/GCE2d/GCE2d_MakeMirror.cxx
blob: 5fc97a86c4a02317fdc4985f705d948949a2af24 (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
// File:	GCE2d_MakeMirror.cxx
// Created:	Fri Oct  2 16:36:54 1992
// Author:	Remi GILET
//		<reg@topsn3>

#include <GCE2d_MakeMirror.ixx>

//=========================================================================
//   Creation d une symetrie de Geom2d par rapport a un point.              +
//=========================================================================

GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Pnt2d&  Point ) {
  TheMirror = new Geom2d_Transformation();
  TheMirror->SetMirror(Point);
}

//=========================================================================
//   Creation d une symetrie de Geom2d par rapport a une droite.            +
//=========================================================================

GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Ax2d&  Axis ) {
  TheMirror = new Geom2d_Transformation();
  TheMirror->SetMirror(Axis);
}

//=========================================================================
//   Creation d une symetrie de Geom2d par rapport a une droite.            +
//=========================================================================

GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Lin2d&  Line ) {
  TheMirror = new Geom2d_Transformation();
  TheMirror->SetMirror(gp_Ax2d(Line.Location(),Line.Direction()));
}

//=========================================================================
//   Creation d une symetrie 3d de Geom2d par rapport a une droite definie  +
//   par un point et une direction.                                       +
//=========================================================================

GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Pnt2d&  Point ,
				   const gp_Dir2d&  Direc ) {
  TheMirror = new Geom2d_Transformation();
  TheMirror->SetMirror(gp_Ax2d(Point,Direc));
}

const Handle(Geom2d_Transformation)& GCE2d_MakeMirror::Value() const
{ 
  return TheMirror;
}

const Handle(Geom2d_Transformation)& GCE2d_MakeMirror::Operator() const 
{
  return TheMirror;
}

GCE2d_MakeMirror::operator Handle(Geom2d_Transformation) () const
{
  return TheMirror;
}