00001 /*************************************************************************** 00002 * Copyright (c) 2006 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 00024 #ifndef FEATURE_MESH_SOLID_H 00025 #define FEATURE_MESH_SOLID_H 00026 00027 #include "MeshFeature.h" 00028 00029 #include <App/PropertyStandard.h> 00030 #include <App/PropertyLinks.h> 00031 00032 namespace Mesh 00033 { 00034 00038 class Sphere : public Mesh::Feature 00039 { 00040 PROPERTY_HEADER(Mesh::Sphere); 00041 00042 public: 00043 Sphere(); 00044 00045 App::PropertyFloatConstraint Radius; 00046 App::PropertyIntegerConstraint Sampling; 00047 00050 00051 App::DocumentObjectExecReturn *execute(void); 00052 short mustExecute() const; 00054 }; 00055 00056 // ------------------------------------------------------------- 00057 00058 class Ellipsoid : public Mesh::Feature 00059 { 00060 PROPERTY_HEADER(Mesh::Ellipsoid); 00061 00062 public: 00063 Ellipsoid(); 00064 00065 App::PropertyFloatConstraint Radius1; 00066 App::PropertyFloatConstraint Radius2; 00067 App::PropertyIntegerConstraint Sampling; 00068 00071 00072 App::DocumentObjectExecReturn *execute(void); 00073 short mustExecute() const; 00075 }; 00076 00077 // ------------------------------------------------------------- 00078 00079 class Cylinder : public Mesh::Feature 00080 { 00081 PROPERTY_HEADER(Mesh::Cylinder); 00082 00083 public: 00084 Cylinder(); 00085 00086 App::PropertyFloatConstraint Radius; 00087 App::PropertyFloatConstraint Length; 00088 App::PropertyFloatConstraint EdgeLength; 00089 App::PropertyBool Closed; 00090 App::PropertyIntegerConstraint Sampling; 00091 00094 00095 App::DocumentObjectExecReturn *execute(void); 00096 short mustExecute() const; 00098 }; 00099 00100 // ------------------------------------------------------------- 00101 00102 class Cone : public Mesh::Feature 00103 { 00104 PROPERTY_HEADER(Mesh::Cone); 00105 00106 public: 00107 Cone(); 00108 00109 App::PropertyFloatConstraint Radius1; 00110 App::PropertyFloatConstraint Radius2; 00111 App::PropertyFloatConstraint Length; 00112 App::PropertyFloatConstraint EdgeLength; 00113 App::PropertyBool Closed; 00114 App::PropertyIntegerConstraint Sampling; 00115 00118 00119 App::DocumentObjectExecReturn *execute(void); 00120 short mustExecute() const; 00122 }; 00123 00124 // ------------------------------------------------------------- 00125 00126 class Torus : public Mesh::Feature 00127 { 00128 PROPERTY_HEADER(Mesh::Torus); 00129 00130 public: 00131 Torus(); 00132 00133 App::PropertyFloatConstraint Radius1; 00134 App::PropertyFloatConstraint Radius2; 00135 App::PropertyIntegerConstraint Sampling; 00136 00139 00140 App::DocumentObjectExecReturn *execute(void); 00141 short mustExecute() const; 00143 }; 00144 00145 // ------------------------------------------------------------- 00146 00147 class Cube : public Mesh::Feature 00148 { 00149 PROPERTY_HEADER(Mesh::Cube); 00150 00151 public: 00152 Cube(); 00153 00154 App::PropertyFloatConstraint Length; 00155 App::PropertyFloatConstraint Width; 00156 App::PropertyFloatConstraint Height; 00157 00160 00161 App::DocumentObjectExecReturn *execute(void); 00162 short mustExecute() const; 00164 }; 00165 00166 } 00167 00168 #endif // FEATURE_MESH_SOLID_H