cgma
OCCPoint.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : OCCPoint.hpp
00003 //
00004 // Purpose       : 
00005 //
00006 // Special Notes : 
00007 //
00008 // Creator       : Steven J. Owen
00009 //
00010 // Creation Date : 08/02/96
00011 //
00012 // Owner         : Steven J. Owen
00013 //-------------------------------------------------------------------------
00014 
00015 #ifndef POINT_OCCPOINT_HPP
00016 #define POINT_OCCPOINT_HPP
00017 
00018 // ********** BEGIN STANDARD INCLUDES      **********
00019 // ********** END STANDARD INCLUDES        **********
00020 // ********** BEGIN CUBIT INCLUDES         **********
00021 #include "Point.hpp"
00022 #include <stdio.h>
00023 #include "gp_Pnt.hxx"
00024 #include "TopoDS_Vertex.hxx"
00025 #include "BRepBuilderAPI_MakeVertex.hxx"
00026 // ********** END CUBIT INCLUDES           **********
00027 
00028 // ********** BEGIN FORWARD DECLARATIONS   **********
00029 class CubitSimpleAttrib;
00030 class BRepBuilderAPI_ModifyShape;
00031 class BRepAlgoAPI_BooleanOperation;
00032 class OCCCurve;
00033 // ********** END FORWARD DECLARATIONS     **********
00034 
00035 class OCCPoint : public TBPoint
00036 {
00037 private:
00038 
00039   TopoDS_Vertex *myTopoDSVertex;
00040   CubitBoolean myMarked ; 
00041   DLIList<OCCCurve * > myCurveList;
00042 public :
00043   
00044   OCCPoint(const CubitVector &location );
00045     //I- CubitVector &location
00046     //I- location of point (creates a CubiPoint).
00047     //I- DLIList<Curve*> curves
00048     //I- curves attaced to point
00049 
00050   OCCPoint(TopoDS_Vertex* thePoint ):myTopoDSVertex(thePoint), myMarked(CUBIT_FALSE){};
00051      //I- gp_Pnt *thePoint
00052      //I- pointer to the TopoDS_Vertex associated with OCCPoint
00053      //I- DLIList<Curve*> curves
00054      //I- curves attaced to point
00055 
00056   OCCPoint(gp_Pnt& thePoint );
00057     //I- gp_Pnt *thePoint
00058     //I- pointer to the TopoDS_Vertex associated with OCCPoint
00059     //I- DLIList<Curve*> curves
00060     //I- curves attaced to point
00061 
00062   virtual ~OCCPoint();
00063     //- The destructor
00064 
00065   void add_curve(OCCCurve* curve);
00066   void remove_curve(OCCCurve* curve);
00067   void clear_curves() {myCurveList.clean_out();}
00068   DLIList<OCCCurve * > my_curve_list() {return myCurveList;}
00069   int num_curves() {return myCurveList.size();}
00070 
00071 
00072   void set_myMarked(CubitBoolean marked) {myMarked = marked;}
00073 
00074   TopoDS_Vertex *get_TopoDS_Vertex(){assert (myTopoDSVertex->ShapeType() == TopAbs_VERTEX); return myTopoDSVertex; }
00075   void set_TopoDS_Vertex(TopoDS_Vertex vertex);
00076 
00077   virtual void append_simple_attribute_virt(const CubitSimpleAttrib&);
00078     //R void
00079     //I
00080     //I-
00081     //I- that is to be appended to this OSME object.
00082     //- The purpose of this function is to append a
00083     //- attribute to the OSME. The  is attached to each of the
00084     //- underlying solid model entities this one points to.
00085 
00086   virtual void remove_simple_attribute_virt(const CubitSimpleAttrib&);
00087     //R void
00088     //I CubitSimpleAttrib*
00089     //I- A reference to a CubitSimpleAttrib object which is the object
00090     //I- that is to be removed to this OSME object.
00091     //- The purpose of this function is to remove a simple
00092     //- attribute from the OSME. The attribute is attached to each of the
00093     //- underlying solid model entities this one points to.
00094 
00095   virtual void remove_all_simple_attribute_virt();
00096     //R void
00097     //I-
00098     //- The purpose of this function is to remove all simple
00099     //- attributes from the OSME.
00100 
00101   virtual CubitStatus get_simple_attribute(DLIList<CubitSimpleAttrib>&);
00102   virtual CubitStatus get_simple_attribute(const CubitString& name,
00103                                            DLIList<CubitSimpleAttrib>&);
00104     //R CubitSimpleAttrib*
00105     //R- the returned cubit simple attribute.
00106     //- The purpose of this function is to get the attributes
00107     //- of the geometry entity. The name is attached to the underlying solid
00108     //- model entity(ies) this one points to.
00109     //- MJP Note:
00110     //- This is the code that implements the requirement that names
00111     //- of VGI Entities propagate across solid model boolean
00112     //- operations.  The success of this relies, of course, on the underlying
00113     //- solid modeler being able to propagate attributes across
00114     //- such operations on its entities. If it cannot, then "names"
00115     //- of VGI entities will not propagate.
00116 
00117   virtual CubitVector coordinates() const;
00118     //R CubitVector
00119     //R- Contains the coordinate values {x y z} of this Point
00120     //- Returns the spatial coordinates of this Point.
00121   
00122   CubitBoolean is_equal( OCCPoint & other, double Tol);
00123 
00124   double distance( OCCPoint & other);
00125   double SquareDistance ( OCCPoint & other);
00126 
00127   virtual CubitBox bounding_box() const ;
00128     // see comments in GeometryEntity.hpp
00129   
00130   virtual GeometryQueryEngine* 
00131   get_geometry_query_engine() const;
00132     //R GeometryQueryEngine*
00133     //R- A pointer to the geometric modeling engine associated with
00134     //R- the object.
00135     //- This function returns a pointer to the geometric modeling engine
00136     //- associated with the object.
00137   
00138   virtual void get_parents_virt( DLIList<TopologyBridge*>& parents );
00139   virtual void get_children_virt( DLIList<TopologyBridge*>& children );
00140 
00141   void update_OCC_entity( BRepBuilderAPI_ModifyShape *aBRepTrsf,
00142                           BRepAlgoAPI_BooleanOperation *op = NULL);
00143 };
00144 
00145 
00146 // ********** BEGIN INLINE FUNCTIONS       **********
00147 // ********** END INLINE FUNCTIONS         **********
00148 
00149 // ********** BEGIN FRIEND FUNCTIONS       **********
00150 // ********** END FRIEND FUNCTIONS         **********
00151 
00152 // ********** BEGIN EXTERN FUNCTIONS       **********
00153 // ********** END EXTERN FUNCTIONS         **********
00154 
00155 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines