diff --git a/CMakeLists.txt b/CMakeLists.txt index b308616a7..08f747133 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,8 +28,8 @@ CMAKE_POLICY(SET CMP0003 NEW) STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7) -SET(${PROJECT_NAME_UC}_MINOR_VERSION 6) -SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) +SET(${PROJECT_NAME_UC}_MINOR_VERSION 7) +SET(${PROJECT_NAME_UC}_PATCH_VERSION 1) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) SET(${PROJECT_NAME_UC}_VERSION_DEV 0) @@ -121,7 +121,9 @@ IF(SALOME_BUILD_GUI) IF(EXISTS ${GUI_ROOT_DIR}) LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeGUI) - FULL_GUI(TRUE) #check whether GUI builded in full mode and with CORBA + SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA + SALOME_GUI_MODE(SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT + OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_PYCONSOLE) ## ## Prerequisites From GUI: ## diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 7ee8ff5fd..65d8e52e2 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -165,6 +165,7 @@ SET(GOOD_TESTS transforming_meshes_ex13.py use_existing_faces.py viewing_meshes_ex02.py + split_biquad.py ) SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py) diff --git a/doc/salome/examples/split_biquad.py b/doc/salome/examples/split_biquad.py new file mode 100644 index 000000000..e53e7b0b1 --- /dev/null +++ b/doc/salome/examples/split_biquad.py @@ -0,0 +1,37 @@ +# Split bi-quadratic to linear + +import salome +salome.salome_init() + +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) + +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + +# make a shape consisting of two quadranges +OY = geompy.MakeVectorDXDYDZ(0, 1, 0) +OY1 = geompy.MakeTranslation( OY, 1, 0, 0 ) +OY2 = geompy.MakeTranslation( OY, 2, 0, 0 ) +q1 = geompy.MakeQuad2Edges( OY, OY1 ) +q2 = geompy.MakeQuad2Edges( OY1, OY2 ) + +shape = geompy.Partition( [q1,q2], theName='shape' ) +ff = geompy.SubShapeAll( shape, geompy.ShapeType["FACE"], theName="quad" ) + +# mesh one quadrange with quadrangless and the other with triangles +mesh = smesh.Mesh( shape ) +mesh.Segment().NumberOfSegments(1) +mesh.Quadrangle() +mesh.Triangle( ff[1] ) +mesh.Compute() + +# make group of quadrangles and extrude them into a hexahedron +quadGroup = mesh.Group( ff[0], "quads") +mesh.ExtrusionSweepObject2D( quadGroup, [0,0,1], 1 ) + +# make the mesh bi-quadratic +mesh.ConvertToQuadratic( theToBiQuad=True ) + +# split all elements into linear ones +mesh.SplitBiQuadraticIntoLinear() diff --git a/doc/salome/examples/transforming_meshes_ex01.py b/doc/salome/examples/transforming_meshes_ex01.py index dc61324ec..93f5196c0 100644 --- a/doc/salome/examples/transforming_meshes_ex01.py +++ b/doc/salome/examples/transforming_meshes_ex01.py @@ -1,16 +1,11 @@ # Translation import SMESH_mechanic -import SMESH -smesh = SMESH_mechanic.smesh mesh = SMESH_mechanic.mesh # define translation vector -point = SMESH.PointStruct(-150., -150., 0.) -vector =SMESH.DirStruct(point) +vector = [-150., -150., 0.] -# translate a mesh -doCopy = 1 - -mesh.Translate([], vector, doCopy) +# make a translated copy of all elements of the mesh +mesh.TranslateObject(mesh, vector, Copy=True) diff --git a/doc/salome/examples/transforming_meshes_ex05.py b/doc/salome/examples/transforming_meshes_ex05.py index f99d50b6a..deba1c407 100644 --- a/doc/salome/examples/transforming_meshes_ex05.py +++ b/doc/salome/examples/transforming_meshes_ex05.py @@ -1,10 +1,14 @@ # Merging Nodes -import SMESH_mechanic +import SMESH_mechanic, SMESH mesh = SMESH_mechanic.mesh # merge nodes -Tolerance = 25.0 +Tolerance = 4.0 + +# prevent nodes located on geom edges from removal during merge: +# create a group including all nodes on edges +allSegs = mesh.MakeGroup( "all segments", SMESH.EDGE, SMESH.FT_ElemGeomType,'=', SMESH.Geom_EDGE ) GroupsOfNodes = mesh.FindCoincidentNodes(Tolerance) -mesh.MergeNodes(GroupsOfNodes) +mesh.MergeNodes(GroupsOfNodes, NodesToKeep=allSegs) diff --git a/doc/salome/examples/transforming_meshes_ex09.py b/doc/salome/examples/transforming_meshes_ex09.py index 62fea88d1..9264a5c4c 100644 --- a/doc/salome/examples/transforming_meshes_ex09.py +++ b/doc/salome/examples/transforming_meshes_ex09.py @@ -11,35 +11,40 @@ import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) -# create two faces of the box -box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.) -facesList1 = geompy.SubShapeAll(box1, geompy.ShapeType["FACE"]) -face1 = facesList1[2] +# make two not sewed quadranges +OY0 = geompy.MakeVectorDXDYDZ(0, 1, 0) +OY1 = geompy.MakeTranslation( OY0, 1, 0, 0, theName="OY1" ) +OY2 = geompy.MakeTranslation( OY0, 1.01, 0, 0, theName="OY2" ) +OY3 = geompy.MakeTranslation( OY0, 2, 0, 0 ) +q1 = geompy.MakeQuad2Edges( OY0, OY1 ) +q2 = geompy.MakeQuad2Edges( OY2, OY3 ) -box2 = geompy.MakeBox(0., 5., 0., 20., 20., 15.) -facesList2 = geompy.SubShapeAll(box2, geompy.ShapeType["FACE"]) -face2 = facesList2[1] - -edgesList = geompy.SubShapeAll(face2, geompy.ShapeType["EDGE"]) -edge1 = edgesList[2] - -aComp = geompy.MakeCompound([face1, face2]) -geompy.addToStudy(aComp, "Two faces") - -# create a mesh on two faces -mesh = smesh.Mesh(aComp, "Two faces : quadrangle mesh") - -algo1D = mesh.Segment() -algo1D.NumberOfSegments(4) -algo2D = mesh.Quadrangle() - -algo_local = mesh.Segment(edge1) -algo_local.Arithmetic1D(1, 4) -algo_local.Propagation() +shape = geompy.MakeCompound( [q1,q2], theName='shape' ) +# make a non-uniform quadrangle mesh on two faces +mesh = smesh.Mesh(shape, "Two faces : quadrangle mesh") +mesh.Segment().Arithmetic1D( 0.1, 0.4 ) +mesh.Segment(q1).NumberOfSegments( 5 ) +mesh.Quadrangle() mesh.Compute() # sew free borders -# FirstNodeID1, SecondNodeID1, LastNodeID1, -# FirstNodeID2, SecondNodeID2, LastNodeID2, CreatePolygons, CreatePolyedrs -mesh.SewFreeBorders(6, 21, 5, 1, 12, 3, 0, 0) + +segs1 = mesh.GetSubMeshElementsId( OY1 ) # mesh segments generated on borders +segs2 = mesh.GetSubMeshElementsId( OY2 ) + +FirstNodeID1 = mesh.GetElemNode( segs1[0], 0 ) +SecondNodeID1 = mesh.GetElemNode( segs1[0], 1 ) +LastNodeID1 = mesh.GetElemNode( segs1[-1], 1 ) +FirstNodeID2 = mesh.GetElemNode( segs2[0], 0 ) +SecondNodeID2 = mesh.GetElemNode( segs2[0], 1 ) +LastNodeID2 = mesh.GetElemNode( segs2[-1], 1 ) +CreatePolygons = True +CreatePolyedrs = False + +res = mesh.SewFreeBorders(FirstNodeID1, SecondNodeID1, LastNodeID1, + FirstNodeID2, SecondNodeID2, LastNodeID2, + CreatePolygons, CreatePolyedrs ) +print res +print "nb polygons:", mesh.NbPolygons() + diff --git a/doc/salome/examples/transforming_meshes_ex10.py b/doc/salome/examples/transforming_meshes_ex10.py index 426a011a6..e0120b481 100644 --- a/doc/salome/examples/transforming_meshes_ex10.py +++ b/doc/salome/examples/transforming_meshes_ex10.py @@ -20,7 +20,7 @@ aComp = geompy.MakeCompound([box1, box2]) geompy.addToStudy(aComp, "Two boxes") # create a mesh on two boxes -mesh = smesh.Mesh(aComp, "Two faces : quadrangle mesh") +mesh = smesh.Mesh(aComp, "Sew Side Elements") algo1D = mesh.Segment() algo1D.NumberOfSegments(2) @@ -33,6 +33,31 @@ algo_local.Propagation() mesh.Compute() # sew side elements -# IDsOfSide1Elements, IDsOfSide2Elements, -# NodeID1OfSide1ToMerge, NodeID1OfSide2ToMerge, NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge -mesh.SewSideElements([69, 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58) + +# find elements to sew +face1 = geompy.GetFaceNearPoint( aComp, geompy.MakeVertex( 5, 10, 5 )) +IDsOfSide1Elements = mesh.GetSubMeshElementsId( face1 ) +print "side faces 1:",IDsOfSide1Elements + +face1Translated = geompy.MakeTranslation( face1, 0,5,0 ) +faceFilter = smesh.GetFilter( SMESH.FACE, SMESH.FT_BelongToGeom,'=', face1Translated ) +IDsOfSide2Elements = mesh.GetIdsFromFilter( faceFilter ) +print "side faces 2:",IDsOfSide2Elements + +# find corresponding nodes on sides +edge1 = geompy.GetEdgeNearPoint( aComp, geompy.MakeVertex( 0, 10, 5 )) +segs1 = mesh.GetSubMeshElementsId( edge1 ) # mesh segments generated on edge1 +NodeID1OfSide1ToMerge = mesh.GetElemNode( segs1[0], 0 ) +NodeID2OfSide1ToMerge = mesh.GetElemNode( segs1[0], 1 ) +print "nodes of side1:", [NodeID1OfSide1ToMerge,NodeID2OfSide1ToMerge] + +edge2 = geompy.GetEdgeNearPoint( aComp, geompy.MakeVertex( 0, 15, 5 )) +segs2 = mesh.GetSubMeshElementsId( edge2 ) # mesh segments generated on edge2 +NodeID1OfSide2ToMerge = mesh.GetElemNode( segs2[0], 0 ) +NodeID2OfSide2ToMerge = mesh.GetElemNode( segs2[0], 1 ) +print "nodes of side2:", [NodeID1OfSide2ToMerge,NodeID2OfSide2ToMerge] + +res = mesh.SewSideElements(IDsOfSide1Elements, IDsOfSide2Elements, + NodeID1OfSide1ToMerge, NodeID1OfSide2ToMerge, + NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge) +print res diff --git a/doc/salome/gui/SMESH/images/extru_rib_segs.png b/doc/salome/gui/SMESH/images/extru_rib_segs.png new file mode 100644 index 000000000..24f04cf39 Binary files /dev/null and b/doc/salome/gui/SMESH/images/extru_rib_segs.png differ diff --git a/doc/salome/gui/SMESH/images/extrusionalongaline2.png b/doc/salome/gui/SMESH/images/extrusionalongaline2.png index 32ea34f4a..f0e6d9e93 100644 Binary files a/doc/salome/gui/SMESH/images/extrusionalongaline2.png and b/doc/salome/gui/SMESH/images/extrusionalongaline2.png differ diff --git a/doc/salome/gui/SMESH/images/extrusionalongaline3.png b/doc/salome/gui/SMESH/images/extrusionalongaline3.png index a75601c01..75c359b07 100644 Binary files a/doc/salome/gui/SMESH/images/extrusionalongaline3.png and b/doc/salome/gui/SMESH/images/extrusionalongaline3.png differ diff --git a/doc/salome/gui/SMESH/images/free_borders1.png b/doc/salome/gui/SMESH/images/free_borders1.png old mode 100755 new mode 100644 index 6e73c9329..871beba86 Binary files a/doc/salome/gui/SMESH/images/free_borders1.png and b/doc/salome/gui/SMESH/images/free_borders1.png differ diff --git a/doc/salome/gui/SMESH/images/hexa_ijk_mesh.png b/doc/salome/gui/SMESH/images/hexa_ijk_mesh.png new file mode 100644 index 000000000..577ee8ec6 Binary files /dev/null and b/doc/salome/gui/SMESH/images/hexa_ijk_mesh.png differ diff --git a/doc/salome/gui/SMESH/images/image152.png b/doc/salome/gui/SMESH/images/image152.png old mode 100755 new mode 100644 index 604a15063..d30ae67dc Binary files a/doc/salome/gui/SMESH/images/image152.png and b/doc/salome/gui/SMESH/images/image152.png differ diff --git a/doc/salome/gui/SMESH/images/image88.jpg b/doc/salome/gui/SMESH/images/image88.jpg old mode 100755 new mode 100644 index 3b2a9739c..9499ab219 Binary files a/doc/salome/gui/SMESH/images/image88.jpg and b/doc/salome/gui/SMESH/images/image88.jpg differ diff --git a/doc/salome/gui/SMESH/images/mergeelems.png b/doc/salome/gui/SMESH/images/mergeelems.png old mode 100755 new mode 100644 index 3f59269a6..40d614f5e Binary files a/doc/salome/gui/SMESH/images/mergeelems.png and b/doc/salome/gui/SMESH/images/mergeelems.png differ diff --git a/doc/salome/gui/SMESH/images/mergeelems_auto.png b/doc/salome/gui/SMESH/images/mergeelems_auto.png index 904d23463..6e2b30697 100644 Binary files a/doc/salome/gui/SMESH/images/mergeelems_auto.png and b/doc/salome/gui/SMESH/images/mergeelems_auto.png differ diff --git a/doc/salome/gui/SMESH/images/mergenodes.png b/doc/salome/gui/SMESH/images/mergenodes.png old mode 100755 new mode 100644 index 05286a56e..5b34361cb Binary files a/doc/salome/gui/SMESH/images/mergenodes.png and b/doc/salome/gui/SMESH/images/mergenodes.png differ diff --git a/doc/salome/gui/SMESH/images/mergenodes_auto.png b/doc/salome/gui/SMESH/images/mergenodes_auto.png index 6a2a92830..4f177f605 100644 Binary files a/doc/salome/gui/SMESH/images/mergenodes_auto.png and b/doc/salome/gui/SMESH/images/mergenodes_auto.png differ diff --git a/doc/salome/gui/SMESH/images/merging_nodes1.png b/doc/salome/gui/SMESH/images/merging_nodes1.png old mode 100755 new mode 100644 index f64bdcbe2..05c817537 Binary files a/doc/salome/gui/SMESH/images/merging_nodes1.png and b/doc/salome/gui/SMESH/images/merging_nodes1.png differ diff --git a/doc/salome/gui/SMESH/images/merging_nodes2.png b/doc/salome/gui/SMESH/images/merging_nodes2.png old mode 100755 new mode 100644 index 8d7cfdd09..862ed1723 Binary files a/doc/salome/gui/SMESH/images/merging_nodes2.png and b/doc/salome/gui/SMESH/images/merging_nodes2.png differ diff --git a/doc/salome/gui/SMESH/images/preview_tmp_data.png b/doc/salome/gui/SMESH/images/preview_tmp_data.png index be1a12515..6f9fb31b3 100644 Binary files a/doc/salome/gui/SMESH/images/preview_tmp_data.png and b/doc/salome/gui/SMESH/images/preview_tmp_data.png differ diff --git a/doc/salome/gui/SMESH/images/revolutionsn1.png b/doc/salome/gui/SMESH/images/revolutionsn1.png index 6564c7fc6..3e7a7a1aa 100644 Binary files a/doc/salome/gui/SMESH/images/revolutionsn1.png and b/doc/salome/gui/SMESH/images/revolutionsn1.png differ diff --git a/doc/salome/gui/SMESH/images/revolutionsn2.png b/doc/salome/gui/SMESH/images/revolutionsn2.png index 67a673144..064dd6c2d 100644 Binary files a/doc/salome/gui/SMESH/images/revolutionsn2.png and b/doc/salome/gui/SMESH/images/revolutionsn2.png differ diff --git a/doc/salome/gui/SMESH/images/sew_after_merge.png b/doc/salome/gui/SMESH/images/sew_after_merge.png new file mode 100644 index 000000000..43d6869f7 Binary files /dev/null and b/doc/salome/gui/SMESH/images/sew_after_merge.png differ diff --git a/doc/salome/gui/SMESH/images/sew_using_merge.png b/doc/salome/gui/SMESH/images/sew_using_merge.png new file mode 100644 index 000000000..80cc44c67 Binary files /dev/null and b/doc/salome/gui/SMESH/images/sew_using_merge.png differ diff --git a/doc/salome/gui/SMESH/images/sewing1.png b/doc/salome/gui/SMESH/images/sewing1.png old mode 100755 new mode 100644 index daef959ff..55e0d8334 Binary files a/doc/salome/gui/SMESH/images/sewing1.png and b/doc/salome/gui/SMESH/images/sewing1.png differ diff --git a/doc/salome/gui/SMESH/images/sewing2.png b/doc/salome/gui/SMESH/images/sewing2.png old mode 100755 new mode 100644 index b7563f97a..2ba3e4365 Binary files a/doc/salome/gui/SMESH/images/sewing2.png and b/doc/salome/gui/SMESH/images/sewing2.png differ diff --git a/doc/salome/gui/SMESH/images/sewing3.png b/doc/salome/gui/SMESH/images/sewing3.png old mode 100755 new mode 100644 index da2972fc4..d2d97d509 Binary files a/doc/salome/gui/SMESH/images/sewing3.png and b/doc/salome/gui/SMESH/images/sewing3.png differ diff --git a/doc/salome/gui/SMESH/images/sewing4.png b/doc/salome/gui/SMESH/images/sewing4.png old mode 100755 new mode 100644 index 748237c49..ad66682a7 Binary files a/doc/salome/gui/SMESH/images/sewing4.png and b/doc/salome/gui/SMESH/images/sewing4.png differ diff --git a/doc/salome/gui/SMESH/images/sewing_auto.png b/doc/salome/gui/SMESH/images/sewing_auto.png new file mode 100644 index 000000000..f81cfe277 Binary files /dev/null and b/doc/salome/gui/SMESH/images/sewing_auto.png differ diff --git a/doc/salome/gui/SMESH/images/sewing_manual.png b/doc/salome/gui/SMESH/images/sewing_manual.png new file mode 100644 index 000000000..ff125bc1a Binary files /dev/null and b/doc/salome/gui/SMESH/images/sewing_manual.png differ diff --git a/doc/salome/gui/SMESH/images/split_biquad_to_linear_dlg.png b/doc/salome/gui/SMESH/images/split_biquad_to_linear_dlg.png new file mode 100644 index 000000000..c3df00902 Binary files /dev/null and b/doc/salome/gui/SMESH/images/split_biquad_to_linear_dlg.png differ diff --git a/doc/salome/gui/SMESH/images/split_biquad_to_linear_icon.png b/doc/salome/gui/SMESH/images/split_biquad_to_linear_icon.png new file mode 100644 index 000000000..0b9b7a038 Binary files /dev/null and b/doc/salome/gui/SMESH/images/split_biquad_to_linear_icon.png differ diff --git a/doc/salome/gui/SMESH/images/split_biquad_to_linear_mesh.png b/doc/salome/gui/SMESH/images/split_biquad_to_linear_mesh.png new file mode 100644 index 000000000..4a25e8f32 Binary files /dev/null and b/doc/salome/gui/SMESH/images/split_biquad_to_linear_mesh.png differ diff --git a/doc/salome/gui/SMESH/images/swap.png b/doc/salome/gui/SMESH/images/swap.png new file mode 100644 index 000000000..6470710aa Binary files /dev/null and b/doc/salome/gui/SMESH/images/swap.png differ diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc index 87c20b74f..a5b54c82c 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc @@ -5,31 +5,31 @@ Basic 1D hypothesis specifies: -By type of nodes distribution the 1D hypotheses can be categorized as follows: +1D hypotheses can be categorized by type of nodes distribution as follows: