0031499: Boolean Operations - Custom fuzzy value corrupts the result of CUT
[occt.git] / src / IntPatch / IntPatch_Intersection.lxx
CommitLineData
b311480e 1// Created by: Modelization
2// Copyright (c) 1995-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16#include <StdFail_NotDone.hxx>
17#include <Standard_DomainError.hxx>
18#include <IntPatch_Line.hxx>
19
20inline Standard_Boolean IntPatch_Intersection::IsDone () const
21{
22 return done;
23}
24
25inline Standard_Boolean IntPatch_Intersection::IsEmpty () const
26{
9775fa61 27 if (!done) {throw StdFail_NotDone();}
7fd59977 28 return empt;
29}
30
31inline Standard_Boolean IntPatch_Intersection::TangentFaces () const
32{
9775fa61 33 if (!done) {throw StdFail_NotDone();}
7fd59977 34 return tgte;
35}
36
37inline Standard_Boolean IntPatch_Intersection::OppositeFaces () const
38{
9775fa61 39 if (!done) {throw StdFail_NotDone();}
40 if (!tgte) {throw Standard_DomainError();}
7fd59977 41 return oppo;
42}
43
44inline Standard_Integer IntPatch_Intersection::NbPnts () const
45{
9775fa61 46 if (!done) {throw StdFail_NotDone();}
7fd59977 47 return spnt.Length();
48}
49
50inline const IntPatch_Point& IntPatch_Intersection::Point (const Standard_Integer Index) const
51{
9775fa61 52 if (!done) {throw StdFail_NotDone();}
7fd59977 53 return spnt(Index);
54}
55
56inline Standard_Integer IntPatch_Intersection::NbLines () const
57{
9775fa61 58 if (!done) {throw StdFail_NotDone();}
7fd59977 59 return slin.Length();
60}
61
62inline const Handle(IntPatch_Line)& IntPatch_Intersection::Line (const Standard_Integer Index) const
63{
9775fa61 64 if (!done) {throw StdFail_NotDone();}
7fd59977 65 return slin(Index);
66}