1// Created on: 1992-05-07 2// Created by: Jacques GOUSSARD 3// Copyright (c) 1992-1999 Matra Datavision 4// Copyright (c) 1999-2014 OPEN CASCADE SAS 5// 6// This file is part of Open CASCADE Technology software library. 7// 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 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. 13// 14// Alternatively, this file may be used under the terms of Open CASCADE 15// commercial license or contractual agreement. 16 17#include <StdFail_NotDone.hxx> 18#include <Standard_DomainError.hxx> 19#include <IntPatch_Line.hxx> 20 21inline Standard_Boolean IntPatch_ImpImpIntersection::IsDone () const 22{ 23 return (GetStatus() != IntStatus_Fail); 24} 25 26inline IntPatch_ImpImpIntersection::IntStatus 27 IntPatch_ImpImpIntersection::GetStatus() const 28{ 29 return myDone; 30} 31 32inline Standard_Boolean IntPatch_ImpImpIntersection::IsEmpty () const 33{ 34 if (!IsDone ()) { throw StdFail_NotDone(); } 35 return empt; 36} 37 38inline Standard_Boolean IntPatch_ImpImpIntersection::TangentFaces () const 39{ 40 if (!IsDone ()) { throw StdFail_NotDone(); } 41 return tgte; 42} 43 44inline Standard_Boolean IntPatch_ImpImpIntersection::OppositeFaces () const 45{ 46 if (!IsDone ()) { throw StdFail_NotDone(); } 47 if (!tgte) {throw Standard_DomainError();} 48 return oppo; 49} 50 51inline Standard_Integer IntPatch_ImpImpIntersection::NbPnts () const 52{ 53 if (!IsDone ()) { throw StdFail_NotDone(); } 54 return spnt.Length(); 55} 56 57inline const IntPatch_Point& IntPatch_ImpImpIntersection::Point (const Standard_Integer Index) const 58{ 59 if (!IsDone ()) { throw StdFail_NotDone(); } 60 return spnt(Index); 61} 62 63inline Standard_Integer IntPatch_ImpImpIntersection::NbLines () const 64{ 65 if (!IsDone ()) { throw StdFail_NotDone(); } 66 return slin.Length(); 67} 68 69inline const Handle(IntPatch_Line)& IntPatch_ImpImpIntersection::Line (const Standard_Integer Index) const 70{ 71 if (!IsDone ()) { throw StdFail_NotDone(); } 72 return slin(Index); 73} 74