cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : FacetPoint.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_FACET_HPP 00016 #define POINT_FACET_HPP 00017 00018 // ********** BEGIN STANDARD INCLUDES ********** 00019 // ********** END STANDARD INCLUDES ********** 00020 00021 // ********** BEGIN CUBIT INCLUDES ********** 00022 #include "CubitDefines.h" 00023 #include "Point.hpp" 00024 #include "FacetAttribSet.hpp" 00025 // ********** END CUBIT INCLUDES ********** 00026 00027 // ********** BEGIN FORWARD DECLARATIONS ********** 00028 class TopologyEntity; 00029 class CubitSimpleAttrib; 00030 class RefVertex; 00031 class RefVolume; 00032 class RefVolume; 00033 class CubitPoint; 00034 class FacetAttrib; 00035 00036 class FacetBody; 00037 class FacetLump; 00038 class FacetShell; 00039 class FacetSurface; 00040 class FacetLoop; 00041 class FacetCoEdge; 00042 class FacetCurve; 00043 00044 // ********** END FORWARD DECLARATIONS ********** 00045 00046 class FacetPoint : public TBPoint 00047 { 00048 private: 00049 00050 DLIList<Curve*> myCurves; 00051 CubitPoint *myPoint; 00052 CubitBoolean iCreated; 00053 00054 FacetAttribSet attribSet; 00055 //List of FacetAttrib*'s instead of CubitSimpleAttribs 00056 00057 public : 00058 00059 FacetPoint(const CubitVector &location, DLIList<Curve*> &curves ); 00060 //I- CubitVector &location 00061 //I- location of point (creates a CubiPoint). 00062 //I- DLIList<Curve*> curves 00063 //I- curves attaced to point 00064 00065 FacetPoint(CubitPoint *thePoint, DLIList<Curve*> &curves ); 00066 //I- CubitPoint *thePoint 00067 //I- pointer to the CubitPoint associated with FacetPoint 00068 //I- DLIList<Curve*> curves 00069 //I- curves attaced to point 00070 00071 FacetPoint(CubitPoint *thePoint ); 00072 //I- CubitPoint *thePoint 00073 //I- pointer to the CubitPoint associated with FacetPoint 00074 00075 virtual ~FacetPoint(); 00076 //- The destructor 00077 00078 virtual void append_simple_attribute_virt(const CubitSimpleAttrib&); 00079 //R void 00080 //I 00081 //I- 00082 //I- that is to be appended to this OSME object. 00083 //- The purpose of this function is to append a 00084 //- attribute to the OSME. The is attached to each of the 00085 //- underlying solid model entities this one points to. 00086 00087 virtual void remove_simple_attribute_virt(const CubitSimpleAttrib&); 00088 //R void 00089 //I CubitSimpleAttrib* 00090 //I- A reference to a CubitSimpleAttrib object which is the object 00091 //I- that is to be removed to this OSME object. 00092 //- The purpose of this function is to remove a simple 00093 //- attribute from the OSME. The attribute is attached to each of the 00094 //- underlying solid model entities this one points to. 00095 00096 virtual void remove_all_simple_attribute_virt(); 00097 //R void 00098 //I- 00099 //- The purpose of this function is to remove all simple 00100 //- attributes from the OSME. 00101 00102 virtual CubitStatus get_simple_attribute(DLIList<CubitSimpleAttrib>&); 00103 virtual CubitStatus get_simple_attribute(const CubitString& name, 00104 DLIList<CubitSimpleAttrib>&); 00105 //R CubitSimpleAttrib* 00106 //R- the returned cubit simple attribute. 00107 //- The purpose of this function is to get the attributes 00108 //- of the geometry entity. The name is attached to the underlying solid 00109 //- model entity(ies) this one points to. 00110 //- MJP Note: 00111 //- This is the code that implements the requirement that names 00112 //- of VGI Entities propagate across solid model boolean 00113 //- operations. The success of this relies, of course, on the underlying 00114 //- solid modeler being able to propagate attributes across 00115 //- such operations on its entities. If it cannot, then "names" 00116 //- of VGI entities will not propagate. 00117 00118 virtual CubitVector coordinates() const; 00119 //R CubitVector 00120 //R- Contains the coordinate values {x y z} of this Point 00121 //- Returns the spatial coordinates of this Point. 00122 00123 virtual CubitBox bounding_box() const ; 00124 // see comments in GeometryEntity.hpp 00125 00126 virtual GeometryQueryEngine* 00127 get_geometry_query_engine() const; 00128 //R GeometryQueryEngine* 00129 //R- A pointer to the geometric modeling engine associated with 00130 //R- the object. 00131 //- This function returns a pointer to the geometric modeling engine 00132 //- associated with the object. 00133 00134 void add_curve( Curve* curv_ptr ) 00135 { myCurves.append_unique( curv_ptr ); } 00136 // associate this point with a curve 00137 00138 CubitPoint *get_cubit_point() const 00139 { return myPoint; } 00140 // return the CubitPoint associated with this facet point 00141 00142 CubitStatus save_attribs( FILE* file_ptr ); 00143 // Write FactAttribs out to file 00144 00145 CubitStatus restore_attribs( FILE* file_ptr, unsigned int endian ); 00146 // Read FactAttribs from file 00147 00148 void get_parents_virt( DLIList<TopologyBridge*>& parents ); 00149 void get_children_virt( DLIList<TopologyBridge*>& children ); 00150 00151 void get_lumps ( DLIList<FacetLump *>& lumps ); 00152 void get_shells ( DLIList<FacetShell *>& shells ); 00153 void get_surfaces( DLIList<FacetSurface*>& surfaces ); 00154 void get_loops ( DLIList<FacetLoop *>& loops ); 00155 void get_coedges ( DLIList<FacetCoEdge *>& coedges ); 00156 void get_curves ( DLIList<FacetCurve *>& curves ); 00157 00158 CubitStatus disconnect_curve( FacetCurve* curve ); 00159 00160 inline bool has_parent_curve() const { return myCurves.size() > 0; } 00161 }; 00162 00163 00164 // ********** BEGIN INLINE FUNCTIONS ********** 00165 // ********** END INLINE FUNCTIONS ********** 00166 00167 // ********** BEGIN FRIEND FUNCTIONS ********** 00168 // ********** END FRIEND FUNCTIONS ********** 00169 00170 // ********** BEGIN EXTERN FUNCTIONS ********** 00171 // ********** END EXTERN FUNCTIONS ********** 00172 00173 #endif