Mantis issue 0021108: EDF 1668 SMESH: ExtrusionAlongPathX on a Mesh group.

This commit is contained in:
jfa 2010-12-29 10:27:23 +00:00
parent 0b0fc19f70
commit 301af5256a
6 changed files with 507 additions and 499 deletions

View File

@ -19,9 +19,8 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File : SMESH_MeshEditor.idl // File : SMESH_MeshEditor.idl
//
#ifndef _SMESH_MESHEDITOR_IDL_ #ifndef _SMESH_MESHEDITOR_IDL_
#define _SMESH_MESHEDITOR_IDL_ #define _SMESH_MESHEDITOR_IDL_
@ -187,8 +186,8 @@ module SMESH
* \return TRUE in case of success, FALSE otherwise. * \return TRUE in case of success, FALSE otherwise.
*/ */
boolean TriToQuad (in long_array IDsOfElements, boolean TriToQuad (in long_array IDsOfElements,
in NumericalFunctor Criterion, in NumericalFunctor Criterion,
in double MaxAngle); in double MaxAngle);
/*! /*!
* \brief Fuse neighbour triangles into quadrangles. * \brief Fuse neighbour triangles into quadrangles.
@ -196,8 +195,8 @@ module SMESH
* Behaves like the above method, taking list of elements from \a theObject * Behaves like the above method, taking list of elements from \a theObject
*/ */
boolean TriToQuadObject (in SMESH_IDSource theObject, boolean TriToQuadObject (in SMESH_IDSource theObject,
in NumericalFunctor Criterion, in NumericalFunctor Criterion,
in double MaxAngle); in double MaxAngle);
/*! /*!
* \brief Split quadrangles into triangles. * \brief Split quadrangles into triangles.
@ -206,7 +205,7 @@ module SMESH
* \return TRUE in case of success, FALSE otherwise. * \return TRUE in case of success, FALSE otherwise.
*/ */
boolean QuadToTri (in long_array IDsOfElements, boolean QuadToTri (in long_array IDsOfElements,
in NumericalFunctor Criterion); in NumericalFunctor Criterion);
/*! /*!
* \brief Split quadrangles into triangles. * \brief Split quadrangles into triangles.
@ -214,7 +213,7 @@ module SMESH
* Behaves like the above method, taking list of elements from \a theObject * Behaves like the above method, taking list of elements from \a theObject
*/ */
boolean QuadToTriObject (in SMESH_IDSource theObject, boolean QuadToTriObject (in SMESH_IDSource theObject,
in NumericalFunctor Criterion); in NumericalFunctor Criterion);
/*! /*!
* \brief Split quadrangles into triangles. * \brief Split quadrangles into triangles.
@ -223,7 +222,7 @@ module SMESH
* \return TRUE in case of success, FALSE otherwise. * \return TRUE in case of success, FALSE otherwise.
*/ */
boolean SplitQuad (in long_array IDsOfElements, boolean SplitQuad (in long_array IDsOfElements,
in boolean Diag13); in boolean Diag13);
/*! /*!
* \brief Split quadrangles into triangles. * \brief Split quadrangles into triangles.
@ -231,7 +230,7 @@ module SMESH
* Behaves like the above method, taking list of elements from \a theObject * Behaves like the above method, taking list of elements from \a theObject
*/ */
boolean SplitQuadObject (in SMESH_IDSource theObject, boolean SplitQuadObject (in SMESH_IDSource theObject,
in boolean Diag13); in boolean Diag13);
/*! /*!
* Find better splitting of the given quadrangle. * Find better splitting of the given quadrangle.
@ -241,7 +240,7 @@ module SMESH
* diagonal is better, 0 if error occurs. * diagonal is better, 0 if error occurs.
*/ */
long BestSplit (in long IDOfQuad, long BestSplit (in long IDOfQuad,
in NumericalFunctor Criterion); in NumericalFunctor Criterion);
/*! /*!
* \brief Split volumic elements into tetrahedrons * \brief Split volumic elements into tetrahedrons
@ -264,10 +263,10 @@ module SMESH
in Smooth_Method Method); in Smooth_Method Method);
boolean SmoothObject(in SMESH_IDSource theObject, boolean SmoothObject(in SMESH_IDSource theObject,
in long_array IDsOfFixedNodes, in long_array IDsOfFixedNodes,
in long MaxNbOfIterations, in long MaxNbOfIterations,
in double MaxAspectRatio, in double MaxAspectRatio,
in Smooth_Method Method); in Smooth_Method Method);
boolean SmoothParametric(in long_array IDsOfElements, boolean SmoothParametric(in long_array IDsOfElements,
in long_array IDsOfFixedNodes, in long_array IDsOfFixedNodes,
@ -318,10 +317,10 @@ module SMESH
* \param NbOfSteps - number of elements to generate from one element * \param NbOfSteps - number of elements to generate from one element
*/ */
void RotationSweepObject(in SMESH_IDSource theObject, void RotationSweepObject(in SMESH_IDSource theObject,
in AxisStruct Axix, in AxisStruct Axix,
in double AngleInRadians, in double AngleInRadians,
in long NbOfSteps, in long NbOfSteps,
in double Tolerance); in double Tolerance);
/*! /*!
* \brief Same as previous but additionally create groups of elements * \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups * generated from elements belonging to preexisting groups
@ -339,19 +338,19 @@ module SMESH
* \param NbOfSteps - number of elements to generate from one element * \param NbOfSteps - number of elements to generate from one element
*/ */
void RotationSweepObject1D(in SMESH_IDSource theObject, void RotationSweepObject1D(in SMESH_IDSource theObject,
in AxisStruct Axix, in AxisStruct Axix,
in double AngleInRadians, in double AngleInRadians,
in long NbOfSteps, in long NbOfSteps,
in double Tolerance); in double Tolerance);
/*! /*!
* \brief Same as previous but additionally create groups of elements * \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups * generated from elements belonging to preexisting groups
*/ */
ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource theObject, ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource theObject,
in AxisStruct Axix, in AxisStruct Axix,
in double AngleInRadians, in double AngleInRadians,
in long NbOfSteps, in long NbOfSteps,
in double Tolerance); in double Tolerance);
/*! /*!
* \brief Genarate dim+1 elements by rotation of the object around axis * \brief Genarate dim+1 elements by rotation of the object around axis
* \param theObject - object containing elements to ratate * \param theObject - object containing elements to ratate
@ -360,19 +359,19 @@ module SMESH
* \param NbOfSteps - number of elements to generate from one element * \param NbOfSteps - number of elements to generate from one element
*/ */
void RotationSweepObject2D(in SMESH_IDSource theObject, void RotationSweepObject2D(in SMESH_IDSource theObject,
in AxisStruct Axix, in AxisStruct Axix,
in double AngleInRadians, in double AngleInRadians,
in long NbOfSteps, in long NbOfSteps,
in double Tolerance); in double Tolerance);
/*! /*!
* \brief Same as previous but additionally create groups of elements * \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups * generated from elements belonging to preexisting groups
*/ */
ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource theObject, ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource theObject,
in AxisStruct Axix, in AxisStruct Axix,
in double AngleInRadians, in double AngleInRadians,
in long NbOfSteps, in long NbOfSteps,
in double Tolerance); in double Tolerance);
/*! /*!
* \brief Genarate dim+1 elements by extrusion of elements along vector * \brief Genarate dim+1 elements by extrusion of elements along vector
* \param IDsOfElements - elements to sweep * \param IDsOfElements - elements to sweep
@ -399,8 +398,8 @@ module SMESH
void AdvancedExtrusion(in long_array IDsOfElements, void AdvancedExtrusion(in long_array IDsOfElements,
in DirStruct StepVector, in DirStruct StepVector,
in long NbOfSteps, in long NbOfSteps,
in long ExtrFlags, in long ExtrFlags,
in double SewTolerance); in double SewTolerance);
/*! /*!
* \brief Same as previous but additionally create groups of elements * \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups * generated from elements belonging to preexisting groups
@ -412,22 +411,22 @@ module SMESH
in double SewTolerance); in double SewTolerance);
void ExtrusionSweepObject(in SMESH_IDSource theObject, void ExtrusionSweepObject(in SMESH_IDSource theObject,
in DirStruct StepVector, in DirStruct StepVector,
in long NbOfSteps); in long NbOfSteps);
ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource theObject, ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource theObject,
in DirStruct StepVector, in DirStruct StepVector,
in long NbOfSteps); in long NbOfSteps);
void ExtrusionSweepObject1D(in SMESH_IDSource theObject, void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
in DirStruct StepVector, in DirStruct StepVector,
in long NbOfSteps); in long NbOfSteps);
ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject, ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject,
in DirStruct StepVector, in DirStruct StepVector,
in long NbOfSteps); in long NbOfSteps);
void ExtrusionSweepObject2D(in SMESH_IDSource theObject, void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
in DirStruct StepVector, in DirStruct StepVector,
in long NbOfSteps); in long NbOfSteps);
ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject, ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject,
in DirStruct StepVector, in DirStruct StepVector,
in long NbOfSteps); in long NbOfSteps);
@ -443,37 +442,37 @@ module SMESH
}; };
ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements, ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements,
in SMESH_IDSource Path, in SMESH_IDSource Path,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean LinearVariation, in boolean LinearVariation,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint, in PointStruct RefPoint,
in boolean MakeGroups, in boolean MakeGroups,
in ElementType ElemType, in ElementType ElemType,
out Extrusion_Error Error); out Extrusion_Error Error);
ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject, ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject,
in SMESH_IDSource Path, in SMESH_IDSource Path,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean LinearVariation, in boolean LinearVariation,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint, in PointStruct RefPoint,
in boolean MakeGroups, in boolean MakeGroups,
in ElementType ElemType, in ElementType ElemType,
out Extrusion_Error Error); out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements, Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint); in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathMakeGroups(in long_array IDsOfElements, ListOfGroups ExtrusionAlongPathMakeGroups(in long_array IDsOfElements,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
@ -485,13 +484,13 @@ module SMESH
out Extrusion_Error Error); out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource theObject, Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource theObject,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint); in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathObjectMakeGroups(in SMESH_IDSource theObject, ListOfGroups ExtrusionAlongPathObjectMakeGroups(in SMESH_IDSource theObject,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
@ -503,40 +502,40 @@ module SMESH
out Extrusion_Error Error); out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject, Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint); in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject, ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint, in PointStruct RefPoint,
out Extrusion_Error Error); out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject, Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint); in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject, ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject,
in SMESH_Mesh PathMesh, in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape, in GEOM::GEOM_Object PathShape,
in long NodeStart, in long NodeStart,
in boolean HasAngles, in boolean HasAngles,
in double_array Angles, in double_array Angles,
in boolean HasRefPoint, in boolean HasRefPoint,
in PointStruct RefPoint, in PointStruct RefPoint,
out Extrusion_Error Error); out Extrusion_Error Error);
/*! /*!
* Compute rotation angles for ExtrusionAlongPath as linear variation * Compute rotation angles for ExtrusionAlongPath as linear variation
@ -566,9 +565,9 @@ module SMESH
in string MeshName); in string MeshName);
void MirrorObject (in SMESH_IDSource theObject, void MirrorObject (in SMESH_IDSource theObject,
in AxisStruct Mirror, in AxisStruct Mirror,
in MirrorType Type, in MirrorType Type,
in boolean Copy); in boolean Copy);
ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject, ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
in AxisStruct Mirror, in AxisStruct Mirror,
in MirrorType Type); in MirrorType Type);
@ -589,8 +588,8 @@ module SMESH
in string MeshName); in string MeshName);
void TranslateObject (in SMESH_IDSource theObject, void TranslateObject (in SMESH_IDSource theObject,
in DirStruct Vector, in DirStruct Vector,
in boolean Copy); in boolean Copy);
ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject, ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
in DirStruct Vector); in DirStruct Vector);
SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject, SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
@ -625,9 +624,9 @@ module SMESH
in string MeshName); in string MeshName);
void RotateObject (in SMESH_IDSource theObject, void RotateObject (in SMESH_IDSource theObject,
in AxisStruct Axis, in AxisStruct Axis,
in double AngleInRadians, in double AngleInRadians,
in boolean Copy); in boolean Copy);
ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject, ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
in AxisStruct Axis, in AxisStruct Axis,
in double AngleInRadians); in double AngleInRadians);
@ -641,8 +640,8 @@ module SMESH
out array_of_long_array GroupsOfNodes); out array_of_long_array GroupsOfNodes);
void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup, void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
in double Tolerance, in double Tolerance,
out array_of_long_array GroupsOfNodes); out array_of_long_array GroupsOfNodes);
void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup, void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
in double Tolerance, in double Tolerance,
@ -657,7 +656,7 @@ module SMESH
* \return List of groups of equal elements. * \return List of groups of equal elements.
*/ */
void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup, void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
out array_of_long_array GroupsOfElementsID); out array_of_long_array GroupsOfElementsID);
/*! /*!
* \brief Merge elements in each given group. * \brief Merge elements in each given group.
@ -714,8 +713,8 @@ module SMESH
in long FirstNodeID2, in long FirstNodeID2,
in long SecondNodeID2, in long SecondNodeID2,
in long LastNodeID2, in long LastNodeID2,
in boolean CreatePolygons, in boolean CreatePolygons,
in boolean CreatePolyedrs); in boolean CreatePolyedrs);
Sew_Error SewConformFreeBorders (in long FirstNodeID1, Sew_Error SewConformFreeBorders (in long FirstNodeID1,
in long SecondNodeID1, in long SecondNodeID1,
@ -728,8 +727,8 @@ module SMESH
in long LastNodeIDOnFreeBorder, in long LastNodeIDOnFreeBorder,
in long FirstNodeIDOnSide, in long FirstNodeIDOnSide,
in long LastNodeIDOnSide, in long LastNodeIDOnSide,
in boolean CreatePolygons, in boolean CreatePolygons,
in boolean CreatePolyedrs); in boolean CreatePolyedrs);
Sew_Error SewSideElements (in long_array IDsOfSide1Elements, Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
in long_array IDsOfSide2Elements, in long_array IDsOfSide2Elements,
@ -807,7 +806,7 @@ module SMESH
* \sa DoubleNodeGroup() * \sa DoubleNodeGroup()
*/ */
SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes, SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
in SMESH_GroupBase theModifiedElems ); in SMESH_GroupBase theModifiedElems );
/*! /*!
\brief Creates a hole in a mesh by doubling the nodes of some particular elements \brief Creates a hole in a mesh by doubling the nodes of some particular elements
@ -875,8 +874,8 @@ module SMESH
* \sa DoubleNodeElemGroup() * \sa DoubleNodeElemGroup()
*/ */
SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems, SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
in SMESH_GroupBase theNodesNot, in SMESH_GroupBase theNodesNot,
in SMESH_GroupBase theAffectedElems ); in SMESH_GroupBase theAffectedElems );
/*! /*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements * \brief Creates a hole in a mesh by doubling the nodes of some particular elements

View File

@ -19,13 +19,11 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File : SMESH_DumpPython.cxx
// Created : Thu Mar 24 17:17:59 2005
// Author : Julia DOROVSKIKH
// Module : SMESH
// File : SMESH_Gen_i_DumpPython.cxx
// Created : Thu Mar 24 17:17:59 2005
// Author : Julia DOROVSKIKH
// Module : SMESH
// $Header : $
//
#include "SMESH_PythonDump.hxx" #include "SMESH_PythonDump.hxx"
#include "SMESH_Gen_i.hxx" #include "SMESH_Gen_i.hxx"
#include "SMESH_Filter_i.hxx" #include "SMESH_Filter_i.hxx"
@ -378,6 +376,11 @@ namespace SMESH
DumpArray( theList, *this ); DumpArray( theList, *this );
return *this; return *this;
} }
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups * theList)
{
DumpArray( *theList, *this );
return *this;
}
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList) TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList)
{ {
DumpArray( theList, *this ); DumpArray( theList, *this );

View File

@ -19,12 +19,11 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Gen_i.hxx // File : SMESH_Gen_i.hxx
// Author : Paul RASCLE, EDF // Author : Paul RASCLE, EDF
// Module : SMESH // Module : SMESH
//
#ifndef _SMESH_GEN_I_HXX_ #ifndef _SMESH_GEN_I_HXX_
#define _SMESH_GEN_I_HXX_ #define _SMESH_GEN_I_HXX_

View File

@ -19,12 +19,11 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MeshEditor_i.cxx // File : SMESH_MeshEditor_i.cxx
// Author : Nicolas REJNERI // Author : Nicolas REJNERI
// Module : SMESH // Module : SMESH
//
#ifdef WNT #ifdef WNT
#define NOMINMAX #define NOMINMAX
#endif #endif
@ -1581,21 +1580,22 @@ SMESH_MeshEditor_i::RotationSweepMakeGroups(const SMESH::long_array& theIDsOfEle
CORBA::Long theNbOfSteps, CORBA::Long theNbOfSteps,
CORBA::Double theTolerance) CORBA::Double theTolerance)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups *aGroups = rotationSweep(theIDsOfElements, SMESH::ListOfGroups *aGroups = rotationSweep(theIDsOfElements,
theAxis, theAxis,
theAngleInRadians, theAngleInRadians,
theNbOfSteps, theNbOfSteps,
theTolerance, theTolerance,
true); true);
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups); aPythonDump << this << ".RotationSweepMakeGroups( "
aPythonDump<< this << ".RotationSweepMakeGroups( " << theIDsOfElements << ", "
<< theIDsOfElements << ", " << theAxis << ", "
<< theAxis << ", " << theAngleInRadians << ", "
<< theAngleInRadians << ", " << theNbOfSteps << ", "
<< theNbOfSteps << ", " << theTolerance << " )";
<< theTolerance << " )";
} }
return aGroups; return aGroups;
} }
@ -1698,6 +1698,8 @@ SMESH_MeshEditor_i::RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr theO
CORBA::Long theNbOfSteps, CORBA::Long theNbOfSteps,
CORBA::Double theTolerance) CORBA::Double theTolerance)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId, SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId,
theAxis, theAxis,
@ -1705,15 +1707,14 @@ SMESH_MeshEditor_i::RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr theO
theNbOfSteps, theNbOfSteps,
theTolerance, theTolerance,
true); true);
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups); aPythonDump << this << ".RotationSweepObjectMakeGroups( "
aPythonDump<< this << ".RotationSweepObjectMakeGroups( " << theObject << ", "
<< theObject << ", " << theAxis << ", "
<< theAxis << ", " << theAngleInRadians << ", "
<< theAngleInRadians << ", " << theNbOfSteps << ", "
<< theNbOfSteps << ", " << theTolerance << " )";
<< theTolerance << " )";
} }
return aGroups; return aGroups;
} }
@ -1730,6 +1731,8 @@ SMESH_MeshEditor_i::RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr th
CORBA::Long theNbOfSteps, CORBA::Long theNbOfSteps,
CORBA::Double theTolerance) CORBA::Double theTolerance)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId, SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId,
theAxis, theAxis,
@ -1738,15 +1741,14 @@ SMESH_MeshEditor_i::RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr th
theTolerance, theTolerance,
true, true,
SMDSAbs_Edge); SMDSAbs_Edge);
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups); aPythonDump << this << ".RotationSweepObject1DMakeGroups( "
aPythonDump<< this << ".RotationSweepObject1DMakeGroups( " << theObject << ", "
<< theObject << ", " << theAxis << ", "
<< theAxis << ", " << theAngleInRadians << ", "
<< theAngleInRadians << ", " << theNbOfSteps << ", "
<< theNbOfSteps << ", " << theTolerance << " )";
<< theTolerance << " )";
} }
return aGroups; return aGroups;
} }
@ -1763,6 +1765,8 @@ SMESH_MeshEditor_i::RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr th
CORBA::Long theNbOfSteps, CORBA::Long theNbOfSteps,
CORBA::Double theTolerance) CORBA::Double theTolerance)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId, SMESH::ListOfGroups *aGroups = rotationSweep(anElementsId,
theAxis, theAxis,
@ -1771,15 +1775,14 @@ SMESH_MeshEditor_i::RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr th
theTolerance, theTolerance,
true, true,
SMDSAbs_Face); SMDSAbs_Face);
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups); aPythonDump << this << ".RotationSweepObject2DMakeGroups( "
aPythonDump<< this << ".RotationSweepObject2DMakeGroups( " << theObject << ", "
<< theObject << ", " << theAxis << ", "
<< theAxis << ", " << theAngleInRadians << ", "
<< theAngleInRadians << ", " << theNbOfSteps << ", "
<< theNbOfSteps << ", " << theTolerance << " )";
<< theTolerance << " )";
} }
return aGroups; return aGroups;
} }
@ -1836,7 +1839,7 @@ void SMESH_MeshEditor_i::ExtrusionSweep(const SMESH::long_array & theIDsOfElemen
CORBA::Long theNbOfSteps) CORBA::Long theNbOfSteps)
{ {
extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, false ); extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, false );
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump() << this << ".ExtrusionSweep( " TPythonDump() << this << ".ExtrusionSweep( "
<< theIDsOfElements << ", " << theStepVector <<", " << theNbOfSteps << " )"; << theIDsOfElements << ", " << theStepVector <<", " << theNbOfSteps << " )";
} }
@ -1854,7 +1857,7 @@ void SMESH_MeshEditor_i::ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObjec
{ {
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false ); extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false );
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump() << this << ".ExtrusionSweepObject( " TPythonDump() << this << ".ExtrusionSweepObject( "
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )"; << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
} }
@ -1904,16 +1907,18 @@ 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 ); TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
if ( !myPreviewMode ) { SMESH::ListOfGroups* aGroups = extrusionSweep(theIDsOfElements, theStepVector, theNbOfSteps, true);
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups); if (!myPreviewMode) {
aPythonDump << this << ".ExtrusionSweepMakeGroups( " DumpGroupsList(aPythonDump, aGroups);
<< theIDsOfElements << ", " << theStepVector <<", " << theNbOfSteps << " )"; aPythonDump << this << ".ExtrusionSweepMakeGroups( " << theIDsOfElements
<< ", " << theStepVector <<", " << theNbOfSteps << " )";
} }
return aGroups; return aGroups;
} }
//======================================================================= //=======================================================================
//function : ExtrusionSweepObjectMakeGroups //function : ExtrusionSweepObjectMakeGroups
//purpose : //purpose :
@ -1924,14 +1929,15 @@ 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(); TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true );
if ( !myPreviewMode ) { SMESH::long_array_var anElementsId = theObject->GetIDs();
TPythonDump aPythonDump; SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector, theNbOfSteps, true);
DumpGroupsList(aPythonDump,aGroups);
aPythonDump<< this << ".ExtrusionSweepObjectMakeGroups( " if (!myPreviewMode) {
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )"; DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".ExtrusionSweepObjectMakeGroups( " << theObject
<< ", " << theStepVector << ", " << theNbOfSteps << " )";
} }
return aGroups; return aGroups;
} }
@ -1946,13 +1952,15 @@ SMESH_MeshEditor_i::ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr t
const SMESH::DirStruct& theStepVector, const SMESH::DirStruct& theStepVector,
CORBA::Long theNbOfSteps) CORBA::Long theNbOfSteps)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Edge ); SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
if ( !myPreviewMode ) { theNbOfSteps, true, SMDSAbs_Edge);
TPythonDump aPythonDump; if (!myPreviewMode) {
DumpGroupsList(aPythonDump,aGroups); DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( " aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( " << theObject
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )"; << ", " << theStepVector << ", " << theNbOfSteps << " )";
} }
return aGroups; return aGroups;
} }
@ -1967,13 +1975,15 @@ SMESH_MeshEditor_i::ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr t
const SMESH::DirStruct& theStepVector, const SMESH::DirStruct& theStepVector,
CORBA::Long theNbOfSteps) CORBA::Long theNbOfSteps)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true, SMDSAbs_Face ); SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
if ( !myPreviewMode ) { theNbOfSteps, true, SMDSAbs_Face);
TPythonDump aPythonDump; if (!myPreviewMode) {
DumpGroupsList(aPythonDump,aGroups); DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( " aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( " << theObject
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )"; << ", " << theStepVector << ", " << theNbOfSteps << " )";
} }
return aGroups; return aGroups;
} }
@ -2042,7 +2052,6 @@ void SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfEle
//function : AdvancedExtrusionMakeGroups //function : AdvancedExtrusionMakeGroups
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsOfElements,
const SMESH::DirStruct& theStepVector, const SMESH::DirStruct& theStepVector,
@ -2050,6 +2059,11 @@ SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsO
CORBA::Long theExtrFlags, CORBA::Long theExtrFlags,
CORBA::Double theSewTolerance) CORBA::Double theSewTolerance)
{ {
if (!myPreviewMode) {
TPythonDump() << "stepVector = " << theStepVector;
}
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = advancedExtrusion( theIDsOfElements, SMESH::ListOfGroups * aGroups = advancedExtrusion( theIDsOfElements,
theStepVector, theStepVector,
theNbOfSteps, theNbOfSteps,
@ -2057,10 +2071,8 @@ SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsO
theSewTolerance, theSewTolerance,
true); true);
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump() << "stepVector = " << theStepVector; DumpGroupsList(aPythonDump, aGroups);
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".AdvancedExtrusionMakeGroups(" aPythonDump << this << ".AdvancedExtrusionMakeGroups("
<< theIDsOfElements << theIDsOfElements
<< ", stepVector, " << ", stepVector, "
@ -2099,7 +2111,6 @@ static SMESH::SMESH_MeshEditor::Extrusion_Error convExtrError( const::SMESH_Mesh
//function : extrusionAlongPath //function : extrusionAlongPath
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array & theIDsOfElements, SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array & theIDsOfElements,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2172,7 +2183,6 @@ SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array & theIDsOfEleme
//function : extrusionAlongPathX //function : extrusionAlongPathX
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array & IDsOfElements, SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array & IDsOfElements,
SMESH::SMESH_IDSource_ptr Path, SMESH::SMESH_IDSource_ptr Path,
@ -2272,7 +2282,6 @@ SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array & IDsOfElements
//function : ExtrusionAlongPath //function : ExtrusionAlongPath
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Extrusion_Error SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfElements, SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfElements,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2316,7 +2325,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfEleme
//function : ExtrusionAlongPathObject //function : ExtrusionAlongPathObject
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Extrusion_Error SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject, SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2360,7 +2368,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObje
//function : ExtrusionAlongPathObject1D //function : ExtrusionAlongPathObject1D
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Extrusion_Error SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject, SMESH_MeshEditor_i::ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2405,7 +2412,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theOb
//function : ExtrusionAlongPathObject2D //function : ExtrusionAlongPathObject2D
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Extrusion_Error SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject, SMESH_MeshEditor_i::ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2451,7 +2457,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theOb
//function : ExtrusionAlongPathMakeGroups //function : ExtrusionAlongPathMakeGroups
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theIDsOfElements,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2463,6 +2468,8 @@ 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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = extrusionAlongPath( theIDsOfElements, SMESH::ListOfGroups * aGroups = extrusionAlongPath( theIDsOfElements,
thePathMesh, thePathMesh,
thePathShape, thePathShape,
@ -2473,14 +2480,10 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theI
theRefPoint, theRefPoint,
true, true,
Error); Error);
if ( !myPreviewMode ) { if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0; bool isDumpGroups = aGroups && aGroups->length() > 0;
TPythonDump aPythonDump; if (isDumpGroups)
if(isDumpGroups) { aPythonDump << "(" << aGroups << ", error)";
aPythonDump << "("<<aGroups;
}
if(isDumpGroups)
aPythonDump << ", error)";
else else
aPythonDump <<"error"; aPythonDump <<"error";
@ -2504,7 +2507,6 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theI
//function : ExtrusionAlongPathObjectMakeGroups //function : ExtrusionAlongPathObjectMakeGroups
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH_MeshEditor_i:: SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject, ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2516,6 +2518,8 @@ 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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId, SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId,
thePathMesh, thePathMesh,
@ -2528,14 +2532,10 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
true, true,
Error); Error);
if ( !myPreviewMode ) { if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0; bool isDumpGroups = aGroups && aGroups->length() > 0;
TPythonDump aPythonDump; if (isDumpGroups)
if(isDumpGroups) { aPythonDump << "(" << aGroups << ", error)";
aPythonDump << "("<<aGroups;
}
if(isDumpGroups)
aPythonDump << ", error)";
else else
aPythonDump <<"error"; aPythonDump <<"error";
@ -2559,7 +2559,6 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
//function : ExtrusionAlongPathObject1DMakeGroups //function : ExtrusionAlongPathObject1DMakeGroups
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH_MeshEditor_i:: SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject, ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2571,6 +2570,8 @@ ExtrusionAlongPathObject1DMakeGroups(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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId, SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId,
thePathMesh, thePathMesh,
@ -2584,16 +2585,12 @@ ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
Error, Error,
SMDSAbs_Edge); SMDSAbs_Edge);
if ( !myPreviewMode ) { if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0; bool isDumpGroups = aGroups && aGroups->length() > 0;
TPythonDump aPythonDump; if (isDumpGroups)
if(isDumpGroups) { aPythonDump << "(" << aGroups << ", error)";
aPythonDump << "("<<aGroups;
}
if(isDumpGroups)
aPythonDump << ", error)";
else else
aPythonDump <<"error"; aPythonDump << "error";
aPythonDump << " = " << this << ".ExtrusionAlongPathObject1DMakeGroups( " aPythonDump << " = " << this << ".ExtrusionAlongPathObject1DMakeGroups( "
<< theObject << ", " << theObject << ", "
@ -2615,7 +2612,6 @@ ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
//function : ExtrusionAlongPathObject2DMakeGroups //function : ExtrusionAlongPathObject2DMakeGroups
//purpose : //purpose :
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH_MeshEditor_i:: SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr theObject, ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh, SMESH::SMESH_Mesh_ptr thePathMesh,
@ -2627,6 +2623,8 @@ ExtrusionAlongPathObject2DMakeGroups(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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId, SMESH::ListOfGroups * aGroups = extrusionAlongPath( anElementsId,
thePathMesh, thePathMesh,
@ -2640,16 +2638,12 @@ ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
Error, Error,
SMDSAbs_Face); SMDSAbs_Face);
if ( !myPreviewMode ) { if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0; bool isDumpGroups = aGroups && aGroups->length() > 0;
TPythonDump aPythonDump; if (isDumpGroups)
if(isDumpGroups) { aPythonDump << "(" << aGroups << ", error)";
aPythonDump << "("<<aGroups;
}
if(isDumpGroups)
aPythonDump << ", error)";
else else
aPythonDump <<"error"; aPythonDump << "error";
aPythonDump << " = " << this << ".ExtrusionAlongPathObject2DMakeGroups( " aPythonDump << " = " << this << ".ExtrusionAlongPathObject2DMakeGroups( "
<< theObject << ", " << theObject << ", "
@ -2958,6 +2952,8 @@ 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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0; SMESH::ListOfGroups * aGroups = 0;
if ( theIDsOfElements.length() > 0 ) if ( theIDsOfElements.length() > 0 )
{ {
@ -2965,9 +2961,8 @@ SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsO
arrayToSet(theIDsOfElements, GetMeshDS(), elements); arrayToSet(theIDsOfElements, GetMeshDS(), elements);
aGroups = mirror(elements, theMirror, theMirrorType, true, true); aGroups = mirror(elements, theMirror, theMirrorType, true, true);
} }
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".MirrorMakeGroups( " aPythonDump << this << ".MirrorMakeGroups( "
<< theIDsOfElements << ", " << theIDsOfElements << ", "
<< theMirror << ", " << theMirror << ", "
@ -2986,14 +2981,15 @@ 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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0; SMESH::ListOfGroups * aGroups = 0;
TIDSortedElemSet elements; TIDSortedElemSet elements;
if ( idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1)) if ( idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
aGroups = mirror(elements, theMirror, theMirrorType, true, true); aGroups = mirror(elements, theMirror, theMirrorType, true, true);
if ( !myPreviewMode ) if (!myPreviewMode)
{ {
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups); DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".MirrorObjectMakeGroups( " aPythonDump << this << ".MirrorObjectMakeGroups( "
<< theObject << ", " << theObject << ", "
@ -3033,7 +3029,7 @@ SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array& theIDsOfE
mesh_i->CreateGroupServants(); mesh_i->CreateGroupServants();
} }
if ( !myPreviewMode ) { if (!myPreviewMode) {
pydump << mesh << " = " << this << ".MirrorMakeMesh( " pydump << mesh << " = " << this << ".MirrorMakeMesh( "
<< theIDsOfElements << ", " << theIDsOfElements << ", "
<< theMirror << ", " << theMirror << ", "
@ -3044,7 +3040,7 @@ SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array& theIDsOfE
} }
//dump "GetGroups" //dump "GetGroups"
if(!myPreviewMode && mesh_i) if (!myPreviewMode && mesh_i)
mesh_i->GetGroups(); mesh_i->GetGroups();
return mesh._retn(); return mesh._retn();
@ -3079,7 +3075,7 @@ SMESH_MeshEditor_i::MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr the
false, theCopyGroups, & mesh_i->GetImpl()); false, theCopyGroups, & mesh_i->GetImpl());
mesh_i->CreateGroupServants(); mesh_i->CreateGroupServants();
} }
if ( !myPreviewMode ) { if (!myPreviewMode) {
pydump << mesh << " = " << this << ".MirrorObjectMakeMesh( " pydump << mesh << " = " << this << ".MirrorObjectMakeMesh( "
<< theObject << ", " << theObject << ", "
<< theMirror << ", " << theMirror << ", "
@ -3090,7 +3086,7 @@ SMESH_MeshEditor_i::MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr the
} }
//dump "GetGroups" //dump "GetGroups"
if(!myPreviewMode && mesh_i) if (!myPreviewMode && mesh_i)
mesh_i->GetGroups(); mesh_i->GetGroups();
return mesh._retn(); return mesh._retn();
@ -3138,17 +3134,16 @@ void SMESH_MeshEditor_i::Translate(const SMESH::long_array & theIDsOfElements,
const SMESH::DirStruct & theVector, const SMESH::DirStruct & theVector,
CORBA::Boolean theCopy) CORBA::Boolean theCopy)
{ {
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump() << this << ".Translate( " TPythonDump() << this << ".Translate( "
<< theIDsOfElements << ", " << theIDsOfElements << ", "
<< theVector << ", " << theVector << ", "
<< theCopy << " )"; << theCopy << " )";
} }
if ( theIDsOfElements.length() ) if (theIDsOfElements.length()) {
{
TIDSortedElemSet elements; TIDSortedElemSet elements;
arrayToSet(theIDsOfElements, GetMeshDS(), elements); arrayToSet(theIDsOfElements, GetMeshDS(), elements);
translate(elements,theVector,theCopy,false); translate(elements, theVector, theCopy, false);
} }
} }
@ -3161,15 +3156,15 @@ void SMESH_MeshEditor_i::TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::DirStruct & theVector, const SMESH::DirStruct & theVector,
CORBA::Boolean theCopy) CORBA::Boolean theCopy)
{ {
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump() << this << ".TranslateObject( " TPythonDump() << this << ".TranslateObject( "
<< theObject << ", " << theObject << ", "
<< theVector << ", " << theVector << ", "
<< theCopy << " )"; << theCopy << " )";
} }
TIDSortedElemSet elements; TIDSortedElemSet elements;
if ( idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1)) if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
translate( elements, theVector, theCopy, false); translate(elements, theVector, theCopy, false);
} }
//======================================================================= //=======================================================================
@ -3181,16 +3176,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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0; SMESH::ListOfGroups * aGroups = 0;
if ( theIDsOfElements.length() ) if (theIDsOfElements.length()) {
{
TIDSortedElemSet elements; TIDSortedElemSet elements;
arrayToSet(theIDsOfElements, GetMeshDS(), elements); arrayToSet(theIDsOfElements, GetMeshDS(), elements);
aGroups = translate(elements,theVector,true,true); aGroups = translate(elements,theVector,true,true);
} }
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".TranslateMakeGroups( " aPythonDump << this << ".TranslateMakeGroups( "
<< theIDsOfElements << ", " << theIDsOfElements << ", "
<< theVector << " )"; << theVector << " )";
@ -3207,15 +3202,15 @@ 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)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0; SMESH::ListOfGroups * aGroups = 0;
TIDSortedElemSet elements; TIDSortedElemSet elements;
if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1)) if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
aGroups = translate(elements, theVector, true, true); aGroups = translate(elements, theVector, true, true);
if ( !myPreviewMode ) { if (!myPreviewMode) {
DumpGroupsList(aPythonDump, aGroups);
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".TranslateObjectMakeGroups( " aPythonDump << this << ".TranslateObjectMakeGroups( "
<< theObject << ", " << theObject << ", "
<< theVector << " )"; << theVector << " )";
@ -3263,7 +3258,7 @@ SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::long_array& theIDsOfElements,
} }
//dump "GetGroups" //dump "GetGroups"
if(!myPreviewMode && mesh_i) if (!myPreviewMode && mesh_i)
mesh_i->GetGroups(); mesh_i->GetGroups();
return mesh._retn(); return mesh._retn();
@ -3305,8 +3300,8 @@ SMESH_MeshEditor_i::TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
} }
} }
//dump "GetGroups" // dump "GetGroups"
if(!myPreviewMode && mesh_i) if (!myPreviewMode && mesh_i)
mesh_i->GetGroups(); mesh_i->GetGroups();
return mesh._retn(); return mesh._retn();
@ -3358,14 +3353,14 @@ void SMESH_MeshEditor_i::Rotate(const SMESH::long_array & theIDsOfElements,
CORBA::Double theAngle, CORBA::Double theAngle,
CORBA::Boolean theCopy) CORBA::Boolean theCopy)
{ {
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump() << this << ".Rotate( " TPythonDump() << this << ".Rotate( "
<< theIDsOfElements << ", " << theIDsOfElements << ", "
<< theAxis << ", " << theAxis << ", "
<< theAngle << ", " << theAngle << ", "
<< theCopy << " )"; << theCopy << " )";
} }
if ( theIDsOfElements.length() > 0 ) if (theIDsOfElements.length() > 0)
{ {
TIDSortedElemSet elements; TIDSortedElemSet elements;
arrayToSet(theIDsOfElements, GetMeshDS(), elements); arrayToSet(theIDsOfElements, GetMeshDS(), elements);
@ -3405,16 +3400,17 @@ SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements,
const SMESH::AxisStruct& theAxis, const SMESH::AxisStruct& theAxis,
CORBA::Double theAngle) CORBA::Double theAngle)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0; SMESH::ListOfGroups * aGroups = 0;
if ( theIDsOfElements.length() > 0 ) if (theIDsOfElements.length() > 0)
{ {
TIDSortedElemSet elements; TIDSortedElemSet elements;
arrayToSet(theIDsOfElements, GetMeshDS(), elements); arrayToSet(theIDsOfElements, GetMeshDS(), elements);
aGroups = rotate(elements,theAxis,theAngle,true,true); aGroups = rotate(elements,theAxis,theAngle,true,true);
} }
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".RotateMakeGroups( " aPythonDump << this << ".RotateMakeGroups( "
<< theIDsOfElements << ", " << theIDsOfElements << ", "
<< theAxis << ", " << theAxis << ", "
@ -3433,14 +3429,15 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::AxisStruct& theAxis, const SMESH::AxisStruct& theAxis,
CORBA::Double theAngle) CORBA::Double theAngle)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0; SMESH::ListOfGroups * aGroups = 0;
TIDSortedElemSet elements; TIDSortedElemSet elements;
if ( idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1)) if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
aGroups = rotate(elements,theAxis,theAngle,true,true); aGroups = rotate(elements, theAxis, theAngle, true, true);
if ( !myPreviewMode ) { if (!myPreviewMode) {
TPythonDump aPythonDump; DumpGroupsList(aPythonDump, aGroups);
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".RotateObjectMakeGroups( " aPythonDump << this << ".RotateObjectMakeGroups( "
<< theObject << ", " << theObject << ", "
<< theAxis << ", " << theAxis << ", "
@ -3490,8 +3487,8 @@ SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements,
} }
} }
//dump "GetGroups" // dump "GetGroups"
if(!myPreviewMode && mesh_i && theIDsOfElements.length() > 0 ) if (!myPreviewMode && mesh_i && theIDsOfElements.length() > 0 )
mesh_i->GetGroups(); mesh_i->GetGroups();
return mesh._retn(); return mesh._retn();
@ -3537,8 +3534,8 @@ SMESH_MeshEditor_i::RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
} }
} }
//dump "GetGroups" // dump "GetGroups"
if(!myPreviewMode && mesh_i) if (!myPreviewMode && mesh_i)
mesh_i->GetGroups(); mesh_i->GetGroups();
return mesh._retn(); return mesh._retn();
@ -3623,11 +3620,11 @@ SMESH_MeshEditor_i::ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::PointStruct& thePoint, const SMESH::PointStruct& thePoint,
const SMESH::double_array& theScaleFact) const SMESH::double_array& theScaleFact)
{ {
SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true); TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
if ( !myPreviewMode ) {
TPythonDump aPythonDump; SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true);
DumpGroupsList(aPythonDump,aGroups); if (!myPreviewMode) {
DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".Scale(" aPythonDump << this << ".Scale("
<< theObject << "," << theObject << ","
<< "SMESH.PointStruct(" <<thePoint.x << "," << "SMESH.PointStruct(" <<thePoint.x << ","
@ -3674,8 +3671,8 @@ SMESH_MeshEditor_i::ScaleMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
<< theMeshName << "' )"; << theMeshName << "' )";
} }
//dump "GetGroups" // dump "GetGroups"
if(!myPreviewMode && mesh_i) if (!myPreviewMode && mesh_i)
mesh_i->GetGroups(); mesh_i->GetGroups();
return mesh._retn(); return mesh._retn();

View File

@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _SMESH_PYTHONDUMP_HXX_ #ifndef _SMESH_PYTHONDUMP_HXX_
#define _SMESH_PYTHONDUMP_HXX_ #define _SMESH_PYTHONDUMP_HXX_
@ -167,6 +166,9 @@ namespace SMESH
TPythonDump& TPythonDump&
operator<<(const SMESH::ListOfGroups& theList); operator<<(const SMESH::ListOfGroups& theList);
TPythonDump&
operator<<(const SMESH::ListOfGroups * theList);
TPythonDump& TPythonDump&
operator<<(const SMESH::ListOfIDSources& theList); operator<<(const SMESH::ListOfIDSources& theList);

View File

@ -3139,7 +3139,8 @@ class Mesh:
return [] return []
## Generates new elements by rotation of the elements of object around the axis ## 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 Axis the axis of rotation, AxisStruct or line(geom object)
# @param AngleInRadians the angle of Rotation # @param AngleInRadians the angle of Rotation
# @param NbOfSteps number of steps # @param NbOfSteps number of steps
@ -3174,7 +3175,8 @@ class Mesh:
return [] return []
## Generates new elements by rotation of the elements of object around the axis ## 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 Axis the axis of rotation, AxisStruct or line(geom object)
# @param AngleInRadians the angle of Rotation # @param AngleInRadians the angle of Rotation
# @param NbOfSteps number of steps # @param NbOfSteps number of steps
@ -3209,7 +3211,8 @@ class Mesh:
return [] return []
## Generates new elements by rotation of the elements of object around the axis ## 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 Axis the axis of rotation, AxisStruct or line(geom object)
# @param AngleInRadians the angle of Rotation # @param AngleInRadians the angle of Rotation
# @param NbOfSteps number of steps # @param NbOfSteps number of steps
@ -3286,7 +3289,8 @@ class Mesh:
return [] return []
## Generates new elements by extrusion of the elements which belong to the object ## 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 StepVector vector, defining the direction and value of extrusion
# @param NbOfSteps the number of steps # @param NbOfSteps the number of steps
# @param MakeGroups forces the generation of new groups from existing ones # @param MakeGroups forces the generation of new groups from existing ones
@ -3307,7 +3311,8 @@ class Mesh:
return [] return []
## Generates new elements by extrusion of the elements which belong to the object ## 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 StepVector vector, defining the direction and value of extrusion
# @param NbOfSteps the number of steps # @param NbOfSteps the number of steps
# @param MakeGroups to generate new groups from existing ones # @param MakeGroups to generate new groups from existing ones
@ -3328,7 +3333,8 @@ class Mesh:
return [] return []
## Generates new elements by extrusion of the elements which belong to the object ## 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 StepVector vector, defining the direction and value of extrusion
# @param NbOfSteps the number of steps # @param NbOfSteps the number of steps
# @param MakeGroups forces the generation of new groups from existing ones # @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 ## Generates new elements by extrusion of the given elements
# The path of extrusion must be a meshed edge. # 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 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 NodeStart the start node from Path. Defines the direction of extrusion
# @param HasAngles allows the shape to be rotated around the path # @param HasAngles allows the shape to be rotated around the path
@ -3379,8 +3385,7 @@ class Mesh:
Parameters = AnglesParameters + var_separator + RefPointParameters Parameters = AnglesParameters + var_separator + RefPointParameters
self.mesh.SetParameters(Parameters) self.mesh.SetParameters(Parameters)
if (isinstance(Path, Mesh)): if (isinstance(Path, Mesh)): Path = Path.GetMesh()
Path = Path.GetMesh()
if isinstance(Base, list): if isinstance(Base, list):
IDsOfElements = [] IDsOfElements = []
@ -3443,7 +3448,8 @@ class Mesh:
## Generates new elements by extrusion of the elements which belong to the object ## Generates new elements by extrusion of the elements which belong to the object
# The path of extrusion must be a meshed edge. # 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 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 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 # @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 ## Generates new elements by extrusion of the elements which belong to the object
# The path of extrusion must be a meshed edge. # 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 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 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 # @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 ## Generates new elements by extrusion of the elements which belong to the object
# The path of extrusion must be a meshed edge. # 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 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 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 # @param NodeStart the first or the last node on the edge. Defines the direction of extrusion