]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
52567: Transformation operations does not work for Group of Balls
authoreap <eap@opencascade.com>
Thu, 30 Oct 2014 16:30:46 +0000 (19:30 +0300)
committereap <eap@opencascade.com>
Thu, 30 Oct 2014 16:30:46 +0000 (19:30 +0300)
 Show at least points in the preview of balls

src/SMESH/SMESH_Mesh.cxx
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx

index 8b27cba540b680b93615827cc5839de99b88cd20..72d7ef193b7e9c3950ba27c43e99c3a6db75bfdb 100644 (file)
@@ -330,7 +330,8 @@ double SMESH_Mesh::GetShapeDiagonalSize(const TopoDS_Shape & aShape)
   if ( !aShape.IsNull() ) {
     Bnd_Box Box;
     GEOMUtils::PreciseBoundingBox(aShape, Box);
-    return sqrt( Box.SquareExtent() );
+    if ( !Box.IsVoid() )
+      return sqrt( Box.SquareExtent() );
   }
   return 0;
 }
index ef9ac22ad31e41cc782d610860acdbb2ec97c600..7f8b060c8dc934368925c38cac90ddda89c4424a 100644 (file)
@@ -126,8 +126,9 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType,
 {
   switch( theType ) 
   {
+  case SMDSAbs_Ball:              return VTK_VERTEX;
   case SMDSAbs_Node:              return VTK_VERTEX;
-  case SMDSAbs_Edge: 
+  case SMDSAbs_Edge:
     if( theNbNodes == 2 )         return VTK_LINE;
     else if ( theNbNodes == 3 )   return VTK_QUADRATIC_EDGE;
     else return VTK_EMPTY_CELL;