mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-07 10:27:28 +05:00
PR: reorganise smesh plugins and correct MeshCut when there are groups
This commit is contained in:
parent
ae4c8e00df
commit
3776dd7ec5
@ -26,3 +26,6 @@
|
|||||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
|
||||||
SUBDIRS = MeshCut padder
|
SUBDIRS = MeshCut padder
|
||||||
|
|
||||||
|
salomeplugins_PYTHON = \
|
||||||
|
smesh_plugins.py
|
||||||
|
@ -42,12 +42,12 @@ MeshCut_CPPFLAGS = $(MED3_INCLUDES)
|
|||||||
|
|
||||||
MeshCut_LDFLAGS = $(MED3_LIBS) $(HDF5_LIBS)
|
MeshCut_LDFLAGS = $(MED3_LIBS) $(HDF5_LIBS)
|
||||||
|
|
||||||
|
salomeplugins_PYTHON = \
|
||||||
|
meshcut_plugin.py
|
||||||
|
|
||||||
UIPY_FILES = MeshCutDialog.py
|
UIPY_FILES = MeshCutDialog.py
|
||||||
|
|
||||||
if SMESH_ENABLE_GUI
|
if SMESH_ENABLE_GUI
|
||||||
dist_salomescript_SCRIPTS = meshcut_plugin.py
|
|
||||||
nodist_salomescript_SCRIPTS = $(UIPY_FILES)
|
nodist_salomescript_SCRIPTS = $(UIPY_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1104,11 +1104,13 @@ int main(int argc, char *argv[])
|
|||||||
// cout << endl;
|
// cout << endl;
|
||||||
|
|
||||||
// Groupes de mailles
|
// Groupes de mailles
|
||||||
MAILLAGE2->GM = MAILLAGE1->GM;
|
// MAILLAGE2->GM = MAILLAGE1->GM;
|
||||||
|
MAILLAGE2->GN.clear();
|
||||||
|
MAILLAGE2->GM.clear();
|
||||||
MAILLAGE2->GM[str_id_GMplus] = GMplus;
|
MAILLAGE2->GM[str_id_GMplus] = GMplus;
|
||||||
MAILLAGE2->GM[str_id_GMmoins] = GMmoins;
|
MAILLAGE2->GM[str_id_GMmoins] = GMmoins;
|
||||||
|
|
||||||
MAILLAGE2->GN = MAILLAGE1->GN;
|
// MAILLAGE2->GN = MAILLAGE1->GN;
|
||||||
|
|
||||||
MAILLAGE2->eliminationMailles(TETRA4, cutTetras);
|
MAILLAGE2->eliminationMailles(TETRA4, cutTetras);
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
|
# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
|
||||||
# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
|
# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
|
||||||
|
|
||||||
import salome_pluginsmanager
|
|
||||||
|
|
||||||
def MeshCut(context):
|
def MeshCut(context):
|
||||||
# get context study, studyId, salomeGui
|
# get context study, studyId, salomeGui
|
||||||
study = context.study
|
study = context.study
|
||||||
@ -31,6 +29,7 @@ def MeshCut(context):
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from PyQt4 import QtCore
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
from PyQt4.QtGui import QFileDialog
|
from PyQt4.QtGui import QFileDialog
|
||||||
from PyQt4.QtGui import QMessageBox
|
from PyQt4.QtGui import QMessageBox
|
||||||
@ -139,7 +138,3 @@ and T the tolerance.
|
|||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# register the function in the plugin manager
|
|
||||||
salome_pluginsmanager.AddFunction('MeshCut', 'Cut a tetrahedron mesh by a plane', MeshCut)
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
|||||||
# plugins and created in the root installation directory.
|
# plugins and created in the root installation directory.
|
||||||
#
|
#
|
||||||
salomeplugins_PYTHON = \
|
salomeplugins_PYTHON = \
|
||||||
smesh_plugins.py
|
spadderPlugin.py
|
||||||
|
|
||||||
#salomeplugins_DATA = \
|
#salomeplugins_DATA = \
|
||||||
# envPlugins.sh
|
# envPlugins.sh
|
||||||
|
6
src/Tools/padder/spadderpy/plugin/smesh_plugins.py → src/Tools/padder/spadderpy/plugin/spadderPlugin.py
Executable file → Normal file
6
src/Tools/padder/spadderpy/plugin/smesh_plugins.py → src/Tools/padder/spadderpy/plugin/spadderPlugin.py
Executable file → Normal file
@ -21,8 +21,6 @@
|
|||||||
#
|
#
|
||||||
# Author : Guillaume Boulant (EDF)
|
# Author : Guillaume Boulant (EDF)
|
||||||
#
|
#
|
||||||
import salome_pluginsmanager
|
|
||||||
|
|
||||||
|
|
||||||
def runSpadderPlugin(context):
|
def runSpadderPlugin(context):
|
||||||
from salome.smesh.spadder.gui import plugindialog
|
from salome.smesh.spadder.gui import plugindialog
|
||||||
@ -38,7 +36,3 @@ def runSpadderPlugin(context):
|
|||||||
dialog.update()
|
dialog.update()
|
||||||
dialog.show()
|
dialog.show()
|
||||||
|
|
||||||
salome_pluginsmanager.AddFunction('PADDER mesher',
|
|
||||||
'Create a mesh with PADDER',
|
|
||||||
runSpadderPlugin)
|
|
||||||
|
|
35
src/Tools/smesh_plugins.py
Normal file
35
src/Tools/smesh_plugins.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# -*- coding: iso-8859-1 -*-
|
||||||
|
# Copyright (C) 2011 EDF R&D
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# 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 http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
#
|
||||||
|
# -* Makefile *-
|
||||||
|
#
|
||||||
|
# Author : Guillaume Boulant (EDF)
|
||||||
|
#
|
||||||
|
import salome_pluginsmanager
|
||||||
|
|
||||||
|
from spadderPlugin import runSpadderPlugin
|
||||||
|
from meshcut_plugin import MeshCut
|
||||||
|
|
||||||
|
salome_pluginsmanager.AddFunction('PADDER mesher',
|
||||||
|
'Create a mesh with PADDER',
|
||||||
|
runSpadderPlugin)
|
||||||
|
|
||||||
|
salome_pluginsmanager.AddFunction('MeshCut',
|
||||||
|
'Cut a tetrahedron mesh by a plane',
|
||||||
|
MeshCut)
|
Loading…
x
Reference in New Issue
Block a user