Console: rename PascalCase named methods to camelCase

This commit is contained in:
bofdahof
2025-03-30 00:50:27 +10:00
committed by Kacper Donat
parent 1dbc0638c3
commit ba2c2ca5ad
497 changed files with 2423 additions and 2425 deletions

View File

@@ -87,7 +87,7 @@ PyMOD_INIT_FUNC(Fem)
PyMOD_Return(nullptr);
}
PyObject* femModule = Fem::initModule();
Base::Console().Log("Loading Fem module... done\n");
Base::Console().log("Loading Fem module... done\n");
// clang-format off
Fem::StdMeshers_Arithmetic1DPy ::init_type(femModule);

View File

@@ -131,8 +131,8 @@ void ConstraintFluidBoundary::onChanged(const App::Property* prop)
Subtype.setEnums(OutletSubtypes);
}
else {
Base::Console().Message(boundaryType.c_str());
Base::Console().Message(" Error: this boundaryType is not defined\n");
Base::Console().message(boundaryType.c_str());
Base::Console().message(" Error: this boundaryType is not defined\n");
}
// must set a default (0 or 1) as freestream has only 2 subtypes

View File

@@ -572,7 +572,7 @@ std::set<int> FemMesh::getNodesBySolid(const TopoDS_Solid& solid) const
TopAbs_ShapeEnum shapetype = TopAbs_SHAPE;
ShapeAnalysis_ShapeTolerance analysis;
double limit = analysis.Tolerance(solid, 1, shapetype);
Base::Console().Log("The limit if a node is in or out: %.12lf in scientific: %.4e \n",
Base::Console().log("The limit if a node is in or out: %.12lf in scientific: %.4e \n",
limit,
limit);
@@ -971,7 +971,7 @@ public:
meshds->AddFaceWithID(n0, n1, n2, element_id);
}
else {
Base::Console().Warning("NASTRAN: Failed to add face %d from nodes: (%d, %d, %d,)\n",
Base::Console().warning("NASTRAN: Failed to add face %d from nodes: (%d, %d, %d,)\n",
element_id,
elements[0],
elements[1],
@@ -1038,7 +1038,7 @@ public:
meshds->AddVolumeWithID(n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, element_id);
}
else {
Base::Console().Warning("NASTRAN: Failed to add volume %d from nodes: (%d, %d, %d, %d, "
Base::Console().warning("NASTRAN: Failed to add volume %d from nodes: (%d, %d, %d, %d, "
"%d, %d, %d, %d, %d, %d)\n",
element_id,
elements[1],
@@ -1299,7 +1299,7 @@ class CHEXA2Element: public NastranElement
void FemMesh::readNastran(const std::string& Filename)
{
Base::TimeElapsed Start;
Base::Console().Log("Start: FemMesh::readNastran() =================================\n");
Base::Console().log("Start: FemMesh::readNastran() =================================\n");
_Mtrx = Base::Matrix4D();
@@ -1375,7 +1375,7 @@ void FemMesh::readNastran(const std::string& Filename)
} while (inputfile.good());
inputfile.close();
Base::Console().Log(" %f: File read, start building mesh\n",
Base::Console().log(" %f: File read, start building mesh\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// Now fill the SMESH datastructure
@@ -1386,14 +1386,14 @@ void FemMesh::readNastran(const std::string& Filename)
it->addToMesh(meshds);
}
Base::Console().Log(" %f: Done \n",
Base::Console().log(" %f: Done \n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
}
void FemMesh::readNastran95(const std::string& Filename)
{
Base::TimeElapsed Start;
Base::Console().Log("Start: FemMesh::readNastran95() =================================\n");
Base::Console().log("Start: FemMesh::readNastran95() =================================\n");
_Mtrx = Base::Matrix4D();
@@ -1428,7 +1428,7 @@ void FemMesh::readNastran95(const std::string& Filename)
}
else if (line1.find("GRID") != std::string::npos) // We found a Grid line
{
// Base::Console().Log("Found a GRID\n");
// Base::Console().log("Found a GRID\n");
// D06.inp
// GRID 109 .9 .7
// Now lets extract the GRID Points = Nodes
@@ -1502,7 +1502,7 @@ void FemMesh::readNastran95(const std::string& Filename)
} while (inputfile.good());
inputfile.close();
Base::Console().Log(" %f: File read, start building mesh\n",
Base::Console().log(" %f: File read, start building mesh\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// Now fill the SMESH datastructure
@@ -1517,14 +1517,14 @@ void FemMesh::readNastran95(const std::string& Filename)
it->addToMesh(meshds);
}
Base::Console().Log(" %f: Done \n",
Base::Console().log(" %f: Done \n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
}
void FemMesh::readAbaqus(const std::string& FileName)
{
Base::TimeElapsed Start;
Base::Console().Log("Start: FemMesh::readAbaqus() =================================\n");
Base::Console().log("Start: FemMesh::readAbaqus() =================================\n");
/*
Python command to read Abaqus inp mesh file from test suite:
@@ -1557,14 +1557,14 @@ void FemMesh::readAbaqus(const std::string& FileName)
catch (Py::Exception& e) {
e.clear();
}
Base::Console().Log(" %f: Done \n",
Base::Console().log(" %f: Done \n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
}
void FemMesh::readZ88(const std::string& FileName)
{
Base::TimeElapsed Start;
Base::Console().Log("Start: FemMesh::readZ88() =================================\n");
Base::Console().log("Start: FemMesh::readZ88() =================================\n");
/*
Python command to read Z88 mesh file from test suite:
@@ -1597,7 +1597,7 @@ void FemMesh::readZ88(const std::string& FileName)
catch (Py::Exception& e) {
e.clear();
}
Base::Console().Log(" %f: Done \n",
Base::Console().log(" %f: Done \n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
}
@@ -2226,7 +2226,7 @@ void FemMesh::writeABAQUS(const std::string& Filename,
void FemMesh::writeZ88(const std::string& FileName) const
{
Base::TimeElapsed Start;
Base::Console().Log("Start: FemMesh::writeZ88() =================================\n");
Base::Console().log("Start: FemMesh::writeZ88() =================================\n");
/*
Python command to export FemMesh from StartWB FEM 3D example:
@@ -2258,41 +2258,41 @@ void FemMesh::write(const char* FileName) const
Base::FileInfo File(FileName);
if (File.hasExtension("unv")) {
Base::Console().Log("FEM mesh object will be exported to unv format.\n");
Base::Console().log("FEM mesh object will be exported to unv format.\n");
// write UNV file
myMesh->ExportUNV(File.filePath().c_str());
}
else if (File.hasExtension("med")) {
Base::Console().Log("FEM mesh object will be exported to med format.\n");
Base::Console().log("FEM mesh object will be exported to med format.\n");
myMesh->ExportMED(File.filePath().c_str(),
File.fileNamePure().c_str(),
false,
2); // 2 means MED_V2_2 version!
}
else if (File.hasExtension("stl")) {
Base::Console().Log("FEM mesh object will be exported to stl format.\n");
Base::Console().log("FEM mesh object will be exported to stl format.\n");
// export to stl file
myMesh->ExportSTL(File.filePath().c_str(), false);
}
else if (File.hasExtension("dat")) {
Base::Console().Log("FEM mesh object will be exported to dat format.\n");
Base::Console().log("FEM mesh object will be exported to dat format.\n");
// export to dat file
myMesh->ExportDAT(File.filePath().c_str());
}
else if (File.hasExtension("inp")) {
Base::Console().Log("FEM mesh object will be exported to inp format.\n");
Base::Console().log("FEM mesh object will be exported to inp format.\n");
// write ABAQUS Output
writeABAQUS(File.filePath(), 1, false);
}
#ifdef FC_USE_VTK
else if (File.hasExtension({"vtk", "vtu"})) {
Base::Console().Log("FEM mesh object will be exported to either vtk or vtu format.\n");
Base::Console().log("FEM mesh object will be exported to either vtk or vtu format.\n");
// write unstructure mesh to VTK format *.vtk and *.vtu
writeVTK(File.filePath().c_str());
}
#endif
else if (File.hasExtension("z88")) {
Base::Console().Log("FEM mesh object will be exported to z88 format.\n");
Base::Console().log("FEM mesh object will be exported to z88 format.\n");
// write z88 file
writeZ88(File.filePath());
}

View File

@@ -131,7 +131,7 @@ App::DocumentObjectExecReturn* FemMeshShapeNetgenObject::execute()
// int numPris = info.NbPrisms();
// int numHedr = info.NbPolyhedrons();
Base::Console().Log("NetgenMesh: %i Nodes, %i Volumes, %i Faces\n", numNode, numVolu, numFaces);
Base::Console().log("NetgenMesh: %i Nodes, %i Volumes, %i Faces\n", numNode, numVolu, numFaces);
FemMesh.setValue(newMesh);
return App::DocumentObject::StdReturn;

View File

@@ -633,11 +633,11 @@ unsigned int FemPostPipeline::getFrameNumber()
void FemPostPipeline::load(FemResultObject* res)
{
if (!res->Mesh.getValue()) {
Base::Console().Log("Result mesh object is empty.\n");
Base::Console().log("Result mesh object is empty.\n");
return;
}
if (!res->Mesh.getValue()->isDerivedFrom<Fem::FemMeshObject>()) {
Base::Console().Log("Result mesh object is not derived from Fem::FemMeshObject.\n");
Base::Console().log("Result mesh object is not derived from Fem::FemMeshObject.\n");
return;
}

View File

@@ -155,8 +155,8 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer<vtkDataSet> dataset, FemMesh* me
{
const vtkIdType nPoints = dataset->GetNumberOfPoints();
const vtkIdType nCells = dataset->GetNumberOfCells();
Base::Console().Log("%d nodes/points and %d cells/elements found!\n", nPoints, nCells);
Base::Console().Log("Build SMESH mesh out of the vtk mesh data.\n", nPoints, nCells);
Base::Console().log("%d nodes/points and %d cells/elements found!\n", nPoints, nCells);
Base::Console().log("Build SMESH mesh out of the vtk mesh data.\n", nPoints, nCells);
// Now fill the SMESH datastructure
SMESH_Mesh* smesh = mesh->getSMesh();
@@ -295,7 +295,7 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer<vtkDataSet> dataset, FemMesh* me
// not handled cases
default: {
Base::Console().Error(
Base::Console().error(
"Only common 1D, 2D and 3D Cells are supported in VTK mesh import\n");
break;
}
@@ -306,13 +306,13 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer<vtkDataSet> dataset, FemMesh* me
FemMesh* FemVTKTools::readVTKMesh(const char* filename, FemMesh* mesh)
{
Base::TimeElapsed Start;
Base::Console().Log("Start: read FemMesh from VTK unstructuredGrid ======================\n");
Base::Console().log("Start: read FemMesh from VTK unstructuredGrid ======================\n");
Base::FileInfo f(filename);
if (f.hasExtension("vtu")) {
vtkSmartPointer<vtkDataSet> dataset = readVTKFile<vtkXMLUnstructuredGridReader>(filename);
if (!dataset.Get()) {
Base::Console().Error("Failed to load file %s\n", filename);
Base::Console().error("Failed to load file %s\n", filename);
return nullptr;
}
importVTKMesh(dataset, mesh);
@@ -320,7 +320,7 @@ FemMesh* FemVTKTools::readVTKMesh(const char* filename, FemMesh* mesh)
else if (f.hasExtension("pvtu")) {
vtkSmartPointer<vtkDataSet> dataset = readVTKFile<vtkXMLPUnstructuredGridReader>(filename);
if (!dataset.Get()) {
Base::Console().Error("Failed to load file %s\n", filename);
Base::Console().error("Failed to load file %s\n", filename);
return nullptr;
}
importVTKMesh(dataset, mesh);
@@ -328,18 +328,18 @@ FemMesh* FemVTKTools::readVTKMesh(const char* filename, FemMesh* mesh)
else if (f.hasExtension("vtk")) {
vtkSmartPointer<vtkDataSet> dataset = readVTKFile<vtkDataSetReader>(filename);
if (!dataset.Get()) {
Base::Console().Error("Failed to load file %s\n", filename);
Base::Console().error("Failed to load file %s\n", filename);
return nullptr;
}
importVTKMesh(dataset, mesh);
}
else {
Base::Console().Error("file name extension is not supported\n");
Base::Console().error("file name extension is not supported\n");
return nullptr;
}
// Mesh should link to the part feature, in order to set up FemConstraint
Base::Console().Log(" %f: Done \n",
Base::Console().log(" %f: Done \n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
return mesh;
}
@@ -348,7 +348,7 @@ void exportFemMeshEdges(vtkSmartPointer<vtkCellArray>& elemArray,
std::vector<int>& types,
const SMDS_EdgeIteratorPtr& aEdgeIter)
{
Base::Console().Log(" Start: VTK mesh builder edges.\n");
Base::Console().log(" Start: VTK mesh builder edges.\n");
while (aEdgeIter->more()) {
const SMDS_MeshEdge* aEdge = aEdgeIter->next();
@@ -365,14 +365,14 @@ void exportFemMeshEdges(vtkSmartPointer<vtkCellArray>& elemArray,
}
}
Base::Console().Log(" End: VTK mesh builder edges.\n");
Base::Console().log(" End: VTK mesh builder edges.\n");
}
void exportFemMeshFaces(vtkSmartPointer<vtkCellArray>& elemArray,
std::vector<int>& types,
const SMDS_FaceIteratorPtr& aFaceIter)
{
Base::Console().Log(" Start: VTK mesh builder faces.\n");
Base::Console().log(" Start: VTK mesh builder faces.\n");
while (aFaceIter->more()) {
const SMDS_MeshFace* aFace = aFaceIter->next();
@@ -397,14 +397,14 @@ void exportFemMeshFaces(vtkSmartPointer<vtkCellArray>& elemArray,
}
}
Base::Console().Log(" End: VTK mesh builder faces.\n");
Base::Console().log(" End: VTK mesh builder faces.\n");
}
void exportFemMeshCells(vtkSmartPointer<vtkCellArray>& elemArray,
std::vector<int>& types,
const SMDS_VolumeIteratorPtr& aVolIter)
{
Base::Console().Log(" Start: VTK mesh builder volumes.\n");
Base::Console().log(" Start: VTK mesh builder volumes.\n");
while (aVolIter->more()) {
const SMDS_MeshVolume* aVol = aVolIter->next();
@@ -438,7 +438,7 @@ void exportFemMeshCells(vtkSmartPointer<vtkCellArray>& elemArray,
}
}
Base::Console().Log(" End: VTK mesh builder volumes.\n");
Base::Console().log(" End: VTK mesh builder volumes.\n");
}
void FemVTKTools::exportVTKMesh(const FemMesh* mesh,
@@ -447,12 +447,12 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh,
float scale)
{
Base::Console().Log("Start: VTK mesh builder ======================\n");
Base::Console().log("Start: VTK mesh builder ======================\n");
const SMESH_Mesh* smesh = mesh->getSMesh();
const SMESHDS_Mesh* meshDS = smesh->GetMeshDS();
// nodes
Base::Console().Log(" Start: VTK mesh builder nodes.\n");
Base::Console().log(" Start: VTK mesh builder nodes.\n");
vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
SMDS_NodeIteratorPtr aNodeIter = meshDS->nodesIterator();
@@ -472,10 +472,10 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh,
grid->SetPoints(points);
// nodes debugging
const SMDS_MeshInfo& info = meshDS->GetMeshInfo();
Base::Console().Log(" Size of nodes in SMESH grid: %i.\n", info.NbNodes());
Base::Console().log(" Size of nodes in SMESH grid: %i.\n", info.NbNodes());
const vtkIdType nNodes = grid->GetNumberOfPoints();
Base::Console().Log(" Size of nodes in VTK grid: %i.\n", nNodes);
Base::Console().Log(" End: VTK mesh builder nodes.\n");
Base::Console().log(" Size of nodes in VTK grid: %i.\n", nNodes);
Base::Console().log(" End: VTK mesh builder nodes.\n");
vtkSmartPointer<vtkCellArray> elemArray = vtkSmartPointer<vtkCellArray>::New();
std::vector<int> types;
@@ -512,19 +512,19 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh,
grid->SetCells(types.data(), elemArray);
}
Base::Console().Log("End: VTK mesh builder ======================\n");
Base::Console().log("End: VTK mesh builder ======================\n");
}
void FemVTKTools::writeVTKMesh(const char* filename, const FemMesh* mesh, bool highest)
{
Base::TimeElapsed Start;
Base::Console().Log("Start: write FemMesh from VTK unstructuredGrid ======================\n");
Base::Console().log("Start: write FemMesh from VTK unstructuredGrid ======================\n");
Base::FileInfo f(filename);
vtkSmartPointer<vtkUnstructuredGrid> grid = vtkSmartPointer<vtkUnstructuredGrid>::New();
exportVTKMesh(mesh, grid, highest);
Base::Console().Log("Start: writing mesh data ======================\n");
Base::Console().log("Start: writing mesh data ======================\n");
if (f.hasExtension("vtu")) {
writeVTKFile<vtkXMLUnstructuredGridWriter>(filename, grid);
}
@@ -532,10 +532,10 @@ void FemVTKTools::writeVTKMesh(const char* filename, const FemMesh* mesh, bool h
writeVTKFile<vtkDataSetWriter>(filename, grid);
}
else {
Base::Console().Error("file name extension is not supported to write VTK\n");
Base::Console().error("file name extension is not supported to write VTK\n");
}
Base::Console().Log(" %f: Done \n",
Base::Console().log(" %f: Done \n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
}
@@ -544,7 +544,7 @@ App::DocumentObject* getObjectByType(const Base::Type type)
{
App::Document* pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc) {
Base::Console().Message("No active document is found thus created\n");
Base::Console().message("No active document is found thus created\n");
pcDoc = App::GetApplication().newDocument();
}
App::DocumentObject* obj = pcDoc->getActiveObject();
@@ -568,7 +568,7 @@ App::DocumentObject* createObjectByType(const Base::Type type)
{
App::Document* pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc) {
Base::Console().Message("No active document is found thus created\n");
Base::Console().message("No active document is found thus created\n");
pcDoc = App::GetApplication().newDocument();
}
App::DocumentObject* obj = pcDoc->getActiveObject();
@@ -587,7 +587,7 @@ App::DocumentObject* createObjectByType(const Base::Type type)
App::DocumentObject* FemVTKTools::readResult(const char* filename, App::DocumentObject* res)
{
Base::TimeElapsed Start;
Base::Console().Log(
Base::Console().log(
"Start: read FemResult with FemMesh from VTK file ======================\n");
Base::FileInfo f(filename);
@@ -599,12 +599,12 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document
ds = readVTKFile<vtkDataSetReader>(filename);
}
else {
Base::Console().Error("file name extension is not supported\n");
Base::Console().error("file name extension is not supported\n");
}
App::Document* pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc) {
Base::Console().Message("No active document is found thus created\n");
Base::Console().message("No active document is found thus created\n");
pcDoc = App::GetApplication().newDocument();
}
App::DocumentObject* obj = pcDoc->getActiveObject();
@@ -613,13 +613,13 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document
App::DocumentObject* result = nullptr;
if (res) {
Base::Console().Message(
Base::Console().message(
"FemResultObject pointer is NULL, trying to get the active object\n");
if (obj->getTypeId() == Base::Type::fromName("Fem::FemResultObjectPython")) {
result = obj;
}
else {
Base::Console().Message("the active object is not the correct type, do nothing\n");
Base::Console().message("the active object is not the correct type, do nothing\n");
return nullptr;
}
}
@@ -642,9 +642,9 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document
}
pcDoc->recompute();
Base::Console().Log(" %f: Done \n",
Base::Console().log(" %f: Done \n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
Base::Console().Log("End: read FemResult with FemMesh from VTK file ======================\n");
Base::Console().log("End: read FemResult with FemMesh from VTK file ======================\n");
return result;
}
@@ -655,18 +655,18 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r
if (!res) {
App::Document* pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc) {
Base::Console().Message("No active document is found thus do nothing and return\n");
Base::Console().message("No active document is found thus do nothing and return\n");
return;
}
res = pcDoc->getActiveObject(); // type checking is done by caller
}
if (!res) {
Base::Console().Error("Result object pointer is invalid and it is not active object");
Base::Console().error("Result object pointer is invalid and it is not active object");
return;
}
Base::TimeElapsed Start;
Base::Console().Log("Start: write FemResult to VTK unstructuredGrid dataset =======\n");
Base::Console().log("Start: write FemResult to VTK unstructuredGrid dataset =======\n");
Base::FileInfo f(filename);
// mesh
@@ -677,7 +677,7 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r
static_cast<PropertyFemMesh*>(mesh->getPropertyByName("FemMesh"))->getValue();
FemVTKTools::exportVTKMesh(&fmesh, grid);
Base::Console().Log(" %f: vtk mesh builder finished\n",
Base::Console().log(" %f: vtk mesh builder finished\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// result
@@ -690,12 +690,12 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r
writeVTKFile<vtkDataSetWriter>(filename, grid);
}
else {
Base::Console().Error("file name extension is not supported to write VTK\n");
Base::Console().error("file name extension is not supported to write VTK\n");
}
Base::Console().Log(" %f: writing result object to vtk finished\n",
Base::Console().log(" %f: writing result object to vtk finished\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
Base::Console().Log("End: write FemResult to VTK unstructuredGrid dataset =======\n");
Base::Console().log("End: write FemResult to VTK unstructuredGrid dataset =======\n");
}
@@ -779,7 +779,7 @@ std::map<std::string, std::string> _getFreeCADMechResultScalarProperties()
void FemVTKTools::importFreeCADResult(vtkSmartPointer<vtkDataSet> dataset,
App::DocumentObject* result)
{
Base::Console().Log("Start: import vtk result file data into a FreeCAD result object.\n");
Base::Console().log("Start: import vtk result file data into a FreeCAD result object.\n");
std::map<std::string, std::string> vectors = _getFreeCADMechResultVectorProperties();
std::map<std::string, std::string> scalars = _getFreeCADMechResultScalarProperties();
@@ -789,7 +789,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer<vtkDataSet> dataset,
vtkSmartPointer<vtkPointData> pd = dataset->GetPointData();
if (pd->GetNumberOfArrays() == 0) {
Base::Console().Error("No point data array is found in vtk data set, do nothing\n");
Base::Console().error("No point data array is found in vtk data set, do nothing\n");
// if pointData is empty, data may be in cellDate,
// cellData -> pointData interpolation is possible in VTK
return;
@@ -803,7 +803,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer<vtkDataSet> dataset,
}
static_cast<App::PropertyIntegerList*>(result->getPropertyByName("NodeNumbers"))
->setValues(nodeIds);
Base::Console().Log(" NodeNumbers have been filled with values.\n");
Base::Console().log(" NodeNumbers have been filled with values.\n");
// vectors
for (const auto& it : vectors) {
@@ -822,18 +822,18 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer<vtkDataSet> dataset,
}
// PropertyVectorList will not show up in PropertyEditor
vector_list->setValues(vec);
Base::Console().Log(" A PropertyVectorList has been filled with values: %s\n",
Base::Console().log(" A PropertyVectorList has been filled with values: %s\n",
it.first.c_str());
}
else {
Base::Console().Error("static_cast<App::PropertyVectorList*>((result->"
Base::Console().error("static_cast<App::PropertyVectorList*>((result->"
"getPropertyByName(\"%s\")) failed.\n",
it.first.c_str());
continue;
}
}
else {
Base::Console().Message(" PropertyVectorList NOT found in vkt file data: %s\n",
Base::Console().message(" PropertyVectorList NOT found in vkt file data: %s\n",
it.first.c_str());
}
}
@@ -845,7 +845,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer<vtkDataSet> dataset,
App::PropertyFloatList* field = static_cast<App::PropertyFloatList*>(
result->getPropertyByName(scalar.first.c_str()));
if (!field) {
Base::Console().Error("static_cast<App::PropertyFloatList*>((result->"
Base::Console().error("static_cast<App::PropertyFloatList*>((result->"
"getPropertyByName(\"%s\")) failed.\n",
scalar.first.c_str());
continue;
@@ -864,11 +864,11 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer<vtkDataSet> dataset,
}
}
field->setValues(values);
Base::Console().Log(" A PropertyFloatList has been filled with vales: %s\n",
Base::Console().log(" A PropertyFloatList has been filled with vales: %s\n",
scalar.first.c_str());
}
else {
Base::Console().Message(" PropertyFloatList NOT found in vkt file data %s\n",
Base::Console().message(" PropertyFloatList NOT found in vkt file data %s\n",
scalar.first.c_str());
}
}
@@ -876,14 +876,14 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer<vtkDataSet> dataset,
// stats
// stats are added by importVTKResults
Base::Console().Log("End: import vtk result file data into a FreeCAD result object.\n");
Base::Console().log("End: import vtk result file data into a FreeCAD result object.\n");
}
void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result,
vtkSmartPointer<vtkDataSet> grid)
{
Base::Console().Log("Start: Create VTK result data from FreeCAD result data.\n");
Base::Console().log("Start: Create VTK result data from FreeCAD result data.\n");
std::map<std::string, std::string> vectors = _getFreeCADMechResultVectorProperties();
std::map<std::string, std::string> scalars = _getFreeCADMechResultScalarProperties();
@@ -897,7 +897,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result,
// filled with points. Then the mapping must be correct)
App::DocumentObject* meshObj = res->Mesh.getValue();
if (!meshObj || !meshObj->isDerivedFrom<FemMeshObject>()) {
Base::Console().Error("Result object does not correctly link to mesh");
Base::Console().error("Result object does not correctly link to mesh");
return;
}
const SMESH_Mesh* smesh = static_cast<FemMeshObject*>(meshObj)->FemMesh.getValue().getSMesh();
@@ -916,7 +916,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result,
field = static_cast<App::PropertyVectorList*>(res->getPropertyByName(it.first.c_str()));
}
else {
Base::Console().Error(" PropertyVectorList not found: %s\n", it.first.c_str());
Base::Console().error(" PropertyVectorList not found: %s\n", it.first.c_str());
}
if (field && field->getSize() > 0) {
@@ -950,13 +950,13 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result,
data->SetTuple(node->GetID() - 1, tuple);
}
grid->GetPointData()->AddArray(data);
Base::Console().Log(
Base::Console().log(
" The PropertyVectorList %s was exported to VTK vector list: %s\n",
it.first.c_str(),
it.second.c_str());
}
else if (field) {
Base::Console().Log(" PropertyVectorList NOT exported to vtk: %s size is: %i\n",
Base::Console().log(" PropertyVectorList NOT exported to vtk: %s size is: %i\n",
it.first.c_str(),
field->getSize());
}
@@ -970,7 +970,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result,
static_cast<App::PropertyFloatList*>(res->getPropertyByName(scalar.first.c_str()));
}
else {
Base::Console().Error("PropertyFloatList %s not found \n", scalar.first.c_str());
Base::Console().error("PropertyFloatList %s not found \n", scalar.first.c_str());
}
if (field && field->getSize() > 0) {
@@ -1019,19 +1019,19 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result,
}
grid->GetPointData()->AddArray(data);
Base::Console().Log(
Base::Console().log(
" The PropertyFloatList %s was exported to VTK scalar list: %s\n",
scalar.first.c_str(),
scalar.second.c_str());
}
else if (field) {
Base::Console().Log(" PropertyFloatList NOT exported to vtk: %s size is: %i\n",
Base::Console().log(" PropertyFloatList NOT exported to vtk: %s size is: %i\n",
scalar.first.c_str(),
field->getSize());
}
}
Base::Console().Log("End: Create VTK result data from FreeCAD result data.\n");
Base::Console().log("End: Create VTK result data from FreeCAD result data.\n");
}
@@ -1543,7 +1543,7 @@ void readResults(std::ifstream& ifstr,
}
}
catch (const std::out_of_range&) {
Base::Console().Warning("Invalid node: %d\n", node);
Base::Console().warning("Invalid node: %d\n", node);
}
++countNodes;
}

View File

@@ -408,12 +408,12 @@ void PropertyPostDataObject::SaveDocFile(Base::Writer& writer) const
App::PropertyContainer* father = this->getContainer();
if (father && father->isDerivedFrom<App::DocumentObject>()) {
App::DocumentObject* obj = static_cast<App::DocumentObject*>(father);
Base::Console().Error("Dataset of '%s' cannot be written to vtk file '%s'\n",
Base::Console().error("Dataset of '%s' cannot be written to vtk file '%s'\n",
obj->Label.getValue(),
fi.filePath().c_str());
}
else {
Base::Console().Error("Cannot save vtk file '%s'\n", fi.filePath().c_str());
Base::Console().error("Cannot save vtk file '%s'\n", fi.filePath().c_str());
}
std::stringstream ss;
@@ -534,12 +534,12 @@ void PropertyPostDataObject::RestoreDocFile(Base::Reader& reader)
App::PropertyContainer* father = this->getContainer();
if (father && father->isDerivedFrom<App::DocumentObject>()) {
App::DocumentObject* obj = static_cast<App::DocumentObject*>(father);
Base::Console().Error("Dataset file '%s' with data of '%s' seems to be empty\n",
Base::Console().error("Dataset file '%s' with data of '%s' seems to be empty\n",
fi.filePath().c_str(),
obj->Label.getValue());
}
else {
Base::Console().Warning("Loaded Dataset file '%s' seems to be empty\n",
Base::Console().warning("Loaded Dataset file '%s' seems to be empty\n",
fi.filePath().c_str());
}
}
@@ -551,7 +551,7 @@ void PropertyPostDataObject::RestoreDocFile(Base::Reader& reader)
}
}
else {
Base::Console().Error(
Base::Console().error(
"Dataset file '%s' is of unsupported type: %s. Data not loaded.\n",
fi.filePath().c_str(),
extension);

View File

@@ -104,7 +104,7 @@ PyMOD_INIT_FUNC(FemGui)
}
PyObject* mod = FemGui::initModule();
Base::Console().Log("Loading GUI of Fem module... done\n");
Base::Console().log("Loading GUI of Fem module... done\n");
// instantiating the commands
CreateFemCommands();

View File

@@ -2675,11 +2675,11 @@ void CmdFemPostPipelineFromResult::activated(int)
/*
Gui::SelectionFilter ResultFilter("SELECT Fem::FemResultObject COUNT 1");
if (ResultFilter.match()) {
Base::Console().Message("Debug: `SELECT Fem::FemResultObject COUNT 1` has matched obj");
Base::Console().message("Debug: `SELECT Fem::FemResultObject COUNT 1` has matched obj");
Fem::FemResultObject* result =
static_cast<Fem::FemResultObject*>(ResultFilter.Result[0][0].getObject());
//static_cast failed here
Base::Console().Message("Debug: FemResultObject pointer = %p", result );
Base::Console().message("Debug: FemResultObject pointer = %p", result );
*/

View File

@@ -219,10 +219,10 @@ void myCopyResultsMesh(std::string oldName, std::string newName)
{
int error = 0;
Base::Console().Warning("copy: %s and %s\n", oldName.c_str(), newName.c_str());
Base::Console().warning("copy: %s and %s\n", oldName.c_str(), newName.c_str());
if (oldName.compare(newName) == 0 && error == 0) {
error = 1;
Base::Console().Warning("Can't copy ResultMesh to ResultMesh: %s and %s\n",
Base::Console().warning("Can't copy ResultMesh to ResultMesh: %s and %s\n",
oldName.c_str(),
newName.c_str());
QMessageBox::warning(
@@ -234,7 +234,7 @@ void myCopyResultsMesh(std::string oldName, std::string newName)
if ((oldName.find("Result") == std::string::npos || newName.find("Result") == std::string::npos)
&& error == 0) {
error = 1;
Base::Console().Warning("Mesh must be results: %s\n", oldName.c_str());
Base::Console().warning("Mesh must be results: %s\n", oldName.c_str());
QMessageBox::warning(
Gui::getMainWindow(),
// QMessageBox::warning(Gui::MainWindow(),
@@ -746,7 +746,7 @@ void TaskCreateElementSet::DefineNodes(const Base::Polygon2d& polygon,
erase = nElements - keepElement;
}
if (keepElement > 0) {
Base::Console().Warning("Number of Elements Kept: %d, Number of Elements Erased: %d\n",
Base::Console().warning("Number of Elements Kept: %d, Number of Elements Erased: %d\n",
keepElement,
erase);
writeToFile(inp_file, newMeshDS, nodeNumbers, nodeCoords, maxNode, requiredType);

View File

@@ -203,7 +203,7 @@ void TaskCreateNodeSet::onSelectionChanged(const Gui::SelectionChanges& msg)
tempSet.clear();
Base::Console().Message("Picked Element:%i Face:%i\n", elem, face);
Base::Console().message("Picked Element:%i Face:%i\n", elem, face);
if (!ui->checkBox_Add->isChecked()) {

View File

@@ -79,7 +79,7 @@ bool TaskDlgAnalysis::accept()
// return true;
//}
// catch (const Base::Exception& e) {
// Base::Console().Warning("TaskDlgAnalysis::accept(): %s\n", e.what());
// Base::Console().warning("TaskDlgAnalysis::accept(): %s\n", e.what());
//}
return false;

View File

@@ -76,7 +76,7 @@ bool TaskDlgCreateElementSet::accept()
return true;
}
catch (const Base::Exception& e) {
Base::Console().Warning("TaskDlgCreateElementSet::accept(): %s\n", e.what());
Base::Console().warning("TaskDlgCreateElementSet::accept(): %s\n", e.what());
}
return false;

View File

@@ -78,7 +78,7 @@ bool TaskDlgCreateNodeSet::accept()
return true;
}
catch (const Base::Exception& e) {
Base::Console().Warning("TaskDlgCreateNodeSet::accept(): %s\n", e.what());
Base::Console().warning("TaskDlgCreateNodeSet::accept(): %s\n", e.what());
}
return false;

View File

@@ -85,7 +85,7 @@ void TaskDlgMeshShapeNetgen::clicked(int button)
}
}
catch (const Base::Exception& e) {
Base::Console().Warning("FemMeshShapeNetgenObject::execute(): %s\n", e.what());
Base::Console().warning("FemMeshShapeNetgenObject::execute(): %s\n", e.what());
}
}
@@ -120,7 +120,7 @@ bool TaskDlgMeshShapeNetgen::accept()
return true;
}
catch (const Base::Exception& e) {
Base::Console().Warning("TaskDlgMeshShapeNetgen::accept(): %s\n", e.what());
Base::Console().warning("TaskDlgMeshShapeNetgen::accept(): %s\n", e.what());
}
return false;

View File

@@ -235,7 +235,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(
}
}
else {
Base::Console().Log("FemAnalysis object is not activated or no FemAnalysis in the active "
Base::Console().log("FemAnalysis object is not activated or no FemAnalysis in the active "
"document, mesh dimension is unknown\n");
dimension = -1; // unknown dimension of mesh
}
@@ -296,7 +296,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(
}
else {
ui->tabThermalBoundary->setEnabled(false); // could be hidden
// Base::Console().Message("retrieve solver property HeatTransferring as false\n");
// Base::Console().message("retrieve solver property HeatTransferring as false\n");
}
}
else {
@@ -327,7 +327,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(
}
}
else {
Base::Console().Warning(
Base::Console().warning(
"No solver object inside FemAnalysis object, default to non-thermal, non-turbulence\n");
}
ui->tabWidget->setTabText(0, tr("Basic"));
@@ -417,7 +417,7 @@ void TaskFemConstraintFluidBoundary::updateBoundaryTypeUI()
pcConstraint->Reversed.setValue(false); // outlet must point outward
}
else {
Base::Console().Error("Error: Fluid boundary type `%s` is not defined\n",
Base::Console().error("Error: Fluid boundary type `%s` is not defined\n",
boundaryType.c_str());
}
// std::string subtypeLabel = boundaryType + std::string(" type");
@@ -495,7 +495,7 @@ void TaskFemConstraintFluidBoundary::updateSubtypeUI()
ui->tabBasicBoundary->setEnabled(true);
}
else {
Base::Console().Error("Fluid boundary type `%s` is not defined\n", boundaryType.c_str());
Base::Console().error("Fluid boundary type `%s` is not defined\n", boundaryType.c_str());
}
}
@@ -519,7 +519,7 @@ void TaskFemConstraintFluidBoundary::updateTurbulenceUI()
ui->labelTurbulentLengthValue->setText(tr("Hydraulic Diameter [m]"));
}
else {
Base::Console().Error("turbulence Spec type `%s` is not defined\n", turbulenceSpec.c_str());
Base::Console().error("turbulence Spec type `%s` is not defined\n", turbulenceSpec.c_str());
}
}
@@ -560,7 +560,7 @@ void TaskFemConstraintFluidBoundary::updateThermalBoundaryUI()
ui->spinTemperatureValue->setEnabled(true);
}
else {
Base::Console().Error("Thermal boundary type `%s` is not defined\n",
Base::Console().error("Thermal boundary type `%s` is not defined\n",
thermalBoundaryType.c_str());
}
}
@@ -581,7 +581,7 @@ void TaskFemConstraintFluidBoundary::onBoundaryTypeChanged()
bool ret = pcConstraint->recomputeFeature();
if (!ret) {
std::string boundaryType = ui->comboBoundaryType->currentText().toStdString();
Base::Console().Error("Fluid boundary recomputationg failed for boundaryType `%s` \n",
Base::Console().error("Fluid boundary recomputationg failed for boundaryType `%s` \n",
boundaryType.c_str());
}
}
@@ -1080,7 +1080,7 @@ bool TaskDlgFemConstraintFluidBoundary::accept()
}
}
else {
Base::Console().Warning("FemSolverObject is not found in the FemAnalysis object, "
Base::Console().warning("FemSolverObject is not found in the FemAnalysis object, "
"thermal and turbulence setting is not accepted\n");
}
}

View File

@@ -948,7 +948,7 @@ void TaskPostDataAlongLine::pointCallback(void* ud, SoEventCallback* n)
if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) {
const SoPickedPoint* point = n->getPickedPoint();
if (!point) {
Base::Console().Message("No point picked.\n");
Base::Console().message("No point picked.\n");
return;
}
@@ -1221,7 +1221,7 @@ void TaskPostDataAtPoint::pointCallback(void* ud, SoEventCallback* n)
if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) {
const SoPickedPoint* point = n->getPickedPoint();
if (!point) {
Base::Console().Message("No point picked.\n");
Base::Console().message("No point picked.\n");
return;
}
@@ -1367,7 +1367,7 @@ void TaskPostDataAtPoint::showValue(double pointValue, const char* unitStr)
QString posZ = ui->centerZ->text();
QString result = tr("%1 at (%2; %3; %4) is: %5 %6").arg(field, posX, posY, posZ, value, unit);
Base::Console().Message("%s\n", result.toUtf8().data());
Base::Console().message("%s\n", result.toUtf8().data());
}
std::string TaskPostDataAtPoint::toString(double val) const
@@ -1874,7 +1874,7 @@ TaskPostScalarClip::TaskPostScalarClip(ViewProviderFemPostScalarClip* view, QWid
ui->Slider->blockSignals(true);
ui->Slider->setValue(slider_value);
ui->Slider->blockSignals(false);
Base::Console().Log("init: scalar_factor, slider_value: %f, %i: \n",
Base::Console().log("init: scalar_factor, slider_value: %f, %i: \n",
scalar_factor,
slider_value);
}
@@ -2004,7 +2004,7 @@ TaskPostWarpVector::TaskPostWarpVector(ViewProviderFemPostWarpVector* view, QWid
(warp_factor - ui->Min->value()) / (ui->Max->value() - ui->Min->value()) * 100.;
ui->Slider->setValue(slider_value);
ui->Slider->blockSignals(false);
Base::Console().Log("init: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
Base::Console().log("init: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
}
TaskPostWarpVector::~TaskPostWarpVector() = default;
@@ -2058,7 +2058,7 @@ void TaskPostWarpVector::onSliderValueChanged(int slider_value)
ui->Value->blockSignals(true);
ui->Value->setValue(warp_factor);
ui->Value->blockSignals(false);
Base::Console().Log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
Base::Console().log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
}
void TaskPostWarpVector::onValueValueChanged(double warp_factor)
@@ -2076,7 +2076,7 @@ void TaskPostWarpVector::onValueValueChanged(double warp_factor)
(warp_factor - ui->Min->value()) / (ui->Max->value() - ui->Min->value()) * 100.;
ui->Slider->setValue(slider_value);
ui->Slider->blockSignals(false);
Base::Console().Log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
Base::Console().log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
}
void TaskPostWarpVector::onMaxValueChanged(double)
@@ -2112,7 +2112,7 @@ void TaskPostWarpVector::onMaxValueChanged(double)
ui->Value->blockSignals(true);
ui->Value->setValue(warp_factor);
ui->Value->blockSignals(false);
Base::Console().Log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
Base::Console().log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value);
}
*/
}

View File

@@ -70,7 +70,7 @@ void ViewProviderFemConstraintBearing::updateData(const App::Property* prop)
Fem::ConstraintBearing* pcConstraint = this->getObject<Fem::ConstraintBearing>();
if (prop == &pcConstraint->References) {
Base::Console().Error("\n"); // enable a breakpoint here
Base::Console().error("\n"); // enable a breakpoint here
}
if (prop == &pcConstraint->BasePoint) {

View File

@@ -94,7 +94,7 @@ void ViewProviderFemConstraintGear::updateData(const App::Property* prop)
SbVec3f b(base.x, base.y, base.z);
SbVec3f ax(axis.x, axis.y, axis.z);
SbVec3f dir(direction.x, direction.y, direction.z);
// Base::Console().Error("DirectionVector: %f, %f, %f\n", direction.x, direction.y,
// Base::Console().error("DirectionVector: %f, %f, %f\n", direction.x, direction.y,
// direction.z);
GuiTools::createPlacement(pShapeSep, b, SbRotation(SbVec3f(0, 1, 0), ax));
@@ -148,14 +148,14 @@ void ViewProviderFemConstraintGear::updateData(const App::Property* prop)
SbVec3f ax(axis.x, axis.y, axis.z);
SbVec3f dir(direction.x, direction.y, direction.z);
/*Base::Console().Error("Axis: %f, %f, %f\n", axis.x, axis.y, axis.z);
Base::Console().Error("Direction: %f, %f, %f\n", direction.x, direction.y, direction.z);
/*Base::Console().error("Axis: %f, %f, %f\n", axis.x, axis.y, axis.z);
Base::Console().error("Direction: %f, %f, %f\n", direction.x, direction.y, direction.z);
SbRotation rot = SbRotation(ax, dir);
SbMatrix m;
rot.getValue(m);
SbMat m2;
m.getValue(m2);
Base::Console().Error("Matrix: %f, %f, %f, %f\n", m[0][0], m[1][0], m[2][0], m[3][0]);
Base::Console().error("Matrix: %f, %f, %f, %f\n", m[0][0], m[1][0], m[2][0], m[3][0]);
// Note: In spite of the fact that the rotation matrix takes on 3 different values if 3
// normal directions are chosen, the resulting arrow will only point in two different
// directions when ax = (1,0,0) (but for ax=(0,1,0) it points in 3 different

View File

@@ -953,7 +953,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
return;
}
Base::TimeElapsed Start;
Base::Console().Log(
Base::Console().log(
"Start: ViewProviderFEMMeshBuilder::createMesh() =================================\n");
const SMDS_MeshInfo& info = data->GetMeshInfo();
@@ -989,7 +989,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
std::vector<FemFace> facesHelper(numTries);
Base::Console().Log(" %f: Start build up %i face helper\n",
Base::Console().log(" %f: Start build up %i face helper\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()),
facesHelper.size());
Base::BoundBox3d BndBox;
@@ -1514,7 +1514,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
if (FaceSize < MaxFacesShowInner) {
Base::Console().Log(" %f: Start eliminate internal faces SIMPLE\n",
Base::Console().log(" %f: Start eliminate internal faces SIMPLE\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// search for double (inside) faces and hide them
@@ -1531,7 +1531,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
}
}
else {
Base::Console().Log(" %f: Start eliminate internal faces GRID\n",
Base::Console().log(" %f: Start eliminate internal faces GRID\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
BndBox.Enlarge(BndBox.CalcDiagonalLength() / 10000.0);
// calculate grid properties
@@ -1543,7 +1543,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
unsigned int NbrX = (unsigned int)(BndBox.LengthX() / size) + 1;
unsigned int NbrY = (unsigned int)(BndBox.LengthY() / size) + 1;
unsigned int NbrZ = (unsigned int)(BndBox.LengthZ() / size) + 1;
Base::Console().Log(" Size:F:%f, X:%i ,Y:%i ,Z:%i\n", gridFactor, NbrX, NbrY, NbrZ);
Base::Console().log(" Size:F:%f, X:%i ,Y:%i ,Z:%i\n", gridFactor, NbrX, NbrY, NbrZ);
double Xmin = BndBox.MinX;
double Ymin = BndBox.MinY;
@@ -1570,7 +1570,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
iZ = z;
if (iX >= NbrX || iY >= NbrY || iZ >= NbrZ) {
Base::Console().Log(" Outof range!\n");
Base::Console().log(" Outof range!\n");
}
Grid[iX + iY * NbrX + iZ * NbrX * NbrY].push_back(&facesHelper[l]);
@@ -1594,12 +1594,12 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
}
avg = avg / Grid.size();
Base::Console().Log(" VoxelSize: Max:%i ,Average:%i\n", max, avg);
Base::Console().log(" VoxelSize: Max:%i ,Average:%i\n", max, avg);
} // if( FaceSize < 1000)
Base::Console().Log(" %f: Start build up node map\n",
Base::Console().log(" %f: Start build up node map\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// sort out double nodes and build up index map
@@ -1632,7 +1632,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
}
}
}
Base::Console().Log(" %f: Start set point vector\n",
Base::Console().log(" %f: Start set point vector\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// set the point coordinates
@@ -1650,7 +1650,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
// count triangle size
Base::Console().Log(" %f: Start count triangle size\n",
Base::Console().log(" %f: Start count triangle size\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
int triangleCount = 0;
for (int l = 0; l < FaceSize; l++) {
@@ -1675,7 +1675,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
}
}
}
Base::Console().Log(" NumTriangles:%i\n", triangleCount);
Base::Console().log(" NumTriangles:%i\n", triangleCount);
// edge map collect and sort edges of the faces to be shown.
std::map<int, std::set<int>> EdgeMap;
@@ -1706,7 +1706,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
}
}
Base::Console().Log(" %f: Start build up triangle vector\n",
Base::Console().log(" %f: Start build up triangle vector\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// set the triangle face indices
faces->coordIndex.setNum(4 * triangleCount);
@@ -3126,7 +3126,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
faces->coordIndex.finishEditing();
Base::Console().Log(" %f: Start build up edge vector\n",
Base::Console().log(" %f: Start build up edge vector\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
// std::map<int,std::set<int> > EdgeMap;
// count edges
@@ -3152,9 +3152,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
}
lines->coordIndex.finishEditing();
Base::Console().Log(" NumEdges:%i\n", EdgeSize);
Base::Console().log(" NumEdges:%i\n", EdgeSize);
Base::Console().Log(
Base::Console().log(
" %f: Finish =========================================================\n",
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
}

View File

@@ -286,13 +286,13 @@ ViewProviderFemPostObject::~ViewProviderFemPostObject()
deleteColorBar();
}
catch (Base::Exception& e) {
Base::Console().DestructorError(
Base::Console().destructorError(
"ViewProviderFemPostObject",
"ViewProviderFemPostObject destructor threw an exception: %s\n",
e.what());
}
catch (...) {
Base::Console().DestructorError(
Base::Console().destructorError(
"ViewProviderFemPostObject",
"ViewProviderFemPostObject destructor threw an unknown exception");
}