UniGridApprox.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2007                                                    *
00003  *   Joachim Zettler <Joachim.Zettler@gmx.de>                              *
00004  *   Human Rezai <Human@web.de>                                            *
00005  *                                                                         *
00006  *   This file is part of the FreeCAD CAx development system.              *
00007  *                                                                         *
00008  *   This library is free software; you can redistribute it and/or         *
00009  *   modify it under the terms of the GNU Library General Public           *
00010  *   License as published by the Free Software Foundation; either          *
00011  *   version 2 of the License, or (at your option) any later version.      *
00012  *                                                                         *
00013  *   This library  is distributed in the hope that it will be useful,      *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00016  *   GNU Library General Public License for more details.                  *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU Library General Public     *
00019  *   License along with this library; see the file COPYING.LIB. If not,    *
00020  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00021  *   Suite 330, Boston, MA  02111-1307, USA                                *
00022  *                                                                         *
00023  ***************************************************************************/
00024 
00025 #ifndef UNIGRIDAPPROX_H
00026 #define UNIGRIDAPPROX_H
00027 
00028 #include "routine.h"
00029 #include <boost/numeric/ublas/matrix.hpp>
00030 #include <GeomAdaptor_Surface.hxx>
00031 #include <TopoDS_Face.hxx>
00032 
00033 using namespace boost::numeric;
00034 
00035 
00036 class CamExport UniGridApprox: public Routines
00037 {
00038 public:
00039     UniGridApprox(const MeshCore::MeshKernel &InputMesh, double Tol);
00040     ~UniGridApprox();
00041 
00042     bool Perform(double TOL);
00043     bool MeshOffset();
00044     bool SurfMeshParam();
00045     bool CompKnots(int m, int n);
00046     bool MatComp(int m, int n);
00047     bool BuildSurf();
00048     double CompGridError();
00049     double CompMeshError();
00050     bool WriteMatrix(ublas::matrix<double> M);
00051 
00052     MeshCore::MeshKernel m_Mesh;
00053     GeomAdaptor_Surface aAdaptorSurface;
00054     double m_offset;
00055 
00056     std::vector< std::vector<Base::Vector3f> > m_Grid;
00057     std::vector< std::vector<Base::Vector3f> > m_GridCopy;
00058     std::vector<double> m_err;
00059     std::vector< std::vector<double> > mG_err;
00060     ublas::matrix<double> Q;   //Data-Matrix
00061     ublas::matrix<double> CPx;
00062     ublas::matrix<double> CPy;
00063     ublas::matrix<double> CPz;
00064     std::vector<double> m_uParam;
00065     std::vector<double> m_vParam;
00066     std::vector<double> m_uknots;
00067     std::vector<double> m_vknots;
00068     int uCP, vCP;
00069     int m_um;
00070     int m_vm;
00071     int m_udeg;
00072     int m_vdeg;
00073     int n_x;
00074     int n_y;
00075     double m_Tol;
00076 
00077     TopoDS_Face m_Face;
00078 
00079 protected:
00080 
00081 };
00082 
00083 #endif

Generated on Wed Nov 23 19:00:56 2011 for FreeCAD by  doxygen 1.6.1