Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:08

0001 // Created on: 1991-06-24
0002 // Created by: Didier PIFFAULT
0003 // Copyright (c) 1991-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Intf_Interference_HeaderFile
0018 #define _Intf_Interference_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Intf_SeqOfSectionPoint.hxx>
0025 #include <Intf_SeqOfSectionLine.hxx>
0026 #include <Intf_SeqOfTangentZone.hxx>
0027 #include <Standard_Boolean.hxx>
0028 class Intf_SectionPoint;
0029 class Intf_SectionLine;
0030 class Intf_TangentZone;
0031 
0032 
0033 //! Describes the   Interference  computation    result
0034 //! between polygon2d or polygon3d or polyhedron
0035 //! (as  three sequences   of  points  of  intersection,
0036 //! polylines of intersection and zones de tangence).
0037 class Intf_Interference 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044   //! Gives the number   of  points of  intersection  in the
0045   //! interference.
0046     Standard_Integer NbSectionPoints() const;
0047   
0048   //! Gives the point of  intersection of address  Index in
0049   //! the interference.
0050     const Intf_SectionPoint& PntValue (const Standard_Integer Index) const;
0051   
0052   //! Gives the number  of polylines of  intersection in the
0053   //! interference.
0054     Standard_Integer NbSectionLines() const;
0055   
0056   //! Gives the polyline of intersection at address <Index> in
0057   //! the interference.
0058     const Intf_SectionLine& LineValue (const Standard_Integer Index) const;
0059   
0060   //! Gives the number of zones of tangence in the interference.
0061     Standard_Integer NbTangentZones() const;
0062   
0063   //! Gives  the zone of  tangence at address   Index in the
0064   //! interference.
0065     const Intf_TangentZone& ZoneValue (const Standard_Integer Index) const;
0066   
0067   //! Gives the tolerance used for the calculation.
0068     Standard_Real GetTolerance() const;
0069   
0070   //! Tests if the polylines of  intersection or the zones of
0071   //! tangence contain the point of intersection <ThePnt>.
0072   Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePnt) const;
0073   
0074   //! Inserts a new zone of tangence in  the current list of
0075   //! tangent zones of  the interference  and  returns  True
0076   //! when done.
0077   Standard_EXPORT Standard_Boolean Insert (const Intf_TangentZone& TheZone);
0078   
0079   //! Insert a new segment of intersection in the current  list of
0080   //! polylines of intersection of the interference.
0081   Standard_EXPORT void Insert (const Intf_SectionPoint& pdeb, const Intf_SectionPoint& pfin);
0082   
0083   Standard_EXPORT void Dump() const;
0084 
0085 
0086 
0087 
0088 protected:
0089 
0090   //! Empty constructor
0091   Standard_EXPORT Intf_Interference(const Standard_Boolean Self);
0092   
0093   //! Destructor is protected, for safer inheritance
0094   ~Intf_Interference () {}
0095 
0096   //! Only one argument for the intersection.
0097   Standard_EXPORT void SelfInterference (const Standard_Boolean Self);
0098 
0099 
0100   Intf_SeqOfSectionPoint mySPoins;
0101   Intf_SeqOfSectionLine mySLines;
0102   Intf_SeqOfTangentZone myTZones;
0103   Standard_Boolean SelfIntf;
0104   Standard_Real Tolerance;
0105 
0106 
0107 private:
0108 
0109 
0110 
0111 
0112 
0113 };
0114 
0115 
0116 #include <Intf_Interference.lxx>
0117 
0118 
0119 
0120 
0121 
0122 #endif // _Intf_Interference_HeaderFile