1 // Created on: 1992-04-03
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IntRes2d_IntersectionSegment_HeaderFile
18 #define _IntRes2d_IntersectionSegment_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <IntRes2d_IntersectionPoint.hxx>
26 class Standard_DomainError;
27 class IntRes2d_IntersectionPoint;
30 //! Definition of an intersection curve between
32 class IntRes2d_IntersectionSegment
39 //! Empty constructor.
40 Standard_EXPORT IntRes2d_IntersectionSegment();
42 IntRes2d_IntersectionSegment(const IntRes2d_IntersectionPoint& P1, const IntRes2d_IntersectionPoint& P2, const Standard_Boolean Oppos, const Standard_Boolean ReverseFlag);
44 IntRes2d_IntersectionSegment(const IntRes2d_IntersectionPoint& P, const Standard_Boolean First, const Standard_Boolean Oppos, const Standard_Boolean ReverseFlag);
46 //! Creates an infinite segment of intersection.
47 IntRes2d_IntersectionSegment(const Standard_Boolean Oppos);
49 //! Returns FALSE if the intersection segment has got
50 //! the same orientation on both curves.
51 Standard_Boolean IsOpposite() const;
53 //! Returns True if the segment is limited by a first
54 //! point. This point defines the lowest parameter
55 //! admitted on the first curve for the segment. If
56 //! IsOpposite returns False, it defines the lowest
57 //! parameter on the second curve, otherwise, it is
58 //! the highest parameter on the second curve.
59 Standard_Boolean HasFirstPoint() const;
61 //! Returns the first point of the segment as an
62 //! IntersectionPoint (with a transition). The
63 //! exception DomainError is raised if HasFirstPoint
65 const IntRes2d_IntersectionPoint& FirstPoint() const;
67 //! Returns True if the segment is limited by a last
68 //! point. This point defines the highest parameter
69 //! admitted on the first curve for the segment. If
70 //! IsOpposite returns False, it defines the highest
71 //! parameter on the second curve, otherwise, it is
72 //! the lowest parameter on the second curve.
73 Standard_Boolean HasLastPoint() const;
75 //! Returns the last point of the segment as an
76 //! IntersectionPoint (with a transition). The
77 //! exception DomainError is raised if
78 //! HasLastExtremity returns False.
79 const IntRes2d_IntersectionPoint& LastPoint() const;
94 Standard_Boolean oppos;
95 Standard_Boolean first;
96 Standard_Boolean last;
97 IntRes2d_IntersectionPoint ptfirst;
98 IntRes2d_IntersectionPoint ptlast;
104 #include <IntRes2d_IntersectionSegment.lxx>
110 #endif // _IntRes2d_IntersectionSegment_HeaderFile