0024624: Lost word in license statement in source files
[occt.git] / src / GC / GC_MakeMirror.cxx
CommitLineData
b311480e 1// Created on: 1992-10-02
2// Created by: Remi GILET
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 <GC_MakeMirror.ixx>
18#include <GC_MakeMirror.hxx>
19#include <gp_Ax3.hxx>
20#include <StdFail_NotDone.hxx>
21
22//=========================================================================
23// Creation d une symetrie de Geom par rapport a un point. +
24//=========================================================================
25
26GC_MakeMirror::GC_MakeMirror(const gp_Pnt& Point ) {
27 TheMirror = new Geom_Transformation();
28 TheMirror->SetMirror(Point);
29}
30
31//=========================================================================
32// Creation d une symetrie de Geom par rapport a une droite. +
33//=========================================================================
34
35GC_MakeMirror::GC_MakeMirror(const gp_Ax1& Axis ) {
36 TheMirror = new Geom_Transformation();
37 TheMirror->SetMirror(Axis);
38}
39
40//=========================================================================
41// Creation d une symetrie de Geom par rapport a une droite. +
42//=========================================================================
43
44GC_MakeMirror::GC_MakeMirror(const gp_Lin& Line ) {
45 TheMirror = new Geom_Transformation();
46 TheMirror->SetMirror(gp_Ax1(Line.Location(),Line.Direction()));
47}
48
49//=========================================================================
50// Creation d une symetrie 3d de Geom par rapport a une droite definie +
51// par un point et une direction. +
52//=========================================================================
53
54GC_MakeMirror::GC_MakeMirror(const gp_Pnt& Point ,
55 const gp_Dir& Direc ) {
56 TheMirror = new Geom_Transformation();
57 TheMirror->SetMirror(gp_Ax1(Point,Direc));
58}
59
60//=========================================================================
61// Creation d une symetrie 3d de Geom par rapport a un plan defini par +
62// un Ax2 (Normale au plan et axe x du plan). +
63//=========================================================================
64
65GC_MakeMirror::GC_MakeMirror(const gp_Ax2& Plane ) {
66 TheMirror = new Geom_Transformation();
67 TheMirror->SetMirror(Plane);
68}
69
70//=========================================================================
71// Creation d une symetrie 3d de gp par rapport a un plan Plane. +
72//=========================================================================
73
74GC_MakeMirror::GC_MakeMirror(const gp_Pln& Plane ) {
75 TheMirror = new Geom_Transformation();
76 TheMirror->SetMirror(Plane.Position().Ax2());
77}
78
79const Handle(Geom_Transformation)& GC_MakeMirror::Value() const
80{
81 return TheMirror;
82}
83
84const Handle(Geom_Transformation)& GC_MakeMirror::Operator() const
85{
86 return TheMirror;
87}
88
89GC_MakeMirror::operator Handle(Geom_Transformation) () const
90{
91 return TheMirror;
92}
93