cgma
FBImprint.hpp
Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Copyright (C) 2004 Sandia Corporation.  Under the terms of Contract DE-AC04-94AL85000
00005  * with Sandia Corporation, the U.S. Government retains certain rights in this software.
00006  *
00007  * This file is part of facetbool--contact via [email protected]
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022  *
00023  *
00024  *
00025  */
00026 
00027 #ifndef _FACETEDBOOLEANIMPRINT
00028 #define _FACETEDBOOLEANIMPRINT
00029 #include <math.h>
00030 #include <vector>
00031 #include "FBDefines.hpp"
00032 #include "FBStructs.hpp"
00033 #include "CubitDefines.h"
00034 
00035 class FBPolyhedron;
00036 class FBRetriangulate;
00037 
00038 class FBImprint {
00039 
00040 public:
00041   FBImprint();
00042   ~FBImprint();
00043 
00044   CubitStatus imprint_body_curve(const std::vector<double>& Bodycoords,
00045                        const std::vector<int>& Bodyconnections,
00046                        const std::vector<FB_Coord*>& FB_imprint_edge_coords,
00047                        const std::vector<FB_Edge*>& FB_imprint_edges,
00048                        const std::vector<FSBoundingBox*>& FB_imprint_edge_bboxes,
00049                        std::vector<int>* indices);
00050 
00051   CubitStatus update_surfs_and_curves(std::vector<double>& out_coords,
00052                                       std::vector<int>& out_connections,
00053                                       std::vector<int> *out_surf_index,
00054                                       std::vector<int> *out_curve_index
00055                                       );
00056 
00057 private:
00058   std::vector<int> *f_c_indices;
00059   FBPolyhedron *poly;
00060   CubitStatus edges_tri_intersect(const std::vector<FB_Coord*>& FB_imprint_edge_coords,
00061                         const std::vector<FB_Edge*>& FB_imprint_edges,
00062                         const std::vector<FSBoundingBox*>& FB_imprint_edge_bboxes,
00063                         bool &new_edge_created);
00064                         
00065   CubitStatus single_edge_tri_intersect(double *edge_0,double *edge_1,
00066                                         bool &new_edge_created,
00067                                         FB_Triangle *tri,
00068                                         bool big_angle); 
00069   double imprint_res;
00070       
00071 };
00072 
00073 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines