LCOV - code coverage report
Current view: top level - geom/OCC/cgm - OCCPoint.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 5 5 100.0 %
Date: 2020-06-30 00:58:45 Functions: 5 5 100.0 %
Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : //-------------------------------------------------------------------------
       2                 :            : // Filename      : OCCPoint.hpp
       3                 :            : //
       4                 :            : // Purpose       : 
       5                 :            : //
       6                 :            : // Special Notes : 
       7                 :            : //
       8                 :            : // Creator       : Steven J. Owen
       9                 :            : //
      10                 :            : // Creation Date : 08/02/96
      11                 :            : //
      12                 :            : // Owner         : Steven J. Owen
      13                 :            : //-------------------------------------------------------------------------
      14                 :            : 
      15                 :            : #ifndef POINT_OCCPOINT_HPP
      16                 :            : #define POINT_OCCPOINT_HPP
      17                 :            : 
      18                 :            : // ********** BEGIN STANDARD INCLUDES      **********
      19                 :            : // ********** END STANDARD INCLUDES        **********
      20                 :            : // ********** BEGIN CUBIT INCLUDES         **********
      21                 :            : #include "Point.hpp"
      22                 :            : #include <stdio.h>
      23                 :            : #include "gp_Pnt.hxx"
      24                 :            : #include "TopoDS_Vertex.hxx"
      25                 :            : #include "BRepBuilderAPI_MakeVertex.hxx"
      26                 :            : // ********** END CUBIT INCLUDES           **********
      27                 :            : 
      28                 :            : // ********** BEGIN FORWARD DECLARATIONS   **********
      29                 :            : class CubitSimpleAttrib;
      30                 :            : class BRepBuilderAPI_ModifyShape;
      31                 :            : class BRepAlgoAPI_BooleanOperation;
      32                 :            : class OCCCurve;
      33                 :            : // ********** END FORWARD DECLARATIONS     **********
      34                 :            : 
      35                 :            : class OCCPoint : public TBPoint
      36                 :            : {
      37                 :            : private:
      38                 :            : 
      39                 :            :   TopoDS_Vertex *myTopoDSVertex;
      40                 :            :   CubitBoolean myMarked ; 
      41                 :            :   DLIList<OCCCurve * > myCurveList;
      42                 :            : public :
      43                 :            :   
      44                 :            :   OCCPoint(const CubitVector &location );
      45                 :            :     //I- CubitVector &location
      46                 :            :     //I- location of point (creates a CubiPoint).
      47                 :            :     //I- DLIList<Curve*> curves
      48                 :            :     //I- curves attaced to point
      49                 :            : 
      50         [ +  - ]:      27267 :   OCCPoint(TopoDS_Vertex* thePoint ):myTopoDSVertex(thePoint), myMarked(CUBIT_FALSE){};
      51                 :            :      //I- gp_Pnt *thePoint
      52                 :            :      //I- pointer to the TopoDS_Vertex associated with OCCPoint
      53                 :            :      //I- DLIList<Curve*> curves
      54                 :            :      //I- curves attaced to point
      55                 :            : 
      56                 :            :   OCCPoint(gp_Pnt& thePoint );
      57                 :            :     //I- gp_Pnt *thePoint
      58                 :            :     //I- pointer to the TopoDS_Vertex associated with OCCPoint
      59                 :            :     //I- DLIList<Curve*> curves
      60                 :            :     //I- curves attaced to point
      61                 :            : 
      62                 :            :   virtual ~OCCPoint();
      63                 :            :     //- The destructor
      64                 :            : 
      65                 :            :   void add_curve(OCCCurve* curve);
      66                 :            :   void remove_curve(OCCCurve* curve);
      67                 :       2860 :   void clear_curves() {myCurveList.clean_out();}
      68                 :            :   DLIList<OCCCurve * > my_curve_list() {return myCurveList;}
      69                 :      83458 :   int num_curves() {return myCurveList.size();}
      70                 :            : 
      71                 :            : 
      72                 :       9192 :   void set_myMarked(CubitBoolean marked) {myMarked = marked;}
      73                 :            : 
      74         [ -  + ]:     136208 :   TopoDS_Vertex *get_TopoDS_Vertex(){assert (myTopoDSVertex->ShapeType() == TopAbs_VERTEX); return myTopoDSVertex; }
      75                 :            :   void set_TopoDS_Vertex(TopoDS_Vertex vertex);
      76                 :            : 
      77                 :            :   virtual void append_simple_attribute_virt(const CubitSimpleAttrib&);
      78                 :            :     //R void
      79                 :            :     //I
      80                 :            :     //I-
      81                 :            :     //I- that is to be appended to this OSME object.
      82                 :            :     //- The purpose of this function is to append a
      83                 :            :     //- attribute to the OSME. The  is attached to each of the
      84                 :            :     //- underlying solid model entities this one points to.
      85                 :            : 
      86                 :            :   virtual void remove_simple_attribute_virt(const CubitSimpleAttrib&);
      87                 :            :     //R void
      88                 :            :     //I CubitSimpleAttrib*
      89                 :            :     //I- A reference to a CubitSimpleAttrib object which is the object
      90                 :            :     //I- that is to be removed to this OSME object.
      91                 :            :     //- The purpose of this function is to remove a simple
      92                 :            :     //- attribute from the OSME. The attribute is attached to each of the
      93                 :            :     //- underlying solid model entities this one points to.
      94                 :            : 
      95                 :            :   virtual void remove_all_simple_attribute_virt();
      96                 :            :     //R void
      97                 :            :     //I-
      98                 :            :     //- The purpose of this function is to remove all simple
      99                 :            :     //- attributes from the OSME.
     100                 :            : 
     101                 :            :   virtual CubitStatus get_simple_attribute(DLIList<CubitSimpleAttrib>&);
     102                 :            :   virtual CubitStatus get_simple_attribute(const CubitString& name,
     103                 :            :                                            DLIList<CubitSimpleAttrib>&);
     104                 :            :     //R CubitSimpleAttrib*
     105                 :            :     //R- the returned cubit simple attribute.
     106                 :            :     //- The purpose of this function is to get the attributes
     107                 :            :     //- of the geometry entity. The name is attached to the underlying solid
     108                 :            :     //- model entity(ies) this one points to.
     109                 :            :     //- MJP Note:
     110                 :            :     //- This is the code that implements the requirement that names
     111                 :            :     //- of VGI Entities propagate across solid model boolean
     112                 :            :     //- operations.  The success of this relies, of course, on the underlying
     113                 :            :     //- solid modeler being able to propagate attributes across
     114                 :            :     //- such operations on its entities. If it cannot, then "names"
     115                 :            :     //- of VGI entities will not propagate.
     116                 :            : 
     117                 :            :   virtual CubitVector coordinates() const;
     118                 :            :     //R CubitVector
     119                 :            :     //R- Contains the coordinate values {x y z} of this Point
     120                 :            :     //- Returns the spatial coordinates of this Point.
     121                 :            :   
     122                 :            :   CubitBoolean is_equal( OCCPoint & other, double Tol);
     123                 :            : 
     124                 :            :   double distance( OCCPoint & other);
     125                 :            :   double SquareDistance ( OCCPoint & other);
     126                 :            : 
     127                 :            :   virtual CubitBox bounding_box() const ;
     128                 :            :     // see comments in GeometryEntity.hpp
     129                 :            :   
     130                 :            :   virtual GeometryQueryEngine* 
     131                 :            :   get_geometry_query_engine() const;
     132                 :            :     //R GeometryQueryEngine*
     133                 :            :     //R- A pointer to the geometric modeling engine associated with
     134                 :            :     //R- the object.
     135                 :            :     //- This function returns a pointer to the geometric modeling engine
     136                 :            :     //- associated with the object.
     137                 :            :   
     138                 :            :   virtual void get_parents_virt( DLIList<TopologyBridge*>& parents );
     139                 :            :   virtual void get_children_virt( DLIList<TopologyBridge*>& children );
     140                 :            : 
     141                 :            :   void update_OCC_entity( BRepBuilderAPI_ModifyShape *aBRepTrsf,
     142                 :            :                           BRepAlgoAPI_BooleanOperation *op = NULL);
     143                 :            : };
     144                 :            : 
     145                 :            : 
     146                 :            : // ********** BEGIN INLINE FUNCTIONS       **********
     147                 :            : // ********** END INLINE FUNCTIONS         **********
     148                 :            : 
     149                 :            : // ********** BEGIN FRIEND FUNCTIONS       **********
     150                 :            : // ********** END FRIEND FUNCTIONS         **********
     151                 :            : 
     152                 :            : // ********** BEGIN EXTERN FUNCTIONS       **********
     153                 :            : // ********** END EXTERN FUNCTIONS         **********
     154                 :            : 
     155                 :            : #endif

Generated by: LCOV version 1.11