Add Nodes interface to FemMesh (for usage e.g. calculating eigen transformation)
This commit is contained in:
@@ -84,13 +84,19 @@
|
||||
<UserDocu>Make a copy of this FEM mesh.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="NodeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of nodes in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="EdgeCount" ReadOnly="true">
|
||||
<Attribute Name="Nodes" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Tuple of node points.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Nodes" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NodeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of nodes in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="EdgeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of edges in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
|
||||
@@ -439,6 +439,20 @@ PyObject* FemMeshPy::setTransform(PyObject *args)
|
||||
|
||||
// ===== Atributes ============================================================
|
||||
|
||||
Py::Tuple FemMeshPy::getNodes(void) const
|
||||
{
|
||||
int count = getFemMeshPtr()->getSMesh()->GetMeshDS()->NbNodes();
|
||||
Py::Tuple tup(count);
|
||||
|
||||
SMDS_NodeIteratorPtr aNodeIter = getFemMeshPtr()->getSMesh()->GetMeshDS()->nodesIterator();
|
||||
for (int i=0;aNodeIter->more();i++) {
|
||||
const SMDS_MeshNode* aNode = aNodeIter->next();
|
||||
tup.setItem(i, Py::asObject(new Base::VectorPy(Base::Vector3d(aNode->X(),aNode->Y(),aNode->Z()))));
|
||||
}
|
||||
|
||||
return tup;
|
||||
}
|
||||
|
||||
Py::Int FemMeshPy::getNodeCount(void) const
|
||||
{
|
||||
return Py::Int(getFemMeshPtr()->getSMesh()->NbNodes());
|
||||
|
||||
Reference in New Issue
Block a user