Salome HOME
Update TUI doc on groups
authoreap <eap@opencascade.com>
Mon, 23 Jan 2017 17:08:38 +0000 (20:08 +0300)
committereap <eap@opencascade.com>
Mon, 23 Jan 2017 17:08:38 +0000 (20:08 +0300)
+ Correct export of polyhedra in DAT format (to make them readable)

22 files changed:
doc/salome/examples/creating_meshes_ex07.py
doc/salome/examples/grouping_elements_ex04.py
doc/salome/examples/grouping_elements_ex05.py
doc/salome/examples/grouping_elements_ex08.py
doc/salome/gui/SMESH/images/create_group.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/cut_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/cut_groups2.png [deleted file]
doc/salome/gui/SMESH/images/cut_groups3.png [deleted file]
doc/salome/gui/SMESH/images/dimgroup_tui1.png
doc/salome/gui/SMESH/images/dimgroup_tui2.png [deleted file]
doc/salome/gui/SMESH/images/editing_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/editing_groups2.png [deleted file]
doc/salome/gui/SMESH/images/intersect_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/intersect_groups2.png [deleted file]
doc/salome/gui/SMESH/images/intersect_groups3.png [deleted file]
doc/salome/gui/SMESH/images/union_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/union_groups2.png [deleted file]
doc/salome/gui/SMESH/images/union_groups3.png [deleted file]
doc/salome/gui/SMESH/input/tui_creating_meshes.doc
doc/salome/gui/SMESH/input/tui_grouping_elements.doc
src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx
src/StdMeshers/StdMeshers_FaceSide.cxx

index acaaf5dc302834c98cb14127fc692e8c0c4e6a5d..4ddb69702ac8697566ef2d860b3353d0d890deec 100644 (file)
@@ -69,13 +69,13 @@ Ginf2=Mesh_sup.Group(Finf2, "Inf")
 
 ## create compounds
 # create a compound of two meshes with renaming namesake groups and
 
 ## 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,
 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,
 # 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)
 
 if salome.sg.hasDesktop():
     salome.sg.updateObjBrowser(True)
index 56901320a2e108cdc5882212b42745162992887b..9beb77e364512bac452ac2f5b2520bc1114ad37c 100644 (file)
@@ -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) 
 
 # 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()
 
 # print the result
 aGroupElemIDs = aGroup.GetListOfID()
index aa526d2952d7a82a7e6357cd45c7c94d89db06fc..46542defd1ac62dba7d4a68ea49ee7a4b8abdfc2 100644 (file)
@@ -32,6 +32,7 @@ aGroup2.Add(anIds)
 
 # create union group : area >= 20
 aGroup3 = mesh.UnionListOfGroups([aGroup1, aGroup2], "Area >= 20")
 
 # 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
 
 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)
 # 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")
 
 # create union group : area >= 20 and area < 20
 aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area")
index c06e8e39ecacd3739a4418e3d3554cc2d0d997db..f5e5b7c6279061e4a6a36483b11611680269ff85 100644 (file)
@@ -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)
 
 # 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
 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)
 
 # 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()
 
 
 print "Criterion: Area < 30, Nb = ", aSrcGroup2.Size()
 
 
old mode 100755 (executable)
new mode 100644 (file)
index 6fc2367..82e8f86
Binary files a/doc/salome/gui/SMESH/images/create_group.png and b/doc/salome/gui/SMESH/images/create_group.png differ
old mode 100755 (executable)
new mode 100644 (file)
index f066a55..d78c4fe
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 (executable)
index 3ec7a93..0000000
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 (executable)
index 1c5ebed..0000000
Binary files a/doc/salome/gui/SMESH/images/cut_groups3.png and /dev/null differ
index a2faf39b5066777aa293a4e994066e3f17d02485..91617ce819fbbe763422785b26966f414caac767 100644 (file)
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 (file)
index cb040a9..0000000
Binary files a/doc/salome/gui/SMESH/images/dimgroup_tui2.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index beb946a..a565ed3
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 (executable)
index 7cff181..0000000
Binary files a/doc/salome/gui/SMESH/images/editing_groups2.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index 9251b0e..ad2ff52
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 (executable)
index eeaed8d..0000000
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 (executable)
index 74f5c2d..0000000
Binary files a/doc/salome/gui/SMESH/images/intersect_groups3.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index 7b2fc75..598c33d
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 (executable)
index 980e48d..0000000
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 (executable)
index caf6bb4..0000000
Binary files a/doc/salome/gui/SMESH/images/union_groups3.png and /dev/null differ
index 79b98b49d0c4431fc27ce164aa2c3231419998d7..53ad3f8a44dd61dbe5bb2cb6a46b57ff326a54fc 100644 (file)
@@ -24,7 +24,7 @@
 \tui_script{a3DmeshOnModified2Dmesh.py}
 
 <br>
 \tui_script{a3DmeshOnModified2Dmesh.py}
 
 <br>
