From e3e19dc2facbac0fd8e309ad4b43e1f679f17259 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 30 Oct 2014 19:30:46 +0300 Subject: [PATCH] 52567: Transformation operations does not work for Group of Balls Show at least points in the preview of balls --- src/SMESH/SMESH_Mesh.cxx | 3 ++- src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 8b27cba54..72d7ef193 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -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; } diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx index ef9ac22ad..7f8b060c8 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx @@ -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; -- 2.39.2