//=========================================================================== // 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 _GAPREMOVAL_H 00016 #define _GAPREMOVAL_H 00017 00018 #include "GoTools/geometry/SplineCurve.h" 00019 #include "GoTools/geometry/SplineSurface.h" 00020 #include "GoTools/geometry/CurveOnSurface.h" 00021 #include "GoTools/geometry/BsplineBasis.h" 00022 #include "GoTools/geometry/BoundedSurface.h" 00023 #include "GoTools/creators/ConstraintDefinitions.h" 00024 00025 namespace Go { 00026 00027 // Removal of gaps between two adjacent surfaces of various types 00028 00029 namespace GapRemoval 00030 { 00031 00032 // Both surfaces are non-trimmed spline surfaces and the 00033 // common boundary are described by CurveOnSurface entities 00034 void 00035 removeGapSpline(boost::shared_ptr<SplineSurface>& srf1, 00036 boost::shared_ptr<CurveOnSurface>& bd_cv1, 00037 double start1, double end1, 00038 boost::shared_ptr<SplineSurface>& srf2, 00039 boost::shared_ptr<CurveOnSurface>& bd_cv2, 00040 double start2, double end2, Point vertex1, Point vertex2, 00041 double epsge, bool *same_orientation = NULL); 00042 00043 // Both surfaces are trimmed of some type and the 00044 // common boundary are described by CurveOnSurface entities 00045 double 00046 removeGapTrim(boost::shared_ptr<CurveOnSurface>& bd_cv1, 00047 double start1, double end1, 00048 boost::shared_ptr<CurveOnSurface>& bd_cv2, 00049 double start2, double end2, Point vertex1, Point vertex2, 00050 double epsge); 00051 00052 bool 00053 removeGapSplineTrim(boost::shared_ptr<SplineSurface>& srf1, 00054 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv1, 00055 std::vector<double> start1, 00056 std::vector<double> end1, 00057 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv2, 00058 std::vector<double> start2, 00059 std::vector<double> end2, Point vertex1, 00060 Point vertex2, double epsge); 00061 00062 void modifySplineSf(boost::shared_ptr<ParamSurface>& srf1, 00063 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv1, 00064 std::vector<double> start1, std::vector<double> end1, 00065 boost::shared_ptr<ParamSurface>& srf2, 00066 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv2, 00067 std::vector<double> start2, std::vector<double> end2, 00068 double epsge); 00069 00070 void modifySplines(boost::shared_ptr<ParamSurface>& srf1, 00071 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv1, 00072 std::vector<double>& start1, std::vector<double>& end1, 00073 boost::shared_ptr<ParamSurface>& srf2, 00074 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv2, 00075 std::vector<double>& start2, std::vector<double>& end2, 00076 std::vector<Point>& vertex, double epsge); 00077 // 00078 void 00079 removeGapSpline2(std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv1, 00080 std::vector<double>& start1, std::vector<double>& end1, 00081 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cv2, 00082 std::vector<double>& start2, std::vector<double>& end2, 00083 std::vector<Point>& vertex, double epsge); 00084 00085 std::vector<boost::shared_ptr<sideConstraintSet> > 00086 getCoefConstraints(boost::shared_ptr<SplineCurve>& crv1, int idx1, 00087 boost::shared_ptr<SplineCurve>& crv2, int idx2, 00088 double tol); 00089 00090 boost::shared_ptr<SplineCurve> 00091 replaceCurvePiece(boost::shared_ptr<SplineCurve> crv, 00092 boost::shared_ptr<SplineCurve> sub_crv, 00093 double par1, int cont1, 00094 double par2, int cont2); 00095 00096 boost::shared_ptr<SplineSurface> 00097 getSplineAndBd(boost::shared_ptr<ParamSurface> psurf, 00098 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_crvs); 00099 00100 void 00101 getBoundarySamples(std::vector<boost::shared_ptr<CurveOnSurface> >& all_bd, 00102 std::vector<boost::shared_ptr<CurveOnSurface> >& bd_cvs, 00103 std::vector<double>& pts, std::vector<double>& pars, 00104 std::vector<int>& bd_idx, double epsge); 00105 00106 bool modifyAtVertex(boost::shared_ptr<SplineSurface> srf, 00107 Point face_param, Point vertex, 00108 double epsge); 00109 00110 void 00111 checkBoundaryDist(boost::shared_ptr<CurveOnSurface> bd1, 00112 boost::shared_ptr<CurveOnSurface> bd2, 00113 double start1, double end1, 00114 double start2, double end2, 00115 int nmb_sample, double& mdist1, 00116 double& mdist2); 00117 00118 } // of namespace CreatorsUtils. 00119 00120 }; // end namespace Go 00121 00122 00123 00124 #endif // _GAPREMOVAL_H
Generated on Tue Sep 21 15:44:17 2010 for GoTools Core by  doxygen 1.6.3