1 // Created on: 2000-10-27
2 // Created by: Peter KURNEV
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _IntTools_CommonPrt_HeaderFile
17 #define _IntTools_CommonPrt_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
23 #include <TopoDS_Edge.hxx>
24 #include <TopAbs_ShapeEnum.hxx>
25 #include <IntTools_Range.hxx>
26 #include <Standard_Real.hxx>
27 #include <IntTools_SequenceOfRanges.hxx>
28 #include <Standard_Boolean.hxx>
35 //! The class is to describe a common part
36 //! between two edges in 3-d space.
37 class IntTools_CommonPrt
46 Standard_EXPORT IntTools_CommonPrt();
50 Standard_EXPORT IntTools_CommonPrt(const IntTools_CommonPrt& aCPrt);
52 Standard_EXPORT IntTools_CommonPrt& Assign (const IntTools_CommonPrt& Other);
53 IntTools_CommonPrt& operator = (const IntTools_CommonPrt& Other)
59 //! Sets the first edge.
60 Standard_EXPORT void SetEdge1 (const TopoDS_Edge& anE);
63 //! Sets the second edge.
64 Standard_EXPORT void SetEdge2 (const TopoDS_Edge& anE);
67 //! Sets the type of the common part
69 Standard_EXPORT void SetType (const TopAbs_ShapeEnum aType);
72 //! Sets the range of first edge.
73 Standard_EXPORT void SetRange1 (const IntTools_Range& aR);
76 //! Sets the range of first edge.
77 Standard_EXPORT void SetRange1 (const Standard_Real tf, const Standard_Real tl);
80 //! Appends the range of second edge.
81 Standard_EXPORT void AppendRange2 (const IntTools_Range& aR);
84 //! Appends the range of second edge.
85 Standard_EXPORT void AppendRange2 (const Standard_Real tf, const Standard_Real tl);
88 //! Sets a parameter of first vertex
89 Standard_EXPORT void SetVertexParameter1 (const Standard_Real tV);
92 //! Sets a parameter of second vertex
93 Standard_EXPORT void SetVertexParameter2 (const Standard_Real tV);
96 //! Returns the first edge.
97 Standard_EXPORT const TopoDS_Edge& Edge1() const;
100 //! Returns the second edge
101 Standard_EXPORT const TopoDS_Edge& Edge2() const;
104 //! Returns the type of the common part
105 Standard_EXPORT TopAbs_ShapeEnum Type() const;
108 //! Returns the range of first edge
109 Standard_EXPORT const IntTools_Range& Range1() const;
112 //! Returns the range of first edge.
113 Standard_EXPORT void Range1 (Standard_Real& tf, Standard_Real& tl) const;
116 //! Returns the ranges of second edge.
117 Standard_EXPORT const IntTools_SequenceOfRanges& Ranges2() const;
120 //! Returns the ranges of second edge.
121 Standard_EXPORT IntTools_SequenceOfRanges& ChangeRanges2();
124 //! Returns parameter of first vertex
125 Standard_EXPORT Standard_Real VertexParameter1() const;
128 //! Returns parameter of second vertex
129 Standard_EXPORT Standard_Real VertexParameter2() const;
132 //! Copies me to anOther
133 Standard_EXPORT void Copy (IntTools_CommonPrt& anOther) const;
137 Standard_EXPORT Standard_Boolean AllNullFlag() const;
141 Standard_EXPORT void SetAllNullFlag (const Standard_Boolean aFlag);
145 Standard_EXPORT void SetBoundingPoints (const gp_Pnt& aP1, const gp_Pnt& aP2);
149 Standard_EXPORT void BoundingPoints (gp_Pnt& aP1, gp_Pnt& aP2) const;
166 TopAbs_ShapeEnum myType;
167 IntTools_Range myRange1;
168 Standard_Real myVertPar1;
169 Standard_Real myVertPar2;
170 IntTools_SequenceOfRanges myRanges2;
171 Standard_Boolean myAllNullFlag;
184 #endif // _IntTools_CommonPrt_HeaderFile