return nothingVisible;
}
-VisuGUI::CameraOrient VisuGUI::SetFitAll(VTKViewer_ViewFrame* theViewFrame){
+VisuGUI::CameraOrient VisuGUI::SetFitAll(VTKViewer_ViewFrame* theViewFrame)
+{
static float PRECISION = 0.000001;
static float DEVIATION = 600;
float XYZ_Bnd[6];
- if(ComputeVisiblePropBounds(theViewFrame,XYZ_Bnd)) return e3D;
+ if (ComputeVisiblePropBounds(theViewFrame,XYZ_Bnd)) return e3D;
float absX = XYZ_Bnd[1]-XYZ_Bnd[0];
-
+
float absY = XYZ_Bnd[3]-XYZ_Bnd[2];
-
+
float absZ = XYZ_Bnd[5]-XYZ_Bnd[4];
-
+
CameraOrient aCameraOrient = e3D;
- if(absX <= PRECISION) aCameraOrient = eFront;
- else {if(absY <= PRECISION) aCameraOrient = eLeft;
- else {if(absZ <= PRECISION) aCameraOrient = eTop;}}
-
- float dev_abs_XY = absX / absY;
- float dev_abs_YZ = absY / absZ;
- float dev_abs_XZ = absX / absZ;
- if(dev_abs_XY >= DEVIATION || 1./dev_abs_YZ >= DEVIATION) aCameraOrient = eLeft;
- else{if(1./dev_abs_XY >= DEVIATION || 1./dev_abs_XZ >= DEVIATION) aCameraOrient = eFront;
- else {if(dev_abs_XZ >= DEVIATION || dev_abs_YZ >= DEVIATION) aCameraOrient = eTop;}}
-
- switch(aCameraOrient){
+ if (absX <= PRECISION) aCameraOrient = eFront;
+ else {
+ if (absY <= PRECISION) aCameraOrient = eLeft;
+ else {
+ if (absZ <= PRECISION) aCameraOrient = eTop;
+ else {
+ // all the three dimensions exceeds precision
+ float dev_abs_XY = absX / absY;
+ float dev_abs_YZ = absY / absZ;
+ float dev_abs_XZ = absX / absZ;
+ if (dev_abs_XY >= DEVIATION || 1./dev_abs_YZ >= DEVIATION)
+ aCameraOrient = eLeft;
+ else {
+ if (1./dev_abs_XY >= DEVIATION || 1./dev_abs_XZ >= DEVIATION)
+ aCameraOrient = eFront;
+ else {
+ if (dev_abs_XZ >= DEVIATION || dev_abs_YZ >= DEVIATION)
+ aCameraOrient = eTop;
+ }
+ }
+ }
+ }
+ }
+
+ switch (aCameraOrient) {
case eFront: theViewFrame->onViewFront(); break;
case eLeft: theViewFrame->onViewLeft(); break;
case eTop: theViewFrame->onViewTop(); break;
- case e3D: theViewFrame->onViewReset(); break;
+ case e3D: theViewFrame->onViewReset(); break;
}
theViewFrame->getRenderer()->ResetCameraClippingRange();
theViewFrame->onViewFitAll();
return aCameraOrient;
}
-
+
QAD_Desktop* VisuGUI::GetDesktop(){
return QAD_Application::getDesktop() ;
}
VISU::Storable* VISU::Mesh_i::Create(const char* theMeshName, Entity theEntity, const char* theFamilyName){
myMeshName = theMeshName;
- myEntity = VISU::TEntity(theEntity);
+ //jfa PAL10147:myEntity = VISU::TEntity(theEntity);
+ myEntity = int(theEntity);//jfa PAL10147
mySubMeshName = theFamilyName;
return Build(false);
}
}
-VISU::Storable* VISU::Mesh_i::Create(const char* theMeshName, const char* theGroupName){
+VISU::Storable* VISU::Mesh_i::Create(const char* theMeshName, const char* theGroupName)
+{
myMeshName = theMeshName;
- myEntity = VISU::TEntity(-1);
+ //jfa PAL10147:myEntity = VISU::TEntity(-1);
+ myEntity = -1;//jfa PAL10147
mySubMeshName = theGroupName;
return Build(false);
}
Prs3d_i::Restore(theMap);
myMeshName = VISU::Storable::FindValue(theMap,"myMeshName").latin1();
- myEntity = (VISU::TEntity)VISU::Storable::FindValue(theMap,"myEntity").toInt();
+ //jfa PAL10147:myEntity = (VISU::TEntity)VISU::Storable::FindValue(theMap,"myEntity").toInt();
+ myEntity = VISU::Storable::FindValue(theMap,"myEntity").toInt();//jfa PAL10147
mySubMeshName = VISU::Storable::FindValue(theMap,"mySubMeshName").latin1();
myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
myNodeColor.R = myNodeColor.G = 1.0; myNodeColor.B = 1.0;
myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
}
- if(int(myEntity) >= 0)
+ //jfa PAL10147:if(int(myEntity) >= 0)
+ if(myEntity >= 0) //jfa PAL10147
if(mySubMeshName == "")
myType = VISU::TENTITY;
else
VISU_Convertor::TOutput *anOutput;
switch(myType){
case VISU::TENTITY :
- anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity);
+ //jfa PAL10147:anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity);
+ anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,(VISU::TEntity)myEntity);//jfa PAL10147
aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
VISU::TENTITY,myMeshName.c_str(),myEntity);
break;
case VISU::TFAMILY :
- anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity,mySubMeshName);
+ //jfa PAL10147:anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity,mySubMeshName);
+ anOutput = myResult->GetInput()->GetMeshOnEntity
+ (myMeshName,(VISU::TEntity)myEntity,mySubMeshName);//jfa PAL10147
aComment.sprintf("myComment=FAMILY;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s",
VISU::TFAMILY,myMeshName.c_str(),myEntity,mySubMeshName.c_str());
break;