def edge_length(e): """ Compute length of an edge. :param afem.topology.entities.Edge e: The edge. :return: Edge length. :rtype: float """ return SMESH_Algo.EdgeLength_(e.object)
def is_degenerated(e): """ Check if the edge has no 3-D curve. :param afem.topology.entities.Edge e: The edge. :return: *True* if no 3-D curve, *False* otherwise. :rtype: bool """ return SMESH_Algo.isDegenerated_(e.object)
def is_straight(e): """ Check if the edge can be considered straight. :param afem.topology.entities.Edge e: The edge. :return: *True* if straight, *False* otherwise. :rtype: bool """ return SMESH_Algo.IsStraight_(e.object)
def is_continuous(e1, e2): """ Check if the two edges can be considered continuous. :param afem.topology.entities.Edge e1: The first edge. :param afem.topology.entities.Edge e2: The second edge. :return: *True* if continuous, *False* otherwise. :rtype: bool """ return SMESH_Algo.IsContinuous_(e1.object, e2.object)
def continuity(e1, e2): """ Calculate the continuity of the two edges. :param afem.topology.entities.Vertex e1: The first edge. :param afem.topology.entities.Vertex e2: The second edge. :return: The continuity. :rtype: OCCT.GeomAbs.GeomAbs_Shape """ return SMESH_Algo.Continuity_(e1.object, e2.object)
def vertex_node(v, mesh): """ Get a node built on a vertex. :param afem.topology.entities.Vertex v: The vertex. :param mesh: The mesh. :type mesh: afem.smesh.entities.Mesh or afem.smesh.entities.MeshDS :return: The node. :rtype: afem.smesh.entities.Node """ return Node(SMESH_Algo.VertexNode_(v.object, mesh.object))