aStates->IncrementState();
}
}
-
- else if(aStates->GetObjectType().IsEqual("Arithmetic1D")) {
+ // Case for Arithmetic1D or StartEndLength hypothesis
+ else if(aStates->GetObjectType().IsEqual("Arithmetic1D") ||
+ aStates->GetObjectType().IsEqual("StartEndLength")) {
if(aMethod == "SetLength" &&
aStates->GetCurrectState().size() >= 2) {
if(aCmd->GetArg(2) == "1" && !aStates->GetCurrectState().at(0).IsEmpty())
aStates->IncrementState();
}
}
+ else if(aStates->GetObjectType().IsEqual("Deflection1D")){
+ if(aMethod == "SetDeflection" && aStates->GetCurrectState().size() >= 1) {
+ if(!aStates->GetCurrectState().at(0).IsEmpty() )
+ aCmd->SetArg(1,aStates->GetCurrectState().at(0));
+ aStates->IncrementState();
+ }
+ }
// Case for LayerDistribution hypothesis (not finished yet)
else if(aStates->GetObjectType() == "LayerDistribution") {
if(aMethod == "SetLayerDistribution"){
StdMeshers._objref_StdMeshers_Arithmetic1D.SetParameters(self,parameters)
StdMeshers._objref_StdMeshers_Arithmetic1D.SetLength(self,length,isStart)
-#Registering the new proxy for LocalLength
+#Registering the new proxy for Arithmetic1D
omniORB.registerObjref(StdMeshers._objref_StdMeshers_Arithmetic1D._NP_RepositoryId, Arithmetic1D)
+
+#Wrapper class for StdMeshers_Deflection1D hypothesis
+class Deflection1D(StdMeshers._objref_StdMeshers_Deflection1D):
+
+ ## Set deflection parameter value
+ # @param deflection numerical value or name of variable from notebook
+ def SetDeflection(self, deflection):
+ deflection,parameters = ParseParameters(StdMeshers._objref_StdMeshers_Deflection1D.GetLastParameters(self),1,1,deflection)
+ StdMeshers._objref_StdMeshers_Deflection1D.SetParameters(self,parameters)
+ StdMeshers._objref_StdMeshers_Deflection1D.SetDeflection(self,deflection)
+
+#Registering the new proxy for Deflection1D
+omniORB.registerObjref(StdMeshers._objref_StdMeshers_StartEndLength._NP_RepositoryId, Deflection1D)
+
+#Wrapper class for StdMeshers_StartEndLength hypothesis
+class StartEndLength(StdMeshers._objref_StdMeshers_StartEndLength):
+
+ ## Set length parameter value
+ # @param length numerical value or name of variable from notebook
+ # @param isStart true is length is Start Length, otherwise false
+ def SetLength(self, length, isStart):
+ nb = 2
+ if isStart:
+ nb = 1
+ length,parameters = ParseParameters(StdMeshers._objref_StdMeshers_StartEndLength.GetLastParameters(self),2,nb,length)
+ StdMeshers._objref_StdMeshers_StartEndLength.SetParameters(self,parameters)
+ StdMeshers._objref_StdMeshers_StartEndLength.SetLength(self,length,isStart)
+
+#Registering the new proxy for Arithmetic1D
+omniORB.registerObjref(StdMeshers._objref_StdMeshers_StartEndLength._NP_RepositoryId, StartEndLength)
StdMeshers::StdMeshers_StartEndLength::_narrow( hypothesis() );
h->SetLength( params[0].myValue.toDouble(), true );
+ h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
h->SetLength( params[1].myValue.toDouble(), false );
+ h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
}
else if( hypType()=="Deflection1D" )
{
StdMeshers::StdMeshers_Deflection1D_var h =
StdMeshers::StdMeshers_Deflection1D::_narrow( hypothesis() );
-
+ h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
h->SetDeflection( params[0].myValue.toDouble() );
}
else if( hypType()=="AutomaticLength" )
StdMeshers::StdMeshers_StartEndLength::_narrow( hyp );
item.myName = tr( "SMESH_START_LENGTH_PARAM" );
- item.myValue = h->GetLength( true );
+
+ aVaribaleName = (aParameters->length() > 0) ? QString(aParameters[0].in()) : QString("");
+ item.isVariable = !aVaribaleName.isEmpty();
+ if(item.isVariable)
+ item.myValue = aVaribaleName;
+ else
+ item.myValue = h->GetLength( true );
p.append( item );
+
item.myName = tr( "SMESH_END_LENGTH_PARAM" );
+ aVaribaleName = (aParameters->length() > 1) ? QString(aParameters[1].in()) : QString("");
+ item.isVariable = !aVaribaleName.isEmpty();
+ if(item.isVariable)
+ item.myValue = aVaribaleName;
+ else
item.myValue = h->GetLength( false );
+
p.append( item );
}
else if( hypType()=="Deflection1D" )
{
StdMeshers::StdMeshers_Deflection1D_var h =
StdMeshers::StdMeshers_Deflection1D::_narrow( hyp );
-
+
item.myName = tr( "SMESH_DEFLECTION1D_PARAM" );
- item.myValue = h->GetDeflection();
+ aVaribaleName = (aParameters->length() > 0) ? QString(aParameters[0].in()) : QString("");
+ item.isVariable = !aVaribaleName.isEmpty();
+ if(item.isVariable)
+ item.myValue = aVaribaleName;
+ else
+ item.myValue = h->GetDeflection();
p.append( item );
}
else if( hypType()=="AutomaticLength" )