+ def Get1DBranches( self, edges, startNode = 0 ):
+ """
+ Partition given 1D elements into groups of contiguous edges.
+ A node where number of meeting edges != 2 is a group end.
+ An optional startNode is used to orient groups it belongs to.
+
+ Returns:
+ A list of edge groups and a list of corresponding node groups,
+ where the group is a list of IDs of edges or elements, like follows
+ [[[branch_edges_1],[branch_edges_2]], [[branch_nodes_1],[branch_nodes_2]]].
+ If a group is closed, the first and last nodes of the group are same.
+ """
+ if isinstance( edges, Mesh ):
+ edges = edges.GetMesh()
+ unRegister = genObjUnRegister()
+ if isinstance( edges, list ):
+ edges = self.GetIDSource( edges, SMESH.EDGE )
+ unRegister.set( edges )
+ return self.editor.Get1DBranches( edges, startNode )
+
+ def FindSharpEdges( self, angle, addExisting=False ):
+ """
+ Return sharp edges of faces and non-manifold ones.
+ Optionally add existing edges.
+
+ Parameters:
+ angle: angle (in degrees) between normals of adjacent faces to detect sharp edges
+ addExisting: to return existing edges (1D elements) as well
+
+ Returns:
+ list of FaceEdge structures
+ """
+ angle = ParseParameters( angle )[0]
+ return self.editor.FindSharpEdges( angle, addExisting )
+