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