1 // Created on: 1991-06-18
2 // Created by: Didier PIFFAULT
3 // Copyright (c) 1991-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 _Intf_SectionPoint_HeaderFile
18 #define _Intf_SectionPoint_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
25 #include <Intf_PIType.hxx>
26 #include <Standard_Integer.hxx>
27 #include <Standard_Real.hxx>
28 #include <Standard_Boolean.hxx>
33 //! Describes an intersection point between polygons and
35 class Intf_SectionPoint
42 //! Returns the location of the SectionPoint.
43 Standard_EXPORT const gp_Pnt& Pnt() const;
45 //! Returns the cumulated Parameter of the SectionPoint on the
47 Standard_Real ParamOnFirst() const;
49 //! Returns the cumulated Parameter of the section point on the
51 Standard_Real ParamOnSecond() const;
53 //! Returns the type of the section point on the first element.
54 Intf_PIType TypeOnFirst() const;
56 //! Returns the type of the section point on the second
58 Intf_PIType TypeOnSecond() const;
60 Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
62 //! Gives the datas about the first argument of the
64 Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
66 Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
68 //! Gives the datas about the second argument of the
70 Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
72 //! Gives the incidence at this section point. The incidence
73 //! between the two triangles is given by the cosine. The best
74 //! incidence is 0. (PI/2). The worst is 1. (null angle).
75 Standard_EXPORT Standard_Real Incidence() const;
77 //! Returns True if the two SectionPoint have the same logical
79 Standard_Boolean IsEqual (const Intf_SectionPoint& Other) const;
80 Standard_Boolean operator== (const Intf_SectionPoint& Other) const
82 return IsEqual(Other);
85 //! Returns True if the two SectionPoints are on the same edge
86 //! of the first or the second element.
87 Standard_EXPORT Standard_Boolean IsOnSameEdge (const Intf_SectionPoint& Other) const;
89 Standard_EXPORT Intf_SectionPoint();
91 //! Builds a SectionPoint with the respective dimensions
92 //! (vertex edge or face) of the concerned arguments and their
93 //! addresses in the Topological structure.
94 Standard_EXPORT Intf_SectionPoint(const gp_Pnt& Where, const Intf_PIType DimeO, const Standard_Integer AddrO1, const Standard_Integer AddrO2, const Standard_Real ParamO, const Intf_PIType DimeT, const Standard_Integer AddrT1, const Standard_Integer AddrT2, const Standard_Real ParamT, const Standard_Real Incid);
96 //! Builds a SectionPoint 2d with the respective dimensions
97 //! (vertex or edge) of the concerned arguments and their
98 //! addresses in the Topological structure.
99 Standard_EXPORT Intf_SectionPoint(const gp_Pnt2d& Where, const Intf_PIType DimeO, const Standard_Integer AddrO1, const Standard_Real ParamO, const Intf_PIType DimeT, const Standard_Integer AddrT1, const Standard_Real ParamT, const Standard_Real Incid);
101 //! Merges two SectionPoints.
102 Standard_EXPORT void Merge (Intf_SectionPoint& Other);
104 Standard_EXPORT void Dump (const Standard_Integer Indent) const;
120 Intf_PIType DimenObje;
121 Standard_Integer IndexO1;
122 Standard_Integer IndexO2;
123 Standard_Real ParamObje;
124 Intf_PIType DimenTool;
125 Standard_Integer IndexT1;
126 Standard_Integer IndexT2;
127 Standard_Real ParamTool;
128 Standard_Real Incide;
134 #include <Intf_SectionPoint.lxx>
140 #endif // _Intf_SectionPoint_HeaderFile