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
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.
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.
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.
22 #include <GC_MakeCircle.ixx>
23 #include <gce_MakeCirc.hxx>
24 #include <StdFail_NotDone.hxx>
26 GC_MakeCircle::GC_MakeCircle(const gp_Circ& C)
29 TheCircle = new Geom_Circle(C);
32 GC_MakeCircle::GC_MakeCircle(const gp_Ax2& A2 ,
33 const Standard_Real Radius)
35 if (Radius < 0.) { TheError = gce_NegativeRadius; }
38 TheCircle = new Geom_Circle(gp_Circ(A2,Radius));
42 GC_MakeCircle::GC_MakeCircle(const gp_Circ& Circ ,
45 gp_Circ C = gce_MakeCirc(Circ,Point);
46 TheCircle = new Geom_Circle(C);
50 GC_MakeCircle::GC_MakeCircle(const gp_Circ& Circ ,
51 const Standard_Real Dist )
53 gce_MakeCirc C = gce_MakeCirc(Circ,Dist);
54 TheError = C.Status();
55 if (TheError == gce_Done) {
56 TheCircle = new Geom_Circle(C.Value());
60 GC_MakeCircle::GC_MakeCircle(const gp_Pnt& P1 ,
64 gce_MakeCirc C = gce_MakeCirc(P1,P2,P3);
65 TheError = C.Status();
66 if (TheError == gce_Done) {
67 TheCircle = new Geom_Circle(C.Value());
71 GC_MakeCircle::GC_MakeCircle(const gp_Pnt& Point ,
73 const Standard_Real Radius )
75 gce_MakeCirc C = gce_MakeCirc(Point,Norm,Radius);
76 TheError = C.Status();
77 if (TheError == gce_Done) {
78 TheCircle = new Geom_Circle(C.Value());
82 GC_MakeCircle::GC_MakeCircle(const gp_Pnt& Point ,
83 const gp_Pnt& PtAxis ,
84 const Standard_Real Radius )
86 gce_MakeCirc C = gce_MakeCirc(Point,PtAxis,Radius);
87 TheError = C.Status();
88 if (TheError == gce_Done) {
89 TheCircle = new Geom_Circle(C.Value());
93 GC_MakeCircle::GC_MakeCircle(const gp_Ax1& Axis ,
94 const Standard_Real Radius )
96 gce_MakeCirc C = gce_MakeCirc(Axis,Radius);
97 TheError = C.Status();
98 if (TheError == gce_Done) {
99 TheCircle = new Geom_Circle(C.Value());
103 const Handle(Geom_Circle)& GC_MakeCircle::Value() const
105 StdFail_NotDone_Raise_if(!TheError == gce_Done,"");
109 const Handle(Geom_Circle)& GC_MakeCircle::Operator() const
114 GC_MakeCircle::operator Handle(Geom_Circle) () const