LCOV - code coverage report
Current view: top level - geom/facet/cgm - FacetLump.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 2 12 16.7 %
Date: 2020-06-30 00:58:45 Functions: 1 5 20.0 %
Branches: 0 8 0.0 %

           Branch data     Line data    Source code
       1                 :            : //-------------------------------------------------------------------------
       2                 :            : // Filename      : FacetLump.hpp
       3                 :            : //
       4                 :            : // Purpose       : 
       5                 :            : //
       6                 :            : // Special Notes :
       7                 :            : //
       8                 :            : // Creator       : David White
       9                 :            : //
      10                 :            : // Creation Date : 7/18/2000
      11                 :            : //-------------------------------------------------------------------------
      12                 :            : 
      13                 :            : #ifndef FACET_LUMP_HPP
      14                 :            : #define FACET_LUMP_HPP
      15                 :            : 
      16                 :            : // ********** BEGIN STANDARD INCLUDES      **********
      17                 :            : // ********** END STANDARD INCLUDES        **********
      18                 :            : 
      19                 :            : // ********** BEGIN CUBIT INCLUDES         **********
      20                 :            : #include "CubitDefines.h"
      21                 :            : #include "Lump.hpp"
      22                 :            : #include "FacetAttribSet.hpp"
      23                 :            : // ********** END CUBIT INCLUDES           **********
      24                 :            : 
      25                 :            : // ********** BEGIN FORWARD DECLARATIONS   **********
      26                 :            : class TopologyEntity;
      27                 :            : class BodySM;
      28                 :            : class FacetAttrib;
      29                 :            : 
      30                 :            : class FacetBody;
      31                 :            : class FacetShell;
      32                 :            : class FacetSurface;
      33                 :            : class FacetLoop;
      34                 :            : class FacetCoEdge;
      35                 :            : class FacetCurve;
      36                 :            : class FacetPoint;
      37                 :            : 
      38                 :            : // ********** END FORWARD DECLARATIONS     **********
      39                 :            : 
      40                 :            : class FacetLump : public Lump
      41                 :            : {
      42                 :            : public:
      43                 :            :   
      44                 :            :   FacetLump(DLIList<ShellSM*> &my_shells,
      45                 :            :             BodySM *body_sm_ptr = NULL);
      46                 :            :     //Pass in a list of shells attached to this lump if you have them.
      47                 :            :     //Also pass in the body that this lump belongs to.
      48                 :            :   virtual ~FacetLump();
      49                 :            :     //- The destructor
      50                 :            : 
      51                 :         99 :   void add_body(BodySM* new_body)
      52                 :         99 :     {myBodyPtr = new_body;}
      53                 :            :     
      54                 :            :   virtual void append_simple_attribute_virt(const CubitSimpleAttrib&);
      55                 :            :     //R void
      56                 :            :     //I 
      57                 :            :     //I- 
      58                 :            :     //I- that is to be appended to this OSME object.
      59                 :            :     //- The purpose of this function is to append a 
      60                 :            :     //- attribute to the OSME. The  is attached to each of the 
      61                 :            :     //- underlying solid model entities this one points to.
      62                 :            :   
      63                 :            :   virtual void remove_simple_attribute_virt(const CubitSimpleAttrib&);
      64                 :            :     //R void
      65                 :            :     //I CubitSimpleAttrib*
      66                 :            :     //I- A reference to a CubitSimpleAttrib object which is the object
      67                 :            :     //I- that is to be removed to this OSME object.
      68                 :            :     //- The purpose of this function is to remove a simple
      69                 :            :     //- attribute from the OSME. The attribute is attached to each of the
      70                 :            :     //- underlying solid model entities this one points to.
      71                 :            :   
      72                 :            :   virtual void remove_all_simple_attribute_virt();
      73                 :            :     //R void
      74                 :            :     //I-
      75                 :            :     //- The purpose of this function is to remove all simple
      76                 :            :     //- attributes from the OSME. 
      77                 :            :   
      78                 :            :   virtual CubitStatus get_simple_attribute(DLIList<CubitSimpleAttrib>&);
      79                 :            :   virtual CubitStatus get_simple_attribute(const CubitString& name,
      80                 :            :                                            DLIList<CubitSimpleAttrib>&);
      81                 :            :     //R CubitSimpleAttrib*
      82                 :            :     //R- the returned cubit simple attribute.
      83                 :            :     //- The purpose of this function is to get the attributes
      84                 :            :     //- of the geometry entity. The name is attached to the underlying solid
      85                 :            :     //- model entity(ies) this one points to.
      86                 :            :     //- MJP Note:
      87                 :            :     //- This is the code that implements the requirement that names
      88                 :            :     //- of VGI Entities propagate across solid model boolean
      89                 :            :     //- operations.  The success of this relies, of course, on the underlying
      90                 :            :     //- solid modeler being able to propagate attributes across
      91                 :            :     //- such operations on its entities. If it cannot, then "names"
      92                 :            :     //- of VGI entities will not propagate.
      93                 :            :   
      94                 :            :   virtual CubitBox bounding_box() const ;
      95                 :            :   
      96                 :            :   virtual GeometryQueryEngine* 
      97                 :            :   get_geometry_query_engine() const;
      98                 :            :     //R GeometryQueryEngine*
      99                 :            :     //R- A pointer to the geometric modeling engine associated with
     100                 :            :     //R- the object.
     101                 :            :     //- This function returns a pointer to the geometric modeling engine
     102                 :            :     //- associated with the object.
     103                 :            :   
     104                 :          0 :   virtual CubitStatus merge( GeometryEntity* /*GEPtr*/)
     105                 :            :     {
     106         [ #  # ]:          0 :       PRINT_ERROR("BUG: In FacetLump::merge\n"
     107                 :            :                   "     This function should not be called at all\n"
     108         [ #  # ]:          0 :                   "  This is a Bug -- please report it!\n");
     109                 :          0 :       return CUBIT_FAILURE;
     110                 :            :     }
     111                 :            :   
     112                 :          0 :   virtual TopologyEntity* unmerge(DLIList<RefVolume*>)
     113                 :            :     {
     114         [ #  # ]:          0 :       PRINT_ERROR( "BUG: In FacetLump::unmerge\n"
     115                 :            :                    "     This function should not be called\n"
     116         [ #  # ]:          0 :                    "  This is a Bug -- please report it!\n" );
     117                 :          0 :       return (TopologyEntity*)NULL;
     118                 :            :     }
     119                 :            :   
     120                 :            :   virtual double measure();
     121                 :            :     //R double
     122                 :            :     //R- The numeric value of the measure (its units depend on the dimension
     123                 :            :     //R- of the RefEntity being "measured")
     124                 :            :     //- A generic geometric extent function.
     125                 :            :     //- Returns volume for Lump, area for Surface, length for Curve and 
     126                 :            :     //- 1.0 for Point
     127                 :            : 
     128                 :            :   CubitStatus save_attribs( FILE* file_ptr );
     129                 :            :     // Write FactAttribs out to file
     130                 :            : 
     131                 :            :   CubitStatus restore_attribs( FILE* file_ptr, unsigned int endian );
     132                 :            :     // Read FactAttribs from file
     133                 :            :   
     134                 :            :   void get_bodies  ( DLIList<FacetBody   *>& bodies   );
     135                 :            :   void get_shells  ( DLIList<FacetShell  *>& shells   );
     136                 :            :   void get_surfaces( DLIList<FacetSurface*>& surfaces );
     137                 :            :   void get_coedges ( DLIList<FacetCoEdge *>& coedges  );
     138                 :            :   void get_curves  ( DLIList<FacetCurve  *>& curves   );
     139                 :            : 
     140                 :            :   void get_parents_virt( DLIList<TopologyBridge*>& parents );
     141                 :            :   void get_children_virt( DLIList<TopologyBridge*>& children );
     142                 :            : 
     143                 :          0 :   inline BodySM* get_body() const { return myBodyPtr; }
     144                 :            :     
     145                 :          0 :   inline void remove_body() {myBodyPtr = 0;}
     146                 :            :  
     147                 :            :   void add_shell( FacetShell *shell ); 
     148                 :            :   void remove_shell( FacetShell *shell ); 
     149                 :            : 
     150                 :            :   void disconnect_all_shells();
     151                 :            :   
     152                 :            :   CubitStatus mass_properties( CubitVector& centroid, double& volume );
     153                 :            : 
     154                 :            :   CubitPointContainment point_containment( const CubitVector &point, double tolerance );
     155                 :            : 
     156                 :            :     //is this lump a sheet
     157                 :            :   CubitBoolean is_sheet( );
     158                 :            : 
     159                 :            : protected: 
     160                 :            :   
     161                 :            : private:
     162                 :            :   DLIList<ShellSM*> myShells;
     163                 :            :   BodySM *myBodyPtr;
     164                 :            : 
     165                 :            :   FacetAttribSet attribSet;
     166                 :            :     //List of FacetAttrib*'s instead of CubitSimpleAttribs 
     167                 :            : } ;
     168                 :            : 
     169                 :            : 
     170                 :            : // ********** BEGIN INLINE FUNCTIONS       **********
     171                 :            : // ********** END INLINE FUNCTIONS         **********
     172                 :            : 
     173                 :            : // ********** BEGIN FRIEND FUNCTIONS       **********
     174                 :            : // ********** END FRIEND FUNCTIONS         **********
     175                 :            : 
     176                 :            : // ********** BEGIN EXTERN FUNCTIONS       **********
     177                 :            : // ********** END EXTERN FUNCTIONS         **********
     178                 :            : 
     179                 :            : #endif
     180                 :            : 

Generated by: LCOV version 1.11