Mod: redundant void 2

This commit is contained in:
berniev
2022-08-07 20:05:16 +10:00
committed by wwmayer
parent 311abcc43e
commit da9ebc572f
805 changed files with 3787 additions and 3787 deletions

View File

@@ -149,7 +149,7 @@ static const PyMethodDef areaOverrides[] = {
"of this Area is used if section mode is 'Workplane'.",
},
{
"setDefaultParams",reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>(areaSetParams)), METH_VARARGS|METH_KEYWORDS|METH_STATIC,
"setDefaultParams",reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>(areaSetParams)), METH_VARARGS|METH_KEYWORDS|METH_STATIC,
"setDefaultParams(key=value...):\n"
"Static method to set the default parameters of all following Path.Area, plus the following\n"
"additional parameters.\n"
@@ -159,13 +159,13 @@ static const PyMethodDef areaOverrides[] = {
"getDefaultParams(): Static method to return the current default parameters."
},
{
"abort",reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>(areaAbort)), METH_VARARGS|METH_KEYWORDS|METH_STATIC,
"abort",reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>(areaAbort)), METH_VARARGS|METH_KEYWORDS|METH_STATIC,
"abort(aborting=True): Static method to abort any ongoing operation\n"
"\nTo ensure no stray abortion is left in the previous operation, it is advised to manually clear\n"
"the aborting flag by calling abort(False) before starting a new operation.",
},
{
"getParamsDesc",reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>(areaGetParamsDesc)), METH_VARARGS|METH_KEYWORDS|METH_STATIC,
"getParamsDesc",reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>(areaGetParamsDesc)), METH_VARARGS|METH_KEYWORDS|METH_STATIC,
"getParamsDesc(as_string=False): Returns a list of supported parameters and their descriptions.\n"
"\n* as_string: if False, then return a dictionary of documents of all supported parameters."
},
@@ -195,7 +195,7 @@ static AreaPyModifier mod;
using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string AreaPy::representation(void) const
std::string AreaPy::representation() const
{
std::stringstream str;
str << "<Area object at " << getAreaPtr() << ">";
@@ -445,7 +445,7 @@ PyObject* AreaPy::getParamsDesc(PyObject *, PyObject *)
return nullptr;
}
Py::List AreaPy::getSections(void) const {
Py::List AreaPy::getSections() const {
Py::List ret;
Area *area = getAreaPtr();
for(size_t i=0,count=area->getSectionCount(); i<count;++i)
@@ -453,7 +453,7 @@ Py::List AreaPy::getSections(void) const {
return ret;
}
Py::List AreaPy::getShapes(void) const {
Py::List AreaPy::getShapes() const {
Py::List ret;
Area *area = getAreaPtr();
const std::list<Area::Shape> &shapes = area->getChildren();
@@ -462,7 +462,7 @@ Py::List AreaPy::getShapes(void) const {
return ret;
}
Py::Object AreaPy::getWorkplane(void) const {
Py::Object AreaPy::getWorkplane() const {
return Part::shape2pyshape(getAreaPtr()->getPlane());
}

View File

@@ -75,7 +75,7 @@ Placement Command::getPlacement (const Base::Vector3d pos) const
return plac;
}
Vector3d Command::getCenter (void) const
Vector3d Command::getCenter () const
{
static const std::string i = "I";
static const std::string j = "J";
@@ -301,7 +301,7 @@ void Command::scaleBy(double factor)
// Reimplemented from base class
unsigned int Command::getMemSize (void) const
unsigned int Command::getMemSize () const
{
return toGCode().size();
}

View File

@@ -40,7 +40,7 @@
using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string CommandPy::representation(void) const
std::string CommandPy::representation() const
{
std::stringstream str;
str.precision(5);
@@ -137,7 +137,7 @@ int CommandPy::PyInit(PyObject* args, PyObject* kwd)
// Name attribute
Py::String CommandPy::getName(void) const
Py::String CommandPy::getName() const
{
return Py::String(getCommandPtr()->Name.c_str());
}
@@ -151,7 +151,7 @@ void CommandPy::setName(Py::String arg)
// Parameters attribute get/set
Py::Dict CommandPy::getParameters(void) const
Py::Dict CommandPy::getParameters() const
{
// dict now a class member , https://forum.freecadweb.org/viewtopic.php?f=15&t=50583
if (parameters_copy_dict.length()==0) {
@@ -224,7 +224,7 @@ PyObject* CommandPy::setFromGCode(PyObject *args)
// Placement attribute get/set
Py::Object CommandPy::getPlacement(void) const
Py::Object CommandPy::getPlacement() const
{
return Py::asObject(new Base::PlacementPy(new Base::Placement(getCommandPtr()->getPlacement())));
}

View File

@@ -69,7 +69,7 @@ Area &FeatureArea::getArea() {
return myArea;
}
App::DocumentObjectExecReturn *FeatureArea::execute(void)
App::DocumentObjectExecReturn *FeatureArea::execute()
{
myInited = true;
@@ -143,7 +143,7 @@ const std::vector<TopoDS_Shape> &FeatureArea::getShapes() {
return myShapes;
}
short FeatureArea::mustExecute(void) const
short FeatureArea::mustExecute() const
{
if(myInited && !myArea.isBuilt())
return 1;
@@ -206,7 +206,7 @@ std::list<TopoDS_Shape> FeatureAreaView::getShapes() {
return shapes;
}
App::DocumentObjectExecReturn *FeatureAreaView::execute(void)
App::DocumentObjectExecReturn *FeatureAreaView::execute()
{
App::DocumentObject* pObj = Source.getValue();
if (!pObj)
@@ -244,10 +244,10 @@ namespace App {
PROPERTY_SOURCE_TEMPLATE(Path::FeatureAreaPython, Path::FeatureArea)
PROPERTY_SOURCE_TEMPLATE(Path::FeatureAreaViewPython, Path::FeatureAreaView)
template<> const char* Path::FeatureAreaPython::getViewProviderName(void) const {
template<> const char* Path::FeatureAreaPython::getViewProviderName() const {
return "PathGui::ViewProviderAreaPython";
}
template<> const char* Path::FeatureAreaViewPython::getViewProviderName(void) const {
template<> const char* Path::FeatureAreaViewPython::getViewProviderName() const {
return "PathGui::ViewProviderAreaViewPython";
}
/// @endcond

View File

@@ -40,19 +40,19 @@ class PathExport FeatureArea : public Part::Feature
public:
/// Constructor
FeatureArea(void);
FeatureArea();
virtual ~FeatureArea();
Area &getArea();
const std::vector<TopoDS_Shape> &getShapes();
/// returns the type name of the ViewProvider
virtual const char* getViewProviderName(void) const {
virtual const char* getViewProviderName() const {
return "PathGui::ViewProviderArea";
}
virtual App::DocumentObjectExecReturn *execute(void);
virtual short mustExecute(void) const;
virtual PyObject *getPyObject(void);
virtual App::DocumentObjectExecReturn *execute();
virtual short mustExecute() const;
virtual PyObject *getPyObject();
App::PropertyLinkList Sources;
Part::PropertyPartShape WorkPlane;
@@ -78,14 +78,14 @@ class PathExport FeatureAreaView : public Part::Feature
public:
/// Constructor
FeatureAreaView(void);
FeatureAreaView();
std::list<TopoDS_Shape> getShapes();
virtual const char* getViewProviderName(void) const {
virtual const char* getViewProviderName() const {
return "PathGui::ViewProviderAreaView";
}
virtual App::DocumentObjectExecReturn *execute(void);
virtual App::DocumentObjectExecReturn *execute();
App::PropertyLink Source;
App::PropertyInteger SectionIndex;

View File

@@ -36,7 +36,7 @@ using namespace Path;
// returns a string which represent the object e.g. when printed in python
std::string FeatureAreaPy::representation(void) const
std::string FeatureAreaPy::representation() const
{
return std::string("<Path::FeatureArea>");
}
@@ -81,7 +81,7 @@ PyObject* FeatureAreaPy::setParams(PyObject *args, PyObject *keywds)
return Py_None;
}
Py::Object FeatureAreaPy::getWorkPlane(void) const {
Py::Object FeatureAreaPy::getWorkPlane() const {
return Part::shape2pyshape(getFeatureAreaPtr()->getArea().getPlane());
}

View File

@@ -44,7 +44,7 @@ Feature::~Feature()
{
}
short Feature::mustExecute(void) const
short Feature::mustExecute() const
{
return App::GeoFeature::mustExecute();
}
@@ -68,7 +68,7 @@ void Feature::onChanged(const App::Property* prop)
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Path::FeaturePython, Path::Feature)
template<> const char* Path::FeaturePython::getViewProviderName(void) const {
template<> const char* Path::FeaturePython::getViewProviderName() const {
return "PathGui::ViewProviderPathPython";
}
/// @endcond

View File

@@ -48,7 +48,7 @@ FeatureCompound::~FeatureCompound()
{
}
App::DocumentObjectExecReturn *FeatureCompound::execute(void)
App::DocumentObjectExecReturn *FeatureCompound::execute()
{
const std::vector<DocumentObject*> &Paths = Group.getValues();
Path::Toolpath result;
@@ -121,7 +121,7 @@ PyObject *FeatureCompound::getPyObject()
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Path::FeatureCompoundPython, Path::FeatureCompound)
template<> const char* Path::FeatureCompoundPython::getViewProviderName(void) const {
template<> const char* Path::FeatureCompoundPython::getViewProviderName() const {
return "PathGui::ViewProviderPathCompoundPython";
}
/// @endcond

View File

@@ -34,7 +34,7 @@ using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string FeaturePathCompoundPy::representation(void) const
std::string FeaturePathCompoundPy::representation() const
{
return std::string("<Path::FeatureCompound>");
}

View File

@@ -64,7 +64,7 @@ FeatureShape::~FeatureShape()
{
}
App::DocumentObjectExecReturn *FeatureShape::execute(void)
App::DocumentObjectExecReturn *FeatureShape::execute()
{
Toolpath path;
std::vector<App::DocumentObject*> links = Sources.getValues();
@@ -97,7 +97,7 @@ App::DocumentObjectExecReturn *FeatureShape::execute(void)
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Path::FeatureShapePython, Path::FeatureShape)
template<> const char* Path::FeatureShapePython::getViewProviderName(void) const {
template<> const char* Path::FeatureShapePython::getViewProviderName() const {
return "PathGui::ViewProviderPathShape";
}
/// @endcond

View File

@@ -47,7 +47,7 @@ class PathExport FeatureShape : public Path::Feature
public:
/// Constructor
FeatureShape(void);
FeatureShape();
virtual ~FeatureShape();
// Part::PropertyPartShape Shape;
@@ -58,11 +58,11 @@ public:
//@{
/// recalculate the feature
virtual App::DocumentObjectExecReturn *execute(void);
virtual App::DocumentObjectExecReturn *execute();
//@}
/// returns the type name of the ViewProvider
virtual const char* getViewProviderName(void) const {
virtual const char* getViewProviderName() const {
return "PathGui::ViewProviderPathShape";
}

View File

@@ -82,7 +82,7 @@ Toolpath &Toolpath::operator=(const Toolpath& otherPath)
return *this;
}
void Toolpath::clear(void)
void Toolpath::clear()
{
for(std::vector<Command*>::iterator it = vpcCommands.begin();it!=vpcCommands.end();++it)
delete ( *it );
@@ -357,7 +357,7 @@ void Toolpath::setFromGCode(const std::string instr)
recalculate();
}
std::string Toolpath::toGCode(void) const
std::string Toolpath::toGCode() const
{
std::string result;
for (std::vector<Command*>::const_iterator it=vpcCommands.begin();it!=vpcCommands.end();++it) {
@@ -367,7 +367,7 @@ std::string Toolpath::toGCode(void) const
return result;
}
void Toolpath::recalculate(void) // recalculates the path cache
void Toolpath::recalculate() // recalculates the path cache
{
if(vpcCommands.empty())
@@ -432,7 +432,7 @@ void Toolpath::recalculate(void) // recalculates the path cache
// reimplemented from base class
unsigned int Toolpath::getMemSize (void) const
unsigned int Toolpath::getMemSize () const
{
return toGCode().size();
}

View File

@@ -36,7 +36,7 @@
using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string PathPy::representation(void) const
std::string PathPy::representation() const
{
std::stringstream str;
str.precision(5);
@@ -86,7 +86,7 @@ int PathPy::PyInit(PyObject* args, PyObject* /*kwd*/)
// Commands get/set
Py::List PathPy::getCommands(void) const
Py::List PathPy::getCommands() const
{
Py::List list;
for(unsigned int i = 0; i < getToolpathPtr()->getSize(); i++)
@@ -107,7 +107,7 @@ void PathPy::setCommands(Py::List list)
}
}
Py::Object PathPy::getCenter(void) const
Py::Object PathPy::getCenter() const
{
return Py::Vector(getToolpathPtr()->getCenter());
}
@@ -119,17 +119,17 @@ void PathPy::setCenter(Py::Object obj)
// read-only attributes
Py::Float PathPy::getLength(void) const
Py::Float PathPy::getLength() const
{
return Py::Float(getToolpathPtr()->getLength());
}
Py::Long PathPy::getSize(void) const
Py::Long PathPy::getSize() const
{
return Py::Long((long)getToolpathPtr()->getSize());
}
Py::Object PathPy::getBoundBox(void) const
Py::Object PathPy::getBoundBox() const
{
return Py::BoundingBox(getToolpathPtr()->getBoundBox());
}

View File

@@ -60,12 +60,12 @@ void PropertyPath::setValue(const Toolpath& pa)
}
const Toolpath &PropertyPath::getValue(void)const
const Toolpath &PropertyPath::getValue()const
{
return _Path;
}
PyObject *PropertyPath::getPyObject(void)
PyObject *PropertyPath::getPyObject()
{
return new PathPy(new Toolpath(_Path));
}
@@ -83,7 +83,7 @@ void PropertyPath::setPyObject(PyObject *value)
}
}
App::Property *PropertyPath::Copy(void) const
App::Property *PropertyPath::Copy() const
{
PropertyPath *prop = new PropertyPath();
prop->_Path = this->_Path;
@@ -98,7 +98,7 @@ void PropertyPath::Paste(const App::Property &from)
hasSetValue();
}
unsigned int PropertyPath::getMemSize (void) const
unsigned int PropertyPath::getMemSize () const
{
return _Path.getMemSize();
}

View File

@@ -58,12 +58,12 @@ void PropertyTool::setValue(const Tool& tt)
}
const Tool &PropertyTool::getValue(void)const
const Tool &PropertyTool::getValue()const
{
return _Tool;
}
PyObject *PropertyTool::getPyObject(void)
PyObject *PropertyTool::getPyObject()
{
return new ToolPy(new Tool(_Tool));
}
@@ -81,7 +81,7 @@ void PropertyTool::setPyObject(PyObject *value)
}
}
App::Property *PropertyTool::Copy(void) const
App::Property *PropertyTool::Copy() const
{
PropertyTool *prop = new PropertyTool();
prop->_Tool = this->_Tool;
@@ -96,7 +96,7 @@ void PropertyTool::Paste(const App::Property &from)
hasSetValue();
}
unsigned int PropertyTool::getMemSize (void) const
unsigned int PropertyTool::getMemSize () const
{
return _Tool.getMemSize();
}

View File

@@ -58,12 +58,12 @@ void PropertyTooltable::setValue(const Tooltable& tt)
}
const Tooltable &PropertyTooltable::getValue(void)const
const Tooltable &PropertyTooltable::getValue()const
{
return _Tooltable;
}
PyObject *PropertyTooltable::getPyObject(void)
PyObject *PropertyTooltable::getPyObject()
{
return new TooltablePy(new Tooltable(_Tooltable));
}
@@ -81,7 +81,7 @@ void PropertyTooltable::setPyObject(PyObject *value)
}
}
App::Property *PropertyTooltable::Copy(void) const
App::Property *PropertyTooltable::Copy() const
{
PropertyTooltable *prop = new PropertyTooltable();
prop->_Tooltable = this->_Tooltable;
@@ -96,7 +96,7 @@ void PropertyTooltable::Paste(const App::Property &from)
hasSetValue();
}
unsigned int PropertyTooltable::getMemSize (void) const
unsigned int PropertyTooltable::getMemSize () const
{
return _Tooltable.getMemSize();
}

View File

@@ -69,7 +69,7 @@ Tool::~Tool()
}
// Reimplemented from base class
unsigned int Tool::getMemSize (void) const
unsigned int Tool::getMemSize () const
{
return 0;
}
@@ -108,7 +108,7 @@ void Tool::Restore(XMLReader &reader)
}
const std::vector<std::string> Tool::ToolTypes(void)
const std::vector<std::string> Tool::ToolTypes()
{
std::vector<std::string> toolTypes(13);
toolTypes[0] ="EndMill";
@@ -128,7 +128,7 @@ const std::vector<std::string> Tool::ToolTypes(void)
}
const std::vector<std::string> Tool::ToolMaterials(void)
const std::vector<std::string> Tool::ToolMaterials()
{
std::vector<std::string> toolMat(7);
toolMat[0] ="Carbide";

View File

@@ -39,7 +39,7 @@ using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string ToolPy::representation(void) const
std::string ToolPy::representation() const
{
std::stringstream str;
str.precision(5);
@@ -111,7 +111,7 @@ int ToolPy::PyInit(PyObject* args, PyObject* kwd)
// attributes get/setters
Py::String ToolPy::getName(void) const
Py::String ToolPy::getName() const
{
return Py::String(getToolPtr()->Name.c_str());
}
@@ -122,7 +122,7 @@ void ToolPy::setName(Py::String arg)
getToolPtr()->Name = name;
}
Py::String ToolPy::getToolType(void) const
Py::String ToolPy::getToolType() const
{
return Py::String(Tool::TypeName(getToolPtr()->Type));
}
@@ -134,7 +134,7 @@ void ToolPy::setToolType(Py::String arg)
}
Py::String ToolPy::getMaterial(void) const
Py::String ToolPy::getMaterial() const
{
return Py::String(Tool::MaterialName(getToolPtr()->Material));
}
@@ -145,7 +145,7 @@ void ToolPy::setMaterial(Py::String arg)
getToolPtr()->Material = Tool::getToolMaterial(matStr);
}
Py::Float ToolPy::getDiameter(void) const
Py::Float ToolPy::getDiameter() const
{
return Py::Float(getToolPtr()->Diameter);
}
@@ -155,7 +155,7 @@ void ToolPy::setDiameter(Py::Float arg)
getToolPtr()->Diameter = arg.operator double();
}
Py::Float ToolPy::getLengthOffset(void) const
Py::Float ToolPy::getLengthOffset() const
{
return Py::Float(getToolPtr()->LengthOffset);
}
@@ -165,7 +165,7 @@ void ToolPy::setLengthOffset(Py::Float arg)
getToolPtr()->LengthOffset = arg.operator double();
}
Py::Float ToolPy::getFlatRadius(void) const
Py::Float ToolPy::getFlatRadius() const
{
return Py::Float(getToolPtr()->FlatRadius);
}
@@ -175,7 +175,7 @@ void ToolPy::setFlatRadius(Py::Float arg)
getToolPtr()->FlatRadius = arg.operator double();
}
Py::Float ToolPy::getCornerRadius(void) const
Py::Float ToolPy::getCornerRadius() const
{
return Py::Float(getToolPtr()->CornerRadius);
}
@@ -185,7 +185,7 @@ void ToolPy::setCornerRadius(Py::Float arg)
getToolPtr()->CornerRadius = arg.operator double();
}
Py::Float ToolPy::getCuttingEdgeAngle(void) const
Py::Float ToolPy::getCuttingEdgeAngle() const
{
return Py::Float(getToolPtr()->CuttingEdgeAngle);
}
@@ -195,7 +195,7 @@ void ToolPy::setCuttingEdgeAngle(Py::Float arg)
getToolPtr()->CuttingEdgeAngle = arg.operator double();
}
Py::Float ToolPy::getCuttingEdgeHeight(void) const
Py::Float ToolPy::getCuttingEdgeHeight() const
{
return Py::Float(getToolPtr()->CuttingEdgeHeight);
}

View File

@@ -79,7 +79,7 @@ void Tooltable::deleteTool(int pos)
}
}
unsigned int Tooltable::getMemSize (void) const
unsigned int Tooltable::getMemSize () const
{
return 0;
}

View File

@@ -39,7 +39,7 @@ using namespace Path;
#define PYINT_ASLONG(o) PyLong_AsLong(o)
// returns a string which represents the object e.g. when printed in python
std::string TooltablePy::representation(void) const
std::string TooltablePy::representation() const
{
std::stringstream str;
str.precision(5);
@@ -94,7 +94,7 @@ int TooltablePy::PyInit(PyObject* args, PyObject* /*kwd*/)
// Commands get/set
Py::Dict TooltablePy::getTools(void) const
Py::Dict TooltablePy::getTools() const
{
Py::Dict dict;
for(std::map<int,Path::ToolPtr>::iterator i = getTooltablePtr()->Tools.begin(); i != getTooltablePtr()->Tools.end(); ++i) {
@@ -230,7 +230,7 @@ int TooltablePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
return 0;
}
Py::Int TooltablePy::getVersion(void) const
Py::Int TooltablePy::getVersion() const
{
return Py::Int(getTooltablePtr()->Version);
}
@@ -239,7 +239,7 @@ void TooltablePy::setVersion(Py::Int version) {
getTooltablePtr()->Version = version;
}
Py::String TooltablePy::getName(void) const
Py::String TooltablePy::getName() const
{
return Py::String(getTooltablePtr()->Name.c_str());
}

View File

@@ -54,7 +54,7 @@ VoronoiCell::VoronoiCell(Voronoi::diagram_type *d, const Voronoi::diagram_type::
VoronoiCell::~VoronoiCell() {
}
bool VoronoiCell::isBound(void) const {
bool VoronoiCell::isBound() const {
if (ptr && dia.isValid() && index != Voronoi::InvalidIndex) {
if (&(dia->cells()[index]) == ptr) {
return true;

View File

@@ -36,7 +36,7 @@
using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string VoronoiCellPy::representation(void) const
std::string VoronoiCellPy::representation() const
{
std::stringstream ss;
ss.precision(5);
@@ -103,7 +103,7 @@ VoronoiCell* getVoronoiCellFromPy(const VoronoiCellPy *c, PyObject *args = nullp
return self;
}
Py::Long VoronoiCellPy::getIndex(void) const {
Py::Long VoronoiCellPy::getIndex() const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
return Py::Long(c->dia->index(c->ptr));
@@ -111,7 +111,7 @@ Py::Long VoronoiCellPy::getIndex(void) const {
return Py::Long(-1);
}
Py::Long VoronoiCellPy::getColor(void) const {
Py::Long VoronoiCellPy::getColor() const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
Voronoi::color_type color = c->ptr->color() & Voronoi::ColorMask;
@@ -124,20 +124,20 @@ void VoronoiCellPy::setColor(Py::Long color) {
getCellFromPy(this)->color(long(color) & Voronoi::ColorMask);
}
Py::Long VoronoiCellPy::getSourceIndex(void) const
Py::Long VoronoiCellPy::getSourceIndex() const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
long index = c->ptr->source_index();
return Py::Long(index);
}
Py::Int VoronoiCellPy::getSourceCategory(void) const
Py::Int VoronoiCellPy::getSourceCategory() const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
return Py::Int(c->ptr->source_category());
}
Py::String VoronoiCellPy::getSourceCategoryName(void) const
Py::String VoronoiCellPy::getSourceCategoryName() const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
switch (c->ptr->source_category()) {
@@ -152,7 +152,7 @@ Py::String VoronoiCellPy::getSourceCategoryName(void) const
return Py::String("");
}
Py::Object VoronoiCellPy::getIncidentEdge(void) const
Py::Object VoronoiCellPy::getIncidentEdge() const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
return Py::asObject(new VoronoiEdgePy(new VoronoiEdge(c->dia, c->ptr->incident_edge())));

View File

@@ -55,7 +55,7 @@ VoronoiEdge::VoronoiEdge(Voronoi::diagram_type *d, const Voronoi::diagram_type::
VoronoiEdge::~VoronoiEdge() {
}
bool VoronoiEdge::isBound(void) const {
bool VoronoiEdge::isBound() const {
if (ptr && dia.isValid() && index != Voronoi::InvalidIndex) {
if (&(dia->edges()[index]) == ptr) {
return true;

View File

@@ -195,7 +195,7 @@ std::ostream& operator<<(std::ostream& os, const Voronoi::segment_type &s) {
// returns a string which represents the object e.g. when printed in python
std::string VoronoiEdgePy::representation(void) const
std::string VoronoiEdgePy::representation() const
{
std::stringstream ss;
ss.precision(5);
@@ -274,7 +274,7 @@ VoronoiEdge* getVoronoiEdgeFromPy(const VoronoiEdgePy *e, PyObject *args = nullp
return self;
}
Py::Long VoronoiEdgePy::getIndex(void) const {
Py::Long VoronoiEdgePy::getIndex() const {
VoronoiEdge *e = getVoronoiEdgePtr();
if (e->isBound()) {
return Py::Long(e->dia->index(e->ptr));
@@ -282,7 +282,7 @@ Py::Long VoronoiEdgePy::getIndex(void) const {
return Py::Long(-1);
}
Py::Long VoronoiEdgePy::getColor(void) const {
Py::Long VoronoiEdgePy::getColor() const {
VoronoiEdge *e = getVoronoiEdgePtr();
if (e->isBound()) {
Voronoi::color_type color = e->ptr->color() & Voronoi::ColorMask;
@@ -295,7 +295,7 @@ void VoronoiEdgePy::setColor(Py::Long color) {
getEdgeFromPy(this)->color(long(color) & Voronoi::ColorMask);
}
Py::List VoronoiEdgePy::getVertices(void) const
Py::List VoronoiEdgePy::getVertices() const
{
Py::List list;
VoronoiEdge *e = getVoronoiEdgePtr();
@@ -318,37 +318,37 @@ Py::List VoronoiEdgePy::getVertices(void) const
return list;
}
Py::Object VoronoiEdgePy::getTwin(void) const
Py::Object VoronoiEdgePy::getTwin() const
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this);
return Py::asObject(new VoronoiEdgePy(new VoronoiEdge(e->dia, e->ptr->twin())));
}
Py::Object VoronoiEdgePy::getNext(void) const
Py::Object VoronoiEdgePy::getNext() const
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this);
return Py::asObject(new VoronoiEdgePy(new VoronoiEdge(e->dia, e->ptr->next())));
}
Py::Object VoronoiEdgePy::getPrev(void) const
Py::Object VoronoiEdgePy::getPrev() const
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this);
return Py::asObject(new VoronoiEdgePy(new VoronoiEdge(e->dia, e->ptr->prev())));
}
Py::Object VoronoiEdgePy::getRotNext(void) const
Py::Object VoronoiEdgePy::getRotNext() const
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this);
return Py::asObject(new VoronoiEdgePy(new VoronoiEdge(e->dia, e->ptr->rot_next())));
}
Py::Object VoronoiEdgePy::getRotPrev(void) const
Py::Object VoronoiEdgePy::getRotPrev() const
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this);
return Py::asObject(new VoronoiEdgePy(new VoronoiEdge(e->dia, e->ptr->rot_prev())));
}
Py::Object VoronoiEdgePy::getCell(void) const
Py::Object VoronoiEdgePy::getCell() const
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this);
return Py::asObject(new VoronoiCellPy(new VoronoiCell(e->dia, e->ptr->cell())));

View File

@@ -41,7 +41,7 @@
using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string VoronoiPy::representation(void) const
std::string VoronoiPy::representation() const
{
std::stringstream ss;
ss.precision(5);
@@ -143,7 +143,7 @@ PyObject* VoronoiPy::numVertices(PyObject *args)
return PyLong_FromLong(getVoronoiPtr()->numVertices());
}
Py::List VoronoiPy::getVertices(void) const {
Py::List VoronoiPy::getVertices() const {
Py::List list;
for (int i=0; i<getVoronoiPtr()->numVertices(); ++i) {
list.append(Py::asObject(new VoronoiVertexPy(getVoronoiPtr()->create<VoronoiVertex>(i))));
@@ -151,7 +151,7 @@ Py::List VoronoiPy::getVertices(void) const {
return list;
}
Py::List VoronoiPy::getEdges(void) const {
Py::List VoronoiPy::getEdges() const {
Py::List list;
for (int i=0; i<getVoronoiPtr()->numEdges(); ++i) {
list.append(Py::asObject(new VoronoiEdgePy(getVoronoiPtr()->create<VoronoiEdge>(i))));
@@ -159,7 +159,7 @@ Py::List VoronoiPy::getEdges(void) const {
return list;
}
Py::List VoronoiPy::getCells(void) const {
Py::List VoronoiPy::getCells() const {
Py::List list;
for (int i=0; i<getVoronoiPtr()->numCells(); ++i) {
list.append(Py::asObject(new VoronoiCellPy(getVoronoiPtr()->create<VoronoiCell>(i))));

View File

@@ -55,7 +55,7 @@ VoronoiVertex::VoronoiVertex(Voronoi::diagram_type *d, const Voronoi::diagram_ty
VoronoiVertex::~VoronoiVertex() {
}
bool VoronoiVertex::isBound(void) const {
bool VoronoiVertex::isBound() const {
if (ptr && dia.isValid() && index != Voronoi::InvalidIndex) {
if (&(dia->vertices()[index]) == ptr) {
return true;

View File

@@ -36,7 +36,7 @@
using namespace Path;
// returns a string which represents the object e.g. when printed in python
std::string VoronoiVertexPy::representation(void) const
std::string VoronoiVertexPy::representation() const
{
std::stringstream ss;
ss.precision(5);
@@ -104,7 +104,7 @@ VoronoiVertex* getVoronoiVertexFromPy(const VoronoiVertexPy *v, PyObject *args =
}
Py::Long VoronoiVertexPy::getIndex(void) const {
Py::Long VoronoiVertexPy::getIndex() const {
VoronoiVertex *v = getVoronoiVertexPtr();
if (v->isBound()) {
return Py::Long(v->dia->index(v->ptr));
@@ -112,7 +112,7 @@ Py::Long VoronoiVertexPy::getIndex(void) const {
return Py::Long(-1);
}
Py::Long VoronoiVertexPy::getColor(void) const {
Py::Long VoronoiVertexPy::getColor() const {
VoronoiVertex *v = getVoronoiVertexPtr();
if (v->isBound()) {
Voronoi::color_type color = v->ptr->color() & Voronoi::ColorMask;
@@ -125,13 +125,13 @@ void VoronoiVertexPy::setColor(Py::Long color) {
getVertexFromPy(this)->color(long(color) & Voronoi::ColorMask);
}
Py::Float VoronoiVertexPy::getX(void) const
Py::Float VoronoiVertexPy::getX() const
{
VoronoiVertex *v = getVoronoiVertexFromPy(this);
return Py::Float(v->ptr->x() / v->dia->getScale());
}
Py::Float VoronoiVertexPy::getY(void) const
Py::Float VoronoiVertexPy::getY() const
{
VoronoiVertex *v = getVoronoiVertexFromPy(this);
return Py::Float(v->ptr->y() / v->dia->getScale());

View File

@@ -36,7 +36,7 @@
// use a different name to CreateCommand()
void CreatePathCommands(void);
void CreatePathCommands();
void loadPathResource()
{

View File

@@ -123,7 +123,7 @@ void CmdPathArea::activated(int iMsg)
updateActive();
}
bool CmdPathArea::isActive(void)
bool CmdPathArea::isActive()
{
return hasActiveDocument();
}
@@ -210,7 +210,7 @@ void CmdPathAreaWorkplane::activated(int iMsg)
updateActive();
}
bool CmdPathAreaWorkplane::isActive(void)
bool CmdPathAreaWorkplane::isActive()
{
return !getSelection().getSelectionEx(nullptr, Path::FeatureArea::getClassTypeId()).empty();
}
@@ -263,7 +263,7 @@ void CmdPathCompound::activated(int iMsg)
}
}
bool CmdPathCompound::isActive(void)
bool CmdPathCompound::isActive()
{
return hasActiveDocument();
}
@@ -332,14 +332,14 @@ void CmdPathShape::activated(int iMsg)
updateActive();
}
bool CmdPathShape::isActive(void)
bool CmdPathShape::isActive()
{
return hasActiveDocument();
}
void CreatePathCommands(void)
void CreatePathCommands()
{
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
rcCmdMgr.addCommand(new CmdPathCompound());

View File

@@ -79,7 +79,7 @@ TaskWidgetPathCompound::~TaskWidgetPathCompound()
delete ui;
}
std::vector<std::string> TaskWidgetPathCompound::getList(void) const {
std::vector<std::string> TaskWidgetPathCompound::getList() const {
std::vector<std::string> names;
for(int i = 0; i < ui->PathsList->count(); i++)
{

View File

@@ -44,7 +44,7 @@ public:
TaskWidgetPathCompound(ViewProviderPathCompound *CompoundView, QWidget *parent=nullptr);
~TaskWidgetPathCompound();
std::vector<std::string> getList(void) const;
std::vector<std::string> getList() const;
protected:
void changeEvent(QEvent *e);

View File

@@ -42,7 +42,7 @@ ViewProviderArea::~ViewProviderArea()
{
}
std::vector<App::DocumentObject*> ViewProviderArea::claimChildren(void) const
std::vector<App::DocumentObject*> ViewProviderArea::claimChildren() const
{
return std::vector<App::DocumentObject*>(
static_cast<Path::FeatureArea*>(getObject())->Sources.getValues());
@@ -126,7 +126,7 @@ ViewProviderAreaView::~ViewProviderAreaView()
{
}
std::vector<App::DocumentObject*> ViewProviderAreaView::claimChildren(void) const
std::vector<App::DocumentObject*> ViewProviderAreaView::claimChildren() const
{
std::vector<App::DocumentObject*> ret;
Path::FeatureAreaView* feature = static_cast<Path::FeatureAreaView*>(getObject());

View File

@@ -280,7 +280,7 @@ void ViewProviderPath::attach(App::DocumentObject *pcObj)
addDisplayMaskMode(pcPathRoot, "Waypoints");
}
bool ViewProviderPath::useNewSelectionModel(void) const {
bool ViewProviderPath::useNewSelectionModel() const {
return SelectionStyle.getValue()!=2;
}
@@ -291,7 +291,7 @@ void ViewProviderPath::setDisplayMode(const char* ModeName)
inherited::setDisplayMode( ModeName );
}
std::vector<std::string> ViewProviderPath::getDisplayModes(void) const
std::vector<std::string> ViewProviderPath::getDisplayModes() const
{
std::vector<std::string> StrList;
StrList.emplace_back("Waypoints");

View File

@@ -55,7 +55,7 @@ void ViewProviderPathCompound::unsetEdit(int ModNum)
Gui::Control().closeDialog();
}
std::vector<App::DocumentObject*> ViewProviderPathCompound::claimChildren(void)const
std::vector<App::DocumentObject*> ViewProviderPathCompound::claimChildren()const
{
return std::vector<App::DocumentObject*>(static_cast<Path::FeatureCompound *>(getObject())->Group.getValues());
}

View File

@@ -42,7 +42,7 @@ QIcon ViewProviderPathShape::getIcon() const
return Gui::BitmapFactory().pixmap("Path_Shape");
}
std::vector<App::DocumentObject*> ViewProviderPathShape::claimChildren(void) const
std::vector<App::DocumentObject*> ViewProviderPathShape::claimChildren() const
{
return std::vector<App::DocumentObject*>(
static_cast<Path::FeatureShape*>(getObject())->Sources.getValues());

View File

@@ -37,7 +37,7 @@
using namespace PathSimulator;
// returns a string which represents the object e.g. when printed in python
std::string PathSimPy::representation(void) const
std::string PathSimPy::representation() const
{
return std::string("<PathSim object>");
}
@@ -122,7 +122,7 @@ PyObject* PathSimPy::ApplyCommand(PyObject * args, PyObject * kwds)
return newposPy;
}
Py::Object PathSimPy::getTool(void) const
Py::Object PathSimPy::getTool() const
{
//return Py::Object();
throw Py::AttributeError("Not yet implemented");