00001 /* BurrTools 00002 * 00003 * BurrTools is the legal property of its developers, whose 00004 * names are listed in the COPYRIGHT file, which is included 00005 * within the source distribution. 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation; either version 2 00010 * of the License, or (at your option) any later version. 00011 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 */ 00021 #ifndef __STL_2_H__ 00022 #define __STL_2_H__ 00023 00024 #include "stl.h" 00025 #include "types.h" 00026 00028 class stlExporter_2_c : public stlExporter_c { 00029 00030 public: 00031 00032 stlExporter_2_c(void) : sphere_rad(10), offset(0), round(1.0), connection_rad(0.75), 00033 recursion(2.0), inner_rad(0), hole_diam(0), square_hole(false) {} 00034 00035 virtual Polyhedron * getMesh(const voxel_c & v, const faceList_c & holes) const; 00036 00037 /* some functions to set some parameters for the output, 00038 * all parameters must be double values. 00039 */ 00040 00041 /* return a text to display to the user about the parameter x */ 00042 virtual unsigned int numParameters(void) const { return 8; } 00043 virtual const char * getParameterName(unsigned int idx) const; 00044 virtual double getParameter(unsigned int idx) const; 00045 virtual void setParameter(unsigned int idx, double value); 00046 virtual const char * getParameterTooltip(unsigned int idx) const; 00047 virtual parameterTypes getParameterType(unsigned int idx) const; 00048 00049 private: 00050 00051 /* parameters */ 00052 double sphere_rad; 00053 double offset; 00054 double round; 00055 double connection_rad; 00056 double recursion; 00057 double inner_rad; 00058 double hole_diam; 00059 bool square_hole; 00060 00061 private: 00062 00063 // no copying and assigning 00064 stlExporter_2_c(const stlExporter_2_c&); 00065 void operator=(const stlExporter_2_c&); 00066 }; 00067 00068 #endif