Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-28 09:20:42

0001 // Created on: 1991-06-18
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_TangentZone_HeaderFile
0018 #define _Intf_TangentZone_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Intf_SectionPoint.hxx>
0025 #include <NCollection_Sequence.hxx>
0026 #include <Standard_Boolean.hxx>
0027 class Intf_SectionPoint;
0028 
0029 //! Describes a zone of tangence between polygons or
0030 //! polyhedra as a sequence of points of intersection.
0031 class Intf_TangentZone
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   //! Returns number of SectionPoint in this TangentZone.
0037   int NumberOfPoints() const;
0038 
0039   //! Gives the SectionPoint of address <Index> in the
0040   //! TangentZone.
0041   Standard_EXPORT const Intf_SectionPoint& GetPoint(const int Index) const;
0042 
0043   //! Compares two TangentZones.
0044   Standard_EXPORT bool IsEqual(const Intf_TangentZone& Other) const;
0045 
0046   bool operator==(const Intf_TangentZone& Other) const { return IsEqual(Other); }
0047 
0048   //! Checks if <ThePI> is in TangentZone.
0049   Standard_EXPORT bool Contains(const Intf_SectionPoint& ThePI) const;
0050 
0051   //! Gives the parameter range of the TangentZone on the first
0052   //! argument of the Interference. (Usable only for polygon)
0053   void ParamOnFirst(double& paraMin, double& paraMax) const;
0054 
0055   //! Gives the parameter range of the TangentZone on the second
0056   //! argument of the Interference. (Usable only for polygon)
0057   void ParamOnSecond(double& paraMin, double& paraMax) const;
0058 
0059   //! Gives information about the first argument of the
0060   //! Interference. (Usable only for polygon)
0061   Standard_EXPORT void InfoFirst(int& segMin, double& paraMin, int& segMax, double& paraMax) const;
0062 
0063   //! Gives information about the second argument of the
0064   //! Interference. (Usable only for polygon)
0065   Standard_EXPORT void InfoSecond(int& segMin, double& paraMin, int& segMax, double& paraMax) const;
0066 
0067   //! Returns True if <ThePI> is in the parameter range of the
0068   //! TangentZone.
0069   Standard_EXPORT bool RangeContains(const Intf_SectionPoint& ThePI) const;
0070 
0071   //! Returns True if the TangentZone <Other> has a common part
0072   //! with <me>.
0073   Standard_EXPORT bool HasCommonRange(const Intf_TangentZone& Other) const;
0074 
0075   //! Builds an empty tangent zone.
0076   Standard_EXPORT Intf_TangentZone();
0077 
0078   //! Adds a SectionPoint to the TangentZone.
0079   Standard_EXPORT void Append(const Intf_SectionPoint& Pi);
0080 
0081   //! Adds the TangentZone <Tzi> to <me>.
0082   Standard_EXPORT void Append(const Intf_TangentZone& Tzi);
0083 
0084   //! Inserts a SectionPoint in the TangentZone.
0085   Standard_EXPORT bool Insert(const Intf_SectionPoint& Pi);
0086 
0087   //! Inserts a point in the polygonal TangentZone.
0088   Standard_EXPORT void PolygonInsert(const Intf_SectionPoint& Pi);
0089 
0090   //! Inserts a SectionPoint before <Index> in the TangentZone.
0091   Standard_EXPORT void InsertBefore(const int Index, const Intf_SectionPoint& Pi);
0092 
0093   //! Inserts a SectionPoint after <Index> in the TangentZone.
0094   Standard_EXPORT void InsertAfter(const int Index, const Intf_SectionPoint& Pi);
0095 
0096   Standard_EXPORT void Dump(const int Indent) const;
0097 
0098 private:
0099   NCollection_Sequence<Intf_SectionPoint> Result;
0100   double                                  ParamOnFirstMin;
0101   double                                  ParamOnFirstMax;
0102   double                                  ParamOnSecondMin;
0103   double                                  ParamOnSecondMax;
0104 };
0105 
0106 #include <Intf_TangentZone.lxx>
0107 
0108 #endif // _Intf_TangentZone_HeaderFile