Salome HOME
23562: EDF 17098 - problem with Extrusion 3D
authoreap <eap@opencascade.com>
Tue, 22 May 2018 16:12:11 +0000 (19:12 +0300)
committereap <eap@opencascade.com>
Tue, 22 May 2018 16:12:11 +0000 (19:12 +0300)
+ fix computing "Min elem size" in Mesh Info dlg

src/Controls/SMESH_Controls.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/StdMeshers/StdMeshers_Prism_3D.cxx

index 1ccd96f9905611d39a69424bcebb65a90f437dc6..7fcc948da5ef4c6789c2fdd0fe844ea5264c50ab 100644 (file)
@@ -4425,6 +4425,12 @@ bool ElementsOnShape::IsSatisfy (const SMDS_MeshElement* elem)
   return isSatisfy;
 }
 
+//================================================================================
+/*!
+ * \brief Check and optionally return a satisfying shape
+ */
+//================================================================================
+
 bool ElementsOnShape::IsSatisfy (const SMDS_MeshNode* node,
                                  TopoDS_Shape*        okShape)
 {
index 57bd8236d37d1f2a449bc0c9f72c7396260067b7..49864ab329a0e249d3a129ca90c424b20f4b4d37 100644 (file)
@@ -2083,7 +2083,9 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         afunctor->SetMesh( actor()->GetObject()->GetMesh() );
         QTreeWidgetItem* minEdgeItem = createItem( cntrItem, Bold );
         minEdgeItem->setText( 0, tr( "MIN_ELEM_EDGE" ));
-        minEdgeItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+        SMESH::Controls::TSequenceOfXYZ points;
+        afunctor->GetPoints( e, points ); // "non-standard" way, to make it work for all elem types
+        minEdgeItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( points )) );
 
         // gravity center
         XYZ gc = gravityCenter( e );
index f5807f09a192f848a28904cad3c1cbd6514297fe..80cdc5edd68542ab14ebe5a018093bfc91dded10 100644 (file)
@@ -1170,6 +1170,11 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism)
   if ( !assocOrProjBottom2Top( bottomToTopTrsf, thePrism ) ) // it also fills myBotToColumnMap
     return false;
 
+  // If all "vertical" EDGEs are straight, then all nodes of an internal node column
+  // are located on a line connecting the top node and the bottom node.
+  bool isStrightColunm = allVerticalEdgesStraight( thePrism );
+  if ( isStrightColunm )
+    myUseBlock = false;
 
   // Create nodes inside the block
 
@@ -1208,9 +1213,6 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism)
 
     myHelper->SetElementsOnShape( true );
 
-    // If all "vertical" EDGEs are straight, then all nodes of an internal node column
-    // are located on a line connecting the top node and the bottom node.
-    bool isStrightColunm = allVerticalEdgesStraight( thePrism );
     if ( !isStrightColunm )
     {
       double tol = getSweepTolerance( thePrism );