Fem: Apply clang-format
This commit is contained in:
@@ -24,33 +24,33 @@
|
||||
#include <SMESH_Version.h>
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <Python.h>
|
||||
# include <BRepBuilderAPI_Copy.hxx>
|
||||
# include <BRepTools.hxx>
|
||||
# include <SMESH_Gen.hxx>
|
||||
# include <SMESH_Mesh.hxx>
|
||||
# include <StdMeshers_MaxLength.hxx>
|
||||
# include <StdMeshers_LocalLength.hxx>
|
||||
# include <StdMeshers_MaxElementArea.hxx>
|
||||
# include <StdMeshers_QuadranglePreference.hxx>
|
||||
# include <StdMeshers_Quadrangle_2D.hxx>
|
||||
# include <StdMeshers_Regular_1D.hxx>
|
||||
# include <StdMeshers_Deflection1D.hxx>
|
||||
# include <StdMeshers_Hexa_3D.hxx>
|
||||
# include <StdMeshers_NumberOfSegments.hxx>
|
||||
# include <StdMeshers_RadialPrism_3D.hxx>
|
||||
# include <StdMeshers_SegmentAroundVertex_0D.hxx>
|
||||
# include <StdMeshers_ProjectionSource1D.hxx>
|
||||
# include <StdMeshers_ProjectionSource2D.hxx>
|
||||
# include <StdMeshers_ProjectionSource3D.hxx>
|
||||
# include <StdMeshers_StartEndLength.hxx>
|
||||
#include <BRepBuilderAPI_Copy.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <Python.h>
|
||||
#include <SMESH_Gen.hxx>
|
||||
#include <SMESH_Mesh.hxx>
|
||||
#include <StdMeshers_Deflection1D.hxx>
|
||||
#include <StdMeshers_Hexa_3D.hxx>
|
||||
#include <StdMeshers_LocalLength.hxx>
|
||||
#include <StdMeshers_MaxElementArea.hxx>
|
||||
#include <StdMeshers_MaxLength.hxx>
|
||||
#include <StdMeshers_NumberOfSegments.hxx>
|
||||
#include <StdMeshers_ProjectionSource1D.hxx>
|
||||
#include <StdMeshers_ProjectionSource2D.hxx>
|
||||
#include <StdMeshers_ProjectionSource3D.hxx>
|
||||
#include <StdMeshers_QuadranglePreference.hxx>
|
||||
#include <StdMeshers_Quadrangle_2D.hxx>
|
||||
#include <StdMeshers_RadialPrism_3D.hxx>
|
||||
#include <StdMeshers_Regular_1D.hxx>
|
||||
#include <StdMeshers_SegmentAroundVertex_0D.hxx>
|
||||
#include <StdMeshers_StartEndLength.hxx>
|
||||
#endif
|
||||
|
||||
#include <App/DocumentObjectPy.h>
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
|
||||
#include "FemMeshShapeObject.h"
|
||||
#include "FemMesh.h"
|
||||
#include "FemMeshShapeObject.h"
|
||||
|
||||
|
||||
using namespace Fem;
|
||||
@@ -62,17 +62,20 @@ PROPERTY_SOURCE(Fem::FemMeshShapeObject, Fem::FemMeshObject)
|
||||
FemMeshShapeObject::FemMeshShapeObject()
|
||||
{
|
||||
ADD_PROPERTY_TYPE(
|
||||
Shape, (nullptr), "FEM Mesh", Prop_None,
|
||||
Shape,
|
||||
(nullptr),
|
||||
"FEM Mesh",
|
||||
Prop_None,
|
||||
"Geometry object, the mesh is made from. The geometry object has to have a Shape.");
|
||||
}
|
||||
|
||||
FemMeshShapeObject::~FemMeshShapeObject() = default;
|
||||
|
||||
App::DocumentObjectExecReturn *FemMeshShapeObject::execute()
|
||||
App::DocumentObjectExecReturn* FemMeshShapeObject::execute()
|
||||
{
|
||||
Fem::FemMesh newMesh;
|
||||
|
||||
Part::Feature *feat = Shape.getValue<Part::Feature*>();
|
||||
Part::Feature* feat = Shape.getValue<Part::Feature*>();
|
||||
|
||||
#if 0
|
||||
TopoDS_Shape oshape = feat->Shape.getValue();
|
||||
@@ -84,9 +87,9 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute()
|
||||
#endif
|
||||
|
||||
newMesh.getSMesh()->ShapeToMesh(shape);
|
||||
SMESH_Gen *myGen = newMesh.getGenerator();
|
||||
SMESH_Gen* myGen = newMesh.getGenerator();
|
||||
|
||||
int hyp=0;
|
||||
int hyp = 0;
|
||||
#if 0
|
||||
SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, 1, myGen));
|
||||
static_cast<StdMeshers_MaxLength*>(len.get())->SetLength(1.0);
|
||||
@@ -152,10 +155,10 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute()
|
||||
SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, myGen));
|
||||
newMesh.addHypothesis(shape, reg);
|
||||
|
||||
SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,myGen));
|
||||
SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, myGen));
|
||||
newMesh.addHypothesis(shape, qdp);
|
||||
|
||||
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,myGen));
|
||||
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++, myGen));
|
||||
newMesh.addHypothesis(shape, q2d);
|
||||
#else
|
||||
SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, 1, myGen));
|
||||
@@ -181,21 +184,21 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute()
|
||||
SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, 1, myGen));
|
||||
newMesh.addHypothesis(shape, reg);
|
||||
|
||||
//SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, 1, myGen));
|
||||
//static_cast<StdMeshers_StartEndLength*>(sel.get())->SetLength(1.0, true);
|
||||
//newMesh.addHypothesis(shape, sel;
|
||||
// SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, 1, myGen));
|
||||
// static_cast<StdMeshers_StartEndLength*>(sel.get())->SetLength(1.0, true);
|
||||
// newMesh.addHypothesis(shape, sel;
|
||||
|
||||
SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,1,myGen));
|
||||
SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, 1, myGen));
|
||||
newMesh.addHypothesis(shape, qdp);
|
||||
|
||||
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,1,myGen));
|
||||
SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++, 1, myGen));
|
||||
newMesh.addHypothesis(shape, q2d);
|
||||
#endif
|
||||
|
||||
// create mesh
|
||||
newMesh.compute();
|
||||
#endif
|
||||
#if 0 // NETGEN test
|
||||
#if 0 // NETGEN test
|
||||
NETGENPlugin_Mesher myNetGenMesher(newMesh.getSMesh(),shape,true);
|
||||
|
||||
//NETGENPlugin_SimpleHypothesis_2D * tet2 = new NETGENPlugin_SimpleHypothesis_2D(hyp++,1,myGen);
|
||||
@@ -219,21 +222,21 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute()
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
//short FemMeshShapeObject::mustExecute(void) const
|
||||
// short FemMeshShapeObject::mustExecute(void) const
|
||||
//{
|
||||
// return 0;
|
||||
//}
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
//PyObject *FemMeshShapeObject::getPyObject()
|
||||
// PyObject *FemMeshShapeObject::getPyObject()
|
||||
//{
|
||||
// if (PythonObject.is(Py::_None())){
|
||||
// // ref counter is set to 1
|
||||
// PythonObject = Py::Object(new DocumentObjectPy(this),true);
|
||||
// }
|
||||
// return Py::new_reference_to(PythonObject);
|
||||
//}
|
||||
// if (PythonObject.is(Py::_None())){
|
||||
// // ref counter is set to 1
|
||||
// PythonObject = Py::Object(new DocumentObjectPy(this),true);
|
||||
// }
|
||||
// return Py::new_reference_to(PythonObject);
|
||||
// }
|
||||
|
||||
//void FemMeshShapeObject::onChanged(const Property* prop)
|
||||
// void FemMeshShapeObject::onChanged(const Property* prop)
|
||||
//{
|
||||
// App::GeoFeature::onChanged(prop);
|
||||
//}
|
||||
// App::GeoFeature::onChanged(prop);
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user