mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-25 06:00:32 +05:00
PR: synchro V7_main tag mergefrom_V6_main_28Feb13
This commit is contained in:
parent
4e093d8c63
commit
4cd2499bdd
@ -21,7 +21,7 @@
|
||||
CURRENT_DIR=`pwd`
|
||||
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
|
||||
cd ${CONF_DIR}
|
||||
python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --smesh
|
||||
python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --smesh
|
||||
status=$?
|
||||
cd ${CURRENT_DIR}
|
||||
exit $status
|
||||
|
@ -17,4 +17,4 @@
|
||||
@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
@REM
|
||||
|
||||
%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --smesh
|
||||
%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --smesh
|
||||
|
@ -26,16 +26,34 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
pyexamplesdir = $(docdir)/examples/SMESH
|
||||
|
||||
BAD_TESTS =
|
||||
BAD_TESTS = \
|
||||
3dmesh.py \
|
||||
creating_meshes_ex01.py \
|
||||
creating_meshes_ex03.py \
|
||||
creating_meshes_ex05.py \
|
||||
defining_hypotheses_ex06.py \
|
||||
defining_hypotheses_ex09.py \
|
||||
defining_hypotheses_ex17.py \
|
||||
filters_ex02.py \
|
||||
filters_ex08.py \
|
||||
filters_ex23.py \
|
||||
filters_ex24.py \
|
||||
filters_ex25.py \
|
||||
filters_ex32.py \
|
||||
filters_ex35.py \
|
||||
generate_flat_elements.py \
|
||||
modifying_meshes_ex26.py \
|
||||
notebook_smesh.py \
|
||||
quality_controls_ex06.py \
|
||||
quality_controls_ex20.py \
|
||||
quality_controls_ex21.py \
|
||||
quality_controls_ex22.py \
|
||||
viewing_meshes_ex01.py
|
||||
|
||||
GOOD_TESTS = \
|
||||
3dmesh.py \
|
||||
cartesian_algo.py \
|
||||
creating_meshes_ex01.py \
|
||||
creating_meshes_ex02.py \
|
||||
creating_meshes_ex03.py \
|
||||
creating_meshes_ex04.py \
|
||||
creating_meshes_ex05.py \
|
||||
creating_meshes_ex06.py \
|
||||
creating_meshes_ex07.py \
|
||||
creating_meshes_ex08.py \
|
||||
@ -44,10 +62,8 @@ GOOD_TESTS = \
|
||||
defining_hypotheses_ex03.py \
|
||||
defining_hypotheses_ex04.py \
|
||||
defining_hypotheses_ex05.py \
|
||||
defining_hypotheses_ex06.py \
|
||||
defining_hypotheses_ex07.py \
|
||||
defining_hypotheses_ex08.py \
|
||||
defining_hypotheses_ex09.py \
|
||||
defining_hypotheses_ex10.py \
|
||||
defining_hypotheses_ex11.py \
|
||||
defining_hypotheses_ex12.py \
|
||||
@ -55,15 +71,12 @@ GOOD_TESTS = \
|
||||
defining_hypotheses_ex14.py \
|
||||
defining_hypotheses_ex15.py \
|
||||
defining_hypotheses_ex16.py \
|
||||
defining_hypotheses_ex17.py \
|
||||
filters_ex01.py \
|
||||
filters_ex02.py \
|
||||
filters_ex03.py \
|
||||
filters_ex04.py \
|
||||
filters_ex05.py \
|
||||
filters_ex06.py \
|
||||
filters_ex07.py \
|
||||
filters_ex08.py \
|
||||
filters_ex09.py \
|
||||
filters_ex10.py \
|
||||
filters_ex11.py \
|
||||
@ -78,21 +91,15 @@ GOOD_TESTS = \
|
||||
filters_ex20.py \
|
||||
filters_ex21.py \
|
||||
filters_ex22.py \
|
||||
filters_ex23.py \
|
||||
filters_ex24.py \
|
||||
filters_ex25.py \
|
||||
filters_ex26.py \
|
||||
filters_ex27.py \
|
||||
filters_ex28.py \
|
||||
filters_ex29.py \
|
||||
filters_ex30.py \
|
||||
filters_ex31.py \
|
||||
filters_ex32.py \
|
||||
filters_ex33.py \
|
||||
filters_ex34.py \
|
||||
filters_ex35.py \
|
||||
filters_ex36.py \
|
||||
generate_flat_elements.py \
|
||||
grouping_elements_ex01.py \
|
||||
grouping_elements_ex02.py \
|
||||
grouping_elements_ex03.py \
|
||||
@ -128,15 +135,12 @@ GOOD_TESTS = \
|
||||
modifying_meshes_ex23.py \
|
||||
modifying_meshes_ex24.py \
|
||||
modifying_meshes_ex25.py \
|
||||
modifying_meshes_ex26.py \
|
||||
notebook_smesh.py \
|
||||
prism_3d_algo.py \
|
||||
quality_controls_ex01.py \
|
||||
quality_controls_ex02.py \
|
||||
quality_controls_ex03.py \
|
||||
quality_controls_ex04.py \
|
||||
quality_controls_ex05.py \
|
||||
quality_controls_ex06.py \
|
||||
quality_controls_ex07.py \
|
||||
quality_controls_ex08.py \
|
||||
quality_controls_ex09.py \
|
||||
@ -150,9 +154,6 @@ GOOD_TESTS = \
|
||||
quality_controls_ex17.py \
|
||||
quality_controls_ex18.py \
|
||||
quality_controls_ex19.py \
|
||||
quality_controls_ex20.py \
|
||||
quality_controls_ex21.py \
|
||||
quality_controls_ex22.py \
|
||||
transforming_meshes_ex01.py \
|
||||
transforming_meshes_ex02.py \
|
||||
transforming_meshes_ex03.py \
|
||||
@ -167,14 +168,13 @@ GOOD_TESTS = \
|
||||
transforming_meshes_ex12.py \
|
||||
transforming_meshes_ex13.py \
|
||||
use_existing_faces.py \
|
||||
viewing_meshes_ex01.py \
|
||||
viewing_meshes_ex02.py
|
||||
|
||||
pyexamples_SCRIPTS = $(BAD_TESTS) $(GOOD_TESTS)
|
||||
|
||||
EXTRA_DIST += $(pyexamples_SCRIPTS) testme.py
|
||||
|
||||
check-local:
|
||||
installcheck-local:
|
||||
@for f in $(GOOD_TESTS) ; do \
|
||||
python $(top_srcdir)/doc/salome/examples/testme.py $(top_srcdir)/doc/salome/examples/$$f || exit 1; \
|
||||
env SMESH_ROOT_DIR=$(prefix) python -B $(top_srcdir)/doc/salome/examples/testme.py $(top_srcdir)/doc/salome/examples/$$f || exit 1; \
|
||||
done
|
||||
|
@ -3,7 +3,7 @@
|
||||
# create mesh
|
||||
from SMESH_mechanic import *
|
||||
# remove some faces to have faces with bare borders
|
||||
mesh.RemoveElements( mesh.GetElementsByType(FACE)[0:5] )
|
||||
mesh.RemoveElements( mesh.GetElementsByType(smesh.FACE)[0:5] )
|
||||
# get all faces bare borders
|
||||
filter = smesh.GetFilter(smesh.FACE, smesh.FT_BareBorderFace)
|
||||
ids = mesh.GetIdsFromFilter(filter)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# create mesh
|
||||
from SMESH_mechanic import *
|
||||
faceID = mesh.GetElementsByType(FACE)[0]
|
||||
faceID = mesh.GetElementsByType(smesh.FACE)[0]
|
||||
# get all faces co-planar to the first face with tolerance 5 degrees
|
||||
filter = smesh.GetFilter(smesh.FACE, smesh.FT_CoplanarFaces,faceID,Tolerance=5.0)
|
||||
ids = mesh.GetIdsFromFilter(filter)
|
||||
|
@ -3,9 +3,9 @@
|
||||
# create mesh
|
||||
from SMESH_mechanic import *
|
||||
# get nodes with identifiers [5-10] and [15-30]
|
||||
criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="5-10",\
|
||||
criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Threshold="5-10",\
|
||||
BinaryOp=smesh.FT_LogicalOR)
|
||||
criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="15-30")
|
||||
criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Threshold="15-30")
|
||||
filter = smesh.CreateFilterManager().CreateFilter()
|
||||
filter.SetCriteria([criterion1,criterion2])
|
||||
ids = mesh.GetIdsFromFilter(filter)
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Add Polyhedron
|
||||
|
||||
import salome
|
||||
import smesh
|
||||
import math
|
||||
|
||||
# create an empty mesh structure
|
||||
@ -39,18 +40,18 @@ for i in range(5):
|
||||
pass
|
||||
|
||||
# Create a polyhedral volume (12-hedron with pentagonal faces)
|
||||
MeshEditor.AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top
|
||||
dd[0], cc[0], bb[1], cc[1], dd[1], # -
|
||||
dd[1], cc[1], bb[2], cc[2], dd[2], # -
|
||||
dd[2], cc[2], bb[3], cc[3], dd[3], # - below top
|
||||
dd[3], cc[3], bb[4], cc[4], dd[4], # -
|
||||
dd[4], cc[4], bb[0], cc[0], dd[0], # -
|
||||
aa[4], bb[4], cc[4], bb[0], aa[0], # .
|
||||
aa[3], bb[3], cc[3], bb[4], aa[4], # .
|
||||
aa[2], bb[2], cc[2], bb[3], aa[3], # . above bottom
|
||||
aa[1], bb[1], cc[1], bb[2], aa[2], # .
|
||||
aa[0], bb[0], cc[0], bb[1], aa[1], # .
|
||||
aa[0], aa[1], aa[2], aa[3], aa[4]], # bottom
|
||||
[5,5,5,5,5,5,5,5,5,5,5,5])
|
||||
mesh.GetMeshEditor().AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top
|
||||
dd[0], cc[0], bb[1], cc[1], dd[1], # -
|
||||
dd[1], cc[1], bb[2], cc[2], dd[2], # -
|
||||
dd[2], cc[2], bb[3], cc[3], dd[3], # - below top
|
||||
dd[3], cc[3], bb[4], cc[4], dd[4], # -
|
||||
dd[4], cc[4], bb[0], cc[0], dd[0], # -
|
||||
aa[4], bb[4], cc[4], bb[0], aa[0], # .
|
||||
aa[3], bb[3], cc[3], bb[4], aa[4], # .
|
||||
aa[2], bb[2], cc[2], bb[3], aa[3], # . above bottom
|
||||
aa[1], bb[1], cc[1], bb[2], aa[2], # .
|
||||
aa[0], bb[0], cc[0], bb[1], aa[1], # .
|
||||
aa[0], aa[1], aa[2], aa[3], aa[4]], # bottom
|
||||
[5,5,5,5,5,5,5,5,5,5,5,5])
|
||||
|
||||
salome.sg.updateObjBrowser(1)
|
||||
|
@ -35,7 +35,7 @@ for i in range(len(anIds)):
|
||||
print ""
|
||||
|
||||
# create a group
|
||||
aGroup = mesh.CreateGroup(SMESH.EDGE, "Free borders")
|
||||
aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Free borders")
|
||||
aGroup.Add(anIds)
|
||||
|
||||
salome.sg.updateObjBrowser(1)
|
||||
|
@ -38,7 +38,7 @@ for i in range(len(anIds)):
|
||||
print ""
|
||||
|
||||
# create a group
|
||||
aGroup = mesh.CreateGroup(SMESH.EDGE, "Borders at multi-connections")
|
||||
aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Borders at multi-connections")
|
||||
aGroup.Add(anIds)
|
||||
|
||||
salome.sg.updateObjBrowser(1)
|
||||
|
@ -37,7 +37,7 @@ for i in range(len(anIds)):
|
||||
print ""
|
||||
|
||||
# create a group
|
||||
aGroup = mesh.CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`)
|
||||
aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Edges with length > " + `length_margin`)
|
||||
aGroup.Add(anIds)
|
||||
|
||||
salome.sg.updateObjBrowser(1)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import unittest, sys
|
||||
import unittest, sys, os
|
||||
|
||||
class SalomeSession(object):
|
||||
def __init__(self, script):
|
||||
@ -10,11 +10,10 @@ class SalomeSession(object):
|
||||
sys.argv += ["--modules=GEOM,MED,SMESH"]
|
||||
sys.argv += ["--execute=%s" % script]
|
||||
clt, d = runSalome.main()
|
||||
self.port = d['port']
|
||||
return
|
||||
|
||||
def __del__(self):
|
||||
port = self.port
|
||||
port = os.getenv('NSPORT')
|
||||
import killSalomeWithPort
|
||||
killSalomeWithPort.killMyPort(port)
|
||||
return
|
||||
|
@ -8,6 +8,6 @@ smesh = SMESH_mechanic.smesh
|
||||
mesh = SMESH_mechanic.mesh
|
||||
|
||||
# create a symmetrical copy of the mesh mirrored through a point
|
||||
axis = SMESH.AxisStruct(0, 0, 0, 0, 0, 0)
|
||||
axis = smesh.AxisStruct(0, 0, 0, 0, 0, 0)
|
||||
|
||||
mesh.Mirror([], axis, smesh.POINT, 1)
|
||||
|
@ -1,10 +1,18 @@
|
||||
# Duplicate nodes
|
||||
|
||||
import salome
|
||||
import geompy
|
||||
import smesh
|
||||
import SMESH_test1
|
||||
|
||||
mesh = SMESH_test1.mesh
|
||||
# Create a box
|
||||
|
||||
box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
|
||||
|
||||
# Define hexa mesh on a box
|
||||
mesh = smesh.Mesh(box, "Mesh")
|
||||
mesh.Segment().NumberOfSegments(7)
|
||||
mesh.Quadrangle()
|
||||
mesh.Hexahedron()
|
||||
|
||||
# Compute mesh
|
||||
mesh.Compute()
|
||||
@ -13,53 +21,53 @@ mesh.Compute()
|
||||
|
||||
# Nodes to duplicate
|
||||
nodes1 = mesh.CreateEmptyGroup( smesh.NODE, 'nodes1' )
|
||||
nodes1.Add( [ 289, 278, 302, 285 ] )
|
||||
nodes1.Add( [ 119, 125, 131, 137 ] )
|
||||
|
||||
# Group of faces to replace nodes with new ones
|
||||
faces1 = mesh.CreateEmptyGroup( smesh.FACE, 'faces1' )
|
||||
faces1.Add( [ 519, 556, 557 ] )
|
||||
faces1.Add( [ 144, 151, 158 ] )
|
||||
|
||||
# Duplicate nodes
|
||||
print "\nMesh before the first nodes duplication:"
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Triangles : ", mesh.NbTriangles()
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Quadrangles : ", mesh.NbQuadrangles()
|
||||
|
||||
groupOfCreatedNodes = mesh.DoubleNodeGroup(nodes1, faces1, theMakeGroup=True)
|
||||
print "New nodes:", groupOfCreatedNodes.GetIDs()
|
||||
|
||||
print "\nMesh after the first nodes duplication:"
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Triangles : ", mesh.NbTriangles()
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Quadrangles : ", mesh.NbQuadrangles()
|
||||
|
||||
# With the duplication of border elements
|
||||
|
||||
# Edges to duplicate
|
||||
edges = mesh.CreateEmptyGroup( smesh.EDGE, 'edges' )
|
||||
edges.Add( [ 29, 30, 31 ] )
|
||||
edges.Add( [ 32, 33, 34 ] )
|
||||
|
||||
# Nodes not to duplicate
|
||||
nodes2 = mesh.CreateEmptyGroup( smesh.NODE, 'nodes2' )
|
||||
nodes2.Add( [ 32, 5 ] )
|
||||
nodes2.Add( [ 35, 38 ] )
|
||||
|
||||
# Group of faces to replace nodes with new ones
|
||||
faces2 = mesh.CreateEmptyGroup( smesh.FACE, 'faces2' )
|
||||
faces2.Add( [ 576, 578, 580 ] )
|
||||
faces2.Add( [ 141, 148, 155 ] )
|
||||
|
||||
# Duplicate nodes
|
||||
print "\nMesh before the second nodes duplication:"
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Triangles : ", mesh.NbTriangles()
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Quadrangles : ", mesh.NbQuadrangles()
|
||||
|
||||
groupOfNewEdges = mesh.DoubleNodeElemGroup( edges, nodes2, faces2, theMakeGroup=True )
|
||||
print "New edges:", groupOfNewEdges.GetIDs()
|
||||
|
||||
print "\nMesh after the second nodes duplication:"
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Triangles : ", mesh.NbTriangles()
|
||||
print "Nodes : ", mesh.NbNodes()
|
||||
print "Edges : ", mesh.NbEdges()
|
||||
print "Quadrangles : ", mesh.NbQuadrangles()
|
||||
|
||||
# Update object browser
|
||||
if salome.sg.hasDesktop():
|
||||
|
@ -8,7 +8,7 @@ import SMESH
|
||||
box = geompy.MakeBoxDXDYDZ(100,100,100)
|
||||
|
||||
# Create a mesh
|
||||
mesh = Mesh(box,"Mesh")
|
||||
mesh = smesh.Mesh(box,"Mesh")
|
||||
mesh.AutomaticHexahedralization()
|
||||
mesh.Compute()
|
||||
|
||||
|
@ -42,7 +42,7 @@ INPUT = @srcdir@/input @top_srcdir@/src/Tools/padder/doc/input
|
||||
FILE_PATTERNS = *.doc
|
||||
EXCLUDE =
|
||||
IMAGE_PATH = @srcdir@/images @top_srcdir@/src/Tools/padder/doc/images
|
||||
EXAMPLE_PATH = @top_srcdir@/src/SMESH_SWIG @top_srcdir@/doc/salome/examples
|
||||
EXAMPLE_PATH = @top_srcdir@/doc/salome/examples @top_srcdir@/src/SMESH_SWIG
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#HTML related options
|
||||
@ -80,3 +80,8 @@ GENERATE_RTF = NO
|
||||
TAGFILES = smeshpy_doc.tag=../SMESH/smeshpy_doc #rnv: 07.04.2011 Workaround for the doxygen 1.7.3:
|
||||
#because it wrongly defines location of the html files for search.
|
||||
SEARCHENGINE = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#Custom commands
|
||||
#---------------------------------------------------------------------------
|
||||
ALIASES += tui_script{1}="\include \1 <a href=\"../../examples/SMESH/\1\">Download this script</a>"
|
||||
|
@ -36,8 +36,7 @@ An example below demonstrates usage of the Python API for 3d mesh generation.
|
||||
|
||||
\anchor example_3d_mesh
|
||||
<h2>Example of 3d mesh generation:</h2>
|
||||
\include 3dmesh.py
|
||||
<a href="../../examples/SMESH/3dmesh.py">Download this script</a>
|
||||
\tui_script{3dmesh.py}
|
||||
|
||||
Examples of Python scripts for Mesh operations are available by
|
||||
the following links:
|
||||
|
@ -1,7 +1,6 @@
|
||||
/*!
|
||||
|
||||
\page tui_cartesian_algo Usage of Body Fitting algorithm
|
||||
\include cartesian_algo.py
|
||||
<a href="../../examples/SMESH/cartesian_algo.py">Download this script</a>
|
||||
\tui_script{cartesian_algo.py}
|
||||
|
||||
*/
|
||||
|
@ -7,52 +7,44 @@
|
||||
|
||||
<br>
|
||||
<h2>Construction of a Mesh</h2>
|
||||
\include creating_meshes_ex01.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex01.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex01.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_construction_submesh
|
||||
<h2>Construction of a Submesh</h2>
|
||||
\include creating_meshes_ex02.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex02.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex02.py}
|
||||
|
||||
<br>
|
||||
<h2>Change priority of submeshes in Mesh</h2>
|
||||
\include creating_meshes_ex03.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex03.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex03.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_editing_mesh
|
||||
<h2>Editing of a mesh</h2>
|
||||
\include creating_meshes_ex04.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex04.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex04.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_export_mesh
|
||||
<h2>Export of a Mesh</h2>
|
||||
\include creating_meshes_ex05.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex05.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex05.py}
|
||||
|
||||
<br>
|
||||
<h2>How to mesh a cylinder with hexahedrons?</h2>
|
||||
Here you can see an example of python script, creating a hexahedral
|
||||
mesh on a cylinder. And a picture below the source code of the script,
|
||||
demonstrating the resulting mesh.
|
||||
\include creating_meshes_ex06.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex06.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex06.py}
|
||||
|
||||
\image html mesh_cylinder_hexa.png
|
||||
|
||||
<br>
|
||||
\anchor tui_building_compound
|
||||
<h2>Building a compound of meshes</h2>
|
||||
\include creating_meshes_ex07.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex07.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex07.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_copy_mesh
|
||||
<h2>Mesh Copying</h2>
|
||||
\include creating_meshes_ex08.py
|
||||
<a href="../../examples/SMESH/creating_meshes_ex08.py">Download this script</a>
|
||||
\tui_script{creating_meshes_ex08.py}
|
||||
|
||||
*/
|
||||
|
@ -44,102 +44,84 @@ This page provides example codes of \ref tui_defining_meshing_algos
|
||||
<br>
|
||||
\anchor tui_1d_arithmetic
|
||||
<h3>Arithmetic 1D</h3>
|
||||
\include defining_hypotheses_ex01.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex01.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex01.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_deflection_1d
|
||||
<h3>Deflection 1D and Number of Segments</h3>
|
||||
\include defining_hypotheses_ex02.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex02.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex02.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_start_and_end_length
|
||||
<h3>Start and End Length</h3>
|
||||
\include defining_hypotheses_ex03.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex03.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex03.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_average_length
|
||||
<h3>Local Length</h3>
|
||||
\include defining_hypotheses_ex04.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex04.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex04.py}
|
||||
|
||||
<br><h2>Defining 2D and 3D hypotheses</h2>
|
||||
|
||||
<br>
|
||||
\anchor tui_max_element_area
|
||||
<h3>Maximum Element Area</h3>
|
||||
\include defining_hypotheses_ex05.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex05.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex05.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_max_element_volume
|
||||
<h3>Maximum Element Volume</h3>
|
||||
\include defining_hypotheses_ex06.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex06.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex06.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_length_from_edges
|
||||
<h3>Length from Edges</h3>
|
||||
\include defining_hypotheses_ex07.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex07.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex07.py}
|
||||
|
||||
<br><h2>Defining Additional Hypotheses</h2>
|
||||
|
||||
<br>
|
||||
\anchor tui_propagation
|
||||
<h3>Propagation</h3>
|
||||
\include defining_hypotheses_ex08.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex08.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex08.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_defining_meshing_algos
|
||||
<h2>Defining Meshing Algorithms</h2>
|
||||
\include defining_hypotheses_ex09.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex09.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex09.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_projection
|
||||
<h3>Projection Algorithms</h3>
|
||||
\include defining_hypotheses_ex10.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex10.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex10.py}
|
||||
|
||||
<h3>Projection 1D2D</h3>
|
||||
\include defining_hypotheses_ex11.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex11.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex11.py}
|
||||
|
||||
<br>
|
||||
|
||||
\anchor tui_fixed_points
|
||||
|
||||
<h2>1D Mesh with Fixed Points example</h2>
|
||||
\include defining_hypotheses_ex12.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex12.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex12.py}
|
||||
|
||||
\anchor tui_radial_quadrangle
|
||||
<h2> Radial Quadrangle 1D2D example </h2>
|
||||
\include defining_hypotheses_ex13.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex13.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex13.py}
|
||||
|
||||
\anchor tui_quadrangle_parameters
|
||||
<h2>Quadrangle Parameters example 1 (meshing a face with 3 edges) </h2>
|
||||
\include defining_hypotheses_ex14.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex14.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex14.py}
|
||||
|
||||
<h2>Quadrangle Parameters example 2 (using different types) </h2>
|
||||
\include defining_hypotheses_ex15.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex15.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex15.py}
|
||||
|
||||
\anchor tui_import
|
||||
<h2>"Use Existing Elements" example </h2>
|
||||
\include defining_hypotheses_ex16.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex16.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex16.py}
|
||||
|
||||
\anchor tui_viscous_layers
|
||||
<h2>Viscous layers construction</h2>
|
||||
|
||||
\include defining_hypotheses_ex17.py
|
||||
<a href="../../examples/SMESH/defining_hypotheses_ex17.py">Download this script</a>
|
||||
\tui_script{defining_hypotheses_ex17.py}
|
||||
|
||||
*/
|
||||
|
@ -27,8 +27,7 @@ Filter 2D mesh elements (faces) according to the aspect ratio value:
|
||||
- functor type should be \a smesh.FT_AspectRatio
|
||||
- threshold is floating point value (aspect ratio)
|
||||
|
||||
\include filters_ex01.py
|
||||
<a href="../../examples/SMESH/filters_ex01.py">Download this script</a>
|
||||
\tui_script{filters_ex01.py}
|
||||
|
||||
\sa \ref tui_aspect_ratio
|
||||
|
||||
@ -39,8 +38,7 @@ Filter 3D mesh elements (volumes) according to the aspect ratio value:
|
||||
- functor type is \a smesh.FT_AspectRatio3D
|
||||
- threshold is floating point value (aspect ratio)
|
||||
|
||||
\include filters_ex02.py
|
||||
<a href="../../examples/SMESH/filters_ex02.py">Download this script</a>
|
||||
\tui_script{filters_ex02.py}
|
||||
|
||||
\sa \ref tui_aspect_ratio_3d
|
||||
|
||||
@ -51,8 +49,7 @@ Filter 2D mesh elements (faces) according to the warping angle value:
|
||||
- functor type is \a smesh.FT_Warping
|
||||
- threshold is floating point value (warping angle)
|
||||
|
||||
\include filters_ex03.py
|
||||
<a href="../../examples/SMESH/filters_ex03.py">Download this script</a>
|
||||
\tui_script{filters_ex03.py}
|
||||
|
||||
\sa \ref tui_warping
|
||||
|
||||
@ -63,8 +60,7 @@ Filter 2D mesh elements (faces) according to the minimum angle value:
|
||||
- functor type is \a smesh.FT_MinimumAngle
|
||||
- threshold is floating point value (minimum angle)
|
||||
|
||||
\include filters_ex04.py
|
||||
<a href="../../examples/SMESH/filters_ex04.py">Download this script</a>
|
||||
\tui_script{filters_ex04.py}
|
||||
|
||||
\sa \ref tui_minimum_angle
|
||||
|
||||
@ -75,8 +71,7 @@ Filter 2D mesh elements (faces) according to the taper value:
|
||||
- functor type is \a smesh.FT_Taper
|
||||
- threshold is floating point value (taper)
|
||||
|
||||
\include filters_ex05.py
|
||||
<a href="../../examples/SMESH/filters_ex05.py">Download this script</a>
|
||||
\tui_script{filters_ex05.py}
|
||||
|
||||
\sa \ref tui_taper
|
||||
|
||||
@ -87,8 +82,7 @@ Filter 2D mesh elements (faces) according to the skew value:
|
||||
- functor type is \a smesh.FT_Skew
|
||||
- threshold is floating point value (skew)
|
||||
|
||||
\include filters_ex06.py
|
||||
<a href="../../examples/SMESH/filters_ex06.py">Download this script</a>
|
||||
\tui_script{filters_ex06.py}
|
||||
|
||||
\sa \ref tui_skew
|
||||
|
||||
@ -99,8 +93,7 @@ Filter 2D mesh elements (faces) according to the area value:
|
||||
- functor type is \a smesh.FT_Area
|
||||
- threshold is floating point value (area)
|
||||
|
||||
\include filters_ex07.py
|
||||
<a href="../../examples/SMESH/filters_ex07.py">Download this script</a>
|
||||
\tui_script{filters_ex07.py}
|
||||
|
||||
\sa \ref tui_area
|
||||
|
||||
@ -111,8 +104,7 @@ Filter 3D mesh elements (volumes) according to the volume value:
|
||||
- functor type is \a smesh.FT_Volume3D
|
||||
- threshold is floating point value (volume)
|
||||
|
||||
\include filters_ex08.py
|
||||
<a href="../../examples/SMESH/filters_ex08.py">Download this script</a>
|
||||
\tui_script{filters_ex08.py}
|
||||
|
||||
\sa \ref tui_volume
|
||||
|
||||
@ -123,8 +115,7 @@ Filter 1D mesh elements (edges) which represent free borders of a mesh:
|
||||
- functor type is \a smesh.FT_FreeBorders
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex09.py
|
||||
<a href="../../examples/SMESH/filters_ex09.py">Download this script</a>
|
||||
\tui_script{filters_ex09.py}
|
||||
|
||||
\sa \ref tui_free_borders
|
||||
|
||||
@ -136,8 +127,7 @@ element of mesh only:
|
||||
- functor type is \a smesh.FT_FreeEdges
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex10.py
|
||||
<a href="../../examples/SMESH/filters_ex10.py">Download this script</a>
|
||||
\tui_script{filters_ex10.py}
|
||||
|
||||
\sa \ref tui_free_edges
|
||||
|
||||
@ -148,8 +138,7 @@ Filter free nodes:
|
||||
- functor type is \a smesh.FT_FreeNodes
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex11.py
|
||||
<a href="../../examples/SMESH/filters_ex11.py">Download this script</a>
|
||||
\tui_script{filters_ex11.py}
|
||||
|
||||
\sa \ref tui_free_nodes
|
||||
|
||||
@ -160,8 +149,7 @@ Filter free faces:
|
||||
- functor type is \a smesh.FT_FreeFaces
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex12.py
|
||||
<a href="../../examples/SMESH/filters_ex12.py">Download this script</a>
|
||||
\tui_script{filters_ex12.py}
|
||||
|
||||
\sa \ref tui_free_faces
|
||||
|
||||
@ -172,8 +160,7 @@ Filter faces with bare borders:
|
||||
- functor type is \a smesh.FT_BareBorderFace
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex13.py
|
||||
<a href="../../examples/SMESH/filters_ex13.py">Download this script</a>
|
||||
\tui_script{filters_ex13.py}
|
||||
|
||||
\sa \ref tui_bare_border_faces
|
||||
|
||||
@ -185,8 +172,7 @@ Filter faces with bare borders:
|
||||
- threshold value is the face ID
|
||||
- tolerance is in degrees
|
||||
|
||||
\include filters_ex14.py
|
||||
<a href="../../examples/SMESH/filters_ex14.py">Download this script</a>
|
||||
\tui_script{filters_ex14.py}
|
||||
|
||||
\section filter_over_constrained_faces Over-constrained faces
|
||||
|
||||
@ -195,8 +181,7 @@ Filter over-constrained faces:
|
||||
- functor type is \a smesh.FT_OverConstrainedFace
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex15.py
|
||||
<a href="../../examples/SMESH/filters_ex15.py">Download this script</a>
|
||||
\tui_script{filters_ex15.py}
|
||||
|
||||
\sa \ref tui_over_constrained_faces
|
||||
|
||||
@ -208,8 +193,7 @@ filter mesh elements basing on the same set of nodes:
|
||||
smesh.FT_EqualFaces or \a smesh.FT_EqualVolumes,
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex16.py
|
||||
<a href="../../examples/SMESH/filters_ex16.py">Download this script</a>
|
||||
\tui_script{filters_ex16.py}
|
||||
|
||||
|
||||
\section tui_double_nodes_control Double nodes
|
||||
@ -220,8 +204,7 @@ filters mesh nodes which are coincident with other nodes (within a given toleran
|
||||
- threshold value is not required
|
||||
- default tolerance is 1.0e-7
|
||||
|
||||
\include filters_ex17.py
|
||||
<a href="../../examples/SMESH/filters_ex17.py">Download this script</a>
|
||||
\tui_script{filters_ex17.py}
|
||||
|
||||
|
||||
\section filter_borders_multiconnection Borders at multi-connection
|
||||
@ -232,8 +215,7 @@ connections (faces belonging the border edges)
|
||||
- functor type is \a smesh.FT_MultiConnection
|
||||
- threshold is integer value (number of connections)
|
||||
|
||||
\include filters_ex18.py
|
||||
<a href="../../examples/SMESH/filters_ex18.py">Download this script</a>
|
||||
\tui_script{filters_ex18.py}
|
||||
|
||||
\sa \ref tui_borders_at_multiconnection
|
||||
|
||||
@ -245,8 +227,7 @@ to the specified number of mesh elements
|
||||
- functor type is \a smesh.FT_MultiConnection2D
|
||||
- threshold is integer value (number of connections)
|
||||
|
||||
\include filters_ex19.py
|
||||
<a href="../../examples/SMESH/filters_ex19.py">Download this script</a>
|
||||
\tui_script{filters_ex19.py}
|
||||
|
||||
\sa \ref tui_borders_at_multiconnection_2d
|
||||
|
||||
@ -257,8 +238,7 @@ Filter 1D mesh elements (edges) according to the edge length value:
|
||||
- functor type should be \a smesh.FT_Length
|
||||
- threshold is floating point value (length)
|
||||
|
||||
\include filters_ex20.py
|
||||
<a href="../../examples/SMESH/filters_ex20.py">Download this script</a>
|
||||
\tui_script{filters_ex20.py}
|
||||
|
||||
\sa \ref tui_length_1d
|
||||
|
||||
@ -270,8 +250,7 @@ value of its edges:
|
||||
- functor type should be \a smesh.FT_Length2D
|
||||
- threshold is floating point value (edge length)
|
||||
|
||||
\include filters_ex21.py
|
||||
<a href="../../examples/SMESH/filters_ex21.py">Download this script</a>
|
||||
\tui_script{filters_ex21.py}
|
||||
|
||||
\sa \ref tui_length_2d
|
||||
|
||||
@ -283,8 +262,7 @@ value of its edges and diagonals:
|
||||
- functor type should be \a smesh.FT_MaxElementLength2D
|
||||
- threshold is floating point value (edge/diagonal length)
|
||||
|
||||
\include filters_ex22.py
|
||||
<a href="../../examples/SMESH/filters_ex22.py">Download this script</a>
|
||||
\tui_script{filters_ex22.py}
|
||||
|
||||
\sa \ref tui_max_element_length_2d
|
||||
|
||||
@ -296,8 +274,7 @@ value of its edges and diagonals:
|
||||
- functor type should be \a smesh.FT_MaxElementLength3D
|
||||
- threshold is floating point value (edge/diagonal length)
|
||||
|
||||
\include filters_ex23.py
|
||||
<a href="../../examples/SMESH/filters_ex23.py">Download this script</a>
|
||||
\tui_script{filters_ex23.py}
|
||||
|
||||
\sa \ref tui_max_element_length_3d
|
||||
|
||||
@ -308,8 +285,7 @@ Filter 3D mesh elements with bare borders:
|
||||
- functor type is \a smesh.FT_BareBorderVolume
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex24.py
|
||||
<a href="../../examples/SMESH/filters_ex24.py">Download this script</a>
|
||||
\tui_script{filters_ex24.py}
|
||||
|
||||
\sa \ref tui_bare_border_volumes
|
||||
|
||||
@ -320,8 +296,7 @@ Filter over-constrained volumes:
|
||||
- functor type is \a smesh.FT_OverConstrainedVolume
|
||||
- threshold value is not required
|
||||
|
||||
\include filters_ex25.py
|
||||
<a href="../../examples/SMESH/filters_ex25.py">Download this script</a>
|
||||
\tui_script{filters_ex25.py}
|
||||
|
||||
\sa \ref tui_over_constrained_faces
|
||||
|
||||
@ -333,8 +308,7 @@ shape defined by threshold value:
|
||||
- functor type should be \a smesh.FT_BelongToGeom
|
||||
- threshold is geometrical object
|
||||
|
||||
\include filters_ex26.py
|
||||
<a href="../../examples/SMESH/filters_ex26.py">Download this script</a>
|
||||
\tui_script{filters_ex26.py}
|
||||
|
||||
\section filter_lying_on_geom Lying on Geom
|
||||
|
||||
@ -344,8 +318,7 @@ shape defined by threshold value:
|
||||
- functor type should be \a smesh.FT_LyingOnGeom
|
||||
- threshold is geometrical object
|
||||
|
||||
\include filters_ex27.py
|
||||
<a href="../../examples/SMESH/filters_ex27.py">Download this script</a>
|
||||
\tui_script{filters_ex27.py}
|
||||
|
||||
\section filter_belong_to_plane Belong to Plane
|
||||
|
||||
@ -356,8 +329,7 @@ plane defined by threshold value with the given tolerance:
|
||||
- threshold is geometrical object (plane)
|
||||
- default tolerance is 1.0e-7
|
||||
|
||||
\include filters_ex28.py
|
||||
<a href="../../examples/SMESH/filters_ex28.py">Download this script</a>
|
||||
\tui_script{filters_ex28.py}
|
||||
|
||||
\section filter_belong_to_cylinder Belong to Cylinder
|
||||
|
||||
@ -368,8 +340,7 @@ cylindrical face defined by threshold value with the given tolerance:
|
||||
- threshold is geometrical object (cylindrical face)
|
||||
- default tolerance is 1.0e-7
|
||||
|
||||
\include filters_ex29.py
|
||||
<a href="../../examples/SMESH/filters_ex29.py">Download this script</a>
|
||||
\tui_script{filters_ex29.py}
|
||||
|
||||
\section filter_belong_to_surface Belong to Surface
|
||||
|
||||
@ -380,8 +351,7 @@ arbitrary surface defined by threshold value with the given tolerance:
|
||||
- threshold is geometrical object (arbitrary surface)
|
||||
- default tolerance is 1.0e-7
|
||||
|
||||
\include filters_ex30.py
|
||||
<a href="../../examples/SMESH/filters_ex30.py">Download this script</a>
|
||||
\tui_script{filters_ex30.py}
|
||||
|
||||
\section filter_range_of_ids Range of IDs
|
||||
|
||||
@ -391,8 +361,7 @@ specified identifiers range:
|
||||
- functor type is \a smesh.FT_RangeOfIds
|
||||
- threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78"
|
||||
|
||||
\include filters_ex31.py
|
||||
<a href="../../examples/SMESH/filters_ex31.py">Download this script</a>
|
||||
\tui_script{filters_ex31.py}
|
||||
|
||||
\section filter_bad_oriented_volume Badly oriented volume
|
||||
|
||||
@ -402,8 +371,7 @@ the point of view of MED convention.
|
||||
- functor type is \a smesh.FT_BadOrientedVolume
|
||||
- threshold is not required
|
||||
|
||||
\include filters_ex32.py
|
||||
<a href="../../examples/SMESH/filters_ex32.py">Download this script</a>
|
||||
\tui_script{filters_ex32.py}
|
||||
|
||||
\section filter_linear_or_quadratic Linear / quadratic
|
||||
|
||||
@ -414,8 +382,7 @@ Filter linear / quadratic mesh elements:
|
||||
- if unary operator is set to smesh.FT_LogicalNOT, the quadratic
|
||||
elements are selected, otherwise (by default) linear elements are selected
|
||||
|
||||
\include filters_ex33.py
|
||||
<a href="../../examples/SMESH/filters_ex33.py">Download this script</a>
|
||||
\tui_script{filters_ex33.py}
|
||||
|
||||
\section filter_group_color Group color
|
||||
|
||||
@ -424,8 +391,7 @@ Filter mesh entities, belonging to the group with the color defined by the thres
|
||||
- functor type is \a smesh.FT_GroupColor
|
||||
- threshold should be of SALOMEDS.Color type
|
||||
|
||||
\include filters_ex34.py
|
||||
<a href="../../examples/SMESH/filters_ex34.py">Download this script</a>
|
||||
\tui_script{filters_ex34.py}
|
||||
|
||||
\section filter_geom_type Geometry type
|
||||
|
||||
@ -436,8 +402,7 @@ entity type.
|
||||
- functor type should be \a smesh.FT_ElemGeomType
|
||||
- threshold is of smesh.GeometryType value
|
||||
|
||||
\include filters_ex35.py
|
||||
<a href="../../examples/SMESH/filters_ex35.py">Download this script</a>
|
||||
\tui_script{filters_ex35.py}
|
||||
|
||||
\section combining_filters How to combine filters with Criterion structures?
|
||||
|
||||
@ -445,8 +410,7 @@ Filters can be combined by making use of "criteria".
|
||||
|
||||
Example :
|
||||
|
||||
\include filters_ex36.py
|
||||
<a href="../../examples/SMESH/filters_ex36.py">Download this script</a>
|
||||
\tui_script{filters_ex36.py}
|
||||
|
||||
|
||||
*/
|
||||
|
@ -17,8 +17,7 @@ by flat elements.
|
||||
\n This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder).
|
||||
The big cylinder is defined by two geometric volumes.
|
||||
|
||||
\include generate_flat_elements.py
|
||||
<a href="../../examples/SMESH/generate_flat_elements.py">Download this script</a>
|
||||
\tui_script{generate_flat_elements.py}
|
||||
|
||||
\n Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh.
|
||||
The flat elements on group boundaries and on faces are built with the
|
||||
|
@ -5,29 +5,25 @@
|
||||
<br>
|
||||
\anchor tui_create_standalone_group
|
||||
<h2>Create a Standalone Group</h2>
|
||||
\include grouping_elements_ex01.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex01.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex01.py}
|
||||
|
||||
\image html create_group.png
|
||||
|
||||
<br>
|
||||
\anchor tui_create_group_on_geometry
|
||||
<h2>Create a Group on Geometry</h2>
|
||||
\include grouping_elements_ex02.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex02.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex02.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_create_group_on_filter
|
||||
|
||||
<h2>Create a Group on Filter</h2>
|
||||
\include grouping_elements_ex03.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex03.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex03.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_edit_group
|
||||
<h2>Edit a Group</h2>
|
||||
\include grouping_elements_ex04.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex04.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex04.py}
|
||||
|
||||
\image html editing_groups1.png
|
||||
|
||||
@ -36,8 +32,7 @@
|
||||
<br>
|
||||
\anchor tui_union_of_groups
|
||||
<h2>Union of groups</h2>
|
||||
\include grouping_elements_ex05.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex05.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex05.py}
|
||||
|
||||
\image html union_groups1.png
|
||||
|
||||
@ -48,8 +43,7 @@
|
||||
<br>
|
||||
\anchor tui_intersection_of_groups
|
||||
<h2>Intersection of groups</h2>
|
||||
\include grouping_elements_ex06.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex06.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex06.py}
|
||||
|
||||
\image html intersect_groups1.png
|
||||
|
||||
@ -60,8 +54,7 @@
|
||||
<br>
|
||||
\anchor tui_cut_of_groups
|
||||
<h2>Cut of groups</h2>
|
||||
\include grouping_elements_ex07.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex07.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex07.py}
|
||||
|
||||
\image html cut_groups1.png
|
||||
|
||||
@ -72,8 +65,7 @@
|
||||
<br>
|
||||
\anchor tui_create_dim_group
|
||||
<h2>Creating groups of entities from existing groups of superior dimensions</h2>
|
||||
\include grouping_elements_ex08.py
|
||||
<a href="../../examples/SMESH/grouping_elements_ex08.py">Download this script</a>
|
||||
\tui_script{grouping_elements_ex08.py}
|
||||
|
||||
\image html dimgroup_tui1.png
|
||||
<center>Source groups of faces</center>
|
||||
|
@ -3,11 +3,9 @@
|
||||
\page tui_measurements_page Measurements
|
||||
|
||||
\section tui_min_distance Minimum Distance
|
||||
\include measurements_ex01.py
|
||||
<a href="../../examples/SMESH/measurements_ex01.py">Download this script</a>
|
||||
\tui_script{measurements_ex01.py}
|
||||
|
||||
\section tui_bounding_box Bounding Box
|
||||
\include measurements_ex02.py
|
||||
<a href="../../examples/SMESH/measurements_ex02.py">Download this script</a>
|
||||
\tui_script{measurements_ex02.py}
|
||||
|
||||
*/
|
||||
|
@ -9,62 +9,52 @@
|
||||
<br>
|
||||
\anchor tui_add_node
|
||||
<h3>Add Node</h3>
|
||||
\include modifying_meshes_ex01.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex01.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex01.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_0DElement
|
||||
<h3>Add 0D Element</h3>
|
||||
\include modifying_meshes_ex02.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex02.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex02.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_0DElement_on_all_nodes
|
||||
<h3>Add 0D Element on Element Nodes</h3>
|
||||
\include modifying_meshes_ex03.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex03.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex03.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_edge
|
||||
<h3>Add Edge</h3>
|
||||
\include modifying_meshes_ex04.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex04.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex04.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_triangle
|
||||
<h3>Add Triangle</h3>
|
||||
\include modifying_meshes_ex05.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex05.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex05.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_quadrangle
|
||||
<h3>Add Quadrangle</h3>
|
||||
\include modifying_meshes_ex06.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex06.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex06.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_tetrahedron
|
||||
<h3>Add Tetrahedron</h3>
|
||||
\include modifying_meshes_ex07.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex07.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex07.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_hexahedron
|
||||
<h3>Add Hexahedron</h3>
|
||||
\include modifying_meshes_ex08.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex08.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex08.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_polygon
|
||||
<h3>Add Polygon</h3>
|
||||
\include modifying_meshes_ex09.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex09.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex09.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_add_polyhedron
|
||||
<h3>Add Polyhedron</h3>
|
||||
\include modifying_meshes_ex10.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex10.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex10.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_removing_nodes_and_elements
|
||||
@ -73,97 +63,81 @@
|
||||
<br>
|
||||
\anchor tui_removing_nodes
|
||||
<h3>Removing Nodes</h3>
|
||||
\include modifying_meshes_ex11.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex11.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex11.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_removing_elements
|
||||
<h3>Removing Elements</h3>
|
||||
\include modifying_meshes_ex12.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex12.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex12.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_removing_orphan_nodes
|
||||
<h3>Removing Orphan Nodes</h3>
|
||||
\include modifying_meshes_ex13.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex13.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex13.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_renumbering_nodes_and_elements
|
||||
<h2>Renumbering Nodes and Elements</h2>
|
||||
\include modifying_meshes_ex14.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex14.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex14.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_moving_nodes
|
||||
<h2>Moving Nodes</h2>
|
||||
\include modifying_meshes_ex15.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex15.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex15.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_diagonal_inversion
|
||||
<h2>Diagonal Inversion</h2>
|
||||
\include modifying_meshes_ex16.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex16.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex16.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_uniting_two_triangles
|
||||
<h2>Uniting two Triangles</h2>
|
||||
\include modifying_meshes_ex17.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex17.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex17.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_uniting_set_of_triangles
|
||||
<h2>Uniting a Set of Triangles</h2>
|
||||
\include modifying_meshes_ex18.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex18.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex18.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_orientation
|
||||
<h2>Orientation</h2>
|
||||
\include modifying_meshes_ex19.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex19.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex19.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_cutting_quadrangles
|
||||
<h2>Cutting Quadrangles</h2>
|
||||
\include modifying_meshes_ex20.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex20.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex20.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_smoothing
|
||||
<h2>Smoothing</h2>
|
||||
\include modifying_meshes_ex21.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex21.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex21.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_extrusion
|
||||
<h2>Extrusion</h2>
|
||||
\include modifying_meshes_ex22.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex22.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex22.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_extrusion_along_path
|
||||
<h2>Extrusion along a Path</h2>
|
||||
\include modifying_meshes_ex23.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex23.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex23.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_revolution
|
||||
<h2>Revolution</h2>
|
||||
\include modifying_meshes_ex24.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex24.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex24.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_pattern_mapping
|
||||
<h2>Pattern Mapping</h2>
|
||||
\include modifying_meshes_ex25.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex25.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex25.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_quadratic
|
||||
<h2>Convert mesh to/from quadratic</h2>
|
||||
\include modifying_meshes_ex26.py
|
||||
<a href="../../examples/SMESH/modifying_meshes_ex26.py">Download this script</a>
|
||||
\tui_script{modifying_meshes_ex26.py}
|
||||
|
||||
*/
|
||||
|
@ -3,7 +3,6 @@
|
||||
\page tui_notebook_smesh_page Using SALOME NoteBook
|
||||
|
||||
\anchor tui_notebook_smesh
|
||||
\include notebook_smesh.py
|
||||
<a href="../../examples/SMESH/notebook_smesh.py">Download this script</a>
|
||||
\tui_script{notebook_smesh.py}
|
||||
|
||||
*/
|
||||
|
@ -1,8 +1,7 @@
|
||||
/*!
|
||||
|
||||
\page tui_prism_3d_algo Use 3D extrusion meshing algorithm
|
||||
\include prism_3d_algo.py
|
||||
<a href="../../examples/SMESH/prism_3d_algo.py">Download this script</a>
|
||||
\tui_script{prism_3d_algo.py}
|
||||
|
||||
The result geometry and mesh is shown below
|
||||
\image html prism_tui_sample.png
|
||||
|
@ -3,91 +3,69 @@
|
||||
\page tui_quality_controls_page Quality Controls
|
||||
|
||||
\section tui_free_borders Free Borders
|
||||
\include quality_controls_ex01.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex01.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex01.py}
|
||||
|
||||
\section tui_borders_at_multiconnection Borders at Multiconnection
|
||||
\include quality_controls_ex02.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex02.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex02.py}
|
||||
|
||||
\section tui_length_1d Length 1D
|
||||
\include quality_controls_ex03.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex03.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex03.py}
|
||||
|
||||
\section tui_free_edges Free Edges
|
||||
\include quality_controls_ex04.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex04.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex04.py}
|
||||
|
||||
\section tui_free_nodes Free Nodes
|
||||
\include quality_controls_ex05.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex05.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex05.py}
|
||||
|
||||
\section tui_free_faces Free Faces
|
||||
\include quality_controls_ex06.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex06.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex06.py}
|
||||
|
||||
\section tui_bare_border_faces Bare border faces
|
||||
\include quality_controls_ex07.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex07.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex07.py}
|
||||
|
||||
\section tui_bare_border_volumes Bare border volumes
|
||||
\include quality_controls_ex08.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex08.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex08.py}
|
||||
|
||||
\section tui_over_constrained_faces Over-constrained faces
|
||||
\include quality_controls_ex09.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex09.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex09.py}
|
||||
|
||||
\section tui_over_constrained_volumes Over-constrained volumes
|
||||
\include quality_controls_ex10.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex10.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex10.py}
|
||||
|
||||
\section tui_length_2d Length 2D
|
||||
\include quality_controls_ex11.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex11.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex11.py}
|
||||
|
||||
\section tui_borders_at_multiconnection_2d Borders at Multiconnection 2D
|
||||
\include quality_controls_ex12.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex12.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex12.py}
|
||||
|
||||
\section tui_area Area
|
||||
\include quality_controls_ex13.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex13.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex13.py}
|
||||
|
||||
\section tui_taper Taper
|
||||
\include quality_controls_ex14.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex14.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex14.py}
|
||||
|
||||
\section tui_aspect_ratio Aspect Ratio
|
||||
\include quality_controls_ex15.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex15.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex15.py}
|
||||
|
||||
\section tui_minimum_angle Minimum Angle
|
||||
\include quality_controls_ex16.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex16.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex16.py}
|
||||
|
||||
\section tui_warping Warping
|
||||
\include quality_controls_ex17.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex17.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex17.py}
|
||||
|
||||
\section tui_skew Skew
|
||||
\include quality_controls_ex18.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex18.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex18.py}
|
||||
|
||||
\section tui_max_element_length_2d Element Diameter 2D
|
||||
\include quality_controls_ex19.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex19.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex19.py}
|
||||
|
||||
\section tui_aspect_ratio_3d Aspect Ratio 3D
|
||||
\include quality_controls_ex20.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex20.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex20.py}
|
||||
|
||||
\section tui_volume Volume
|
||||
\include quality_controls_ex21.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex21.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex21.py}
|
||||
|
||||
\section tui_max_element_length_3d Element Diameter 3D
|
||||
\include quality_controls_ex22.py
|
||||
<a href="../../examples/SMESH/quality_controls_ex22.py">Download this script</a>
|
||||
\tui_script{quality_controls_ex22.py}
|
||||
|
||||
*/
|
||||
|
@ -7,81 +7,68 @@
|
||||
<br>
|
||||
\anchor tui_translation
|
||||
<h3>Translation</h3>
|
||||
\include transforming_meshes_ex01.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex01.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex01.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_rotation
|
||||
<h3>Rotation</h3>
|
||||
\include transforming_meshes_ex02.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex02.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex02.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_scale
|
||||
<h3>Scale</h3>
|
||||
\include transforming_meshes_ex03.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex03.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex03.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_symmetry
|
||||
<h3>Symmetry</h3>
|
||||
\include transforming_meshes_ex04.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex04.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex04.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_merging_nodes
|
||||
<h3>Merging Nodes</h3>
|
||||
\include transforming_meshes_ex05.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex05.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex05.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_merging_elements
|
||||
<h3>Merging Elements</h3>
|
||||
\include transforming_meshes_ex06.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex06.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex06.py}
|
||||
|
||||
<br><h2>Sewing Meshes</h2>
|
||||
|
||||
<br>
|
||||
\anchor tui_sew_meshes_border_to_side
|
||||
<h3>Sew Meshes Border to Side</h3>
|
||||
\include transforming_meshes_ex07.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex07.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex07.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_sew_conform_free_borders
|
||||
<h3>Sew Conform Free Borders</h3>
|
||||
\include transforming_meshes_ex08.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex08.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex08.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_sew_free_borders
|
||||
<h3>Sew Free Borders</h3>
|
||||
\include transforming_meshes_ex09.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex09.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex09.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_sew_side_elements
|
||||
<h3>Sew Side Elements</h3>
|
||||
\include transforming_meshes_ex10.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex10.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex10.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_duplicate_nodes
|
||||
<h3>Duplicate nodes</h3>
|
||||
\include transforming_meshes_ex11.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex11.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex11.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_make_2dmesh_from_3d
|
||||
<h3>Create boundary elements</h3>
|
||||
\include transforming_meshes_ex12.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex12.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex12.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_reorient_faces
|
||||
<h3>Reorient faces by vector</h3>
|
||||
\include transforming_meshes_ex13.py
|
||||
<a href="../../examples/SMESH/transforming_meshes_ex13.py">Download this script</a>
|
||||
\tui_script{transforming_meshes_ex13.py}
|
||||
|
||||
*/
|
||||
|
@ -6,8 +6,7 @@ This sample demonstrates how to use <b>Use existing faces</b> algorithm,
|
||||
which is actulally just a stub allowing to use your own 2D algoritm
|
||||
implemented in Python.
|
||||
|
||||
\include use_existing_faces.py
|
||||
<a href="../../examples/SMESH/use_existing_faces.py">Download this script</a>
|
||||
\tui_script{use_existing_faces.py}
|
||||
|
||||
Resulting mesh:
|
||||
\image html use_existing_face_sample_mesh.png
|
||||
|
@ -5,13 +5,11 @@
|
||||
<br>
|
||||
\anchor tui_viewing_mesh_infos
|
||||
<h2>Viewing Mesh Infos</h2>
|
||||
\include viewing_meshes_ex01.py
|
||||
<a href="../../examples/SMESH/viewing_meshes_ex01.py">Download this script</a>
|
||||
\tui_script{viewing_meshes_ex01.py}
|
||||
|
||||
<br>
|
||||
\anchor tui_find_element_by_point
|
||||
<h2>Find Element by Point</h2>
|
||||
\include viewing_meshes_ex02.py
|
||||
<a href="../../examples/SMESH/viewing_meshes_ex02.py">Download this script</a>
|
||||
\tui_script{viewing_meshes_ex02.py}
|
||||
|
||||
*/
|
||||
|
@ -107,113 +107,214 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
|
||||
|
||||
// Read elements
|
||||
|
||||
int iN[28];
|
||||
int iN[28]; // 28 - nb nodes in HEX27 (+ 1 for safety :)
|
||||
|
||||
/* Read extra vertices for quadratic edges */
|
||||
std::vector<int> quadNodesAtEdges;
|
||||
int nbQuadEdges = 0;
|
||||
if ( (nbQuadEdges = GmfStatKwd(meshID, GmfExtraVerticesAtEdges)) )
|
||||
{
|
||||
quadNodesAtEdges.reserve( nbQuadEdges );
|
||||
GmfGotoKwd(meshID, GmfExtraVerticesAtEdges);
|
||||
for ( int i = 1; i <= nbQuadEdges; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfExtraVerticesAtEdges, &iN[0], &iN[1], &iN[2]);
|
||||
quadNodesAtEdges.push_back(iN[2]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Read edges */
|
||||
const int edgeIDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbEdges = GmfStatKwd(meshID, GmfEdges))
|
||||
{
|
||||
const bool readQuadNodes = ( nbQuadEdges == nbEdges );
|
||||
GmfGotoKwd(meshID, GmfEdges);
|
||||
for ( int i = 1; i <= nbEdges; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfEdges, &iN[0], &iN[1], &ref);
|
||||
if ( !myMesh->AddEdgeWithID( iN[0], iN[1], edgeIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfEdges",i, 2, iN[0], iN[1] );
|
||||
if ( readQuadNodes )
|
||||
{
|
||||
const int midN = quadNodesAtEdges[i-1];
|
||||
if ( !myMesh->AddEdgeWithID( iN[0], iN[1], midN, edgeIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfEdges + GmfExtraVerticesAtEdges",i, 3, iN[0],iN[1],midN);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !myMesh->AddEdgeWithID( iN[0], iN[1], edgeIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfEdges",i, 2, iN[0], iN[1] );
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Read quadratic edges */
|
||||
const int edge2IDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbEdges = GmfStatKwd(meshID, GmfEdgesP2))
|
||||
// the vector of extra vertices at edges won't be used anymore so it is cleared
|
||||
quadNodesAtEdges.clear();
|
||||
|
||||
/* Read extra vertices for quadratic triangles */
|
||||
std::vector< std::vector<int> > quadNodesAtTriangles;
|
||||
int nbQuadTria = 0;
|
||||
if ( (nbQuadTria = GmfStatKwd(meshID, GmfExtraVerticesAtTriangles)) )
|
||||
{
|
||||
GmfGotoKwd(meshID, GmfEdgesP2);
|
||||
for ( int i = 1; i <= nbEdges; ++i )
|
||||
GmfGotoKwd(meshID, GmfExtraVerticesAtTriangles);
|
||||
quadNodesAtTriangles.reserve( nbQuadTria );
|
||||
std::vector<int> nodes(4);
|
||||
for ( int i = 1; i <= nbQuadTria; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfEdgesP2, &iN[0], &iN[1], &iN[2], &ref);
|
||||
if ( !myMesh->AddEdgeWithID( iN[0], iN[1], iN[2], edge2IDShift + i ))
|
||||
status = storeBadNodeIds( "GmfEdgesP2",i, 3, iN[0], iN[1], iN[2] );
|
||||
GmfGetLin(meshID, GmfExtraVerticesAtTriangles,
|
||||
&iN[0], &iN[1], &iN[2], &iN[3], &iN[4],
|
||||
&iN[5]); // iN[5] - preview TRIA7
|
||||
nodes.clear();
|
||||
nodes.push_back(iN[2]);
|
||||
nodes.push_back(iN[3]);
|
||||
nodes.push_back(iN[4]);
|
||||
nodes.push_back(iN[5]);
|
||||
nodes.resize( iN[1] );
|
||||
|
||||
quadNodesAtTriangles.push_back(nodes);
|
||||
}
|
||||
}
|
||||
|
||||
/* Read triangles */
|
||||
const int triaIDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbTria = GmfStatKwd(meshID, GmfTriangles))
|
||||
{
|
||||
const bool readQuadNodes = (nbQuadTria == nbTria);
|
||||
GmfGotoKwd(meshID, GmfTriangles);
|
||||
for ( int i = 1; i <= nbTria; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfTriangles, &iN[0], &iN[1], &iN[2], &ref);
|
||||
if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], triaIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfTriangles",i, 3, iN[0], iN[1], iN[2] );
|
||||
if ( readQuadNodes )
|
||||
{
|
||||
const std::vector<int>& midN = quadNodesAtTriangles[ i-1 ];
|
||||
if ( !myMesh->AddFaceWithID( iN[0],iN[1],iN[2], midN[0],midN[1],midN[2], triaIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfTriangles + GmfExtraVerticesAtTriangles",i, 6,
|
||||
iN[0],iN[1],iN[2], midN[0],midN[1],midN[2] );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], triaIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfTriangles",i, 3, iN[0], iN[1], iN[2] );
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Read quadratic triangles */
|
||||
const int tria2IDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbTria = GmfStatKwd(meshID, GmfTrianglesP2))
|
||||
// the vector of extra vertices at triangles won't be used anymore so it is cleared
|
||||
quadNodesAtTriangles.clear();
|
||||
|
||||
/* Read extra vertices for quadratic quadrangles */
|
||||
std::vector< std::vector<int> > quadNodesAtQuadrilaterals;
|
||||
int nbQuadQuad = 0;
|
||||
if ( (nbQuadQuad = GmfStatKwd(meshID, GmfExtraVerticesAtQuadrilaterals)) )
|
||||
{
|
||||
GmfGotoKwd(meshID, GmfTrianglesP2);
|
||||
for ( int i = 1; i <= nbTria; ++i )
|
||||
GmfGotoKwd(meshID, GmfExtraVerticesAtQuadrilaterals);
|
||||
quadNodesAtQuadrilaterals.reserve( nbQuadQuad );
|
||||
std::vector<int> nodes( 5 );
|
||||
for ( int i = 1; i <= nbQuadQuad; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfTrianglesP2,
|
||||
&iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &ref);
|
||||
if ( !myMesh->AddFaceWithID( iN[0],iN[1],iN[2],iN[3],iN[4],iN[5],
|
||||
tria2IDShift + i ))
|
||||
status = storeBadNodeIds( "GmfTrianglesP2",i, 6, iN[0],iN[1],iN[2],iN[3],iN[4],iN[5] );
|
||||
GmfGetLin(meshID, GmfExtraVerticesAtQuadrilaterals,
|
||||
&iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6]);
|
||||
nodes.clear();
|
||||
nodes.push_back(iN[2]);
|
||||
nodes.push_back(iN[3]);
|
||||
nodes.push_back(iN[4]);
|
||||
nodes.push_back(iN[5]);
|
||||
nodes.push_back(iN[6]);
|
||||
nodes.resize( iN[1] );
|
||||
|
||||
quadNodesAtQuadrilaterals.push_back(nodes);
|
||||
}
|
||||
}
|
||||
/* Read quadrangles */
|
||||
|
||||
/* Read quadrangles */
|
||||
const int quadIDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbQuad = GmfStatKwd(meshID, GmfQuadrilaterals))
|
||||
{
|
||||
const bool readQuadNodes = (nbQuadQuad == nbQuad);
|
||||
GmfGotoKwd(meshID, GmfQuadrilaterals);
|
||||
for ( int i = 1; i <= nbQuad; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfQuadrilaterals, &iN[0], &iN[1], &iN[2], &iN[3], &ref);
|
||||
if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3], quadIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfQuadrilaterals",i, 4, iN[0], iN[1],iN[2], iN[3] );
|
||||
if ( readQuadNodes )
|
||||
{
|
||||
const std::vector<int>& midN = quadNodesAtQuadrilaterals[ i-1 ];
|
||||
if ( midN.size() == 4 )
|
||||
{
|
||||
if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3],
|
||||
midN[0], midN[1], midN[2], midN[3],
|
||||
quadIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfQuadrilaterals + GmfExtraVerticesAtQuadrilaterals",i, 8,
|
||||
iN[0], iN[1],iN[2], iN[3],
|
||||
midN[0], midN[1], midN[2], midN[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3],
|
||||
midN[0], midN[1], midN[2], midN[3], midN[4],
|
||||
quadIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfQuadrilaterals + GmfExtraVerticesAtQuadrilaterals",i, 9,
|
||||
iN[0], iN[1],iN[2], iN[3],
|
||||
midN[0], midN[1], midN[2], midN[3], midN[4]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3], quadIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfQuadrilaterals",i, 4, iN[0], iN[1],iN[2], iN[3] );
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Read bi-quadratic quadrangles */
|
||||
const int quad2IDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbQuad = GmfStatKwd(meshID, GmfQuadrilateralsQ2))
|
||||
// the vector of extra vertices at quadrilaterals won't be used anymore so it is cleared
|
||||
quadNodesAtQuadrilaterals.clear();
|
||||
|
||||
/* Read extra vertices for quadratic tetrahedra */
|
||||
std::vector< std::vector<int> > quadNodesAtTetrahedra;
|
||||
int nbQuadTetra = 0;
|
||||
if ( (nbQuadTetra = GmfStatKwd(meshID, GmfExtraVerticesAtTetrahedra)) )
|
||||
{
|
||||
GmfGotoKwd(meshID, GmfQuadrilateralsQ2);
|
||||
for ( int i = 1; i <= nbQuad; ++i )
|
||||
GmfGotoKwd(meshID, GmfExtraVerticesAtTetrahedra);
|
||||
quadNodesAtTetrahedra.reserve( nbQuadTetra );
|
||||
std::vector<int> nodes( 6 );
|
||||
for ( int i = 1; i <= nbQuadTetra; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfQuadrilateralsQ2,
|
||||
&iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6], &iN[7], &iN[8], &ref);
|
||||
if ( !myMesh->AddFaceWithID( iN[0],iN[1],iN[2],iN[3],iN[4],iN[5],iN[6],iN[7],iN[8],
|
||||
quad2IDShift + i ))
|
||||
status = storeBadNodeIds( "GmfQuadrilateralsQ2",i,
|
||||
9, iN[0],iN[1],iN[2],iN[3],iN[4],iN[5],iN[6],iN[7],iN[8] );
|
||||
GmfGetLin(meshID, GmfExtraVerticesAtTetrahedra,
|
||||
&iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6], &iN[7]);
|
||||
nodes.clear();
|
||||
nodes.push_back(iN[2]);
|
||||
nodes.push_back(iN[3]);
|
||||
nodes.push_back(iN[4]);
|
||||
nodes.push_back(iN[5]);
|
||||
nodes.push_back(iN[6]);
|
||||
nodes.push_back(iN[7]);
|
||||
nodes.resize( iN[1] );
|
||||
|
||||
quadNodesAtTetrahedra.push_back(nodes);
|
||||
}
|
||||
}
|
||||
|
||||
/* Read terahedra */
|
||||
const int tetIDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbTet = GmfStatKwd(meshID, GmfTetrahedra))
|
||||
{
|
||||
const bool readQuadNodes = (nbQuadTetra == nbTet);
|
||||
GmfGotoKwd(meshID, GmfTetrahedra);
|
||||
for ( int i = 1; i <= nbTet; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfTetrahedra, &iN[0], &iN[1], &iN[2], &iN[3], &ref);
|
||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], tetIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfTetrahedra",i, 4, iN[0], iN[1],iN[2], iN[3] );
|
||||
}
|
||||
}
|
||||
/* Read quadratic terahedra */
|
||||
const int tet2IDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbTet = GmfStatKwd(meshID, GmfTetrahedraP2))
|
||||
{
|
||||
GmfGotoKwd(meshID, GmfTetrahedraP2);
|
||||
for ( int i = 1; i <= nbTet; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfTetrahedraP2, &iN[0], &iN[1], &iN[2],
|
||||
&iN[3], &iN[4], &iN[5], &iN[6], &iN[7], &iN[8], &iN[9], &ref);
|
||||
if ( !myMesh->AddVolumeWithID( iN[0],iN[2],iN[1],iN[3],
|
||||
iN[6],iN[5],iN[4],
|
||||
iN[7],iN[9],iN[8], tet2IDShift + i ))
|
||||
status = storeBadNodeIds( "GmfTetrahedraP2",i, 10, iN[0],iN[1],iN[2],iN[3],
|
||||
iN[4],iN[5],iN[6],iN[7],iN[8],iN[9] );
|
||||
if ( readQuadNodes )
|
||||
{
|
||||
const std::vector<int>& midN = quadNodesAtTetrahedra[ i-1 ];
|
||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3],
|
||||
midN[2], midN[1], midN[0], midN[3], midN[5], midN[4], tetIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfTetrahedra + GmfExtraVerticesAtTetrahedra",i, 10, iN[0], iN[2], iN[1], iN[3],
|
||||
midN[2], midN[1], midN[0], midN[3], midN[5], midN[4] );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], tetIDShift + i ) )
|
||||
status = storeBadNodeIds( "GmfTetrahedra" ,i, 4, iN[0], iN[2], iN[1], iN[3] );
|
||||
}
|
||||
}
|
||||
}
|
||||
// the vector of extra vertices at tetrahedra won't be used anymore so it is cleared
|
||||
quadNodesAtTetrahedra.clear();
|
||||
|
||||
/* Read pyramids */
|
||||
const int pyrIDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbPyr = GmfStatKwd(meshID, GmfPyramids))
|
||||
@ -226,42 +327,115 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
|
||||
status = storeBadNodeIds( "GmfPyramids",i, 5, iN[0], iN[1],iN[2], iN[3], iN[4] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Read extra vertices for quadratic hexahedra */
|
||||
std::vector< std::vector<int> > quadNodesAtHexahedra;
|
||||
int nbQuadHexa = 0;
|
||||
if ( (nbQuadHexa = GmfStatKwd(meshID, GmfExtraVerticesAtHexahedra)) )
|
||||
{
|
||||
GmfGotoKwd(meshID, GmfExtraVerticesAtHexahedra);
|
||||
quadNodesAtHexahedra.reserve( nbQuadHexa );
|
||||
std::vector<int> nodes( 19 );
|
||||
for ( int i = 1; i <= nbQuadHexa; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfExtraVerticesAtHexahedra, &iN[0], &iN[1], // Hexa Id, Nb of extra vertices
|
||||
&iN[2], &iN[3], &iN[4], &iN[5],
|
||||
&iN[6], &iN[7], &iN[8], &iN[9],
|
||||
&iN[10], &iN[11], &iN[12], &iN[13], // HEXA20
|
||||
&iN[14],
|
||||
&iN[15], &iN[16], &iN[17], &iN[18],
|
||||
&iN[19],
|
||||
&iN[20]); // HEXA27
|
||||
nodes.clear();
|
||||
nodes.push_back(iN[2]);
|
||||
nodes.push_back(iN[3]);
|
||||
nodes.push_back(iN[4]);
|
||||
nodes.push_back(iN[5]);
|
||||
nodes.push_back(iN[6]);
|
||||
nodes.push_back(iN[7]);
|
||||
nodes.push_back(iN[8]);
|
||||
nodes.push_back(iN[9]);
|
||||
nodes.push_back(iN[10]);
|
||||
nodes.push_back(iN[11]);
|
||||
nodes.push_back(iN[12]);
|
||||
nodes.push_back(iN[13]);
|
||||
nodes.push_back(iN[14]);
|
||||
nodes.push_back(iN[15]);
|
||||
nodes.push_back(iN[16]);
|
||||
nodes.push_back(iN[17]);
|
||||
nodes.push_back(iN[18]);
|
||||
nodes.push_back(iN[19]);
|
||||
nodes.push_back(iN[20]);
|
||||
nodes.resize( iN[1] );
|
||||
|
||||
quadNodesAtHexahedra.push_back(nodes);
|
||||
}
|
||||
}
|
||||
|
||||
/* Read hexahedra */
|
||||
const int hexIDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbHex = GmfStatKwd(meshID, GmfHexahedra))
|
||||
{
|
||||
const bool readQuadNodes = (nbQuadHexa == nbHex);
|
||||
GmfGotoKwd(meshID, GmfHexahedra);
|
||||
for ( int i = 1; i <= nbHex; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfHexahedra,
|
||||
&iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6], &iN[7], &ref);
|
||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1], iN[4], iN[7], iN[6], iN[5],
|
||||
hexIDShift + i))
|
||||
status = storeBadNodeIds( "GmfHexahedra",i,
|
||||
8, iN[0], iN[1],iN[2], iN[3], iN[4], iN[7], iN[6], iN[5] );
|
||||
}
|
||||
}
|
||||
/* Read tri-quadratic hexahedra */
|
||||
const int hex2IDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbHex = GmfStatKwd(meshID, GmfHexahedraQ2))
|
||||
{
|
||||
GmfGotoKwd(meshID, GmfHexahedraQ2);
|
||||
for ( int i = 1; i <= nbHex; ++i )
|
||||
{
|
||||
GmfGetLin(meshID, GmfHexahedraQ2, &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5],
|
||||
&iN[6], &iN[7], &iN[8],&iN[9],&iN[10],&iN[11],&iN[12],&iN[13],&iN[14],
|
||||
&iN[15],&iN[16],&iN[17],&iN[18],&iN[19],&iN[20],&iN[21],&iN[22],&iN[23],
|
||||
&iN[24],&iN[25],&iN[26], &ref);
|
||||
if ( !myMesh->AddVolumeWithID( iN[0],iN[3],iN[2],iN[1],iN[4],iN[7],iN[6],iN[5],iN[11],iN[10],
|
||||
iN[9],iN[8],iN[12],iN[15],iN[14], iN[13],iN[19],iN[18],iN[17],
|
||||
iN[16],iN[20],iN[24],iN[23],iN[22],iN[21], iN[25],iN[26],
|
||||
hex2IDShift + i ))
|
||||
status = storeBadNodeIds( "GmfHexahedraQ2",i, 27,
|
||||
iN[0],iN[3],iN[2],iN[1],iN[4], iN[7],iN[6],iN[5],iN[11],iN[10],
|
||||
iN[9],iN[8],iN[12],iN[15],iN[14], iN[13],iN[19],iN[18],iN[17],
|
||||
iN[16],iN[20],iN[24],iN[23],iN[22],iN[21], iN[25],iN[26]);
|
||||
GmfGetLin(meshID, GmfHexahedra, &iN[0], &iN[1], &iN[2], &iN[3],
|
||||
&iN[4], &iN[5], &iN[6], &iN[7],&ref);
|
||||
if ( readQuadNodes )
|
||||
{
|
||||
const std::vector<int>& midN = quadNodesAtHexahedra[ i-1 ];
|
||||
if ( midN.size() == 12 ) // HEXA20
|
||||
{
|
||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1],
|
||||
iN[4], iN[7], iN[6], iN[5],
|
||||
midN[3], midN[2], midN[1], midN[0],
|
||||
midN[7], midN[6], midN[5], midN[4],
|
||||
midN[8], midN[11], midN[10], midN[9],
|
||||
tetIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 20,
|
||||
iN[0], iN[3], iN[2], iN[1],
|
||||
iN[4], iN[7], iN[6], iN[5],
|
||||
midN[3], midN[2], midN[1], midN[0],
|
||||
midN[7], midN[6], midN[5], midN[4],
|
||||
midN[8], midN[11], midN[10], midN[9]);
|
||||
}
|
||||
else // HEXA27
|
||||
{
|
||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1],
|
||||
iN[4], iN[7], iN[6], iN[5],
|
||||
midN[3], midN[2], midN[1], midN[0],
|
||||
midN[7], midN[6], midN[5], midN[4],
|
||||
midN[8], midN[11], midN[10], midN[9],
|
||||
midN[12],
|
||||
midN[16], midN[15], midN[14], midN[13],
|
||||
midN[17],
|
||||
midN[18],
|
||||
tetIDShift + i ))
|
||||
status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 27,
|
||||
iN[0], iN[3], iN[2], iN[1],
|
||||
iN[4], iN[7], iN[6], iN[5],
|
||||
midN[3], midN[2], midN[1], midN[0],
|
||||
midN[7], midN[6], midN[5], midN[4],
|
||||
midN[8], midN[11], midN[10], midN[9],
|
||||
midN[12],
|
||||
midN[16], midN[15], midN[14], midN[13],
|
||||
midN[17],
|
||||
midN[18]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1],
|
||||
iN[4], iN[7], iN[6], iN[5], hexIDShift + i ) )
|
||||
status = storeBadNodeIds( "GmfHexahedra" ,i, 8, iN[0], iN[3], iN[2], iN[1],
|
||||
iN[4], iN[7], iN[6], iN[5] );
|
||||
}
|
||||
}
|
||||
}
|
||||
// the vector of extra vertices at tetrahedra won't be used anymore so it is cleared
|
||||
quadNodesAtHexahedra.clear();
|
||||
|
||||
/* Read prism */
|
||||
const int prismIDShift = myMesh->GetMeshInfo().NbElements();
|
||||
if ( int nbPrism = GmfStatKwd(meshID, GmfPrisms))
|
||||
|
@ -49,6 +49,16 @@ extern "C"
|
||||
const SMDS_MeshElement* elem = elemIt->next(); \
|
||||
GmfSetLin(meshID, GmfKwd,
|
||||
|
||||
#define BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity, GmfKwd, elem, nbVertices ) \
|
||||
elemIt = myMesh->elementEntityIterator( SMDSEntity ); \
|
||||
if ( elemIt->more() ) \
|
||||
{ \
|
||||
GmfSetKwd(meshID, GmfKwd, myMesh->GetMeshInfo().NbEntities( SMDSEntity )); \
|
||||
for ( int gmfID = 1; elemIt->more(); ++gmfID ) \
|
||||
{ \
|
||||
const SMDS_MeshElement* elem = elemIt->next(); \
|
||||
GmfSetLin(meshID, GmfKwd, gmfID, nbVertices,
|
||||
|
||||
#define END_ELEM_WRITE( elem ) \
|
||||
elem->getshapeId() ); \
|
||||
}} \
|
||||
@ -58,6 +68,10 @@ extern "C"
|
||||
e2id.insert( e2id.end(), make_pair( elem, gmfID )); \
|
||||
}} \
|
||||
|
||||
#define END_EXTRA_VERTICES_WRITE() \
|
||||
); \
|
||||
}} \
|
||||
|
||||
|
||||
DriverGMF_Write::DriverGMF_Write():
|
||||
Driver_SMESHDS_Mesh(), _exportRequiredGroups( true )
|
||||
@ -67,6 +81,12 @@ DriverGMF_Write::~DriverGMF_Write()
|
||||
{
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Reads a GMF file
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
Driver_Mesh::Status DriverGMF_Write::Perform()
|
||||
{
|
||||
Kernel_Utils::Localizer loc;
|
||||
@ -110,14 +130,17 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
||||
node2IdMap[ edge->GetNode( 0 )],
|
||||
node2IdMap[ edge->GetNode( 1 )],
|
||||
END_ELEM_WRITE_ADD_TO_MAP( edge, edge2IDMap );
|
||||
|
||||
|
||||
// quadratic edges
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Edge, GmfEdgesP2, edge )
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Edge, GmfEdges, edge )
|
||||
node2IdMap[ edge->GetNode( 0 )],
|
||||
node2IdMap[ edge->GetNode( 1 )],
|
||||
node2IdMap[ edge->GetNode( 2 )],
|
||||
END_ELEM_WRITE( edge );
|
||||
|
||||
|
||||
BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Edge, GmfExtraVerticesAtEdges, edge, 1 )
|
||||
node2IdMap[ edge->GetNode( 2 )]
|
||||
END_EXTRA_VERTICES_WRITE();
|
||||
|
||||
// triangles
|
||||
TElem2IDMap tria2IDMap;
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Triangle, GmfTriangles, tria )
|
||||
@ -125,17 +148,20 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
||||
node2IdMap[ tria->GetNode( 1 )],
|
||||
node2IdMap[ tria->GetNode( 2 )],
|
||||
END_ELEM_WRITE_ADD_TO_MAP( tria, tria2IDMap );
|
||||
|
||||
|
||||
// quadratic triangles
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Triangle, GmfTrianglesP2, tria )
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Triangle, GmfTriangles, tria )
|
||||
node2IdMap[ tria->GetNode( 0 )],
|
||||
node2IdMap[ tria->GetNode( 1 )],
|
||||
node2IdMap[ tria->GetNode( 2 )],
|
||||
END_ELEM_WRITE( tria );
|
||||
|
||||
BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Triangle, GmfExtraVerticesAtTriangles, tria, 3 )
|
||||
node2IdMap[ tria->GetNode( 3 )],
|
||||
node2IdMap[ tria->GetNode( 4 )],
|
||||
node2IdMap[ tria->GetNode( 5 )],
|
||||
END_ELEM_WRITE( tria );
|
||||
|
||||
node2IdMap[ tria->GetNode( 5 )]
|
||||
END_EXTRA_VERTICES_WRITE();
|
||||
|
||||
// quadrangles
|
||||
TElem2IDMap quad2IDMap;
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quadrangle, GmfQuadrilaterals, quad )
|
||||
@ -145,19 +171,37 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
||||
node2IdMap[ quad->GetNode( 3 )],
|
||||
END_ELEM_WRITE_ADD_TO_MAP( quad, quad2IDMap );
|
||||
|
||||
// bi-quadratic quadrangles
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_BiQuad_Quadrangle, GmfQuadrilateralsQ2, quad )
|
||||
// quadratic quadrangles
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Quadrangle, GmfQuadrilaterals, quad )
|
||||
node2IdMap[ quad->GetNode( 0 )],
|
||||
node2IdMap[ quad->GetNode( 3 )],
|
||||
node2IdMap[ quad->GetNode( 2 )],
|
||||
node2IdMap[ quad->GetNode( 1 )],
|
||||
node2IdMap[ quad->GetNode( 7 )],
|
||||
node2IdMap[ quad->GetNode( 6 )],
|
||||
node2IdMap[ quad->GetNode( 5 )],
|
||||
node2IdMap[ quad->GetNode( 4 )],
|
||||
node2IdMap[ quad->GetNode( 8 )],
|
||||
node2IdMap[ quad->GetNode( 2 )],
|
||||
node2IdMap[ quad->GetNode( 3 )],
|
||||
END_ELEM_WRITE( quad );
|
||||
|
||||
|
||||
BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Quadrangle, GmfExtraVerticesAtQuadrilaterals, quad, 4 )
|
||||
node2IdMap[ quad->GetNode( 4 )],
|
||||
node2IdMap[ quad->GetNode( 5 )],
|
||||
node2IdMap[ quad->GetNode( 6 )],
|
||||
node2IdMap[ quad->GetNode( 7 )]
|
||||
END_EXTRA_VERTICES_WRITE();
|
||||
|
||||
// bi-quadratic quadrangles
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_BiQuad_Quadrangle, GmfQuadrilaterals, quad )
|
||||
node2IdMap[ quad->GetNode( 0 )],
|
||||
node2IdMap[ quad->GetNode( 1 )],
|
||||
node2IdMap[ quad->GetNode( 2 )],
|
||||
node2IdMap[ quad->GetNode( 3 )],
|
||||
END_ELEM_WRITE( quad );
|
||||
|
||||
BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_BiQuad_Quadrangle, GmfExtraVerticesAtQuadrilaterals, quad, 5 )
|
||||
node2IdMap[ quad->GetNode( 4 )],
|
||||
node2IdMap[ quad->GetNode( 5 )],
|
||||
node2IdMap[ quad->GetNode( 6 )],
|
||||
node2IdMap[ quad->GetNode( 7 )],
|
||||
node2IdMap[ quad->GetNode( 8 )]
|
||||
END_EXTRA_VERTICES_WRITE();
|
||||
|
||||
// terahedra
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Tetra, GmfTetrahedra, tetra )
|
||||
node2IdMap[ tetra->GetNode( 0 )],
|
||||
@ -165,20 +209,23 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
||||
node2IdMap[ tetra->GetNode( 1 )],
|
||||
node2IdMap[ tetra->GetNode( 3 )],
|
||||
END_ELEM_WRITE( tetra );
|
||||
|
||||
|
||||
// quadratic terahedra
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Tetra, GmfTetrahedraP2, tetra )
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Tetra, GmfTetrahedra, tetra )
|
||||
node2IdMap[ tetra->GetNode( 0 )],
|
||||
node2IdMap[ tetra->GetNode( 2 )],
|
||||
node2IdMap[ tetra->GetNode( 1 )],
|
||||
node2IdMap[ tetra->GetNode( 3 )],
|
||||
END_ELEM_WRITE( tetra );
|
||||
|
||||
BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Tetra, GmfExtraVerticesAtTetrahedra, tetra, 6 )
|
||||
node2IdMap[ tetra->GetNode( 6 )],
|
||||
node2IdMap[ tetra->GetNode( 5 )],
|
||||
node2IdMap[ tetra->GetNode( 4 )],
|
||||
node2IdMap[ tetra->GetNode( 7 )],
|
||||
node2IdMap[ tetra->GetNode( 9 )],
|
||||
node2IdMap[ tetra->GetNode( 8 )],
|
||||
END_ELEM_WRITE( tetra );
|
||||
node2IdMap[ tetra->GetNode( 8 )]
|
||||
END_EXTRA_VERTICES_WRITE();
|
||||
|
||||
// pyramids
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Pyramid, GmfPyramids, pyra )
|
||||
@ -201,8 +248,8 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
||||
node2IdMap[ hexa->GetNode( 5 )],
|
||||
END_ELEM_WRITE( hexa );
|
||||
|
||||
// tri-quadratic hexahedra
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_TriQuad_Hexa, GmfHexahedraQ2, hexa )
|
||||
// quadratic hexahedra
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Quad_Hexa, GmfHexahedra, hexa )
|
||||
node2IdMap[ hexa->GetNode( 0 )],
|
||||
node2IdMap[ hexa->GetNode( 3 )],
|
||||
node2IdMap[ hexa->GetNode( 2 )],
|
||||
@ -211,26 +258,56 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
||||
node2IdMap[ hexa->GetNode( 7 )],
|
||||
node2IdMap[ hexa->GetNode( 6 )],
|
||||
node2IdMap[ hexa->GetNode( 5 )],
|
||||
END_ELEM_WRITE( hexa );
|
||||
|
||||
BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Hexa, GmfExtraVerticesAtHexahedra, hexa, 12 )
|
||||
node2IdMap[ hexa->GetNode( 11 )],
|
||||
node2IdMap[ hexa->GetNode( 10 )],
|
||||
node2IdMap[ hexa->GetNode( 9 )],
|
||||
node2IdMap[ hexa->GetNode( 8 )],
|
||||
node2IdMap[ hexa->GetNode( 12 )],
|
||||
node2IdMap[ hexa->GetNode( 15 )],
|
||||
node2IdMap[ hexa->GetNode( 14 )],
|
||||
node2IdMap[ hexa->GetNode( 13 )],
|
||||
node2IdMap[ hexa->GetNode( 12 )],
|
||||
node2IdMap[ hexa->GetNode( 16 )],
|
||||
node2IdMap[ hexa->GetNode( 19 )],
|
||||
node2IdMap[ hexa->GetNode( 18 )],
|
||||
node2IdMap[ hexa->GetNode( 17 )]
|
||||
END_EXTRA_VERTICES_WRITE();
|
||||
|
||||
// tri-quadratic hexahedra
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_TriQuad_Hexa, GmfHexahedra, hexa )
|
||||
node2IdMap[ hexa->GetNode( 0 )],
|
||||
node2IdMap[ hexa->GetNode( 3 )],
|
||||
node2IdMap[ hexa->GetNode( 2 )],
|
||||
node2IdMap[ hexa->GetNode( 1 )],
|
||||
node2IdMap[ hexa->GetNode( 4 )],
|
||||
node2IdMap[ hexa->GetNode( 7 )],
|
||||
node2IdMap[ hexa->GetNode( 6 )],
|
||||
node2IdMap[ hexa->GetNode( 5 )],
|
||||
END_ELEM_WRITE( hexa );
|
||||
|
||||
BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_TriQuad_Hexa, GmfExtraVerticesAtHexahedra, hexa, 19 )
|
||||
node2IdMap[ hexa->GetNode( 11 )],
|
||||
node2IdMap[ hexa->GetNode( 10 )],
|
||||
node2IdMap[ hexa->GetNode( 9 )],
|
||||
node2IdMap[ hexa->GetNode( 8 )],
|
||||
node2IdMap[ hexa->GetNode( 15 )],
|
||||
node2IdMap[ hexa->GetNode( 14 )],
|
||||
node2IdMap[ hexa->GetNode( 13 )],
|
||||
node2IdMap[ hexa->GetNode( 12 )],
|
||||
node2IdMap[ hexa->GetNode( 16 )],
|
||||
node2IdMap[ hexa->GetNode( 19 )],
|
||||
node2IdMap[ hexa->GetNode( 18 )],
|
||||
node2IdMap[ hexa->GetNode( 17 )],
|
||||
node2IdMap[ hexa->GetNode( 16 )],
|
||||
node2IdMap[ hexa->GetNode( 20 )],
|
||||
node2IdMap[ hexa->GetNode( 24 )],
|
||||
node2IdMap[ hexa->GetNode( 23 )],
|
||||
node2IdMap[ hexa->GetNode( 22 )],
|
||||
node2IdMap[ hexa->GetNode( 21 )],
|
||||
node2IdMap[ hexa->GetNode( 25 )],
|
||||
node2IdMap[ hexa->GetNode( 26 )],
|
||||
END_ELEM_WRITE( hexa );
|
||||
node2IdMap[ hexa->GetNode( 26 )]
|
||||
END_EXTRA_VERTICES_WRITE();
|
||||
|
||||
// prism
|
||||
BEGIN_ELEM_WRITE( SMDSEntity_Penta, GmfPrisms, prism )
|
||||
|
@ -1362,6 +1362,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>&
|
||||
set<int> tofind;
|
||||
int ids[16] = { 0, 1, 2, 3, 0, 3, 4, 3, 2, 4, 2, 1, 4, 1, 0, 4 };
|
||||
|
||||
// Quadrangular face
|
||||
tofind.clear();
|
||||
for (int i = 0; i < 4; i++)
|
||||
tofind.insert(nodes[ids[i]]);
|
||||
@ -1371,6 +1372,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>&
|
||||
orderedNodes[i] = nodes[ids[i]];
|
||||
return;
|
||||
}
|
||||
// Triangular faces
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
tofind.clear();
|
||||
@ -1489,6 +1491,7 @@ SMDS_DownQuadPyramid::~SMDS_DownQuadPyramid()
|
||||
|
||||
void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
|
||||
{
|
||||
// MESSAGE("SMDS_DownQuadPyramid::getOrderedNodesOfFace cellId = " << cellId);
|
||||
set<int> setNodes;
|
||||
setNodes.clear();
|
||||
for (int i = 0; i < orderedNodes.size(); i++)
|
||||
@ -1503,8 +1506,9 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdTy
|
||||
int ids[32] = { 0, 1, 2, 3, 5, 6, 7, 8,
|
||||
0, 3, 4, 8, 12, 9, 3, 2, 4, 7 , 11, 12, 2, 1, 4, 6, 10, 11, 1, 0, 4, 5, 9, 10 };
|
||||
|
||||
// Quadrangular face
|
||||
tofind.clear();
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i < 8; i++)
|
||||
tofind.insert(nodes[ids[i]]);
|
||||
if (setNodes == tofind)
|
||||
{
|
||||
@ -1512,6 +1516,7 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdTy
|
||||
orderedNodes[i] = nodes[ids[i]];
|
||||
return;
|
||||
}
|
||||
// Triangular faces
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
tofind.clear();
|
||||
@ -1525,7 +1530,7 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdTy
|
||||
}
|
||||
}
|
||||
MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
|
||||
MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
|
||||
MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
|
||||
MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
|
||||
}
|
||||
|
||||
@ -1661,6 +1666,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
|
||||
//int ids[18] = { 0, 2, 1, 3, 4, 5, 0, 1, 4, 3, 1, 2, 5, 4, 2, 0, 3, 5 };
|
||||
int ids[18] = { 0, 1, 2, 3, 5, 4, 0, 3, 4, 1, 1, 4, 5, 2, 2, 5, 3, 0 };
|
||||
|
||||
// Triangular faces
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
tofind.clear();
|
||||
@ -1673,6 +1679,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Quadrangular faces
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
tofind.clear();
|
||||
@ -1810,6 +1817,7 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
|
||||
int ids[36] = { 0, 1, 2, 6, 7, 8, 3, 5, 4, 11, 10, 9,
|
||||
0, 3, 4, 1, 12, 9, 13, 6, 1, 4, 5, 2, 13, 10, 14, 7, 2, 5, 3, 0, 14, 11, 12, 8 };
|
||||
|
||||
// Triangular faces
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
tofind.clear();
|
||||
@ -1822,6 +1830,7 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Quadrangular faces
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
tofind.clear();
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include <GCPnts_AbscissaPoint.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <LDOMParser.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
@ -73,6 +74,98 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns \a true if two algorithms (described by \a this and the given
|
||||
* algo data) are compatible by their output and input types of elements.
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool SMESH_Algo::Features::IsCompatible( const SMESH_Algo::Features& algo2 ) const
|
||||
{
|
||||
if ( _dim > algo2._dim ) return algo2.IsCompatible( *this );
|
||||
// algo2 is of highter dimension
|
||||
if ( _outElemTypes.empty() || algo2._inElemTypes.empty() )
|
||||
return false;
|
||||
bool compatible = true;
|
||||
set<SMDSAbs_GeometryType>::const_iterator myOutType = _outElemTypes.begin();
|
||||
for ( ; myOutType != _outElemTypes.end() && compatible; ++myOutType )
|
||||
compatible = algo2._inElemTypes.count( *myOutType );
|
||||
return compatible;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Return Data of the algorithm
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
const SMESH_Algo::Features& SMESH_Algo::GetFeatures( const std::string& algoType )
|
||||
{
|
||||
static map< string, SMESH_Algo::Features > theFeaturesByName;
|
||||
if ( theFeaturesByName.empty() )
|
||||
{
|
||||
// Read Plugin.xml files
|
||||
vector< string > xmlPaths = SMESH_Gen::GetPluginXMLPaths();
|
||||
LDOMParser xmlParser;
|
||||
for ( size_t iXML = 0; iXML < xmlPaths.size(); ++iXML )
|
||||
{
|
||||
bool error = xmlParser.parse( xmlPaths[iXML].c_str() );
|
||||
if ( error )
|
||||
{
|
||||
TCollection_AsciiString data;
|
||||
INFOS( xmlParser.GetError(data) );
|
||||
continue;
|
||||
}
|
||||
// <algorithm type="Regular_1D"
|
||||
// ...
|
||||
// input="EDGE"
|
||||
// output="QUAD,TRIA">
|
||||
//
|
||||
LDOM_Document xmlDoc = xmlParser.getDocument();
|
||||
LDOM_NodeList algoNodeList = xmlDoc.getElementsByTagName( "algorithm" );
|
||||
for ( int i = 0; i < algoNodeList.getLength(); ++i )
|
||||
{
|
||||
LDOM_Node algoNode = algoNodeList.item( i );
|
||||
LDOM_Element& algoElem = (LDOM_Element&) algoNode;
|
||||
TCollection_AsciiString algoType = algoElem.getAttribute("type");
|
||||
TCollection_AsciiString input = algoElem.getAttribute("input");
|
||||
TCollection_AsciiString output = algoElem.getAttribute("output");
|
||||
TCollection_AsciiString dim = algoElem.getAttribute("dim");
|
||||
TCollection_AsciiString label = algoElem.getAttribute("label-id");
|
||||
if ( algoType.IsEmpty() ) continue;
|
||||
|
||||
Features & data = theFeaturesByName[ algoType.ToCString() ];
|
||||
data._dim = dim.IntegerValue();
|
||||
data._label = label.ToCString();
|
||||
for ( int isInput = 0; isInput < 2; ++isInput )
|
||||
{
|
||||
TCollection_AsciiString& typeStr = isInput ? input : output;
|
||||
set<SMDSAbs_GeometryType>& typeSet = isInput ? data._inElemTypes : data._outElemTypes;
|
||||
int beg = 1, end;
|
||||
while ( beg <= typeStr.Length() )
|
||||
{
|
||||
while ( beg < typeStr.Length() && !isalpha( typeStr.Value( beg ) ))
|
||||
++beg;
|
||||
end = beg;
|
||||
while ( end < typeStr.Length() && isalpha( typeStr.Value( end + 1 ) ))
|
||||
++end;
|
||||
if ( end > beg )
|
||||
{
|
||||
TCollection_AsciiString typeName = typeStr.SubString( beg, end );
|
||||
if ( typeName == "EDGE" ) typeSet.insert( SMDSGeom_EDGE );
|
||||
else if ( typeName == "TRIA" ) typeSet.insert( SMDSGeom_TRIANGLE );
|
||||
else if ( typeName == "QUAD" ) typeSet.insert( SMDSGeom_QUADRANGLE );
|
||||
}
|
||||
beg = end + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return theFeaturesByName[ algoType ];
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -252,120 +345,13 @@ bool SMESH_Algo::FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool norm
|
||||
return ok;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Find out elements orientation on a geometrical face
|
||||
* \param theFace - The face correctly oriented in the shape being meshed
|
||||
* \param theMeshDS - The mesh data structure
|
||||
* \retval bool - true if the face normal and the normal of first element
|
||||
* in the correspoding submesh point in different directions
|
||||
/*
|
||||
* Moved to SMESH_MesherHelper
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool SMESH_Algo::IsReversedSubMesh (const TopoDS_Face& theFace,
|
||||
SMESHDS_Mesh* theMeshDS)
|
||||
{
|
||||
if ( theFace.IsNull() || !theMeshDS )
|
||||
return false;
|
||||
|
||||
// find out orientation of a meshed face
|
||||
int faceID = theMeshDS->ShapeToIndex( theFace );
|
||||
TopoDS_Shape aMeshedFace = theMeshDS->IndexToShape( faceID );
|
||||
bool isReversed = ( theFace.Orientation() != aMeshedFace.Orientation() );
|
||||
|
||||
const SMESHDS_SubMesh * aSubMeshDSFace = theMeshDS->MeshElements( faceID );
|
||||
if ( !aSubMeshDSFace )
|
||||
return isReversed;
|
||||
|
||||
// find element with node located on face and get its normal
|
||||
const SMDS_FacePosition* facePos = 0;
|
||||
int vertexID = 0;
|
||||
gp_Pnt nPnt[3];
|
||||
gp_Vec Ne;
|
||||
bool normalOK = false;
|
||||
SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
|
||||
while ( iteratorElem->more() ) // loop on elements on theFace
|
||||
{
|
||||
const SMDS_MeshElement* elem = iteratorElem->next();
|
||||
if ( elem && elem->NbNodes() > 2 ) {
|
||||
SMDS_ElemIteratorPtr nodesIt = elem->nodesIterator();
|
||||
const SMDS_FacePosition* fPos = 0;
|
||||
int i = 0, vID = 0;
|
||||
while ( nodesIt->more() ) { // loop on nodes
|
||||
const SMDS_MeshNode* node
|
||||
= static_cast<const SMDS_MeshNode *>(nodesIt->next());
|
||||
if ( i == 3 ) i = 2;
|
||||
nPnt[ i++ ].SetCoord( node->X(), node->Y(), node->Z() );
|
||||
// check position
|
||||
const SMDS_PositionPtr& pos = node->GetPosition();
|
||||
if ( !pos ) continue;
|
||||
if ( pos->GetTypeOfPosition() == SMDS_TOP_FACE ) {
|
||||
fPos = dynamic_cast< const SMDS_FacePosition* >( pos );
|
||||
}
|
||||
else if ( pos->GetTypeOfPosition() == SMDS_TOP_VERTEX ) {
|
||||
vID = node->getshapeId();
|
||||
}
|
||||
}
|
||||
if ( fPos || ( !normalOK && vID )) {
|
||||
// compute normal
|
||||
gp_Vec v01( nPnt[0], nPnt[1] ), v02( nPnt[0], nPnt[2] );
|
||||
if ( v01.SquareMagnitude() > RealSmall() &&
|
||||
v02.SquareMagnitude() > RealSmall() )
|
||||
{
|
||||
Ne = v01 ^ v02;
|
||||
normalOK = ( Ne.SquareMagnitude() > RealSmall() );
|
||||
}
|
||||
// we need position on theFace or at least on vertex
|
||||
if ( normalOK ) {
|
||||
vertexID = vID;
|
||||
if ((facePos = fPos))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !normalOK )
|
||||
return isReversed;
|
||||
|
||||
// node position on face
|
||||
double u,v;
|
||||
if ( facePos ) {
|
||||
u = facePos->GetUParameter();
|
||||
v = facePos->GetVParameter();
|
||||
}
|
||||
else if ( vertexID ) {
|
||||
TopoDS_Shape V = theMeshDS->IndexToShape( vertexID );
|
||||
if ( V.IsNull() || V.ShapeType() != TopAbs_VERTEX )
|
||||
return isReversed;
|
||||
gp_Pnt2d uv = BRep_Tool::Parameters( TopoDS::Vertex( V ), theFace );
|
||||
u = uv.X();
|
||||
v = uv.Y();
|
||||
}
|
||||
else
|
||||
{
|
||||
return isReversed;
|
||||
}
|
||||
|
||||
// face normal at node position
|
||||
TopLoc_Location loc;
|
||||
Handle(Geom_Surface) surf = BRep_Tool::Surface( theFace, loc );
|
||||
// if ( surf.IsNull() || surf->Continuity() < GeomAbs_C1 )
|
||||
// some surfaces not detected as GeomAbs_C1 are nevertheless correct for meshing
|
||||
if ( surf.IsNull() || surf->Continuity() < GeomAbs_C0 )
|
||||
{
|
||||
if (!surf.IsNull())
|
||||
MESSAGE("surf->Continuity() < GeomAbs_C1 " << (surf->Continuity() < GeomAbs_C1));
|
||||
return isReversed;
|
||||
}
|
||||
gp_Vec d1u, d1v;
|
||||
surf->D1( u, v, nPnt[0], d1u, d1v );
|
||||
gp_Vec Nf = (d1u ^ d1v).Transformed( loc );
|
||||
|
||||
if ( theFace.Orientation() == TopAbs_REVERSED )
|
||||
Nf.Reverse();
|
||||
|
||||
return Ne * Nf < 0.;
|
||||
}
|
||||
// bool SMESH_Algo::IsReversedSubMesh (const TopoDS_Face& theFace,
|
||||
// SMESHDS_Mesh* theMeshDS)
|
||||
// {
|
||||
// }
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
|
@ -30,9 +30,10 @@
|
||||
|
||||
#include "SMESH_SMESH.hxx"
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "SMESH_ComputeError.hxx"
|
||||
#include "SMDSAbs_ElementType.hxx"
|
||||
#include "SMESH_Comment.hxx"
|
||||
#include "SMESH_ComputeError.hxx"
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
@ -42,6 +43,7 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
class SMDS_MeshNode;
|
||||
class SMESHDS_Mesh;
|
||||
@ -60,6 +62,7 @@ class gp_XYZ;
|
||||
typedef std::map< SMESH_subMesh*, std::vector<int> > MapShapeNbElems;
|
||||
typedef std::map< SMESH_subMesh*, std::vector<int> >::iterator MapShapeNbElemsItr;
|
||||
|
||||
// ==================================================================================
|
||||
/*!
|
||||
* \brief Root of all algorithms
|
||||
*
|
||||
@ -69,9 +72,33 @@ typedef std::map< SMESH_subMesh*, std::vector<int> >::iterator MapShapeNbElemsIt
|
||||
* - methods related to dependencies between sub-meshes imposed by the algorith
|
||||
* - static utilities, like EdgeLength()
|
||||
*/
|
||||
class SMESH_EXPORT SMESH_Algo:public SMESH_Hypothesis
|
||||
// ==================================================================================
|
||||
|
||||
class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
public:
|
||||
//==================================================================================
|
||||
/*!
|
||||
* \brief Structure describing algorithm features
|
||||
*/
|
||||
// --------------------------------------------------------------------------------
|
||||
struct Features
|
||||
{
|
||||
int _dim;
|
||||
std::set<SMDSAbs_GeometryType> _inElemTypes; // acceptable types of input mesh element
|
||||
std::set<SMDSAbs_GeometryType> _outElemTypes; // produced types of mesh elements
|
||||
std::string _label; // GUI type name
|
||||
|
||||
bool IsCompatible( const Features& algo2 ) const;
|
||||
};
|
||||
/*!
|
||||
* \brief Returns a structure describing algorithm features
|
||||
*/
|
||||
static const Features& GetFeatures( const std::string& algoType );
|
||||
const Features& GetFeatures() const { return GetFeatures( _name ); }
|
||||
|
||||
public:
|
||||
//==================================================================================
|
||||
/*!
|
||||
* \brief Creates algorithm
|
||||
* \param hypId - algorithm ID
|
||||
@ -287,14 +314,10 @@ public:
|
||||
const bool ignoreMediumNodes,
|
||||
std::map< double, const SMDS_MeshNode* > & theNodes);
|
||||
/*!
|
||||
* \brief Find out elements orientation on a geometrical face
|
||||
* \param theFace - The face correctly oriented in the shape being meshed
|
||||
* \param theMeshDS - The mesh data structure
|
||||
* \retval bool - true if the face normal and the normal of first element
|
||||
* in the correspoding submesh point in different directions
|
||||
* Moved to SMESH_MesherHelper
|
||||
*/
|
||||
static bool IsReversedSubMesh (const TopoDS_Face& theFace,
|
||||
SMESHDS_Mesh* theMeshDS);
|
||||
// static bool IsReversedSubMesh (const TopoDS_Face& theFace,
|
||||
// SMESHDS_Mesh* theMeshDS);
|
||||
/*!
|
||||
* \brief Compute length of an edge
|
||||
* \param E - the edge
|
||||
|
@ -43,13 +43,12 @@
|
||||
#include "Utils_ExceptHandlers.hxx"
|
||||
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <LDOMParser.hxx>
|
||||
|
||||
#include "memoire.h"
|
||||
|
||||
#ifdef WNT
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -523,6 +522,7 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh & aMesh,
|
||||
.And( SMESH_HypoFilter::IsMoreLocalThan( algoShape, aMesh ));
|
||||
|
||||
if ( SMESH_Algo* subAlgo = (SMESH_Algo*) aMesh.GetHypothesis( aSubShape, filter, true )) {
|
||||
if ( ! subAlgo->NeedDiscreteBoundary() ) continue;
|
||||
SMESH_Hypothesis::Hypothesis_Status status;
|
||||
if ( subAlgo->CheckHypothesis( aMesh, aSubShape, status ))
|
||||
// mesh a lower smToCompute starting from vertices
|
||||
@ -998,100 +998,6 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
|
||||
return xmlPaths;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
namespace // Access to type of input and output of an algorithm
|
||||
//=======================================================================
|
||||
{
|
||||
struct AlgoData
|
||||
{
|
||||
int _dim;
|
||||
set<SMDSAbs_GeometryType> _inElemTypes; // acceptable types of input mesh element
|
||||
set<SMDSAbs_GeometryType> _outElemTypes; // produced types of mesh elements
|
||||
|
||||
bool IsCompatible( const AlgoData& algo2 ) const
|
||||
{
|
||||
if ( _dim > algo2._dim ) return algo2.IsCompatible( *this );
|
||||
// algo2 is of highter dimension
|
||||
if ( _outElemTypes.empty() || algo2._inElemTypes.empty() )
|
||||
return false;
|
||||
bool compatible = true;
|
||||
set<SMDSAbs_GeometryType>::const_iterator myOutType = _outElemTypes.begin();
|
||||
for ( ; myOutType != _outElemTypes.end() && compatible; ++myOutType )
|
||||
compatible = algo2._inElemTypes.count( *myOutType );
|
||||
return compatible;
|
||||
}
|
||||
};
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Return AlgoData of the algorithm
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
const AlgoData& getAlgoData( const SMESH_Algo* algo )
|
||||
{
|
||||
static map< string, AlgoData > theDataByName;
|
||||
if ( theDataByName.empty() )
|
||||
{
|
||||
// Read Plugin.xml files
|
||||
vector< string > xmlPaths = SMESH_Gen::GetPluginXMLPaths();
|
||||
LDOMParser xmlParser;
|
||||
for ( size_t iXML = 0; iXML < xmlPaths.size(); ++iXML )
|
||||
{
|
||||
bool error = xmlParser.parse( xmlPaths[iXML].c_str() );
|
||||
if ( error )
|
||||
{
|
||||
TCollection_AsciiString data;
|
||||
INFOS( xmlParser.GetError(data) );
|
||||
continue;
|
||||
}
|
||||
// <algorithm type="Regular_1D"
|
||||
// ...
|
||||
// input="EDGE"
|
||||
// output="QUAD,TRIA">
|
||||
//
|
||||
LDOM_Document xmlDoc = xmlParser.getDocument();
|
||||
LDOM_NodeList algoNodeList = xmlDoc.getElementsByTagName( "algorithm" );
|
||||
for ( int i = 0; i < algoNodeList.getLength(); ++i )
|
||||
{
|
||||
LDOM_Node algoNode = algoNodeList.item( i );
|
||||
LDOM_Element& algoElem = (LDOM_Element&) algoNode;
|
||||
TCollection_AsciiString algoType = algoElem.getAttribute("type");
|
||||
TCollection_AsciiString input = algoElem.getAttribute("input");
|
||||
TCollection_AsciiString output = algoElem.getAttribute("output");
|
||||
TCollection_AsciiString dim = algoElem.getAttribute("dim");
|
||||
if ( algoType.IsEmpty() ) continue;
|
||||
AlgoData & data = theDataByName[ algoType.ToCString() ];
|
||||
data._dim = dim.IntegerValue();
|
||||
for ( int isInput = 0; isInput < 2; ++isInput )
|
||||
{
|
||||
TCollection_AsciiString& typeStr = isInput ? input : output;
|
||||
set<SMDSAbs_GeometryType>& typeSet = isInput ? data._inElemTypes : data._outElemTypes;
|
||||
int beg = 1, end;
|
||||
while ( beg <= typeStr.Length() )
|
||||
{
|
||||
while ( beg < typeStr.Length() && !isalpha( typeStr.Value( beg ) ))
|
||||
++beg;
|
||||
end = beg;
|
||||
while ( end < typeStr.Length() && isalpha( typeStr.Value( end + 1 ) ))
|
||||
++end;
|
||||
if ( end > beg )
|
||||
{
|
||||
TCollection_AsciiString typeName = typeStr.SubString( beg, end );
|
||||
if ( typeName == "EDGE" ) typeSet.insert( SMDSGeom_EDGE );
|
||||
else if ( typeName == "TRIA" ) typeSet.insert( SMDSGeom_TRIANGLE );
|
||||
else if ( typeName == "QUAD" ) typeSet.insert( SMDSGeom_QUADRANGLE );
|
||||
}
|
||||
beg = end + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return theDataByName[ algo->GetName() ];
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Finds algo to mesh a shape. Optionally returns a shape the found algo is bound to
|
||||
@ -1105,6 +1011,8 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh,
|
||||
SMESH_HypoFilter filter( SMESH_HypoFilter::IsAlgo() );
|
||||
filter.And( filter.IsApplicableTo( aShape ));
|
||||
|
||||
typedef SMESH_Algo::Features AlgoData;
|
||||
|
||||
TopoDS_Shape assignedToShape;
|
||||
SMESH_Algo* algo =
|
||||
(SMESH_Algo*) aMesh.GetHypothesis( aShape, filter, true, &assignedToShape );
|
||||
@ -1144,10 +1052,10 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh,
|
||||
// check compatibility of algos
|
||||
if ( algos3D.size() > 1 )
|
||||
{
|
||||
const AlgoData& algoData = getAlgoData( algo );
|
||||
const AlgoData& algoData2 = getAlgoData( algo2 );
|
||||
const AlgoData& algoData3d0 = getAlgoData( algos3D[0] );
|
||||
const AlgoData& algoData3d1 = getAlgoData( algos3D[1] );
|
||||
const AlgoData& algoData = algo->SMESH_Algo::GetFeatures();
|
||||
const AlgoData& algoData2 = algo2->SMESH_Algo::GetFeatures();
|
||||
const AlgoData& algoData3d0 = algos3D[0]->SMESH_Algo::GetFeatures();
|
||||
const AlgoData& algoData3d1 = algos3D[1]->SMESH_Algo::GetFeatures();
|
||||
if (( algoData2.IsCompatible( algoData3d0 ) &&
|
||||
algoData2.IsCompatible( algoData3d1 ))
|
||||
&&
|
||||
|
@ -2002,6 +2002,79 @@ bool SMESH_MesherHelper::IsStructured( SMESH_subMesh* faceSM )
|
||||
return true;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Find out elements orientation on a geometrical face
|
||||
* \param theFace - The face correctly oriented in the shape being meshed
|
||||
* \retval bool - true if the face normal and the normal of first element
|
||||
* in the correspoding submesh point in different directions
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace)
|
||||
{
|
||||
if ( theFace.IsNull() )
|
||||
return false;
|
||||
|
||||
// find out orientation of a meshed face
|
||||
int faceID = GetMeshDS()->ShapeToIndex( theFace );
|
||||
TopoDS_Shape aMeshedFace = GetMeshDS()->IndexToShape( faceID );
|
||||
bool isReversed = ( theFace.Orientation() != aMeshedFace.Orientation() );
|
||||
|
||||
const SMESHDS_SubMesh * aSubMeshDSFace = GetMeshDS()->MeshElements( faceID );
|
||||
if ( !aSubMeshDSFace )
|
||||
return isReversed;
|
||||
|
||||
// find an element with a good normal
|
||||
gp_Vec Ne;
|
||||
bool normalOK = false;
|
||||
gp_XY uv;
|
||||
SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
|
||||
while ( !normalOK && iteratorElem->more() ) // loop on elements on theFace
|
||||
{
|
||||
const SMDS_MeshElement* elem = iteratorElem->next();
|
||||
if ( elem && elem->NbCornerNodes() > 2 )
|
||||
{
|
||||
SMESH_TNodeXYZ nPnt[3];
|
||||
SMDS_ElemIteratorPtr nodesIt = elem->nodesIterator();
|
||||
for ( int iN = 0; nodesIt->more() && iN < 3; ++iN) // loop on nodes
|
||||
nPnt[ iN ] = nodesIt->next();
|
||||
|
||||
// compute normal
|
||||
gp_Vec v01( nPnt[0], nPnt[1] ), v02( nPnt[0], nPnt[2] );
|
||||
if ( v01.SquareMagnitude() > RealSmall() &&
|
||||
v02.SquareMagnitude() > RealSmall() )
|
||||
{
|
||||
Ne = v01 ^ v02;
|
||||
if (( normalOK = ( Ne.SquareMagnitude() > RealSmall() )))
|
||||
uv = GetNodeUV( theFace, nPnt[0]._node, nPnt[2]._node, &normalOK );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !normalOK )
|
||||
return isReversed;
|
||||
|
||||
// face normal at node position
|
||||
TopLoc_Location loc;
|
||||
Handle(Geom_Surface) surf = BRep_Tool::Surface( theFace, loc );
|
||||
// if ( surf.IsNull() || surf->Continuity() < GeomAbs_C1 )
|
||||
// some surfaces not detected as GeomAbs_C1 are nevertheless correct for meshing
|
||||
if ( surf.IsNull() || surf->Continuity() < GeomAbs_C0 )
|
||||
{
|
||||
if (!surf.IsNull())
|
||||
MESSAGE("surf->Continuity() < GeomAbs_C1 " << (surf->Continuity() < GeomAbs_C1));
|
||||
return isReversed;
|
||||
}
|
||||
gp_Vec d1u, d1v; gp_Pnt p;
|
||||
surf->D1( uv.X(), uv.Y(), p, d1u, d1v );
|
||||
gp_Vec Nf = (d1u ^ d1v).Transformed( loc );
|
||||
|
||||
if ( theFace.Orientation() == TopAbs_REVERSED )
|
||||
Nf.Reverse();
|
||||
|
||||
return Ne * Nf < 0.;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Count
|
||||
//purpose : Count nb of sub-shapes
|
||||
|
@ -221,6 +221,11 @@ public:
|
||||
*/
|
||||
bool GetIsQuadratic() const { return myCreateQuadratic; }
|
||||
|
||||
/*
|
||||
* \brief Find out elements orientation on a geometrical face
|
||||
*/
|
||||
bool IsReversedSubMesh (const TopoDS_Face& theFace);
|
||||
|
||||
/*!
|
||||
* \brief Move medium nodes of faces and volumes to fix distorted elements
|
||||
* \param error - container of fixed distorted elements
|
||||
@ -373,6 +378,7 @@ public:
|
||||
/*!
|
||||
* \brief Return node UV on face
|
||||
* \param inFaceNode - a node of element being created located inside a face
|
||||
* \param check - if provided, returns result of UV check that it enforces
|
||||
*/
|
||||
gp_XY GetNodeUV(const TopoDS_Face& F,
|
||||
const SMDS_MeshNode* n,
|
||||
|
@ -88,22 +88,22 @@ SMESH_subMesh::SMESH_subMesh(int Id,
|
||||
SMESHDS_Mesh * meshDS,
|
||||
const TopoDS_Shape & aSubShape)
|
||||
{
|
||||
_subShape = aSubShape;
|
||||
_subMeshDS = meshDS->MeshElements(_subShape); // may be null ...
|
||||
_father = father;
|
||||
_Id = Id;
|
||||
_dependenceAnalysed = _alwaysComputed = false;
|
||||
|
||||
if (_subShape.ShapeType() == TopAbs_VERTEX)
|
||||
{
|
||||
_algoState = HYP_OK;
|
||||
_computeState = READY_TO_COMPUTE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_algoState = NO_ALGO;
|
||||
_computeState = NOT_READY;
|
||||
}
|
||||
_subShape = aSubShape;
|
||||
_subMeshDS = meshDS->MeshElements(_subShape); // may be null ...
|
||||
_father = father;
|
||||
_Id = Id;
|
||||
_dependenceAnalysed = _alwaysComputed = false;
|
||||
_algo = 0;
|
||||
if (_subShape.ShapeType() == TopAbs_VERTEX)
|
||||
{
|
||||
_algoState = HYP_OK;
|
||||
_computeState = READY_TO_COMPUTE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_algoState = NO_ALGO;
|
||||
_computeState = NOT_READY;
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -194,7 +194,9 @@ SMESH_subMesh *SMESH_subMesh::GetFirstToCompute()
|
||||
|
||||
SMESH_Algo* SMESH_subMesh::GetAlgo() const
|
||||
{
|
||||
return _father->GetGen()->GetAlgo(*_father, _subShape);
|
||||
if ( !_algo )
|
||||
((SMESH_subMesh*)this)->_algo = _father->GetGen()->GetAlgo(*_father, _subShape);
|
||||
return _algo;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
@ -268,11 +270,12 @@ bool SMESH_subMesh::IsMeshComputed() const
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_subMesh::SubMeshesComputed() const
|
||||
bool SMESH_subMesh::SubMeshesComputed(bool * isFailedToCompute/*=0*/) const
|
||||
{
|
||||
int myDim = SMESH_Gen::GetShapeDim( _subShape );
|
||||
int dimToCheck = myDim - 1;
|
||||
bool subMeshesComputed = true;
|
||||
if ( isFailedToCompute ) *isFailedToCompute = false;
|
||||
// check subMeshes with upper dimension => reverse iteration
|
||||
SMESH_subMeshIteratorPtr smIt = getDependsOnIterator(false,true);
|
||||
while ( smIt->more() )
|
||||
@ -281,66 +284,72 @@ bool SMESH_subMesh::SubMeshesComputed() const
|
||||
if ( sm->_alwaysComputed )
|
||||
continue;
|
||||
const TopoDS_Shape & ss = sm->GetSubShape();
|
||||
|
||||
// MSV 07.04.2006: restrict checking to myDim-1 only. Ex., there is no sense
|
||||
// in checking of existence of edges if the algo needs only faces. Moreover,
|
||||
// degenerated edges may have no submesh, as after computing NETGEN_2D.
|
||||
int dim = SMESH_Gen::GetShapeDim( ss );
|
||||
if (dim < dimToCheck)
|
||||
break; // the rest subMeshes are all of less dimension
|
||||
if ( !_algo || _algo->NeedDiscreteBoundary() ) {
|
||||
int dim = SMESH_Gen::GetShapeDim( ss );
|
||||
if (dim < dimToCheck)
|
||||
break; // the rest subMeshes are all of less dimension
|
||||
}
|
||||
SMESHDS_SubMesh * ds = sm->GetSubMeshDS();
|
||||
bool computeOk = (sm->GetComputeState() == COMPUTE_OK ||
|
||||
(ds && ( dimToCheck ? ds->NbElements() : ds->NbNodes() )));
|
||||
if (!computeOk)
|
||||
{
|
||||
int type = ss.ShapeType();
|
||||
|
||||
subMeshesComputed = false;
|
||||
if ( isFailedToCompute && !(*isFailedToCompute) )
|
||||
*isFailedToCompute = ( sm->GetComputeState() == FAILED_TO_COMPUTE );
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case TopAbs_COMPOUND:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is a COMPOUND");
|
||||
break;
|
||||
}
|
||||
case TopAbs_COMPSOLID:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is a COMPSOLID");
|
||||
break;
|
||||
}
|
||||
case TopAbs_SHELL:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is a SHEL");
|
||||
break;
|
||||
}
|
||||
case TopAbs_WIRE:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is a WIRE");
|
||||
break;
|
||||
}
|
||||
case TopAbs_SOLID:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is a SOLID");
|
||||
break;
|
||||
}
|
||||
case TopAbs_FACE:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is a FACE");
|
||||
break;
|
||||
}
|
||||
case TopAbs_EDGE:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is a EDGE");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
MESSAGE("The not computed sub mesh is of unknown type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// int type = ss.ShapeType();
|
||||
|
||||
break;
|
||||
// switch (type)
|
||||
// {
|
||||
// case TopAbs_COMPOUND:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is a COMPOUND");
|
||||
// break;
|
||||
// }
|
||||
// case TopAbs_COMPSOLID:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is a COMPSOLID");
|
||||
// break;
|
||||
// }
|
||||
// case TopAbs_SHELL:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is a SHEL");
|
||||
// break;
|
||||
// }
|
||||
// case TopAbs_WIRE:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is a WIRE");
|
||||
// break;
|
||||
// }
|
||||
// case TopAbs_SOLID:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is a SOLID");
|
||||
// break;
|
||||
// }
|
||||
// case TopAbs_FACE:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is a FACE");
|
||||
// break;
|
||||
// }
|
||||
// case TopAbs_EDGE:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is a EDGE");
|
||||
// break;
|
||||
// }
|
||||
// default:
|
||||
// {
|
||||
// MESSAGE("The not computed sub mesh is of unknown type");
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
if ( !isFailedToCompute )
|
||||
break;
|
||||
}
|
||||
}
|
||||
return subMeshesComputed;
|
||||
@ -601,10 +610,6 @@ bool SMESH_subMesh::IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis,
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
SMESH_subMesh::AlgoStateEngine(int event, SMESH_Hypothesis * anHyp)
|
||||
{
|
||||
// MESSAGE("SMESH_subMesh::AlgoStateEngine");
|
||||
//SCRUTE(_algoState);
|
||||
//SCRUTE(event);
|
||||
|
||||
// **** les retour des evenement shape sont significatifs
|
||||
// (add ou remove fait ou non)
|
||||
// le retour des evenement father n'indiquent pas que add ou remove fait
|
||||
@ -612,8 +617,8 @@ SMESH_Hypothesis::Hypothesis_Status
|
||||
SMESH_Hypothesis::Hypothesis_Status aux_ret, ret = SMESH_Hypothesis::HYP_OK;
|
||||
|
||||
SMESHDS_Mesh* meshDS =_father->GetMeshDS();
|
||||
//SMESH_Gen* gen =_father->GetGen();
|
||||
SMESH_Algo* algo = 0;
|
||||
_algo = 0;
|
||||
|
||||
if (_subShape.ShapeType() == TopAbs_VERTEX )
|
||||
{
|
||||
@ -642,7 +647,7 @@ SMESH_Hypothesis::Hypothesis_Status
|
||||
|
||||
int oldAlgoState = _algoState;
|
||||
bool modifiedHyp = (event == MODIF_HYP); // if set to true, force event MODIF_ALGO_STATE
|
||||
bool needFullClean = false;
|
||||
bool needFullClean = false, subMeshesSupported = false;
|
||||
|
||||
bool isApplicableHyp = IsApplicableHypotesis( anHyp );
|
||||
|
||||
@ -665,7 +670,7 @@ SMESH_Hypothesis::Hypothesis_Status
|
||||
SMESH_HypoFilter filter( SMESH_HypoFilter::HasType( algo->GetType() ));
|
||||
filter.Or( SMESH_HypoFilter::HasType( algo->GetType()+1 ));
|
||||
filter.Or( SMESH_HypoFilter::HasType( algo->GetType()+2 ));
|
||||
if ( SMESH_Algo * curAlgo = (SMESH_Algo*) _father->GetHypothesis( _subShape, filter, true ))
|
||||
if ( SMESH_Algo * curAlgo = (SMESH_Algo*)_father->GetHypothesis(_subShape, filter, true ))
|
||||
needFullClean = ( !curAlgo->NeedDiscreteBoundary() );
|
||||
}
|
||||
}
|
||||
@ -702,6 +707,7 @@ SMESH_Hypothesis::Hypothesis_Status
|
||||
// we must perform it now because later
|
||||
// we will have no information about the type of the removed algo
|
||||
needFullClean = true;
|
||||
subMeshesSupported = algo->SupportSubmeshes();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -984,8 +990,10 @@ SMESH_Hypothesis::Hypothesis_Status
|
||||
// CLEAN was not called at event REMOVE_ALGO because the algo is not applicable to SOLID.
|
||||
algo = dynamic_cast<SMESH_Algo*> (anHyp);
|
||||
if (!algo->NeedDiscreteBoundary())
|
||||
{
|
||||
needFullClean = true;
|
||||
|
||||
subMeshesSupported = algo->SupportSubmeshes();
|
||||
}
|
||||
algo = GetAlgo();
|
||||
if (algo == NULL) // no more applying algo on father
|
||||
{
|
||||
@ -1064,7 +1072,7 @@ SMESH_Hypothesis::Hypothesis_Status
|
||||
if ( needFullClean ) {
|
||||
// added or removed algo is all-dimensional
|
||||
ComputeStateEngine( CLEAN );
|
||||
cleanDependsOn();
|
||||
cleanDependsOn( subMeshesSupported );
|
||||
ComputeSubMeshStateEngine( CHECK_COMPUTE_STATE );
|
||||
}
|
||||
|
||||
@ -1163,17 +1171,59 @@ SMESH_Hypothesis::Hypothesis_Status
|
||||
return ret;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//================================================================================
|
||||
/*!
|
||||
*
|
||||
* \brief Remove elements from sub-meshes.
|
||||
* \param keepSupportedsubMeshes - if true, the sub-meshes computed using more
|
||||
* local algorithms are not cleaned
|
||||
*/
|
||||
//=============================================================================
|
||||
//================================================================================
|
||||
|
||||
void SMESH_subMesh::cleanDependsOn()
|
||||
void SMESH_subMesh::cleanDependsOn( bool keepSupportedsubMeshes )
|
||||
{
|
||||
SMESH_subMeshIteratorPtr smIt = getDependsOnIterator(false,false);
|
||||
while ( smIt->more() )
|
||||
smIt->next()->ComputeStateEngine(CLEAN);
|
||||
if ( _father->NbNodes() == 0 ) return;
|
||||
|
||||
SMESH_subMeshIteratorPtr smIt = getDependsOnIterator(false,
|
||||
/*complexShapeFirst=*/true);
|
||||
if ( !keepSupportedsubMeshes )
|
||||
{
|
||||
while ( smIt->more() )
|
||||
smIt->next()->ComputeStateEngine(CLEAN);
|
||||
}
|
||||
else
|
||||
{
|
||||
// find sub-meshes to keep elements on
|
||||
set< SMESH_subMesh* > smToKeep;
|
||||
SMESHDS_Mesh* meshDS = _father->GetMeshDS();
|
||||
while ( smIt->more() )
|
||||
{
|
||||
SMESH_subMesh* sm = smIt->next();
|
||||
if ( sm->IsEmpty() ) continue;
|
||||
|
||||
// look for an algo assigned to sm
|
||||
bool algoFound = false;
|
||||
const list<const SMESHDS_Hypothesis*>& hyps = meshDS->GetHypothesis( sm->_subShape );
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator h = hyps.begin();
|
||||
for ( ; ( !algoFound && h != hyps.end() ); ++h )
|
||||
algoFound = ((*h)->GetType() != SMESHDS_Hypothesis::PARAM_ALGO );
|
||||
|
||||
// remember all sub-meshes of sm
|
||||
if ( algoFound )
|
||||
{
|
||||
SMESH_subMeshIteratorPtr smIt2 = getDependsOnIterator(false,true);
|
||||
while ( smIt2->more() )
|
||||
smToKeep.insert( smIt2->next() );
|
||||
}
|
||||
}
|
||||
// remove elements
|
||||
SMESH_subMeshIteratorPtr smIt = getDependsOnIterator(false,true);
|
||||
while ( smIt->more() )
|
||||
{
|
||||
SMESH_subMesh* sm = smIt->next();
|
||||
if ( !smToKeep.count( sm ))
|
||||
sm->ComputeStateEngine(CLEAN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -1283,10 +1333,6 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
default:;
|
||||
}
|
||||
|
||||
//MESSAGE("SMESH_subMesh::ComputeStateEngine");
|
||||
//SCRUTE(_computeState);
|
||||
//SCRUTE(event);
|
||||
|
||||
if (_subShape.ShapeType() == TopAbs_VERTEX)
|
||||
{
|
||||
_computeState = READY_TO_COMPUTE;
|
||||
@ -1328,7 +1374,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
case MODIF_ALGO_STATE:
|
||||
algo = GetAlgo();
|
||||
if (algo && !algo->NeedDiscreteBoundary())
|
||||
cleanDependsOn(); // clean sub-meshes with event CLEAN
|
||||
cleanDependsOn( algo->SupportSubmeshes() ); // clean sub-meshes with event CLEAN
|
||||
if ( _algoState == HYP_OK )
|
||||
_computeState = READY_TO_COMPUTE;
|
||||
break;
|
||||
@ -1374,7 +1420,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
if (algo)
|
||||
{
|
||||
if (!algo->NeedDiscreteBoundary())
|
||||
cleanDependsOn(); // clean sub-meshes with event CLEAN
|
||||
cleanDependsOn( algo->SupportSubmeshes() ); // clean sub-meshes with event CLEAN
|
||||
if ( _algoState == HYP_OK )
|
||||
_computeState = READY_TO_COMPUTE;
|
||||
}
|
||||
@ -1394,21 +1440,22 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
TopoDS_Shape shape = _subShape;
|
||||
// check submeshes needed
|
||||
if (_father->HasShapeToMesh() ) {
|
||||
bool subComputed = false;
|
||||
bool subComputed = false, subFailed = false;
|
||||
if (!algo->OnlyUnaryInput())
|
||||
shape = getCollection( gen, algo, subComputed );
|
||||
shape = getCollection( gen, algo, subComputed, subFailed );
|
||||
else
|
||||
subComputed = SubMeshesComputed();
|
||||
ret = ( algo->NeedDiscreteBoundary() ? subComputed :
|
||||
algo->SupportSubmeshes() ? true :
|
||||
algo->SupportSubmeshes() ? !subFailed :
|
||||
( !subComputed || _father->IsNotConformAllowed() ));
|
||||
if (!ret) {
|
||||
if (!ret)
|
||||
{
|
||||
_computeState = FAILED_TO_COMPUTE;
|
||||
if ( !algo->NeedDiscreteBoundary() )
|
||||
if ( !algo->NeedDiscreteBoundary() && !subFailed )
|
||||
_computeError =
|
||||
SMESH_ComputeError::New(COMPERR_BAD_INPUT_MESH,
|
||||
"Unexpected computed submesh",algo);
|
||||
break;
|
||||
break; // goto exit
|
||||
}
|
||||
}
|
||||
// Compute
|
||||
@ -1494,6 +1541,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
}
|
||||
// check if an error reported on any sub-shape
|
||||
bool isComputeErrorSet = !checkComputeError( algo, ret, shape );
|
||||
if ( isComputeErrorSet )
|
||||
ret = false;
|
||||
// check if anything was built
|
||||
TopExp_Explorer subS(shape, _subShape.ShapeType());
|
||||
if (ret)
|
||||
@ -1597,7 +1646,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
ComputeStateEngine( CLEAN );
|
||||
algo = GetAlgo();
|
||||
if (algo && !algo->NeedDiscreteBoundary())
|
||||
cleanDependsOn(); // clean sub-meshes with event CLEAN
|
||||
cleanDependsOn( algo->SupportSubmeshes() ); // clean sub-meshes with event CLEAN
|
||||
break;
|
||||
case COMPUTE: // nothing to do
|
||||
break;
|
||||
@ -1652,7 +1701,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
ComputeStateEngine( CLEAN );
|
||||
algo = GetAlgo();
|
||||
if (algo && !algo->NeedDiscreteBoundary())
|
||||
cleanDependsOn(); // clean sub-meshes with event CLEAN
|
||||
cleanDependsOn( algo->SupportSubmeshes() ); // clean sub-meshes with event CLEAN
|
||||
if (_algoState == HYP_OK)
|
||||
_computeState = READY_TO_COMPUTE;
|
||||
else
|
||||
@ -1951,9 +2000,10 @@ void SMESH_subMesh::removeSubMeshElementsAndNodes()
|
||||
|
||||
TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
|
||||
SMESH_Algo* theAlgo,
|
||||
bool & theSubComputed)
|
||||
bool & theSubComputed,
|
||||
bool & theSubFailed)
|
||||
{
|
||||
theSubComputed = SubMeshesComputed();
|
||||
theSubComputed = SubMeshesComputed( & theSubFailed );
|
||||
|
||||
TopoDS_Shape mainShape = _father->GetMeshDS()->ShapeToMesh();
|
||||
|
||||
|
@ -253,7 +253,7 @@ public:
|
||||
void SetIsAlwaysComputed(bool isAlCo);
|
||||
bool IsAlwaysComputed() { return _alwaysComputed; }
|
||||
|
||||
bool SubMeshesComputed() const;
|
||||
bool SubMeshesComputed(bool * isFailedToCompute=0) const;
|
||||
|
||||
|
||||
/*!
|
||||
@ -273,7 +273,7 @@ protected:
|
||||
void updateDependantsState(const compute_event theEvent);
|
||||
void updateSubMeshState(const compute_state theState);
|
||||
void cleanDependants();
|
||||
void cleanDependsOn();
|
||||
void cleanDependsOn( bool keepSupportedsubMeshes = false );
|
||||
void setAlgoState(algo_state state);
|
||||
|
||||
/*!
|
||||
@ -282,7 +282,8 @@ protected:
|
||||
*/
|
||||
TopoDS_Shape getCollection(SMESH_Gen * theGen,
|
||||
SMESH_Algo* theAlgo,
|
||||
bool & theSubComputed);
|
||||
bool & theSubComputed,
|
||||
bool & theSubFailed);
|
||||
/*!
|
||||
* \brief Update compute_state by _computeError
|
||||
* \retval bool - false if there are errors
|
||||
@ -313,11 +314,12 @@ protected:
|
||||
std::map < int, SMESH_subMesh * >_mapDepend;
|
||||
bool _dependenceAnalysed;
|
||||
|
||||
SMESH_Algo * _algo; // the algorithm found by last *StateEngine() call
|
||||
algo_state _algoState;
|
||||
compute_state _computeState;
|
||||
SMESH_ComputeErrorPtr _computeError;
|
||||
|
||||
// allow algo->Compute() if a subshape of lower dim is meshed but
|
||||
// allow algo->Compute() if a sub-shape of lower dim is meshed but
|
||||
// none mesh entity is bound to it. Eg StdMeshers_CompositeSegment_1D can
|
||||
// mesh several edges as a whole and leave some of them without mesh entities
|
||||
bool _alwaysComputed;
|
||||
|
@ -39,9 +39,11 @@ class SMESHDS_EXPORT SMESHDS_Hypothesis
|
||||
SMESHDS_Hypothesis(int hypId);
|
||||
virtual ~SMESHDS_Hypothesis();
|
||||
|
||||
enum hypothesis_type { PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D, ALGO_3D };
|
||||
|
||||
const char* GetName() const;
|
||||
int GetID() const;
|
||||
int GetType() const;
|
||||
int GetID() const;
|
||||
int GetType() const;
|
||||
|
||||
virtual std::ostream & SaveTo(std::ostream & save)=0;
|
||||
virtual std::istream & LoadFrom(std::istream & load)=0;
|
||||
@ -49,12 +51,10 @@ class SMESHDS_EXPORT SMESHDS_Hypothesis
|
||||
virtual bool operator==(const SMESHDS_Hypothesis& other) const;
|
||||
bool operator!=(const SMESHDS_Hypothesis& other) const { return !(*this==other); }
|
||||
|
||||
enum hypothesis_type { PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D, ALGO_3D };
|
||||
|
||||
protected:
|
||||
std::string _name; // identifier if hypothesis type
|
||||
int _hypId; // ID unique within application session
|
||||
int _type; // enum hypothesis_type
|
||||
std::string _name; // identifier of hypothesis type
|
||||
int _hypId; // ID unique within application session
|
||||
hypothesis_type _type; // enum hypothesis_type
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -543,11 +543,9 @@
|
||||
{
|
||||
format = "GMF";
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_0D );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Quad_Quadrangle );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Polygon );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Quad_Polygon );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Quad_Pyramid );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Quad_Hexa );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Quad_Penta );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Hexagonal_Prism );
|
||||
notSupportedElemTypes.push_back( SMESH::Entity_Polyhedra );
|
||||
|
@ -441,7 +441,7 @@ void SMESHGUI_AddMeshElementDlg::Init()
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), SLOT(ClickOnHelp()));
|
||||
|
||||
@ -450,8 +450,8 @@ void SMESHGUI_AddMeshElementDlg::Init()
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()),SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study frame change */
|
||||
connect(mySMESHGUI, SIGNAL(SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalStudyFrameChanged()), SLOT(reject()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
if (Reverse)
|
||||
connect(Reverse, SIGNAL(stateChanged(int)), SLOT(CheckBox(int)));
|
||||
@ -599,14 +599,14 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
||||
void SMESHGUI_AddMeshElementDlg::ClickOnOk()
|
||||
{
|
||||
ClickOnApply();
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddMeshElementDlg::ClickOnCancel()
|
||||
void SMESHGUI_AddMeshElementDlg::reject()
|
||||
{
|
||||
//mySelectionMgr->clearSelected();
|
||||
mySimulation->SetVisibility(false);
|
||||
@ -615,7 +615,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnCancel()
|
||||
aViewWindow->SetSelectionMode( ActorSelection );
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -874,26 +874,6 @@ void SMESHGUI_AddMeshElementDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddMeshElementDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : hideEvent()
|
||||
// purpose : caused by ESC key
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddMeshElementDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : CheckBox()
|
||||
// purpose :
|
||||
|
@ -71,8 +71,6 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
void displaySimulation();
|
||||
@ -119,9 +117,11 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -628,13 +628,13 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
|
||||
connect(myReverseCB, SIGNAL(stateChanged(int)), SLOT(onReverse(int)));
|
||||
|
||||
connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), SLOT(ClickOnHelp()));
|
||||
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(reject()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
myCurrentLineEdit = myCornerNodes;
|
||||
|
||||
@ -803,14 +803,14 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
||||
void SMESHGUI_AddQuadraticElementDlg::ClickOnOk()
|
||||
{
|
||||
ClickOnApply();
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel()
|
||||
void SMESHGUI_AddQuadraticElementDlg::reject()
|
||||
{
|
||||
mySelectionMgr->clearSelected();
|
||||
mySimulation->SetVisibility(false);
|
||||
@ -819,7 +819,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel()
|
||||
aViewWindow->SetSelectionMode( ActorSelection );
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -1134,26 +1134,6 @@ void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddQuadraticElementDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : hideEvent()
|
||||
// purpose : caused by ESC key
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddQuadraticElementDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : onReverse()
|
||||
// purpose :
|
||||
|
@ -73,8 +73,6 @@ private:
|
||||
typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
|
||||
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
void displaySimulation();
|
||||
@ -128,6 +126,9 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void onTextChange( const QString& );
|
||||
void onCellTextChange( int, int );
|
||||
@ -135,7 +136,6 @@ private slots:
|
||||
void onCellDoubleClicked( int, int );
|
||||
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetCurrentSelection();
|
||||
|
@ -212,7 +212,7 @@ void SMESHGUI_BuildCompoundDlg::Init()
|
||||
|
||||
// signals and slots connections
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -223,7 +223,7 @@ void SMESHGUI_BuildCompoundDlg::Init()
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
|
||||
LineEditName->setText(GetDefaultName(tr("COMPOUND_MESH")));
|
||||
LineEditMeshes->setFocus();
|
||||
@ -366,20 +366,20 @@ void SMESHGUI_BuildCompoundDlg::ClickOnOk()
|
||||
{
|
||||
setIsApplyAndClose( true );
|
||||
if (ClickOnApply())
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_BuildCompoundDlg::ClickOnCancel()
|
||||
void SMESHGUI_BuildCompoundDlg::reject()
|
||||
{
|
||||
//mySelectionMgr->clearSelected();
|
||||
mySelectionMgr->clearFilters();
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -480,27 +480,6 @@ void SMESHGUI_BuildCompoundDlg::enterEvent( QEvent* )
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_BuildCompoundDlg::closeEvent( QCloseEvent* )
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_BuildCompoundDlg::hideEvent( QHideEvent* )
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -68,9 +68,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
bool isValid();
|
||||
@ -115,9 +113,11 @@ private:
|
||||
|
||||
bool myIsApplyAndClose;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SelectionIntoArgument();
|
||||
|
@ -479,12 +479,12 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule, SVTK_ViewWindow
|
||||
connect(PreviewCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnPreviewToggle(bool)));
|
||||
connect(AutoApplyCheckBox, SIGNAL(toggled(bool)), this, SLOT(onAutoApply(bool)));
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
/* to close dialog if study frame change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(reject()));
|
||||
|
||||
this->show();
|
||||
}
|
||||
@ -589,16 +589,17 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
|
||||
void SMESHGUI_ClippingDlg::ClickOnOk()
|
||||
{
|
||||
ClickOnApply();
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void SMESHGUI_ClippingDlg::ClickOnCancel()
|
||||
void SMESHGUI_ClippingDlg::reject()
|
||||
{
|
||||
close();
|
||||
//here we can insert actions to do at close.
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -192,6 +192,9 @@ private:
|
||||
bool myIsSelectPlane;
|
||||
QString myHelpFileName;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
public slots:
|
||||
void onSelectPlane( int );
|
||||
void ClickOnNew();
|
||||
@ -203,7 +206,6 @@ public slots:
|
||||
void OnPreviewToggle( bool );
|
||||
void onAutoApply(bool);
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
};
|
||||
|
@ -227,7 +227,7 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule )
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -236,7 +236,7 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule )
|
||||
connect(mySelectionMgr, SIGNAL (currentSelectionChanged()),
|
||||
this, SLOT (SelectionIntoArgument()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()),/* to close dialog if study change */
|
||||
this, SLOT (ClickOnCancel()));
|
||||
this, SLOT (reject()));
|
||||
|
||||
connect(myLineEditElements, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT (onTextChange(const QString&)));
|
||||
@ -369,14 +369,14 @@ void SMESHGUI_CopyMeshDlg::ClickOnOk()
|
||||
{
|
||||
setIsApplyAndClose( true );
|
||||
if( ClickOnApply() )
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_CopyMeshDlg::ClickOnCancel()
|
||||
void SMESHGUI_CopyMeshDlg::reject()
|
||||
{
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
if ( mySelectionMgr )
|
||||
@ -384,7 +384,7 @@ void SMESHGUI_CopyMeshDlg::ClickOnCancel()
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode( ActorSelection );
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -618,26 +618,6 @@ void SMESHGUI_CopyMeshDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_CopyMeshDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_CopyMeshDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -65,9 +65,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init( bool = true );
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
int GetConstructorId();
|
||||
void setNewMeshName();
|
||||
@ -114,9 +112,11 @@ private:
|
||||
|
||||
bool myIsApplyAndClose;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SelectionIntoArgument();
|
||||
|
@ -230,7 +230,7 @@ QWidget* SMESHGUI_CreatePatternDlg::createButtonFrame( QWidget* theParent )
|
||||
aLay->addWidget( myHelpBtn );
|
||||
|
||||
connect( myOkBtn, SIGNAL( clicked() ), this, SLOT( onOk() ) );
|
||||
connect( myCloseBtn, SIGNAL( clicked() ), this, SLOT( onClose() ) );
|
||||
connect( myCloseBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
|
||||
connect( mySaveBtn, SIGNAL( clicked() ), this, SLOT( onSave() ) );
|
||||
connect( myHelpBtn, SIGNAL( clicked() ), this, SLOT( onHelp() ) );
|
||||
|
||||
@ -279,7 +279,7 @@ void SMESHGUI_CreatePatternDlg::Init( const int theType )
|
||||
connect( mySMESHGUI, SIGNAL( SignalDeactivateActiveDialog() ),
|
||||
this, SLOT( onDeactivate() ) );
|
||||
connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ),
|
||||
this, SLOT( onClose() ) );
|
||||
this, SLOT( reject() ) );
|
||||
|
||||
mySwitch2d->setEnabled( theType == Type_2d );
|
||||
mySwitch3d->setEnabled( theType == Type_3d );
|
||||
@ -482,17 +482,17 @@ void SMESHGUI_CreatePatternDlg::onOk()
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : onClose()
|
||||
// function : reject()
|
||||
// purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=======================================================================
|
||||
void SMESHGUI_CreatePatternDlg::onClose()
|
||||
void SMESHGUI_CreatePatternDlg::reject()
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
|
||||
aViewWindow->SetSelectionMode( ActorSelection );
|
||||
disconnect( mySelectionMgr, 0, this, 0 );
|
||||
disconnect( mySMESHGUI, 0, this, 0 );
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
emit Close();
|
||||
}
|
||||
|
||||
@ -648,15 +648,6 @@ void SMESHGUI_CreatePatternDlg::enterEvent( QEvent* )
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose : Close dialog box
|
||||
//=================================================================================
|
||||
void SMESHGUI_CreatePatternDlg::closeEvent( QCloseEvent* )
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : onSelBtnClicked()
|
||||
// purpose : SLOT. Called when -> button clicked.
|
||||
|
@ -74,14 +74,13 @@ signals:
|
||||
void Close();
|
||||
|
||||
private:
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
private slots:
|
||||
void onOk();
|
||||
void onSave();
|
||||
void onClose();
|
||||
void reject();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
|
@ -335,7 +335,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL( clicked() ), SLOT( ClickOnOk() ) );
|
||||
connect(buttonCancel, SIGNAL( clicked() ), SLOT( ClickOnCancel() ) );
|
||||
connect(buttonCancel, SIGNAL( clicked() ), SLOT( reject() ) );
|
||||
connect(buttonApply, SIGNAL( clicked() ), SLOT( ClickOnApply() ) );
|
||||
connect(buttonHelp, SIGNAL( clicked() ), SLOT( ClickOnHelp() ) );
|
||||
|
||||
@ -351,7 +351,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
|
||||
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
connect( Preview, SIGNAL(toggled(bool)), this, SLOT(ClickOnPreview(bool)));
|
||||
/* to close dialog if study change */
|
||||
connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||
connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( reject() ) );
|
||||
|
||||
ConstructorsClicked(0);
|
||||
SelectionIntoArgument();
|
||||
@ -589,15 +589,15 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnOk()
|
||||
{
|
||||
if(checkEditLine(false) == -1) {return;}
|
||||
ClickOnApply();
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
|
||||
void SMESHGUI_CreatePolyhedralVolumeDlg::reject()
|
||||
{
|
||||
mySelectionMgr->clearFilters();
|
||||
//SALOME_ListIO aList;
|
||||
@ -608,7 +608,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
|
||||
aViewWindow->SetSelectionMode( ActorSelection );
|
||||
disconnect( mySelectionMgr, 0, this, 0 );
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -1037,30 +1037,6 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::enterEvent(QEvent* e)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_CreatePolyhedralVolumeDlg::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
|
||||
void SMESHGUI_CreatePolyhedralVolumeDlg::hideEvent ( QHideEvent * e )
|
||||
{
|
||||
if ( !isMinimized() )
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetConstructorId()
|
||||
// purpose :
|
||||
|
@ -72,9 +72,7 @@ private:
|
||||
typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
|
||||
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
int GetConstructorId();
|
||||
void displaySimulation();
|
||||
@ -125,11 +123,13 @@ public slots:
|
||||
void onAdd();
|
||||
void onRemove();
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ConstructorsClicked( int );
|
||||
void ClickOnPreview( bool );
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -146,7 +146,7 @@ QWidget* SMESHGUI_DeleteGroupDlg::createButtonFrame (QWidget* theParent)
|
||||
|
||||
// connect signals and slots
|
||||
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
|
||||
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
|
||||
|
||||
@ -173,7 +173,7 @@ void SMESHGUI_DeleteGroupDlg::Init ()
|
||||
// selection and SMESHGUI
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
// set selection mode
|
||||
mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
|
||||
@ -239,14 +239,14 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
|
||||
void SMESHGUI_DeleteGroupDlg::onOk()
|
||||
{
|
||||
if (onApply())
|
||||
onClose();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : onClose()
|
||||
// function : reject()
|
||||
// purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=================================================================================
|
||||
void SMESHGUI_DeleteGroupDlg::onClose()
|
||||
void SMESHGUI_DeleteGroupDlg::reject()
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
@ -254,7 +254,7 @@ void SMESHGUI_DeleteGroupDlg::onClose()
|
||||
disconnect(mySMESHGUI, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
mySelectionMgr->clearFilters();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -334,15 +334,6 @@ void SMESHGUI_DeleteGroupDlg::enterEvent (QEvent*)
|
||||
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_DeleteGroupDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -59,14 +59,15 @@ public:
|
||||
void Init ();
|
||||
|
||||
private:
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void onOk();
|
||||
bool onApply();
|
||||
void onClose();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
|
@ -214,14 +214,14 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
|
||||
connect(mySelectButton3, SIGNAL (clicked()), this, SLOT(onEditCurrentArgument()));
|
||||
|
||||
connect(myButtonOk, SIGNAL(clicked()), this, SLOT(onOk()));
|
||||
connect(myButtonClose, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||
connect(myButtonClose, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(myButtonApply, SIGNAL(clicked()), this, SLOT(onApply()));
|
||||
connect(myButtonHelp, SIGNAL(clicked()), this, SLOT(onHelp()));
|
||||
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionChanged()));
|
||||
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(onClose()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -425,19 +425,19 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
|
||||
void SMESHGUI_DuplicateNodesDlg::onOk()
|
||||
{
|
||||
if (onApply())
|
||||
onClose();
|
||||
reject();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief SLOT called to close the dialog.
|
||||
*/
|
||||
void SMESHGUI_DuplicateNodesDlg::onClose()
|
||||
void SMESHGUI_DuplicateNodesDlg::reject()
|
||||
{
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
disconnect(mySMESHGUI, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
mySelectionMgr->clearFilters();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -575,15 +575,6 @@ void SMESHGUI_DuplicateNodesDlg::enterEvent (QEvent*)
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Receive close events.
|
||||
Reimplemented from QWidget class.
|
||||
*/
|
||||
void SMESHGUI_DuplicateNodesDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Receive key press events.
|
||||
Reimplemented from QWidget class.
|
||||
|
@ -65,15 +65,16 @@ private:
|
||||
|
||||
bool isValid();
|
||||
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void onConstructorsClicked( int );
|
||||
|
||||
void onOk();
|
||||
void onClose();
|
||||
bool onApply();
|
||||
void onHelp();
|
||||
|
||||
|
@ -305,7 +305,7 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
|
||||
/***************************************************************/
|
||||
// signals and slots connections
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -326,7 +326,7 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
|
||||
|
||||
@ -664,16 +664,28 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
|
||||
void SMESHGUI_ExtrusionDlg::ClickOnOk()
|
||||
{
|
||||
if (ClickOnApply())
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose : Called when dialog box is closed
|
||||
//=================================================================================
|
||||
void SMESHGUI_ExtrusionDlg::ClickOnCancel()
|
||||
void SMESHGUI_ExtrusionDlg::reject()
|
||||
{
|
||||
reject();
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
//mySelectionMgr->clearSelected();
|
||||
if (SMESH::GetCurrentVtkView()) {
|
||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||
SMESH::SetPointRepresentation(false);
|
||||
SMESH::SetPickable();
|
||||
}
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
mySMESHGUI->ResetState();
|
||||
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -998,32 +1010,6 @@ void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_ExtrusionDlg::closeEvent( QCloseEvent* )
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
//mySelectionMgr->clearSelected();
|
||||
if (SMESH::GetCurrentVtkView()) {
|
||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||
SMESH::SetPointRepresentation(false);
|
||||
SMESH::SetPickable();
|
||||
}
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
mySMESHGUI->ResetState();
|
||||
}
|
||||
|
||||
void SMESHGUI_ExtrusionDlg::reject()
|
||||
{
|
||||
QDialog::reject();
|
||||
close();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : onSelectMesh()
|
||||
// purpose :
|
||||
|
@ -68,12 +68,9 @@ public:
|
||||
SMESHGUI_ExtrusionDlg( SMESHGUI* );
|
||||
~SMESHGUI_ExtrusionDlg();
|
||||
|
||||
void reject();
|
||||
|
||||
private:
|
||||
void Init( bool = true );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void closeEvent( QCloseEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
int GetConstructorId();
|
||||
void getExtrusionVector(SMESH::DirStruct& aVector);
|
||||
@ -147,14 +144,14 @@ private:
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
protected slots:
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ConstructorsClicked( int );
|
||||
void CheckIsEnable();
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void ClickOnCancel();
|
||||
void ClickOnHelp();
|
||||
void ClickOnRadio();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -2653,7 +2653,7 @@ QWidget* SMESHGUI_FilterDlg::createButtonFrame (QWidget* theParent)
|
||||
aLay->addWidget(myButtons[ BTN_Help ]);
|
||||
|
||||
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
|
||||
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
|
||||
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
|
||||
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
|
||||
|
||||
@ -2718,7 +2718,7 @@ void SMESHGUI_FilterDlg::Init (const QList<int>& theTypes, const bool setInViewe
|
||||
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
updateMainButtons();
|
||||
updateSelection();
|
||||
@ -2768,10 +2768,10 @@ void SMESHGUI_FilterDlg::onOk()
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_FilterDlg::onClose
|
||||
// name : SMESHGUI_FilterDlg::reject
|
||||
// Purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=======================================================================
|
||||
void SMESHGUI_FilterDlg::onClose()
|
||||
void SMESHGUI_FilterDlg::reject()
|
||||
{
|
||||
// Restore previously selected object
|
||||
if (mySelectionMgr)
|
||||
@ -2799,8 +2799,7 @@ void SMESHGUI_FilterDlg::onClose()
|
||||
disconnect(mySMESHGUI, 0, this, 0);
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
return;
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -2848,15 +2847,6 @@ void SMESHGUI_FilterDlg::enterEvent (QEvent*)
|
||||
setEnabled(true);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : closeEvent()
|
||||
// Purpose :
|
||||
//=======================================================================
|
||||
void SMESHGUI_FilterDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_FilterDlg::getIdsFromWg
|
||||
// Purpose : Retrieve list of ids from given widget
|
||||
|
@ -238,11 +238,13 @@ signals:
|
||||
|
||||
void Accepted();
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
|
||||
void onOk();
|
||||
bool onApply();
|
||||
void onClose();
|
||||
void onHelp();
|
||||
void onDeactivate();
|
||||
void onSelectionDone();
|
||||
@ -253,7 +255,6 @@ private:
|
||||
|
||||
void construct( const QList<int>& );
|
||||
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
|
@ -269,7 +269,7 @@ QWidget* SMESHGUI_FilterLibraryDlg::createButtonFrame (QWidget* theParent)
|
||||
aLay->addWidget(myButtons[ BTN_Help ]);
|
||||
|
||||
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
|
||||
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
|
||||
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
|
||||
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
|
||||
|
||||
@ -337,7 +337,7 @@ void SMESHGUI_FilterLibraryDlg::Init (const QList<int>& theTypes,
|
||||
setEnabled(true);
|
||||
|
||||
connect( mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||
connect( mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
||||
connect( mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
if (myMode == ADD_TO)
|
||||
{
|
||||
@ -467,22 +467,18 @@ bool SMESHGUI_FilterLibraryDlg::onApply()
|
||||
void SMESHGUI_FilterLibraryDlg::onOk()
|
||||
{
|
||||
if (onApply())
|
||||
{
|
||||
disconnect( mySMESHGUI, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
accept();
|
||||
}
|
||||
reject();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_FilterLibraryDlg::onClose
|
||||
// name : SMESHGUI_FilterLibraryDlg::reject
|
||||
// Purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=======================================================================
|
||||
void SMESHGUI_FilterLibraryDlg::onClose()
|
||||
void SMESHGUI_FilterLibraryDlg::reject()
|
||||
{
|
||||
disconnect( mySMESHGUI, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -527,15 +523,6 @@ void SMESHGUI_FilterLibraryDlg::enterEvent(QEvent*)
|
||||
setEnabled(true);
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose : Close dialog
|
||||
//=================================================================================
|
||||
void SMESHGUI_FilterLibraryDlg::closeEvent(QCloseEvent* e)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_FilterLibraryDlg::getFileName
|
||||
// Purpose : Get file name
|
||||
|
@ -77,14 +77,15 @@ public:
|
||||
void SetTable( const SMESHGUI_FilterTable* );
|
||||
|
||||
private:
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void onOk();
|
||||
bool onApply();
|
||||
void onClose();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
|
@ -439,7 +439,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
|
||||
|
||||
connect(myOKBtn, SIGNAL(clicked()), this, SLOT(onOK()));
|
||||
connect(myApplyBtn, SIGNAL(clicked()), this, SLOT(onApply()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(myHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
|
||||
|
||||
/* Init selection */
|
||||
@ -458,7 +458,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
|
||||
myGeomFilter = new GEOM_SelectionFilter( aStudy, true );
|
||||
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(onClose()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onObjectSelectionChanged()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalVisibilityChanged()), this, SLOT(onVisibilityChanged()));
|
||||
|
||||
@ -1189,7 +1189,7 @@ void SMESHGUI_GroupDlg::onOK()
|
||||
{
|
||||
setIsApplyAndClose( true );
|
||||
if ( onApply() )
|
||||
onClose();
|
||||
reject();
|
||||
setIsApplyAndClose( false );
|
||||
}
|
||||
|
||||
@ -2165,15 +2165,6 @@ void SMESHGUI_GroupDlg::onSort()
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_GroupDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : onVisibilityChanged()
|
||||
// purpose :
|
||||
@ -2184,10 +2175,10 @@ void SMESHGUI_GroupDlg::onVisibilityChanged()
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : SMESHGUI_GroupDlg::onClose
|
||||
// function : SMESHGUI_GroupDlg::reject
|
||||
// purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=================================================================================
|
||||
void SMESHGUI_GroupDlg::onClose()
|
||||
void SMESHGUI_GroupDlg::reject()
|
||||
{
|
||||
if (SMESH::GetCurrentVtkView()) {
|
||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||
@ -2208,7 +2199,7 @@ void SMESHGUI_GroupDlg::onClose()
|
||||
mySelectionMgr->clearFilters();
|
||||
mySMESHGUI->ResetState();
|
||||
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -2262,16 +2253,6 @@ void SMESHGUI_GroupDlg::enterEvent (QEvent*)
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : hideEvent
|
||||
// purpose : caused by ESC key
|
||||
//=================================================================================
|
||||
void SMESHGUI_GroupDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized() && !myIsBusy)
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -85,13 +85,15 @@ public slots:
|
||||
void onAdd();
|
||||
void onRemove();
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void onTypeChanged( int );
|
||||
void onGrpTypeChanged( int );
|
||||
void onColorChanged( QColor );
|
||||
|
||||
void onOK();
|
||||
void onClose();
|
||||
bool onApply();
|
||||
void onHelp();
|
||||
void onDeactivate();
|
||||
@ -123,9 +125,7 @@ private:
|
||||
void init( SMESH::SMESH_Mesh_ptr );
|
||||
void init( SMESH::SMESH_GroupBase_ptr,
|
||||
const bool theIsConvert = false );
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
void setSelectionMode( int );
|
||||
void updateButtons();
|
||||
|
@ -204,7 +204,7 @@ QWidget* SMESHGUI_GroupOpDlg::createButtonFrame (QWidget* theParent)
|
||||
|
||||
// connect signals and slots
|
||||
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
|
||||
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
|
||||
|
||||
@ -228,7 +228,7 @@ void SMESHGUI_GroupOpDlg::Init()
|
||||
// selection and SMESHGUI
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnClose()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
// set selection mode
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
@ -315,14 +315,14 @@ void SMESHGUI_GroupOpDlg::onOk()
|
||||
{
|
||||
setIsApplyAndClose( true );
|
||||
if ( onApply() )
|
||||
onClose();
|
||||
reject();
|
||||
setIsApplyAndClose( false );
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief SLOT called when "Close" button pressed closes dialog
|
||||
\brief SLOT called when dialog is closed
|
||||
*/
|
||||
void SMESHGUI_GroupOpDlg::onClose()
|
||||
void SMESHGUI_GroupOpDlg::reject()
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
@ -331,7 +331,7 @@ void SMESHGUI_GroupOpDlg::onClose()
|
||||
mySMESHGUI->ResetState();
|
||||
mySelectionMgr->clearFilters();
|
||||
reset();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -467,14 +467,6 @@ void SMESHGUI_GroupOpDlg::enterEvent(QEvent*)
|
||||
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Provides reaction on close event, closes the dialog box
|
||||
*/
|
||||
void SMESHGUI_GroupOpDlg::closeEvent(QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Resets state of the dialog, initializes its fields with default value, etc.
|
||||
Usually called by onApply() slot to reinitialize dialog fields. This virtual method
|
||||
|
@ -92,13 +92,14 @@ protected:
|
||||
bool isApplyAndClose() const;
|
||||
|
||||
private:
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void onOk();
|
||||
void onClose();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
|
@ -552,7 +552,7 @@ void SMESHGUI_MergeDlg::Init()
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -571,7 +571,7 @@ void SMESHGUI_MergeDlg::Init()
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
|
||||
// Init Mesh field from selection
|
||||
SelectionIntoArgument();
|
||||
@ -697,14 +697,14 @@ bool SMESHGUI_MergeDlg::ClickOnApply()
|
||||
void SMESHGUI_MergeDlg::ClickOnOk()
|
||||
{
|
||||
if (ClickOnApply())
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_MergeDlg::ClickOnCancel()
|
||||
void SMESHGUI_MergeDlg::reject()
|
||||
{
|
||||
myIdPreview->SetPointsLabeled(false);
|
||||
SMESH::SetPointRepresentation(false);
|
||||
@ -718,7 +718,7 @@ void SMESHGUI_MergeDlg::ClickOnCancel()
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -1226,26 +1226,6 @@ void SMESHGUI_MergeDlg::enterEvent(QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_MergeDlg::closeEvent(QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_MergeDlg::hideEvent (QHideEvent *)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -78,9 +78,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
void onEditGroup();
|
||||
|
||||
@ -150,9 +148,11 @@ private:
|
||||
QString myEntry;
|
||||
GrpList myGroups;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void updateControls();
|
||||
|
@ -352,7 +352,7 @@ QWidget* SMESHGUI_MeshPatternDlg::createButtonFrame (QWidget* theParent)
|
||||
aLay->addWidget(myHelpBtn);
|
||||
|
||||
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
|
||||
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
|
||||
|
||||
@ -390,7 +390,7 @@ void SMESHGUI_MeshPatternDlg::Init()
|
||||
// selection and SMESHGUI
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
myTypeGrp->button(Type_2d)->setChecked(true);
|
||||
onTypeChanged(Type_2d);
|
||||
@ -538,14 +538,14 @@ bool SMESHGUI_MeshPatternDlg::onApply()
|
||||
void SMESHGUI_MeshPatternDlg::onOk()
|
||||
{
|
||||
if (onApply())
|
||||
onClose();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_MeshPatternDlg::onClose
|
||||
// name : SMESHGUI_MeshPatternDlg::reject
|
||||
// Purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=======================================================================
|
||||
void SMESHGUI_MeshPatternDlg::onClose()
|
||||
void SMESHGUI_MeshPatternDlg::reject()
|
||||
{
|
||||
mySelectionMgr->clearFilters();
|
||||
SMESH::SetPickable();
|
||||
@ -555,7 +555,7 @@ void SMESHGUI_MeshPatternDlg::onClose()
|
||||
disconnect(mySMESHGUI, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
erasePreview();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -724,15 +724,6 @@ void SMESHGUI_MeshPatternDlg::enterEvent (QEvent*)
|
||||
onTextChanged(mySelEdit[Ids]->text());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_MeshPatternDlg::closeEvent
|
||||
// Purpose :
|
||||
//=======================================================================
|
||||
void SMESHGUI_MeshPatternDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_MeshPatternDlg::onSelInputChanged
|
||||
// Purpose : SLOT. Called when -> button clicked.
|
||||
|
@ -75,10 +75,12 @@ public:
|
||||
|
||||
void Init();
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void onOk();
|
||||
bool onApply();
|
||||
void onClose();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
@ -108,7 +110,6 @@ private:
|
||||
void activateSelection();
|
||||
QStringList prepareFilters() const;
|
||||
QString autoExtension( const QString& ) const;
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
bool isValid( const bool = true );
|
||||
|
@ -384,14 +384,14 @@ void SMESHGUI_MultiEditDlg::Init()
|
||||
|
||||
// main buttons
|
||||
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
|
||||
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
|
||||
|
||||
// selection and SMESHGUI
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
// dialog controls
|
||||
connect(myFilterBtn, SIGNAL(clicked()), SLOT(onFilterBtn() ));
|
||||
@ -423,7 +423,7 @@ void SMESHGUI_MultiEditDlg::Init()
|
||||
void SMESHGUI_MultiEditDlg::onOk()
|
||||
{
|
||||
if (onApply())
|
||||
onClose();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -510,10 +510,10 @@ SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& o
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_MultiEditDlg::onClose
|
||||
// name : SMESHGUI_MultiEditDlg::reject
|
||||
// Purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=======================================================================
|
||||
void SMESHGUI_MultiEditDlg::onClose()
|
||||
void SMESHGUI_MultiEditDlg::reject()
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
@ -527,7 +527,7 @@ void SMESHGUI_MultiEditDlg::onClose()
|
||||
//mySelectionMgr->clearSelected();
|
||||
mySelectionMgr->clearFilters();
|
||||
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -646,24 +646,6 @@ void SMESHGUI_MultiEditDlg::enterEvent (QEvent*)
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_MultiEditDlg::closeEvent
|
||||
// Purpose :
|
||||
//=======================================================================
|
||||
void SMESHGUI_MultiEditDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_MultiEditDlg::hideEvent
|
||||
// Purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_MultiEditDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_MultiEditDlg::onFilterBtn
|
||||
// Purpose : SLOT. Called when "Filter" button pressed.
|
||||
@ -1259,10 +1241,10 @@ SMESHGUI_CuttingOfQuadsDlg::~SMESHGUI_CuttingOfQuadsDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void SMESHGUI_CuttingOfQuadsDlg::onClose()
|
||||
void SMESHGUI_CuttingOfQuadsDlg::reject()
|
||||
{
|
||||
erasePreview();
|
||||
SMESHGUI_MultiEditDlg::onClose();
|
||||
SMESHGUI_MultiEditDlg::reject();
|
||||
}
|
||||
|
||||
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
|
||||
|
@ -82,7 +82,7 @@ signals:
|
||||
protected slots:
|
||||
void onOk();
|
||||
virtual bool onApply();
|
||||
virtual void onClose();
|
||||
virtual void reject();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
@ -102,9 +102,7 @@ protected slots:
|
||||
SMESH::NumericalFunctor_ptr getNumericalFunctor();
|
||||
|
||||
protected:
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent * );
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
QWidget* createButtonFrame( QWidget* );
|
||||
QWidget* createMainFrame( QWidget*, const bool );
|
||||
@ -221,7 +219,7 @@ protected:
|
||||
SMESH::SMESH_IDSource_ptr obj);
|
||||
|
||||
protected slots:
|
||||
virtual void onClose();
|
||||
virtual void reject();
|
||||
void onCriterionRB();
|
||||
void onPreviewChk();
|
||||
|
||||
|
@ -370,7 +370,7 @@ void SMESHGUI_NodesDlg::Init()
|
||||
|
||||
/* signals and slots connections */
|
||||
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
|
||||
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||
connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) );
|
||||
|
||||
@ -381,8 +381,8 @@ void SMESHGUI_NodesDlg::Init()
|
||||
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), SLOT( SelectionIntoArgument() ) );
|
||||
connect( mySMESHGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT( DeactivateActiveDialog() ) );
|
||||
/* to close dialog if study frame change */
|
||||
connect( mySMESHGUI, SIGNAL( SignalStudyFrameChanged() ), SLOT( ClickOnCancel() ) );
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
|
||||
connect( mySMESHGUI, SIGNAL( SignalStudyFrameChanged() ), SLOT( reject() ) );
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
|
||||
// set selection mode
|
||||
SMESH::SetPointRepresentation( true );
|
||||
@ -414,7 +414,7 @@ void SMESHGUI_NodesDlg::ValueChangedInSpinBox( double newValue )
|
||||
void SMESHGUI_NodesDlg::ClickOnOk()
|
||||
{
|
||||
if ( ClickOnApply() )
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -539,10 +539,10 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_NodesDlg::ClickOnCancel()
|
||||
void SMESHGUI_NodesDlg::reject()
|
||||
{
|
||||
disconnect( mySelectionMgr, 0, this, 0 );
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
|
||||
@ -552,7 +552,7 @@ void SMESHGUI_NodesDlg::ClickOnCancel()
|
||||
SMESH::SetPointRepresentation( false );
|
||||
mySMESHGUI->ResetState();
|
||||
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -638,25 +638,6 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_NodesDlg::closeEvent( QCloseEvent* )
|
||||
{
|
||||
this->ClickOnCancel(); /* same than click on cancel button */
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : hideEvent()
|
||||
// purpose : caused by ESC key
|
||||
//=================================================================================
|
||||
void SMESHGUI_NodesDlg::hideEvent( QHideEvent* )
|
||||
{
|
||||
if ( !isMinimized() )
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : enterEvent()
|
||||
// purpose : to reactivate this dialog box when mouse enter onto the window
|
||||
|
@ -79,8 +79,6 @@ private:
|
||||
|
||||
void Init();
|
||||
void enterEvent( QEvent* );
|
||||
void closeEvent( QCloseEvent* );
|
||||
void hideEvent ( QHideEvent* );
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
bool isValid();
|
||||
@ -108,9 +106,11 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void DeactivateActiveDialog();
|
||||
|
@ -435,7 +435,7 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*
|
||||
// Connect section
|
||||
connect( myOkBtn, SIGNAL( clicked() ), this, SLOT( onOk() ) );
|
||||
connect( myApplyBtn, SIGNAL( clicked() ), this, SLOT( onApply() ) );
|
||||
connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( onCancel() ) );
|
||||
connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
|
||||
connect( myHelpBtn, SIGNAL(clicked()), this, SLOT( onHelp() ) );
|
||||
connect( myMinEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( onMinMaxChanged() ) );
|
||||
connect( myMaxEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( onMinMaxChanged() ) );
|
||||
@ -445,7 +445,7 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*
|
||||
connect( myDistributionGrp, SIGNAL( toggled(bool) ), this, SLOT(onDistributionActivated(bool)) );
|
||||
connect( myDistribColorGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( onDistributionChanged( int ) ) );
|
||||
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
|
||||
connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onCancel() ) );
|
||||
connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( reject() ) );
|
||||
|
||||
myHelpFileName = "quality_page.html";
|
||||
}
|
||||
@ -471,7 +471,7 @@ SMESHGUI_Preferences_ScalarBarDlg::~SMESHGUI_Preferences_ScalarBarDlg()
|
||||
void SMESHGUI_Preferences_ScalarBarDlg::onOk()
|
||||
{
|
||||
if ( onApply() )
|
||||
onCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
@ -588,14 +588,15 @@ bool SMESHGUI_Preferences_ScalarBarDlg::onApply()
|
||||
|
||||
//=================================================================================================
|
||||
/*!
|
||||
* SMESHGUI_Preferences_ScalarBarDlg::onCancel
|
||||
* SMESHGUI_Preferences_ScalarBarDlg::reject
|
||||
*
|
||||
* Cancel button slot
|
||||
*/
|
||||
//=================================================================================================
|
||||
void SMESHGUI_Preferences_ScalarBarDlg::onCancel()
|
||||
void SMESHGUI_Preferences_ScalarBarDlg::reject()
|
||||
{
|
||||
close();
|
||||
myDlg = 0;
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
@ -724,19 +725,6 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
|
||||
myDistributionGrp->setEnabled( false );
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
/*!
|
||||
* SMESHGUI_Preferences_ScalarBarDlg::closeEvent
|
||||
*
|
||||
* Close event handler
|
||||
*/
|
||||
//=================================================================================================
|
||||
void SMESHGUI_Preferences_ScalarBarDlg::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
myDlg = 0;
|
||||
QDialog::closeEvent( e );
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
/*!
|
||||
* SMESHGUI_Preferences_ScalarBarDlg::onMinMaxChanged
|
||||
|
@ -64,17 +64,18 @@ public:
|
||||
|
||||
static void ScalarBarProperties( SMESHGUI* );
|
||||
|
||||
void closeEvent( QCloseEvent* );
|
||||
void setOriginAndSize( const double,
|
||||
const double,
|
||||
const double,
|
||||
const double );
|
||||
void initScalarBarFromResources();
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
protected slots:
|
||||
void onOk();
|
||||
bool onApply();
|
||||
void onCancel();
|
||||
void onHelp();
|
||||
void onSelectionChanged();
|
||||
void onXYChanged();
|
||||
|
@ -196,7 +196,7 @@ void SMESHGUI_RemoveElementsDlg::Init()
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -204,7 +204,7 @@ void SMESHGUI_RemoveElementsDlg::Init()
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
|
||||
SLOT(onTextChange(const QString&)));
|
||||
|
||||
@ -257,14 +257,14 @@ void SMESHGUI_RemoveElementsDlg::ClickOnApply()
|
||||
void SMESHGUI_RemoveElementsDlg::ClickOnOk()
|
||||
{
|
||||
ClickOnApply();
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RemoveElementsDlg::ClickOnCancel()
|
||||
void SMESHGUI_RemoveElementsDlg::reject()
|
||||
{
|
||||
if (SMESH::GetCurrentVtkView())
|
||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||
@ -274,7 +274,7 @@ void SMESHGUI_RemoveElementsDlg::ClickOnCancel()
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -457,26 +457,6 @@ void SMESHGUI_RemoveElementsDlg::enterEvent(QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RemoveElementsDlg::closeEvent(QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_RemoveElementsDlg::hideEvent( QHideEvent* )
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -63,9 +63,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
LightApp_SelectionMgr* mySelectionMgr;
|
||||
@ -96,9 +94,11 @@ private:
|
||||
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -196,7 +196,7 @@ void SMESHGUI_RemoveNodesDlg::Init()
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -204,7 +204,7 @@ void SMESHGUI_RemoveNodesDlg::Init()
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
|
||||
SLOT(onTextChange(const QString&)));
|
||||
|
||||
@ -261,14 +261,14 @@ void SMESHGUI_RemoveNodesDlg::ClickOnApply()
|
||||
void SMESHGUI_RemoveNodesDlg::ClickOnOk()
|
||||
{
|
||||
ClickOnApply();
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RemoveNodesDlg::ClickOnCancel()
|
||||
void SMESHGUI_RemoveNodesDlg::reject()
|
||||
{
|
||||
//mySelectionMgr->clearSelected();
|
||||
if (SMESH::GetCurrentVtkView()) {
|
||||
@ -280,7 +280,7 @@ void SMESHGUI_RemoveNodesDlg::ClickOnCancel()
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -463,26 +463,6 @@ void SMESHGUI_RemoveNodesDlg::enterEvent(QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RemoveNodesDlg::closeEvent(QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_RemoveNodesDlg::hideEvent( QHideEvent* )
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -63,9 +63,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
LightApp_SelectionMgr* mySelectionMgr;
|
||||
@ -96,9 +94,11 @@ private:
|
||||
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -186,7 +186,7 @@ void SMESHGUI_RenumberingDlg::Init()
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -194,7 +194,7 @@ void SMESHGUI_RenumberingDlg::Init()
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
|
||||
myEditCurrentArgument = LineEditMesh;
|
||||
LineEditMesh->setFocus();
|
||||
@ -254,20 +254,20 @@ void SMESHGUI_RenumberingDlg::ClickOnApply()
|
||||
void SMESHGUI_RenumberingDlg::ClickOnOk()
|
||||
{
|
||||
ClickOnApply();
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RenumberingDlg::ClickOnCancel()
|
||||
void SMESHGUI_RenumberingDlg::reject()
|
||||
{
|
||||
//mySelectionMgr->clearSelected();
|
||||
mySelectionMgr->clearFilters();
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -392,26 +392,6 @@ void SMESHGUI_RenumberingDlg::enterEvent(QEvent* e)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RenumberingDlg::closeEvent(QCloseEvent* e)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_RenumberingDlg::hideEvent (QHideEvent * e)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : keyPressEvent()
|
||||
// purpose :
|
||||
|
@ -60,9 +60,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
|
||||
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
|
||||
@ -89,9 +87,11 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -323,7 +323,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
|
||||
@ -343,7 +343,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
|
||||
|
||||
@ -574,21 +574,27 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
|
||||
void SMESHGUI_RevolutionDlg::ClickOnOk()
|
||||
{
|
||||
if( ClickOnApply() )
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RevolutionDlg::ClickOnCancel()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
void SMESHGUI_RevolutionDlg::reject()
|
||||
{
|
||||
close();
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
//mySelectionMgr->clearSelected();
|
||||
if (SMESH::GetCurrentVtkView()) {
|
||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||
SMESH::SetPointRepresentation(false);
|
||||
}
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
mySMESHGUI->ResetState();
|
||||
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -910,25 +916,6 @@ void SMESHGUI_RevolutionDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
//mySelectionMgr->clearSelected();
|
||||
if (SMESH::GetCurrentVtkView()) {
|
||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||
SMESH::SetPointRepresentation(false);
|
||||
}
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
mySMESHGUI->ResetState();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : onSelectMesh
|
||||
//purpose :
|
||||
|
@ -74,13 +74,10 @@ public:
|
||||
SMESHGUI_RevolutionDlg( SMESHGUI* );
|
||||
~SMESHGUI_RevolutionDlg();
|
||||
|
||||
void reject();
|
||||
|
||||
private:
|
||||
enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
|
||||
|
||||
void Init( bool = true);
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
int GetConstructorId();
|
||||
@ -163,11 +160,11 @@ private:
|
||||
|
||||
protected slots:
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ConstructorsClicked( int );
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -297,7 +297,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule ) :
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -312,7 +312,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule ) :
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
|
||||
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
|
||||
@ -508,14 +508,14 @@ void SMESHGUI_RotationDlg::ClickOnOk()
|
||||
{
|
||||
setIsApplyAndClose( true );
|
||||
if( ClickOnApply() )
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RotationDlg::ClickOnCancel()
|
||||
void SMESHGUI_RotationDlg::reject()
|
||||
{
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
@ -527,7 +527,7 @@ void SMESHGUI_RotationDlg::ClickOnCancel()
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -857,26 +857,6 @@ void SMESHGUI_RotationDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_RotationDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : hideEvent()
|
||||
// purpose : caused by ESC key
|
||||
//=================================================================================
|
||||
void SMESHGUI_RotationDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : onSelectMesh()
|
||||
// purpose :
|
||||
|
@ -66,9 +66,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init( bool = true );
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
bool IsAxisOk();
|
||||
void setNewMeshName();
|
||||
@ -134,11 +132,11 @@ private:
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
protected slots:
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -301,7 +301,7 @@ SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule ) :
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
|
||||
@ -312,7 +312,7 @@ SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule ) :
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
|
||||
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
|
||||
@ -545,14 +545,14 @@ void SMESHGUI_ScaleDlg::ClickOnOk()
|
||||
{
|
||||
setIsApplyAndClose( true );
|
||||
if( ClickOnApply() )
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_ScaleDlg::ClickOnCancel()
|
||||
void SMESHGUI_ScaleDlg::reject()
|
||||
{
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
@ -564,7 +564,7 @@ void SMESHGUI_ScaleDlg::ClickOnCancel()
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode( ActorSelection );
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -881,26 +881,6 @@ void SMESHGUI_ScaleDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_ScaleDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_ScaleDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : onSelectMesh
|
||||
//purpose :
|
||||
|
@ -62,9 +62,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init( bool = true );
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
int GetConstructorId();
|
||||
void setNewMeshName();
|
||||
@ -129,12 +127,12 @@ private:
|
||||
|
||||
|
||||
protected slots:
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ConstructorsClicked( int );
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -257,7 +257,7 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule )
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
|
||||
@ -272,7 +272,7 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule )
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
|
||||
connect(LineEdit1, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
connect(LineEdit2, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
@ -548,14 +548,14 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
|
||||
void SMESHGUI_SewingDlg::ClickOnOk()
|
||||
{
|
||||
if (ClickOnApply())
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_SewingDlg::ClickOnCancel()
|
||||
void SMESHGUI_SewingDlg::reject()
|
||||
{
|
||||
//mySelectionMgr->clearSelected();
|
||||
SMESH::SetPointRepresentation(false);
|
||||
@ -563,7 +563,7 @@ void SMESHGUI_SewingDlg::ClickOnCancel()
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -873,26 +873,6 @@ void SMESHGUI_SewingDlg::enterEvent (QEvent* e)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_SewingDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_SewingDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetConstructorId()
|
||||
// purpose :
|
||||
|
@ -63,9 +63,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
int GetConstructorId();
|
||||
bool IsValid();
|
||||
@ -118,10 +116,12 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ConstructorsClicked( int );
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -215,14 +215,14 @@ void SMESHGUI_SingleEditDlg::Init()
|
||||
|
||||
// main buttons
|
||||
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
|
||||
connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
|
||||
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
|
||||
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
|
||||
|
||||
// selection and SMESHGUI
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
|
||||
connect(myEdge, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
|
||||
myOkBtn->setEnabled(false);
|
||||
@ -244,14 +244,14 @@ void SMESHGUI_SingleEditDlg::Init()
|
||||
void SMESHGUI_SingleEditDlg::onOk()
|
||||
{
|
||||
if (onApply())
|
||||
onClose();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// name : onClose()
|
||||
// name : reject()
|
||||
// Purpose : SLOT called when "Close" button pressed. Close dialog
|
||||
//=======================================================================
|
||||
void SMESHGUI_SingleEditDlg::onClose()
|
||||
void SMESHGUI_SingleEditDlg::reject()
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
@ -259,7 +259,7 @@ void SMESHGUI_SingleEditDlg::onClose()
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
disconnect(mySMESHGUI, 0, this, 0);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -458,25 +458,6 @@ void SMESHGUI_SingleEditDlg::enterEvent (QEvent*)
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_SingleEditDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : hideEvent()
|
||||
//purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_SingleEditDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
onClose();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : onApply()
|
||||
// purpose : SLOT. Called when apply button is pressed
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
protected slots:
|
||||
void onOk();
|
||||
virtual bool onApply();
|
||||
void onClose();
|
||||
virtual void reject();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
@ -71,9 +71,7 @@ protected slots:
|
||||
void onTextChange( const QString& );
|
||||
|
||||
protected:
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
QWidget* createButtonFrame( QWidget* );
|
||||
QWidget* createMainFrame( QWidget* );
|
||||
|
@ -275,7 +275,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
|
||||
/***************************************************************/
|
||||
// signals and slots connections
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
|
||||
@ -284,7 +284,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
|
||||
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(LineEditElements, SIGNAL(textChanged(const QString&)),
|
||||
SLOT(onTextChange(const QString&)));
|
||||
connect(LineEditNodes, SIGNAL(textChanged(const QString&)),
|
||||
@ -421,14 +421,14 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
|
||||
void SMESHGUI_SmoothingDlg::ClickOnOk()
|
||||
{
|
||||
if( ClickOnApply() )
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose : Called when dialog box is closed
|
||||
//=================================================================================
|
||||
void SMESHGUI_SmoothingDlg::ClickOnCancel()
|
||||
void SMESHGUI_SmoothingDlg::reject()
|
||||
{
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
@ -441,7 +441,7 @@ void SMESHGUI_SmoothingDlg::ClickOnCancel()
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -704,26 +704,6 @@ void SMESHGUI_SmoothingDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_SmoothingDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : hideEvent()
|
||||
// purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_SmoothingDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : onSelectMesh()
|
||||
// purpose :
|
||||
|
@ -71,9 +71,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
void setFilters( const bool theIsElem );
|
||||
|
||||
@ -124,9 +122,11 @@ private:
|
||||
QPushButton* myElemFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
@ -300,7 +300,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
|
||||
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
|
||||
@ -316,7 +316,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
|
||||
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
/* to close dialog if study change */
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
|
||||
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
|
||||
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
|
||||
@ -573,14 +573,14 @@ void SMESHGUI_SymmetryDlg::ClickOnOk()
|
||||
{
|
||||
setIsApplyAndClose( true );
|
||||
if( ClickOnApply() )
|
||||
ClickOnCancel();
|
||||
reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// function : reject()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_SymmetryDlg::ClickOnCancel()
|
||||
void SMESHGUI_SymmetryDlg::reject()
|
||||
{
|
||||
disconnect(mySelectionMgr, 0, this, 0);
|
||||
mySelectionMgr->clearFilters();
|
||||
@ -592,7 +592,7 @@ void SMESHGUI_SymmetryDlg::ClickOnCancel()
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->SetSelectionMode(ActorSelection);
|
||||
mySMESHGUI->ResetState();
|
||||
reject();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -917,26 +917,6 @@ void SMESHGUI_SymmetryDlg::enterEvent (QEvent*)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_SymmetryDlg::closeEvent (QCloseEvent*)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : hideEvent()
|
||||
// purpose : caused by ESC key
|
||||
//=======================================================================
|
||||
void SMESHGUI_SymmetryDlg::hideEvent (QHideEvent*)
|
||||
{
|
||||
if (!isMinimized())
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : onSelectMesh
|
||||
//purpose :
|
||||
|
@ -66,9 +66,7 @@ public:
|
||||
|
||||
private:
|
||||
void Init( bool = true );
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||
void hideEvent( QHideEvent* ); /* ESC key */
|
||||
void keyPressEvent( QKeyEvent* );
|
||||
int GetConstructorId();
|
||||
bool IsMirrorOk();
|
||||
@ -139,11 +137,11 @@ private:
|
||||
|
||||
protected slots:
|
||||
virtual void onDisplaySimulation( bool );
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void ConstructorsClicked( int );
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
void ClickOnHelp();
|
||||
void SetEditCurrentArgument();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user