Warning, /include/opencascade/IntPatch_ImpImpIntersection.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1992-05-07
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016
0017 #include <StdFail_NotDone.hxx>
0018 #include <Standard_DomainError.hxx>
0019 #include <IntPatch_Line.hxx>
0020
0021 inline bool IntPatch_ImpImpIntersection::IsDone() const
0022 {
0023 return (GetStatus() != IntStatus_Fail);
0024 }
0025
0026 inline IntPatch_ImpImpIntersection::IntStatus IntPatch_ImpImpIntersection::GetStatus() const
0027 {
0028 return myDone;
0029 }
0030
0031 inline bool IntPatch_ImpImpIntersection::IsEmpty() const
0032 {
0033 if (!IsDone())
0034 {
0035 throw StdFail_NotDone();
0036 }
0037 return empt;
0038 }
0039
0040 inline bool IntPatch_ImpImpIntersection::TangentFaces() const
0041 {
0042 if (!IsDone())
0043 {
0044 throw StdFail_NotDone();
0045 }
0046 return tgte;
0047 }
0048
0049 inline bool IntPatch_ImpImpIntersection::OppositeFaces() const
0050 {
0051 if (!IsDone())
0052 {
0053 throw StdFail_NotDone();
0054 }
0055 if (!tgte)
0056 {
0057 throw Standard_DomainError();
0058 }
0059 return oppo;
0060 }
0061
0062 inline int IntPatch_ImpImpIntersection::NbPnts() const
0063 {
0064 if (!IsDone())
0065 {
0066 throw StdFail_NotDone();
0067 }
0068 return spnt.Length();
0069 }
0070
0071 inline const IntPatch_Point& IntPatch_ImpImpIntersection::Point(const int Index) const
0072 {
0073 if (!IsDone())
0074 {
0075 throw StdFail_NotDone();
0076 }
0077 return spnt(Index);
0078 }
0079
0080 inline int IntPatch_ImpImpIntersection::NbLines() const
0081 {
0082 if (!IsDone())
0083 {
0084 throw StdFail_NotDone();
0085 }
0086 return slin.Length();
0087 }
0088
0089 inline const occ::handle<IntPatch_Line>& IntPatch_ImpImpIntersection::Line(const int Index) const
0090 {
0091 if (!IsDone())
0092 {
0093 throw StdFail_NotDone();
0094 }
0095 return slin(Index);
0096 }