mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
[bos #38044][EDF] (2023-T3) Support for automatic reparation. Added menu icons from default GEOM directory.
This commit is contained in:
parent
9041c14056
commit
fa942b0885
@ -21,6 +21,9 @@
|
||||
|
||||
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.
|
||||
@ -52,18 +55,29 @@ def union_edges(context):
|
||||
|
||||
# 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'))
|
||||
|
Loading…
Reference in New Issue
Block a user