mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
Mantis issue 0021108: EDF 1668 SMESH: ExtrusionAlongPathX on a Mesh group.
This commit is contained in:
parent
0b0fc19f70
commit
301af5256a
@ -19,9 +19,8 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// File : SMESH_MeshEditor.idl
|
||||
//
|
||||
|
||||
#ifndef _SMESH_MESHEDITOR_IDL_
|
||||
#define _SMESH_MESHEDITOR_IDL_
|
||||
|
||||
|
@ -19,13 +19,11 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// File : SMESH_Gen_i_DumpPython.cxx
|
||||
// File : SMESH_DumpPython.cxx
|
||||
// Created : Thu Mar 24 17:17:59 2005
|
||||
// Author : Julia DOROVSKIKH
|
||||
// Module : SMESH
|
||||
// $Header : $
|
||||
//
|
||||
|
||||
#include "SMESH_PythonDump.hxx"
|
||||
#include "SMESH_Gen_i.hxx"
|
||||
#include "SMESH_Filter_i.hxx"
|
||||
@ -378,6 +376,11 @@ namespace SMESH
|
||||
DumpArray( theList, *this );
|
||||
return *this;
|
||||
}
|
||||
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups * theList)
|
||||
{
|
||||
DumpArray( *theList, *this );
|
||||
return *this;
|
||||
}
|
||||
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList)
|
||||
{
|
||||
DumpArray( theList, *this );
|
||||
|
@ -19,12 +19,11 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : SMESH_Gen_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
//
|
||||
|
||||
#ifndef _SMESH_GEN_I_HXX_
|
||||
#define _SMESH_GEN_I_HXX_
|
||||
|
||||
|
@ -19,12 +19,11 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : SMESH_MeshEditor_i.cxx
|
||||
// Author : Nicolas REJNERI
|
||||
// Module : SMESH
|
||||
//
|
||||
|
||||
#ifdef WNT
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
@ -1581,6 +1580,8 @@ SMESH_MeshEditor_i::RotationSweepMakeGroups(const SMESH::long_array& theIDsOfEle
|
||||
CORBA::Long theNbOfSteps,
|
||||
CORBA::Double theTolerance)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups *aGroups = rotationSweep(theIDsOfElements,
|
||||
theAxis,
|
||||
theAngleInRadians,
|
||||
@ -1588,7 +1589,6 @@ SMESH_MeshEditor_i::RotationSweepMakeGroups(const SMESH::long_array& theIDsOfEle
|
||||
theTolerance,
|
||||
true);
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".RotationSweepMakeGroups( "
|
||||
<< theIDsOfElements << ", "
|
||||
@ -1698,6 +1698,8 @@ SMESH_MeshEditor_i::RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr theO
|
||||
CORBA::Long theNbOfSteps,
|
||||
CORBA::Double theTolerance)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId,
|
||||
theAxis,
|
||||
@ -1706,7 +1708,6 @@ SMESH_MeshEditor_i::RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr theO
|
||||
theTolerance,
|
||||
true);
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".RotationSweepObjectMakeGroups( "
|
||||
<< theObject << ", "
|
||||
@ -1730,6 +1731,8 @@ SMESH_MeshEditor_i::RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr th
|
||||
CORBA::Long theNbOfSteps,
|
||||
CORBA::Double theTolerance)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId,
|
||||
theAxis,
|
||||
@ -1739,7 +1742,6 @@ SMESH_MeshEditor_i::RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr th
|
||||
true,
|
||||
SMDSAbs_Edge);
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".RotationSweepObject1DMakeGroups( "
|
||||
<< theObject << ", "
|
||||
@ -1763,6 +1765,8 @@ SMESH_MeshEditor_i::RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr th
|
||||
CORBA::Long theNbOfSteps,
|
||||
CORBA::Double theTolerance)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId,
|
||||
theAxis,
|
||||
@ -1772,7 +1776,6 @@ SMESH_MeshEditor_i::RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr th
|
||||
true,
|
||||
SMDSAbs_Face);
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".RotationSweepObject2DMakeGroups( "
|
||||
<< theObject << ", "
|
||||
@ -1904,16 +1907,18 @@ SMESH_MeshEditor_i::ExtrusionSweepMakeGroups(const SMESH::long_array& theIDsOfEl
|
||||
const SMESH::DirStruct& theStepVector,
|
||||
CORBA::Long theNbOfSteps)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups* aGroups = extrusionSweep(theIDsOfElements, theStepVector, theNbOfSteps, true);
|
||||
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".ExtrusionSweepMakeGroups( "
|
||||
<< theIDsOfElements << ", " << theStepVector <<", " << theNbOfSteps << " )";
|
||||
aPythonDump << this << ".ExtrusionSweepMakeGroups( " << theIDsOfElements
|
||||
<< ", " << theStepVector <<", " << theNbOfSteps << " )";
|
||||
}
|
||||
return aGroups;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ExtrusionSweepObjectMakeGroups
|
||||
//purpose :
|
||||
@ -1924,14 +1929,15 @@ SMESH_MeshEditor_i::ExtrusionSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr the
|
||||
const SMESH::DirStruct& theStepVector,
|
||||
CORBA::Long theNbOfSteps)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector, theNbOfSteps, true);
|
||||
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump<< this << ".ExtrusionSweepObjectMakeGroups( "
|
||||
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
|
||||
aPythonDump << this << ".ExtrusionSweepObjectMakeGroups( " << theObject
|
||||
<< ", " << theStepVector << ", " << theNbOfSteps << " )";
|
||||
}
|
||||
return aGroups;
|
||||
}
|
||||
@ -1946,13 +1952,15 @@ SMESH_MeshEditor_i::ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr t
|
||||
const SMESH::DirStruct& theStepVector,
|
||||
CORBA::Long theNbOfSteps)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Edge );
|
||||
SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
|
||||
theNbOfSteps, true, SMDSAbs_Edge);
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( "
|
||||
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
|
||||
aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( " << theObject
|
||||
<< ", " << theStepVector << ", " << theNbOfSteps << " )";
|
||||
}
|
||||
return aGroups;
|
||||
}
|
||||
@ -1967,13 +1975,15 @@ SMESH_MeshEditor_i::ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr t
|
||||
const SMESH::DirStruct& theStepVector,
|
||||
CORBA::Long theNbOfSteps)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Face );
|
||||
SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
|
||||
theNbOfSteps, true, SMDSAbs_Face);
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( "
|
||||
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
|
||||
aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( " << theObject
|
||||
<< ", " << theStepVector << ", " << theNbOfSteps << " )";
|
||||
}
|
||||
return aGroups;
|
||||
}
|
||||
@ -2042,7 +2052,6 @@ void SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfEle
|
||||
//function : AdvancedExtrusionMakeGroups
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::ListOfGroups*
|
||||
SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsOfElements,
|
||||
const SMESH::DirStruct& theStepVector,
|
||||
@ -2050,6 +2059,11 @@ SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsO
|
||||
CORBA::Long theExtrFlags,
|
||||
CORBA::Double theSewTolerance)
|
||||
{
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump() << "stepVector = " << theStepVector;
|
||||
}
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = advancedExtrusion( theIDsOfElements,
|
||||
theStepVector,
|
||||
theNbOfSteps,
|
||||
@ -2058,8 +2072,6 @@ SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsO
|
||||
true);
|
||||
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump() << "stepVector = " << theStepVector;
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".AdvancedExtrusionMakeGroups("
|
||||
<< theIDsOfElements
|
||||
@ -2099,7 +2111,6 @@ static SMESH::SMESH_MeshEditor::Extrusion_Error convExtrError( const::SMESH_Mesh
|
||||
//function : extrusionAlongPath
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::ListOfGroups*
|
||||
SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array & theIDsOfElements,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2172,7 +2183,6 @@ SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array & theIDsOfEleme
|
||||
//function : extrusionAlongPathX
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::ListOfGroups*
|
||||
SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array & IDsOfElements,
|
||||
SMESH::SMESH_IDSource_ptr Path,
|
||||
@ -2272,7 +2282,6 @@ SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array & IDsOfElements
|
||||
//function : ExtrusionAlongPath
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error
|
||||
SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfElements,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2316,7 +2325,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfEleme
|
||||
//function : ExtrusionAlongPathObject
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error
|
||||
SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2360,7 +2368,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObje
|
||||
//function : ExtrusionAlongPathObject1D
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error
|
||||
SMESH_MeshEditor_i::ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2405,7 +2412,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theOb
|
||||
//function : ExtrusionAlongPathObject2D
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error
|
||||
SMESH_MeshEditor_i::ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2451,7 +2457,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theOb
|
||||
//function : ExtrusionAlongPathMakeGroups
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::ListOfGroups*
|
||||
SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theIDsOfElements,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2463,6 +2468,8 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theI
|
||||
const SMESH::PointStruct& theRefPoint,
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = extrusionAlongPath( theIDsOfElements,
|
||||
thePathMesh,
|
||||
thePathShape,
|
||||
@ -2475,12 +2482,8 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theI
|
||||
Error);
|
||||
if (!myPreviewMode) {
|
||||
bool isDumpGroups = aGroups && aGroups->length() > 0;
|
||||
TPythonDump aPythonDump;
|
||||
if(isDumpGroups) {
|
||||
aPythonDump << "("<<aGroups;
|
||||
}
|
||||
if (isDumpGroups)
|
||||
aPythonDump << ", error)";
|
||||
aPythonDump << "(" << aGroups << ", error)";
|
||||
else
|
||||
aPythonDump <<"error";
|
||||
|
||||
@ -2504,7 +2507,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theI
|
||||
//function : ExtrusionAlongPathObjectMakeGroups
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::ListOfGroups* SMESH_MeshEditor_i::
|
||||
ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2516,6 +2518,8 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
const SMESH::PointStruct& theRefPoint,
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId,
|
||||
thePathMesh,
|
||||
@ -2530,12 +2534,8 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
|
||||
if (!myPreviewMode) {
|
||||
bool isDumpGroups = aGroups && aGroups->length() > 0;
|
||||
TPythonDump aPythonDump;
|
||||
if(isDumpGroups) {
|
||||
aPythonDump << "("<<aGroups;
|
||||
}
|
||||
if (isDumpGroups)
|
||||
aPythonDump << ", error)";
|
||||
aPythonDump << "(" << aGroups << ", error)";
|
||||
else
|
||||
aPythonDump <<"error";
|
||||
|
||||
@ -2559,7 +2559,6 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
//function : ExtrusionAlongPathObject1DMakeGroups
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::ListOfGroups* SMESH_MeshEditor_i::
|
||||
ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2571,6 +2570,8 @@ ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
const SMESH::PointStruct& theRefPoint,
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId,
|
||||
thePathMesh,
|
||||
@ -2586,12 +2587,8 @@ ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
|
||||
if (!myPreviewMode) {
|
||||
bool isDumpGroups = aGroups && aGroups->length() > 0;
|
||||
TPythonDump aPythonDump;
|
||||
if(isDumpGroups) {
|
||||
aPythonDump << "("<<aGroups;
|
||||
}
|
||||
if (isDumpGroups)
|
||||
aPythonDump << ", error)";
|
||||
aPythonDump << "(" << aGroups << ", error)";
|
||||
else
|
||||
aPythonDump << "error";
|
||||
|
||||
@ -2615,7 +2612,6 @@ ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
//function : ExtrusionAlongPathObject2DMakeGroups
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMESH::ListOfGroups* SMESH_MeshEditor_i::
|
||||
ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||
@ -2627,6 +2623,8 @@ ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
const SMESH::PointStruct& theRefPoint,
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||
SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId,
|
||||
thePathMesh,
|
||||
@ -2642,12 +2640,8 @@ ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
|
||||
if (!myPreviewMode) {
|
||||
bool isDumpGroups = aGroups && aGroups->length() > 0;
|
||||
TPythonDump aPythonDump;
|
||||
if(isDumpGroups) {
|
||||
aPythonDump << "("<<aGroups;
|
||||
}
|
||||
if (isDumpGroups)
|
||||
aPythonDump << ", error)";
|
||||
aPythonDump << "(" << aGroups << ", error)";
|
||||
else
|
||||
aPythonDump << "error";
|
||||
|
||||
@ -2958,6 +2952,8 @@ SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsO
|
||||
const SMESH::AxisStruct& theMirror,
|
||||
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = 0;
|
||||
if ( theIDsOfElements.length() > 0 )
|
||||
{
|
||||
@ -2966,7 +2962,6 @@ SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsO
|
||||
aGroups = mirror(elements, theMirror, theMirrorType, true, true);
|
||||
}
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".MirrorMakeGroups( "
|
||||
<< theIDsOfElements << ", "
|
||||
@ -2986,6 +2981,8 @@ SMESH_MeshEditor_i::MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr t
|
||||
const SMESH::AxisStruct& theMirror,
|
||||
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = 0;
|
||||
TIDSortedElemSet elements;
|
||||
if ( idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
|
||||
@ -2993,7 +2990,6 @@ SMESH_MeshEditor_i::MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr t
|
||||
|
||||
if (!myPreviewMode)
|
||||
{
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump,aGroups);
|
||||
aPythonDump << this << ".MirrorObjectMakeGroups( "
|
||||
<< theObject << ", "
|
||||
@ -3144,8 +3140,7 @@ void SMESH_MeshEditor_i::Translate(const SMESH::long_array & theIDsOfElements,
|
||||
<< theVector << ", "
|
||||
<< theCopy << " )";
|
||||
}
|
||||
if ( theIDsOfElements.length() )
|
||||
{
|
||||
if (theIDsOfElements.length()) {
|
||||
TIDSortedElemSet elements;
|
||||
arrayToSet(theIDsOfElements, GetMeshDS(), elements);
|
||||
translate(elements, theVector, theCopy, false);
|
||||
@ -3181,15 +3176,15 @@ SMESH::ListOfGroups*
|
||||
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements,
|
||||
const SMESH::DirStruct& theVector)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = 0;
|
||||
if ( theIDsOfElements.length() )
|
||||
{
|
||||
if (theIDsOfElements.length()) {
|
||||
TIDSortedElemSet elements;
|
||||
arrayToSet(theIDsOfElements, GetMeshDS(), elements);
|
||||
aGroups = translate(elements,theVector,true,true);
|
||||
}
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".TranslateMakeGroups( "
|
||||
<< theIDsOfElements << ", "
|
||||
@ -3207,14 +3202,14 @@ SMESH::ListOfGroups*
|
||||
SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
const SMESH::DirStruct& theVector)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = 0;
|
||||
TIDSortedElemSet elements;
|
||||
if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
|
||||
aGroups = translate(elements, theVector, true, true);
|
||||
|
||||
if (!myPreviewMode) {
|
||||
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".TranslateObjectMakeGroups( "
|
||||
<< theObject << ", "
|
||||
@ -3405,6 +3400,8 @@ SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements,
|
||||
const SMESH::AxisStruct& theAxis,
|
||||
CORBA::Double theAngle)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = 0;
|
||||
if (theIDsOfElements.length() > 0)
|
||||
{
|
||||
@ -3413,7 +3410,6 @@ SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements,
|
||||
aGroups = rotate(elements,theAxis,theAngle,true,true);
|
||||
}
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".RotateMakeGroups( "
|
||||
<< theIDsOfElements << ", "
|
||||
@ -3433,13 +3429,14 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
const SMESH::AxisStruct& theAxis,
|
||||
CORBA::Double theAngle)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = 0;
|
||||
TIDSortedElemSet elements;
|
||||
if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
|
||||
aGroups = rotate(elements, theAxis, theAngle, true, true);
|
||||
|
||||
if (!myPreviewMode) {
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".RotateObjectMakeGroups( "
|
||||
<< theObject << ", "
|
||||
@ -3623,10 +3620,10 @@ SMESH_MeshEditor_i::ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
|
||||
const SMESH::PointStruct& thePoint,
|
||||
const SMESH::double_array& theScaleFact)
|
||||
{
|
||||
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
|
||||
|
||||
SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true);
|
||||
if (!myPreviewMode) {
|
||||
|
||||
TPythonDump aPythonDump;
|
||||
DumpGroupsList(aPythonDump, aGroups);
|
||||
aPythonDump << this << ".Scale("
|
||||
<< theObject << ","
|
||||
|
@ -18,7 +18,6 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _SMESH_PYTHONDUMP_HXX_
|
||||
#define _SMESH_PYTHONDUMP_HXX_
|
||||
@ -167,6 +166,9 @@ namespace SMESH
|
||||
TPythonDump&
|
||||
operator<<(const SMESH::ListOfGroups& theList);
|
||||
|
||||
TPythonDump&
|
||||
operator<<(const SMESH::ListOfGroups * theList);
|
||||
|
||||
TPythonDump&
|
||||
operator<<(const SMESH::ListOfIDSources& theList);
|
||||
|
||||
|
@ -3139,7 +3139,8 @@ class Mesh:
|
||||
return []
|
||||
|
||||
## Generates new elements by rotation of the elements of object around the axis
|
||||
# @param theObject object which elements should be sweeped
|
||||
# @param theObject object which elements should be sweeped.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param Axis the axis of rotation, AxisStruct or line(geom object)
|
||||
# @param AngleInRadians the angle of Rotation
|
||||
# @param NbOfSteps number of steps
|
||||
@ -3174,7 +3175,8 @@ class Mesh:
|
||||
return []
|
||||
|
||||
## Generates new elements by rotation of the elements of object around the axis
|
||||
# @param theObject object which elements should be sweeped
|
||||
# @param theObject object which elements should be sweeped.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param Axis the axis of rotation, AxisStruct or line(geom object)
|
||||
# @param AngleInRadians the angle of Rotation
|
||||
# @param NbOfSteps number of steps
|
||||
@ -3209,7 +3211,8 @@ class Mesh:
|
||||
return []
|
||||
|
||||
## Generates new elements by rotation of the elements of object around the axis
|
||||
# @param theObject object which elements should be sweeped
|
||||
# @param theObject object which elements should be sweeped.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param Axis the axis of rotation, AxisStruct or line(geom object)
|
||||
# @param AngleInRadians the angle of Rotation
|
||||
# @param NbOfSteps number of steps
|
||||
@ -3286,7 +3289,8 @@ class Mesh:
|
||||
return []
|
||||
|
||||
## Generates new elements by extrusion of the elements which belong to the object
|
||||
# @param theObject the object which elements should be processed
|
||||
# @param theObject the object which elements should be processed.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param StepVector vector, defining the direction and value of extrusion
|
||||
# @param NbOfSteps the number of steps
|
||||
# @param MakeGroups forces the generation of new groups from existing ones
|
||||
@ -3307,7 +3311,8 @@ class Mesh:
|
||||
return []
|
||||
|
||||
## Generates new elements by extrusion of the elements which belong to the object
|
||||
# @param theObject object which elements should be processed
|
||||
# @param theObject object which elements should be processed.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param StepVector vector, defining the direction and value of extrusion
|
||||
# @param NbOfSteps the number of steps
|
||||
# @param MakeGroups to generate new groups from existing ones
|
||||
@ -3328,7 +3333,8 @@ class Mesh:
|
||||
return []
|
||||
|
||||
## Generates new elements by extrusion of the elements which belong to the object
|
||||
# @param theObject object which elements should be processed
|
||||
# @param theObject object which elements should be processed.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param StepVector vector, defining the direction and value of extrusion
|
||||
# @param NbOfSteps the number of steps
|
||||
# @param MakeGroups forces the generation of new groups from existing ones
|
||||
@ -3352,7 +3358,7 @@ class Mesh:
|
||||
|
||||
## Generates new elements by extrusion of the given elements
|
||||
# The path of extrusion must be a meshed edge.
|
||||
# @param Base mesh or list of ids of elements for extrusion
|
||||
# @param Base mesh or group, or submesh, or list of ids of elements for extrusion
|
||||
# @param Path - 1D mesh or 1D sub-mesh, along which proceeds the extrusion
|
||||
# @param NodeStart the start node from Path. Defines the direction of extrusion
|
||||
# @param HasAngles allows the shape to be rotated around the path
|
||||
@ -3379,8 +3385,7 @@ class Mesh:
|
||||
Parameters = AnglesParameters + var_separator + RefPointParameters
|
||||
self.mesh.SetParameters(Parameters)
|
||||
|
||||
if (isinstance(Path, Mesh)):
|
||||
Path = Path.GetMesh()
|
||||
if (isinstance(Path, Mesh)): Path = Path.GetMesh()
|
||||
|
||||
if isinstance(Base, list):
|
||||
IDsOfElements = []
|
||||
@ -3443,7 +3448,8 @@ class Mesh:
|
||||
|
||||
## Generates new elements by extrusion of the elements which belong to the object
|
||||
# The path of extrusion must be a meshed edge.
|
||||
# @param theObject the object which elements should be processed
|
||||
# @param theObject the object which elements should be processed.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param PathMesh mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds
|
||||
# @param PathShape shape(edge) defines the sub-mesh for the path
|
||||
# @param NodeStart the first or the last node on the edge. Defines the direction of extrusion
|
||||
@ -3485,7 +3491,8 @@ class Mesh:
|
||||
|
||||
## Generates new elements by extrusion of the elements which belong to the object
|
||||
# The path of extrusion must be a meshed edge.
|
||||
# @param theObject the object which elements should be processed
|
||||
# @param theObject the object which elements should be processed.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param PathMesh mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds
|
||||
# @param PathShape shape(edge) defines the sub-mesh for the path
|
||||
# @param NodeStart the first or the last node on the edge. Defines the direction of extrusion
|
||||
@ -3527,7 +3534,8 @@ class Mesh:
|
||||
|
||||
## Generates new elements by extrusion of the elements which belong to the object
|
||||
# The path of extrusion must be a meshed edge.
|
||||
# @param theObject the object which elements should be processed
|
||||
# @param theObject the object which elements should be processed.
|
||||
# It can be a mesh, a sub mesh or a group.
|
||||
# @param PathMesh mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds
|
||||
# @param PathShape shape(edge) defines the sub-mesh for the path
|
||||
# @param NodeStart the first or the last node on the edge. Defines the direction of extrusion
|
||||
|
Loading…
Reference in New Issue
Block a user