1 // Created on: 1991-06-24
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_Interference_HeaderFile
18 #define _Intf_Interference_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Intf_SeqOfSectionPoint.hxx>
25 #include <Intf_SeqOfSectionLine.hxx>
26 #include <Intf_SeqOfTangentZone.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_Real.hxx>
29 #include <Standard_Integer.hxx>
30 class Standard_OutOfRange;
31 class Intf_SectionPoint;
32 class Intf_SectionLine;
33 class Intf_TangentZone;
36 //! Describes the Interference computation result
37 //! between polygon2d or polygon3d or polyhedron
38 //! (as three sequences of points of intersection,
39 //! polylines of intersection and zones de tangence).
40 class Intf_Interference
47 //! Gives the number of points of intersection in the
49 Standard_Integer NbSectionPoints() const;
51 //! Gives the point of intersection of address Index in
53 const Intf_SectionPoint& PntValue (const Standard_Integer Index) const;
55 //! Gives the number of polylines of intersection in the
57 Standard_Integer NbSectionLines() const;
59 //! Gives the polyline of intersection at address <Index> in
61 const Intf_SectionLine& LineValue (const Standard_Integer Index) const;
63 //! Gives the number of zones of tangence in the interference.
64 Standard_Integer NbTangentZones() const;
66 //! Gives the zone of tangence at address Index in the
68 const Intf_TangentZone& ZoneValue (const Standard_Integer Index) const;
70 //! Gives the tolerance used for the calculation.
71 Standard_Real GetTolerance() const;
73 //! Tests if the polylines of intersection or the zones of
74 //! tangence contain the point of intersection <ThePnt>.
75 Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePnt) const;
77 //! Inserts a new zone of tangence in the current list of
78 //! tangent zones of the interference and returns True
80 Standard_EXPORT Standard_Boolean Insert (const Intf_TangentZone& TheZone);
82 //! Insert a new segment of intersection in the current list of
83 //! polylines of intersection of the interference.
84 Standard_EXPORT void Insert (const Intf_SectionPoint& pdeb, const Intf_SectionPoint& pfin);
86 Standard_EXPORT void Dump() const;
94 Standard_EXPORT Intf_Interference(const Standard_Boolean Self);
96 //! Destructor is protected, for safer inheritance
97 ~Intf_Interference () {}
99 //! Only one argument for the intersection.
100 Standard_EXPORT void SelfInterference (const Standard_Boolean Self);
103 Intf_SeqOfSectionPoint mySPoins;
104 Intf_SeqOfSectionLine mySLines;
105 Intf_SeqOfTangentZone myTZones;
106 Standard_Boolean SelfIntf;
107 Standard_Real Tolerance;
119 #include <Intf_Interference.lxx>
125 #endif // _Intf_Interference_HeaderFile