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>
24 #include <Intf_PIType.hxx>
25 #include <Standard_Integer.hxx>
29 //! Describes an intersection point between polygons and
31 class Intf_SectionPoint
37 //! Returns the location of the SectionPoint.
38 Standard_EXPORT const gp_Pnt& Pnt() const;
40 //! Returns the cumulated Parameter of the SectionPoint on the
42 Standard_Real ParamOnFirst() const;
44 //! Returns the cumulated Parameter of the section point on the
46 Standard_Real ParamOnSecond() const;
48 //! Returns the type of the section point on the first element.
49 Intf_PIType TypeOnFirst() const;
51 //! Returns the type of the section point on the second
53 Intf_PIType TypeOnSecond() const;
55 Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
57 //! Gives the data about the first argument of the Interference.
58 Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
60 Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
62 //! Gives the data about the second argument of the Interference.
63 Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
65 //! Gives the incidence at this section point. The incidence
66 //! between the two triangles is given by the cosine. The best
67 //! incidence is 0. (PI/2). The worst is 1. (null angle).
68 Standard_EXPORT Standard_Real Incidence() const;
70 //! Returns True if the two SectionPoint have the same logical
72 Standard_Boolean IsEqual (const Intf_SectionPoint& Other) const;
73 Standard_Boolean operator== (const Intf_SectionPoint& Other) const
75 return IsEqual(Other);
78 //! Returns True if the two SectionPoints are on the same edge
79 //! of the first or the second element.
80 Standard_EXPORT Standard_Boolean IsOnSameEdge (const Intf_SectionPoint& Other) const;
82 Standard_EXPORT Intf_SectionPoint();
84 //! Builds a SectionPoint with the respective dimensions
85 //! (vertex edge or face) of the concerned arguments and their
86 //! addresses in the Topological structure.
87 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);
89 //! Builds a SectionPoint 2d with the respective dimensions
90 //! (vertex or edge) of the concerned arguments and their
91 //! addresses in the Topological structure.
92 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);
94 //! Merges two SectionPoints.
95 Standard_EXPORT void Merge (Intf_SectionPoint& Other);
97 Standard_EXPORT void Dump (const Standard_Integer Indent) const;
102 Intf_PIType DimenObje;
103 Standard_Integer IndexO1;
104 Standard_Integer IndexO2;
105 Standard_Real ParamObje;
106 Intf_PIType DimenTool;
107 Standard_Integer IndexT1;
108 Standard_Integer IndexT2;
109 Standard_Real ParamTool;
110 Standard_Real Incide;
114 #include <Intf_SectionPoint.lxx>
116 #endif // _Intf_SectionPoint_HeaderFile