mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-11 05:47:27 +05:00
70 lines
2.2 KiB
Python
70 lines
2.2 KiB
Python
![]() |
# -*- coding: utf-8 -*-
|
||
|
# Copyright (C) 2014-2024 EDF
|
||
|
#
|
||
|
# This library is free software; you can redistribute it and/or
|
||
|
# modify it under the terms of the GNU Lesser General Public
|
||
|
# License as published by the Free Software Foundation; either
|
||
|
# version 2.1 of the License, or (at your option) any later version.
|
||
|
#
|
||
|
# This library is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
# Lesser General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU Lesser General Public
|
||
|
# License along with this library; if not, write to the Free Software
|
||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||
|
#
|
||
|
# See https://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||
|
#
|
||
|
# Author : Konstantin Leontev (OpenCascade S.A.S)
|
||
|
|
||
|
import salome_pluginsmanager
|
||
|
|
||
|
# Plugins entry points
|
||
|
# For new plugins create a function that shows related dialog,
|
||
|
# then add it into plugin manager below.
|
||
|
|
||
|
def locate_subshapes(context):
|
||
|
"""
|
||
|
Opens Locate Subshapes plugin's dialog.
|
||
|
"""
|
||
|
from salome.geom.geomrepairadv.locate_subshapes import LocateSubShapesDlg
|
||
|
dialog = LocateSubShapesDlg()
|
||
|
dialog.show()
|
||
|
|
||
|
def merge_faces(context):
|
||
|
"""
|
||
|
Opens Merge Faces plugin's dialog.
|
||
|
"""
|
||
|
from salome.geom.geomrepairadv.merge_faces import MergeFacesDlg
|
||
|
dialog = MergeFacesDlg()
|
||
|
dialog.show()
|
||
|
|
||
|
def union_edges(context):
|
||
|
"""
|
||
|
Opens Union Edges plugin's dialog.
|
||
|
"""
|
||
|
from salome.geom.geomrepairadv.union_edges import UnionEdgesDlg
|
||
|
dialog = UnionEdgesDlg()
|
||
|
dialog.show()
|
||
|
|
||
|
|
||
|
# Add plugins to a manager with a given menu titles and tooltips
|
||
|
|
||
|
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)
|
||
|
|
||
|
salome_pluginsmanager.AddFunction(
|
||
|
'Merge Faces',
|
||
|
'Merges selected faces with a given precision',
|
||
|
merge_faces)
|
||
|
|
||
|
salome_pluginsmanager.AddFunction(
|
||
|
'Union Edges',
|
||
|
'Merges edges of selected face',
|
||
|
union_edges)
|