cgma
|
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 #ifndef MEDIALTOOL2D_HPP 00020 #define MEDIALTOOL2D_HPP 00021 00022 #include "DLIList.hpp" 00023 #include "CGMGeomConfigure.h" 00024 00025 //--------------------------------------------------------- 00026 //Includes for when we really are compiling the medial stuff in. 00027 #ifdef USING_MEDIAL 00028 class MedialVertex; 00029 class MedialSegment; 00030 class Vec3D; 00031 00032 typedef DLIList <MedialVertex*> PointList; 00033 typedef DLIList <MedialSegment*> SegList; 00034 typedef DLIList <PointList*> PointLoopList; 00035 typedef DLIList <SegList*> SegLoopList; 00036 #include "medial/medial_util/MedialDefines.hpp" 00037 class CubitVector; 00038 #endif //USING_MEDIAL 00039 00040 00041 class RefFace; 00042 class RefEdge; 00043 00044 class CUBIT_GEOM_EXPORT MedialTool2D 00045 { 00046 private: 00047 RefFace *myRefFace; 00048 #ifdef USING_MEDIAL 00049 00051 void draw_results( MedialVertexPArray &output_points, 00052 MedialSegmentPArray &output_segments); 00053 00054 CubitStatus convert_to_segments( PointLoopList &boundary_point_loops, 00055 MedialSegmentPLoop &boundary_segments); 00056 00057 CubitStatus get_boundary_points( RefFace *ref_face, 00058 PointLoopList &boundary_point_loops ); 00059 00060 CubitStatus get_curve_facets( RefEdge* curve, PointList &segments ) ; 00061 00064 CubitStatus create_medial_geometry(MedialVertexPArray &output_points, 00065 MedialSegmentPArray &output_segments, DLIList<RefEdge*> &medial_axis ); 00066 00068 void convert_from_vec3d(Vec3D &vec, CubitVector &new_vec); 00069 00071 void convert_to_vec3d(CubitVector& vec, Vec3D &new_vec); 00072 00074 void free_medial_memory(MedialVertexPArray &vertices, 00075 MedialSegmentPArray &segments); 00076 00077 #endif //USING_MEDIAL 00078 00079 public: 00080 MedialTool2D(RefFace* ref_face_ptr); 00081 ~MedialTool2D(); 00082 00083 CubitStatus create_medial_axis(DLIList <RefEdge*> &medial_axis, 00084 double cell_size, 00085 double angle_tol); 00086 //- Creates the medial axis of the surface and represents it 00087 //- by a set of curves. 00088 00089 }; 00090 00091 #endif //MEDIALTOOL2D_HPP 00092