smesh: port to version 9.6

This commit is contained in:
wmayer
2021-01-20 19:49:56 +01:00
parent 67f6353046
commit b431987ea3
8 changed files with 680 additions and 6 deletions

View File

@@ -50,7 +50,7 @@
# include <SMESHDS_GroupBase.hxx>
# include <SMESHDS_Group.hxx>
# include <SMESHDS_Mesh.hxx>
# include <SMDS_PolyhedralVolumeOfNodes.hxx>
//# include <SMDS_PolyhedralVolumeOfNodes.hxx>
# include <SMDS_VolumeTool.hxx>
# include <StdMeshers_MaxLength.hxx>
# include <StdMeshers_LocalLength.hxx>
@@ -93,7 +93,9 @@ using namespace Fem;
using namespace Base;
using namespace boost;
#if SMESH_VERSION_MAJOR < 9
static int StatCount = 0;
#endif
SMESH_Gen* FemMesh::_mesh_gen = 0;
@@ -103,12 +105,20 @@ FemMesh::FemMesh()
{
//Base::Console().Log("FemMesh::FemMesh():%p (id=%i)\n",this,StatCount);
// create a mesh always with new StudyId to avoid overlapping destruction
#if SMESH_VERSION_MAJOR >= 9
myMesh = getGenerator()->CreateMesh(false);
#else
myMesh = getGenerator()->CreateMesh(StatCount++,false);
#endif
}
FemMesh::FemMesh(const FemMesh& mesh)
{
#if SMESH_VERSION_MAJOR >= 9
myMesh = getGenerator()->CreateMesh(false);
#else
myMesh = getGenerator()->CreateMesh(StatCount++,false);
#endif
copyMeshData(mesh);
}
@@ -130,7 +140,11 @@ FemMesh::~FemMesh()
FemMesh &FemMesh::operator=(const FemMesh& mesh)
{
if (this != &mesh) {
#if SMESH_VERSION_MAJOR >= 9
myMesh = getGenerator()->CreateMesh(true);
#else
myMesh = getGenerator()->CreateMesh(0,true);
#endif
copyMeshData(mesh);
}
return *this;
@@ -176,10 +190,17 @@ void FemMesh::copyMeshData(const FemMesh& mesh)
int ID = elem->GetID();
switch (elem->GetEntityType()) {
case SMDSEntity_Polyhedra:
#if SMESH_VERSION_MAJOR >= 9
editor.GetMeshDS()->
AddPolyhedralVolumeWithID(nodes,
static_cast<const SMDS_MeshVolume*>(elem)->GetQuantities(),
ID);
#else
editor.GetMeshDS()->
AddPolyhedralVolumeWithID(nodes,
static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
ID);
#endif
break;
case SMDSEntity_Ball:
{
@@ -239,7 +260,7 @@ void FemMesh::copyMeshData(const FemMesh& mesh)
// Make a new group
if (!groupElems.empty()) {
int aId;
int aId = -1;
SMESH_Group* newGroupObj = this->myMesh->AddGroup(groupType, group->GetName(), aId);
SMESHDS_Group* newGroupDS = dynamic_cast<SMESHDS_Group*>(newGroupObj->GetGroupDS());
if (newGroupDS) {
@@ -512,6 +533,41 @@ void FemMesh::setStandardHypotheses()
{
if (!hypoth.empty())
return;
#if SMESH_VERSION_MAJOR >= 9
int hyp=0;
SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, getGenerator()));
static_cast<StdMeshers_MaxLength*>(len.get())->SetLength(1.0);
hypoth.push_back(len);
SMESH_HypothesisPtr loc(new StdMeshers_LocalLength(hyp++, getGenerator()));
static_cast<StdMeshers_LocalLength*>(loc.get())->SetLength(1.0);
hypoth.push_back(loc);
SMESH_HypothesisPtr area(new StdMeshers_MaxElementArea(hyp++, getGenerator()));
static_cast<StdMeshers_MaxElementArea*>(area.get())->SetMaxArea(1.0);
hypoth.push_back(area);
SMESH_HypothesisPtr segm(new StdMeshers_NumberOfSegments(hyp++, getGenerator()));
static_cast<StdMeshers_NumberOfSegments*>(segm.get())->SetNumberOfSegments(1);
hypoth.push_back(segm);
SMESH_HypothesisPtr defl(new StdMeshers_Deflection1D(hyp++, getGenerator()));
static_cast<StdMeshers_Deflection1D*>(defl.get())->SetDeflection(0.01);
hypoth.push_back(defl);
SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, getGenerator()));
hypoth.push_back(reg);
//SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, getGenerator()));
//static_cast<StdMeshers_StartEndLength*>(sel.get())->SetLength(1.0, true);
//hypoth.push_back(sel);
SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,getGenerator()));
hypoth.push_back(qdp);
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,getGenerator()));
hypoth.push_back(q2d);
#else
int hyp=0;
SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, 1, getGenerator()));
static_cast<StdMeshers_MaxLength*>(len.get())->SetLength(1.0);
@@ -545,6 +601,7 @@ void FemMesh::setStandardHypotheses()
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,1,getGenerator()));
hypoth.push_back(q2d);
#endif
// Apply hypothesis
for (int i=0; i<hyp;i++)
@@ -579,7 +636,12 @@ std::list<std::pair<int, int> > FemMesh::getVolumesByFace(const TopoDS_Face &fac
SMDS_VolumeIteratorPtr vol_iter = myMesh->GetMeshDS()->volumesIterator();
while (vol_iter->more()) {
const SMDS_MeshVolume* vol = vol_iter->next();
#if SMESH_VERSION_MAJOR >= 9
throw Base::NotImplementedError("Port FemMesh::getVolumesByFace to smesh >= 9.x");
SMDS_ElemIteratorPtr face_iter = nullptr; //TODO:
#else
SMDS_ElemIteratorPtr face_iter = vol->facesIterator();
#endif
while (face_iter && face_iter->more()) {
const SMDS_MeshFace* face = static_cast<const SMDS_MeshFace*>(face_iter->next());

View File

@@ -22,13 +22,13 @@
#include "PreCompiled.h"
#include <SMESH_Version.h>
#ifndef _PreComp_
# include <Python.h>
# include <SMESH_Gen.hxx>
# include <SMESHDS_Mesh.hxx>
# include <SMESH_Mesh.hxx>
# include <SMDS_PolyhedralVolumeOfNodes.hxx>
# include <SMDS_VolumeTool.hxx>
# include <BRepBuilderAPI_Copy.hxx>
@@ -83,7 +83,11 @@ App::DocumentObjectExecReturn *FemMeshShapeNetgenObject::execute(void)
TopoDS_Shape shape = feat->Shape.getValue();
NETGENPlugin_Mesher myNetGenMesher(newMesh.getSMesh(),shape,true);
#if SMESH_VERSION_MAJOR >= 9
NETGENPlugin_Hypothesis* tet= new NETGENPlugin_Hypothesis(0,newMesh.getGenerator());
#else
NETGENPlugin_Hypothesis* tet= new NETGENPlugin_Hypothesis(0,1,newMesh.getGenerator());
#endif
tet->SetMaxSize(MaxSize.getValue());
tet->SetSecondOrder(SecondOrder.getValue());
tet->SetOptimize(Optimize.getValue());

View File

@@ -22,12 +22,12 @@
#include "PreCompiled.h"
#include <SMESH_Version.h>
#ifndef _PreComp_
# include <Python.h>
# include <SMESH_Gen.hxx>
# include <SMESH_Mesh.hxx>
# include <SMDS_PolyhedralVolumeOfNodes.hxx>
# include <SMDS_VolumeTool.hxx>
# include <StdMeshers_Arithmetic1D.hxx>
# include <StdMeshers_AutomaticLength.hxx>
@@ -147,6 +147,36 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
newMesh.compute();
#endif
#if 1 // Surface quad mesh
#if SMESH_VERSION_MAJOR >= 9
SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, myGen));
static_cast<StdMeshers_MaxLength*>(len.get())->SetLength(1.0);
newMesh.addHypothesis(shape, len);
SMESH_HypothesisPtr loc(new StdMeshers_LocalLength(hyp++, myGen));
static_cast<StdMeshers_LocalLength*>(loc.get())->SetLength(1.0);
newMesh.addHypothesis(shape, loc);
SMESH_HypothesisPtr area(new StdMeshers_MaxElementArea(hyp++, myGen));
static_cast<StdMeshers_MaxElementArea*>(area.get())->SetMaxArea(1.0);
newMesh.addHypothesis(shape, area);
SMESH_HypothesisPtr segm(new StdMeshers_NumberOfSegments(hyp++, myGen));
static_cast<StdMeshers_NumberOfSegments*>(segm.get())->SetNumberOfSegments(1);
newMesh.addHypothesis(shape, segm);
SMESH_HypothesisPtr defl(new StdMeshers_Deflection1D(hyp++, myGen));
static_cast<StdMeshers_Deflection1D*>(defl.get())->SetDeflection(0.01);
newMesh.addHypothesis(shape, defl);
SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, myGen));
newMesh.addHypothesis(shape, reg);
SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,myGen));
newMesh.addHypothesis(shape, qdp);
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,myGen));
newMesh.addHypothesis(shape, q2d);
#else
SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, 1, myGen));
static_cast<StdMeshers_MaxLength*>(len.get())->SetLength(1.0);
newMesh.addHypothesis(shape, len);
@@ -179,6 +209,7 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,1,myGen));
newMesh.addHypothesis(shape, q2d);
#endif
// create mesh
newMesh.compute();

