Test for 0022778: Bug in BRepMesh
[occt.git] / src / Contap / Contap_ContAna.lxx
CommitLineData
b311480e 1// Created on: 1993-03-04
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1993-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
733a0e55 21
7fd59977 22#include <StdFail_NotDone.hxx>
23#include <Standard_DomainError.hxx>
24#include <Standard_OutOfRange.hxx>
25
26#include <gp_Lin.hxx>
27#include <gp_Circ.hxx>
28
29inline Standard_Boolean Contap_ContAna::IsDone () const
30{
31 return done;
32}
33
34inline Standard_Integer Contap_ContAna::NbContours () const
35{
36 if (!done) {StdFail_NotDone::Raise();}
37 return nbSol;
38}
39
40inline GeomAbs_CurveType Contap_ContAna::TypeContour () const
41{
42 if (!done) {StdFail_NotDone::Raise();}
43 if (nbSol == 0) {Standard_DomainError::Raise();}
44 return typL;
45}
46
47inline gp_Circ Contap_ContAna::Circle () const
48{
49 if (!done) {StdFail_NotDone::Raise();}
50 if (typL != GeomAbs_Circle || nbSol == 0) {Standard_DomainError::Raise();}
51 return gp_Circ(gp_Ax2(pt1,dir1,dir2),prm);
52}