From 7b33bc39fd54725e6444d8814129c6fffd826617 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 11 Nov 2013 11:07:44 +0000 Subject: [PATCH] 22355: EDF SMESH: New 1D hypothesis "Adaptive" --- doc/salome/examples/CMakeLists.txt | 1 + .../defining_hypotheses_adaptive1d.py | 30 + doc/salome/gui/SMESH/images/adaptive1d.png | Bin 0 -> 15931 bytes .../SMESH/images/adaptive1d_sample_mesh.png | Bin 0 -> 21675 bytes .../gui/SMESH/input/1d_meshing_hypo.doc | 31 +- doc/salome/gui/SMESH/input/about_hypo.doc | 11 +- .../SMESH/input/tui_defining_hypotheses.doc | 6 + idl/SMESH_BasicHypothesis.idl | 25 +- resources/StdMeshers.xml.in | 11 +- src/SMESH/SMESH_Mesh.cxx | 2 +- src/SMESHGUI/SMESHGUI_Hypotheses.cxx | 2 + src/SMESH_I/SMESH_Gen_i.hxx | 4 +- src/SMESH_SWIG/StdMeshersBuilder.py | 22 + src/StdMeshers/CMakeLists.txt | 1 + src/StdMeshers/StdMeshers_Adaptive1D.cxx | 1194 +++++++++++++++++ src/StdMeshers/StdMeshers_Adaptive1D.hxx | 115 ++ src/StdMeshers/StdMeshers_Regular_1D.cxx | 105 +- src/StdMeshers/StdMeshers_Regular_1D.hxx | 19 +- .../StdMeshersGUI_StdHypothesisCreator.cxx | 38 +- src/StdMeshersGUI/StdMeshers_images.ts | 8 + src/StdMeshersGUI/StdMeshers_msg_en.ts | 16 + src/StdMeshers_I/CMakeLists.txt | 1 + src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx | 173 +++ src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx | 89 ++ src/StdMeshers_I/StdMeshers_i.cxx | 3 + 25 files changed, 1847 insertions(+), 60 deletions(-) create mode 100644 doc/salome/examples/defining_hypotheses_adaptive1d.py create mode 100644 doc/salome/gui/SMESH/images/adaptive1d.png create mode 100644 doc/salome/gui/SMESH/images/adaptive1d_sample_mesh.png create mode 100644 src/StdMeshers/StdMeshers_Adaptive1D.cxx create mode 100644 src/StdMeshers/StdMeshers_Adaptive1D.hxx create mode 100644 src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx create mode 100644 src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index d8c4631f8..aefec539d 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -63,6 +63,7 @@ SET(GOOD_TESTS defining_hypotheses_ex14.py defining_hypotheses_ex15.py defining_hypotheses_ex16.py + defining_hypotheses_adaptive1d.py filters_ex01.py filters_ex03.py filters_ex04.py diff --git a/doc/salome/examples/defining_hypotheses_adaptive1d.py b/doc/salome/examples/defining_hypotheses_adaptive1d.py new file mode 100644 index 000000000..f53434a85 --- /dev/null +++ b/doc/salome/examples/defining_hypotheses_adaptive1d.py @@ -0,0 +1,30 @@ +import salome, math +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + + +box = geompy.MakeBoxDXDYDZ( 100, 100, 100 ) +tool = geompy.MakeTranslation( box, 50, 0, 10 ) +axis = geompy.MakeVector( geompy.MakeVertex( 100, 0, 100 ),geompy.MakeVertex( 100, 10, 100 ),) +tool = geompy.Rotate( tool, axis, math.pi * 25 / 180. ) +shape = geompy.MakeCut( box, tool ) +cyl = geompy.MakeCylinder( geompy.MakeVertex( -10,5, 95 ), geompy.MakeVectorDXDYDZ(1,0,0), 2, 90) +shape = geompy.MakeCut( shape, cyl ) +tool = geompy.MakeBoxTwoPnt( geompy.MakeVertex( -10, 2, 15 ), geompy.MakeVertex( 90, 5, 16 )) +shape = geompy.MakeCut( shape, tool, theName="shape" ) + +# Parameters of Adaptive hypothesis. minSize and maxSize are such that they do not limit +# size of segments because size of geometrical features lies within [2.-100.] range, hence +# size of segments is defined by deflection parameter and size of geometrical features only. +minSize = 0.1 +maxSize = 200 +deflection = 0.05 + +mesh = smesh.Mesh( shape ) +mesh.Segment().Adaptive( minSize, maxSize, deflection ) +mesh.Triangle( smeshBuilder.NETGEN_2D ) +mesh.Compute() + diff --git a/doc/salome/gui/SMESH/images/adaptive1d.png b/doc/salome/gui/SMESH/images/adaptive1d.png new file mode 100644 index 0000000000000000000000000000000000000000..8091c8d0ed7e8da41533a57a36ea75a44e36cd2b GIT binary patch literal 15931 zcmb7r1z42dx9&#>N=iwG(%qd>A}I~hDc#+Il$5k|i?nou64D^u(%s!~H^2Wm_n!Z~ z_dNHxpO3>gGvCbY*?aAGz3;o$guau1gNj6e1VIq$TPblR2!f#l=NnI9!7Y_$_&4z9 znVpoTBLty!JpPA?r$-|M57IkHXgGfx3hIJGjTL`Boni>addKUHhR49Ai(}3 z1d%~+#b2wqrS7GDCcC|X1S`L?v#r+X2N~4LU^sJFe&{N?K6qR_{SB+EfoHo(2 zG46$C>DdhCX9`b=xO2HGTlUf0dmbVqi*FK12^%Go%^O}r7w+i?C;eB0jx|?Am<&hk zgFc8);g>It7tb+bj^I7kywzB5sI?m|b_}Los+sb8$1dc@0ml8|m0r zD=Qp^(gojSefb?hn4c~6IdU-Ji_&GMK0$6)3mo*0#`s0p{O5RXR~q<{(GN{j6!^6FT`-Gw z5DytuTbAOFU(F86$P`F@jjH2gtVu+4fq4vF*jW>6FT%VT^O0=6QQG+p7?x|wo?o1j z!_cmdxtIhs1>{Wb)RMxGU5*Xv7Jk0m&hhMm7T@Vl$yTxoVjJg>Q0)HoEd2KE1tdig zvnDV)&E9qX?h7L=ZL2r)es?+YB~=qP)FBx91j;G*eZGfI%4OBrJD!}}Ji>llbHI1b z%86V%lx)CeJLraE68QOZ;SD+_tbbb{eIfMIPW)l5uV2-Zu3~Dpc-J2*|32cgk0eL= zn2lC%uxvoq4C=L=krAg{(o0fYTw(iVV=lzlI3ecp9SJJl@qoA!pWQ8Mm*Ouz$O?J@mV?Ue$1j1V!udwQvV|svJpXS&*U~p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