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

@@ -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();