00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "PreCompiled.h"
00024 #include "HypothesisPy.h"
00025 #include "FemMeshPy.h"
00026 #include <Base/Interpreter.h>
00027 #include <Mod/Part/App/TopoShapePy.h>
00028
00029 #include <sstream>
00030 #include <StdMeshers_Arithmetic1D.hxx>
00031 #include <StdMeshers_AutomaticLength.hxx>
00032 #include <StdMeshers_MaxLength.hxx>
00033 #include <StdMeshers_LocalLength.hxx>
00034 #include <StdMeshers_MaxElementArea.hxx>
00035 #include <StdMeshers_NotConformAllowed.hxx>
00036 #include <StdMeshers_QuadranglePreference.hxx>
00037 #include <StdMeshers_Quadrangle_2D.hxx>
00038 #include <StdMeshers_Regular_1D.hxx>
00039 #include <StdMeshers_UseExisting_1D2D.hxx>
00040 #include <StdMeshers_CompositeSegment_1D.hxx>
00041 #include <StdMeshers_Deflection1D.hxx>
00042 #include <StdMeshers_Hexa_3D.hxx>
00043 #include <StdMeshers_LayerDistribution.hxx>
00044 #include <StdMeshers_LengthFromEdges.hxx>
00045 #include <StdMeshers_MaxElementVolume.hxx>
00046 #include <StdMeshers_MEFISTO_2D.hxx>
00047 #include <StdMeshers_NumberOfLayers.hxx>
00048 #include <StdMeshers_NumberOfSegments.hxx>
00049 #include <StdMeshers_Prism_3D.hxx>
00050 #include <StdMeshers_Projection_1D.hxx>
00051 #include <StdMeshers_Projection_2D.hxx>
00052 #include <StdMeshers_Projection_3D.hxx>
00053 #include <StdMeshers_QuadraticMesh.hxx>
00054 #include <StdMeshers_RadialPrism_3D.hxx>
00055 #include <StdMeshers_SegmentAroundVertex_0D.hxx>
00056 #include <StdMeshers_TrianglePreference.hxx>
00057 #include <StdMeshers_ProjectionSource1D.hxx>
00058 #include <StdMeshers_ProjectionSource2D.hxx>
00059 #include <StdMeshers_ProjectionSource3D.hxx>
00060 #include <StdMeshers_SegmentLengthAroundVertex.hxx>
00061 #include <StdMeshers_StartEndLength.hxx>
00062
00063 #include <StdMeshers_CompositeHexa_3D.hxx>
00064
00065 using namespace Fem;
00066
00067
00068 HypothesisPy::HypothesisPy(boost::shared_ptr<SMESH_Hypothesis> h)
00069 : hyp(h)
00070 {
00071 }
00072
00073 HypothesisPy::~HypothesisPy()
00074 {
00075 }
00076
00077
00078
00079 template<class T>
00080 void SMESH_HypothesisPy<T>::init_type(PyObject* module)
00081 {
00082
00083 SMESH_HypothesisPy<T>::behaviors().supportRepr();
00084 SMESH_HypothesisPy<T>::behaviors().supportGetattr();
00085 SMESH_HypothesisPy<T>::behaviors().supportSetattr();
00086 SMESH_HypothesisPy<T>::behaviors().type_object()->tp_new = &PyMake;
00087
00088 add_varargs_method("setLibName", &SMESH_HypothesisPy<T>::setLibName, "setLibName(String)");
00089 add_varargs_method("getLibName", &SMESH_HypothesisPy<T>::getLibName, "String getLibName()");
00090 add_varargs_method("setParameters", &SMESH_HypothesisPy<T>::setParameters, "setParameters(String)");
00091 add_varargs_method("getParameters", &SMESH_HypothesisPy<T>::getParameters, "String getParameters()");
00092 add_varargs_method("setLastParameters", &SMESH_HypothesisPy<T>::setLastParameters, "setLastParameters(String)");
00093 add_varargs_method("getLastParameters", &SMESH_HypothesisPy<T>::getLastParameters, "String getLastParameters()");
00094 add_varargs_method("clearParameters", &SMESH_HypothesisPy<T>::clearParameters, "clearParameters()");
00095 add_varargs_method("isAuxiliary", &SMESH_HypothesisPy<T>::isAuxiliary, "Bool isAuxiliary()");
00096 add_varargs_method("setParametersByMesh", &SMESH_HypothesisPy<T>::setParametersByMesh, "setParametersByMesh(Mesh,Shape)");
00097 Base::Interpreter().addType(SMESH_HypothesisPy<T>::behaviors().type_object(),
00098 module,SMESH_HypothesisPy<T>::behaviors().getName());
00099 }
00100
00101 template<class T>
00102 SMESH_HypothesisPy<T>::SMESH_HypothesisPy(SMESH_Hypothesis* h) : hyp(h)
00103 {
00104 }
00105
00106 template<class T>
00107 SMESH_HypothesisPy<T>::~SMESH_HypothesisPy()
00108 {
00109 }
00110
00111 template<class T>
00112 Py::Object SMESH_HypothesisPy<T>::getattr(const char *name)
00113 {
00114 if (strcmp(name,"this") == 0)
00115 return Hypothesis(Py::asObject(new HypothesisPy(this->getHypothesis())));
00116 return Py::PythonExtension<T>::getattr(name);
00117 }
00118
00119 template<class T>
00120 Py::Object SMESH_HypothesisPy<T>::repr()
00121 {
00122 std::stringstream str;
00123 str << hyp->GetName() << ", " << hyp->GetID();
00124 return Py::String(str.str());
00125 }
00126
00127 template<class T>
00128 Py::Object SMESH_HypothesisPy<T>::setLibName(const Py::Tuple& args)
00129 {
00130 std::string libName = (std::string)Py::String(args[0]);
00131 hypothesis<SMESH_Hypothesis>()->SetLibName(libName.c_str());
00132 return Py::None();
00133 }
00134
00135 template<class T>
00136 Py::Object SMESH_HypothesisPy<T>::getLibName(const Py::Tuple& args)
00137 {
00138 return Py::String(hypothesis<SMESH_Hypothesis>()->GetLibName());
00139 }
00140
00141 template<class T>
00142 Py::Object SMESH_HypothesisPy<T>::setParameters(const Py::Tuple& args)
00143 {
00144 std::string paramName = (std::string)Py::String(args[0]);
00145 hypothesis<SMESH_Hypothesis>()->SetParameters(paramName.c_str());
00146 return Py::None();
00147 }
00148
00149 template<class T>
00150 Py::Object SMESH_HypothesisPy<T>::getParameters(const Py::Tuple& args)
00151 {
00152 return Py::String(hypothesis<SMESH_Hypothesis>()->GetParameters());
00153 }
00154
00155 template<class T>
00156 Py::Object SMESH_HypothesisPy<T>::setLastParameters(const Py::Tuple& args)
00157 {
00158 std::string paramName = (std::string)Py::String(args[0]);
00159 hypothesis<SMESH_Hypothesis>()->SetLastParameters(paramName.c_str());
00160 return Py::None();
00161 }
00162
00163 template<class T>
00164 Py::Object SMESH_HypothesisPy<T>::getLastParameters(const Py::Tuple& args)
00165 {
00166 return Py::String(hypothesis<SMESH_Hypothesis>()->GetLastParameters());
00167 }
00168
00169 template<class T>
00170 Py::Object SMESH_HypothesisPy<T>::clearParameters(const Py::Tuple& args)
00171 {
00172 hypothesis<SMESH_Hypothesis>()->ClearParameters();
00173 return Py::None();
00174 }
00175
00176 template<class T>
00177 Py::Object SMESH_HypothesisPy<T>::setParametersByMesh(const Py::Tuple& args)
00178 {
00179 PyObject *mesh, *shape;
00180 if (!PyArg_ParseTuple(args.ptr(), "O!O!",
00181 &(Fem::FemMeshPy::Type), &mesh,
00182 &(Part::TopoShapePy::Type), &shape))
00183 throw Py::Exception();
00184 Fem::FemMesh* m = static_cast<Fem::FemMeshPy*>(mesh)->getFemMeshPtr();
00185 const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(shape)->getTopoShapePtr()->_Shape;
00186 return Py::Boolean(hypothesis<SMESH_Hypothesis>()->SetParametersByMesh(m->getSMesh(), s));
00187 }
00188
00189 template<class T>
00190 Py::Object SMESH_HypothesisPy<T>::isAuxiliary(const Py::Tuple& args)
00191 {
00192 return Py::Boolean(hypothesis<SMESH_Hypothesis>()->IsAuxiliary());
00193 }
00194
00195 template<class T>
00196 PyObject *SMESH_HypothesisPy<T>::PyMake(struct _typeobject *type, PyObject * args, PyObject * kwds)
00197 {
00198 int hypId;
00199 PyObject* obj;
00200 if (!PyArg_ParseTuple(args, "iO!",&hypId,&(FemMeshPy::Type),&obj))
00201 return 0;
00202 FemMesh* mesh = static_cast<FemMeshPy*>(obj)->getFemMeshPtr();
00203 return new T(hypId, 1, mesh->getGenerator());
00204 }
00205
00206
00207
00208 void StdMeshers_Arithmetic1DPy::init_type(PyObject* module)
00209 {
00210 behaviors().name("StdMeshers_Arithmetic1D");
00211 behaviors().doc("StdMeshers_Arithmetic1D");
00212
00213 add_varargs_method("setLength", &StdMeshers_Arithmetic1DPy::setLength, "setLength()");
00214 add_varargs_method("getLength", &StdMeshers_Arithmetic1DPy::getLength, "getLength()");
00215 SMESH_HypothesisPyBase::init_type(module);
00216 }
00217
00218 StdMeshers_Arithmetic1DPy::StdMeshers_Arithmetic1DPy(int hypId, int studyId, SMESH_Gen* gen)
00219 : SMESH_HypothesisPyBase(new StdMeshers_Arithmetic1D(hypId, studyId, gen))
00220 {
00221 }
00222
00223 StdMeshers_Arithmetic1DPy::~StdMeshers_Arithmetic1DPy()
00224 {
00225 }
00226
00227 Py::Object StdMeshers_Arithmetic1DPy::setLength(const Py::Tuple& args)
00228 {
00229 hypothesis<StdMeshers_Arithmetic1D>()->
00230 SetLength((double)Py::Float(args[0]), (bool)Py::Boolean(args[1]));
00231 return Py::None();
00232 }
00233
00234 Py::Object StdMeshers_Arithmetic1DPy::getLength(const Py::Tuple& args)
00235 {
00236 int start;
00237 if (!PyArg_ParseTuple(args.ptr(), "i",&start))
00238 throw Py::Exception();
00239 return Py::Float(hypothesis<StdMeshers_Arithmetic1D>()->
00240 GetLength(start ? true : false));
00241 }
00242
00243
00244
00245 void StdMeshers_AutomaticLengthPy::init_type(PyObject* module)
00246 {
00247 behaviors().name("StdMeshers_AutomaticLength");
00248 behaviors().doc("StdMeshers_AutomaticLength");
00249
00250 add_varargs_method("setFineness", &StdMeshers_AutomaticLengthPy::setFineness, "setFineness()");
00251 add_varargs_method("getFineness", &StdMeshers_AutomaticLengthPy::getFineness, "getFineness()");
00252 add_varargs_method("getLength", &StdMeshers_AutomaticLengthPy::getLength, "getLength()");
00253 SMESH_HypothesisPyBase::init_type(module);
00254 }
00255
00256 StdMeshers_AutomaticLengthPy::StdMeshers_AutomaticLengthPy(int hypId, int studyId, SMESH_Gen* gen)
00257 : SMESH_HypothesisPyBase(0)
00258 {
00259 }
00260
00261 StdMeshers_AutomaticLengthPy::~StdMeshers_AutomaticLengthPy()
00262 {
00263 }
00264
00265 Py::Object StdMeshers_AutomaticLengthPy::setFineness(const Py::Tuple& args)
00266 {
00267 double fine = (double)Py::Float(args[0]);
00268 hypothesis<StdMeshers_AutomaticLength>()->SetFineness(fine);
00269 return Py::None();
00270 }
00271
00272 Py::Object StdMeshers_AutomaticLengthPy::getFineness(const Py::Tuple& args)
00273 {
00274 return Py::Float(hypothesis<StdMeshers_AutomaticLength>()->GetFineness());
00275 }
00276
00277 namespace Py {
00278 typedef ExtensionObject<Fem::FemMeshPy> FemMesh;
00279 typedef ExtensionObject<Part::TopoShapePy> TopoShape;
00280 template<> bool FemMesh::accepts (PyObject *pyob) const
00281 {
00282 return (pyob && PyObject_TypeCheck(pyob, &(Fem::FemMeshPy::Type)));
00283 }
00284 template<> bool TopoShape::accepts (PyObject *pyob) const
00285 {
00286 return (pyob && PyObject_TypeCheck(pyob, &(Part::TopoShapePy::Type)));
00287 }
00288 }
00289
00290 Py::Object StdMeshers_AutomaticLengthPy::getLength(const Py::Tuple& args)
00291 {
00292 Py::FemMesh mesh(args[0]);
00293 Py::Object shape_or_double(args[1]);
00294
00295 Fem::FemMesh* m = mesh.extensionObject()->getFemMeshPtr();
00296 if (shape_or_double.type() == Py::Float().type()) {
00297 double len = (double)Py::Float(shape_or_double);
00298 return Py::Float(hypothesis<StdMeshers_AutomaticLength>()->GetLength(m->getSMesh(),len));
00299 }
00300 else {
00301 Py::TopoShape shape(shape_or_double);
00302 const TopoDS_Shape& s = shape.extensionObject()->getTopoShapePtr()->_Shape;
00303 return Py::Float(hypothesis<StdMeshers_AutomaticLength>()->GetLength(m->getSMesh(),s));
00304 }
00305
00306 throw Py::Exception();
00307 }
00308
00309
00310
00311 void StdMeshers_NotConformAllowedPy::init_type(PyObject* module)
00312 {
00313 behaviors().name("StdMeshers_NotConformAllowed");
00314 behaviors().doc("StdMeshers_NotConformAllowed");
00315 SMESH_HypothesisPyBase::init_type(module);
00316 }
00317
00318 StdMeshers_NotConformAllowedPy::StdMeshers_NotConformAllowedPy(int hypId, int studyId, SMESH_Gen* gen)
00319 : SMESH_HypothesisPyBase(new StdMeshers_NotConformAllowed(hypId, studyId, gen))
00320 {
00321 }
00322
00323 StdMeshers_NotConformAllowedPy::~StdMeshers_NotConformAllowedPy()
00324 {
00325 }
00326
00327
00328
00329 void StdMeshers_MaxLengthPy::init_type(PyObject* module)
00330 {
00331 behaviors().name("StdMeshers_MaxLength");
00332 behaviors().doc("StdMeshers_MaxLength");
00333
00334 add_varargs_method("setLength", &StdMeshers_MaxLengthPy::setLength, "setLength()");
00335 add_varargs_method("getLength", &StdMeshers_MaxLengthPy::getLength, "getLength()");
00336 add_varargs_method("havePreestimatedLength", &StdMeshers_MaxLengthPy::havePreestimatedLength, "havePreestimatedLength()");
00337 add_varargs_method("getPreestimatedLength", &StdMeshers_MaxLengthPy::getPreestimatedLength, "getPreestimatedLength()");
00338 add_varargs_method("setPreestimatedLength", &StdMeshers_MaxLengthPy::setPreestimatedLength, "setPreestimatedLength()");
00339 add_varargs_method("setUsePreestimatedLength", &StdMeshers_MaxLengthPy::setUsePreestimatedLength, "setUsePreestimatedLength()");
00340 add_varargs_method("getUsePreestimatedLength", &StdMeshers_MaxLengthPy::getUsePreestimatedLength, "getUsePreestimatedLength()");
00341 SMESH_HypothesisPyBase::init_type(module);
00342 }
00343
00344 StdMeshers_MaxLengthPy::StdMeshers_MaxLengthPy(int hypId, int studyId, SMESH_Gen* gen)
00345 : SMESH_HypothesisPyBase(new StdMeshers_MaxLength(hypId, studyId, gen))
00346 {
00347 }
00348
00349 StdMeshers_MaxLengthPy::~StdMeshers_MaxLengthPy()
00350 {
00351 }
00352
00353 Py::Object StdMeshers_MaxLengthPy::setLength(const Py::Tuple& args)
00354 {
00355 hypothesis<StdMeshers_MaxLength>()->SetLength((double)Py::Float(args[0]));
00356 return Py::None();
00357 }
00358
00359 Py::Object StdMeshers_MaxLengthPy::getLength(const Py::Tuple& args)
00360 {
00361 return Py::Float(hypothesis<StdMeshers_MaxLength>()->GetLength());
00362 }
00363
00364 Py::Object StdMeshers_MaxLengthPy::havePreestimatedLength(const Py::Tuple& args)
00365 {
00366 return Py::Boolean(hypothesis<StdMeshers_MaxLength>()->HavePreestimatedLength());
00367 }
00368
00369 Py::Object StdMeshers_MaxLengthPy::getPreestimatedLength(const Py::Tuple& args)
00370 {
00371 return Py::Float(hypothesis<StdMeshers_MaxLength>()->GetPreestimatedLength());
00372 }
00373
00374 Py::Object StdMeshers_MaxLengthPy::setPreestimatedLength(const Py::Tuple& args)
00375 {
00376 hypothesis<StdMeshers_MaxLength>()->SetPreestimatedLength((double)Py::Float(args[0]));
00377 return Py::None();
00378 }
00379
00380 Py::Object StdMeshers_MaxLengthPy::setUsePreestimatedLength(const Py::Tuple& args)
00381 {
00382 hypothesis<StdMeshers_MaxLength>()->SetUsePreestimatedLength((bool)Py::Boolean(args[0]));
00383 return Py::None();
00384 }
00385
00386 Py::Object StdMeshers_MaxLengthPy::getUsePreestimatedLength(const Py::Tuple& args)
00387 {
00388 return Py::Boolean(hypothesis<StdMeshers_MaxLength>()->GetUsePreestimatedLength());
00389 }
00390
00391
00392
00393 void StdMeshers_LocalLengthPy::init_type(PyObject* module)
00394 {
00395 behaviors().name("StdMeshers_LocalLength");
00396 behaviors().doc("StdMeshers_LocalLength");
00397
00398 add_varargs_method("setLength", &StdMeshers_LocalLengthPy::setLength, "setLength()");
00399 add_varargs_method("getLength", &StdMeshers_LocalLengthPy::getLength, "getLength()");
00400 add_varargs_method("setPrecision", &StdMeshers_LocalLengthPy::setPrecision, "setPrecision()");
00401 add_varargs_method("getPrecision", &StdMeshers_LocalLengthPy::getPrecision, "getPrecision()");
00402 SMESH_HypothesisPyBase::init_type(module);
00403 }
00404
00405 StdMeshers_LocalLengthPy::StdMeshers_LocalLengthPy(int hypId, int studyId, SMESH_Gen* gen)
00406 : SMESH_HypothesisPyBase(new StdMeshers_LocalLength(hypId, studyId, gen))
00407 {
00408 }
00409
00410 StdMeshers_LocalLengthPy::~StdMeshers_LocalLengthPy()
00411 {
00412 }
00413
00414 Py::Object StdMeshers_LocalLengthPy::setLength(const Py::Tuple& args)
00415 {
00416 hypothesis<StdMeshers_LocalLength>()->SetLength((double)Py::Float(args[0]));
00417 return Py::None();
00418 }
00419
00420 Py::Object StdMeshers_LocalLengthPy::getLength(const Py::Tuple& args)
00421 {
00422 return Py::Float(hypothesis<StdMeshers_LocalLength>()->GetLength());
00423 }
00424
00425 Py::Object StdMeshers_LocalLengthPy::setPrecision(const Py::Tuple& args)
00426 {
00427 hypothesis<StdMeshers_LocalLength>()->SetPrecision((double)Py::Float(args[0]));
00428 return Py::None();
00429 }
00430
00431 Py::Object StdMeshers_LocalLengthPy::getPrecision(const Py::Tuple& args)
00432 {
00433 return Py::Float(hypothesis<StdMeshers_LocalLength>()->GetPrecision());
00434 }
00435
00436
00437
00438 void StdMeshers_MaxElementAreaPy::init_type(PyObject* module)
00439 {
00440 behaviors().name("StdMeshers_MaxElementArea");
00441 behaviors().doc("StdMeshers_MaxElementArea");
00442
00443 add_varargs_method("setMaxArea", &StdMeshers_MaxElementAreaPy::setMaxArea, "setMaxArea()");
00444 add_varargs_method("getMaxArea", &StdMeshers_MaxElementAreaPy::getMaxArea, "getMaxArea()");
00445 SMESH_HypothesisPyBase::init_type(module);
00446 }
00447
00448 StdMeshers_MaxElementAreaPy::StdMeshers_MaxElementAreaPy(int hypId, int studyId, SMESH_Gen* gen)
00449 : SMESH_HypothesisPyBase(new StdMeshers_MaxElementArea(hypId, studyId, gen))
00450 {
00451 }
00452
00453 StdMeshers_MaxElementAreaPy::~StdMeshers_MaxElementAreaPy()
00454 {
00455 }
00456
00457 Py::Object StdMeshers_MaxElementAreaPy::setMaxArea(const Py::Tuple& args)
00458 {
00459 hypothesis<StdMeshers_MaxElementArea>()->SetMaxArea((double)Py::Float(args[0]));
00460 return Py::None();
00461 }
00462
00463 Py::Object StdMeshers_MaxElementAreaPy::getMaxArea(const Py::Tuple& args)
00464 {
00465 return Py::Float(hypothesis<StdMeshers_MaxElementArea>()->GetMaxArea());
00466 }
00467
00468
00469
00470 void StdMeshers_QuadranglePreferencePy::init_type(PyObject* module)
00471 {
00472 behaviors().name("StdMeshers_QuadranglePreference");
00473 behaviors().doc("StdMeshers_QuadranglePreference");
00474 SMESH_HypothesisPyBase::init_type(module);
00475 }
00476
00477 StdMeshers_QuadranglePreferencePy::StdMeshers_QuadranglePreferencePy(int hypId, int studyId, SMESH_Gen* gen)
00478 : SMESH_HypothesisPyBase(new StdMeshers_QuadranglePreference(hypId, studyId, gen))
00479 {
00480 }
00481
00482 StdMeshers_QuadranglePreferencePy::~StdMeshers_QuadranglePreferencePy()
00483 {
00484 }
00485
00486
00487
00488 void StdMeshers_Quadrangle_2DPy::init_type(PyObject* module)
00489 {
00490 behaviors().name("StdMeshers_Quadrangle_2D");
00491 behaviors().doc("StdMeshers_Quadrangle_2D");
00492 SMESH_HypothesisPyBase::init_type(module);
00493 }
00494
00495 StdMeshers_Quadrangle_2DPy::StdMeshers_Quadrangle_2DPy(int hypId, int studyId, SMESH_Gen* gen)
00496 : SMESH_HypothesisPyBase(new StdMeshers_Quadrangle_2D(hypId, studyId, gen))
00497 {
00498 }
00499
00500 StdMeshers_Quadrangle_2DPy::~StdMeshers_Quadrangle_2DPy()
00501 {
00502 }
00503
00504
00505
00506 void StdMeshers_Regular_1DPy::init_type(PyObject* module)
00507 {
00508 behaviors().name("StdMeshers_Regular_1D");
00509 behaviors().doc("StdMeshers_Regular_1D");
00510 SMESH_HypothesisPyBase::init_type(module);
00511 }
00512
00513 StdMeshers_Regular_1DPy::StdMeshers_Regular_1DPy(int hypId, int studyId, SMESH_Gen* gen)
00514 : SMESH_HypothesisPyBase(new StdMeshers_Regular_1D(hypId, studyId, gen))
00515 {
00516 }
00517
00518 StdMeshers_Regular_1DPy::~StdMeshers_Regular_1DPy()
00519 {
00520 }
00521
00522
00523
00524 void StdMeshers_UseExisting_1DPy::init_type(PyObject* module)
00525 {
00526 behaviors().name("StdMeshers_UseExisting_1D");
00527 behaviors().doc("StdMeshers_UseExisting_1D");
00528 SMESH_HypothesisPyBase::init_type(module);
00529 }
00530
00531 StdMeshers_UseExisting_1DPy::StdMeshers_UseExisting_1DPy(int hypId, int studyId, SMESH_Gen* gen)
00532 : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_1D(hypId, studyId, gen))
00533 {
00534 }
00535
00536 StdMeshers_UseExisting_1DPy::~StdMeshers_UseExisting_1DPy()
00537 {
00538 }
00539
00540
00541
00542 void StdMeshers_UseExisting_2DPy::init_type(PyObject* module)
00543 {
00544 behaviors().name("StdMeshers_UseExisting_2D");
00545 behaviors().doc("StdMeshers_UseExisting_2D");
00546 SMESH_HypothesisPyBase::init_type(module);
00547 }
00548
00549 StdMeshers_UseExisting_2DPy::StdMeshers_UseExisting_2DPy(int hypId, int studyId, SMESH_Gen* gen)
00550 : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_2D(hypId, studyId, gen))
00551 {
00552 }
00553
00554 StdMeshers_UseExisting_2DPy::~StdMeshers_UseExisting_2DPy()
00555 {
00556 }
00557
00558
00559
00560 void StdMeshers_CompositeSegment_1DPy::init_type(PyObject* module)
00561 {
00562 behaviors().name("StdMeshers_CompositeSegment_1D");
00563 behaviors().doc("StdMeshers_CompositeSegment_1D");
00564 SMESH_HypothesisPyBase::init_type(module);
00565 }
00566
00567 StdMeshers_CompositeSegment_1DPy::StdMeshers_CompositeSegment_1DPy(int hypId, int studyId, SMESH_Gen* gen)
00568 : SMESH_HypothesisPyBase(new StdMeshers_CompositeSegment_1D(hypId, studyId, gen))
00569 {
00570 }
00571
00572 StdMeshers_CompositeSegment_1DPy::~StdMeshers_CompositeSegment_1DPy()
00573 {
00574 }
00575
00576
00577
00578 void StdMeshers_Deflection1DPy::init_type(PyObject* module)
00579 {
00580 behaviors().name("StdMeshers_Deflection1D");
00581 behaviors().doc("StdMeshers_Deflection1D");
00582 SMESH_HypothesisPyBase::init_type(module);
00583 }
00584
00585 StdMeshers_Deflection1DPy::StdMeshers_Deflection1DPy(int hypId, int studyId, SMESH_Gen* gen)
00586 : SMESH_HypothesisPyBase(new StdMeshers_Deflection1D(hypId, studyId, gen))
00587 {
00588 }
00589
00590 StdMeshers_Deflection1DPy::~StdMeshers_Deflection1DPy()
00591 {
00592 }
00593
00594
00595
00596 void StdMeshers_Hexa_3DPy::init_type(PyObject* module)
00597 {
00598 behaviors().name("StdMeshers_Hexa_3D");
00599 behaviors().doc("StdMeshers_Hexa_3D");
00600 SMESH_HypothesisPyBase::init_type(module);
00601 }
00602
00603 StdMeshers_Hexa_3DPy::StdMeshers_Hexa_3DPy(int hypId, int studyId, SMESH_Gen* gen)
00604 : SMESH_HypothesisPyBase(new StdMeshers_Hexa_3D(hypId, studyId, gen))
00605 {
00606 }
00607
00608 StdMeshers_Hexa_3DPy::~StdMeshers_Hexa_3DPy()
00609 {
00610 }
00611
00612
00613
00614 void StdMeshers_TrianglePreferencePy::init_type(PyObject* module)
00615 {
00616 behaviors().name("StdMeshers_TrianglePreference");
00617 behaviors().doc("StdMeshers_TrianglePreference");
00618 SMESH_HypothesisPyBase::init_type(module);
00619 }
00620
00621 StdMeshers_TrianglePreferencePy::StdMeshers_TrianglePreferencePy(int hypId, int studyId, SMESH_Gen* gen)
00622 : SMESH_HypothesisPyBase(new StdMeshers_TrianglePreference(hypId, studyId, gen))
00623 {
00624 }
00625
00626 StdMeshers_TrianglePreferencePy::~StdMeshers_TrianglePreferencePy()
00627 {
00628 }
00629
00630
00631
00632 void StdMeshers_StartEndLengthPy::init_type(PyObject* module)
00633 {
00634 behaviors().name("StdMeshers_StartEndLength");
00635 behaviors().doc("StdMeshers_StartEndLength");
00636 add_varargs_method("setLength", &StdMeshers_StartEndLengthPy::setLength, "setLength()");
00637 add_varargs_method("getLength", &StdMeshers_StartEndLengthPy::getLength, "getLength()");
00638 SMESH_HypothesisPyBase::init_type(module);
00639 }
00640
00641 StdMeshers_StartEndLengthPy::StdMeshers_StartEndLengthPy(int hypId, int studyId, SMESH_Gen* gen)
00642 : SMESH_HypothesisPyBase(new StdMeshers_StartEndLength(hypId, studyId, gen))
00643 {
00644 }
00645
00646 StdMeshers_StartEndLengthPy::~StdMeshers_StartEndLengthPy()
00647 {
00648 }
00649
00650 Py::Object StdMeshers_StartEndLengthPy::setLength(const Py::Tuple& args)
00651 {
00652 hypothesis<StdMeshers_StartEndLength>()->SetLength((double)Py::Float(args[0]),(bool)Py::Boolean(args[1]));
00653 return Py::None();
00654 }
00655
00656 Py::Object StdMeshers_StartEndLengthPy::getLength(const Py::Tuple& args)
00657 {
00658 return Py::Float(hypothesis<StdMeshers_StartEndLength>()->GetLength((bool)Py::Boolean(args[0])));
00659 }
00660
00661
00662
00663 void StdMeshers_SegmentLengthAroundVertexPy::init_type(PyObject* module)
00664 {
00665 behaviors().name("StdMeshers_SegmentLengthAroundVertex");
00666 behaviors().doc("StdMeshers_SegmentLengthAroundVertex");
00667 add_varargs_method("setLength", &StdMeshers_SegmentLengthAroundVertexPy::setLength, "setLength()");
00668 add_varargs_method("getLength", &StdMeshers_SegmentLengthAroundVertexPy::getLength, "getLength()");
00669 SMESH_HypothesisPyBase::init_type(module);
00670 }
00671
00672 StdMeshers_SegmentLengthAroundVertexPy::StdMeshers_SegmentLengthAroundVertexPy(int hypId, int studyId, SMESH_Gen* gen)
00673 : SMESH_HypothesisPyBase(new StdMeshers_SegmentLengthAroundVertex(hypId, studyId, gen))
00674 {
00675 }
00676
00677 StdMeshers_SegmentLengthAroundVertexPy::~StdMeshers_SegmentLengthAroundVertexPy()
00678 {
00679 }
00680
00681 Py::Object StdMeshers_SegmentLengthAroundVertexPy::setLength(const Py::Tuple& args)
00682 {
00683 hypothesis<StdMeshers_SegmentLengthAroundVertex>()->SetLength((double)Py::Float(args[0]));
00684 return Py::None();
00685 }
00686
00687 Py::Object StdMeshers_SegmentLengthAroundVertexPy::getLength(const Py::Tuple& args)
00688 {
00689 return Py::Float(hypothesis<StdMeshers_SegmentLengthAroundVertex>()->GetLength());
00690 }
00691
00692
00693
00694 void StdMeshers_SegmentAroundVertex_0DPy::init_type(PyObject* module)
00695 {
00696 behaviors().name("StdMeshers_SegmentAroundVertex_0D");
00697 behaviors().doc("StdMeshers_SegmentAroundVertex_0D");
00698 SMESH_HypothesisPyBase::init_type(module);
00699 }
00700
00701 StdMeshers_SegmentAroundVertex_0DPy::StdMeshers_SegmentAroundVertex_0DPy(int hypId, int studyId, SMESH_Gen* gen)
00702 : SMESH_HypothesisPyBase(new StdMeshers_SegmentAroundVertex_0D(hypId, studyId, gen))
00703 {
00704 }
00705
00706 StdMeshers_SegmentAroundVertex_0DPy::~StdMeshers_SegmentAroundVertex_0DPy()
00707 {
00708 }
00709
00710
00711
00712 void StdMeshers_RadialPrism_3DPy::init_type(PyObject* module)
00713 {
00714 behaviors().name("StdMeshers_RadialPrism_3D");
00715 behaviors().doc("StdMeshers_RadialPrism_3D");
00716 SMESH_HypothesisPyBase::init_type(module);
00717 }
00718
00719 StdMeshers_RadialPrism_3DPy::StdMeshers_RadialPrism_3DPy(int hypId, int studyId, SMESH_Gen* gen)
00720 : SMESH_HypothesisPyBase(new StdMeshers_RadialPrism_3D(hypId, studyId, gen))
00721 {
00722 }
00723
00724 StdMeshers_RadialPrism_3DPy::~StdMeshers_RadialPrism_3DPy()
00725 {
00726 }
00727
00728
00729
00730 void StdMeshers_QuadraticMeshPy::init_type(PyObject* module)
00731 {
00732 behaviors().name("StdMeshers_QuadraticMesh");
00733 behaviors().doc("StdMeshers_QuadraticMesh");
00734 SMESH_HypothesisPyBase::init_type(module);
00735 }
00736
00737 StdMeshers_QuadraticMeshPy::StdMeshers_QuadraticMeshPy(int hypId, int studyId, SMESH_Gen* gen)
00738 : SMESH_HypothesisPyBase(new StdMeshers_QuadraticMesh(hypId, studyId, gen))
00739 {
00740 }
00741
00742 StdMeshers_QuadraticMeshPy::~StdMeshers_QuadraticMeshPy()
00743 {
00744 }
00745
00746
00747
00748 void StdMeshers_ProjectionSource3DPy::init_type(PyObject* module)
00749 {
00750 behaviors().name("StdMeshers_ProjectionSource3D");
00751 behaviors().doc("StdMeshers_ProjectionSource3D");
00752 SMESH_HypothesisPyBase::init_type(module);
00753 }
00754
00755 StdMeshers_ProjectionSource3DPy::StdMeshers_ProjectionSource3DPy(int hypId, int studyId, SMESH_Gen* gen)
00756 : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource3D(hypId, studyId, gen))
00757 {
00758 }
00759
00760 StdMeshers_ProjectionSource3DPy::~StdMeshers_ProjectionSource3DPy()
00761 {
00762 }
00763
00764
00765
00766 void StdMeshers_ProjectionSource2DPy::init_type(PyObject* module)
00767 {
00768 behaviors().name("StdMeshers_ProjectionSource2D");
00769 behaviors().doc("StdMeshers_ProjectionSource2D");
00770 SMESH_HypothesisPyBase::init_type(module);
00771 }
00772
00773 StdMeshers_ProjectionSource2DPy::StdMeshers_ProjectionSource2DPy(int hypId, int studyId, SMESH_Gen* gen)
00774 : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource2D(hypId, studyId, gen))
00775 {
00776 }
00777
00778 StdMeshers_ProjectionSource2DPy::~StdMeshers_ProjectionSource2DPy()
00779 {
00780 }
00781
00782
00783
00784 void StdMeshers_ProjectionSource1DPy::init_type(PyObject* module)
00785 {
00786 behaviors().name("StdMeshers_ProjectionSource1D");
00787 behaviors().doc("StdMeshers_ProjectionSource1D");
00788 SMESH_HypothesisPyBase::init_type(module);
00789 }
00790
00791 StdMeshers_ProjectionSource1DPy::StdMeshers_ProjectionSource1DPy(int hypId, int studyId, SMESH_Gen* gen)
00792 : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource1D(hypId, studyId, gen))
00793 {
00794 }
00795
00796 StdMeshers_ProjectionSource1DPy::~StdMeshers_ProjectionSource1DPy()
00797 {
00798 }
00799
00800
00801
00802 void StdMeshers_Projection_3DPy::init_type(PyObject* module)
00803 {
00804 behaviors().name("StdMeshers_Projection_3D");
00805 behaviors().doc("StdMeshers_Projection_3D");
00806 SMESH_HypothesisPyBase::init_type(module);
00807 }
00808
00809 StdMeshers_Projection_3DPy::StdMeshers_Projection_3DPy(int hypId, int studyId, SMESH_Gen* gen)
00810 : SMESH_HypothesisPyBase(new StdMeshers_Projection_3D(hypId, studyId, gen))
00811 {
00812 }
00813
00814 StdMeshers_Projection_3DPy::~StdMeshers_Projection_3DPy()
00815 {
00816 }
00817
00818
00819
00820 void StdMeshers_Projection_2DPy::init_type(PyObject* module)
00821 {
00822 behaviors().name("StdMeshers_Projection_2D");
00823 behaviors().doc("StdMeshers_Projection_2D");
00824 SMESH_HypothesisPyBase::init_type(module);
00825 }
00826
00827 StdMeshers_Projection_2DPy::StdMeshers_Projection_2DPy(int hypId, int studyId, SMESH_Gen* gen)
00828 : SMESH_HypothesisPyBase(new StdMeshers_Projection_2D(hypId, studyId, gen))
00829 {
00830 }
00831
00832 StdMeshers_Projection_2DPy::~StdMeshers_Projection_2DPy()
00833 {
00834 }
00835
00836
00837
00838 void StdMeshers_Projection_1DPy::init_type(PyObject* module)
00839 {
00840 behaviors().name("StdMeshers_Projection_1D");
00841 behaviors().doc("StdMeshers_Projection_1D");
00842 SMESH_HypothesisPyBase::init_type(module);
00843 }
00844
00845 StdMeshers_Projection_1DPy::StdMeshers_Projection_1DPy(int hypId, int studyId, SMESH_Gen* gen)
00846 : SMESH_HypothesisPyBase(new StdMeshers_Projection_1D(hypId, studyId, gen))
00847 {
00848 }
00849
00850 StdMeshers_Projection_1DPy::~StdMeshers_Projection_1DPy()
00851 {
00852 }
00853
00854
00855
00856 void StdMeshers_Prism_3DPy::init_type(PyObject* module)
00857 {
00858 behaviors().name("StdMeshers_Prism_3D");
00859 behaviors().doc("StdMeshers_Prism_3D");
00860 SMESH_HypothesisPyBase::init_type(module);
00861 }
00862
00863 StdMeshers_Prism_3DPy::StdMeshers_Prism_3DPy(int hypId, int studyId, SMESH_Gen* gen)
00864 : SMESH_HypothesisPyBase(new StdMeshers_Prism_3D(hypId, studyId, gen))
00865 {
00866 }
00867
00868 StdMeshers_Prism_3DPy::~StdMeshers_Prism_3DPy()
00869 {
00870 }
00871
00872
00873
00874 void StdMeshers_NumberOfSegmentsPy::init_type(PyObject* module)
00875 {
00876 behaviors().name("StdMeshers_NumberOfSegments");
00877 behaviors().doc("StdMeshers_NumberOfSegments");
00878 add_varargs_method("setNumberOfSegments",&StdMeshers_NumberOfSegmentsPy::setNumSegm,"setNumberOfSegments()");
00879 add_varargs_method("getNumberOfSegments",&StdMeshers_NumberOfSegmentsPy::getNumSegm,"getNumberOfSegments()");
00880 SMESH_HypothesisPyBase::init_type(module);
00881 }
00882
00883 StdMeshers_NumberOfSegmentsPy::StdMeshers_NumberOfSegmentsPy(int hypId, int studyId, SMESH_Gen* gen)
00884 : SMESH_HypothesisPyBase(new StdMeshers_NumberOfSegments(hypId, studyId, gen))
00885 {
00886 }
00887
00888 StdMeshers_NumberOfSegmentsPy::~StdMeshers_NumberOfSegmentsPy()
00889 {
00890 }
00891
00892 Py::Object StdMeshers_NumberOfSegmentsPy::setNumSegm(const Py::Tuple& args)
00893 {
00894 hypothesis<StdMeshers_NumberOfSegments>()->SetNumberOfSegments((int)Py::Int(args[0]));
00895 return Py::None();
00896 }
00897
00898 Py::Object StdMeshers_NumberOfSegmentsPy::getNumSegm(const Py::Tuple& args)
00899 {
00900 return Py::Int(hypothesis<StdMeshers_NumberOfSegments>()->GetNumberOfSegments());
00901 }
00902
00903
00904
00905 void StdMeshers_NumberOfLayersPy::init_type(PyObject* module)
00906 {
00907 behaviors().name("StdMeshers_NumberOfLayers");
00908 behaviors().doc("StdMeshers_NumberOfLayers");
00909 add_varargs_method("setNumberOfLayers",&StdMeshers_NumberOfLayersPy::setNumLayers,"setNumberOfLayers()");
00910 add_varargs_method("getNumberOfLayers",&StdMeshers_NumberOfLayersPy::getNumLayers,"getNumberOfLayers()");
00911 SMESH_HypothesisPyBase::init_type(module);
00912 }
00913
00914 StdMeshers_NumberOfLayersPy::StdMeshers_NumberOfLayersPy(int hypId, int studyId, SMESH_Gen* gen)
00915 : SMESH_HypothesisPyBase(new StdMeshers_NumberOfLayers(hypId, studyId, gen))
00916 {
00917 }
00918
00919 StdMeshers_NumberOfLayersPy::~StdMeshers_NumberOfLayersPy()
00920 {
00921 }
00922
00923 Py::Object StdMeshers_NumberOfLayersPy::setNumLayers(const Py::Tuple& args)
00924 {
00925 hypothesis<StdMeshers_NumberOfLayers>()->SetNumberOfLayers((int)Py::Int(args[0]));
00926 return Py::None();
00927 }
00928
00929 Py::Object StdMeshers_NumberOfLayersPy::getNumLayers(const Py::Tuple& args)
00930 {
00931 return Py::Int(hypothesis<StdMeshers_NumberOfLayers>()->GetNumberOfLayers());
00932 }
00933
00934
00935
00936 void StdMeshers_MEFISTO_2DPy::init_type(PyObject* module)
00937 {
00938 behaviors().name("StdMeshers_MEFISTO_2D");
00939 behaviors().doc("StdMeshers_MEFISTO_2D");
00940 SMESH_HypothesisPyBase::init_type(module);
00941 }
00942
00943 StdMeshers_MEFISTO_2DPy::StdMeshers_MEFISTO_2DPy(int hypId, int studyId, SMESH_Gen* gen)
00944 : SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, studyId, gen))
00945 {
00946 }
00947
00948 StdMeshers_MEFISTO_2DPy::~StdMeshers_MEFISTO_2DPy()
00949 {
00950 }
00951
00952
00953
00954 void StdMeshers_MaxElementVolumePy::init_type(PyObject* module)
00955 {
00956 behaviors().name("StdMeshers_MaxElementVolume");
00957 behaviors().doc("StdMeshers_MaxElementVolume");
00958 add_varargs_method("setMaxVolume",&StdMeshers_MaxElementVolumePy::setMaxVolume,"setMaxVolume()");
00959 add_varargs_method("getMaxVolume",&StdMeshers_MaxElementVolumePy::getMaxVolume,"getMaxVolume()");
00960 SMESH_HypothesisPyBase::init_type(module);
00961 }
00962
00963 StdMeshers_MaxElementVolumePy::StdMeshers_MaxElementVolumePy(int hypId, int studyId, SMESH_Gen* gen)
00964 : SMESH_HypothesisPyBase(new StdMeshers_MaxElementVolume(hypId, studyId, gen))
00965 {
00966 }
00967
00968 StdMeshers_MaxElementVolumePy::~StdMeshers_MaxElementVolumePy()
00969 {
00970 }
00971
00972 Py::Object StdMeshers_MaxElementVolumePy::setMaxVolume(const Py::Tuple& args)
00973 {
00974 hypothesis<StdMeshers_MaxElementVolume>()->SetMaxVolume((double)Py::Float(args[0]));
00975 return Py::None();
00976 }
00977
00978 Py::Object StdMeshers_MaxElementVolumePy::getMaxVolume(const Py::Tuple& args)
00979 {
00980 return Py::Float(hypothesis<StdMeshers_MaxElementVolume>()->GetMaxVolume());
00981 }
00982
00983
00984
00985 void StdMeshers_LengthFromEdgesPy::init_type(PyObject* module)
00986 {
00987 behaviors().name("StdMeshers_LengthFromEdges");
00988 behaviors().doc("StdMeshers_LengthFromEdges");
00989 add_varargs_method("setMode",&StdMeshers_LengthFromEdgesPy::setMode,"setMode()");
00990 add_varargs_method("getMode",&StdMeshers_LengthFromEdgesPy::getMode,"getMode()");
00991 SMESH_HypothesisPyBase::init_type(module);
00992 }
00993
00994 StdMeshers_LengthFromEdgesPy::StdMeshers_LengthFromEdgesPy(int hypId, int studyId, SMESH_Gen* gen)
00995 : SMESH_HypothesisPyBase(new StdMeshers_LengthFromEdges(hypId, studyId, gen))
00996 {
00997 }
00998
00999 StdMeshers_LengthFromEdgesPy::~StdMeshers_LengthFromEdgesPy()
01000 {
01001 }
01002
01003 Py::Object StdMeshers_LengthFromEdgesPy::setMode(const Py::Tuple& args)
01004 {
01005 hypothesis<StdMeshers_LengthFromEdges>()->SetMode((int)Py::Int(args[0]));
01006 return Py::None();
01007 }
01008
01009 Py::Object StdMeshers_LengthFromEdgesPy::getMode(const Py::Tuple& args)
01010 {
01011 return Py::Int(hypothesis<StdMeshers_LengthFromEdges>()->GetMode());
01012 }
01013
01014
01015
01016 void StdMeshers_LayerDistributionPy::init_type(PyObject* module)
01017 {
01018 behaviors().name("StdMeshers_LayerDistribution");
01019 behaviors().doc("StdMeshers_LayerDistribution");
01020 add_varargs_method("setLayerDistribution",
01021 &StdMeshers_LayerDistributionPy::setLayerDistribution,
01022 "setLayerDistribution()");
01023 add_varargs_method("getLayerDistribution",
01024 &StdMeshers_LayerDistributionPy::getLayerDistribution,
01025 "getLayerDistribution()");
01026 SMESH_HypothesisPyBase::init_type(module);
01027 }
01028
01029 StdMeshers_LayerDistributionPy::StdMeshers_LayerDistributionPy(int hypId, int studyId, SMESH_Gen* gen)
01030 : SMESH_HypothesisPyBase(new StdMeshers_LayerDistribution(hypId, studyId, gen))
01031 {
01032 }
01033
01034 StdMeshers_LayerDistributionPy::~StdMeshers_LayerDistributionPy()
01035 {
01036 }
01037
01038 Py::Object StdMeshers_LayerDistributionPy::setLayerDistribution(const Py::Tuple& args)
01039 {
01040 return Py::None();
01041 }
01042
01043 Py::Object StdMeshers_LayerDistributionPy::getLayerDistribution(const Py::Tuple& args)
01044 {
01045
01046 return Py::None();
01047 }