0027302: Invalid curves number in intersection result
[occt.git] / src / IntPatch / IntPatch_PointLine.hxx
CommitLineData
42cf5bc1 1// Created on: 2015-02-18
2// Created by: Nikolai BUKHALOV
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2015 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#ifndef _IntPatch_PointLine_HeaderFile
18#define _IntPatch_PointLine_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <IntPatch_Line.hxx>
77dbd1f1 24#include <IntPatch_Point.hxx>
42cf5bc1 25#include <Standard_Boolean.hxx>
26#include <IntSurf_TypeTrans.hxx>
27#include <IntSurf_Situation.hxx>
28#include <Standard_Integer.hxx>
29class Standard_DomainError;
30class Standard_OutOfRange;
31class IntSurf_PntOn2S;
77dbd1f1 32class IntSurf_LineOn2S;
42cf5bc1 33
34
35class IntPatch_PointLine;
36DEFINE_STANDARD_HANDLE(IntPatch_PointLine, IntPatch_Line)
37
38//! Definition of an intersection line between two
39//! surfaces.
40//! A line defined by a set of points
41//! (e.g. coming from a walking algorithm) as
42//! defined in the class WLine or RLine (Restriction line).
43class IntPatch_PointLine : public IntPatch_Line
44{
45
46public:
47
b8f67cc2 48 //! Adds a vertex in the list. If theIsPrepend == TRUE the new
49 //! vertex will be added before the first element of vertices sequence.
50 //! Otherwise, to the end of the sequence
51 Standard_EXPORT virtual
52 void AddVertex (const IntPatch_Point& Pnt,
53 const Standard_Boolean theIsPrepend = Standard_False) = 0;
77dbd1f1 54
42cf5bc1 55 //! Returns the number of intersection points.
56 Standard_EXPORT virtual Standard_Integer NbPnts() const = 0;
77dbd1f1 57
58 //! Returns number of vertices (IntPatch_Point) of the line
59 Standard_EXPORT virtual Standard_Integer NbVertex() const = 0;
60
42cf5bc1 61 //! Returns the intersection point of range Index.
62 Standard_EXPORT virtual const IntSurf_PntOn2S& Point (const Standard_Integer Index) const = 0;
63
77dbd1f1 64 //! Returns the vertex of range Index on the line.
65 Standard_EXPORT virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const = 0;
42cf5bc1 66
eee615ad 67 //! Returns the vertex of range Index on the line.
68 virtual IntPatch_Point& ChangeVertex (const Standard_Integer Index) = 0;
69
77dbd1f1 70 //! Removes vertices from the line
71 Standard_EXPORT virtual void ClearVertexes() = 0;
42cf5bc1 72
eee615ad 73 //! Removes single vertex from the line
74 Standard_EXPORT virtual void RemoveVertex (const Standard_Integer theIndex) = 0;
75
77dbd1f1 76 //! Returns set of intersection points
77 Standard_EXPORT virtual Handle(IntSurf_LineOn2S) Curve() const = 0;
42cf5bc1 78
92efcf78 79 DEFINE_STANDARD_RTTIEXT(IntPatch_PointLine,IntPatch_Line)
42cf5bc1 80
81protected:
82
83
84 //! To initialize the fields, when the transitions
85 //! are In or Out.
86 Standard_EXPORT IntPatch_PointLine(const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
87
88 //! To initialize the fields, when the transitions
89 //! are Touch.
90 Standard_EXPORT IntPatch_PointLine(const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
91
92 //! To initialize the fields, when the transitions
93 //! are Undecided.
94 Standard_EXPORT IntPatch_PointLine(const Standard_Boolean Tang);
95
96
97
98private:
99
100
101
102
103};
104
105
106
107
108
109
110
111#endif // _IntPatch_PointLine_HeaderFile