LCOV - code coverage report
Current view: top level - algs/AdvFront/meshkit - AF2DfltPlaneProjMaker.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 1 1 100.0 %
Date: 2020-07-01 15:24:36 Functions: 1 1 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * AF2DfltPlaneProjMaker.hpp
       3                 :            :  *
       4                 :            :  * An AF2DfltPlaneProjMaker is an object that implements the default
       5                 :            :  * method for making an AF2PlaneProjection.
       6                 :            :  *
       7                 :            :  * The method depends on having access to the geometric surface.  It uses the
       8                 :            :  * start point of the neighborhood baseline edge as the origin of the plane.
       9                 :            :  * It uses the direction of the neighborhood baseline edge as the x-direction
      10                 :            :  * of the plane.  The mean of the normal vectors to the surface at the
      11                 :            :  * endpoints of the baseline edge, after any component in the x-direction
      12                 :            :  * is removed, is used as the normal to the plane.
      13                 :            :  *
      14                 :            :  * If a sizing function is provided, the size at the midpoint of the
      15                 :            :  * (3-dimensional) baseline edge, which is a point that might not lie on
      16                 :            :  * the surface, will be used as the scale for the plane projection,
      17                 :            :  * provided that the size is larger than zero and is not too much different
      18                 :            :  * than the actual length of the baseline edge.  In other words, a distance
      19                 :            :  * in the plane of that length will be considered a distance of length
      20                 :            :  * one when a rule is applied.  If no sizing function is provided or
      21                 :            :  * the sizing function returns a value that is very near to zero relative
      22                 :            :  * to the actual length of the baseline edge, then the actual length of
      23                 :            :  * the baseline edge will be used as the scale.  If the sizing function
      24                 :            :  * appears to return a reasonably defined value, but the value is much
      25                 :            :  * smaller or larger than the actual length of the baseline edge, then
      26                 :            :  * a scale closer to the actual length that attempts to change the size
      27                 :            :  * towards the desired size will be used.
      28                 :            :  */
      29                 :            : #ifndef AF2DFLTPLANEPROJMAKER_HPP
      30                 :            : #define AF2DFLTPLANEPROJMAKER_HPP
      31                 :            : 
      32                 :            : // C++
      33                 :            : #include <cstddef>
      34                 :            : 
      35                 :            : // MeshKit
      36                 :            : #include "meshkit/AF2LocalTransformMaker.hpp"
      37                 :            : #include "meshkit/SizingFunction.hpp"
      38                 :            : #include "meshkit/iGeom.hpp"
      39                 :            : 
      40         [ -  + ]:        104 : class AF2DfltPlaneProjMaker: public AF2LocalTransformMaker
      41                 :            : {
      42                 :            :   private:
      43                 :            : 
      44                 :            :     iGeom* iGeomPtr;
      45                 :            :     iGeom::EntityHandle surface;
      46                 :            :     MeshKit::SizingFunction* sizing;
      47                 :            : 
      48                 :            :   public:
      49                 :            : 
      50                 :            :     /**
      51                 :            :      * \brief Constructor
      52                 :            :      *
      53                 :            :      * This object does not own any of the objects passed into it.
      54                 :            :      * The memory for these objects must be managed outside of this object.
      55                 :            :      *
      56                 :            :      * \param iGeomPtrArg an iGeom instance
      57                 :            :      * \param surf a handle to a surface geometry representation within the
      58                 :            :      *   iGeom instance
      59                 :            :      * \param sizingArg a sizing function that, if provided, will define the
      60                 :            :      *   preferred size
      61                 :            :      */
      62                 :            :      AF2DfltPlaneProjMaker(iGeom* iGeomPtrArg, iGeom::EntityHandle surf,
      63                 :            :          MeshKit::SizingFunction* sizingArg = NULL);
      64                 :            : 
      65                 :            :     /**
      66                 :            :      * \brief Make an AF2PlaneProjection
      67                 :            :      *
      68                 :            :      * Implements the method from the superclass AF2LocalTransformMaker
      69                 :            :      * to make an AF2PlaneProjection.  See additional documentation
      70                 :            :      * in the superclass.
      71                 :            :      */
      72                 :            :     AF2LocalTransform* makeLocalTransform(
      73                 :            :         const std::list<AF2Point3D*> & ngbhdPoints,
      74                 :            :         const AF2Edge3D* const & baselineEdge,
      75                 :            :         const std::list<const AF2Edge3D*> & otherNgbhdEdges) const;
      76                 :            : };
      77                 :            : 
      78                 :            : #endif

Generated by: LCOV version 1.11