Console: rename PascalCase named methods to camelCase
This commit is contained in:
@@ -54,7 +54,7 @@ extern PyObject* initModule();
|
||||
PyMOD_INIT_FUNC(Mesh)
|
||||
{
|
||||
PyObject* meshModule = Mesh::initModule();
|
||||
Base::Console().Log("Loading Mesh module... done\n");
|
||||
Base::Console().log("Loading Mesh module... done\n");
|
||||
|
||||
// NOTE: To finish the initialization of our own type objects we must
|
||||
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
|
||||
|
||||
@@ -808,7 +808,7 @@ bool MeshAlgorithm::FillupHole(const std::vector<PointIndex>& boundary,
|
||||
|
||||
// in case the reference facet has not an open edge print a log message
|
||||
if (ref_side == max || tri_side == max) {
|
||||
Base::Console().Log(
|
||||
Base::Console().log(
|
||||
"MeshAlgorithm::FillupHole: Expected open edge for facet <%d, %d, %d>\n",
|
||||
rFace._aulPoints[0],
|
||||
rFace._aulPoints[1],
|
||||
|
||||
@@ -1186,7 +1186,7 @@ float CylinderFit::Fit()
|
||||
Base::Vector3d dir = cylFit.GetAxis();
|
||||
|
||||
#if defined(FC_DEBUG)
|
||||
Base::Console().Log(
|
||||
Base::Console().log(
|
||||
"MeshCoreFit::Cylinder Fit: Base: (%0.4f, %0.4f, %0.4f), Axis: (%0.6f, %0.6f, "
|
||||
"%0.6f), Radius: %0.4f, Std Dev: %0.4f, Iterations: %d\n",
|
||||
base.x,
|
||||
@@ -1238,7 +1238,7 @@ float CylinderFit::Fit()
|
||||
|
||||
Eigen::LevenbergMarquardt<LMCylinderFunctor, double> lm(functor);
|
||||
int status = lm.minimize(x);
|
||||
Base::Console().Log("Cylinder fit: %d, iterations: %d, gradient norm: %f\n",
|
||||
Base::Console().log("Cylinder fit: %d, iterations: %d, gradient norm: %f\n",
|
||||
status,
|
||||
lm.iter,
|
||||
lm.gnorm);
|
||||
@@ -1421,7 +1421,7 @@ float SphereFit::Fit()
|
||||
_fLastResult = 0;
|
||||
|
||||
#if defined(_DEBUG)
|
||||
Base::Console().Message(" WildMagic Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: "
|
||||
Base::Console().message(" WildMagic Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: "
|
||||
"%0.4f, Std Dev: %0.4f\n",
|
||||
_vCenter.x,
|
||||
_vCenter.y,
|
||||
@@ -1437,7 +1437,7 @@ float SphereFit::Fit()
|
||||
if (result < std::numeric_limits<float>::max()) {
|
||||
Base::Vector3d center = sphereFit.GetCenter();
|
||||
#if defined(_DEBUG)
|
||||
Base::Console().Message("MeshCoreFit::Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: "
|
||||
Base::Console().message("MeshCoreFit::Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: "
|
||||
"%0.4f, Std Dev: %0.4f, Iterations: %d\n",
|
||||
center.x,
|
||||
center.y,
|
||||
|
||||
@@ -699,7 +699,7 @@ bool CylinderFit::computeResiduals(SolutionD solDir,
|
||||
}
|
||||
|
||||
// rmsVv = sqrt(rmsVv / (double)nPtsUsed);
|
||||
// Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS
|
||||
// Base::Console().message("X: %0.3e %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS
|
||||
// Vv: %0.4f\n", x(0), x(1), x(2), x(3), x(4), maxdVx, maxdVy, maxdVz, rmsVv);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -83,7 +83,7 @@ bool WriterOBJ::Save(std::ostream& out)
|
||||
if (_material) {
|
||||
if (_material->binding == MeshIO::PER_FACE) {
|
||||
if (_material->diffuseColor.size() != rFacets.size()) {
|
||||
Base::Console().Warning("Cannot export color information because there is a "
|
||||
Base::Console().warning("Cannot export color information because there is a "
|
||||
"different number of faces and colors");
|
||||
}
|
||||
else {
|
||||
@@ -92,7 +92,7 @@ bool WriterOBJ::Save(std::ostream& out)
|
||||
}
|
||||
else if (_material->binding == MeshIO::PER_VERTEX) {
|
||||
if (_material->diffuseColor.size() != rPoints.size()) {
|
||||
Base::Console().Warning("Cannot export color information because there is a "
|
||||
Base::Console().warning("Cannot export color information because there is a "
|
||||
"different number of points and colors");
|
||||
}
|
||||
else {
|
||||
@@ -101,7 +101,7 @@ bool WriterOBJ::Save(std::ostream& out)
|
||||
}
|
||||
else if (_material->binding == MeshIO::OVERALL) {
|
||||
if (_material->diffuseColor.empty()) {
|
||||
Base::Console().Warning(
|
||||
Base::Console().warning(
|
||||
"Cannot export color information because there is no color defined");
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -246,7 +246,7 @@ bool MeshInput::LoadAny(const char* FileName)
|
||||
else if (fi.hasExtension("iv")) {
|
||||
ok = LoadInventor(str);
|
||||
if (ok && _rclMesh.CountFacets() == 0) {
|
||||
Base::Console().Warning("No usable mesh found in file '%s'", FileName);
|
||||
Base::Console().warning("No usable mesh found in file '%s'", FileName);
|
||||
}
|
||||
}
|
||||
else if (fi.hasExtension({"nas", "bdf"})) {
|
||||
@@ -1151,14 +1151,14 @@ bool MeshInput::LoadNastran(std::istream& input)
|
||||
}
|
||||
|
||||
if (badElementCounter > 0) {
|
||||
Base::Console().Warning("Found bad elements while reading NASTRAN file.\n");
|
||||
Base::Console().warning("Found bad elements while reading NASTRAN file.\n");
|
||||
}
|
||||
|
||||
// Check the triangles to make sure the vertices they refer to actually exist:
|
||||
for (const auto& tri : mTria) {
|
||||
for (int i : tri.second.iV) {
|
||||
if (mNode.find(i) == mNode.end()) {
|
||||
Base::Console().Error(
|
||||
Base::Console().error(
|
||||
"CTRIA3 element refers to a node that does not exist, or could not be read.\n");
|
||||
return false;
|
||||
}
|
||||
@@ -1169,7 +1169,7 @@ bool MeshInput::LoadNastran(std::istream& input)
|
||||
for (const auto& quad : mQuad) {
|
||||
for (int i : quad.second.iV) {
|
||||
if (mNode.find(i) == mNode.end()) {
|
||||
Base::Console().Error(
|
||||
Base::Console().error(
|
||||
"CQUAD4 element refers to a node that does not exist, or could not be read.\n");
|
||||
return false;
|
||||
}
|
||||
@@ -1869,12 +1869,12 @@ bool MeshOutput::SaveOFF(std::ostream& out) const
|
||||
bool exportColor = false;
|
||||
if (_material) {
|
||||
if (_material->binding == MeshIO::PER_FACE) {
|
||||
Base::Console().Warning(
|
||||
Base::Console().warning(
|
||||
"Cannot export color information because it's defined per face");
|
||||
}
|
||||
else if (_material->binding == MeshIO::PER_VERTEX) {
|
||||
if (_material->diffuseColor.size() != rPoints.size()) {
|
||||
Base::Console().Warning("Cannot export color information because there is a "
|
||||
Base::Console().warning("Cannot export color information because there is a "
|
||||
"different number of points and colors");
|
||||
}
|
||||
else {
|
||||
@@ -1883,7 +1883,7 @@ bool MeshOutput::SaveOFF(std::ostream& out) const
|
||||
}
|
||||
else if (_material->binding == MeshIO::OVERALL) {
|
||||
if (_material->diffuseColor.empty()) {
|
||||
Base::Console().Warning(
|
||||
Base::Console().warning(
|
||||
"Cannot export color information because there is no color defined");
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -440,7 +440,7 @@ bool SphereFit::computeResiduals(const Eigen::VectorXd& x,
|
||||
}
|
||||
|
||||
// rmsVv = sqrt(rmsVv / (double)nPtsUsed);
|
||||
// Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS Vv:
|
||||
// Base::Console().message("X: %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS Vv:
|
||||
// %0.4f\n", x(0), x(1), x(2), x(3), maxdVx, maxdVy, maxdVz, rmsVv);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1729,7 +1729,7 @@ void MeshTopoAlgorithm::FillupHoles(int level,
|
||||
for (auto& newFacet : newFacets) {
|
||||
if (newFacet._aulPoints[0] >= ctPoints || newFacet._aulPoints[1] >= ctPoints
|
||||
|| newFacet._aulPoints[2] >= ctPoints) {
|
||||
Base::Console().Log("Ignore invalid face <%d, %d, %d> (%d vertices)\n",
|
||||
Base::Console().log("Ignore invalid face <%d, %d, %d> (%d vertices)\n",
|
||||
newFacet._aulPoints[0],
|
||||
newFacet._aulPoints[1],
|
||||
newFacet._aulPoints[2],
|
||||
|
||||
@@ -237,7 +237,7 @@ bool AbstractPolygonTriangulator::TriangulatePolygon()
|
||||
{
|
||||
try {
|
||||
if (!this->_indices.empty() && this->_points.size() != this->_indices.size()) {
|
||||
Base::Console().Log("Triangulation: %d points <> %d indices\n",
|
||||
Base::Console().log("Triangulation: %d points <> %d indices\n",
|
||||
_points.size(),
|
||||
_indices.size());
|
||||
return false;
|
||||
@@ -249,11 +249,11 @@ bool AbstractPolygonTriangulator::TriangulatePolygon()
|
||||
return ok;
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
Base::Console().Log("Triangulation: %s\n", e.what());
|
||||
Base::Console().log("Triangulation: %s\n", e.what());
|
||||
return false;
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
Base::Console().Log("Triangulation: %s\n", e.what());
|
||||
Base::Console().log("Triangulation: %s\n", e.what());
|
||||
return false;
|
||||
}
|
||||
catch (...) {
|
||||
|
||||
@@ -526,19 +526,19 @@ void MeshObject::load(std::istream& in)
|
||||
try {
|
||||
MeshCore::MeshEvalNeighbourhood nb(_kernel);
|
||||
if (!nb.Evaluate()) {
|
||||
Base::Console().Warning("Errors in neighbourhood of mesh found...");
|
||||
Base::Console().warning("Errors in neighbourhood of mesh found...");
|
||||
_kernel.RebuildNeighbours();
|
||||
Base::Console().Warning("fixed\n");
|
||||
Base::Console().warning("fixed\n");
|
||||
}
|
||||
|
||||
MeshCore::MeshEvalTopology eval(_kernel);
|
||||
if (!eval.Evaluate()) {
|
||||
Base::Console().Warning("The mesh data structure has some defects\n");
|
||||
Base::Console().warning("The mesh data structure has some defects\n");
|
||||
}
|
||||
}
|
||||
catch (const Base::MemoryException&) {
|
||||
// ignore memory exceptions and continue
|
||||
Base::Console().Log("Check for defects in mesh data structure failed\n");
|
||||
Base::Console().log("Check for defects in mesh data structure failed\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ PyMOD_INIT_FUNC(MeshGui)
|
||||
PyMOD_Return(nullptr);
|
||||
}
|
||||
PyObject* mod = MeshGui::initModule();
|
||||
Base::Console().Log("Loading GUI of Mesh module... done\n");
|
||||
Base::Console().log("Loading GUI of Mesh module... done\n");
|
||||
|
||||
// instantiating the commands
|
||||
CreateMeshCommands();
|
||||
|
||||
@@ -1447,7 +1447,7 @@ void CmdMeshBoundingBox::activated(int)
|
||||
const MeshCore::MeshKernel& rMesh = ((Mesh::Feature*)it)->Mesh.getValue().getKernel();
|
||||
const Base::BoundBox3f& box = rMesh.GetBoundBox();
|
||||
|
||||
Base::Console().Message("Boundings: Min=<%f,%f,%f>, Max=<%f,%f,%f>\n",
|
||||
Base::Console().message("Boundings: Min=<%f,%f,%f>, Max=<%f,%f,%f>\n",
|
||||
box.MinX,
|
||||
box.MinY,
|
||||
box.MinZ,
|
||||
|
||||
@@ -1017,7 +1017,7 @@ void DlgEvaluateMeshImp::onAnalyzeSelfIntersectionButtonClicked()
|
||||
eval.GetIntersections(intersection);
|
||||
}
|
||||
catch (const Base::AbortException&) {
|
||||
Base::Console().Message("The self-intersection analysis was aborted by the user\n");
|
||||
Base::Console().message("The self-intersection analysis was aborted by the user\n");
|
||||
}
|
||||
|
||||
if (intersection.empty()) {
|
||||
|
||||
@@ -555,7 +555,7 @@ void MeshSelection::pickFaceCallback(void* ud, SoEventCallback* n)
|
||||
&& mbe->getState() == SoButtonEvent::DOWN) {
|
||||
const SoPickedPoint* point = n->getPickedPoint();
|
||||
if (!point) {
|
||||
Base::Console().Message("No facet picked.\n");
|
||||
Base::Console().message("No facet picked.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ double GmshWidget::getMinSize() const
|
||||
void GmshWidget::accept()
|
||||
{
|
||||
if (d->gmsh.state() == QProcess::Running) {
|
||||
Base::Console().Warning("Cannot start gmsh because it's already running\n");
|
||||
Base::Console().warning("Cannot start gmsh because it's already running\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
fit.SetInitialValues(base, axis);
|
||||
|
||||
#if defined(FC_DEBUG)
|
||||
Base::Console().Message("Initial axis: (%f, %f, %f)\n", axis.x, axis.y, axis.z);
|
||||
Base::Console().message("Initial axis: (%f, %f, %f)\n", axis.x, axis.y, axis.z);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1157,7 +1157,7 @@ void SoFCMeshObjectShape::generatePrimitives(SoAction* action)
|
||||
}
|
||||
}
|
||||
catch (const Base::MemoryException&) {
|
||||
Base::Console().Log("Not enough memory to generate primitives\n");
|
||||
Base::Console().log("Not enough memory to generate primitives\n");
|
||||
}
|
||||
|
||||
endShape();
|
||||
@@ -1582,7 +1582,7 @@ void SoFCMeshSegmentShape::generatePrimitives(SoAction* action)
|
||||
}
|
||||
}
|
||||
catch (const Base::MemoryException&) {
|
||||
Base::Console().Log("Not enough memory to generate primitives\n");
|
||||
Base::Console().log("Not enough memory to generate primitives\n");
|
||||
}
|
||||
|
||||
endShape();
|
||||
|
||||
@@ -1159,7 +1159,7 @@ void ViewProviderMesh::partMeshCallback(void* ud, SoEventCallback* cb)
|
||||
// create a tool shape from these points
|
||||
std::vector<MeshCore::MeshGeomFacet> aFaces;
|
||||
if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) {
|
||||
Base::Console().Message("The picked polygon seems to have self-overlappings. This could "
|
||||
Base::Console().message("The picked polygon seems to have self-overlappings. This could "
|
||||
"lead to strange results.");
|
||||
}
|
||||
|
||||
@@ -1232,7 +1232,7 @@ void ViewProviderMesh::segmMeshCallback(void* ud, SoEventCallback* cb)
|
||||
// create a tool shape from these points
|
||||
std::vector<MeshCore::MeshGeomFacet> aFaces;
|
||||
if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) {
|
||||
Base::Console().Message("The picked polygon seems to have self-overlappings. This could "
|
||||
Base::Console().message("The picked polygon seems to have self-overlappings. This could "
|
||||
"lead to strange results.");
|
||||
}
|
||||
|
||||
@@ -1366,7 +1366,7 @@ void ViewProviderMesh::getFacetsFromPolygon(const std::vector<SbVec2f>& picked,
|
||||
}
|
||||
|
||||
if (!ok) { // note: the mouse grabbing needs to be released
|
||||
Base::Console().Message("The picked polygon seems to have self-overlappings. This could "
|
||||
Base::Console().message("The picked polygon seems to have self-overlappings. This could "
|
||||
"lead to strange results.");
|
||||
}
|
||||
}
|
||||
@@ -1701,7 +1701,7 @@ void ViewProviderMesh::faceInfoCallback(void* ud, SoEventCallback* cb)
|
||||
&& mbe->getState() == SoButtonEvent::DOWN) {
|
||||
const SoPickedPoint* point = cb->getPickedPoint();
|
||||
if (!point) {
|
||||
Base::Console().Message("No facet picked.\n");
|
||||
Base::Console().message("No facet picked.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1784,7 +1784,7 @@ void ViewProviderMesh::fillHoleCallback(void* ud, SoEventCallback* cb)
|
||||
&& mbe->getState() == SoButtonEvent::DOWN) {
|
||||
const SoPickedPoint* point = cb->getPickedPoint();
|
||||
if (!point) {
|
||||
Base::Console().Message("No facet picked.\n");
|
||||
Base::Console().message("No facet picked.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1859,7 +1859,7 @@ void ViewProviderMesh::markPartCallback(void* ud, SoEventCallback* cb)
|
||||
&& mbe->getState() == SoButtonEvent::DOWN) {
|
||||
const SoPickedPoint* point = cb->getPickedPoint();
|
||||
if (!point) {
|
||||
Base::Console().Message("No facet picked.\n");
|
||||
Base::Console().message("No facet picked.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1888,7 +1888,7 @@ void ViewProviderMesh::faceInfo(Mesh::FacetIndex uFacet)
|
||||
if (uFacet < facets.size()) {
|
||||
MeshCore::MeshFacet face = facets[uFacet];
|
||||
MeshCore::MeshGeomFacet tria = rKernel.GetFacet(face);
|
||||
Base::Console().Message(
|
||||
Base::Console().message(
|
||||
"Mesh: %s Facet %lu: Points: <%lu, %lu, %lu>, Neighbours: <%lu, %lu, %lu>\n"
|
||||
"Triangle: <[%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f]>\n",
|
||||
getObject()->getNameInDocument(),
|
||||
|
||||
@@ -133,13 +133,13 @@ ViewProviderMeshCurvature::~ViewProviderMeshCurvature()
|
||||
deleteColorBar();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
Base::Console().DestructorError(
|
||||
Base::Console().destructorError(
|
||||
"ViewProviderMeshCurvature",
|
||||
"ViewProviderMeshCurvature::deleteColorBar() threw an exception: %s\n",
|
||||
e.what());
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().DestructorError(
|
||||
Base::Console().destructorError(
|
||||
"ViewProviderInspection",
|
||||
"ViewProviderInspection destructor threw an unknown exception");
|
||||
}
|
||||
@@ -554,7 +554,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void* ud, SoEventCallback*
|
||||
&& mbe->getState() == SoButtonEvent::UP) {
|
||||
const SoPickedPoint* point = n->getPickedPoint();
|
||||
if (!point) {
|
||||
Base::Console().Message("No facet picked.\n");
|
||||
Base::Console().message("No facet picked.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ void ViewProviderMeshTransformDemolding::DragEndCallback()
|
||||
SbRotation rot = pcTrackballDragger->rotation.getValue();
|
||||
calcMaterialIndex(rot);
|
||||
|
||||
Base::Console().Log("View: Finish dragging\n");
|
||||
Base::Console().log("View: Finish dragging\n");
|
||||
}
|
||||
|
||||
void ViewProviderMeshTransformDemolding::valueChangedCallback()
|
||||
|
||||
Reference in New Issue
Block a user