SetMeshName(theMeshName.c_str());
myEntity = int(theEntity);//jfa IPAL9284
mySubMeshName = theFamilyName;
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+ myIsShrank = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
return Build(false);
}
throw std::runtime_error("Mesh_i::Build - GetCResult()->GetInput() == NULL !!!");
if (!theRestoring) {
myPresentType = VISU::PresentationType(VISU::GetResourceMgr()->integerValue("VISU" , "mesh_represent", 2));
+ myIsShrank = (myPresentType == VISU::SHRINK);
+
if(myEntity == VISU::NODE_ENTITY)
myPresentType = VISU::POINT;
SetName((const char*)GenerateName().toLatin1(), false);
myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
+ myIsShrank = (VISU::Storable::FindValue(theMap,"myIsShrank", "0").toInt() == 1)? true: false;
+
myCellColor.R = VISU::Storable::FindValue(theMap,"myCellColor.R").toDouble();
myCellColor.G = VISU::Storable::FindValue(theMap,"myCellColor.G").toDouble();
myCellColor.B = VISU::Storable::FindValue(theMap,"myCellColor.B").toDouble();
Storable::DataToStream( theStr, "myPresentType", int(myPresentType) );
+ Storable::DataToStream( theStr, "myIsShrank", (myIsShrank? "1":"0"));
+
Storable::DataToStream( theStr, "myCellColor.R", myCellColor.R );
Storable::DataToStream( theStr, "myCellColor.G", myCellColor.G );
Storable::DataToStream( theStr, "myCellColor.B", myCellColor.B );
try{
VISU::Prs3d_i::CreateActor(anActor);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- bool toShrink = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
- if (toShrink) anActor->SetShrink();
-
+ //bool toShrink = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
+ //if (toShrink) anActor->SetShrink();
+ if (anActor->IsShrunkable()) {
+ if (myIsShrank)
+ anActor->SetShrink();
+ else
+ anActor->UnShrink();
+ }
anActor->SetFeatureEdgesAngle( aResourceMgr->doubleValue("VISU", "feature_edges_angle", 0.0) );
anActor->SetFeatureEdgesFlags( aResourceMgr->booleanValue("VISU", "show_feature_edges", false),
aResourceMgr->booleanValue("VISU", "show_boundary_edges", false),
if(MYDEBUG) MESSAGE("Mesh_i::UpdateActor");
VISU::Prs3d_i::UpdateActor(anActor);
anActor->SetRepresentation(myPresentType);
+ if (anActor->IsShrunkable()) {
+ if (myIsShrank)
+ anActor->SetShrink();
+ else
+ anActor->UnShrink();
+ }
anActor->GetSurfaceProperty()->SetColor(myCellColor.R, myCellColor.G, myCellColor.B);
anActor->GetEdgeProperty()->SetColor(myLinkColor.R, myLinkColor.G, myLinkColor.B);
anActor->GetNodeProperty()->SetColor(myNodeColor.R, myNodeColor.G, myNodeColor.B);
}
//----------------------------------------------------------------------------
+
+
+void VISU::Mesh_i::SetShrink(CORBA::Boolean toShrink)
+{
+ if(toShrink == myIsShrank)
+ return;
+ VISU::TSetModified aModified(this);
+ myIsShrank = toShrink;
+ myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+CORBA::Boolean VISU::Mesh_i::IsShrank()
+{
+ return myIsShrank;
+}
+