View File

@@ -44,7 +44,6 @@
# include <SMESH_Gen.hxx>
# include <SMESH_Mesh.hxx>
# include <SMDS_PolyhedralVolumeOfNodes.hxx>
# include <SMDS_VolumeTool.hxx>
# include <SMESHDS_Mesh.hxx>

View File

@@ -223,7 +223,11 @@ PyObject *SMESH_HypothesisPy<T>::PyMake(struct _typeobject * /*type*/, PyObject
if (!PyArg_ParseTuple(args, "iO!",&hypId,&(FemMeshPy::Type),&obj))
return 0;
FemMesh* mesh = static_cast<FemMeshPy*>(obj)->getFemMeshPtr();
#if SMESH_VERSION_MAJOR >= 9
return new T(hypId, mesh->getGenerator());
#else
return new T(hypId, 1, mesh->getGenerator());
#endif
}
// ---------------------------------------------------------------------------
@@ -238,10 +242,17 @@ void StdMeshers_Arithmetic1DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Arithmetic1DPy::StdMeshers_Arithmetic1DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Arithmetic1D(hypId, gen))
{
}
#else
StdMeshers_Arithmetic1DPy::StdMeshers_Arithmetic1DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Arithmetic1D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Arithmetic1DPy::~StdMeshers_Arithmetic1DPy()
{
@@ -276,10 +287,17 @@ void StdMeshers_AutomaticLengthPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_AutomaticLengthPy::StdMeshers_AutomaticLengthPy(int /*hypId*/, SMESH_Gen* /*gen*/)
: SMESH_HypothesisPyBase(0)
{
}
#else
StdMeshers_AutomaticLengthPy::StdMeshers_AutomaticLengthPy(int /*hypId*/, int /*studyId*/, SMESH_Gen* /*gen*/)
: SMESH_HypothesisPyBase(0)
{
}
#endif
StdMeshers_AutomaticLengthPy::~StdMeshers_AutomaticLengthPy()
{
@@ -338,10 +356,17 @@ void StdMeshers_NotConformAllowedPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_NotConformAllowedPy::StdMeshers_NotConformAllowedPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_NotConformAllowed(hypId, gen))
{
}
#else
StdMeshers_NotConformAllowedPy::StdMeshers_NotConformAllowedPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_NotConformAllowed(hypId, studyId, gen))
{
}
#endif
StdMeshers_NotConformAllowedPy::~StdMeshers_NotConformAllowedPy()
{
@@ -364,10 +389,17 @@ void StdMeshers_MaxLengthPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_MaxLengthPy::StdMeshers_MaxLengthPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MaxLength(hypId, gen))
{
}
#else
StdMeshers_MaxLengthPy::StdMeshers_MaxLengthPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MaxLength(hypId, studyId, gen))
{
}
#endif
StdMeshers_MaxLengthPy::~StdMeshers_MaxLengthPy()
{
@@ -433,10 +465,17 @@ void StdMeshers_LocalLengthPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_LocalLengthPy::StdMeshers_LocalLengthPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_LocalLength(hypId, gen))
{
}
#else
StdMeshers_LocalLengthPy::StdMeshers_LocalLengthPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_LocalLength(hypId, studyId, gen))
{
}
#endif
StdMeshers_LocalLengthPy::~StdMeshers_LocalLengthPy()
{
@@ -480,10 +519,17 @@ void StdMeshers_MaxElementAreaPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_MaxElementAreaPy::StdMeshers_MaxElementAreaPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MaxElementArea(hypId, gen))
{
}
#else
StdMeshers_MaxElementAreaPy::StdMeshers_MaxElementAreaPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MaxElementArea(hypId, studyId, gen))
{
}
#endif
StdMeshers_MaxElementAreaPy::~StdMeshers_MaxElementAreaPy()
{
@@ -511,10 +557,17 @@ void StdMeshers_QuadranglePreferencePy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_QuadranglePreferencePy::StdMeshers_QuadranglePreferencePy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_QuadranglePreference(hypId, gen))
{
}
#else
StdMeshers_QuadranglePreferencePy::StdMeshers_QuadranglePreferencePy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_QuadranglePreference(hypId, studyId, gen))
{
}
#endif
StdMeshers_QuadranglePreferencePy::~StdMeshers_QuadranglePreferencePy()
{
@@ -529,10 +582,17 @@ void StdMeshers_Quadrangle_2DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Quadrangle_2DPy::StdMeshers_Quadrangle_2DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Quadrangle_2D(hypId, gen))
{
}
#else
StdMeshers_Quadrangle_2DPy::StdMeshers_Quadrangle_2DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Quadrangle_2D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Quadrangle_2DPy::~StdMeshers_Quadrangle_2DPy()
{
@@ -547,10 +607,17 @@ void StdMeshers_Regular_1DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Regular_1DPy::StdMeshers_Regular_1DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Regular_1D(hypId, gen))
{
}
#else
StdMeshers_Regular_1DPy::StdMeshers_Regular_1DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Regular_1D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Regular_1DPy::~StdMeshers_Regular_1DPy()
{
@@ -565,10 +632,17 @@ void StdMeshers_UseExisting_1DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_UseExisting_1DPy::StdMeshers_UseExisting_1DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_UseExisting_1D(hypId, gen))
{
}
#else
StdMeshers_UseExisting_1DPy::StdMeshers_UseExisting_1DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_UseExisting_1D(hypId, studyId, gen))
{
}
#endif
StdMeshers_UseExisting_1DPy::~StdMeshers_UseExisting_1DPy()
{
@@ -583,10 +657,17 @@ void StdMeshers_UseExisting_2DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_UseExisting_2DPy::StdMeshers_UseExisting_2DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_UseExisting_2D(hypId, gen))
{
}
#else
StdMeshers_UseExisting_2DPy::StdMeshers_UseExisting_2DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_UseExisting_2D(hypId, studyId, gen))
{
}
#endif
StdMeshers_UseExisting_2DPy::~StdMeshers_UseExisting_2DPy()
{
@@ -601,10 +682,17 @@ void StdMeshers_CompositeSegment_1DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_CompositeSegment_1DPy::StdMeshers_CompositeSegment_1DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_CompositeSegment_1D(hypId, gen))
{
}
#else
StdMeshers_CompositeSegment_1DPy::StdMeshers_CompositeSegment_1DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_CompositeSegment_1D(hypId, studyId, gen))
{
}
#endif
StdMeshers_CompositeSegment_1DPy::~StdMeshers_CompositeSegment_1DPy()
{
@@ -621,10 +709,17 @@ void StdMeshers_Deflection1DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Deflection1DPy::StdMeshers_Deflection1DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Deflection1D(hypId, gen))
{
}
#else
StdMeshers_Deflection1DPy::StdMeshers_Deflection1DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Deflection1D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Deflection1DPy::~StdMeshers_Deflection1DPy()
{
@@ -646,10 +741,17 @@ void StdMeshers_Hexa_3DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Hexa_3DPy::StdMeshers_Hexa_3DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Hexa_3D(hypId, gen))
{
}
#else
StdMeshers_Hexa_3DPy::StdMeshers_Hexa_3DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Hexa_3D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Hexa_3DPy::~StdMeshers_Hexa_3DPy()
{
@@ -686,10 +788,17 @@ void StdMeshers_StartEndLengthPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_StartEndLengthPy::StdMeshers_StartEndLengthPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_StartEndLength(hypId, gen))
{
}
#else
StdMeshers_StartEndLengthPy::StdMeshers_StartEndLengthPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_StartEndLength(hypId, studyId, gen))
{
}
#endif
StdMeshers_StartEndLengthPy::~StdMeshers_StartEndLengthPy()
{
@@ -717,10 +826,17 @@ void StdMeshers_SegmentLengthAroundVertexPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_SegmentLengthAroundVertexPy::StdMeshers_SegmentLengthAroundVertexPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_SegmentLengthAroundVertex(hypId, gen))
{
}
#else
StdMeshers_SegmentLengthAroundVertexPy::StdMeshers_SegmentLengthAroundVertexPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_SegmentLengthAroundVertex(hypId, studyId, gen))
{
}
#endif
StdMeshers_SegmentLengthAroundVertexPy::~StdMeshers_SegmentLengthAroundVertexPy()
{
@@ -748,10 +864,17 @@ void StdMeshers_SegmentAroundVertex_0DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_SegmentAroundVertex_0DPy::StdMeshers_SegmentAroundVertex_0DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_SegmentAroundVertex_0D(hypId, gen))
{
}
#else
StdMeshers_SegmentAroundVertex_0DPy::StdMeshers_SegmentAroundVertex_0DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_SegmentAroundVertex_0D(hypId, studyId, gen))
{
}
#endif
StdMeshers_SegmentAroundVertex_0DPy::~StdMeshers_SegmentAroundVertex_0DPy()
{
@@ -766,10 +889,17 @@ void StdMeshers_RadialPrism_3DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_RadialPrism_3DPy::StdMeshers_RadialPrism_3DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_RadialPrism_3D(hypId, gen))
{
}
#else
StdMeshers_RadialPrism_3DPy::StdMeshers_RadialPrism_3DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_RadialPrism_3D(hypId, studyId, gen))
{
}
#endif
StdMeshers_RadialPrism_3DPy::~StdMeshers_RadialPrism_3DPy()
{
@@ -784,10 +914,17 @@ void StdMeshers_QuadraticMeshPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_QuadraticMeshPy::StdMeshers_QuadraticMeshPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_QuadraticMesh(hypId, gen))
{
}
#else
StdMeshers_QuadraticMeshPy::StdMeshers_QuadraticMeshPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_QuadraticMesh(hypId, studyId, gen))
{
}
#endif
StdMeshers_QuadraticMeshPy::~StdMeshers_QuadraticMeshPy()
{
@@ -802,10 +939,17 @@ void StdMeshers_ProjectionSource3DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_ProjectionSource3DPy::StdMeshers_ProjectionSource3DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource3D(hypId, gen))
{
}
#else
StdMeshers_ProjectionSource3DPy::StdMeshers_ProjectionSource3DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource3D(hypId, studyId, gen))
{
}
#endif
StdMeshers_ProjectionSource3DPy::~StdMeshers_ProjectionSource3DPy()
{
@@ -820,10 +964,17 @@ void StdMeshers_ProjectionSource2DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_ProjectionSource2DPy::StdMeshers_ProjectionSource2DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource2D(hypId, gen))
{
}
#else
StdMeshers_ProjectionSource2DPy::StdMeshers_ProjectionSource2DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource2D(hypId, studyId, gen))
{
}
#endif
StdMeshers_ProjectionSource2DPy::~StdMeshers_ProjectionSource2DPy()
{
@@ -838,10 +989,17 @@ void StdMeshers_ProjectionSource1DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_ProjectionSource1DPy::StdMeshers_ProjectionSource1DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource1D(hypId, gen))
{
}
#else
StdMeshers_ProjectionSource1DPy::StdMeshers_ProjectionSource1DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource1D(hypId, studyId, gen))
{
}
#endif
StdMeshers_ProjectionSource1DPy::~StdMeshers_ProjectionSource1DPy()
{
@@ -856,10 +1014,17 @@ void StdMeshers_Projection_3DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Projection_3DPy::StdMeshers_Projection_3DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Projection_3D(hypId, gen))
{
}
#else
StdMeshers_Projection_3DPy::StdMeshers_Projection_3DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Projection_3D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Projection_3DPy::~StdMeshers_Projection_3DPy()
{
@@ -874,10 +1039,17 @@ void StdMeshers_Projection_2DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Projection_2DPy::StdMeshers_Projection_2DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Projection_2D(hypId, gen))
{
}
#else
StdMeshers_Projection_2DPy::StdMeshers_Projection_2DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Projection_2D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Projection_2DPy::~StdMeshers_Projection_2DPy()
{
@@ -892,10 +1064,17 @@ void StdMeshers_Projection_1DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Projection_1DPy::StdMeshers_Projection_1DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Projection_1D(hypId, gen))
{
}
#else
StdMeshers_Projection_1DPy::StdMeshers_Projection_1DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Projection_1D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Projection_1DPy::~StdMeshers_Projection_1DPy()
{
@@ -910,10 +1089,17 @@ void StdMeshers_Prism_3DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Prism_3DPy::StdMeshers_Prism_3DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Prism_3D(hypId, gen))
{
}
#else
StdMeshers_Prism_3DPy::StdMeshers_Prism_3DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_Prism_3D(hypId, studyId, gen))
{
}
#endif
StdMeshers_Prism_3DPy::~StdMeshers_Prism_3DPy()
{
@@ -930,10 +1116,17 @@ void StdMeshers_NumberOfSegmentsPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_NumberOfSegmentsPy::StdMeshers_NumberOfSegmentsPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_NumberOfSegments(hypId, gen))
{
}
#else
StdMeshers_NumberOfSegmentsPy::StdMeshers_NumberOfSegmentsPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_NumberOfSegments(hypId, studyId, gen))
{
}
#endif
StdMeshers_NumberOfSegmentsPy::~StdMeshers_NumberOfSegmentsPy()
{
@@ -967,10 +1160,17 @@ void StdMeshers_NumberOfLayersPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_NumberOfLayersPy::StdMeshers_NumberOfLayersPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_NumberOfLayers(hypId, gen))
{
}
#else
StdMeshers_NumberOfLayersPy::StdMeshers_NumberOfLayersPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_NumberOfLayers(hypId, studyId, gen))
{
}
#endif
StdMeshers_NumberOfLayersPy::~StdMeshers_NumberOfLayersPy()
{
@@ -1002,10 +1202,17 @@ void StdMeshers_MEFISTO_2DPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_MEFISTO_2DPy::StdMeshers_MEFISTO_2DPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, gen))
{
}
#else
StdMeshers_MEFISTO_2DPy::StdMeshers_MEFISTO_2DPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, studyId, gen))
{
}
#endif
StdMeshers_MEFISTO_2DPy::~StdMeshers_MEFISTO_2DPy()
{
@@ -1022,10 +1229,17 @@ void StdMeshers_MaxElementVolumePy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_MaxElementVolumePy::StdMeshers_MaxElementVolumePy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MaxElementVolume(hypId, gen))
{
}
#else
StdMeshers_MaxElementVolumePy::StdMeshers_MaxElementVolumePy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_MaxElementVolume(hypId, studyId, gen))
{
}
#endif
StdMeshers_MaxElementVolumePy::~StdMeshers_MaxElementVolumePy()
{
@@ -1055,10 +1269,17 @@ void StdMeshers_LengthFromEdgesPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_LengthFromEdgesPy::StdMeshers_LengthFromEdgesPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_LengthFromEdges(hypId, gen))
{
}
#else
StdMeshers_LengthFromEdgesPy::StdMeshers_LengthFromEdgesPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_LengthFromEdges(hypId, studyId, gen))
{
}
#endif
StdMeshers_LengthFromEdgesPy::~StdMeshers_LengthFromEdgesPy()
{
@@ -1096,10 +1317,17 @@ void StdMeshers_LayerDistributionPy::init_type(PyObject* module)
SMESH_HypothesisPyBase::init_type(module);
}
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_LayerDistributionPy::StdMeshers_LayerDistributionPy(int hypId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_LayerDistribution(hypId, gen))
{
}
#else
StdMeshers_LayerDistributionPy::StdMeshers_LayerDistributionPy(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_HypothesisPyBase(new StdMeshers_LayerDistribution(hypId, studyId, gen))
{
}
#endif
StdMeshers_LayerDistributionPy::~StdMeshers_LayerDistributionPy()
{

View File

@@ -86,6 +86,302 @@ private:
boost::shared_ptr<SMESH_Hypothesis> hyp;
};
#if SMESH_VERSION_MAJOR >= 9
class StdMeshers_Arithmetic1DPy : public SMESH_HypothesisPy<StdMeshers_Arithmetic1DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Arithmetic1DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Arithmetic1DPy();
Py::Object setLength(const Py::Tuple& args);
Py::Object getLength(const Py::Tuple& args);
};
class StdMeshers_AutomaticLengthPy : public SMESH_HypothesisPy<StdMeshers_AutomaticLengthPy>
{
public:
static void init_type(PyObject*);
StdMeshers_AutomaticLengthPy(int hypId, SMESH_Gen* gen);
~StdMeshers_AutomaticLengthPy();
Py::Object setFineness(const Py::Tuple& args);
Py::Object getFineness(const Py::Tuple& args);
Py::Object getLength(const Py::Tuple& args);
};
class StdMeshers_NotConformAllowedPy : public SMESH_HypothesisPy<StdMeshers_NotConformAllowedPy>
{
public:
static void init_type(PyObject*);
StdMeshers_NotConformAllowedPy(int hypId, SMESH_Gen* gen);
~StdMeshers_NotConformAllowedPy();
};
class StdMeshers_MaxLengthPy : public SMESH_HypothesisPy<StdMeshers_MaxLengthPy>
{
public:
static void init_type(PyObject*);
StdMeshers_MaxLengthPy(int hypId, SMESH_Gen* gen);
~StdMeshers_MaxLengthPy();
Py::Object setLength(const Py::Tuple& args);
Py::Object getLength(const Py::Tuple& args);
Py::Object havePreestimatedLength(const Py::Tuple& args);
Py::Object getPreestimatedLength(const Py::Tuple& args);
Py::Object setPreestimatedLength(const Py::Tuple& args);
Py::Object setUsePreestimatedLength(const Py::Tuple& args);
Py::Object getUsePreestimatedLength(const Py::Tuple& args);
};
class StdMeshers_LocalLengthPy : public SMESH_HypothesisPy<StdMeshers_LocalLengthPy>
{
public:
static void init_type(PyObject*);
StdMeshers_LocalLengthPy(int hypId, SMESH_Gen* gen);
~StdMeshers_LocalLengthPy();
Py::Object setLength(const Py::Tuple& args);
Py::Object getLength(const Py::Tuple& args);
Py::Object setPrecision(const Py::Tuple& args);
Py::Object getPrecision(const Py::Tuple& args);
};
class StdMeshers_MaxElementAreaPy : public SMESH_HypothesisPy<StdMeshers_MaxElementAreaPy>
{
public:
static void init_type(PyObject*);
StdMeshers_MaxElementAreaPy(int hypId, SMESH_Gen* gen);
~StdMeshers_MaxElementAreaPy();
Py::Object setMaxArea(const Py::Tuple& args);
Py::Object getMaxArea(const Py::Tuple& args);
};
class StdMeshers_QuadranglePreferencePy : public SMESH_HypothesisPy<StdMeshers_QuadranglePreferencePy>
{
public:
static void init_type(PyObject*);
StdMeshers_QuadranglePreferencePy(int hypId, SMESH_Gen* gen);
~StdMeshers_QuadranglePreferencePy();
};
class StdMeshers_Quadrangle_2DPy : public SMESH_HypothesisPy<StdMeshers_Quadrangle_2DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Quadrangle_2DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Quadrangle_2DPy();
};
class StdMeshers_Regular_1DPy : public SMESH_HypothesisPy<StdMeshers_Regular_1DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Regular_1DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Regular_1DPy();
};
class StdMeshers_UseExisting_1DPy : public SMESH_HypothesisPy<StdMeshers_UseExisting_1DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_UseExisting_1DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_UseExisting_1DPy();
};
class StdMeshers_UseExisting_2DPy : public SMESH_HypothesisPy<StdMeshers_UseExisting_2DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_UseExisting_2DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_UseExisting_2DPy();
};
class StdMeshers_CompositeSegment_1DPy : public SMESH_HypothesisPy<StdMeshers_CompositeSegment_1DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_CompositeSegment_1DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_CompositeSegment_1DPy();
};
class StdMeshers_Deflection1DPy : public SMESH_HypothesisPy<StdMeshers_Deflection1DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Deflection1DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Deflection1DPy();
Py::Object setDeflection(const Py::Tuple& args);
};
class StdMeshers_Hexa_3DPy : public SMESH_HypothesisPy<StdMeshers_Hexa_3DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Hexa_3DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Hexa_3DPy();
};
class StdMeshers_StartEndLengthPy : public SMESH_HypothesisPy<StdMeshers_StartEndLengthPy>
{
public:
static void init_type(PyObject*);
StdMeshers_StartEndLengthPy(int hypId, SMESH_Gen* gen);
~StdMeshers_StartEndLengthPy();
Py::Object setLength(const Py::Tuple& args);
Py::Object getLength(const Py::Tuple& args);
};
class StdMeshers_SegmentLengthAroundVertexPy : public SMESH_HypothesisPy<StdMeshers_SegmentLengthAroundVertexPy>
{
public:
static void init_type(PyObject*);
StdMeshers_SegmentLengthAroundVertexPy(int hypId, SMESH_Gen* gen);
~StdMeshers_SegmentLengthAroundVertexPy();
Py::Object setLength(const Py::Tuple& args);
Py::Object getLength(const Py::Tuple& args);
};
class StdMeshers_SegmentAroundVertex_0DPy : public SMESH_HypothesisPy<StdMeshers_SegmentAroundVertex_0DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_SegmentAroundVertex_0DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_SegmentAroundVertex_0DPy();
};
class StdMeshers_RadialPrism_3DPy : public SMESH_HypothesisPy<StdMeshers_RadialPrism_3DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_RadialPrism_3DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_RadialPrism_3DPy();
};
class StdMeshers_QuadraticMeshPy : public SMESH_HypothesisPy<StdMeshers_QuadraticMeshPy>
{
public:
static void init_type(PyObject*);
StdMeshers_QuadraticMeshPy(int hypId, SMESH_Gen* gen);
~StdMeshers_QuadraticMeshPy();
};
class StdMeshers_ProjectionSource3DPy : public SMESH_HypothesisPy<StdMeshers_ProjectionSource3DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_ProjectionSource3DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_ProjectionSource3DPy();
};
class StdMeshers_ProjectionSource2DPy : public SMESH_HypothesisPy<StdMeshers_ProjectionSource2DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_ProjectionSource2DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_ProjectionSource2DPy();
};
class StdMeshers_ProjectionSource1DPy : public SMESH_HypothesisPy<StdMeshers_ProjectionSource1DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_ProjectionSource1DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_ProjectionSource1DPy();
};
class StdMeshers_Projection_3DPy : public SMESH_HypothesisPy<StdMeshers_Projection_3DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Projection_3DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Projection_3DPy();
};
class StdMeshers_Projection_2DPy : public SMESH_HypothesisPy<StdMeshers_Projection_2DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Projection_2DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Projection_2DPy();
};
class StdMeshers_Projection_1DPy : public SMESH_HypothesisPy<StdMeshers_Projection_1DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Projection_1DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Projection_1DPy();
};
class StdMeshers_Prism_3DPy : public SMESH_HypothesisPy<StdMeshers_Prism_3DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_Prism_3DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_Prism_3DPy();
};
class StdMeshers_NumberOfSegmentsPy : public SMESH_HypothesisPy<StdMeshers_NumberOfSegmentsPy>
{
public:
static void init_type(PyObject*);
StdMeshers_NumberOfSegmentsPy(int hypId, SMESH_Gen* gen);
~StdMeshers_NumberOfSegmentsPy();
Py::Object setNumSegm(const Py::Tuple& args);
Py::Object getNumSegm(const Py::Tuple& args);
};
class StdMeshers_NumberOfLayersPy : public SMESH_HypothesisPy<StdMeshers_NumberOfLayersPy>
{
public:
static void init_type(PyObject*);
StdMeshers_NumberOfLayersPy(int hypId, SMESH_Gen* gen);
~StdMeshers_NumberOfLayersPy();
Py::Object setNumLayers(const Py::Tuple& args);
Py::Object getNumLayers(const Py::Tuple& args);
};
class StdMeshers_MEFISTO_2DPy : public SMESH_HypothesisPy<StdMeshers_MEFISTO_2DPy>
{
public:
static void init_type(PyObject*);
StdMeshers_MEFISTO_2DPy(int hypId, SMESH_Gen* gen);
~StdMeshers_MEFISTO_2DPy();
};
class StdMeshers_MaxElementVolumePy : public SMESH_HypothesisPy<StdMeshers_MaxElementVolumePy>
{
public:
static void init_type(PyObject*);
StdMeshers_MaxElementVolumePy(int hypId, SMESH_Gen* gen);
~StdMeshers_MaxElementVolumePy();
Py::Object setMaxVolume(const Py::Tuple& args);
Py::Object getMaxVolume(const Py::Tuple& args);
};
class StdMeshers_LengthFromEdgesPy : public SMESH_HypothesisPy<StdMeshers_LengthFromEdgesPy>
{
public:
static void init_type(PyObject*);
StdMeshers_LengthFromEdgesPy(int hypId, SMESH_Gen* gen);
~StdMeshers_LengthFromEdgesPy();
Py::Object setMode(const Py::Tuple& args);
Py::Object getMode(const Py::Tuple& args);
};
class StdMeshers_LayerDistributionPy : public SMESH_HypothesisPy<StdMeshers_LayerDistributionPy>
{
public:
static void init_type(PyObject*);
StdMeshers_LayerDistributionPy(int hypId, SMESH_Gen* gen);
~StdMeshers_LayerDistributionPy();
Py::Object setLayerDistribution(const Py::Tuple& args);
Py::Object getLayerDistribution(const Py::Tuple& args);
};
#else
class StdMeshers_Arithmetic1DPy : public SMESH_HypothesisPy<StdMeshers_Arithmetic1DPy>
{
public:
@@ -421,6 +717,7 @@ public:
Py::Object setLayerDistribution(const Py::Tuple& args);
Py::Object getLayerDistribution(const Py::Tuple& args);
};
#endif
} // namespace Fem

