Hello,
I have been reading the documentation of SMESH module, but couldn’t find the answer/function for the following:
- how to get the IDs of faces and edges(segments) for a cell.
so ifMesh.GetElementsByType( SMESH.VOLUME )[0]
is an hexahedron get a similar result toMesh.GetElemNodes( Mesh.GetElementsByType( SMESH.VOLUME )[0] )
but not for nodes but for faces.
similar to what in geom would be (for a compound):
solids=geompy.SubShapeAll(compound, geompy.ShapeType["SOLID"])
faceIDs=[]
for solid in solids:
facesSolid=geompy.SubShapeAll(solid, geompy.ShapeType["FACE"])
faceIDs.append(geompy.GetSubShapesIDs(compound,facesSolid)
- same as 1. but for edges IDs by specifying a face and nodes specifying the edge ID.
- get the length of a segment (1D element) by the ID of the element (as it was the result from 2.)