//=========================================================================== // GoTools Core - SINTEF Geometry Tools Core library, version 2.0.1 // // Copyright (C) 2000-2007, 2010 SINTEF ICT, Applied Mathematics, Norway. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation version 2 of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., // 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. // // Contact information: E-mail: tor.dokken@sintef.no // SINTEF ICT, Department of Applied Mathematics, // P.O. Box 124 Blindern, // 0314 Oslo, Norway. // // Other licenses are also available for this software, notably licenses // for: // - Building commercial software. // - Building software whose source code you wish to keep private. //=========================================================================== 00015 #ifndef _COONSPATCHGEN_H 00016 #define _COONSPATCHGEN_H 00017 00018 00019 #include "GoTools/geometry/CurveLoop.h" 00020 00021 00022 namespace Go { 00023 00024 00025 class SplineSurface; 00026 class SplineCurve; 00027 class ParamCurve; 00028 00029 00032 00033 namespace CoonsPatchGen { 00034 00035 // We introduce some exception classes. 00036 00038 class UnKnownError{}; 00039 00049 SplineSurface* createCoonsPatch(const CurveLoop& boundary); 00050 00051 00052 // bd_curves must contain four curves cross_curves must contain 00053 // four curves (may be 0 curves) bd_curves and cross_curves must 00054 // be SplineCurves bd_curves and cross_curves must lie in the same 00055 // dimension and be nonrational bd curves will be reparameterized 00056 // to have reasonable tangent values at endpoints and 00057 // corresponding curves will share parameter interval. 00058 // neighbour_tol - hvor mye en kantkurve kan flyttes 00059 00074 SplineSurface* 00075 createCoonsPatch(std::vector<boost::shared_ptr<ParamCurve> >& bd_curves, 00076 std::vector<boost::shared_ptr<ParamCurve> >& cross_curves, 00077 double epsge, double kink_tol); 00078 00088 SplineSurface* 00089 createCoonsPatch(std::vector<boost::shared_ptr<SplineCurve> >& bd_curves, 00090 std::vector<boost::shared_ptr<SplineCurve> >& 00091 cross_curves); 00092 00093 // None of the Gordon Surfaces perform manipulation of the cross 00094 // tangs. 00095 00111 // @@sbr Include new version which sets up parameters. 00112 SplineSurface* 00113 createGordonSurface(std::vector<boost::shared_ptr<SplineCurve> >& 00114 mesh_curves, 00115 std::vector<double>& params, int& nmb_u_crvs, 00116 bool use_param_values); 00117 00133 SplineSurface* 00134 createGordonSurface(std::vector<boost::shared_ptr<SplineCurve> >& 00135 mesh_curves, 00136 std::vector<double>& params, int& nmb_u_crvs, 00137 std::vector<boost::shared_ptr<SplineCurve> >& 00138 cross_curves, 00139 std::vector<int>& cross_index, 00140 bool use_param_values = true); 00141 00154 SplineSurface* 00155 doCreateSurface(std::vector<boost::shared_ptr<SplineCurve> >& mesh_curves, 00156 std::vector<double>& params, int& nmb_u_crvs, 00157 std::vector<boost::shared_ptr<SplineCurve> >& cross_curves, 00158 std::vector<int>& cross_index); 00159 00164 SplineSurface* loftSurface(std::vector<boost::shared_ptr<SplineCurve> >::iterator 00165 first_curve, int nmb_crvs); 00166 00173 SplineSurface* loftSurface(std::vector<boost::shared_ptr<SplineCurve> >::iterator 00174 first_curve, 00175 std::vector<double>::iterator first_param, 00176 int nmb_crvs); 00177 00186 SplineSurface* 00187 loftSurface(std::vector<boost::shared_ptr<SplineCurve> >::iterator first_curve, 00188 std::vector<double>::iterator first_param, 00189 int nmb_crvs, 00190 std::vector<boost::shared_ptr<SplineCurve> >::iterator first_cross_curve, 00191 std::vector<int>& cross_index); 00192 00202 SplineSurface* tpSurface(const std::vector<boost::shared_ptr<SplineCurve> >& mesh_curves, 00203 std::vector<double> params, int nmb_u_crvs, 00204 const std::vector<boost::shared_ptr<SplineCurve> >& cross_curves, 00205 std::vector<int>& cross_index); 00206 00215 void splitMeshCurves(std::vector<boost::shared_ptr<SplineCurve> >& mesh_curves, 00216 std::vector<double>& params, int& nmb_u_crvs, 00217 std::vector<int>& cross_index, double epsgeo); 00218 00221 void sortMeshCurves(std::vector<boost::shared_ptr<SplineCurve> >& mesh_curves, 00222 std::vector<double>& params, int nmb_u_crvs, 00223 std::vector<int>& cross_index); 00224 00225 00232 void getCrossTangs(const std::vector<boost::shared_ptr<SplineCurve> >& curves, 00233 std::vector<boost::shared_ptr<SplineCurve> >& mod_cross_curves, 00234 double tol1, double tol2); 00235 00242 void addMissingCrossCurves(const std::vector<boost::shared_ptr<SplineCurve> >& bnd_curves, 00243 std::vector<boost::shared_ptr<SplineCurve> >& cross_crvs); 00244 00252 void getTangBlends(std::vector<boost::shared_ptr<SplineCurve> >& curves, int iedge, 00253 std::vector<boost::shared_ptr<SplineCurve> >& blend_functions); 00254 00264 void blendcoef(double evecu[],double evecv[],double etang[], 00265 int idim,int isign,double *coef1, double *coef2); 00266 00277 void hermit(double econd[], int icond, bool hasder1, 00278 double astart, double aend, int idim); 00279 00286 void fixCrossEndPts(const std::vector<boost::shared_ptr<SplineCurve> >& bd_curves, 00287 const std::vector<boost::shared_ptr<SplineCurve> >& cross_curves); 00288 00289 00297 void 00298 makeLoftParams(std::vector<boost::shared_ptr<SplineCurve> >::const_iterator first_curve, 00299 int nmb_crvs, double param_length, std::vector<double>& params); 00300 00310 void 00311 reparamBoundaryCurve(std::vector<boost::shared_ptr<SplineCurve> >& curves, double aconst); 00312 00313 } // namespace CoonsPatchGen 00314 00315 00316 } // namespace Go 00317 00318 00319 #endif // _COONSPATCHGEN_H
Generated on Tue Sep 21 15:44:16 2010 for GoTools Core by  doxygen 1.6.3