Skip to content

Commit

Permalink
Unified voronoi indices for python to be of type long
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert authored and sliptonic committed Sep 29, 2020
1 parent ebae99c commit e3c476a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/Mod/Path/App/VoronoiCellPy.xml
Expand Up @@ -20,19 +20,19 @@
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Int"/>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Int"/>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="SourceIndex" ReadOnly="true">
<Documentation>
<UserDocu>Returns the index of the cell's source</UserDocu>
</Documentation>
<Parameter Name="SourceIndex" Type="Int"/>
<Parameter Name="SourceIndex" Type="Long"/>
</Attribute>
<Attribute Name="SourceCategory" ReadOnly="true">
<Documentation>
Expand Down
10 changes: 5 additions & 5 deletions src/Mod/Path/App/VoronoiCellPyImp.cpp
Expand Up @@ -111,12 +111,12 @@ VoronoiCell* getVoronoiCellFromPy(const VoronoiCellPy *c, PyObject *args = 0) {
return self;
}

Py::Int VoronoiCellPy::getIndex(void) const {
Py::Long VoronoiCellPy::getIndex(void) const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
return Py::Int(c->dia->index(c->ptr));
return Py::Long(c->dia->index(c->ptr));
}
return Py::Int(-1);
return Py::Long(-1);
}

Py::Long VoronoiCellPy::getColor(void) const {
Expand All @@ -131,10 +131,10 @@ void VoronoiCellPy::setColor(Py::Long color) {
getCellFromPy(this)->color(int(color) & Voronoi::ColorMask);
}

Py::Int VoronoiCellPy::getSourceIndex(void) const
Py::Long VoronoiCellPy::getSourceIndex(void) const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
return Py::Int(c->ptr->source_index());
return Py::Long(c->ptr->source_index());
}

Py::Int VoronoiCellPy::getSourceCategory(void) const
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Path/App/VoronoiEdgePy.xml
Expand Up @@ -20,13 +20,13 @@
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Int"/>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Int"/>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="Cell" ReadOnly="true">
<Documentation>
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Path/App/VoronoiEdgePyImp.cpp
Expand Up @@ -130,12 +130,12 @@ VoronoiEdge* getVoronoiEdgeFromPy(const VoronoiEdgePy *e, PyObject *args = 0) {
return self;
}

Py::Int VoronoiEdgePy::getIndex(void) const {
Py::Long VoronoiEdgePy::getIndex(void) const {
VoronoiEdge *e = getVoronoiEdgePtr();
if (e->isBound()) {
return Py::Int(e->dia->index(e->ptr));
return Py::Long(e->dia->index(e->ptr));
}
return Py::Int(-1);
return Py::Long(-1);
}

Py::Long VoronoiEdgePy::getColor(void) const {
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Path/App/VoronoiVertexPy.xml
Expand Up @@ -20,13 +20,13 @@
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Int"/>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Int"/>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="X" ReadOnly="true">
<Documentation>
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Path/App/VoronoiVertexPyImp.cpp
Expand Up @@ -113,12 +113,12 @@ VoronoiVertex* getVoronoiVertexFromPy(const VoronoiVertexPy *v, PyObject *args =
}


Py::Int VoronoiVertexPy::getIndex(void) const {
Py::Long VoronoiVertexPy::getIndex(void) const {
VoronoiVertex *v = getVoronoiVertexPtr();
if (v->isBound()) {
return Py::Int(v->dia->index(v->ptr));
return Py::Long(v->dia->index(v->ptr));
}
return Py::Int(-1);
return Py::Long(-1);
}

Py::Long VoronoiVertexPy::getColor(void) const {
Expand Down

0 comments on commit e3c476a

Please sign in to comment.