cgma
PartitionLumpImprint.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : PartitionLumpImprint.hpp
00003 //
00004 // Purpose       : Imprint a lump with a polyline-loop
00005 //
00006 // Special Notes : 
00007 //
00008 // Creator       : Jason Kraftcheck
00009 //
00010 // Creation Date : 02/05/03
00011 //-------------------------------------------------------------------------
00012 
00013 #ifndef PARTITION_LUMP_IMPRINT
00014 #define PARTITION_LUMP_IMPRINT
00015 
00016 #include "DLIList.hpp"
00017 #include "RTree.hpp"
00018 #include "CubitVector.hpp"
00019 #include <map>
00020 
00021 class PartitionCurve;
00022 class PartitionCoEdge;
00023 class PartitionLoop;
00024 class PartitionSurface;
00025 class PartitionLump;
00026 class PartitionEntity;
00027 
00028 class CubitPoint;
00029 class CubitFacet;
00030 class CubitFacetData;
00031 class CubitFacetEdge;
00032 class CubitFacetEdgeData;
00033 
00034 class PartitionLumpImprint
00035 {
00036   public:
00037   
00038     PartitionLumpImprint( PartitionLump* lump );
00039     
00040     PartitionSurface* imprint( DLIList<CubitFacet*>& facets,
00041                                DLIList<PartitionEntity*>& new_entities );
00042     
00043     PartitionSurface* imprint( DLIList<CubitFacetData*>& facets,
00044                                DLIList<CubitVector>& vtx_points,
00045                                DLIList<PartitionEntity*>& new_entities );
00046   
00047   private:
00048   
00049     PartitionSurface* imprint( DLIList<CubitVector>& vtx_points,
00050                                DLIList<PartitionEntity*>& new_entities );
00051   
00052     PartitionLoop* imprint( DLIList<CubitPoint*>& loop,
00053                             DLIList<CubitPoint*>& vtx_points );
00054   
00055     bool add( PartitionEntity* entity );
00056     
00057     PartitionEntity* point_owner( CubitPoint* point ) ;
00058     
00059     void set_point_owner( CubitPoint* point, PartitionEntity* owner );
00060     
00061     void get_owned_points( PartitionEntity*, DLIList<CubitPoint*>& );
00062     
00063     inline CubitPoint* point( int point_id ) const
00064       { return loopPoints.next(point_id); }
00065     
00066     int num_points() const
00067       { return loopPoints.size(); }
00068     
00069     void init( DLIList<CubitFacet*>* facets );
00070     void begin_loop( DLIList<CubitPoint*>& loop );
00071     
00072     void clean_up_loop();
00073     CubitStatus abort_imprint();
00074     
00075     CubitStatus do_imprint();
00076     
00077     CubitStatus make_vertices( DLIList<CubitPoint*>& vtx_points );
00078     
00079     CubitStatus make_volume_curves();
00080     
00081     CubitStatus get_curves( DLIList<PartitionCoEdge*>& result_list );
00082     
00083     CubitStatus partitionCurve( CubitPoint* );
00084     CubitStatus partitionSurface( int first_point_id, int last_point_id,
00085                                   PartitionSurface* surf = 0 );
00086     CubitStatus makePointCurve( CubitPoint* );
00087     CubitStatus makeFreePoint( CubitPoint* );
00088     CubitStatus makeFreeCurve( int start_vert_point, int end_vert_point );
00089 
00090     PartitionEntity* find_closest( const CubitVector& pos,
00091                                    DLIList<PartitionEntity*>& list,
00092                                    bool use_tolerance = true );
00093 
00094     CubitStatus seam_curve( DLIList<CubitFacetEdgeData*>& edges,
00095                             PartitionCurve* curve,
00096                             DLIList<CubitFacetData*>& facets );
00097 
00098     DLIList<CubitFacetData*> facetList;
00099     DLIList<CubitFacetEdge*> boundaryEdges;
00100     DLIList<CubitPoint*> loopPoints;
00101     std::map<CubitPoint*,PartitionEntity*> pointAssoc;
00102     
00103     PartitionLump* lump;
00104     PartitionSurface* newSurface;
00105     RTree<PartitionEntity*> rTree;
00106     DLIList<PartitionEntity*> entityList;
00107     
00108     DLIList<PartitionEntity*> newEntities;
00109 };
00110 
00111 #endif
00112 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines