Surface: [skip ci] fix minor issues found by code checkers
This commit is contained in:
@@ -47,9 +47,11 @@ BlendCurve::BlendCurve(const std::vector<BlendPoint>& blendPointsList)
|
||||
if (nb_pts > 2) {
|
||||
throw Base::NotImplementedError("Not implemented");
|
||||
}
|
||||
else if (nb_pts < 2) {
|
||||
|
||||
if (nb_pts < 2) {
|
||||
throw Base::ValueError("Need two points for working");
|
||||
}
|
||||
|
||||
blendPoints = blendPointsList;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
* Constructor
|
||||
*\param std::vector<BlendPoint>
|
||||
*/
|
||||
BlendCurve(const std::vector<BlendPoint>& blendPointsList);
|
||||
explicit BlendCurve(const std::vector<BlendPoint>& blendPointsList);
|
||||
~BlendCurve() = default;
|
||||
/*!
|
||||
* Perform the interpolate algorithm
|
||||
|
||||
@@ -33,9 +33,9 @@ namespace Surface
|
||||
{
|
||||
|
||||
/*!
|
||||
* Create a list of vectors formed by a point and some derivatives
|
||||
* Create a list of vectors formed by a point and some derivatives
|
||||
* obtained from a curve or surface
|
||||
*/
|
||||
*/
|
||||
class SurfaceExport BlendPoint
|
||||
{
|
||||
public:
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
* Constructor
|
||||
*\param std::vector<Base::Vector3d>
|
||||
*/
|
||||
BlendPoint(const std::vector<Base::Vector3d>& vectorList);
|
||||
explicit BlendPoint(const std::vector<Base::Vector3d>& vectorList);
|
||||
~BlendPoint() = default;
|
||||
/*!
|
||||
* Scale the blendpoint vectors
|
||||
|
||||
@@ -212,8 +212,8 @@ CmdSurfaceCurveOnMesh::CmdSurfaceCurveOnMesh()
|
||||
|
||||
void CmdSurfaceCurveOnMesh::activated(int)
|
||||
{
|
||||
doCommand(Doc,"import MeshPartGui, FreeCADGui\n"
|
||||
"FreeCADGui.runCommand('MeshPart_CurveOnMesh')\n");
|
||||
doCommand(Doc, "import MeshPartGui, FreeCADGui\n"
|
||||
"FreeCADGui.runCommand('MeshPart_CurveOnMesh')\n");
|
||||
}
|
||||
|
||||
bool CmdSurfaceCurveOnMesh::isActive()
|
||||
@@ -367,7 +367,7 @@ void CmdSurfaceExtendFace::activated(int)
|
||||
std::string FeatName = getUniqueObjectName("Surface");
|
||||
std::string supportString = faceFilter.Result[0][0].getAsPropertyLinkSubString();
|
||||
doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::Extend\",\"%s\")", FeatName.c_str());
|
||||
doCommand(Doc, "App.ActiveDocument.%s.Face = %s",FeatName.c_str(),supportString.c_str());
|
||||
doCommand(Doc, "App.ActiveDocument.%s.Face = %s", FeatName.c_str(), supportString.c_str());
|
||||
updateActive();
|
||||
commitCommand();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user