1 // Created on: 1992-09-28
2 // Created by: Didier PIFFAULT
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 _Intf_InterferencePolygon2d_HeaderFile
18 #define _Intf_InterferencePolygon2d_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Intf_Interference.hxx>
27 class Standard_OutOfRange;
32 //! Computes the interference between two polygons or
33 //! the self intersection of a polygon in two
35 class Intf_InterferencePolygon2d : public Intf_Interference
42 //! Constructs an empty interference of Polygon.
43 Standard_EXPORT Intf_InterferencePolygon2d();
45 //! Constructs and computes an interference between two Polygons.
46 Standard_EXPORT Intf_InterferencePolygon2d(const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
48 //! Constructs and computes the auto interference of a Polygon.
49 Standard_EXPORT Intf_InterferencePolygon2d(const Intf_Polygon2d& Obje);
51 //! Computes an interference between two Polygons.
52 Standard_EXPORT void Perform (const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
54 //! Computes the self interference of a Polygon.
55 Standard_EXPORT void Perform (const Intf_Polygon2d& Obje);
57 //! Gives the geometrical 2d point of the intersection
58 //! point at address <Index> in the interference.
59 Standard_EXPORT gp_Pnt2d Pnt2dValue (const Standard_Integer Index) const;
73 Standard_EXPORT void Interference (const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
75 Standard_EXPORT void Interference (const Intf_Polygon2d& Obje);
77 Standard_EXPORT void Clean();
79 //! Computes the intersection between two segments
80 //! <BegO><EndO> et <BegT><EndT>.
81 Standard_EXPORT void Intersect (const Standard_Integer iO, const Standard_Integer iT, const gp_Pnt2d& BegO, const gp_Pnt2d& EndO, const gp_Pnt2d& BegT, const gp_Pnt2d& EndT);
84 Standard_Boolean oClos;
85 Standard_Boolean tClos;
86 Standard_Integer nbso;
97 #endif // _Intf_InterferencePolygon2d_HeaderFile