From: eap Date: Mon, 23 Jan 2017 17:08:38 +0000 (+0300) Subject: Update TUI doc on groups X-Git-Tag: V8_3_0a2~26 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=dfcca981be519f4cf20d9b71bcdb0e91d9885351 Update TUI doc on groups + Correct export of polyhedra in DAT format (to make them readable) --- diff --git a/doc/salome/examples/creating_meshes_ex07.py b/doc/salome/examples/creating_meshes_ex07.py index acaaf5dc3..4ddb69702 100644 --- a/doc/salome/examples/creating_meshes_ex07.py +++ b/doc/salome/examples/creating_meshes_ex07.py @@ -69,13 +69,13 @@ Ginf2=Mesh_sup.Group(Finf2, "Inf") ## create compounds # create a compound of two meshes with renaming namesake groups and -# merging of elements with the given tolerance +# merging elements with the given tolerance Compound1 = smesh.Concatenate([Mesh_inf, Mesh_sup], 0, 1, 1e-05, - name='Compound_with_RenamedGrps_and_MergeElems') + name='Compound with RenamedGrps and MergeElems') # create a compound of two meshes with uniting namesake groups and # creating groups of all elements Compound2 = smesh.Concatenate([Mesh_inf, Mesh_sup], 1, 0, 1e-05, True, - name='Compound_with_UniteGrps_and_GrpsOfAllElems') + name='Compound with UniteGrps and GrpsOfAllElems') if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(True) diff --git a/doc/salome/examples/grouping_elements_ex04.py b/doc/salome/examples/grouping_elements_ex04.py index 56901320a..9beb77e36 100644 --- a/doc/salome/examples/grouping_elements_ex04.py +++ b/doc/salome/examples/grouping_elements_ex04.py @@ -27,6 +27,7 @@ print "Criterion: Area > 40, Nb = ", len(anIds) # create a group of elements with area [35; 40] by removing elements with area > 40 from group aGroup aGroup.Remove(anIds) +aGroup.SetName("35 < Area < 40") # print the result aGroupElemIDs = aGroup.GetListOfID() diff --git a/doc/salome/examples/grouping_elements_ex05.py b/doc/salome/examples/grouping_elements_ex05.py index aa526d295..46542defd 100644 --- a/doc/salome/examples/grouping_elements_ex05.py +++ b/doc/salome/examples/grouping_elements_ex05.py @@ -32,6 +32,7 @@ aGroup2.Add(anIds) # create union group : area >= 20 aGroup3 = mesh.UnionListOfGroups([aGroup1, aGroup2], "Area >= 20") +aGroup3.SetColor( SALOMEDS.Color(1.,1.,0.)); print "Criterion: Area >= 20, Nb = ", len(aGroup3.GetListOfID()) # Please note that also there is UnionGroups() method which works with two groups only @@ -45,6 +46,7 @@ print "Criterion: Area < 20, Nb = ", len(anIds) # create a group by adding elements with area < 20 aGroup4 = mesh.CreateEmptyGroup(SMESH.FACE, "Area < 20") aGroup4.Add(anIds) +aGroup4.SetColor( SALOMEDS.Color(1.,0.,0.)); # create union group : area >= 20 and area < 20 aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area") diff --git a/doc/salome/examples/grouping_elements_ex08.py b/doc/salome/examples/grouping_elements_ex08.py index c06e8e39e..f5e5b7c62 100644 --- a/doc/salome/examples/grouping_elements_ex08.py +++ b/doc/salome/examples/grouping_elements_ex08.py @@ -12,6 +12,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 100.) # create a group by adding elements with area > 100 aSrcGroup1 = mesh.GroupOnFilter(SMESH.FACE, "Area > 100", aFilter) +aSrcGroup1.SetColor( SALOMEDS.Color(1.,1.,0.)) print "Criterion: Area > 100, Nb = ", aSrcGroup1.Size() # Criterion : AREA < 30 @@ -19,6 +20,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 30.) # create a group by adding elements with area < 30 aSrcGroup2 = mesh.GroupOnFilter(SMESH.FACE, "Area < 30", aFilter) +aSrcGroup2.SetColor( SALOMEDS.Color(1.,0.,0.)) print "Criterion: Area < 30, Nb = ", aSrcGroup2.Size() diff --git a/doc/salome/gui/SMESH/images/create_group.png b/doc/salome/gui/SMESH/images/create_group.png old mode 100755 new mode 100644 index 6fc2367b3..82e8f8677 Binary files a/doc/salome/gui/SMESH/images/create_group.png and b/doc/salome/gui/SMESH/images/create_group.png differ diff --git a/doc/salome/gui/SMESH/images/cut_groups1.png b/doc/salome/gui/SMESH/images/cut_groups1.png old mode 100755 new mode 100644 index f066a5541..d78c4fe46 Binary files a/doc/salome/gui/SMESH/images/cut_groups1.png and b/doc/salome/gui/SMESH/images/cut_groups1.png differ diff --git a/doc/salome/gui/SMESH/images/cut_groups2.png b/doc/salome/gui/SMESH/images/cut_groups2.png deleted file mode 100755 index 3ec7a93d1..000000000 Binary files a/doc/salome/gui/SMESH/images/cut_groups2.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/images/cut_groups3.png b/doc/salome/gui/SMESH/images/cut_groups3.png deleted file mode 100755 index 1c5ebed80..000000000 Binary files a/doc/salome/gui/SMESH/images/cut_groups3.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/images/dimgroup_tui1.png b/doc/salome/gui/SMESH/images/dimgroup_tui1.png index a2faf39b5..91617ce81 100644 Binary files a/doc/salome/gui/SMESH/images/dimgroup_tui1.png and b/doc/salome/gui/SMESH/images/dimgroup_tui1.png differ diff --git a/doc/salome/gui/SMESH/images/dimgroup_tui2.png b/doc/salome/gui/SMESH/images/dimgroup_tui2.png deleted file mode 100644 index cb040a974..000000000 Binary files a/doc/salome/gui/SMESH/images/dimgroup_tui2.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/images/editing_groups1.png b/doc/salome/gui/SMESH/images/editing_groups1.png old mode 100755 new mode 100644 index beb946ab7..a565ed390 Binary files a/doc/salome/gui/SMESH/images/editing_groups1.png and b/doc/salome/gui/SMESH/images/editing_groups1.png differ diff --git a/doc/salome/gui/SMESH/images/editing_groups2.png b/doc/salome/gui/SMESH/images/editing_groups2.png deleted file mode 100755 index 7cff1819c..000000000 Binary files a/doc/salome/gui/SMESH/images/editing_groups2.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/images/intersect_groups1.png b/doc/salome/gui/SMESH/images/intersect_groups1.png old mode 100755 new mode 100644 index 9251b0e7a..ad2ff520b Binary files a/doc/salome/gui/SMESH/images/intersect_groups1.png and b/doc/salome/gui/SMESH/images/intersect_groups1.png differ diff --git a/doc/salome/gui/SMESH/images/intersect_groups2.png b/doc/salome/gui/SMESH/images/intersect_groups2.png deleted file mode 100755 index eeaed8da1..000000000 Binary files a/doc/salome/gui/SMESH/images/intersect_groups2.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/images/intersect_groups3.png b/doc/salome/gui/SMESH/images/intersect_groups3.png deleted file mode 100755 index 74f5c2d76..000000000 Binary files a/doc/salome/gui/SMESH/images/intersect_groups3.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/images/union_groups1.png b/doc/salome/gui/SMESH/images/union_groups1.png old mode 100755 new mode 100644 index 7b2fc7511..598c33d80 Binary files a/doc/salome/gui/SMESH/images/union_groups1.png and b/doc/salome/gui/SMESH/images/union_groups1.png differ diff --git a/doc/salome/gui/SMESH/images/union_groups2.png b/doc/salome/gui/SMESH/images/union_groups2.png deleted file mode 100755 index 980e48d41..000000000 Binary files a/doc/salome/gui/SMESH/images/union_groups2.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/images/union_groups3.png b/doc/salome/gui/SMESH/images/union_groups3.png deleted file mode 100755 index caf6bb42b..000000000 Binary files a/doc/salome/gui/SMESH/images/union_groups3.png and /dev/null differ diff --git a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc index 79b98b49d..53ad3f8a4 100644 --- a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc @@ -24,7 +24,7 @@ \tui_script{a3DmeshOnModified2Dmesh.py}
-\section tui_editing_mesh Editing a mesh +\section tui_editing_mesh Editing a mesh (i.e. changing hypotheses) \tui_script{creating_meshes_ex04.py}
diff --git a/doc/salome/gui/SMESH/input/tui_grouping_elements.doc b/doc/salome/gui/SMESH/input/tui_grouping_elements.doc index 535c47640..87a7073fb 100644 --- a/doc/salome/gui/SMESH/input/tui_grouping_elements.doc +++ b/doc/salome/gui/SMESH/input/tui_grouping_elements.doc @@ -24,47 +24,29 @@ \image html editing_groups1.png -\image html editing_groups2.png -
\section tui_union_of_groups Union of groups \tui_script{grouping_elements_ex05.py} \image html union_groups1.png -\image html union_groups2.png - -\image html union_groups3.png -
\section tui_intersection_of_groups Intersection of groups \tui_script{grouping_elements_ex06.py} \image html intersect_groups1.png -\image html intersect_groups2.png - -\image html intersect_groups3.png -
\section tui_cut_of_groups Cut of groups \tui_script{grouping_elements_ex07.py} \image html cut_groups1.png -\image html cut_groups2.png - -\image html cut_groups3.png -
-\section tui_create_dim_group Creating groups of entities from existing groups of superior dimensions +\section tui_create_dim_group Creating groups of entities basing on nodes of other groups \tui_script{grouping_elements_ex08.py} \image html dimgroup_tui1.png -
Source groups of faces
- -\image html dimgroup_tui2.png -
Result groups of edges and nodes
diff --git a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx index a86d1b295..0b54a200a 100644 --- a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx +++ b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx @@ -41,7 +41,8 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() char *file2Read = (char *)myFile.c_str(); FILE* aFileId = fopen(file2Read, "w+"); - if ( !aFileId ) { + if ( !aFileId ) + { fprintf(stderr, ">> ERREUR : ouverture du fichier %s \n", file2Read); return DRS_FAIL; } @@ -71,20 +72,23 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() ****************************************************************************/ SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator(); - while(itNodes->more()){ + while(itNodes->more()) + { const SMDS_MeshNode * node = itNodes->next(); fprintf(aFileId, "%d %.14e %.14e %.14e\n", node->GetID(), node->X(), node->Y(), node->Z()); } - + /**************************************************************************** * ECRITURE DES ELEMENTS * ****************************************************************************/ /* Ecriture des connectivites, noms, numeros des mailles */ - + SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator(); - while(itEdges->more()){ + while(itEdges->more()) + { const SMDS_MeshElement * elem = itEdges->next(); - switch (elem->NbNodes()) { + switch (elem->NbNodes()) + { case 2: fprintf(aFileId, "%d %d ", elem->GetID(), 102); break; @@ -93,33 +97,51 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() break; } SMDS_ElemIteratorPtr it=elem->nodesIterator(); - while(it->more()) + while(it->more()) fprintf(aFileId, "%d ", it->next()->GetID()); fprintf(aFileId, "\n"); } - + SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator(); - while(itFaces->more()){ + while(itFaces->more()) + { const SMDS_MeshElement * elem = itFaces->next(); if ( elem->IsPoly() ) fprintf(aFileId, "%d %d ", elem->GetID(), 400+elem->NbNodes()); else fprintf(aFileId, "%d %d ", elem->GetID(), 200+elem->NbNodes()); SMDS_ElemIteratorPtr it=elem->nodesIterator(); - while(it->more()) + while(it->more()) fprintf(aFileId, "%d ", it->next()->GetID()); fprintf(aFileId, "\n"); } SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator(); - while(itVolumes->more()){ + const SMDS_VtkVolume* v; + while(itVolumes->more()) + { const SMDS_MeshElement * elem = itVolumes->next(); if ( elem->IsPoly() ) + { fprintf(aFileId, "%d %d ", elem->GetID(), 500+elem->NbNodes()); + + if (( v = dynamic_cast< const SMDS_VtkVolume*>( elem ))) + { + std::vector quant = v->GetQuantities(); + if ( !quant.empty() ) + { + fprintf(aFileId, "%d %d ", quant.size(), quant[0]); + for ( size_t i = 1; i < quant.size(); ++i ) + fprintf(aFileId, "%d ", quant[i]); + } + } + } else + { fprintf(aFileId, "%d %d ", elem->GetID(), 300+elem->NbNodes()); + } SMDS_ElemIteratorPtr it=elem->nodesIterator(); - while(it->more()) + while(it->more()) fprintf(aFileId, "%d ", it->next()->GetID()); fprintf(aFileId, "\n"); diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index 0c7c334f2..3f1ce2d6b 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -329,7 +329,7 @@ const std::vector& StdMeshers_FaceSide::GetUVPtStruct(bool isXCons SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() ); SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() ); fHelper.SetSubShape( myFace ); - bool paramOK; + bool paramOK = true; double eps = 1e-100; // sort nodes of all edges by putting them into a map