View File

@@ -57,6 +57,11 @@
using namespace FemGui;
#ifdef VTK_CELL_ARRAY_V2
typedef const vtkIdType* vtkIdTypePtr;
#else
typedef vtkIdType* vtkIdTypePtr;
#endif
PROPERTY_SOURCE(FemGui::ViewProviderFemPostObject, Gui::ViewProviderDocumentObject)
@@ -317,7 +322,7 @@ void ViewProviderFemPostObject::update3D() {
vtkDataArray *tcoords = NULL;
vtkCellArray *cells;
vtkIdType npts = 0;
vtkIdType *indx = 0;
vtkIdTypePtr indx = 0;
points = pd->GetPoints();
pntData = pd->GetPointData();

View File

@@ -334,7 +334,11 @@ Mesh::MeshObject* Mesher::createMesh() const
Mesher::_mesh_gen = new SMESH_Gen();
SMESH_Gen* meshgen = Mesher::_mesh_gen;
#if SMESH_VERSION_MAJOR >= 9
SMESH_Mesh* mesh = meshgen->CreateMesh(true);
#else
SMESH_Mesh* mesh = meshgen->CreateMesh(0, true);
#endif
int hyp=0;
@@ -342,7 +346,11 @@ Mesh::MeshObject* Mesher::createMesh() const
switch (method) {
#if defined (HAVE_NETGEN)
case Netgen: {
#if SMESH_VERSION_MAJOR >= 9
NETGENPlugin_Hypothesis_2D* hyp2d = new NETGENPlugin_Hypothesis_2D(hyp++,meshgen);
#else
NETGENPlugin_Hypothesis_2D* hyp2d = new NETGENPlugin_Hypothesis_2D(hyp++,0,meshgen);
#endif
if (fineness >=0 && fineness < 5) {
hyp2d->SetFineness(NETGENPlugin_Hypothesis_2D::Fineness(fineness));
@@ -367,58 +375,98 @@ Mesh::MeshObject* Mesher::createMesh() const
hyp2d->SetSecondOrder(secondOrder); // apply bisecting to create four triangles out of one
hypoth.push_back(hyp2d);
#if SMESH_VERSION_MAJOR >= 9
NETGENPlugin_NETGEN_2D* alg2d = new NETGENPlugin_NETGEN_2D(hyp++,meshgen);
#else
NETGENPlugin_NETGEN_2D* alg2d = new NETGENPlugin_NETGEN_2D(hyp++,0,meshgen);
#endif
hypoth.push_back(alg2d);
} break;
#endif
#if defined (HAVE_MEFISTO)
case Mefisto: {
if (maxLength > 0) {
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_MaxLength* hyp1d = new StdMeshers_MaxLength(hyp++, meshgen);
#else
StdMeshers_MaxLength* hyp1d = new StdMeshers_MaxLength(hyp++, 0, meshgen);
#endif
hyp1d->SetLength(maxLength);
hypoth.push_back(hyp1d);
}
else if (localLength > 0) {
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_LocalLength* hyp1d = new StdMeshers_LocalLength(hyp++,meshgen);
#else
StdMeshers_LocalLength* hyp1d = new StdMeshers_LocalLength(hyp++,0,meshgen);
#endif
hyp1d->SetLength(localLength);
hypoth.push_back(hyp1d);
}
else if (maxArea > 0) {
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_MaxElementArea* hyp2d = new StdMeshers_MaxElementArea(hyp++,meshgen);
#else
StdMeshers_MaxElementArea* hyp2d = new StdMeshers_MaxElementArea(hyp++,0,meshgen);
#endif
hyp2d->SetMaxArea(maxArea);
hypoth.push_back(hyp2d);
}
else if (deflection > 0) {
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Deflection1D* hyp1d = new StdMeshers_Deflection1D(hyp++,meshgen);
#else
StdMeshers_Deflection1D* hyp1d = new StdMeshers_Deflection1D(hyp++,0,meshgen);
#endif
hyp1d->SetDeflection(deflection);
hypoth.push_back(hyp1d);
}
else if (minLen > 0 && maxLen > 0) {
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Arithmetic1D* hyp1d = new StdMeshers_Arithmetic1D(hyp++,meshgen);
#else
StdMeshers_Arithmetic1D* hyp1d = new StdMeshers_Arithmetic1D(hyp++,0,meshgen);
#endif
hyp1d->SetLength(minLen, false);
hyp1d->SetLength(maxLen, true);
hypoth.push_back(hyp1d);
}
else {
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_AutomaticLength* hyp1d = new StdMeshers_AutomaticLength(hyp++,meshgen);
#else
StdMeshers_AutomaticLength* hyp1d = new StdMeshers_AutomaticLength(hyp++,0,meshgen);
#endif
hypoth.push_back(hyp1d);
}
{
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_NumberOfSegments* hyp1d = new StdMeshers_NumberOfSegments(hyp++,meshgen);
#else
StdMeshers_NumberOfSegments* hyp1d = new StdMeshers_NumberOfSegments(hyp++,0,meshgen);
#endif
hyp1d->SetNumberOfSegments(1);
hypoth.push_back(hyp1d);
}
if (regular) {
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_Regular_1D* hyp1d = new StdMeshers_Regular_1D(hyp++,meshgen);
#else
StdMeshers_Regular_1D* hyp1d = new StdMeshers_Regular_1D(hyp++,0,meshgen);
#endif
hypoth.push_back(hyp1d);
}
#if SMESH_VERSION_MAJOR < 7
StdMeshers_TrianglePreference* hyp2d_1 = new StdMeshers_TrianglePreference(hyp++,0,meshgen);
hypoth.push_back(hyp2d_1);
#endif
#if SMESH_VERSION_MAJOR >= 9
StdMeshers_MEFISTO_2D* alg2d = new StdMeshers_MEFISTO_2D(hyp++,meshgen);
#else
StdMeshers_MEFISTO_2D* alg2d = new StdMeshers_MEFISTO_2D(hyp++,0,meshgen);
#endif
hypoth.push_back(alg2d);
} break;
#endif