BoundedUtils.h

00001 //===========================================================================
00002 // GoTools - SINTEF Geometry Tools version 1.1
00003 //
00004 // GoTools module: CORE
00005 //
00006 // Copyright (C) 2000-2007 SINTEF ICT, Applied Mathematics, Norway.
00007 //
00008 // This program is free software; you can redistribute it and/or          
00009 // modify it under the terms of the GNU General Public License            
00010 // as published by the Free Software Foundation version 2 of the License. 
00011 //
00012 // This program is distributed in the hope that it will be useful,        
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of         
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          
00015 // GNU General Public License for more details.                           
00016 //
00017 // You should have received a copy of the GNU General Public License      
00018 // along with this program; if not, write to the Free Software            
00019 // Foundation, Inc.,                                                      
00020 // 59 Temple Place - Suite 330,                                           
00021 // Boston, MA  02111-1307, USA.                                           
00022 //
00023 // Contact information: E-mail: tor.dokken@sintef.no                      
00024 // SINTEF ICT, Department of Applied Mathematics,                         
00025 // P.O. Box 124 Blindern,                                                 
00026 // 0314 Oslo, Norway.                                                     
00027 //
00028 // Other licenses are also available for this software, notably licenses
00029 // for:
00030 // - Building commercial software.                                        
00031 // - Building software whose source code you wish to keep private.        
00032 //===========================================================================
00033 #ifndef _GOBOUNDEDUTILS_H
00034 #define _GOBOUNDEDUTILS_H
00035 
00036 
00037 #include "BoundedSurface.h"
00038 #include "SplineSurface.h"
00039 #include "CurveOnSurface.h"
00040 #include "LoopUtils.h"
00041 
00042 #include <boost/smart_ptr.hpp>
00043 
00044 using std::vector;
00045 using boost::shared_ptr;
00046 using Go::SplineSurface;
00047 using Go::BoundedSurface;
00048 using Go::CurveOnSurface;
00049 using Go::Point;
00050 using Go::ParamCurve;
00051 
00052 namespace Go {
00055 
00056 
00060 namespace BoundedUtils {
00063 
00064 
00073     std::vector<shared_ptr<CurveOnSurface> >
00074       intersectWithSurface(CurveOnSurface& curve,
00075                            BoundedSurface& bounded_surf, double epsge);
00076 
00094     void intersectWithSurfaces(vector<shared_ptr<CurveOnSurface> >& curves1,
00095                                shared_ptr<BoundedSurface>& bd_sf1,
00096                                vector<shared_ptr<CurveOnSurface> >& curves2,
00097                                shared_ptr<BoundedSurface>& bd_sf2,
00098                                double epsge);
00099 
00103 
00111     vector<vector<shared_ptr<CurveOnSurface> > >
00112       getBoundaryLoops(const BoundedSurface& sf, 
00113                        vector<shared_ptr<CurveOnSurface> >& part_bnd_cvs);
00114 
00127     vector<shared_ptr<BoundedSurface> >
00128       trimWithPlane(const shared_ptr<Go::ParamSurface>& surf,
00129                     Point point, Point normal, double epsge);
00130 
00133     
00143     vector<shared_ptr<BoundedSurface> >
00144     trimSurfWithSurf(const shared_ptr<Go::ParamSurface>& sf1,
00145                      const shared_ptr<Go::ParamSurface>& sf2, double epsge);
00146     
00147 
00150 
00157     BoundedSurface* convertToBoundedSurface(const SplineSurface& surf,
00158                                               double space_epsilon);
00159 
00160 
00165 
00166 
00182     vector<shared_ptr<BoundedSurface> >
00183      createTrimmedSurfs(vector<vector<boost::shared_ptr<CurveOnSurface> > >& loops,
00184                         shared_ptr<SplineSurface>& under_sf, 
00185                         double epsgeo);
00186 
00195     std::vector<shared_ptr<CurveOnSurface> >
00196       intersectWithPlane(shared_ptr<SplineSurface>& surf,
00197                          Point pnt, Point normal, double geom_tol);
00198 
00207     void getIntersectionCurve(shared_ptr<SplineSurface>& sf1,
00208                               shared_ptr<SplineSurface>& sf2,
00209                               vector<shared_ptr<CurveOnSurface> >& int_segments1,
00210                               vector<shared_ptr<CurveOnSurface> >& int_segments2,
00211                               double epsge);
00212 
00213 
00218     void translateBoundedSurf(Point trans_vec, BoundedSurface& bd_sf,
00219                               double deg_eps);
00220 
00221     // Rotate a given BoundedSurface
00226     void rotateBoundedSurf(Point rot_axis, double alpha,
00227                            BoundedSurface& bf_sf, double deg_eps);
00228 
00230 } // namespace Go
00232 } // namespace BoundedUtils
00233 
00234 #endif // _GOBOUNDEDUTILS_H
00235 

Generated on Mon Jun 11 14:48:18 2007 for GoTools Core Library by  doxygen 1.5.1