Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:50

0001 // Created on: 1995-06-22
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1995-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 _HLRAlgo_BiPoint_HeaderFile
0018 #define _HLRAlgo_BiPoint_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <gp_XYZ.hxx>
0027 #include <gp_XY.hxx>
0028 
0029 
0030 
0031 class HLRAlgo_BiPoint
0032 {
0033 public:
0034   struct IndicesT
0035   {
0036     IndicesT()
0037     : ShapeIndex(-1),
0038       FaceConex1(0),
0039       Face1Pt1(0),
0040       Face1Pt2(0),
0041       FaceConex2(0),
0042       Face2Pt1(0),
0043       Face2Pt2(0),
0044       MinSeg(0),
0045       MaxSeg(0),
0046       SegFlags(0)
0047     {
0048     }
0049     Standard_Integer ShapeIndex;
0050     Standard_Integer FaceConex1;
0051     Standard_Integer Face1Pt1;
0052     Standard_Integer Face1Pt2;
0053     Standard_Integer FaceConex2;
0054     Standard_Integer Face2Pt1;
0055     Standard_Integer Face2Pt2;
0056     Standard_Integer MinSeg;
0057     Standard_Integer MaxSeg;
0058     Standard_Integer SegFlags;
0059   };
0060 
0061   struct PointsT
0062   {
0063     gp_XYZ Pnt1;
0064     gp_XYZ Pnt2;
0065     gp_XYZ PntP1;
0066     gp_XYZ PntP2;
0067 
0068     gp_XY PntP12D() const
0069     {
0070       return gp_XY(PntP1.X(), PntP1.Y());
0071     }
0072 
0073     gp_XY PntP22D() const
0074     {
0075       return gp_XY(PntP2.X(), PntP2.Y());
0076     }
0077   };
0078 
0079   DEFINE_STANDARD_ALLOC
0080 
0081   HLRAlgo_BiPoint() {}
0082 
0083   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
0084   
0085   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer flag);
0086   
0087   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
0088   
0089   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer flag);
0090   
0091   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
0092   
0093   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer flag);
0094 
0095   Standard_Boolean Rg1Line() const
0096   {
0097     return (myIndices.SegFlags & EMskRg1Line) != 0;
0098   }
0099 
0100   void Rg1Line (const Standard_Boolean B)
0101   {
0102     if (B) myIndices.SegFlags |=  EMskRg1Line;
0103     else   myIndices.SegFlags &= ~EMskRg1Line;
0104   }
0105 
0106   Standard_Boolean RgNLine() const
0107   {
0108     return (myIndices.SegFlags & EMskRgNLine) != 0;
0109   }
0110 
0111   void RgNLine (const Standard_Boolean B)
0112   {
0113     if (B) myIndices.SegFlags |=  EMskRgNLine;
0114     else   myIndices.SegFlags &= ~EMskRgNLine;
0115   }
0116 
0117   Standard_Boolean OutLine() const
0118   {
0119     return (myIndices.SegFlags & EMskOutLine) != 0;
0120   }
0121 
0122   void OutLine (const Standard_Boolean B)
0123   {
0124     if (B) myIndices.SegFlags |=  EMskOutLine;
0125     else   myIndices.SegFlags &= ~EMskOutLine;
0126   }
0127 
0128   Standard_Boolean IntLine() const
0129   {
0130     return (myIndices.SegFlags & EMskIntLine) != 0;
0131   }
0132 
0133   void IntLine (const Standard_Boolean B)
0134   {
0135     if (B) myIndices.SegFlags |=  EMskIntLine;
0136     else   myIndices.SegFlags &= ~EMskIntLine;
0137   }
0138 
0139   Standard_Boolean Hidden() const
0140   {
0141     return (myIndices.SegFlags & EMskHidden) != 0;
0142   }
0143 
0144   void Hidden (const Standard_Boolean B)
0145   {
0146     if (B) myIndices.SegFlags |=  EMskHidden;
0147     else   myIndices.SegFlags &= ~EMskHidden;
0148   }
0149 
0150   IndicesT& Indices()
0151   {
0152     return myIndices;
0153   }
0154 
0155   PointsT& Points()
0156   {
0157     return myPoints;
0158   }
0159 
0160 protected:
0161 
0162   enum EMskFlags
0163   {
0164     EMskRg1Line = 1,
0165     EMskRgNLine = 2,
0166     EMskOutLine = 4,
0167     EMskIntLine = 8,
0168     EMskHidden  = 16
0169   };
0170 
0171 private:
0172   IndicesT myIndices;
0173   PointsT myPoints;
0174 
0175 };
0176 
0177 #endif // _HLRAlgo_BiPoint_HeaderFile