import salome_pluginsmanager
+import os
+from qtsalome import QIcon
+
# Plugins entry points
# For new plugins create a function that shows related dialog,
# then add it into plugin manager below.
# Add plugins to a manager with a given menu titles and tooltips
+def get_icon(icon_file):
+ """
+ Creates an icon from a given file in default GEOM resource location.
+ """
+
+ icon_path = os.path.join(os.getenv('CSF_ShHealingDefaults'), icon_file)
+ return QIcon(icon_path)
+
salome_pluginsmanager.AddFunction(
'Locate Subshapes',
'Locates the sub-shapes of a compound by length, area or volume depending on whether it is an '
'EDGE, a FACE or a SOLID',
- locate_subshapes)
+ locate_subshapes,
+ get_icon('subshape.png'))
salome_pluginsmanager.AddFunction(
'Merge Faces',
'Merges selected faces with a given precision',
- merge_faces)
+ merge_faces,
+ get_icon('union_faces.png'))
salome_pluginsmanager.AddFunction(
'Union Edges',
'Merges edges of selected face',
- union_edges)
+ union_edges,
+ get_icon('fuse.png'))