-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
myControlsPrecision = mgr->integerValue( "SMESH", "controls_precision", -1);
- double aElem0DSize = SMESH::GetFloat("SMESH:elem0d_size",5);
- double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_size",10);
- double aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
- double aOutlineWidth = SMESH::GetFloat("SMESH:outline_width",1);
+ double aElem0DSize = SMESH::GetFloat("SMESH:elem0d_size",5);
+ double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_size",10);
+ double aBallElemScale = SMESH::GetFloat("SMESH:ball_elem_scale",1.0);
+ double aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
+ double aOutlineWidth = SMESH::GetFloat("SMESH:outline_width",1);
SMESH::LabelFont aFamilyNd = SMESH::FntTimes;
bool aBoldNd = true;
#endif
SetBallSize(aBallElemSize);
+ SetBallScale(aBallElemScale);
Set0DSize(aElem0DSize);
}
Modified();
}
-void SMESH_ActorDef::SetShrink(){
+void SMESH_ActorDef::SetShrink() {
if(!myIsShrinkable) return;
myBaseActor->SetShrink();
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
//#ifdef VTK_HAVE_POLYHEDRON
return myBallProp->GetPointSize();
}
+double SMESH_ActorDef::GetBallScale()
+{
+ return myBallActor->GetBallScale();
+}
+
+void SMESH_ActorDef::SetBallScale( double theVal )
+{
+ myBallActor->SetBallScale( theVal );
+ if(SMESH_SVTKActor* aCustom = SMESH_SVTKActor::SafeDownCast( myHighlightActor )) {
+ aCustom->SetBallScale(theVal);
+ }
+ if(SMESH_SVTKActor* aCustom = SMESH_SVTKActor::SafeDownCast( myPreHighlightActor )) {
+ aCustom->SetBallScale(theVal);
+ }
+
+ Modified();
+}
+
int SMESH_ActorDef::GetObjDimension( const int theObjId )
{
return myVisualObj->GetElemDimension( theObjId );
my3DExtActor->SetPlaneCollection( myPlaneCollection );
my3DExtActor->SetUnstructuredGrid(myVisualObj->GetUnstructuredGrid());
- Modified();
+ if(IsShrunk())
+ SetShrink();
+ else
+ Modified();
}
void