0000823: Extension of Facet class for getting vertex indices natively
This commit is contained in:
parent
71c7cfab68
commit
629cf6546c
|
@ -63,5 +63,17 @@ Get a list of intersection points with another triangle.
|
|||
</Documentation>
|
||||
<Parameter Name="Points" Type="List"/>
|
||||
</Attribute>
|
||||
</PythonExport>
|
||||
<Attribute Name="PointIndices" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>The index tuple of point vertices of the mesh this facet is built of</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PointIndices" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NeighbourIndices" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>The index tuple of neighbour facets of the mesh this facet is adjacent with</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NeighbourIndices" Type="Tuple"/>
|
||||
</Attribute>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
|
@ -144,6 +144,30 @@ Py::List FacetPy::getPoints(void) const
|
|||
return pts;
|
||||
}
|
||||
|
||||
Py::Tuple FacetPy::getPointIndices(void) const
|
||||
{
|
||||
FacetPy::PointerType face = this->getFacetPtr();
|
||||
if (!face->isBound())
|
||||
{ return Py::Tuple(); }
|
||||
|
||||
Py::Tuple idxTuple(3);
|
||||
for (int i=0; i<3; i++)
|
||||
{ idxTuple.setItem( i, Py::Int( (long)face->PIndex[i] ) ); }
|
||||
return idxTuple;
|
||||
}
|
||||
|
||||
Py::Tuple FacetPy::getNeighbourIndices(void) const
|
||||
{
|
||||
FacetPy::PointerType face = this->getFacetPtr();
|
||||
if (!face->isBound())
|
||||
{ return Py::Tuple(); }
|
||||
|
||||
Py::Tuple idxTuple(3);
|
||||
for (int i=0; i<3; i++)
|
||||
{ idxTuple.setItem( i, Py::Int( (long)face->NIndex[i] ) ); }
|
||||
return idxTuple;
|
||||
}
|
||||
|
||||
PyObject *FacetPy::getCustomAttributes(const char* attr) const
|
||||
{
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user