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

@@ -63,7 +63,7 @@ PyMOD_INIT_FUNC(PathApp)
}
PyObject* pathModule = PathApp::initModule();
Base::Console().Log("Loading Path module... done\n");
Base::Console().log("Loading Path module... done\n");
Py::Object module(pathModule);

View File

@@ -63,7 +63,7 @@
else { \
str += "No OCCT Exception Message"; \
} \
Base::Console().Error(str.c_str()); \
Base::Console().error(str.c_str()); \
PyErr_SetString(Part::PartExceptionOCCError, str.c_str()); \
} \
catch (Base::Exception & e) \
@@ -81,7 +81,7 @@
str += "STL exception thrown ("; \
str += e.what(); \
str += ")"; \
Base::Console().Error(str.c_str()); \
Base::Console().error(str.c_str()); \
PyErr_SetString(Base::PyExc_FC_GeneralError, str.c_str()); \
} \
catch (const char* e) \

View File

@@ -154,7 +154,7 @@ double Toolpath::getCycleTime(double hFeed, double vFeed, double hRapid, double
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/CAM");
if (!hGrp->GetBool("WarningsSuppressAllSpeeds", true)) {
Base::Console().Warning("Feed Rate Error: Check Tool Controllers have Feed Rates");
Base::Console().warning("Feed Rate Error: Check Tool Controllers have Feed Rates");
}
return 0;
}

View File

@@ -68,7 +68,7 @@ PyMOD_INIT_FUNC(PathGui)
PyMOD_Return(nullptr);
}
PyObject* mod = PathGui::initModule();
Base::Console().Log("Loading GUI of Path module... done\n");
Base::Console().log("Loading GUI of Path module... done\n");
// instantiating the commands
CreatePathCommands();

View File

@@ -76,7 +76,7 @@ void CmdPathArea::activated(int iMsg)
}
for (const std::string& name : subnames) {
if (name.compare(0, 4, "Face") && name.compare(0, 4, "Edge")) {
Base::Console().Error("Selected shape is not 2D\n");
Base::Console().error("Selected shape is not 2D\n");
return;
}
@@ -159,14 +159,14 @@ void CmdPathAreaWorkplane::activated(int iMsg)
getSelection().getSelectionEx(nullptr, Part::Feature::getClassTypeId())) {
const std::vector<std::string>& subnames = selObj.getSubNames();
if (subnames.size() > 1) {
Base::Console().Error("Please select one sub shape object for plane only\n");
Base::Console().error("Please select one sub shape object for plane only\n");
return;
}
const Part::Feature* pcObj = static_cast<Part::Feature*>(selObj.getObject());
if (subnames.empty()) {
if (pcObj->isDerivedFrom<Path::FeatureArea>()) {
if (!areaName.empty()) {
Base::Console().Error("Please select one FeatureArea only\n");
Base::Console().error("Please select one FeatureArea only\n");
return;
}
areaName = pcObj->getNameInDocument();
@@ -174,12 +174,12 @@ void CmdPathAreaWorkplane::activated(int iMsg)
}
for (TopExp_Explorer it(pcObj->Shape.getShape().getShape(), TopAbs_SHELL); it.More();
it.Next()) {
Base::Console().Error("Selected shape is not 2D\n");
Base::Console().error("Selected shape is not 2D\n");
return;
}
}
if (!planeName.empty()) {
Base::Console().Error("Please select one shape object for plane only\n");
Base::Console().error("Please select one shape object for plane only\n");
return;
}
else {
@@ -189,7 +189,7 @@ void CmdPathAreaWorkplane::activated(int iMsg)
for (const std::string& name : subnames) {
if (name.compare(0, 4, "Face") && name.compare(0, 4, "Edge")) {
Base::Console().Error("Selected shape is not 2D\n");
Base::Console().error("Selected shape is not 2D\n");
return;
}
std::ostringstream subname;
@@ -198,11 +198,11 @@ void CmdPathAreaWorkplane::activated(int iMsg)
}
}
if (areaName.empty()) {
Base::Console().Error("Please select one FeatureArea\n");
Base::Console().error("Please select one FeatureArea\n");
return;
}
if (planeName.empty()) {
Base::Console().Error("Please select one shape object\n");
Base::Console().error("Please select one shape object\n");
return;
}
@@ -258,7 +258,7 @@ void CmdPathCompound::activated(int iMsg)
cmd << "FreeCAD.activeDocument()." << pcPathObject->getNameInDocument() << ",";
}
else {
Base::Console().Error(
Base::Console().error(
"Only Path objects must be selected before running this command\n");
return;
}
@@ -277,7 +277,7 @@ void CmdPathCompound::activated(int iMsg)
updateActive();
}
else {
Base::Console().Error("At least one Path object must be selected\n");
Base::Console().error("At least one Path object must be selected\n");
return;
}
}
@@ -320,7 +320,7 @@ void CmdPathShape::activated(int iMsg)
}
for (const std::string& name : subnames) {
if (name.compare(0, 4, "Face") && name.compare(0, 4, "Edge")) {
Base::Console().Warning("Ignored shape %s %s\n",
Base::Console().warning("Ignored shape %s %s\n",
pcObj->getNameInDocument(),
name.c_str());
continue;

View File

@@ -71,7 +71,7 @@ PyMOD_INIT_FUNC(PathSimulator)
//
PyObject* mod = PathSimulator::initModule();
Base::Console().Log("Loading PathSimulator module.... done\n");
Base::Console().log("Loading PathSimulator module.... done\n");
// Add Types to module
Base::Interpreter().addType(&PathSimulator::PathSimPy::Type, mod, "PathSim");

View File

@@ -134,7 +134,7 @@ PyObject* PathSimPy::ApplyCommand(PyObject* args, PyObject* kwds)
Base::Placement* pos = static_cast<Base::PlacementPy*>(pObjPlace)->getPlacementPtr();
Path::Command* cmd = static_cast<Path::CommandPy*>(pObjCmd)->getCommandPtr();
Base::Placement* newpos = sim->ApplyCommand(pos, cmd);
// Base::Console().Log("Done...\n");
// Base::Console().log("Done...\n");
// Base::Console().Refresh();
Base::PlacementPy* newposPy = new Base::PlacementPy(newpos);
return newposPy;

View File

@@ -777,7 +777,7 @@ cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res)
// Report the performance of the profile extraction
// auto stop = std::chrono::high_resolution_clock::now();
// auto duration = std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
// Base::Console().Log("cSimTool::cSimTool - Tool Profile Extraction Took: %i ms\n",
// Base::Console().log("cSimTool::cSimTool - Tool Profile Extraction Took: %i ms\n",
// duration.count() / 1000);
}

View File

@@ -71,7 +71,7 @@ PyMOD_INIT_FUNC(CAMSimulator)
//
PyObject* mod = CAMSimulator::initModule();
Base::Console().Log("Loading CAMSimulator module.... done\n");
Base::Console().log("Loading CAMSimulator module.... done\n");
// Add Types to module
Base::Interpreter().addType(&CAMSimulator::CAMSimPy::Type, mod, "PathSim");

View File

@@ -196,7 +196,7 @@ bool CheckCompileResult(int shaderId, const char* shaderName, bool isVertex)
len = 1020;
}
log[len] = 0;
Base::Console().Error(log);
Base::Console().error(log);
return true;
}