Mesher.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2010 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 #ifndef MESHPART_MESHER_H
00024 #define MESHPART_MESHER_H
00025 
00026 class TopoDS_Shape;
00027 
00028 namespace Mesh { class MeshObject; }
00029 namespace MeshPart {
00030 
00031 class Mesher
00032 {
00033 public:
00034     Mesher(const TopoDS_Shape&);
00035     ~Mesher();
00036 
00037     void setMaxLength(float s)
00038     { maxLength = s; }
00039     float getMaxLength() const
00040     { return maxLength; }
00041     void setMaxArea(float s)
00042     { maxArea = s; }
00043     float getMaxArea() const
00044     { return maxArea; }
00045     void setLocalLength(float s)
00046     { localLength = s; }
00047     float getLocalLength() const
00048     { return localLength; }
00049     void setDeflection(float s)
00050     { deflection = s; }
00051     float getDeflection() const
00052     { return deflection; }
00053     void setRegular(bool s)
00054     { regular = s; }
00055     bool isRegular() const
00056     { return regular; }
00057 
00058     Mesh::MeshObject* createMesh() const;
00059 
00060 private:
00061     const TopoDS_Shape& shape;
00062     float maxLength;
00063     float maxArea;
00064     float localLength;
00065     float deflection;
00066     bool regular;
00067 };
00068 
00069 } // namespace MeshPart
00070 
00071 #endif // MESHPART_MESHER_H

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