LCOV - code coverage report
Current view: top level - geom/cgm - CylinderEvaluator.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 0 15 0.0 %
Date: 2020-06-30 00:58:45 Functions: 0 14 0.0 %
Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : //-------------------------------------------------------------------------
       2                 :            : // Filename      : CylinderEvaluator.hpp
       3                 :            : //
       4                 :            : // Purpose       : Provide evaluators for a cylindrical surface.  Since a cylinder
       5                 :            : //                 is an analytic primitive, its evaluators can be overwritten
       6                 :            : //                 rather than using the engine, or Facet based evaluators.
       7                 :            : //
       8                 :            : // Special Notes :
       9                 :            : //
      10                 :            : // Creator       : Matthew Staten
      11                 :            : //
      12                 :            : // Creation Date : 09/14/04
      13                 :            : //
      14                 :            : // Owner         : Matthew Staten
      15                 :            : //-------------------------------------------------------------------------
      16                 :            : 
      17                 :            : #ifndef CYLINDER_EVALUATOR_HPP
      18                 :            : #define CYLINDER_EVALUATOR_HPP
      19                 :            : 
      20                 :            : #include "CubitEvaluator.hpp"
      21                 :            : #include "CubitDefines.h"
      22                 :            : #include "CubitVector.hpp"
      23                 :            : #include "GeometryDefines.h"
      24                 :            : 
      25         [ #  # ]:          0 : class CUBIT_GEOM_EXPORT CylinderEvaluatorData : public CubitEvaluatorData
      26                 :            : {
      27                 :            : public:
      28                 :            :     double height;
      29                 :            :     double base_radius_x;
      30                 :            :     double base_radius_y;
      31                 :            :     double top_radius;
      32                 :            : 
      33                 :          0 :     virtual GeometryType ask_type() const { return CONE_SURFACE_TYPE; }
      34                 :            : };
      35                 :            : 
      36                 :            : class CUBIT_GEOM_EXPORT CylinderEvaluator: public CubitEvaluator
      37                 :            : {
      38                 :            : 
      39                 :            : private:
      40                 :            : 
      41                 :            :     CylinderEvaluatorData mEvalData;
      42                 :            : 
      43                 :            : protected: 
      44                 :            : 
      45                 :            :     CubitVector base() const;
      46                 :            : 
      47                 :            : public :
      48                 :            :   
      49                 :            :     CylinderEvaluator( const CylinderEvaluatorData *data );
      50                 :            : 
      51                 :          0 :   virtual ~CylinderEvaluator()
      52 [ #  # ][ #  # ]:          0 :     {}
      53                 :            :   
      54                 :          0 :     virtual GeometryType ask_type() { return CONE_SURFACE_TYPE; }
      55                 :          0 :     virtual CubitBoolean is_parametric() const { return CUBIT_TRUE; }
      56                 :          0 :     virtual CubitBoolean is_periodic() const { return CUBIT_TRUE; }
      57                 :          0 :     virtual CubitBoolean is_periodic_in_U( double &period ) const { period = 2*CUBIT_PI;
      58                 :          0 :                                                                     return CUBIT_TRUE; }
      59                 :          0 :     virtual CubitBoolean is_periodic_in_V( double &period ) const { period = mEvalData.height;
      60                 :          0 :                                                                     return CUBIT_FALSE; }
      61                 :          0 :     virtual CubitBoolean is_singular_in_U() const { return CUBIT_FALSE; }
      62                 :          0 :     virtual CubitBoolean is_singular_in_V() const { return CUBIT_FALSE; }
      63                 :          0 :     virtual CubitBoolean is_closed_in_U() const { return CUBIT_TRUE; }
      64                 :          0 :     virtual CubitBoolean is_closed_in_V() const { return CUBIT_FALSE; }
      65                 :            :     virtual CubitBoolean get_param_range_U( double& lower_bound,
      66                 :            :                                             double& upper_bound ) const;
      67                 :            :     virtual CubitBoolean get_param_range_V( double& lower_bound,
      68                 :            :                                             double& upper_bound ) const;
      69                 :            :     virtual CubitVector position_from_u_v( double u, double v ) const;
      70                 :            :     virtual CubitStatus u_v_from_position( CubitVector const& location,
      71                 :            :                                            double& u,
      72                 :            :                                            double& v,
      73                 :            :                                            CubitVector* closest_location ) const;
      74                 :            : 
      75                 :            :     virtual const CubitEvaluatorData* evaluator_data() const;
      76                 :            : 
      77                 :            :     virtual CubitBox bounding_box() const;
      78                 :            :     //- Return the bounding box of this cylinder.
      79                 :            : 
      80                 :            :     virtual CubitStatus principal_curvatures( CubitVector const& location, 
      81                 :            :                                               double& curvature_1,
      82                 :            :                                               double& curvature_2,
      83                 :            :                                               CubitVector* closest_location = NULL );
      84                 :            :     //R CubitStatus
      85                 :            :     //R- CUBIT_SUCCESS/FAILURE
      86                 :            :     //I location
      87                 :            :     //I- The point at which the curvatures are being requested -- it is also
      88                 :            :     //I- the point to which the closest point on the surface is returned.
      89                 :            :     //I- curvatures.
      90                 :            :     //O closest_location
      91                 :            :     //O- The point on the surface, closest to the input location (this
      92                 :            :     //O- might not be on the surface).  This is input as a reference 
      93                 :            :     //O- so that the function can modify its contents.
      94                 :            :     //O curvature_1/2
      95                 :            :     //O- Returned principal curvature magnitudes.
      96                 :            :     //- This functions computes the point on the surface that is closest
      97                 :            :     //- to the input location and then calculates the magnitudes of the
      98                 :            :     //- principal curvatures at this (possibly, new) point on the surface. 
      99                 :            : 
     100                 :            :     virtual CubitStatus closest_point( CubitVector const& location,
     101                 :            :                                        CubitVector* closest_location = NULL,
     102                 :            :                                        CubitVector* unit_normal_ptr = NULL,
     103                 :            :                                        CubitVector* curvature1_ptr = NULL,
     104                 :            :                                        CubitVector* curvature2_ptr = NULL ) const;
     105                 :            :     //R CubitStatus
     106                 :            :     //R- CUBIT_SUCCESS/FAILURE
     107                 :            :     //I location
     108                 :            :     //I- The point to which the closest point on the surface is desired.
     109                 :            :     //O closest_location
     110                 :            :     //O- The point on the Surface, closest to the 
     111                 :            :     //O- input location (which might not be on the Surface).  This is
     112                 :            :     //O- input as a reference so that the function can modify its
     113                 :            :     //O- contents.
     114                 :            :     //O unit_normal_ptr
     115                 :            :     //O- The normal (represented as a unit vector) at the closest_location.
     116                 :            :     //O- If this pointer is NULL, the normal is not returned.
     117                 :            :     //O curvature1_ptr
     118                 :            :     //O- The first principal curvature of the surface at closest_location.
     119                 :            :     //O- If this pointer is NULL, this curvature is not returned.
     120                 :            :     //O curvature2_ptr
     121                 :            :     //O- The second principal curvature of the surface at closest_location.
     122                 :            :     //O- If this pointer is NULL, this curvature is not returned.
     123                 :            :     //- This function computes the point on the surface closest to the input 
     124                 :            :     //- location -- i.e., closest_location. 
     125                 :            :     //- The first Facet FACE in the list
     126                 :            :     //- is queried.
     127                 :            :     //-
     128                 :            :     //- If the input pointer values of unit_normal, curvature1 and
     129                 :            :     //- curvature2
     130                 :            :     //- are non-NULL, the normal and principal curvatures, too, are
     131                 :            :     //- returned.  These are computed at closest_location, not at the
     132                 :            :     //- input location.
     133                 :            :     //-
     134                 :            :     //- NOTE:
     135                 :            :     //- It is assumed that if the calling code needs the normal or the 
     136                 :            :     //- principal curvatures, it will *allocate* space for the CubitVectors
     137                 :            :     //- before sending in the pointers.
     138                 :            : 
     139                 :            : };
     140                 :            : 
     141                 :            : 
     142                 :            : // ********** BEGIN INLINE FUNCTIONS       **********
     143                 :            : // ********** END INLINE FUNCTIONS         **********
     144                 :            : 
     145                 :            : // ********** BEGIN FRIEND FUNCTIONS       **********
     146                 :            : // ********** END FRIEND FUNCTIONS         **********
     147                 :            : 
     148                 :            : // ********** BEGIN EXTERN FUNCTIONS       **********
     149                 :            : // ********** END EXTERN FUNCTIONS         **********
     150                 :            : 
     151                 :            : #endif
     152                 :            : 

Generated by: LCOV version 1.11