mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
Debug
This commit is contained in:
parent
37240e9d8e
commit
f3f5a55bf7
@ -1379,6 +1379,10 @@ Handle(_pyHypothesis) _pyHypothesis::NewHypothesis( const Handle(_pyCommand)& th
|
|||||||
hyp = new _pyLayerDistributionHypo( theCreationCmd );
|
hyp = new _pyLayerDistributionHypo( theCreationCmd );
|
||||||
hyp->SetConvMethodAndType( "LayerDistribution", "RadialPrism_3D");
|
hyp->SetConvMethodAndType( "LayerDistribution", "RadialPrism_3D");
|
||||||
}
|
}
|
||||||
|
else if ( hypType == "LayerDistribution2D" ) {
|
||||||
|
hyp = new _pyLayerDistributionHypo( theCreationCmd );
|
||||||
|
hyp->SetConvMethodAndType( "LayerDistribution2D", "RadialQuadrangle_1D2D");
|
||||||
|
}
|
||||||
|
|
||||||
if ( algo->IsValid() ) {
|
if ( algo->IsValid() ) {
|
||||||
return algo;
|
return algo;
|
||||||
|
@ -234,7 +234,7 @@ void SMESH_Hypothesis_i::UpdateStringAttribute()
|
|||||||
// previous implementation can be found in revision 1.12.14.8
|
// previous implementation can be found in revision 1.12.14.8
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
|
|
||||||
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetStudy( myBaseImpl->GetStudyId() );
|
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
|
||||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||||
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject( aStudy, SMESH::SMESH_Hypothesis::_narrow( _this() ) );
|
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject( aStudy, SMESH::SMESH_Hypothesis::_narrow( _this() ) );
|
||||||
if( CORBA::is_nil( aSObject ) )
|
if( CORBA::is_nil( aSObject ) )
|
||||||
|
@ -2556,7 +2556,7 @@ ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr Object,
|
|||||||
else
|
else
|
||||||
aPythonDump <<"error";
|
aPythonDump <<"error";
|
||||||
|
|
||||||
aPythonDump << " = " << this << ".ExtrusionAlongPathObjX( "
|
aPythonDump << " = " << this << ".ExtrusionAlongPathX( "
|
||||||
<< Object << ", "
|
<< Object << ", "
|
||||||
<< Path << ", "
|
<< Path << ", "
|
||||||
<< NodeStart << ", "
|
<< NodeStart << ", "
|
||||||
|
@ -3470,7 +3470,7 @@ void SMESH_Mesh_i::UpdateStringAttribute( const SALOME::StringArray& theParamete
|
|||||||
// previous implementation can be found in revision 1.23.2.7.2.2.2.6
|
// previous implementation can be found in revision 1.23.2.7.2.2.2.6
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
|
|
||||||
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetStudy( GetStudyId() );
|
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
|
||||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||||
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject( aStudy, SMESH::SMESH_Mesh::_narrow( _this() ) );
|
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject( aStudy, SMESH::SMESH_Mesh::_narrow( _this() ) );
|
||||||
if( CORBA::is_nil( aSObject ) )
|
if( CORBA::is_nil( aSObject ) )
|
||||||
|
@ -124,8 +124,8 @@ TCollection_AsciiString ObjectStates::GetObjectType() const{
|
|||||||
* \brief Constructor
|
* \brief Constructor
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
LayerDistributionStates::LayerDistributionStates():
|
LayerDistributionStates::LayerDistributionStates(TCollection_AsciiString theType):
|
||||||
ObjectStates("LayerDistribution")
|
ObjectStates(theType)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//================================================================================
|
//================================================================================
|
||||||
@ -302,7 +302,8 @@ void SMESH_NoteBook::ReplaceVariables()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Case for LayerDistribution hypothesis (not finished yet)
|
// Case for LayerDistribution hypothesis (not finished yet)
|
||||||
else if(aStates->GetObjectType() == "LayerDistribution") {
|
else if(aStates->GetObjectType() == "LayerDistribution" ||
|
||||||
|
aStates->GetObjectType() == "LayerDistribution2D") {
|
||||||
if(aMethod == "SetLayerDistribution"){
|
if(aMethod == "SetLayerDistribution"){
|
||||||
LayerDistributionStates* aLDStates = (LayerDistributionStates*)(aStates);
|
LayerDistributionStates* aLDStates = (LayerDistributionStates*)(aStates);
|
||||||
aLDStates->AddDistribution(aCmd->GetArg(1));
|
aLDStates->AddDistribution(aCmd->GetArg(1));
|
||||||
@ -732,8 +733,9 @@ void SMESH_NoteBook::InitObjectMap()
|
|||||||
if(MYDEBUG)
|
if(MYDEBUG)
|
||||||
cout<<"The object Type : "<<anObjType<<endl;
|
cout<<"The object Type : "<<anObjType<<endl;
|
||||||
ObjectStates *aState = NULL;
|
ObjectStates *aState = NULL;
|
||||||
if(anObjType == "LayerDistribution") {
|
if(anObjType == "LayerDistribution" ||
|
||||||
aState = new LayerDistributionStates();
|
anObjType == "LayerDistribution2D") {
|
||||||
|
aState = new LayerDistributionStates(anObjType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aState = new ObjectStates(anObjType);
|
aState = new ObjectStates(anObjType);
|
||||||
@ -839,11 +841,11 @@ void SMESH_NoteBook::ProcessLayerDistribution()
|
|||||||
if(aType == "LocalLength") {
|
if(aType == "LocalLength") {
|
||||||
if(aMethod == "SetLength") {
|
if(aMethod == "SetLength") {
|
||||||
SetVariable(_commands[i], aLDS[j],0,1);
|
SetVariable(_commands[i], aLDS[j],0,1);
|
||||||
aLDS[j]->IncrementState();
|
//aLDS[j]->IncrementState();
|
||||||
}
|
}
|
||||||
else if(aMethod == "SetPrecision") {
|
else if(aMethod == "SetPrecision") {
|
||||||
SetVariable(_commands[i], aLDS[j],1,1);
|
SetVariable(_commands[i], aLDS[j],1,1);
|
||||||
aLDS[j]->IncrementState();
|
//aLDS[j]->IncrementState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -851,19 +853,19 @@ void SMESH_NoteBook::ProcessLayerDistribution()
|
|||||||
else if(aType == "NumberOfSegments"){
|
else if(aType == "NumberOfSegments"){
|
||||||
if(aMethod == "SetNumberOfSegments") {
|
if(aMethod == "SetNumberOfSegments") {
|
||||||
SetVariable(_commands[i], aLDS[j],0,1);
|
SetVariable(_commands[i], aLDS[j],0,1);
|
||||||
if(aLDS[j]->GetCurrectState().size()==1)
|
//if(aLDS[j]->GetCurrectState().size()==1)
|
||||||
aLDS[j]->IncrementState();
|
// aLDS[j]->IncrementState();
|
||||||
}
|
}
|
||||||
else if (aMethod == "SetScaleFactor") {
|
else if (aMethod == "SetScaleFactor") {
|
||||||
SetVariable(_commands[i], aLDS[j],1,1);
|
SetVariable(_commands[i], aLDS[j],1,1);
|
||||||
aLDS[j]->IncrementState();
|
//aLDS[j]->IncrementState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( aType == "Deflection1D" ){
|
else if( aType == "Deflection1D" ){
|
||||||
if(aMethod == "SetDeflection"){
|
if(aMethod == "SetDeflection"){
|
||||||
SetVariable(_commands[i], aLDS[j],0,1);
|
SetVariable(_commands[i], aLDS[j],0,1);
|
||||||
aLDS[j]->IncrementState();
|
//aLDS[j]->IncrementState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Case for Arithmetic1D and StartEndLength hypothesis
|
// Case for Arithmetic1D and StartEndLength hypothesis
|
||||||
@ -871,8 +873,18 @@ void SMESH_NoteBook::ProcessLayerDistribution()
|
|||||||
if(aMethod == "SetLength") {
|
if(aMethod == "SetLength") {
|
||||||
int anArgNb = (_commands[i]->GetArg(2) == "1") ? 0 : 1;
|
int anArgNb = (_commands[i]->GetArg(2) == "1") ? 0 : 1;
|
||||||
SetVariable(_commands[i], aLDS[j],anArgNb,1);
|
SetVariable(_commands[i], aLDS[j],anArgNb,1);
|
||||||
aLDS[j]->IncrementState();
|
//aLDS[j]->IncrementState();
|
||||||
}
|
}
|
||||||
|
/* ouv: temporarily disabled (see limitation on LayerDistribution in SMESH help)
|
||||||
|
else if(aMethod == "SetStartLength"){
|
||||||
|
SetVariable(_commands[i], aLDS[j],0,1);
|
||||||
|
//aLDS[j]->IncrementState();
|
||||||
|
}
|
||||||
|
else if(aMethod == "SetEndLength"){
|
||||||
|
SetVariable(_commands[i], aLDS[j],1,1);
|
||||||
|
//aLDS[j]->IncrementState();
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class LayerDistributionStates : public ObjectStates
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TDistributionMap;
|
typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TDistributionMap;
|
||||||
LayerDistributionStates();
|
LayerDistributionStates(TCollection_AsciiString theType);
|
||||||
virtual ~LayerDistributionStates();
|
virtual ~LayerDistributionStates();
|
||||||
|
|
||||||
void AddDistribution(const TCollection_AsciiString& theDistribution);
|
void AddDistribution(const TCollection_AsciiString& theDistribution);
|
||||||
|
@ -2917,6 +2917,8 @@ class Mesh:
|
|||||||
if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
|
if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
|
RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
|
||||||
pass
|
pass
|
||||||
|
if ( isinstance( Path, Mesh )):
|
||||||
|
Path = Path.GetMesh()
|
||||||
Parameters = AnglesParameters + RefPointParameters
|
Parameters = AnglesParameters + RefPointParameters
|
||||||
geompyDC.SetParameters(self.mesh, Parameters)
|
geompyDC.SetParameters(self.mesh, Parameters)
|
||||||
|
|
||||||
@ -2929,6 +2931,7 @@ class Mesh:
|
|||||||
HasRefPoint, RefPoint, MakeGroups, ElemType)
|
HasRefPoint, RefPoint, MakeGroups, ElemType)
|
||||||
else:
|
else:
|
||||||
if isinstance(Base,Mesh):
|
if isinstance(Base,Mesh):
|
||||||
|
Base = Base.GetMesh()
|
||||||
return self.editor.ExtrusionAlongPathObjX(Base, Path, NodeStart,
|
return self.editor.ExtrusionAlongPathObjX(Base, Path, NodeStart,
|
||||||
HasAngles, Angles, LinearVariation,
|
HasAngles, Angles, LinearVariation,
|
||||||
HasRefPoint, RefPoint, MakeGroups, ElemType)
|
HasRefPoint, RefPoint, MakeGroups, ElemType)
|
||||||
@ -5172,13 +5175,24 @@ omniORB.registerObjref(StdMeshers._objref_StdMeshers_LocalLength._NP_RepositoryI
|
|||||||
class LayerDistribution(StdMeshers._objref_StdMeshers_LayerDistribution):
|
class LayerDistribution(StdMeshers._objref_StdMeshers_LayerDistribution):
|
||||||
|
|
||||||
def SetLayerDistribution(self, hypo):
|
def SetLayerDistribution(self, hypo):
|
||||||
#StdMeshers._objref_StdMeshers_LayerDistribution.SetParameters(self,hypo.GetParameters())
|
geompyDC.SetParameters(self, hypo.GetParameters())
|
||||||
#hypo.ClearParameters();
|
geompyDC.SetParameters(hypo, [])
|
||||||
StdMeshers._objref_StdMeshers_LayerDistribution.SetLayerDistribution(self,hypo)
|
StdMeshers._objref_StdMeshers_LayerDistribution.SetLayerDistribution(self,hypo)
|
||||||
|
|
||||||
#Registering the new proxy for LayerDistribution
|
#Registering the new proxy for LayerDistribution
|
||||||
omniORB.registerObjref(StdMeshers._objref_StdMeshers_LayerDistribution._NP_RepositoryId, LayerDistribution)
|
omniORB.registerObjref(StdMeshers._objref_StdMeshers_LayerDistribution._NP_RepositoryId, LayerDistribution)
|
||||||
|
|
||||||
|
#Wrapper class for StdMeshers_LayerDistribution2D hypothesis
|
||||||
|
class LayerDistribution2D(StdMeshers._objref_StdMeshers_LayerDistribution2D):
|
||||||
|
|
||||||
|
def SetLayerDistribution(self, hypo):
|
||||||
|
geompyDC.SetParameters(self, hypo.GetParameters())
|
||||||
|
geompyDC.SetParameters(hypo, [])
|
||||||
|
StdMeshers._objref_StdMeshers_LayerDistribution2D.SetLayerDistribution(self,hypo)
|
||||||
|
|
||||||
|
#Registering the new proxy for LayerDistribution
|
||||||
|
omniORB.registerObjref(StdMeshers._objref_StdMeshers_LayerDistribution2D._NP_RepositoryId, LayerDistribution2D)
|
||||||
|
|
||||||
#Wrapper class for StdMeshers_SegmentLengthAroundVertex hypothesis
|
#Wrapper class for StdMeshers_SegmentLengthAroundVertex hypothesis
|
||||||
class SegmentLengthAroundVertex(StdMeshers._objref_StdMeshers_SegmentLengthAroundVertex):
|
class SegmentLengthAroundVertex(StdMeshers._objref_StdMeshers_SegmentLengthAroundVertex):
|
||||||
|
|
||||||
|
@ -545,10 +545,13 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
||||||
|
|
||||||
h->SetLayerDistribution( w->GetHypothesis() );
|
h->SetLayerDistribution( w->GetHypothesis() );
|
||||||
/* ouv: temporarily disabled
|
|
||||||
h->SetParameters(w->GetHypothesis()->GetParameters());
|
SALOME::StringArray* aParameters = w->GetHypothesis()->GetParameters();
|
||||||
w->GetHypothesis()->ClearParameters();
|
QStringList aList;
|
||||||
*/
|
for( int i = 0; i < aParameters->length(); i++ )
|
||||||
|
aList.append( QString( aParameters->operator[](i) ) );
|
||||||
|
getNotebook()->setParameters( h, aList );
|
||||||
|
getNotebook()->setParameters( w->GetHypothesis(), QStringList() );
|
||||||
}
|
}
|
||||||
else if( hypType()=="NumberOfLayers2D" )
|
else if( hypType()=="NumberOfLayers2D" )
|
||||||
{
|
{
|
||||||
@ -566,10 +569,13 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
||||||
|
|
||||||
h->SetLayerDistribution( w->GetHypothesis() );
|
h->SetLayerDistribution( w->GetHypothesis() );
|
||||||
/* ouv: temporarily disabled
|
|
||||||
h->SetParameters(w->GetHypothesis()->GetParameters());
|
SALOME::StringArray* aParameters = w->GetHypothesis()->GetParameters();
|
||||||
w->GetHypothesis()->ClearParameters();
|
QStringList aList;
|
||||||
*/
|
for( int i = 0; i < aParameters->length(); i++ )
|
||||||
|
aList.append( QString( aParameters->operator[](i) ) );
|
||||||
|
getNotebook()->setParameters( h, aList );
|
||||||
|
getNotebook()->setParameters( w->GetHypothesis(), QStringList() );
|
||||||
}
|
}
|
||||||
else if( hypType()=="ProjectionSource1D" )
|
else if( hypType()=="ProjectionSource1D" )
|
||||||
{
|
{
|
||||||
@ -885,10 +891,8 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
|
|||||||
for(int i = 0;i<aParameters->length();i++)
|
for(int i = 0;i<aParameters->length();i++)
|
||||||
aLastVarsList.append(QString(aParameters->operator[](i)));
|
aLastVarsList.append(QString(aParameters->operator[](i)));
|
||||||
|
|
||||||
/* ouv: temporarily disabled
|
|
||||||
if(!aLastVarsList.isEmpty())
|
if(!aLastVarsList.isEmpty())
|
||||||
h->GetLayerDistribution()->SetLastParameters(aLastVarsList.join(":").toLatin1().constData());
|
getNotebook()->setParameters( h->GetLayerDistribution(), aLastVarsList );
|
||||||
*/
|
|
||||||
|
|
||||||
customWidgets()->append
|
customWidgets()->append
|
||||||
( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));
|
( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));
|
||||||
@ -913,10 +917,8 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
|
|||||||
for(int i = 0;i<aParameters->length();i++)
|
for(int i = 0;i<aParameters->length();i++)
|
||||||
aLastVarsList.append(QString(aParameters->operator[](i)));
|
aLastVarsList.append(QString(aParameters->operator[](i)));
|
||||||
|
|
||||||
/* ouv: temporarily disabled
|
|
||||||
if(!aLastVarsList.isEmpty())
|
if(!aLastVarsList.isEmpty())
|
||||||
h->GetLayerDistribution()->SetLastParameters(aLastVarsList.join(":").toLatin1().constData());
|
getNotebook()->setParameters( h->GetLayerDistribution(), aLastVarsList );
|
||||||
*/
|
|
||||||
|
|
||||||
customWidgets()->append
|
customWidgets()->append
|
||||||
( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));
|
( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));
|
||||||
|
Loading…
Reference in New Issue
Block a user