cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : FacetShell.hpp 00003 // 00004 // Purpose : 00005 // 00006 // Special Notes : 00007 // 00008 // Creator : Xuechen Liu 00009 // 00010 // Creation Date : 08/06/96 00011 // 00012 // Owner : Malcolm J. Panthaki 00013 //------------------------------------------------------------------------- 00014 00015 #ifndef FACET_SHELL_HPP 00016 #define FACET_SHELL_HPP 00017 00018 // ********** BEGIN STANDARD INCLUDES ********** 00019 // ********** END STANDARD INCLUDES ********** 00020 00021 // ********** BEGIN CUBIT INCLUDES ********** 00022 #include "CubitDefines.h" 00023 #include "ShellSM.hpp" 00024 00025 class FacetBody; 00026 class FacetLump; 00027 class FacetSurface; 00028 class FacetLoop; 00029 class FacetCoEdge; 00030 class FacetCurve; 00031 class FacetPoint; 00032 00033 // ********** END CUBIT INCLUDES ********** 00034 00035 class FacetShell : public ShellSM 00036 { 00037 public: 00038 00039 FacetShell(Lump* my_lump, 00040 DLIList<Surface*> &my_surfs ); 00041 //- Constructor with lists of attached lumps and surfaces. 00042 00043 FacetShell( DLIList<Surface*> &my_surfs ); 00044 //- Constructor with lists of attached surfaces. 00045 00046 virtual ~FacetShell() ; 00047 //- Destructor. 00048 void add_lump(Lump* lump_ptr); 00049 00050 00051 virtual GeometryQueryEngine* 00052 get_geometry_query_engine() const; 00053 //R GeometryQueryEngine* 00054 //R- A pointer to the geometric modeling engine associated with 00055 //R- the object. 00056 //- This function returns a pointer to the geometric modeling engine 00057 //- associated with the object. 00058 00059 virtual void append_simple_attribute_virt(const CubitSimpleAttrib&); 00060 //R void 00061 //I 00062 //I- 00063 //I- that is to be appended to this OSME object. 00064 //- The purpose of this function is to append a 00065 //- attribute to the OSME. The is attached to each of the 00066 //- underlying solid model entities this one points to. 00067 00068 virtual void remove_simple_attribute_virt(const CubitSimpleAttrib&); 00069 //R void 00070 //I CubitSimpleAttrib* 00071 //I- A reference to a CubitSimpleAttrib object which is the object 00072 //I- that is to be removed to this OSME object. 00073 //- The purpose of this function is to remove a simple 00074 //- attribute from the OSME. The attribute is attached to each of the 00075 //- underlying solid model entities this one points to. 00076 00077 virtual void remove_all_simple_attribute_virt(); 00078 //R void 00079 //I- 00080 //- The purpose of this function is to remove all simple 00081 //- attributes from the OSME. 00082 00083 virtual CubitStatus get_simple_attribute(DLIList<CubitSimpleAttrib>&); 00084 virtual CubitStatus get_simple_attribute(const CubitString& name, 00085 DLIList<CubitSimpleAttrib>&); 00086 //R CubitSimpleAttrib* 00087 //R- the returned cubit simple attribute. 00088 //- The purpose of this function is to get the attributes 00089 //- of the geometry entity. The name is attached to the underlying solid 00090 //- model entity(ies) this one points to. 00091 //- MJP Note: 00092 //- This is the code that implements the requirement that names 00093 //- of VGI Entities propagate across solid model boolean 00094 //- operations. The success of this relies, of course, on the underlying 00095 //- solid modeler being able to propagate attributes across 00096 //- such operations on its entities. If it cannot, then "names" 00097 //- of VGI entities will not propagate. 00098 00099 void get_lumps ( DLIList<FacetLump *>& lumps ); 00100 void get_surfaces( DLIList<FacetSurface*>& surfaces ); 00101 void get_coedges ( DLIList<FacetCoEdge *>& coedges ); 00102 void get_curves ( DLIList<FacetCurve *>& curves ); 00103 00104 void get_parents_virt( DLIList<TopologyBridge*>& parents ); 00105 void get_children_virt( DLIList<TopologyBridge*>& children ); 00106 00107 inline Lump* get_lump() const { return myLump; } 00108 00109 inline void remove_lump() { myLump = 0; } 00110 00111 void disconnect_surfaces( DLIList<FacetSurface*> &surfs_to_disconnect ); 00112 void disconnect_all_surfaces(); 00113 00114 void reverse(); // invert sense of each surface as used in this shell. 00115 void reverse_surfaces(); //Actually flip the surface... do not change sense. 00116 00117 CubitPointContainment point_containment( const CubitVector &point, double tolerance = -1.0 ); 00118 00119 //determine whether this is a sheet shell or not. 00120 // This function may have problems with certain non-manifold geometries 00121 // It is looking for facets that aren't attached to another facet for 00122 // one or more of its edges. 00123 // NOTE (mbrewer): this can probably be improved by going to the 00124 // curves and checking for the number of co-edges on each curve. 00125 CubitBoolean is_sheet(); 00126 00127 protected: 00128 00129 private: 00130 Lump* myLump; 00131 DLIList<Surface*> mySurfs; 00132 }; 00133 00134 00135 00136 #endif 00137