mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
21952: EDF 2383 SMESH : Add an option to write planar meshes as 3D meshes in MED files
Correct position of autoDimension in ExportMED()
This commit is contained in:
parent
9a93fe49f9
commit
25008e4a96
@ -1806,9 +1806,17 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
else if ( theCommand->MethodStartsFrom( "Export" ))
|
else if ( theCommand->MethodStartsFrom( "Export" ))
|
||||||
{
|
{
|
||||||
if ( method == "ExportToMED" || // ExportToMED() --> ExportMED()
|
if ( method == "ExportToMED" || // ExportToMED() --> ExportMED()
|
||||||
method == "ExportToMEDX" ) { // ExportToMEDX() --> ExportMED()
|
method == "ExportToMEDX" ) // ExportToMEDX() --> ExportMED()
|
||||||
|
{
|
||||||
theCommand->SetMethod( "ExportMED" );
|
theCommand->SetMethod( "ExportMED" );
|
||||||
|
if ( theCommand->GetNbArgs() == 5 )
|
||||||
|
{
|
||||||
|
// ExportToMEDX(...,autoDimension) -> ExportToMEDX(...,meshPart=None,autoDimension)
|
||||||
|
_AString autoDimension = theCommand->GetArg( 5 );
|
||||||
|
theCommand->SetArg( 5, "None" );
|
||||||
|
theCommand->SetArg( 6, autoDimension );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( method == "ExportCGNS" )
|
else if ( method == "ExportCGNS" )
|
||||||
{ // ExportCGNS(part, ...) -> ExportCGNS(..., part)
|
{ // ExportCGNS(part, ...) -> ExportCGNS(..., part)
|
||||||
@ -1833,9 +1841,9 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
|
|||||||
TCollection_AsciiString newMethod = method;
|
TCollection_AsciiString newMethod = method;
|
||||||
newMethod.Remove( 7, 6 );
|
newMethod.Remove( 7, 6 );
|
||||||
theCommand->SetMethod( newMethod );
|
theCommand->SetMethod( newMethod );
|
||||||
// make the 1st arg be the last one
|
// make the 1st arg be the last one (or last but one for ExportMED())
|
||||||
_pyID partID = theCommand->GetArg( 1 );
|
_pyID partID = theCommand->GetArg( 1 );
|
||||||
int nbArgs = theCommand->GetNbArgs();
|
int nbArgs = theCommand->GetNbArgs() - (newMethod == "ExportMED");
|
||||||
for ( int i = 2; i <= nbArgs; ++i )
|
for ( int i = 2; i <= nbArgs; ++i )
|
||||||
theCommand->SetArg( i-1, theCommand->GetArg( i ));
|
theCommand->SetArg( i-1, theCommand->GetArg( i ));
|
||||||
theCommand->SetArg( nbArgs, partID );
|
theCommand->SetArg( nbArgs, partID );
|
||||||
|
Loading…
Reference in New Issue
Block a user