mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
Fix for issue 19964 EDF SMESH 803( Bad dump script of revolutionned mesh with groups).
This commit is contained in:
parent
8bfa9cdd5d
commit
9fe8334ee2
@ -893,6 +893,18 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
|
|||||||
sameMethods.Insert( names );
|
sameMethods.Insert( names );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// names of SMESH_MeshEditor methods which differ from methods of class Mesh
|
||||||
|
// only last two arguments
|
||||||
|
static TStringSet diffLastTwoArgsMethods;
|
||||||
|
if (diffLastTwoArgsMethods.empty() ){
|
||||||
|
const char * names[] = {
|
||||||
|
"MirrorMakeGroups","MirrorObjectMakeGroups",
|
||||||
|
"TranslateMakeGroups","TranslateObjectMakeGroups",
|
||||||
|
"RotateMakeGroups","RotateObjectMakeGroups",
|
||||||
|
""};// <- mark of the end
|
||||||
|
diffLastTwoArgsMethods.Insert( names );
|
||||||
|
}
|
||||||
|
|
||||||
if ( sameMethods.Contains( theCommand->GetMethod() )) {
|
if ( sameMethods.Contains( theCommand->GetMethod() )) {
|
||||||
theCommand->SetObject( myMesh );
|
theCommand->SetObject( myMesh );
|
||||||
|
|
||||||
@ -902,11 +914,32 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
|
|||||||
_pyMesh( new _pyCommand( theCommand->GetString(), 0 )); // for theGen->SetAccessorMethod()
|
_pyMesh( new _pyCommand( theCommand->GetString(), 0 )); // for theGen->SetAccessorMethod()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// editor creation command is needed only if any editor function is called
|
|
||||||
theGen->AddMeshAccessorMethod( theCommand ); // for *Object()
|
//Replace SMESH_MeshEditor "MakeGroups" functions on the Mesh
|
||||||
if ( !myCreationCmdStr.IsEmpty() ) {
|
//functions with the flag "theMakeGroups = True" like:
|
||||||
GetCreationCmd()->GetString() = myCreationCmdStr;
|
//SMESH_MeshEditor.CmdMakeGroups => Mesh.Cmd(...,True)
|
||||||
myCreationCmdStr.Clear();
|
int pos = theCommand->GetMethod().Search("MakeGroups");
|
||||||
|
if( pos != -1) {
|
||||||
|
// 1. Remove "MakeGroups" from the Command
|
||||||
|
TCollection_AsciiString aMethod = theCommand->GetMethod();
|
||||||
|
int nbArgsToAdd = diffLastTwoArgsMethods.Contains(aMethod) ? 2 : 1;
|
||||||
|
aMethod.Trunc(pos-1);
|
||||||
|
theCommand->SetMethod(aMethod);
|
||||||
|
|
||||||
|
// 2. Set Mesh object instead SMESH_MeshEditor
|
||||||
|
theCommand->SetObject( myMesh );
|
||||||
|
|
||||||
|
// 3. And add last "True" argument
|
||||||
|
while(nbArgsToAdd--)
|
||||||
|
theCommand->SetArg(theCommand->GetNbArgs()+1,"True ");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// editor creation command is needed only if any editor function is called
|
||||||
|
theGen->AddMeshAccessorMethod( theCommand ); // for *Object()
|
||||||
|
if ( !myCreationCmdStr.IsEmpty() ) {
|
||||||
|
GetCreationCmd()->GetString() = myCreationCmdStr;
|
||||||
|
myCreationCmdStr.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -296,6 +296,24 @@ namespace SMESH
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups * theList){
|
||||||
|
if(theList && theList->length() > 0 ) {
|
||||||
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
|
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
|
||||||
|
myStream << "[";
|
||||||
|
int aListLen = theList->length();
|
||||||
|
for(int i = 0 ; i < aListLen; i++){
|
||||||
|
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,(*theList)[i]);
|
||||||
|
if(!aSObject->_is_nil()) {
|
||||||
|
myStream << aSObject->GetID();
|
||||||
|
i < (aListLen - 1) ? myStream<<", " : myStream<<"]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
TCollection_AsciiString myLongStringStart( "TPythonDump::LongStringStart" );
|
TCollection_AsciiString myLongStringStart( "TPythonDump::LongStringStart" );
|
||||||
TCollection_AsciiString myLongStringEnd ( "TPythonDump::LongStringEnd" );
|
TCollection_AsciiString myLongStringEnd ( "TPythonDump::LongStringEnd" );
|
||||||
|
|
||||||
|
@ -1429,21 +1429,24 @@ SMESH_MeshEditor_i::RotationSweepMakeGroups(const SMESH::long_array& theIDsOfEle
|
|||||||
CORBA::Long theNbOfSteps,
|
CORBA::Long theNbOfSteps,
|
||||||
CORBA::Double theTolerance)
|
CORBA::Double theTolerance)
|
||||||
{
|
{
|
||||||
|
SMESH::ListOfGroups *aGroups = rotationSweep(theIDsOfElements,
|
||||||
|
theAxis,
|
||||||
|
theAngleInRadians,
|
||||||
|
theNbOfSteps,
|
||||||
|
theTolerance,
|
||||||
|
true);
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "axis = " << theAxis;
|
TPythonDump()<< "axis = " << theAxis;
|
||||||
TPythonDump() << this << ".RotationSweepMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theIDsOfElements
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
<< ", axis, "
|
aPythonDump<< this << ".RotationSweepMakeGroups( "
|
||||||
<< theAngleInRadians << ", "
|
<< theIDsOfElements
|
||||||
<< theNbOfSteps << ", "
|
<< ", axis, "
|
||||||
<< theTolerance << " )";
|
<< theAngleInRadians << ", "
|
||||||
|
<< theNbOfSteps << ", "
|
||||||
|
<< theTolerance << " )";
|
||||||
}
|
}
|
||||||
return rotationSweep(theIDsOfElements,
|
return aGroups;
|
||||||
theAxis,
|
|
||||||
theAngleInRadians,
|
|
||||||
theNbOfSteps,
|
|
||||||
theTolerance,
|
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -1487,22 +1490,25 @@ SMESH_MeshEditor_i::RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr theO
|
|||||||
CORBA::Long theNbOfSteps,
|
CORBA::Long theNbOfSteps,
|
||||||
CORBA::Double theTolerance)
|
CORBA::Double theTolerance)
|
||||||
{
|
{
|
||||||
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
|
SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId,
|
||||||
|
theAxis,
|
||||||
|
theAngleInRadians,
|
||||||
|
theNbOfSteps,
|
||||||
|
theTolerance,
|
||||||
|
true);
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "axis = " << theAxis;
|
TPythonDump() << "axis = " << theAxis;
|
||||||
TPythonDump() << this << ".RotationSweepObjectMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theObject
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
<< ", axis, "
|
aPythonDump<< this << ".RotationSweepObjectMakeGroups( "
|
||||||
<< theAngleInRadians << ", "
|
<< theObject
|
||||||
<< theNbOfSteps << ", "
|
<< ", axis, "
|
||||||
<< theTolerance << " )";
|
<< theAngleInRadians << ", "
|
||||||
|
<< theNbOfSteps << ", "
|
||||||
|
<< theTolerance << " )";
|
||||||
}
|
}
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
return aGroups;
|
||||||
return rotationSweep(anElementsId,
|
|
||||||
theAxis,
|
|
||||||
theAngleInRadians,
|
|
||||||
theNbOfSteps,
|
|
||||||
theTolerance,
|
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1628,12 +1634,16 @@ SMESH_MeshEditor_i::ExtrusionSweepMakeGroups(const SMESH::long_array& theIDsOfEl
|
|||||||
const SMESH::DirStruct& theStepVector,
|
const SMESH::DirStruct& theStepVector,
|
||||||
CORBA::Long theNbOfSteps)
|
CORBA::Long theNbOfSteps)
|
||||||
{
|
{
|
||||||
|
SMESH::ListOfGroups* aGroups = extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, true );
|
||||||
|
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "stepVector = " << theStepVector;
|
TPythonDump() << "stepVector = " << theStepVector;
|
||||||
TPythonDump() << this << ".ExtrusionSweepMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theIDsOfElements << ", stepVector, " << theNbOfSteps << " )";
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
|
aPythonDump << this << ".ExtrusionSweepMakeGroups( "
|
||||||
|
<< theIDsOfElements << ", stepVector, " << theNbOfSteps << " )";
|
||||||
}
|
}
|
||||||
return extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, true );
|
return aGroups;
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ExtrusionSweepObjectMakeGroups
|
//function : ExtrusionSweepObjectMakeGroups
|
||||||
@ -1645,13 +1655,17 @@ SMESH_MeshEditor_i::ExtrusionSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr the
|
|||||||
const SMESH::DirStruct& theStepVector,
|
const SMESH::DirStruct& theStepVector,
|
||||||
CORBA::Long theNbOfSteps)
|
CORBA::Long theNbOfSteps)
|
||||||
{
|
{
|
||||||
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
|
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true );
|
||||||
|
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "stepVector = " << theStepVector;
|
TPythonDump() << "stepVector = " << theStepVector;
|
||||||
TPythonDump() << this << ".ExtrusionSweepObjectMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theObject << ", stepVector, " << theNbOfSteps << " )";
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
|
aPythonDump<< this << ".ExtrusionSweepObjectMakeGroups( "
|
||||||
|
<< theObject << ", stepVector, " << theNbOfSteps << " )";
|
||||||
}
|
}
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
return aGroups;
|
||||||
return extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -1664,13 +1678,16 @@ SMESH_MeshEditor_i::ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr t
|
|||||||
const SMESH::DirStruct& theStepVector,
|
const SMESH::DirStruct& theStepVector,
|
||||||
CORBA::Long theNbOfSteps)
|
CORBA::Long theNbOfSteps)
|
||||||
{
|
{
|
||||||
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
|
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Edge );
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "stepVector = " << theStepVector;
|
TPythonDump() << "stepVector = " << theStepVector;
|
||||||
TPythonDump() << this << ".ExtrusionSweepObject1DMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theObject << ", stepVector, " << theNbOfSteps << " )";
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
|
aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( "
|
||||||
|
<< theObject << ", stepVector, " << theNbOfSteps << " )";
|
||||||
}
|
}
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
return aGroups;
|
||||||
return extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Edge );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -1683,13 +1700,16 @@ SMESH_MeshEditor_i::ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr t
|
|||||||
const SMESH::DirStruct& theStepVector,
|
const SMESH::DirStruct& theStepVector,
|
||||||
CORBA::Long theNbOfSteps)
|
CORBA::Long theNbOfSteps)
|
||||||
{
|
{
|
||||||
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
|
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Face );
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "stepVector = " << theStepVector;
|
TPythonDump() << "stepVector = " << theStepVector;
|
||||||
TPythonDump() << this << ".ExtrusionSweepObject2DMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theObject << ", stepVector, " << theNbOfSteps << " )";
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
|
aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( "
|
||||||
|
<< theObject << ", stepVector, " << theNbOfSteps << " )";
|
||||||
}
|
}
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
return aGroups;
|
||||||
return extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Face );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1764,21 +1784,25 @@ SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsO
|
|||||||
CORBA::Long theExtrFlags,
|
CORBA::Long theExtrFlags,
|
||||||
CORBA::Double theSewTolerance)
|
CORBA::Double theSewTolerance)
|
||||||
{
|
{
|
||||||
|
SMESH::ListOfGroups * aGroups = advancedExtrusion( theIDsOfElements,
|
||||||
|
theStepVector,
|
||||||
|
theNbOfSteps,
|
||||||
|
theExtrFlags,
|
||||||
|
theSewTolerance,
|
||||||
|
true);
|
||||||
|
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "stepVector = " << theStepVector;
|
TPythonDump() << "stepVector = " << theStepVector;
|
||||||
TPythonDump() << this << ".AdvancedExtrusionMakeGroups("
|
TPythonDump aPythonDump;
|
||||||
<< theIDsOfElements
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
<< ", stepVector, "
|
aPythonDump << this << ".AdvancedExtrusionMakeGroups("
|
||||||
<< theNbOfSteps << ","
|
<< theIDsOfElements
|
||||||
<< theExtrFlags << ", "
|
<< ", stepVector, "
|
||||||
<< theSewTolerance << " )";
|
<< theNbOfSteps << ","
|
||||||
|
<< theExtrFlags << ", "
|
||||||
|
<< theSewTolerance << " )";
|
||||||
}
|
}
|
||||||
return advancedExtrusion( theIDsOfElements,
|
return aGroups;
|
||||||
theStepVector,
|
|
||||||
theNbOfSteps,
|
|
||||||
theExtrFlags,
|
|
||||||
theSewTolerance,
|
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1990,6 +2014,16 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theI
|
|||||||
const SMESH::PointStruct& theRefPoint,
|
const SMESH::PointStruct& theRefPoint,
|
||||||
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
||||||
{
|
{
|
||||||
|
SMESH::ListOfGroups * aGroups = extrusionAlongPath( theIDsOfElements,
|
||||||
|
thePathMesh,
|
||||||
|
thePathShape,
|
||||||
|
theNodeStart,
|
||||||
|
theHasAngles,
|
||||||
|
theAngles,
|
||||||
|
theHasRefPoint,
|
||||||
|
theRefPoint,
|
||||||
|
true,
|
||||||
|
Error);
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "rotAngles = " << theAngles;
|
TPythonDump() << "rotAngles = " << theAngles;
|
||||||
|
|
||||||
@ -2001,25 +2035,26 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theI
|
|||||||
else
|
else
|
||||||
TPythonDump() << "refPoint = SMESH.PointStruct( 0,0,0 )";
|
TPythonDump() << "refPoint = SMESH.PointStruct( 0,0,0 )";
|
||||||
|
|
||||||
TPythonDump() << "groups = " << this << ".ExtrusionAlongPathMakeGroups( "
|
bool isDumpGroups = aGroups && aGroups->length() > 0;
|
||||||
<< theIDsOfElements << ", "
|
TPythonDump aPythonDump;
|
||||||
<< thePathMesh << ", "
|
if(isDumpGroups) {
|
||||||
<< thePathShape << ", "
|
aPythonDump << "("<<aGroups;
|
||||||
<< theNodeStart << ", "
|
}
|
||||||
<< theHasAngles << ", "
|
if(isDumpGroups)
|
||||||
<< "rotAngles" << ", "
|
aPythonDump << ", error)";
|
||||||
<< theHasRefPoint << ", refPoint )";
|
else
|
||||||
|
aPythonDump <<"error";
|
||||||
|
|
||||||
|
aPythonDump<<" = "<< this << ".ExtrusionAlongPathMakeGroups( "
|
||||||
|
<< theIDsOfElements << ", "
|
||||||
|
<< thePathMesh << ", "
|
||||||
|
<< thePathShape << ", "
|
||||||
|
<< theNodeStart << ", "
|
||||||
|
<< theHasAngles << ", "
|
||||||
|
<< "rotAngles" << ", "
|
||||||
|
<< theHasRefPoint << ", refPoint )";
|
||||||
}
|
}
|
||||||
return extrusionAlongPath( theIDsOfElements,
|
return aGroups;
|
||||||
thePathMesh,
|
|
||||||
thePathShape,
|
|
||||||
theNodeStart,
|
|
||||||
theHasAngles,
|
|
||||||
theAngles,
|
|
||||||
theHasRefPoint,
|
|
||||||
theRefPoint,
|
|
||||||
true,
|
|
||||||
Error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -2038,6 +2073,18 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
|||||||
const SMESH::PointStruct& theRefPoint,
|
const SMESH::PointStruct& theRefPoint,
|
||||||
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
||||||
{
|
{
|
||||||
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
|
SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId,
|
||||||
|
thePathMesh,
|
||||||
|
thePathShape,
|
||||||
|
theNodeStart,
|
||||||
|
theHasAngles,
|
||||||
|
theAngles,
|
||||||
|
theHasRefPoint,
|
||||||
|
theRefPoint,
|
||||||
|
true,
|
||||||
|
Error);
|
||||||
|
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "rotAngles = " << theAngles;
|
TPythonDump() << "rotAngles = " << theAngles;
|
||||||
|
|
||||||
@ -2049,26 +2096,26 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
|||||||
else
|
else
|
||||||
TPythonDump() << "refPoint = SMESH.PointStruct( 0,0,0 )";
|
TPythonDump() << "refPoint = SMESH.PointStruct( 0,0,0 )";
|
||||||
|
|
||||||
TPythonDump() << "groups = " << this << ".ExtrusionAlongPathObjectMakeGroups( "
|
bool isDumpGroups = aGroups && aGroups->length() > 0;
|
||||||
<< theObject << ", "
|
TPythonDump aPythonDump;
|
||||||
<< thePathMesh << ", "
|
if(isDumpGroups) {
|
||||||
<< thePathShape << ", "
|
aPythonDump << "("<<aGroups;
|
||||||
<< theNodeStart << ", "
|
}
|
||||||
<< theHasAngles << ", "
|
if(isDumpGroups)
|
||||||
<< "rotAngles" << ", "
|
aPythonDump << ", error)";
|
||||||
<< theHasRefPoint << ", refPoint )";
|
else
|
||||||
|
aPythonDump <<"error";
|
||||||
|
|
||||||
|
aPythonDump << " = " << this << ".ExtrusionAlongPathObjectMakeGroups( "
|
||||||
|
<< theObject << ", "
|
||||||
|
<< thePathMesh << ", "
|
||||||
|
<< thePathShape << ", "
|
||||||
|
<< theNodeStart << ", "
|
||||||
|
<< theHasAngles << ", "
|
||||||
|
<< "rotAngles" << ", "
|
||||||
|
<< theHasRefPoint << ", refPoint )";
|
||||||
}
|
}
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
return aGroups;
|
||||||
return extrusionAlongPath( anElementsId,
|
|
||||||
thePathMesh,
|
|
||||||
thePathShape,
|
|
||||||
theNodeStart,
|
|
||||||
theHasAngles,
|
|
||||||
theAngles,
|
|
||||||
theHasRefPoint,
|
|
||||||
theRefPoint,
|
|
||||||
true,
|
|
||||||
Error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
@ -2238,13 +2285,16 @@ SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsO
|
|||||||
const SMESH::AxisStruct& theMirror,
|
const SMESH::AxisStruct& theMirror,
|
||||||
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
|
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
|
||||||
{
|
{
|
||||||
|
SMESH::ListOfGroups * aGroups = mirror(theIDsOfElements, theMirror, theMirrorType, true, true);
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << this << ".MirrorMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theIDsOfElements << ", "
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
<< theMirror << ", "
|
aPythonDump << this << ".MirrorMakeGroups( "
|
||||||
<< mirrorTypeName(theMirrorType) << " )";
|
<< theIDsOfElements << ", "
|
||||||
|
<< theMirror << ", "
|
||||||
|
<< mirrorTypeName(theMirrorType) << " )";
|
||||||
}
|
}
|
||||||
return mirror(theIDsOfElements, theMirror, theMirrorType, true, true);
|
return aGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -2257,14 +2307,17 @@ SMESH_MeshEditor_i::MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr t
|
|||||||
const SMESH::AxisStruct& theMirror,
|
const SMESH::AxisStruct& theMirror,
|
||||||
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
|
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
|
||||||
{
|
{
|
||||||
if ( !myPreviewMode ) {
|
|
||||||
TPythonDump() << this << ".MirrorObjectMakeGroups( "
|
|
||||||
<< theObject << ", "
|
|
||||||
<< theMirror << ", "
|
|
||||||
<< mirrorTypeName(theMirrorType) << " )";
|
|
||||||
}
|
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
return mirror(anElementsId, theMirror, theMirrorType, true, true);
|
SMESH::ListOfGroups * aGroups = mirror(anElementsId, theMirror, theMirrorType, true, true);
|
||||||
|
if ( !myPreviewMode ) {
|
||||||
|
TPythonDump aPythonDump;
|
||||||
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
|
aPythonDump << this << ".MirrorObjectMakeGroups( "
|
||||||
|
<< theObject << ", "
|
||||||
|
<< theMirror << ", "
|
||||||
|
<< mirrorTypeName(theMirrorType) << " )";
|
||||||
|
}
|
||||||
|
return aGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -2279,24 +2332,35 @@ SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array& theIDsOfE
|
|||||||
CORBA::Boolean theCopyGroups,
|
CORBA::Boolean theCopyGroups,
|
||||||
const char* theMeshName)
|
const char* theMeshName)
|
||||||
{
|
{
|
||||||
TPythonDump pydump; // to prevent dump at mesh creation
|
SMESH_Mesh_i* mesh_i;
|
||||||
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
|
{ // open new scope to dump "MakeMesh" command
|
||||||
|
// and then "GetGroups" using SMESH_Mesh::GetGroups()
|
||||||
|
|
||||||
SMESH::SMESH_Mesh_var mesh = makeMesh( theMeshName );
|
TPythonDump pydump; // to prevent dump at mesh creation
|
||||||
if ( SMESH_Mesh_i* mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh ))
|
|
||||||
{
|
mesh = makeMesh( theMeshName );
|
||||||
mirror(theIDsOfElements, theMirror, theMirrorType,
|
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||||
false, theCopyGroups, & mesh_i->GetImpl());
|
if (mesh_i) {
|
||||||
mesh_i->CreateGroupServants();
|
mirror(theIDsOfElements, theMirror, theMirrorType,
|
||||||
|
false, theCopyGroups, & mesh_i->GetImpl());
|
||||||
|
mesh_i->CreateGroupServants();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !myPreviewMode ) {
|
||||||
|
pydump << mesh << " = " << this << ".MirrorMakeMesh( "
|
||||||
|
<< theIDsOfElements << ", "
|
||||||
|
<< theMirror << ", "
|
||||||
|
<< mirrorTypeName(theMirrorType) << ", "
|
||||||
|
<< theCopyGroups << ", '"
|
||||||
|
<< theMeshName << "' )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !myPreviewMode ) {
|
//dump "GetGroups"
|
||||||
pydump << mesh << " = " << this << ".MirrorMakeMesh( "
|
if(!myPreviewMode && mesh_i)
|
||||||
<< theIDsOfElements << ", "
|
mesh_i->GetGroups();
|
||||||
<< theMirror << ", "
|
|
||||||
<< mirrorTypeName(theMirrorType) << ", "
|
|
||||||
<< theCopyGroups << ", '"
|
|
||||||
<< theMeshName << "' )";
|
|
||||||
}
|
|
||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2312,24 +2376,36 @@ SMESH_MeshEditor_i::MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr the
|
|||||||
CORBA::Boolean theCopyGroups,
|
CORBA::Boolean theCopyGroups,
|
||||||
const char* theMeshName)
|
const char* theMeshName)
|
||||||
{
|
{
|
||||||
TPythonDump pydump; // to prevent dump at mesh creation
|
SMESH_Mesh_i* mesh_i;
|
||||||
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
|
{ // open new scope to dump "MakeMesh" command
|
||||||
|
// and then "GetGroups" using SMESH_Mesh::GetGroups()
|
||||||
|
|
||||||
SMESH::SMESH_Mesh_var mesh = makeMesh( theMeshName );
|
TPythonDump pydump; // to prevent dump at mesh creation
|
||||||
if ( SMESH_Mesh_i* mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh ))
|
|
||||||
{
|
mesh = makeMesh( theMeshName );
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||||
mirror(anElementsId, theMirror, theMirrorType,
|
if ( mesh_i ) {
|
||||||
false, theCopyGroups, & mesh_i->GetImpl());
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
mesh_i->CreateGroupServants();
|
mirror(anElementsId, theMirror, theMirrorType,
|
||||||
}
|
false, theCopyGroups, & mesh_i->GetImpl());
|
||||||
if ( !myPreviewMode ) {
|
mesh_i->CreateGroupServants();
|
||||||
pydump << mesh << " = " << this << ".MirrorObjectMakeMesh( "
|
}
|
||||||
<< theObject << ", "
|
|
||||||
<< theMirror << ", "
|
if ( !myPreviewMode ) {
|
||||||
<< mirrorTypeName(theMirrorType) << ", "
|
pydump << mesh << " = " << this << ".MirrorObjectMakeMesh( "
|
||||||
<< theCopyGroups << ", '"
|
<< theObject << ", "
|
||||||
<< theMeshName << "' )";
|
<< theMirror << ", "
|
||||||
|
<< mirrorTypeName(theMirrorType) << ", "
|
||||||
|
<< theCopyGroups << ", '"
|
||||||
|
<< theMeshName << "' )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dump "GetGroups"
|
||||||
|
if(!myPreviewMode && mesh_i)
|
||||||
|
mesh_i->GetGroups();
|
||||||
|
|
||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2417,13 +2493,16 @@ SMESH::ListOfGroups*
|
|||||||
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements,
|
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements,
|
||||||
const SMESH::DirStruct& theVector)
|
const SMESH::DirStruct& theVector)
|
||||||
{
|
{
|
||||||
|
SMESH::ListOfGroups * aGroups = translate(theIDsOfElements,theVector,true,true);
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "vector = " << theVector;
|
TPythonDump() << "vector = " << theVector;
|
||||||
TPythonDump() << this << ".TranslateMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theIDsOfElements
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
<< ", vector )";
|
aPythonDump << this << ".TranslateMakeGroups( "
|
||||||
|
<< theIDsOfElements
|
||||||
|
<< ", vector )";
|
||||||
}
|
}
|
||||||
return translate(theIDsOfElements,theVector,true,true);
|
return aGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -2435,14 +2514,19 @@ SMESH::ListOfGroups*
|
|||||||
SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||||
const SMESH::DirStruct& theVector)
|
const SMESH::DirStruct& theVector)
|
||||||
{
|
{
|
||||||
if ( !myPreviewMode ) {
|
|
||||||
TPythonDump() << "vector = " << theVector;
|
|
||||||
TPythonDump() << this << ".TranslateObjectMakeGroups( "
|
|
||||||
<< theObject
|
|
||||||
<< ", vector )";
|
|
||||||
}
|
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
return translate(anElementsId, theVector, true, true);
|
SMESH::ListOfGroups * aGroups = translate(anElementsId, theVector, true, true);
|
||||||
|
|
||||||
|
if ( !myPreviewMode ) {
|
||||||
|
|
||||||
|
TPythonDump() << "vector = " << theVector;
|
||||||
|
TPythonDump aPythonDump;
|
||||||
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
|
aPythonDump << this << ".TranslateObjectMakeGroups( "
|
||||||
|
<< theObject
|
||||||
|
<< ", vector )";
|
||||||
|
}
|
||||||
|
return aGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -2456,21 +2540,36 @@ SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::long_array& theIDsOfElements,
|
|||||||
CORBA::Boolean theCopyGroups,
|
CORBA::Boolean theCopyGroups,
|
||||||
const char* theMeshName)
|
const char* theMeshName)
|
||||||
{
|
{
|
||||||
TPythonDump pydump; // to prevent dump at mesh creation
|
SMESH_Mesh_i* mesh_i;
|
||||||
SMESH::SMESH_Mesh_var mesh = makeMesh( theMeshName );
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
|
|
||||||
if ( SMESH_Mesh_i* mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh )) {
|
{ // open new scope to dump "MakeMesh" command
|
||||||
translate(theIDsOfElements, theVector,
|
// and then "GetGroups" using SMESH_Mesh::GetGroups()
|
||||||
false, theCopyGroups, & mesh_i->GetImpl());
|
|
||||||
mesh_i->CreateGroupServants();
|
TPythonDump pydump; // to prevent dump at mesh creation
|
||||||
}
|
|
||||||
if ( !myPreviewMode ) {
|
mesh = makeMesh( theMeshName );
|
||||||
pydump << mesh << " = " << this << ".TranslateMakeMesh( "
|
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||||
<< theIDsOfElements << ", "
|
|
||||||
<< theVector << ", "
|
if ( mesh_i ) {
|
||||||
<< theCopyGroups << ", '"
|
translate(theIDsOfElements, theVector,
|
||||||
<< theMeshName << "' )";
|
false, theCopyGroups, & mesh_i->GetImpl());
|
||||||
|
mesh_i->CreateGroupServants();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !myPreviewMode ) {
|
||||||
|
pydump << mesh << " = " << this << ".TranslateMakeMesh( "
|
||||||
|
<< theIDsOfElements << ", "
|
||||||
|
<< theVector << ", "
|
||||||
|
<< theCopyGroups << ", '"
|
||||||
|
<< theMeshName << "' )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dump "GetGroups"
|
||||||
|
if(!myPreviewMode && mesh_i)
|
||||||
|
mesh_i->GetGroups();
|
||||||
|
|
||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2485,22 +2584,34 @@ SMESH_MeshEditor_i::TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
|
|||||||
CORBA::Boolean theCopyGroups,
|
CORBA::Boolean theCopyGroups,
|
||||||
const char* theMeshName)
|
const char* theMeshName)
|
||||||
{
|
{
|
||||||
TPythonDump pydump; // to prevent dump at mesh creation
|
SMESH_Mesh_i* mesh_i;
|
||||||
SMESH::SMESH_Mesh_var mesh = makeMesh( theMeshName );
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
|
{ // open new scope to dump "MakeMesh" command
|
||||||
|
// and then "GetGroups" using SMESH_Mesh::GetGroups()
|
||||||
|
|
||||||
if ( SMESH_Mesh_i* mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh )) {
|
TPythonDump pydump; // to prevent dump at mesh creation
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
mesh = makeMesh( theMeshName );
|
||||||
translate(anElementsId, theVector,
|
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||||
false, theCopyGroups, & mesh_i->GetImpl());
|
|
||||||
mesh_i->CreateGroupServants();
|
if ( mesh_i ) {
|
||||||
}
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
if ( !myPreviewMode ) {
|
translate(anElementsId, theVector,
|
||||||
pydump << mesh << " = " << this << ".TranslateObjectMakeMesh( "
|
false, theCopyGroups, & mesh_i->GetImpl());
|
||||||
<< theObject << ", "
|
mesh_i->CreateGroupServants();
|
||||||
<< theVector << ", "
|
}
|
||||||
<< theCopyGroups << ", '"
|
if ( !myPreviewMode ) {
|
||||||
<< theMeshName << "' )";
|
pydump << mesh << " = " << this << ".TranslateObjectMakeMesh( "
|
||||||
|
<< theObject << ", "
|
||||||
|
<< theVector << ", "
|
||||||
|
<< theCopyGroups << ", '"
|
||||||
|
<< theMeshName << "' )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dump "GetGroups"
|
||||||
|
if(!myPreviewMode && mesh_i)
|
||||||
|
mesh_i->GetGroups();
|
||||||
|
|
||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2599,14 +2710,17 @@ SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements,
|
|||||||
const SMESH::AxisStruct& theAxis,
|
const SMESH::AxisStruct& theAxis,
|
||||||
CORBA::Double theAngle)
|
CORBA::Double theAngle)
|
||||||
{
|
{
|
||||||
|
SMESH::ListOfGroups * aGroups = rotate(theIDsOfElements,theAxis,theAngle,true,true);
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "axis = " << theAxis;
|
TPythonDump() << "axis = " << theAxis;
|
||||||
TPythonDump() << this << ".RotateMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
<< theIDsOfElements
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
<< ", axis, "
|
aPythonDump << this << ".RotateMakeGroups( "
|
||||||
<< theAngle << " )";
|
<< theIDsOfElements
|
||||||
|
<< ", axis, "
|
||||||
|
<< theAngle << " )";
|
||||||
}
|
}
|
||||||
return rotate(theIDsOfElements,theAxis,theAngle,true,true);
|
return aGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -2619,15 +2733,19 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
|||||||
const SMESH::AxisStruct& theAxis,
|
const SMESH::AxisStruct& theAxis,
|
||||||
CORBA::Double theAngle)
|
CORBA::Double theAngle)
|
||||||
{
|
{
|
||||||
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
|
SMESH::ListOfGroups * aGroups = rotate(anElementsId,theAxis,theAngle,true,true);
|
||||||
|
|
||||||
if ( !myPreviewMode ) {
|
if ( !myPreviewMode ) {
|
||||||
TPythonDump() << "axis = " << theAxis;
|
TPythonDump() << "axis = " << theAxis;
|
||||||
TPythonDump() << this << ".RotateObjectMakeGroups( "
|
TPythonDump aPythonDump;
|
||||||
|
DumpGroupsList(aPythonDump,aGroups);
|
||||||
|
aPythonDump << this << ".RotateObjectMakeGroups( "
|
||||||
<< theObject
|
<< theObject
|
||||||
<< ", axis, "
|
<< ", axis, "
|
||||||
<< theAngle << " )";
|
<< theAngle << " )";
|
||||||
}
|
}
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
return aGroups;
|
||||||
return rotate(anElementsId,theAxis,theAngle,true,true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -2642,22 +2760,36 @@ SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements,
|
|||||||
CORBA::Boolean theCopyGroups,
|
CORBA::Boolean theCopyGroups,
|
||||||
const char* theMeshName)
|
const char* theMeshName)
|
||||||
{
|
{
|
||||||
TPythonDump pydump; // to prevent dump at mesh creation
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
SMESH::SMESH_Mesh_var mesh = makeMesh( theMeshName );
|
SMESH_Mesh_i* mesh_i;
|
||||||
|
|
||||||
if ( SMESH_Mesh_i* mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh )) {
|
{ // open new scope to dump "MakeMesh" command
|
||||||
rotate(theIDsOfElements, theAxis, theAngleInRadians,
|
// and then "GetGroups" using SMESH_Mesh::GetGroups()
|
||||||
false, theCopyGroups, & mesh_i->GetImpl());
|
|
||||||
mesh_i->CreateGroupServants();
|
TPythonDump pydump; // to prevent dump at mesh creation
|
||||||
}
|
|
||||||
if ( !myPreviewMode ) {
|
mesh = makeMesh( theMeshName );
|
||||||
pydump << mesh << " = " << this << ".RotateMakeMesh( "
|
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||||
<< theIDsOfElements << ", "
|
|
||||||
<< theAxis << ", "
|
if ( mesh_i ) {
|
||||||
<< theAngleInRadians << ", "
|
rotate(theIDsOfElements, theAxis, theAngleInRadians,
|
||||||
<< theCopyGroups << ", '"
|
false, theCopyGroups, & mesh_i->GetImpl());
|
||||||
<< theMeshName << "' )";
|
mesh_i->CreateGroupServants();
|
||||||
|
}
|
||||||
|
if ( !myPreviewMode ) {
|
||||||
|
pydump << mesh << " = " << this << ".RotateMakeMesh( "
|
||||||
|
<< theIDsOfElements << ", "
|
||||||
|
<< theAxis << ", "
|
||||||
|
<< theAngleInRadians << ", "
|
||||||
|
<< theCopyGroups << ", '"
|
||||||
|
<< theMeshName << "' )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dump "GetGroups"
|
||||||
|
if(!myPreviewMode && mesh_i)
|
||||||
|
mesh_i->GetGroups();
|
||||||
|
|
||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2673,23 +2805,36 @@ SMESH_MeshEditor_i::RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
|
|||||||
CORBA::Boolean theCopyGroups,
|
CORBA::Boolean theCopyGroups,
|
||||||
const char* theMeshName)
|
const char* theMeshName)
|
||||||
{
|
{
|
||||||
TPythonDump pydump; // to prevent dump at mesh creation
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
SMESH::SMESH_Mesh_var mesh = makeMesh( theMeshName );
|
SMESH_Mesh_i* mesh_i;
|
||||||
|
|
||||||
if ( SMESH_Mesh_i* mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh )) {
|
{// open new scope to dump "MakeMesh" command
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
// and then "GetGroups" using SMESH_Mesh::GetGroups()
|
||||||
rotate(anElementsId, theAxis, theAngleInRadians,
|
|
||||||
false, theCopyGroups, & mesh_i->GetImpl());
|
TPythonDump pydump; // to prevent dump at mesh creation
|
||||||
mesh_i->CreateGroupServants();
|
mesh = makeMesh( theMeshName );
|
||||||
}
|
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||||
if ( !myPreviewMode ) {
|
|
||||||
pydump << mesh << " = " << this << ".RotateObjectMakeMesh( "
|
if (mesh_i ) {
|
||||||
<< theObject << ", "
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
<< theAxis << ", "
|
rotate(anElementsId, theAxis, theAngleInRadians,
|
||||||
<< theAngleInRadians << ", "
|
false, theCopyGroups, & mesh_i->GetImpl());
|
||||||
<< theCopyGroups << ", '"
|
mesh_i->CreateGroupServants();
|
||||||
<< theMeshName << "' )";
|
}
|
||||||
|
if ( !myPreviewMode ) {
|
||||||
|
pydump << mesh << " = " << this << ".RotateObjectMakeMesh( "
|
||||||
|
<< theObject << ", "
|
||||||
|
<< theAxis << ", "
|
||||||
|
<< theAngleInRadians << ", "
|
||||||
|
<< theCopyGroups << ", '"
|
||||||
|
<< theMeshName << "' )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dump "GetGroups"
|
||||||
|
if(!myPreviewMode && mesh_i)
|
||||||
|
mesh_i->GetGroups();
|
||||||
|
|
||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3454,3 +3599,16 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::makeMesh(const char* theMeshName)
|
|||||||
|
|
||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : DumpGroupsList
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMESH_MeshEditor_i::DumpGroupsList(TPythonDump & theDumpPython,
|
||||||
|
const SMESH::ListOfGroups * theGroupList)
|
||||||
|
{
|
||||||
|
bool isDumpGroupList = theGroupList && theGroupList->length() > 0;
|
||||||
|
if(isDumpGroupList) {
|
||||||
|
theDumpPython << theGroupList << " = ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
|
#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
|
||||||
|
|
||||||
#include "SMESH_Mesh.hxx"
|
#include "SMESH_Mesh.hxx"
|
||||||
|
#include "SMESH_PythonDump.hxx"
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
class SMESH_MeshEditor;
|
class SMESH_MeshEditor;
|
||||||
@ -487,6 +487,9 @@ private: //!< private methods
|
|||||||
|
|
||||||
SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
|
SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
|
||||||
|
|
||||||
|
void DumpGroupsList(SMESH::TPythonDump & theDumpPython,
|
||||||
|
const SMESH::ListOfGroups * theGroupList);
|
||||||
|
|
||||||
private: //!< fields
|
private: //!< fields
|
||||||
|
|
||||||
SMESH_Mesh_i* myMesh_i;
|
SMESH_Mesh_i* myMesh_i;
|
||||||
|
@ -147,6 +147,9 @@ namespace SMESH
|
|||||||
TPythonDump&
|
TPythonDump&
|
||||||
operator<<(const TCollection_AsciiString & theArg);
|
operator<<(const TCollection_AsciiString & theArg);
|
||||||
|
|
||||||
|
TPythonDump&
|
||||||
|
operator<<(const SMESH::ListOfGroups * theList);
|
||||||
|
|
||||||
static char* SMESHGenName() { return "smeshgen"; }
|
static char* SMESHGenName() { return "smeshgen"; }
|
||||||
static char* MeshEditorName() { return "mesh_editor"; }
|
static char* MeshEditorName() { return "mesh_editor"; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user