-\section tui_editing_mesh Editing a mesh
+\section tui_editing_mesh Editing a mesh (i.e. changing hypotheses)
 \tui_script{creating_meshes_ex04.py}
 
 <br>
 \tui_script{creating_meshes_ex04.py}
 
 <br>
index 535c47640697a323290b0493fdb79f8f559e5b0f..87a7073fbcabb5a37e22da24baf2f088ae781819 100644 (file)
 
 \image html editing_groups1.png
 
 
 \image html editing_groups1.png
 
-\image html editing_groups2.png
-
 <br>
 \section tui_union_of_groups Union of groups
 \tui_script{grouping_elements_ex05.py}
 
 \image html union_groups1.png
 
 <br>
 \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
-
 <br>
 \section tui_intersection_of_groups Intersection of groups
 \tui_script{grouping_elements_ex06.py}
 
 \image html intersect_groups1.png
 
 <br>
 \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
-
 <br>
 \section tui_cut_of_groups Cut of groups
 \tui_script{grouping_elements_ex07.py}
 
 \image html cut_groups1.png
 
 <br>
 \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
-
 <br>
 <br>
-\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
 \tui_script{grouping_elements_ex08.py}
 
 \image html dimgroup_tui1.png
-<center>Source groups of faces</center>
-
-\image html dimgroup_tui2.png
-<center>Result groups of edges and nodes</center>
 
 
 
 
 
 
index a86d1b2954c189c842503a854a0ff485098ca8d2..0b54a200a4003535ddcae40a23c6a5336e889752 100644 (file)
@@ -41,7 +41,8 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
 
   char *file2Read = (char *)myFile.c_str();
   FILE* aFileId = fopen(file2Read, "w+");
 
   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;
   }
     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();
    ****************************************************************************/
 
   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());
   }
     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 */
   /****************************************************************************
    *                       ECRITURE DES ELEMENTS                                *
    ****************************************************************************/
   /* Ecriture des connectivites, noms, numeros des mailles */
-  
+
   SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
   SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
-  while(itEdges->more()){
+  while(itEdges->more())
+  {
     const SMDS_MeshElement * elem = itEdges->next();
     const SMDS_MeshElement * elem = itEdges->next();
-    switch (elem->NbNodes()) {
+    switch (elem->NbNodes())
+    {
     case 2:
       fprintf(aFileId, "%d %d ", elem->GetID(), 102);
       break;
     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();
       break;
     }
     SMDS_ElemIteratorPtr it=elem->nodesIterator();
-    while(it->more()) 
+    while(it->more())
       fprintf(aFileId, "%d ", it->next()->GetID());
     fprintf(aFileId, "\n");
   }
       fprintf(aFileId, "%d ", it->next()->GetID());
     fprintf(aFileId, "\n");
   }
-  
+
   SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
   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();
     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();
       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() )
     const SMDS_MeshElement * elem = itVolumes->next();
     if ( elem->IsPoly() )
+    {
       fprintf(aFileId, "%d %d ", elem->GetID(), 500+elem->NbNodes());
       fprintf(aFileId, "%d %d ", elem->GetID(), 500+elem->NbNodes());
+
+      if (( v = dynamic_cast< const SMDS_VtkVolume*>( elem )))
+      {
+        std::vector<int> 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
     else
+    {
       fprintf(aFileId, "%d %d ", elem->GetID(), 300+elem->NbNodes());
       fprintf(aFileId, "%d %d ", elem->GetID(), 300+elem->NbNodes());
+    }
     SMDS_ElemIteratorPtr it=elem->nodesIterator();
     SMDS_ElemIteratorPtr it=elem->nodesIterator();
-    while(it->more()) 
+    while(it->more())
       fprintf(aFileId, "%d ", it->next()->GetID());
 
     fprintf(aFileId, "\n");
       fprintf(aFileId, "%d ", it->next()->GetID());
 
     fprintf(aFileId, "\n");
index 0c7c334f20cd7e4b1fbf33411756b737a3a01612..3f1ce2d6b416915138aca68bb9734255883a244e 100644 (file)
@@ -329,7 +329,7 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXCons
     SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() );
     SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() );
     fHelper.SetSubShape( myFace );
     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
     double eps = 1e-100;
 
     // sort nodes of all edges by putting them into a map