Back to home page

EIC code displayed by LXR

 
 

    


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

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_SeqOfSectionPoint.hxx>
0025 #include <Standard_Boolean.hxx>
0026 class Intf_SectionPoint;
0027 
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 
0035   DEFINE_STANDARD_ALLOC
0036 
0037   
0038   //! Returns number of SectionPoint in this TangentZone.
0039     Standard_Integer NumberOfPoints() const;
0040   
0041   //! Gives   the   SectionPoint   of  address  <Index>  in  the
0042   //! TangentZone.
0043   Standard_EXPORT const Intf_SectionPoint& GetPoint (const Standard_Integer Index) const;
0044   
0045   //! Compares two TangentZones.
0046   Standard_EXPORT Standard_Boolean IsEqual (const Intf_TangentZone& Other) const;
0047 Standard_Boolean operator == (const Intf_TangentZone& Other) const
0048 {
0049   return IsEqual(Other);
0050 }
0051   
0052   //! Checks if <ThePI> is in TangentZone.
0053   Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePI) const;
0054   
0055   //! Gives  the parameter range of the  TangentZone on the first
0056   //! argument of the Interference. (Usable only for polygon)
0057     void ParamOnFirst (Standard_Real& paraMin, Standard_Real& paraMax) const;
0058   
0059   //! Gives the parameter range of the  TangentZone on the second
0060   //! argument of the Interference. (Usable only for polygon)
0061     void ParamOnSecond (Standard_Real& paraMin, Standard_Real& paraMax) const;
0062   
0063   //! Gives  information  about  the    first argument   of   the
0064   //! Interference. (Usable only for polygon)
0065   Standard_EXPORT void InfoFirst (Standard_Integer& segMin, Standard_Real& paraMin, Standard_Integer& segMax, Standard_Real& paraMax) const;
0066   
0067   //! Gives   information   about  the  second   argument of  the
0068   //! Interference. (Usable only for polygon)
0069   Standard_EXPORT void InfoSecond (Standard_Integer& segMin, Standard_Real& paraMin, Standard_Integer& segMax, Standard_Real& paraMax) const;
0070   
0071   //! Returns True if  <ThePI>  is in the parameter  range of the
0072   //! TangentZone.
0073   Standard_EXPORT Standard_Boolean RangeContains (const Intf_SectionPoint& ThePI) const;
0074   
0075   //! Returns True if the TangentZone  <Other> has  a common part
0076   //! with <me>.
0077   Standard_EXPORT Standard_Boolean HasCommonRange (const Intf_TangentZone& Other) const;
0078   
0079   //! Builds an empty tangent zone.
0080   Standard_EXPORT Intf_TangentZone();
0081 
0082   //! Adds a SectionPoint to the TangentZone.
0083   Standard_EXPORT void Append (const Intf_SectionPoint& Pi);
0084   
0085   //! Adds the TangentZone <Tzi> to <me>.
0086   Standard_EXPORT void Append (const Intf_TangentZone& Tzi);
0087   
0088   //! Inserts a SectionPoint in the TangentZone.
0089   Standard_EXPORT Standard_Boolean Insert (const Intf_SectionPoint& Pi);
0090   
0091   //! Inserts a point in the polygonal TangentZone.
0092   Standard_EXPORT void PolygonInsert (const Intf_SectionPoint& Pi);
0093   
0094   //! Inserts a SectionPoint before <Index> in the TangentZone.
0095   Standard_EXPORT void InsertBefore (const Standard_Integer Index, const Intf_SectionPoint& Pi);
0096   
0097   //! Inserts a SectionPoint after <Index> in the TangentZone.
0098   Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Intf_SectionPoint& Pi);
0099   
0100   Standard_EXPORT void Dump (const Standard_Integer Indent) const;
0101 
0102 
0103 
0104 
0105 protected:
0106 
0107 
0108 
0109 
0110 
0111 private:
0112 
0113 
0114 
0115   Intf_SeqOfSectionPoint Result;
0116   Standard_Real ParamOnFirstMin;
0117   Standard_Real ParamOnFirstMax;
0118   Standard_Real ParamOnSecondMin;
0119   Standard_Real ParamOnSecondMax;
0120 
0121 
0122 };
0123 
0124 
0125 #include <Intf_TangentZone.lxx>
0126 
0127 
0128 
0129 
0130 
0131 #endif // _Intf_TangentZone_HeaderFile