cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : OCCGeometryCreator.hpp 00003 // 00004 // Purpose : For a list of facets, builds a topology of 00005 // surfaces, curves and vertices 00006 // 00007 // Special Notes : 00008 // 00009 // Creator : Steven J. Owen 00010 // 00011 // Date : 4/29/2001 00012 // 00013 // Owner : Steven J. Owen 00014 //------------------------------------------------------------------------- 00015 00016 #ifndef MESHGEOMETRYCREATOR_HPP 00017 #define MESHGEOMETRYCREATOR_HPP 00018 00019 #include "DLIList.hpp" 00020 00021 class FacetEntity; 00022 class FacetCurveMesh; 00023 class FacetSurfaceMesh; 00024 class FacetVolumeMesh; 00025 class LoopSM; 00026 class Body; 00027 class Surface; 00028 class FacetPointMesh; 00029 class CubitPoint; 00030 class CubitFacetEdge; 00031 class CubitFacet; 00032 00033 class FacetGeometryCreator 00034 { 00035 public: 00036 FacetGeometryCreator( ); 00037 FacetGeometryCreator(DLIList<FacetEntity*> &face_list, 00038 DLIList<FacetEntity*> &edge_list, 00039 DLIList<FacetEntity*> &point_list ); 00040 //- Constructor 00041 00042 ~FacetGeometryCreator(); 00043 //- Destructor 00044 00045 #ifdef BOYD14 00046 CubitStatus create_geometry(CubitBoolean use_feature_angle, 00047 double angle, 00048 int interp_order, 00049 CubitBoolean smooth_non_manifold, 00050 CubitBoolean split_surfaces, 00051 DLIList<Surface *> &surface_list); 00052 //- Creates the geometry infrastructure based on 00053 //- the given mesh data. 00054 #endif 00055 void print_me(); 00056 00057 private: 00058 00059 DLIList<FacetEntity*> faceList; 00060 DLIList<FacetEntity*> edgeList; 00061 DLIList<FacetEntity*> pointList; 00062 DLIList<FacetSurfaceMesh*> facetSurfaceList; 00063 DLIList<FacetCurveMesh*> facetCurveList; 00064 DLIList<FacetPointMesh*> facetPointList; 00065 00066 DLIList<FacetCurveMesh*> *hashCurveArray; 00067 int hashCurveSize; 00068 DLIList<FacetPointMesh*> *hashPointArray; 00069 int hashPointSize; 00070 00071 void set_up_tool_datas( ); 00072 void delete_tool_datas( ); 00073 00074 #ifdef BOYD14 00075 int facet_dimension(FacetEntity *facet_ptr); 00076 //- returns the dimension of the facet entity. 00077 #endif 00078 00079 CubitStatus create_volume_boundaries( DLIList<FacetSurfaceMesh*> &facet_surface_sheets, 00080 CubitBoolean use_feature_angle, 00081 double min_dot, 00082 CubitBoolean split_surfaces ); 00083 //- creates the correct facetsurfaces for all the element blocks. 00084 00085 CubitStatus create_surface_boundaries( DLIList<FacetSurfaceMesh*> &facet_surface_list, 00086 DLIList<FacetCurveMesh*> &facet_curve_list, 00087 CubitBoolean use_feature_angle, 00088 double min_dot ); 00089 //- creates the correct blockcurves for all the surfaces 00090 00091 CubitStatus create_curve_boundaries( DLIList<FacetCurveMesh*> &facet_curve_list, 00092 DLIList<FacetPointMesh*> &facet_point_list ); 00093 //- creates the correct blockpoints for all the curves 00094 00095 CubitStatus classify_edge( FacetEntity *edge_ptr, 00096 DLIList<FacetCurveMesh*> &facet_curve_list, 00097 FacetSurfaceMesh *fsm_ptr ); 00098 //- sorts a edge into its correct curve based on its associated 00099 //- blocks and sidesets. Creates a new facet curve if necessary. 00100 00101 CubitStatus classify_point(CubitPoint *point_ptr, 00102 DLIList<FacetPointMesh*> &facet_point_list, 00103 FacetCurveMesh *fcm_ptr ); 00104 //- sorts a node into correct point based on its associated 00105 //- curve. Creates a new facet point if necessary 00106 00107 CubitStatus build_geometry( DLIList<FacetSurfaceMesh*> &facet_surface_list, 00108 DLIList<FacetCurveMesh*> &facet_curve_list, 00109 DLIList<FacetPointMesh*> &facet_point_list, 00110 int interp_order, 00111 CubitBoolean use_feature_angle, 00112 double min_dot, 00113 CubitBoolean smooth_non_manifold , 00114 CubitBoolean split_surfaces ); 00115 //- build the CUBIT geometry based on the Facet entity class lists 00116 00117 CubitStatus build_point_geometry( DLIList<FacetPointMesh*> &facet_point_list ); 00118 //- From the facet point list, create geometric points for each 00119 00120 CubitStatus build_curve_geometry( DLIList<FacetCurveMesh*> &facet_curve_list ); 00121 //- From the facet curve list, create geometric curves for each 00122 00123 CubitStatus build_loop_geometry( DLIList<FacetCurveMesh*> &facet_curve_list, 00124 FacetSurfaceMesh *fsm_ptr, 00125 DLIList<LoopSM*> &loop_list, 00126 int &ncurves ); 00127 //- From the facet curve list of a surface, create geometric loops 00128 00129 CubitStatus build_surface_geometry( DLIList<FacetSurfaceMesh*> &facet_surface_list, 00130 int interp_order, double min_dot ); 00131 //- From the facet surface list, create geometric surface, 00132 //- loops and coedges for each surface in the list 00133 00134 CubitStatus init_hash_curves( ); 00135 void delete_hash_curves( ); 00136 int get_curve_hash_key( DLIList<FacetSurfaceMesh*> *bsm_list_ptr ); 00137 // functions for hashing curves - to speed up edge classification 00138 00139 CubitStatus init_hash_points( ); 00140 void delete_hash_points( ); 00141 int get_point_hash_key( DLIList<FacetCurveMesh*> *bsm_list_ptr ); 00142 // functions for hashing points - to speed up node classification 00143 00144 CubitStatus clean_geometry( CubitBoolean smooth_non_manifold, 00145 CubitBoolean split_surfaces, 00146 CubitBoolean use_feature_angle, 00147 double min_dot, 00148 DLIList <FacetCurveMesh *> &facet_curve_list ); 00149 00150 //- fix the edge control points and the normals so they are conforming 00151 //- (or non-conforming) accross curves 00152 00153 00154 }; 00155 00156 #endif