FEM: remove trailing whitespaces

This commit is contained in:
Bernd Hahnebach 2016-04-14 19:43:47 +02:00 committed by wmayer
parent 14eb6869a9
commit b58e37b950
65 changed files with 217 additions and 217 deletions

View File

@ -50,7 +50,7 @@
#include "FemConstraintPressure.h"
#include "FemConstraintGear.h"
#include "FemConstraintPulley.h"
#include "FemConstraintDisplacement.h"
#include "FemConstraintDisplacement.h"
#include "FemResultObject.h"
#include "FemSolverObject.h"
@ -115,7 +115,7 @@ PyMODINIT_FUNC initFem()
// NOTE: To finish the initialization of our own type objects we must
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
// This function is responsible for adding inherited slots from a type's base class.
Fem::FemAnalysis ::init();
Fem::FemAnalysisPython ::init();
Fem::DocumentObject ::init();

View File

@ -220,7 +220,7 @@ private:
if (!PyArg_ParseTuple(args.ptr(), "O!", &(FemMeshPy::Type), &pcObj))
throw Py::Exception();
App::Document *pcDoc = App::GetApplication().getActiveDocument();
App::Document *pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc)
pcDoc = App::GetApplication().newDocument();

View File

@ -154,8 +154,8 @@ SET(FemBase_SRCS
FemMeshProperty.h
)
SOURCE_GROUP("Base types" FILES ${FemBase_SRCS})
SET(FemSet_SRCS
FemSetObject.cpp
FemSetObject.h
@ -169,7 +169,7 @@ SET(FemSet_SRCS
FemSetGeometryObject.h
)
SOURCE_GROUP("Set objects" FILES ${FemSet_SRCS})
SET(FemConstraints_SRCS
FemConstraintBearing.h
FemConstraintBearing.cpp
@ -205,10 +205,10 @@ add_library(Fem SHARED ${Fem_SRCS})
target_link_libraries(Fem ${Fem_LIBS})
fc_target_copy_resource(Fem
fc_target_copy_resource(Fem
${CMAKE_SOURCE_DIR}/src/Mod/Fem
${CMAKE_BINARY_DIR}/Mod/Fem
Init.py
Init.py
${FemScripts_SRCS}
${FemTests_SRCS}
)

View File

@ -60,7 +60,7 @@ PyObject *FemAnalysis::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}
void FemAnalysis::onChanged(const Property* prop)

View File

@ -55,7 +55,7 @@ public:
/// Member objects of the Analysis
App::PropertyLinkList Member;
/// unique identifier of the Analysis
/// unique identifier of the Analysis
App::PropertyUUID Uid;

View File

@ -44,7 +44,7 @@ public:
App::PropertyLinkSubList References;
// Read-only (calculated values). These trigger changes in the ViewProvider
App::PropertyVector NormalDirection;
//OvG: Scale
App::PropertyInteger Scale;
@ -55,7 +55,7 @@ public:
virtual const char* getViewProviderName(void) const {
return "FemGui::ViewProviderFemConstraint";
}
//OvG: Allow automatic determination of scaling of constraint drawings, e.g. arrow length and size
int calcDrawScaleFactor(double lparam) const;
int calcDrawScaleFactor(double lvparam, double luparam) const;

View File

@ -44,25 +44,25 @@ PROPERTY_SOURCE(Fem::ConstraintDisplacement, Fem::Constraint);
ConstraintDisplacement::ConstraintDisplacement()
{
ADD_PROPERTY(xDisplacement,(0.0));
ADD_PROPERTY(yDisplacement,(0.0));
ADD_PROPERTY(zDisplacement,(0.0));
ADD_PROPERTY(xRotation,(0.0));
ADD_PROPERTY(yRotation,(0.0));
ADD_PROPERTY(zRotation,(0.0));
ADD_PROPERTY(xFree,(1));
ADD_PROPERTY(yFree,(1));
ADD_PROPERTY(zFree,(1));
ADD_PROPERTY(xFix,(0));
ADD_PROPERTY(yFix,(0));
ADD_PROPERTY(zFix,(0));
ADD_PROPERTY(rotxFree,(1));
ADD_PROPERTY(rotyFree,(1));
ADD_PROPERTY(rotzFree,(1));
ADD_PROPERTY(xDisplacement,(0.0));
ADD_PROPERTY(yDisplacement,(0.0));
ADD_PROPERTY(zDisplacement,(0.0));
ADD_PROPERTY(xRotation,(0.0));
ADD_PROPERTY(yRotation,(0.0));
ADD_PROPERTY(zRotation,(0.0));
ADD_PROPERTY(xFree,(1));
ADD_PROPERTY(yFree,(1));
ADD_PROPERTY(zFree,(1));
ADD_PROPERTY(xFix,(0));
ADD_PROPERTY(yFix,(0));
ADD_PROPERTY(zFix,(0));
ADD_PROPERTY(rotxFree,(1));
ADD_PROPERTY(rotyFree,(1));
ADD_PROPERTY(rotzFree,(1));
ADD_PROPERTY(rotxFix,(0));
ADD_PROPERTY(rotyFix,(0));
ADD_PROPERTY(rotzFix,(0));
ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"ConstraintFixed",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
"Points where symbols are drawn");
ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"ConstraintFixed",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),

View File

@ -39,18 +39,18 @@ class AppFemExport ConstraintDisplacement : public Fem::Constraint
public:
/// Constructor
ConstraintDisplacement(void);
// Read-only (calculated values). These trigger changes in the ViewProvider
App::PropertyVectorList Points;
App::PropertyVectorList Normals;
//Displacement parameters
App::PropertyFloat xDisplacement;
App::PropertyFloat yDisplacement;
App::PropertyFloat zDisplacement;
App::PropertyFloat xRotation;
App::PropertyFloat yRotation;
App::PropertyFloat zRotation;
App::PropertyFloat xDisplacement;
App::PropertyFloat yDisplacement;
App::PropertyFloat zDisplacement;
App::PropertyFloat xRotation;
App::PropertyFloat yRotation;
App::PropertyFloat zRotation;
App::PropertyBool xFree;
App::PropertyBool yFree;
App::PropertyBool zFree;

View File

@ -726,7 +726,7 @@ void FemMesh::readNastran(const std::string &Filename)
{
tetra_element.clear();
//Lets extract the elements
//As each Element Line consists of two subsequent lines as well
//As each Element Line consists of two subsequent lines as well
//we have to take care of that
//At a first step we only extract Quadratic Tetrahedral Elements
std::getline(inputfile,line2);
@ -739,7 +739,7 @@ void FemMesh::readNastran(const std::string &Filename)
offset = 1;
else if (id < 100000000)
offset = 2;
element_id.push_back(id);
tetra_element.push_back(atoi(line1.substr(24,32).c_str()));
@ -764,7 +764,7 @@ void FemMesh::readNastran(const std::string &Filename)
continue;//Line does not include Nodal coordinates
nodal_id.push_back(atoi(token_results[1].c_str()));
current_node.x = atof(token_results[3].c_str());
current_node.y = atof(token_results[4].c_str());
current_node.y = atof(token_results[4].c_str());
current_node.z = atof(token_results[5].c_str());
vertices.push_back(current_node);
}
@ -772,7 +772,7 @@ void FemMesh::readNastran(const std::string &Filename)
{
tetra_element.clear();
//Lets extract the elements
//As each Element Line consists of two subsequent lines as well
//As each Element Line consists of two subsequent lines as well
//we have to take care of that
//At a first step we only extract Quadratic Tetrahedral Elements
std::getline(inputfile,line2);
@ -815,7 +815,7 @@ void FemMesh::readNastran(const std::string &Filename)
for(unsigned int i=0;i<all_elements.size();i++)
{
//Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
//Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
//Ansonsten ist eine konsistente Datenstruktur nicht möglich
//meshds->AddVolumeWithID
//(
@ -855,11 +855,11 @@ void FemMesh::read(const char *FileName)
{
Base::FileInfo File(FileName);
_Mtrx = Base::Matrix4D();
// checking on the file
if (!File.isReadable())
throw Base::Exception("File to load not existing or not readable");
if (File.hasExtension("unv") ) {
// read UNV file
myMesh->UNVToMesh(File.filePath().c_str());
@ -1179,10 +1179,10 @@ void FemMesh::SaveDocFile (Base::Writer &writer) const
Base::FileInfo fi(App::Application::getTempFileName().c_str());
myMesh->ExportUNV(fi.filePath().c_str());
Base::ifstream file(fi, std::ios::in | std::ios::binary);
if (file){
unsigned long ulSize = 0;
unsigned long ulSize = 0;
std::streambuf* buf = file.rdbuf();
if (buf) {
unsigned long ulCurr;
@ -1255,7 +1255,7 @@ Base::BoundBox3d FemMesh::getBoundBox(void) const
for (;aNodeIter->more();) {
const SMDS_MeshNode* aNode = aNodeIter->next();
Base::Vector3d vec(aNode->X(),aNode->Y(),aNode->Z());
// Apply the matrix to hold the BoundBox in absolute space.
// Apply the matrix to hold the BoundBox in absolute space.
vec = _Mtrx * vec;
box.Add(vec);
}
@ -1281,7 +1281,7 @@ unsigned long FemMesh::countSubElements(const char* Type) const
Data::Segment* FemMesh::getSubElement(const char* Type, unsigned long n) const
{
// FIXME implement subelement interface
// FIXME implement subelement interface
//std::stringstream str;
//str << Type << n;
//std::string temp = str.str();
@ -1312,7 +1312,7 @@ struct Fem::FemMesh::FemMeshInfo FemMesh::getInfo(void) const{
}
// for(unsigned int i=0;i<all_elements.size();i++)
// {
// //Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
// //Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
// //Ansonsten ist eine konsistente Datenstruktur nicht möglich
// meshds->AddVolumeWithID(
// meshds->FindNode(all_elements[i][0]),
@ -1339,10 +1339,10 @@ Base::Quantity FemMesh::getVolume(void)const
Base::Vector3d a,b,c,a_b_product;
double volume = 0.0;
for (;aVolIter->more();)
for (;aVolIter->more();)
{
const SMDS_MeshVolume* aVol = aVolIter->next();
if ( aVol->NbNodes() != 10 ) continue;
Base::Vector3d v1(aVol->GetNode(1)->X(),aVol->GetNode(1)->Y(),aVol->GetNode(1)->Z());
@ -1405,7 +1405,7 @@ Base::Quantity FemMesh::getVolume(void)const
c = v3 -v7 ;
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
}
return Base::Quantity(volume,Unit::Volume);

View File

@ -106,9 +106,9 @@ public:
/** @name Placement control */
//@{
/// set the transformation
/// set the transformation
void setTransform(const Base::Matrix4D& rclTrf);
/// get the transformation
/// get the transformation
Base::Matrix4D getTransform(void) const;
/// Bound box from the shape
Base::BoundBox3d getBoundBox(void)const;
@ -123,7 +123,7 @@ public:
//@}
struct FemMeshInfo {
int numFaces;
int numFaces;
int numNode;
int numTria;
int numQuad;

View File

@ -57,7 +57,7 @@ PyObject *FemMeshObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}
void FemMeshObject::onChanged(const Property* prop)
@ -66,7 +66,7 @@ void FemMeshObject::onChanged(const Property* prop)
// if the placement has changed apply the change to the mesh data as well
if (prop == &this->Placement) {
const_cast<Fem::FemMesh&>(this->FemMesh.getValue()).setTransform(this->Placement.getValue().toMatrix());
const_cast<Fem::FemMesh&>(this->FemMesh.getValue()).setTransform(this->Placement.getValue().toMatrix());
}
}

View File

@ -69,7 +69,7 @@ void PropertyFemMesh::setValue(const FemMesh& sh)
hasSetValue();
}
const FemMesh &PropertyFemMesh::getValue(void)const
const FemMesh &PropertyFemMesh::getValue(void)const
{
return *_FemMesh;
}

View File

@ -49,13 +49,13 @@ public:
/// set the FemMesh shape
void setValue(const FemMesh&);
/// does nothing, for add property macro
void setValue(void){};
void setValue(void){};
/// get the FemMesh shape
const FemMesh &getValue(void) const;
const Data::ComplexGeoData* getComplexData() const;
//@}
/** @name Getting basic geometric entities */
//@{
/** Returns the bounding box around the underlying mesh kernel */

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="ComplexGeoDataPy"
Name="FemMeshPy"
Twin="FemMesh"
TwinPointer="FemMesh"
Include="Mod/Fem/App/FemMesh.h"
Namespace="Fem"
FatherInclude="App/ComplexGeoDataPy.h"
<PythonExport
Father="ComplexGeoDataPy"
Name="FemMeshPy"
Twin="FemMesh"
TwinPointer="FemMesh"
Include="Mod/Fem/App/FemMesh.h"
Namespace="Fem"
FatherInclude="App/ComplexGeoDataPy.h"
FatherNamespace="Data"
Constructor="true">
<Documentation>

View File

@ -63,7 +63,7 @@ std::string FemMeshPy::representation(void) const
PyObject *FemMeshPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
{
// create a new instance of FemMeshPy and the Twin object
// create a new instance of FemMeshPy and the Twin object
return new FemMeshPy(new FemMesh);
}
@ -71,7 +71,7 @@ PyObject *FemMeshPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Py
int FemMeshPy::PyInit(PyObject* args, PyObject* /*kwd*/)
{
PyObject *pcObj=0;
if (!PyArg_ParseTuple(args, "|O", &pcObj)) // convert args: Python->C
if (!PyArg_ParseTuple(args, "|O", &pcObj)) // convert args: Python->C
return -1; // NULL triggers exception
try {
@ -287,7 +287,7 @@ PyObject* FemMeshPy::addFace(PyObject *args)
throw std::runtime_error("Failed to get node of the given indices");
Nodes.push_back(node);
}
SMDS_MeshFace* face=0;
switch(Nodes.size()){
case 3:
@ -390,7 +390,7 @@ PyObject* FemMeshPy::addVolume(PyObject *args)
throw std::runtime_error("Failed to get node of the given indices");
Nodes.push_back(node);
}
SMDS_MeshVolume* vol=0;
if(ElementId != -1) {
switch(Nodes.size()){
@ -810,7 +810,7 @@ Py::Dict FemMeshPy::getNodes(void) const
for (int i=0;aNodeIter->more();i++) {
const SMDS_MeshNode* aNode = aNodeIter->next();
Base::Vector3d vec(aNode->X(),aNode->Y(),aNode->Z());
// Apply the matrix to hold the BoundBox in absolute space.
// Apply the matrix to hold the BoundBox in absolute space.
vec = Mtrx * vec;
int id = aNode->GetID();
@ -947,7 +947,7 @@ Py::Int FemMeshPy::getGroupCount(void) const
Py::Object FemMeshPy::getVolume(void) const
{
return Py::Object(new Base::QuantityPy(new Base::Quantity(getFemMeshPtr()->getVolume())));
}
// ===== custom attributes ============================================================
@ -958,5 +958,5 @@ PyObject *FemMeshPy::getCustomAttributes(const char* /*attr*/) const
int FemMeshPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
{
return 0;
return 0;
}

View File

@ -88,7 +88,7 @@ FemMeshShapeObject::~FemMeshShapeObject()
{
}
App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
{
Fem::FemMesh newMesh;
@ -102,7 +102,7 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
#else
TopoDS_Shape shape = feat->Shape.getValue();
#endif
newMesh.getSMesh()->ShapeToMesh(shape);
SMESH_Gen *myGen = newMesh.getGenerator();
@ -188,21 +188,21 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
NETGENPlugin_Mesher myNetGenMesher(newMesh.getSMesh(),shape,true);
//NETGENPlugin_SimpleHypothesis_2D * tet2 = new NETGENPlugin_SimpleHypothesis_2D(hyp++,1,myGen);
//static_cast<NETGENPlugin_SimpleHypothesis_2D*>(tet2.get())->SetNumberOfSegments(5);
//static_cast<NETGENPlugin_SimpleHypothesis_2D*>(tet2.get())->SetLocalLength(0.1);
//static_cast<NETGENPlugin_SimpleHypothesis_2D*>(tet2.get())->LengthFromEdges();
//static_cast<NETGENPlugin_SimpleHypothesis_2D*>(tet2.get())->SetNumberOfSegments(5);
//static_cast<NETGENPlugin_SimpleHypothesis_2D*>(tet2.get())->SetLocalLength(0.1);
//static_cast<NETGENPlugin_SimpleHypothesis_2D*>(tet2.get())->LengthFromEdges();
//myNetGenMesher.SetParameters(tet2);
//NETGENPlugin_SimpleHypothesis_3D* tet= new NETGENPlugin_SimpleHypothesis_3D(hyp++,1,myGen);
//static_cast<NETGENPlugin_SimpleHypothesis_3D*>(tet.get())->LengthFromFaces();
//static_cast<NETGENPlugin_SimpleHypothesis_3D*>(tet.get())->SetMaxElementVolume(0.1);
//static_cast<NETGENPlugin_SimpleHypothesis_3D*>(tet.get())->LengthFromFaces();
//static_cast<NETGENPlugin_SimpleHypothesis_3D*>(tet.get())->SetMaxElementVolume(0.1);
//myNetGenMesher.SetParameters( tet);
myNetGenMesher.Compute();
#endif
#endif
//SMESHDS_Mesh* data = const_cast<SMESH_Mesh*>(newMesh.getSMesh())->GetMeshDS();
//const SMDS_MeshInfo& info = data->GetMeshInfo();
//int numNode = info.NbNodes();
@ -219,7 +219,7 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
// set the value to the object
FemMesh.setValue(newMesh);
return App::DocumentObject::StdReturn;
}
@ -234,7 +234,7 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
// // ref counter is set to 1
// PythonObject = Py::Object(new DocumentObjectPy(this),true);
// }
// return Py::new_reference_to(PythonObject);
// return Py::new_reference_to(PythonObject);
//}
//void FemMeshShapeObject::onChanged(const Property* prop)

View File

@ -71,7 +71,7 @@ PyObject *FemResultObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}
// Python feature ---------------------------------------------------------

View File

@ -54,6 +54,6 @@ PyObject *FemSetElementsObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}

View File

@ -55,6 +55,6 @@ PyObject *FemSetFacesObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}

View File

@ -55,6 +55,6 @@ PyObject *FemSetGeometryObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}

View File

@ -56,6 +56,6 @@ PyObject *FemSetNodesObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}

View File

@ -56,6 +56,6 @@ PyObject *FemSetObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}

View File

@ -73,7 +73,7 @@ PyObject *FemSolverObject::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}
// Python feature ---------------------------------------------------------

View File

@ -54,7 +54,7 @@ public:
App::PropertyString ExternalCaseEditor;
/// Path to External Result Viewer like Paraview, empty string means using FreeCAD
App::PropertyString ExternalResultViewer;
/// for FEM: Static, Frequency, etc
App::PropertyString AnalysisType;
/// Path of working dir for the solver

View File

@ -55,13 +55,13 @@ public:
*/
static bool isPlanar(const TopoDS_Face&);
/*!
It is assumed that the edge is 'linear'.
It is assumed that the edge is 'linear'.
The direction vector of the line is returned.
@see isLinear
*/
static gp_XYZ getDirection(const TopoDS_Edge&);
/*!
It is assumed that the face is 'planar'.
It is assumed that the face is 'planar'.
The normal vector of the plane is returned.
@see isPlanar
*/

View File

@ -21,4 +21,4 @@
***************************************************************************/
#include "PreCompiled.h"
#include "PreCompiled.h"

View File

@ -48,10 +48,10 @@ set(FemGui_MOC_HDRS
TaskDlgCreateNodeSet.h
TaskFemConstraint.h
TaskFemConstraintBearing.h
TaskFemConstraintFixed.h
TaskFemConstraintForce.h
TaskFemConstraintFixed.h
TaskFemConstraintForce.h
TaskFemConstraintPressure.h
TaskFemConstraintGear.h
TaskFemConstraintGear.h
TaskFemConstraintPulley.h
TaskFemConstraintDisplacement.h
TaskTetParameter.h
@ -217,7 +217,7 @@ add_library(FemGui SHARED ${FemGui_SRCS})
target_link_libraries(FemGui ${FemGui_LIBS})
fc_target_copy_resource(FemGui
fc_target_copy_resource(FemGui
${CMAKE_SOURCE_DIR}/src/Mod/Fem
${CMAKE_BINARY_DIR}/Mod/Fem
InitGui.py

View File

@ -115,7 +115,7 @@ void CmdFemCreateAnalysis::activated(int iMsg)
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Your FreeCAD is build without NETGEN support. Meshing will not work...."));
return;
#endif
#endif
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -177,7 +177,7 @@ void CmdFemAddPart::activated(int iMsg)
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Your FreeCAD is build without NETGEN support. Meshing will not work...."));
return;
#endif
#endif
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -240,7 +240,7 @@ void CmdFemCreateSolver::activated(int iMsg)
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Your FreeCAD is build without NETGEN support. Meshing will not work...."));
return;
#endif
#endif
Fem::FemAnalysis *Analysis;
@ -615,7 +615,7 @@ void DefineNodesCallback(void * ud, SoEventCallback * n)
const SMDS_MeshNode* aNode = aNodeIter->next();
Base::Vector3f vec(aNode->X(),aNode->Y(),aNode->Z());
pt2d = proj(vec);
if (polygon.Contains(Base::Vector2D(pt2d.x, pt2d.y)) == true)
if (polygon.Contains(Base::Vector2D(pt2d.x, pt2d.y)) == true)
IntSet.insert(aNode->GetID());
}
@ -629,7 +629,7 @@ void DefineNodesCallback(void * ud, SoEventCallback * n)
set << "," << *it ;
set << "]";
Gui::Command::openCommand("Place robot");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject('Fem::FemSetNodesObject','NodeSet')");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.ActiveObject.Nodes = %s",set.str().c_str());

View File

@ -30,15 +30,15 @@ namespace FemGui {
class FemSelectionGate : public Gui::SelectionFilterGate
{
public:
enum ElemType {
enum ElemType {
Nothing ,
Node ,
Element ,
NodeElement
NodeElement
};
FemSelectionGate(ElemType type)
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0),Type(type)
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0),Type(type)
{
};

View File

@ -21,4 +21,4 @@
***************************************************************************/
#include "PreCompiled.h"
#include "PreCompiled.h"

View File

@ -43,7 +43,7 @@ using namespace Gui;
TaskAnalysisInfo::TaskAnalysisInfo(Fem::FemAnalysis *pcObject,QWidget *parent)
: TaskBox(Gui::BitmapFactory().pixmap("fem-fem-mesh-create-node-by-poly"),
tr("Nodes set"),
true,
true,
parent),
pcObject(pcObject)
{

View File

@ -49,7 +49,7 @@ namespace Fem{
class FemAnalysis;
}
namespace FemGui {
namespace FemGui {
class ViewProviderFemMesh;

View File

@ -61,7 +61,7 @@ using namespace Gui;
TaskCreateNodeSet::TaskCreateNodeSet(Fem::FemSetNodesObject *pcObject,QWidget *parent)
: TaskBox(Gui::BitmapFactory().pixmap("fem-fem-mesh-create-node-by-poly"),
tr("Nodes set"),
true,
true,
parent),
pcObject(pcObject)
{
@ -77,7 +77,7 @@ TaskCreateNodeSet::TaskCreateNodeSet(Fem::FemSetNodesObject *pcObject,QWidget *p
QObject::connect(ui->toolButton_Pick,SIGNAL(clicked()),this,SLOT(Pick()));
QObject::connect(ui->comboBox,SIGNAL(activated (int)),this,SLOT(SwitchMethod(int)));
// check if the Link to the FemMesh is defined
// check if the Link to the FemMesh is defined
assert(pcObject->FemMesh.getValue<Fem::FemMeshObject*>());
MeshViewProvider = dynamic_cast<ViewProviderFemMesh*>(Gui::Application::Instance->getViewProvider( pcObject->FemMesh.getValue<Fem::FemMeshObject*>()));
assert(MeshViewProvider);
@ -172,7 +172,7 @@ void TaskCreateNodeSet::DefineNodes(const Base::Polygon2D &polygon,const Gui::Vi
const SMDS_MeshNode* aNode = aNodeIter->next();
Base::Vector3f vec(aNode->X(),aNode->Y(),aNode->Z());
pt2d = proj(vec);
if (polygon.Contains(Base::Vector2D(pt2d.x, pt2d.y)) == inner)
if (polygon.Contains(Base::Vector2D(pt2d.x, pt2d.y)) == inner)
tempSet.insert(aNode->GetID());
}

View File

@ -45,7 +45,7 @@ class ViewProvider;
class ViewVolumeProjection;
}
namespace FemGui {
namespace FemGui {
class ViewProviderFemMesh;

View File

@ -81,7 +81,7 @@ bool TaskDlgAnalysis::accept()
// FemSetNodesObject->Nodes.setValues(param->tempSet);
// FemSetNodesObject->recompute();
// //Gui::Document* doc = Gui::Application::Instance->activeDocument();
// //if(doc)
// //if(doc)
// // doc->resetEdit();
// param->MeshViewProvider->resetHighlightNodes();
// FemSetNodesObject->Label.setValue(name->name);
@ -100,7 +100,7 @@ bool TaskDlgAnalysis::reject()
{
//FemSetNodesObject->execute();
// //Gui::Document* doc = Gui::Application::Instance->activeDocument();
// //if(doc)
// //if(doc)
// // doc->resetEdit();
//param->MeshViewProvider->resetHighlightNodes();
//Gui::Command::abortCommand();

View File

@ -51,16 +51,16 @@ public:
virtual bool accept();
/// is called by the framework if the dialog is rejected (Cancel)
virtual bool reject();
/// is called by the framework if the user press the help button
/// is called by the framework if the user press the help button
virtual void helpRequested();
/// returns for Close and Help button
/// returns for Close and Help button
virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const
{ return QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Apply; }
protected:
TaskAnalysisInfo *info;
TaskDriver *driver;
TaskAnalysisInfo *info;
TaskDriver *driver;
Fem::FemAnalysis *FemAnalysis;
};

View File

@ -77,7 +77,7 @@ bool TaskDlgCreateNodeSet::accept()
FemSetNodesObject->Nodes.setValues(param->tempSet);
FemSetNodesObject->recompute();
//Gui::Document* doc = Gui::Application::Instance->activeDocument();
//if(doc)
//if(doc)
// doc->resetEdit();
param->MeshViewProvider->resetHighlightNodes();
FemSetNodesObject->Label.setValue(name->name);
@ -96,7 +96,7 @@ bool TaskDlgCreateNodeSet::reject()
{
FemSetNodesObject->execute();
//Gui::Document* doc = Gui::Application::Instance->activeDocument();
//if(doc)
//if(doc)
// doc->resetEdit();
param->MeshViewProvider->resetHighlightNodes();
Gui::Command::abortCommand();

View File

@ -53,16 +53,16 @@ public:
virtual bool accept();
/// is called by the framework if the dialog is rejected (Cancel)
virtual bool reject();
/// is called by the framework if the user press the help button
/// is called by the framework if the user press the help button
virtual void helpRequested();
/// returns for Close and Help button
/// returns for Close and Help button
virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const
{ return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; }
protected:
TaskCreateNodeSet *param;
TaskObjectName *name;
TaskCreateNodeSet *param;
TaskObjectName *name;
Fem::FemSetNodesObject *FemSetNodesObject;
};

View File

@ -132,7 +132,7 @@ bool TaskDlgMeshShapeNetgen::reject()
{
//FemSetNodesObject->execute();
// //Gui::Document* doc = Gui::Application::Instance->activeDocument();
// //if(doc)
// //if(doc)
// // doc->resetEdit();
//param->MeshViewProvider->resetHighlightNodes();
Gui::Command::abortCommand();

View File

@ -54,15 +54,15 @@ public:
virtual bool accept();
/// is called by the framework if the dialog is rejected (Cancel)
virtual bool reject();
/// is called by the framework if the user press the help button
/// is called by the framework if the user press the help button
virtual void helpRequested();
/// returns for Close and Help button
/// returns for Close and Help button
virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const
{ return QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Apply; }
protected:
TaskTetParameter *param;
TaskTetParameter *param;
Fem::FemMeshShapeNetgenObject *FemMeshShapeNetgenObject;
FemGui::ViewProviderFemMeshShapeNetgen *ViewProviderFemMeshShapeNetgen;

View File

@ -49,7 +49,7 @@ using namespace Gui;
TaskDriver::TaskDriver(Fem::FemAnalysis *pcObject,QWidget *parent)
: TaskBox(Gui::BitmapFactory().pixmap("fem-fem-mesh-create-node-by-poly"),
tr("Nodes set"),
true,
true,
parent),
pcObject(pcObject)
{

View File

@ -51,7 +51,7 @@ namespace Fem{
namespace FemGui {
namespace FemGui {
class TaskDriver : public Gui::TaskView::TaskBox

View File

@ -116,7 +116,7 @@ const std::string TaskFemConstraint::getReferences(const std::vector<std::string
}
const std::string TaskFemConstraint::getScale() const //OvG: Return pre-calculated scale for constraint display
{
{
std::string result;
Fem::Constraint* pcConstraint = static_cast<Fem::Constraint*>(ConstraintView->getObject());
result = boost::lexical_cast<std::string>(pcConstraint->Scale.getValue());

View File

@ -77,7 +77,7 @@ class TaskDlgFemConstraint : public Gui::TaskView::TaskDialog
Q_OBJECT
public:
/// is called the TaskView when the dialog is opened
void open();
/*

View File

@ -73,7 +73,7 @@ public:
private Q_SLOTS:
void onReferenceDeleted(void);
void x_changed(double);
void y_changed(double);
void y_changed(double);
void z_changed(double);
void x_rot(double);
void y_rot(double);
@ -90,7 +90,7 @@ private Q_SLOTS:
void rotfreey(int);
void rotfixz(int);
void rotfreez(int);
void addToSelection();
void removeFromSelection();
void setSelection(QListWidgetItem* item);
@ -102,7 +102,7 @@ private:
//void onSelectionChanged(const Gui::SelectionChanges& msg);
void updateUI();
Ui_TaskFemConstraintDisplacement* ui;
};
class TaskDlgFemConstraintDisplacement : public TaskDlgFemConstraint

View File

@ -357,7 +357,7 @@ bool TaskDlgFemConstraintForce::accept()
if (parameterForce->getForce()<=0)
{
QMessageBox::warning(parameter, tr("Input error"), tr("Please specify a force greater than 0"));
QMessageBox::warning(parameter, tr("Input error"), tr("Please specify a force greater than 0"));
return false;
}
else
@ -378,7 +378,7 @@ bool TaskDlgFemConstraintForce::accept()
}
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %s", name.c_str(), parameterForce->getReverse() ? "True" : "False");
scale = parameterForce->getScale(); //OvG: determine modified scale
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Scale = %s", name.c_str(), scale.c_str()); //OvG: implement modified scale
}

View File

@ -85,7 +85,7 @@ TaskFemConstraintGear::TaskFemConstraintGear(ViewProviderFemConstraint *Constrai
ui->checkReversed->blockSignals(true);
// Get the feature data
Fem::ConstraintGear* pcConstraint = static_cast<Fem::ConstraintGear*>(ConstraintView->getObject());
Fem::ConstraintGear* pcConstraint = static_cast<Fem::ConstraintGear*>(ConstraintView->getObject());
double dia = pcConstraint->Diameter.getValue();
double force = pcConstraint->Force.getValue();
double angle = pcConstraint->ForceAngle.getValue();

View File

@ -256,13 +256,13 @@ bool TaskDlgFemConstraintPressure::accept()
try {
if (parameterPressure->getPressure()<=0)
{
QMessageBox::warning(parameter, tr("Input error"), tr("Please specify a pressure greater than 0"));
QMessageBox::warning(parameter, tr("Input error"), tr("Please specify a pressure greater than 0"));
return false;
}
else
{
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Pressure = %f",
name.c_str(), parameterPressure->getPressure());
name.c_str(), parameterPressure->getPressure());
}
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %s",
name.c_str(), parameterPressure->getReverse() ? "True" : "False");

View File

@ -46,7 +46,7 @@ using namespace Gui;
TaskObjectName::TaskObjectName(App::DocumentObject *pcObject,QWidget *parent)
: TaskBox(Gui::BitmapFactory().pixmap("fem-fem-mesh-create-node-by-poly"),
tr("TaskObjectName"),
true,
true,
parent),
pcObject(pcObject)
{

View File

@ -39,7 +39,7 @@ namespace Gui {
class ViewProvider;
}
namespace FemGui {
namespace FemGui {
@ -56,7 +56,7 @@ public:
private Q_SLOTS:
void TextChanged ( const QString &);
protected:
App::DocumentObject *pcObject;

View File

@ -45,7 +45,7 @@ namespace Fem{
class FemMeshShapeNetgenObject;
}
namespace FemGui {
namespace FemGui {
class ViewProviderFemMeshShapeNetgen;
@ -61,7 +61,7 @@ public:
ViewProviderFemMeshShapeNetgen * MeshViewProvider;
void setInfo(void);
bool touched;
bool touched;
private Q_SLOTS:
void SwitchMethod(int Value);

View File

@ -112,7 +112,7 @@ bool ViewProviderFemAnalysis::setEdit(int ModNum)
// if (padDlg)
// Gui::Control().showDialog(padDlg);
// else
//Fem::FemAnalysis* pcAna = static_cast<Fem::FemAnalysis*>(this->getObject());
//Gui::Control().showDialog(new TaskDlgAnalysis(pcAna));
//return true;
@ -137,11 +137,11 @@ void ViewProviderFemAnalysis::unsetEdit(int ModNum)
bool ViewProviderFemAnalysis::onDelete(const std::vector<std::string> &)
{
//// get the support and Sketch
//PartDesign::Pad* pcPad = static_cast<PartDesign::Pad*>(getObject());
//PartDesign::Pad* pcPad = static_cast<PartDesign::Pad*>(getObject());
//Sketcher::SketchObject *pcSketch = 0;
//App::DocumentObject *pcSupport = 0;
//if (pcPad->Sketch.getValue()){
// pcSketch = static_cast<Sketcher::SketchObject*>(pcPad->Sketch.getValue());
// pcSketch = static_cast<Sketcher::SketchObject*>(pcPad->Sketch.getValue());
// pcSupport = pcSketch->Support.getValue();
//}

View File

@ -189,7 +189,7 @@ std::string ViewProviderFemConstraint::gethideMeshShowPartStr()
bool ViewProviderFemConstraint::setEdit(int ModNum)
{
Gui::Command::doCommand(Gui::Command::Doc,"%s",ViewProviderFemConstraint::gethideMeshShowPartStr().c_str());
Gui::Command::doCommand(Gui::Command::Doc,"%s",ViewProviderFemConstraint::gethideMeshShowPartStr().c_str());
return Gui::ViewProviderGeometryObject::setEdit(ModNum);
}

View File

@ -64,7 +64,7 @@ public:
std::vector<App::DocumentObject*> claimChildren(void)const;
void setupContextMenu(QMenu*, QObject*, const char*);
static std::string gethideMeshShowPartStr();
static std::string gethideMeshShowPartStr(const std::string showConstr);

View File

@ -119,7 +119,7 @@ void ViewProviderFemConstraintBearing::updateData(const App::Property* prop)
pShapeSep->removeAllChildren();
// This should always point outside of the cylinder
Base::Vector3d normal = pcConstraint->NormalDirection.getValue();
Base::Vector3d normal = pcConstraint->NormalDirection.getValue();
Base::Vector3d base = pcConstraint->BasePoint.getValue();
double radius = pcConstraint->Radius.getValue();
base = base + radius * normal;

View File

@ -120,22 +120,22 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop
// Set up the nodes
cpx->matrix.setNum(0);
cpx->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); //OvG: Scaling
cpy->matrix.setNum(0);
cpy->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); //OvG: Scaling
cpz->matrix.setNum(0);
cpz->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); //OvG: Scaling
cprotx->matrix.setNum(0);
cprotx->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); //OvG: Scaling
cproty->matrix.setNum(0);
cproty->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); //OvG: Scaling
cprotz->matrix.setNum(0);
cprotz->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); //OvG: Scaling
pShapeSep->addChild(cpx);
pShapeSep->addChild(cpy);
pShapeSep->addChild(cpz);
@ -156,27 +156,27 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop
cpx = static_cast<SoMultipleCopy*>(pShapeSep->getChild(0));
cpx->matrix.setNum(points.size());
SbMatrix* matricesx = cpx->matrix.startEditing();
cpy = static_cast<SoMultipleCopy*>(pShapeSep->getChild(1));
cpy->matrix.setNum(points.size());
SbMatrix* matricesy = cpy->matrix.startEditing();
cpz = static_cast<SoMultipleCopy*>(pShapeSep->getChild(2));
cpz->matrix.setNum(points.size());
SbMatrix* matricesz = cpz->matrix.startEditing();
cprotx = static_cast<SoMultipleCopy*>(pShapeSep->getChild(3));
cprotx->matrix.setNum(points.size());
SbMatrix* matricesrotx = cprotx->matrix.startEditing();
cproty = static_cast<SoMultipleCopy*>(pShapeSep->getChild(4));
cproty->matrix.setNum(points.size());
SbMatrix* matricesroty = cproty->matrix.startEditing();
cprotz = static_cast<SoMultipleCopy*>(pShapeSep->getChild(5));
cprotz->matrix.setNum(points.size());
SbMatrix* matricesrotz = cprotz->matrix.startEditing();
int idx = 0;
int idy = 0;
int idz = 0;
@ -222,7 +222,7 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop
matricesz[idz] = mz;
idz++;
}
//OvG: Rotation indication
if(!rotxFree)
{
@ -268,7 +268,7 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop
createDisplacement(sepz, scaledheight, scaledwidth); //OvG: Scaling
pShapeSep->addChild(sepz);
}
//OvG: Rotation indication
if(!rotxFree)
{
@ -303,7 +303,7 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop
cprotz->matrix.finishEditing();
#endif
}
// Gets called whenever a property of the attached object changes
ViewProviderFemConstraint::updateData(prop);
}

View File

@ -90,7 +90,7 @@ bool ViewProviderFemConstraintPressure::setEdit(int ModNum)
}
#define ARROWLENGTH (4)
#define ARROWHEADRADIUS (ARROWLENGTH/3)
#define ARROWHEADRADIUS (ARROWLENGTH/3)
//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so disable
void ViewProviderFemConstraintPressure::updateData(const App::Property* prop)
@ -119,7 +119,7 @@ void ViewProviderFemConstraintPressure::updateData(const App::Property* prop)
}
std::vector<Base::Vector3d>::const_iterator n = normals.begin();
#ifdef USE_MULTIPLE_COPY
#ifdef USE_MULTIPLE_COPY
cp = static_cast<SoMultipleCopy*>(pShapeSep->getChild(0)); //OvG: Use top cp
cp->matrix.setNum(points.size());
SbMatrix* matrices = cp->matrix.startEditing();

View File

@ -73,7 +73,7 @@ using namespace FemGui;
struct FemFace
{
const SMDS_MeshNode *Nodes[8];
unsigned long ElementNumber;
unsigned long ElementNumber;
const SMDS_MeshElement* Element;
unsigned short Size;
unsigned short FaceNo;
@ -103,7 +103,7 @@ Base::Vector3d FemFace::set(short size,const SMDS_MeshElement* element,unsigned
Nodes[7] = n8;
Element = element;
ElementNumber = id;
ElementNumber = id;
Size = size;
FaceNo = faceNo;
hide = false;
@ -135,7 +135,7 @@ public:
//FemFaceGridItem(void){reserve(200);}
};
bool FemFace::isSameFace (FemFace &face)
bool FemFace::isSameFace (FemFace &face)
{
// the same element can not have the same face
if(face.ElementNumber == ElementNumber)
@ -266,7 +266,7 @@ void ViewProviderFemMesh::attach(App::DocumentObject *pcObj)
SoMaterial *pcAnoMaterial = new SoMaterial;
pcAnoMaterial->diffuseColor.setValue(0,1,0);
pcAnoMaterial->emissiveColor.setValue(0,1,0);
pcAnotRoot->addChild(pcAnoMaterial);
pcAnotRoot->addChild(pcAnoMaterial);
pcAnotRoot->addChild(pcAnoStyle);
pcAnotRoot->addChild(pcAnoCoords);
SoPointSet *pointset = new SoPointSet;
@ -299,7 +299,7 @@ void ViewProviderFemMesh::attach(App::DocumentObject *pcObj)
// Points
SoGroup* pcPointsRoot = new SoSeparator();
pcPointsRoot->addChild(pcPointMaterial);
pcPointsRoot->addChild(pcPointMaterial);
pcPointsRoot->addChild(pcPointStyle);
pcPointsRoot->addChild(pcCoords);
pointset = new SoPointSet;
@ -501,7 +501,7 @@ PyObject * ViewProviderFemMesh::getPyObject()
// ref counter is set to 1
PythonObject = Py::Object(new ViewProviderFemMeshPy(this),true);
}
return Py::new_reference_to(PythonObject);
return Py::new_reference_to(PythonObject);
}
void ViewProviderFemMesh::setColorByNodeId(const std::map<long,App::Color> &NodeColorMap)
@ -519,7 +519,7 @@ void ViewProviderFemMesh::setColorByNodeId(const std::map<long,App::Color> &Node
void ViewProviderFemMesh::setColorByNodeId(const std::vector<long> &NodeIds,const std::vector<App::Color> &NodeColors)
{
long startId = *(std::min_element(NodeIds.begin(), NodeIds.end()));
long startId = *(std::min_element(NodeIds.begin(), NodeIds.end()));
long endId = *(std::max_element(NodeIds.begin(), NodeIds.end()));
std::vector<App::Color> colorVec(endId-startId+2,App::Color(0,1,0));
@ -574,7 +574,7 @@ void ViewProviderFemMesh::setDisplacementByNodeId(const std::map<long,Base::Vect
void ViewProviderFemMesh::setDisplacementByNodeId(const std::vector<long> &NodeIds,const std::vector<Base::Vector3d> &NodeDisps)
{
long startId = *(std::min_element(NodeIds.begin(), NodeIds.end()));
long startId = *(std::min_element(NodeIds.begin(), NodeIds.end()));
long endId = *(std::max_element(NodeIds.begin(), NodeIds.end()));
std::vector<Base::Vector3d> vecVec(endId-startId+2,Base::Vector3d());
@ -709,12 +709,12 @@ inline unsigned long ElemFold(unsigned long Element,unsigned long FaceNbr)
return t2;
}
void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
SoCoordinate3* coords,
void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
SoCoordinate3* coords,
SoIndexedFaceSet* faces,
SoIndexedLineSet* lines,
std::vector<unsigned long> &vFaceElementIdx,
std::vector<unsigned long> &vNodeElementIdx,
SoIndexedLineSet* lines,
std::vector<unsigned long> &vFaceElementIdx,
std::vector<unsigned long> &vNodeElementIdx,
bool &onlyEdges,
bool ShowInner) const
{
@ -726,7 +726,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
int numFaces = data->NbFaces();
int numNodes = data->NbNodes();
int numEdges = data->NbEdges();
if(numFaces+numNodes+numEdges == 0) return;
Base::TimeInfo Start;
Base::Console().Log("Start: ViewProviderFEMMeshBuilder::createMesh() =================================\n");
@ -734,7 +734,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
const SMDS_MeshInfo& info = data->GetMeshInfo();
int numTria = info.NbTriangles();
int numQuad = info.NbQuadrangles();
int numVolu = info.NbVolumes();
int numTetr = info.NbTetras();
int numHexa = info.NbHexas();
@ -757,7 +757,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
if (numFaces <= 0 && numVolu <= 0 && numEdges > 0){
onlyEdges = true;
}
std::vector<FemFace> facesHelper(numTries);
Base::Console().Log(" %f: Start build up %i face helper\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo()),facesHelper.size());
@ -841,7 +841,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 4, aVol->GetNode(1), aVol->GetNode(4), aVol->GetNode(5), aVol->GetNode(2)));
BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 5, aVol->GetNode(2), aVol->GetNode(5), aVol->GetNode(3), aVol->GetNode(0)));
break;
//hexa8 volume
//hexa8 volume
case 8:
// face 1 = N1, N2, N3, N4
// face 2 = N5, N8, N7, N6
@ -919,7 +919,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
if( FaceSize < 5000){
Base::Console().Log(" %f: Start eliminate internal faces SIMPLE\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo()));
// search for double (inside) faces and hide them
if(!ShowInner){
for(int l=0; l< FaceSize;l++){
@ -972,7 +972,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
if(iX >= NbrX || iY >= NbrY || iZ >= NbrZ)
Base::Console().Log(" Outof range!\n");
Grid[iX + iY*NbrX + iZ*NbrX*NbrY].push_back(&facesHelper[l]);
}
@ -991,7 +991,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
avg += it->size();
}
avg = avg/Grid.size();
Base::Console().Log(" VoxelSize: Max:%i ,Average:%i\n",max,avg);
} //if( FaceSize < 1000)
@ -1058,7 +1058,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
}
}
Base::Console().Log(" NumTriangles:%i\n",triangleCount);
// edge map collect and sort edges of the faces to be shown.
// edge map collect and sort edges of the faces to be shown.
std::map<int,std::set<int> > EdgeMap;
// handling the corner case beams only, means no faces/triangles only nodes and edges

View File

@ -30,9 +30,9 @@
#include <CXX/Objects.hxx>
class SoCoordinate3;
class SoDrawStyle;
class SoIndexedFaceSet;
class SoIndexedLineSet;
class SoDrawStyle;
class SoIndexedFaceSet;
class SoIndexedLineSet;
class SoShapeHints;
class SoMaterialBinding;
@ -45,8 +45,8 @@ public:
ViewProviderFEMMeshBuilder(){}
virtual ~ViewProviderFEMMeshBuilder(){}
virtual void buildNodes(const App::Property*, std::vector<SoNode*>&) const;
void createMesh(const App::Property*,
SoCoordinate3*,
void createMesh(const App::Property*,
SoCoordinate3*,
SoIndexedFaceSet*,
SoIndexedLineSet*,
std::vector<unsigned long>&,
@ -82,7 +82,7 @@ public:
/** @name Selection handling
* This group of methodes do the selection handling.
* Here you can define how the selection for your ViewProvider
* works.
* works.
*/
//@{
/// indicates if the ViewProvider use the new Selection model
@ -94,10 +94,10 @@ public:
virtual std::vector<Base::Vector3d> getSelectionShape(const char* Element) const;
//@}
// interface methodes
// interface methodes
void setHighlightNodes(const std::set<long>&);
void resetHighlightNodes(void);
/** @name Postprocessing
* this interfaces apply post processing stuff to the View-
* Provider. They can override the positioning and the color

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="ViewProviderPy"
Name="ViewProviderFemMeshPy"
Twin="ViewProviderFemMesh"
TwinPointer="ViewProviderFemMesh"
Include="Mod/Fem/Gui/ViewProviderFemMesh.h"
Namespace="FemGui"
FatherInclude="Gui/ViewProviderPy.h"
<PythonExport
Father="ViewProviderPy"
Name="ViewProviderFemMeshPy"
Twin="ViewProviderFemMesh"
TwinPointer="ViewProviderFemMesh"
Include="Mod/Fem/Gui/ViewProviderFemMesh.h"
Namespace="FemGui"
FatherInclude="Gui/ViewProviderPy.h"
FatherNamespace="Gui"
Constructor="false"
Delete="false">

View File

@ -44,8 +44,8 @@ App::Color calcColor(double value,double min, double max)
if (max < 0) max = 0;
if (min > 0) min = 0;
if (value < min)
return App::Color (0.0,0.0,1.0);
if (value < min)
return App::Color (0.0,0.0,1.0);
if (value > max)
return App::Color (1.0,0.0,0.0);
if (value == 0.0)
@ -281,7 +281,7 @@ PyObject *ViewProviderFemMeshPy::getCustomAttributes(const char* /*attr*/) const
int ViewProviderFemMeshPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
{
return 0;
return 0;
}

View File

@ -43,5 +43,5 @@ ViewProviderFemMeshShape::ViewProviderFemMeshShape()
ViewProviderFemMeshShape::~ViewProviderFemMeshShape()
{
}

View File

@ -29,9 +29,9 @@
#include <Gui/ViewProviderPythonFeature.h>
class SoCoordinate3;
class SoDrawStyle;
class SoIndexedFaceSet;
class SoIndexedLineSet;
class SoDrawStyle;
class SoIndexedFaceSet;
class SoIndexedLineSet;
class SoShapeHints;
class SoMaterialBinding;

View File

@ -70,7 +70,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
<< "Fem_ConstraintForce"
<< "Fem_ConstraintPressure"
<< "Fem_ConstraintBearing"
<< "Fem_ConstraintGear"
<< "Fem_ConstraintGear"
<< "Fem_ConstraintPulley"
<< "Separator"
<< "Fem_SolverJobControl"
@ -102,7 +102,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Fem_ConstraintForce"
<< "Fem_ConstraintPressure"
<< "Fem_ConstraintBearing"
<< "Fem_ConstraintGear"
<< "Fem_ConstraintGear"
<< "Fem_ConstraintPulley"
<< "Separator"
<< "Fem_SolverJobControl"

View File

@ -47,4 +47,4 @@ protected:
} // namespace FemGui
#endif // IMAGE_WORKBENCH_H
#endif // IMAGE_WORKBENCH_H