Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:17:53

0001 // Created on: 1997-04-17
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1997-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 _HLRBRep_FaceData_HeaderFile
0018 #define _HLRBRep_FaceData_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <HLRBRep_Surface.hxx>
0025 #include <TopAbs_Orientation.hxx>
0026 #include <Standard_Integer.hxx>
0027 class HLRAlgo_WiresBlock;
0028 class TopoDS_Face;
0029 
0030 class HLRBRep_FaceData
0031 {
0032 public:
0033   DEFINE_STANDARD_ALLOC
0034 
0035   Standard_EXPORT HLRBRep_FaceData();
0036 
0037   //! <Or> is the orientation of the face. <Cl> is true
0038   //! if the face belongs to a closed volume. <NW> is
0039   //! the number of wires (or block of edges) of the
0040   //! face.
0041   Standard_EXPORT void Set(const TopoDS_Face&       FG,
0042                            const TopAbs_Orientation Or,
0043                            const bool               Cl,
0044                            const int                NW);
0045 
0046   //! Set <NE> the number of edges of the wire number
0047   //! <WI>.
0048   Standard_EXPORT void SetWire(const int WI, const int NE);
0049 
0050   //! Set the edge number <EWI> of the wire <WI>.
0051   Standard_EXPORT void SetWEdge(const int                WI,
0052                                 const int                EWI,
0053                                 const int                EI,
0054                                 const TopAbs_Orientation Or,
0055                                 const bool               OutL,
0056                                 const bool               Inte,
0057                                 const bool               Dble,
0058                                 const bool               IsoL);
0059 
0060   bool Selected() const;
0061 
0062   void Selected(const bool B);
0063 
0064   bool Back() const;
0065 
0066   void Back(const bool B);
0067 
0068   bool Side() const;
0069 
0070   void Side(const bool B);
0071 
0072   bool Closed() const;
0073 
0074   void Closed(const bool B);
0075 
0076   bool Hiding() const;
0077 
0078   void Hiding(const bool B);
0079 
0080   bool Simple() const;
0081 
0082   void Simple(const bool B);
0083 
0084   bool Cut() const;
0085 
0086   void Cut(const bool B);
0087 
0088   bool WithOutL() const;
0089 
0090   void WithOutL(const bool B);
0091 
0092   bool Plane() const;
0093 
0094   void Plane(const bool B);
0095 
0096   bool Cylinder() const;
0097 
0098   void Cylinder(const bool B);
0099 
0100   bool Cone() const;
0101 
0102   void Cone(const bool B);
0103 
0104   bool Sphere() const;
0105 
0106   void Sphere(const bool B);
0107 
0108   bool Torus() const;
0109 
0110   void Torus(const bool B);
0111 
0112   double Size() const;
0113 
0114   void Size(const double S);
0115 
0116   TopAbs_Orientation Orientation() const;
0117 
0118   void Orientation(const TopAbs_Orientation O);
0119 
0120   occ::handle<HLRAlgo_WiresBlock>& Wires();
0121 
0122   HLRBRep_Surface& Geometry();
0123 
0124   float Tolerance() const;
0125 
0126 protected:
0127   enum EMaskFlags
0128   {
0129     EMaskOrient   = 15,
0130     FMaskSelected = 16,
0131     FMaskBack     = 32,
0132     FMaskSide     = 64,
0133     FMaskClosed   = 128,
0134     FMaskHiding   = 256,
0135     FMaskSimple   = 512,
0136     FMaskCut      = 1024,
0137     FMaskWithOutL = 2048,
0138     FMaskPlane    = 4096,
0139     FMaskCylinder = 8192,
0140     FMaskCone     = 16384,
0141     FMaskSphere   = 32768,
0142     FMaskTorus    = 65536
0143   };
0144 
0145 private:
0146   int                             myFlags;
0147   occ::handle<HLRAlgo_WiresBlock> myWires;
0148   HLRBRep_Surface                 myGeometry;
0149   double                          mySize;
0150   float                           myTolerance;
0151 };
0152 
0153 #include <HLRBRep_FaceData.lxx>
0154 
0155 #endif // _HLRBRep_FaceData_HeaderFile