/*************************************************************************** * Copyright (c) 2007 * * Joachim Zettler * * Human Rezai * * * * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Library General Public * * License as published by the Free Software Foundation; either * * version 2 of the License, or (at your option) any later version. * * * * This library 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 Library General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this library; see the file COPYING.LIB. If not, * * write to the Free Software Foundation, Inc., 59 Temple Place, * * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ #ifndef UNIGRIDAPPROX_H #define UNIGRIDAPPROX_H #include "routine.h" #include #include #include using namespace boost::numeric; class CamExport UniGridApprox: public Routines { public: UniGridApprox(const MeshCore::MeshKernel &InputMesh, double Tol); ~UniGridApprox(); bool Perform(double TOL); bool MeshOffset(); bool SurfMeshParam(); bool CompKnots(int m, int n); bool MatComp(int m, int n); bool BuildSurf(); double CompGridError(); double CompMeshError(); bool WriteMatrix(ublas::matrix M); MeshCore::MeshKernel m_Mesh; GeomAdaptor_Surface aAdaptorSurface; double m_offset; std::vector< std::vector > m_Grid; std::vector< std::vector > m_GridCopy; std::vector m_err; std::vector< std::vector > mG_err; ublas::matrix Q; //Data-Matrix ublas::matrix CPx; ublas::matrix CPy; ublas::matrix CPz; std::vector m_uParam; std::vector m_vParam; std::vector m_uknots; std::vector m_vknots; int uCP, vCP; int m_um; int m_vm; int m_udeg; int m_vdeg; int n_x; int n_y; double m_Tol; TopoDS_Face m_Face; protected: }; #endif