//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File : SMESH_MeshEditor.idl
-//
+
#ifndef _SMESH_MESHEDITOR_IDL_
#define _SMESH_MESHEDITOR_IDL_
module SMESH
{
enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
-
+
/*!
* This interface makes modifications on the Mesh - removing elements and nodes etc.
*/
* \return \c true if nodes are correctly removed or \c false otherwise
*/
boolean RemoveNodes(in long_array IDsOfNodes);
-
+
/*!
* \brief Remove all orphan nodes.
* \return number of removed nodes
* \return TRUE in case of success, FALSE otherwise.
*/
boolean TriToQuad (in long_array IDsOfElements,
- in NumericalFunctor Criterion,
- in double MaxAngle);
+ in NumericalFunctor Criterion,
+ in double MaxAngle);
/*!
* \brief Fuse neighbour triangles into quadrangles.
* Behaves like the above method, taking list of elements from \a theObject
*/
boolean TriToQuadObject (in SMESH_IDSource theObject,
- in NumericalFunctor Criterion,
- in double MaxAngle);
+ in NumericalFunctor Criterion,
+ in double MaxAngle);
/*!
* \brief Split quadrangles into triangles.
* \return TRUE in case of success, FALSE otherwise.
*/
boolean QuadToTri (in long_array IDsOfElements,
- in NumericalFunctor Criterion);
+ in NumericalFunctor Criterion);
/*!
* \brief Split quadrangles into triangles.
* Behaves like the above method, taking list of elements from \a theObject
*/
boolean QuadToTriObject (in SMESH_IDSource theObject,
- in NumericalFunctor Criterion);
+ in NumericalFunctor Criterion);
/*!
* \brief Split quadrangles into triangles.
* \return TRUE in case of success, FALSE otherwise.
*/
boolean SplitQuad (in long_array IDsOfElements,
- in boolean Diag13);
+ in boolean Diag13);
/*!
* \brief Split quadrangles into triangles.
* Behaves like the above method, taking list of elements from \a theObject
*/
boolean SplitQuadObject (in SMESH_IDSource theObject,
- in boolean Diag13);
+ in boolean Diag13);
/*!
* Find better splitting of the given quadrangle.
* diagonal is better, 0 if error occurs.
*/
long BestSplit (in long IDOfQuad,
- in NumericalFunctor Criterion);
+ in NumericalFunctor Criterion);
/*!
* \brief Split volumic elements into tetrahedrons
in Smooth_Method Method);
boolean SmoothObject(in SMESH_IDSource theObject,
- in long_array IDsOfFixedNodes,
- in long MaxNbOfIterations,
- in double MaxAspectRatio,
- in Smooth_Method Method);
+ in long_array IDsOfFixedNodes,
+ in long MaxNbOfIterations,
+ in double MaxAspectRatio,
+ in Smooth_Method Method);
boolean SmoothParametric(in long_array IDsOfElements,
in long_array IDsOfFixedNodes,
* \param NbOfSteps - number of elements to generate from one element
*/
void RotationSweepObject(in SMESH_IDSource theObject,
- in AxisStruct Axix,
- in double AngleInRadians,
- in long NbOfSteps,
- in double Tolerance);
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
/*!
* \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups
* \param NbOfSteps - number of elements to generate from one element
*/
void RotationSweepObject1D(in SMESH_IDSource theObject,
- in AxisStruct Axix,
- in double AngleInRadians,
- in long NbOfSteps,
- in double Tolerance);
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
/*!
* \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups
*/
ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource theObject,
- in AxisStruct Axix,
- in double AngleInRadians,
- in long NbOfSteps,
- in double Tolerance);
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
/*!
* \brief Genarate dim+1 elements by rotation of the object around axis
* \param theObject - object containing elements to ratate
* \param NbOfSteps - number of elements to generate from one element
*/
void RotationSweepObject2D(in SMESH_IDSource theObject,
- in AxisStruct Axix,
- in double AngleInRadians,
- in long NbOfSteps,
- in double Tolerance);
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
/*!
* \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups
*/
ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource theObject,
- in AxisStruct Axix,
- in double AngleInRadians,
- in long NbOfSteps,
- in double Tolerance);
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
/*!
* \brief Genarate dim+1 elements by extrusion of elements along vector
* \param IDsOfElements - elements to sweep
in DirStruct StepVector,
in long NbOfSteps);
/*!
- * Generate new elements by extrusion of theElements
+ * Generate new elements by extrusion of theElements
* by StepVector by NbOfSteps
* param ExtrFlags set flags for performing extrusion
* param SewTolerance - uses for comparing locations of nodes if flag
void AdvancedExtrusion(in long_array IDsOfElements,
in DirStruct StepVector,
in long NbOfSteps,
- in long ExtrFlags,
- in double SewTolerance);
+ in long ExtrFlags,
+ in double SewTolerance);
/*!
* \brief Same as previous but additionally create groups of elements
* generated from elements belonging to preexisting groups
in double SewTolerance);
void ExtrusionSweepObject(in SMESH_IDSource theObject,
- in DirStruct StepVector,
- in long NbOfSteps);
+ in DirStruct StepVector,
+ in long NbOfSteps);
ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource theObject,
in DirStruct StepVector,
in long NbOfSteps);
void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
- in DirStruct StepVector,
- in long NbOfSteps);
+ in DirStruct StepVector,
+ in long NbOfSteps);
ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject,
in DirStruct StepVector,
in long NbOfSteps);
void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
- in DirStruct StepVector,
- in long NbOfSteps);
+ in DirStruct StepVector,
+ in long NbOfSteps);
ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject,
in DirStruct StepVector,
in long NbOfSteps);
};
ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements,
- in SMESH_IDSource Path,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean LinearVariation,
- in boolean HasRefPoint,
- in PointStruct RefPoint,
- in boolean MakeGroups,
- in ElementType ElemType,
- out Extrusion_Error Error);
+ in SMESH_IDSource Path,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean LinearVariation,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ in boolean MakeGroups,
+ in ElementType ElemType,
+ out Extrusion_Error Error);
ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject,
- in SMESH_IDSource Path,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean LinearVariation,
- in boolean HasRefPoint,
- in PointStruct RefPoint,
- in boolean MakeGroups,
- in ElementType ElemType,
- out Extrusion_Error Error);
+ in SMESH_IDSource Path,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean LinearVariation,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ in boolean MakeGroups,
+ in ElementType ElemType,
+ out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements,
- in SMESH_Mesh PathMesh,
- in GEOM::GEOM_Object PathShape,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean HasRefPoint,
- in PointStruct RefPoint);
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathMakeGroups(in long_array IDsOfElements,
in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape,
out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource theObject,
- in SMESH_Mesh PathMesh,
- in GEOM::GEOM_Object PathShape,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean HasRefPoint,
- in PointStruct RefPoint);
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathObjectMakeGroups(in SMESH_IDSource theObject,
in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape,
out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject,
- in SMESH_Mesh PathMesh,
- in GEOM::GEOM_Object PathShape,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean HasRefPoint,
- in PointStruct RefPoint);
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject,
- in SMESH_Mesh PathMesh,
- in GEOM::GEOM_Object PathShape,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean HasRefPoint,
- in PointStruct RefPoint,
- out Extrusion_Error Error);
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ out Extrusion_Error Error);
Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject,
- in SMESH_Mesh PathMesh,
- in GEOM::GEOM_Object PathShape,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean HasRefPoint,
- in PointStruct RefPoint);
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint);
ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject,
- in SMESH_Mesh PathMesh,
- in GEOM::GEOM_Object PathShape,
- in long NodeStart,
- in boolean HasAngles,
- in double_array Angles,
- in boolean HasRefPoint,
- in PointStruct RefPoint,
- out Extrusion_Error Error);
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ out Extrusion_Error Error);
/*!
* Compute rotation angles for ExtrusionAlongPath as linear variation
* of given angles along path steps
- * param PathMesh mesh containing a 1D sub-mesh on the edge, along
+ * param PathMesh mesh containing a 1D sub-mesh on the edge, along
* which proceeds the extrusion
- * param PathShape is shape(edge); as the mesh can be complex, the edge
+ * param PathShape is shape(edge); as the mesh can be complex, the edge
* is used to define the sub-mesh for the path
*/
double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
in string MeshName);
void MirrorObject (in SMESH_IDSource theObject,
- in AxisStruct Mirror,
- in MirrorType Type,
- in boolean Copy);
+ in AxisStruct Mirror,
+ in MirrorType Type,
+ in boolean Copy);
ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
in AxisStruct Mirror,
in MirrorType Type);
in string MeshName);
void TranslateObject (in SMESH_IDSource theObject,
- in DirStruct Vector,
- in boolean Copy);
+ in DirStruct Vector,
+ in boolean Copy);
ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
in DirStruct Vector);
SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
in string MeshName);
void RotateObject (in SMESH_IDSource theObject,
- in AxisStruct Axis,
- in double AngleInRadians,
- in boolean Copy);
+ in AxisStruct Axis,
+ in double AngleInRadians,
+ in boolean Copy);
ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
in AxisStruct Axis,
in double AngleInRadians);
out array_of_long_array GroupsOfNodes);
void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
- in double Tolerance,
- out array_of_long_array GroupsOfNodes);
+ in double Tolerance,
+ out array_of_long_array GroupsOfNodes);
void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
in double Tolerance,
* \return List of groups of equal elements.
*/
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 equal elements in the whole mesh.
*/
void MergeEqualElements();
-
+
/*!
* If the given ID is a valid node ID (nodeID > 0), just move this node, else
* move the node closest to the point to point's location and return ID of the node
in long FirstNodeID2,
in long SecondNodeID2,
in long LastNodeID2,
- in boolean CreatePolygons,
- in boolean CreatePolyedrs);
+ in boolean CreatePolygons,
+ in boolean CreatePolyedrs);
Sew_Error SewConformFreeBorders (in long FirstNodeID1,
in long SecondNodeID1,
in long LastNodeIDOnFreeBorder,
in long FirstNodeIDOnSide,
in long LastNodeIDOnSide,
- in boolean CreatePolygons,
- in boolean CreatePolyedrs);
+ in boolean CreatePolygons,
+ in boolean CreatePolyedrs);
Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
in long_array IDsOfSide2Elements,
boolean ChangeElemNodes(in long ide, in long_array newIDs);
/*!
- * Return data of mesh edition preview which is computed provided
+ * Return data of mesh edition preview which is computed provided
* that the editor was obtained trough SMESH_Mesh::GetMeshEditPreviewer()
*/
MeshPreviewStruct GetPreviewData();
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* \param theNodes - identifiers of nodes to be doubled
- * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
- * nodes. If list of element identifiers is empty then nodes are doubled but
+ * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
+ * nodes. If list of element identifiers is empty then nodes are doubled but
* they not assigned to elements
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
*/
- boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems );
+ boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
*/
- boolean DoubleNode( in long theNodeId, in long_array theModifiedElems );
+ boolean DoubleNode( in long theNodeId, in long_array theModifiedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
*/
- boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
+ boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
in SMESH_GroupBase theModifiedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
- * Works as DoubleNodeGroup() described above, but returns a new group with
+ * Works as DoubleNodeGroup() described above, but returns a new group with
* newly created nodes.
* \param theNodes - group of nodes to be doubled.
* \param theModifiedElems - group of elements to be updated.
* \return a new group with newly created nodes
* \sa DoubleNodeGroup()
*/
- SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
- in SMESH_GroupBase theModifiedElems );
+ SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
+ in SMESH_GroupBase theModifiedElems );
/*!
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
*/
- boolean DoubleNodeGroups( in ListOfGroups theNodes,
+ boolean DoubleNodeGroups( in ListOfGroups theNodes,
in ListOfGroups theModifiedElems );
-
+
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* \param theElems - the list of elements (edges or faces) to be replicated
* The nodes for duplication could be found from these elements
* \param theNodesNot - list of nodes to NOT replicate
- * \param theAffectedElems - the list of elements (cells and edges) to which the
+ * \param theAffectedElems - the list of elements (cells and edges) to which the
* replicated nodes should be associated to.
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroup(), DoubleNodeGroups()
*/
boolean DoubleNodeElem( in long_array theElems,
in long_array theNodesNot,
- in long_array theAffectedElems );
+ in long_array theAffectedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
*/
- boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
+ boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
in SMESH_GroupBase theNodesNot,
in SMESH_GroupBase theAffectedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
- * Works as DoubleNodeElemGroup() described above, but returns a new group with
+ * Works as DoubleNodeElemGroup() described above, but returns a new group with
* newly created elements.
* \param theElems - group of of elements (edges or faces) to be replicated
* \param theNodesNot - group of nodes not to replicated
* \return a new group with newly created elements
* \sa DoubleNodeElemGroup()
*/
- SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
- in SMESH_GroupBase theNodesNot,
- in SMESH_GroupBase theAffectedElems );
-
+ SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
+ in SMESH_GroupBase theNodesNot,
+ in SMESH_GroupBase theAffectedElems );
+
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* This method provided for convenience works as DoubleNodes() described above.
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
*/
- boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
+ boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
in SMESH_GroupBase theNodesNot,
in GEOM::GEOM_Object theShape );
* \param meshName - a name of new mesh to store created boundary elements in,
* "" means not to create the new mesh
* \param toCopyElements - if true, the checked elements will be copied into the new mesh
- * \param toCopyExistingBondary - if true, not only new but also pre-existing
+ * \param toCopyExistingBondary - if true, not only new but also pre-existing
* boundary elements will be copied into the new mesh
* \param group - returns the create group, if any
* \retval SMESH::SMESH_Mesh - the mesh where elements were added to
*/
SMESH::SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
- in Bnd_Dimension dimension,
+ in Bnd_Dimension dimension,
in string groupName,
in string meshName,
in boolean toCopyElements,
//
// 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
//!< Copy a node
SMDS_MeshNode* Copy( const SMDS_MeshNode* anElemNode )
{
- return _myMeshDS->AddNodeWithID(anElemNode->X(), anElemNode->Y(), anElemNode->Z(),
+ return _myMeshDS->AddNodeWithID(anElemNode->X(), anElemNode->Y(), anElemNode->Z(),
anElemNode->GetID());
}
};// struct TPreviewMesh
if ( isOut ) {
#ifdef _DEBUG_
MESSAGE ( "FACE " << FaceID << " (" << u << "," << v << ") out of "
- << " u( " << surf.FirstUParameter()
- << "," << surf.LastUParameter()
- << ") v( " << surf.FirstVParameter()
+ << " u( " << surf.FirstUParameter()
+ << "," << surf.LastUParameter()
+ << ") v( " << surf.FirstVParameter()
<< "," << surf.LastVParameter() << ")" );
-#endif
+#endif
THROW_SALOME_CORBA_EXCEPTION("Invalid UV", SALOME::BAD_PARAM);
}
myMesh->GetMeshDS()->Modified();
if ( stat )
myMesh->SetIsModified( true ); // issue 0020693
-
+
storeResult(aMeshEditor);
return stat;
SMESH::long_array_var anElementsId = elems->GetIDs();
TIDSortedElemSet elemSet;
arrayToSet( anElementsId, GetMeshDS(), elemSet, SMDSAbs_Volume );
-
+
::SMESH_MeshEditor anEditor (myMesh);
anEditor.SplitVolumesIntoTetra( elemSet, int( methodFlags ));
myMesh->GetMeshDS()->Modified();
//=======================================================================
//function : rotationSweep
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
//=======================================================================
//function : RotationSweepMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
CORBA::Long theNbOfSteps,
CORBA::Double theTolerance)
{
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
+
SMESH::ListOfGroups *aGroups = rotationSweep(theIDsOfElements,
theAxis,
theAngleInRadians,
theNbOfSteps,
theTolerance,
true);
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump<< this << ".RotationSweepMakeGroups( "
- << theIDsOfElements << ", "
- << theAxis << ", "
- << theAngleInRadians << ", "
- << theNbOfSteps << ", "
- << theTolerance << " )";
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".RotationSweepMakeGroups( "
+ << theIDsOfElements << ", "
+ << theAxis << ", "
+ << theAngleInRadians << ", "
+ << theNbOfSteps << ", "
+ << theTolerance << " )";
}
return aGroups;
}
//=======================================================================
//function : RotationSweepObjectMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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,
theNbOfSteps,
theTolerance,
true);
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump<< this << ".RotationSweepObjectMakeGroups( "
- << theObject << ", "
- << theAxis << ", "
- << theAngleInRadians << ", "
- << theNbOfSteps << ", "
- << theTolerance << " )";
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".RotationSweepObjectMakeGroups( "
+ << theObject << ", "
+ << theAxis << ", "
+ << theAngleInRadians << ", "
+ << theNbOfSteps << ", "
+ << theTolerance << " )";
}
return aGroups;
}
//=======================================================================
//function : RotationSweepObject1DMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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,
theTolerance,
true,
SMDSAbs_Edge);
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump<< this << ".RotationSweepObject1DMakeGroups( "
- << theObject << ", "
- << theAxis << ", "
- << theAngleInRadians << ", "
- << theNbOfSteps << ", "
- << theTolerance << " )";
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".RotationSweepObject1DMakeGroups( "
+ << theObject << ", "
+ << theAxis << ", "
+ << theAngleInRadians << ", "
+ << theNbOfSteps << ", "
+ << theTolerance << " )";
}
return aGroups;
}
//=======================================================================
//function : RotationSweepObject2DMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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,
theTolerance,
true,
SMDSAbs_Face);
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump<< this << ".RotationSweepObject2DMakeGroups( "
- << theObject << ", "
- << theAxis << ", "
- << theAngleInRadians << ", "
- << theNbOfSteps << ", "
- << theTolerance << " )";
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".RotationSweepObject2DMakeGroups( "
+ << theObject << ", "
+ << theAxis << ", "
+ << theAngleInRadians << ", "
+ << theNbOfSteps << ", "
+ << theTolerance << " )";
}
return aGroups;
}
//=======================================================================
//function : extrusionSweep
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
{
initData();
- try {
+ try {
#ifdef NO_CAS_CATCH
OCC_CATCH_SIGNALS;
#endif
return theMakeGroups ? getGroups(groupIds.get()) : 0;
} catch(Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
INFOS( "SMESH_MeshEditor_i::ExtrusionSweep fails - "<< aFail->GetMessageString() );
}
return 0;
CORBA::Long theNbOfSteps)
{
extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, false );
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
TPythonDump() << this << ".ExtrusionSweep( "
<< theIDsOfElements << ", " << theStepVector <<", " << theNbOfSteps << " )";
}
{
SMESH::long_array_var anElementsId = theObject->GetIDs();
extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false );
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
TPythonDump() << this << ".ExtrusionSweepObject( "
<< theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
}
//=======================================================================
//function : ExtrusionSweepMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
const SMESH::DirStruct& theStepVector,
CORBA::Long theNbOfSteps)
{
- SMESH::ListOfGroups* aGroups = extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, true );
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump << this << ".ExtrusionSweepMakeGroups( "
- << theIDsOfElements << ", " << theStepVector <<", " << theNbOfSteps << " )";
+ SMESH::ListOfGroups* aGroups = extrusionSweep(theIDsOfElements, theStepVector, theNbOfSteps, true);
+
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".ExtrusionSweepMakeGroups( " << theIDsOfElements
+ << ", " << theStepVector <<", " << theNbOfSteps << " )";
}
return aGroups;
}
+
//=======================================================================
//function : ExtrusionSweepObjectMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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 );
+ SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector, theNbOfSteps, true);
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump<< this << ".ExtrusionSweepObjectMakeGroups( "
- << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".ExtrusionSweepObjectMakeGroups( " << theObject
+ << ", " << theStepVector << ", " << theNbOfSteps << " )";
}
return aGroups;
}
//=======================================================================
//function : ExtrusionSweepObject1DMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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 );
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( "
- << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
+ SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
+ theNbOfSteps, true, SMDSAbs_Edge);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( " << theObject
+ << ", " << theStepVector << ", " << theNbOfSteps << " )";
}
return aGroups;
}
//=======================================================================
//function : ExtrusionSweepObject2DMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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 );
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
- aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( "
- << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
+ SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
+ theNbOfSteps, true, SMDSAbs_Face);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
+ aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( " << theObject
+ << ", " << theStepVector << ", " << theNbOfSteps << " )";
}
return aGroups;
}
//=======================================================================
//function : advancedExtrusion
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
//=======================================================================
//function : AdvancedExtrusionMakeGroups
-//purpose :
+//purpose :
//=======================================================================
-
SMESH::ListOfGroups*
SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsOfElements,
const SMESH::DirStruct& theStepVector,
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,
theSewTolerance,
true);
- if ( !myPreviewMode ) {
- TPythonDump() << "stepVector = " << theStepVector;
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".AdvancedExtrusionMakeGroups("
<< theIDsOfElements
<< ", stepVector, "
//=======================================================================
//function : extrusionAlongPath
-//purpose :
+//purpose :
//=======================================================================
-
SMESH::ListOfGroups*
SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array & theIDsOfElements,
SMESH::SMESH_Mesh_ptr thePathMesh,
//=======================================================================
//function : extrusionAlongPathX
-//purpose :
+//purpose :
//=======================================================================
-
SMESH::ListOfGroups*
SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array & IDsOfElements,
SMESH::SMESH_IDSource_ptr Path,
SMESH_Mesh_i* aMeshImp = SMESH::DownCast<SMESH_Mesh_i*>( Path );
if(aMeshImp) {
// path as mesh
- SMDS_MeshNode* aNodeStart =
+ SMDS_MeshNode* aNodeStart =
(SMDS_MeshNode*)aMeshImp->GetImpl().GetMeshDS()->FindNode(NodeStart);
if ( !aNodeStart ) {
Error = SMESH::SMESH_MeshEditor::EXTR_BAD_STARTING_NODE;
// path as submesh
SMESH::SMESH_Mesh_ptr aPathMesh = aSubMeshImp->GetFather();
aMeshImp = SMESH::DownCast<SMESH_Mesh_i*>( aPathMesh );
- SMDS_MeshNode* aNodeStart =
+ SMDS_MeshNode* aNodeStart =
(SMDS_MeshNode*)aMeshImp->GetImpl().GetMeshDS()->FindNode(NodeStart);
if ( !aNodeStart ) {
Error = SMESH::SMESH_MeshEditor::EXTR_BAD_STARTING_NODE;
return EmptyGr;
}
- SMESH_subMesh* aSubMesh =
+ SMESH_subMesh* aSubMesh =
aMeshImp->GetImpl().GetSubMeshContaining(aSubMeshImp->GetId());
error = anEditor.ExtrusionAlongTrack( elements, aSubMesh, aNodeStart,
HasAngles, angles, LinearVariation,
//function : ExtrusionAlongPath
//purpose :
//=======================================================================
-
SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfElements,
SMESH::SMESH_Mesh_ptr thePathMesh,
//function : ExtrusionAlongPathObject
//purpose :
//=======================================================================
-
SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh,
//function : ExtrusionAlongPathObject1D
//purpose :
//=======================================================================
-
SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh,
//function : ExtrusionAlongPathObject2D
//purpose :
//=======================================================================
-
SMESH::SMESH_MeshEditor::Extrusion_Error
SMESH_MeshEditor_i::ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh,
//=======================================================================
//function : ExtrusionAlongPathMakeGroups
-//purpose :
+//purpose :
//=======================================================================
-
SMESH::ListOfGroups*
SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array& theIDsOfElements,
SMESH::SMESH_Mesh_ptr thePathMesh,
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,
theRefPoint,
true,
Error);
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0;
- TPythonDump aPythonDump;
- if(isDumpGroups) {
- aPythonDump << "("<<aGroups;
- }
- if(isDumpGroups)
- aPythonDump << ", error)";
+ if (isDumpGroups)
+ aPythonDump << "(" << aGroups << ", error)";
else
aPythonDump <<"error";
//=======================================================================
//function : ExtrusionAlongPathObjectMakeGroups
-//purpose :
+//purpose :
//=======================================================================
-
SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh,
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,
true,
Error);
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0;
- TPythonDump aPythonDump;
- if(isDumpGroups) {
- aPythonDump << "("<<aGroups;
- }
- if(isDumpGroups)
- aPythonDump << ", error)";
+ if (isDumpGroups)
+ aPythonDump << "(" << aGroups << ", error)";
else
aPythonDump <<"error";
//=======================================================================
//function : ExtrusionAlongPathObject1DMakeGroups
-//purpose :
+//purpose :
//=======================================================================
-
SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh,
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,
Error,
SMDSAbs_Edge);
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0;
- TPythonDump aPythonDump;
- if(isDumpGroups) {
- aPythonDump << "("<<aGroups;
- }
- if(isDumpGroups)
- aPythonDump << ", error)";
+ if (isDumpGroups)
+ aPythonDump << "(" << aGroups << ", error)";
else
- aPythonDump <<"error";
+ aPythonDump << "error";
aPythonDump << " = " << this << ".ExtrusionAlongPathObject1DMakeGroups( "
<< theObject << ", "
//=======================================================================
//function : ExtrusionAlongPathObject2DMakeGroups
-//purpose :
+//purpose :
//=======================================================================
-
SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr thePathMesh,
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,
Error,
SMDSAbs_Face);
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
bool isDumpGroups = aGroups && aGroups->length() > 0;
- TPythonDump aPythonDump;
- if(isDumpGroups) {
- aPythonDump << "("<<aGroups;
- }
- if(isDumpGroups)
- aPythonDump << ", error)";
+ if (isDumpGroups)
+ aPythonDump << "(" << aGroups << ", error)";
else
- aPythonDump <<"error";
+ aPythonDump << "error";
aPythonDump << " = " << this << ".ExtrusionAlongPathObject2DMakeGroups( "
<< theObject << ", "
//=======================================================================
//function : ExtrusionAlongPathObjX
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr Object,
//=======================================================================
//function : ExtrusionAlongPathX
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups* SMESH_MeshEditor_i::
ExtrusionAlongPathX(const SMESH::long_array& IDsOfElements,
/*!
* \brief Compute rotation angles for ExtrusionAlongPath as linear variation
* of given angles along path steps
- * \param PathMesh mesh containing a 1D sub-mesh on the edge, along
+ * \param PathMesh mesh containing a 1D sub-mesh on the edge, along
* which proceeds the extrusion
- * \param PathShape is shape(edge); as the mesh can be complex, the edge
+ * \param PathShape is shape(edge); as the mesh can be complex, the edge
* is used to define the sub-mesh for the path
*/
//================================================================================
//=======================================================================
//function : mirror
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
//=======================================================================
//function : MirrorMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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 )
{
arrayToSet(theIDsOfElements, GetMeshDS(), elements);
aGroups = mirror(elements, theMirror, theMirrorType, true, true);
}
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".MirrorMakeGroups( "
<< theIDsOfElements << ", "
<< theMirror << ", "
//=======================================================================
//function : MirrorObjectMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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))
aGroups = mirror(elements, theMirror, theMirrorType, true, true);
- if ( !myPreviewMode )
+ if (!myPreviewMode)
{
- TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".MirrorObjectMakeGroups( "
<< theObject << ", "
//=======================================================================
//function : MirrorMakeMesh
-//purpose :
+//purpose :
//=======================================================================
SMESH::SMESH_Mesh_ptr
mesh_i->CreateGroupServants();
}
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
pydump << mesh << " = " << this << ".MirrorMakeMesh( "
<< theIDsOfElements << ", "
<< theMirror << ", "
}
//dump "GetGroups"
- if(!myPreviewMode && mesh_i)
+ if (!myPreviewMode && mesh_i)
mesh_i->GetGroups();
return mesh._retn();
//=======================================================================
//function : MirrorObjectMakeMesh
-//purpose :
+//purpose :
//=======================================================================
SMESH::SMESH_Mesh_ptr
false, theCopyGroups, & mesh_i->GetImpl());
mesh_i->CreateGroupServants();
}
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
pydump << mesh << " = " << this << ".MirrorObjectMakeMesh( "
<< theObject << ", "
<< theMirror << ", "
}
//dump "GetGroups"
- if(!myPreviewMode && mesh_i)
+ if (!myPreviewMode && mesh_i)
mesh_i->GetGroups();
return mesh._retn();
//=======================================================================
//function : translate
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
const SMESH::DirStruct & theVector,
CORBA::Boolean theCopy)
{
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
TPythonDump() << this << ".Translate( "
<< theIDsOfElements << ", "
<< theVector << ", "
<< theCopy << " )";
}
- if ( theIDsOfElements.length() )
- {
+ if (theIDsOfElements.length()) {
TIDSortedElemSet elements;
arrayToSet(theIDsOfElements, GetMeshDS(), elements);
- translate(elements,theVector,theCopy,false);
+ translate(elements, theVector, theCopy, false);
}
}
const SMESH::DirStruct & theVector,
CORBA::Boolean theCopy)
{
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
TPythonDump() << this << ".TranslateObject( "
<< theObject << ", "
<< theVector << ", "
<< theCopy << " )";
}
TIDSortedElemSet elements;
- if ( idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
- translate( elements, theVector, theCopy, false);
+ if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+ translate(elements, theVector, theCopy, false);
}
//=======================================================================
//function : TranslateMakeGroups
-//purpose :
+//purpose :
//=======================================================================
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);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".TranslateMakeGroups( "
<< theIDsOfElements << ", "
<< theVector << " )";
//=======================================================================
//function : TranslateObjectMakeGroups
-//purpose :
+//purpose :
//=======================================================================
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);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".TranslateObjectMakeGroups( "
<< theObject << ", "
<< theVector << " )";
//=======================================================================
//function : TranslateMakeMesh
-//purpose :
+//purpose :
//=======================================================================
SMESH::SMESH_Mesh_ptr
}
//dump "GetGroups"
- if(!myPreviewMode && mesh_i)
+ if (!myPreviewMode && mesh_i)
mesh_i->GetGroups();
return mesh._retn();
//=======================================================================
//function : TranslateObjectMakeMesh
-//purpose :
+//purpose :
//=======================================================================
SMESH::SMESH_Mesh_ptr
}
}
- //dump "GetGroups"
- if(!myPreviewMode && mesh_i)
+ // dump "GetGroups"
+ if (!myPreviewMode && mesh_i)
mesh_i->GetGroups();
return mesh._retn();
//=======================================================================
//function : rotate
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
::SMESH_MeshEditor::PGroupIDs groupIds =
anEditor.Transform (theElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
- if(theCopy)
+ if(theCopy)
storeResult(anEditor);
else
{
CORBA::Double theAngle,
CORBA::Boolean theCopy)
{
- if ( !myPreviewMode ) {
+ if (!myPreviewMode) {
TPythonDump() << this << ".Rotate( "
<< theIDsOfElements << ", "
<< theAxis << ", "
<< theAngle << ", "
<< theCopy << " )";
}
- if ( theIDsOfElements.length() > 0 )
+ if (theIDsOfElements.length() > 0)
{
TIDSortedElemSet elements;
arrayToSet(theIDsOfElements, GetMeshDS(), elements);
//=======================================================================
//function : RotateMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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 )
+ if (theIDsOfElements.length() > 0)
{
TIDSortedElemSet elements;
arrayToSet(theIDsOfElements, GetMeshDS(), elements);
aGroups = rotate(elements,theAxis,theAngle,true,true);
}
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".RotateMakeGroups( "
<< theIDsOfElements << ", "
<< theAxis << ", "
//=======================================================================
//function : RotateObjectMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
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 (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+ aGroups = rotate(elements, theAxis, theAngle, true, true);
- if ( !myPreviewMode ) {
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".RotateObjectMakeGroups( "
<< theObject << ", "
<< theAxis << ", "
//=======================================================================
//function : RotateMakeMesh
-//purpose :
+//purpose :
//=======================================================================
-SMESH::SMESH_Mesh_ptr
+SMESH::SMESH_Mesh_ptr
SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements,
const SMESH::AxisStruct& theAxis,
CORBA::Double theAngleInRadians,
}
}
- //dump "GetGroups"
- if(!myPreviewMode && mesh_i && theIDsOfElements.length() > 0 )
+ // dump "GetGroups"
+ if (!myPreviewMode && mesh_i && theIDsOfElements.length() > 0 )
mesh_i->GetGroups();
return mesh._retn();
//=======================================================================
//function : RotateObjectMakeMesh
-//purpose :
+//purpose :
//=======================================================================
SMESH::SMESH_Mesh_ptr
}
}
- //dump "GetGroups"
- if(!myPreviewMode && mesh_i)
+ // dump "GetGroups"
+ if (!myPreviewMode && mesh_i)
mesh_i->GetGroups();
return mesh._retn();
//=======================================================================
//function : scale
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
//=======================================================================
//function : ScaleMakeGroups
-//purpose :
+//purpose :
//=======================================================================
SMESH::ListOfGroups*
const SMESH::PointStruct& thePoint,
const SMESH::double_array& theScaleFact)
{
- SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true);
- if ( !myPreviewMode ) {
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
- TPythonDump aPythonDump;
- DumpGroupsList(aPythonDump,aGroups);
+ SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true);
+ if (!myPreviewMode) {
+ DumpGroupsList(aPythonDump, aGroups);
aPythonDump << this << ".Scale("
<< theObject << ","
<< "SMESH.PointStruct(" <<thePoint.x << ","
//=======================================================================
//function : ScaleMakeMesh
-//purpose :
+//purpose :
//=======================================================================
SMESH::SMESH_Mesh_ptr
<< theMeshName << "' )";
}
- //dump "GetGroups"
- if(!myPreviewMode && mesh_i)
+ // dump "GetGroups"
+ if (!myPreviewMode && mesh_i)
mesh_i->GetGroups();
return mesh._retn();
void SMESH_MeshEditor_i::storeResult(::SMESH_MeshEditor& anEditor)
{
- if ( myPreviewMode ) { // --- MeshPreviewStruct filling ---
+ if ( myPreviewMode ) { // --- MeshPreviewStruct filling ---
list<int> aNodesConnectivity;
typedef map<int, int> TNodesMap;
SMDS_ElemIteratorPtr itElemNodes = aMeshElem->nodesIterator();
while ( itElemNodes->more() ) {
- const SMDS_MeshNode* aMeshNode =
+ const SMDS_MeshNode* aMeshNode =
static_cast<const SMDS_MeshNode*>( itElemNodes->next() );
int aNodeID = aMeshNode->GetID();
TNodesMap::iterator anIter = nodesMap.find(aNodeID);
//=======================================================================
//function : ConvertFromQuadratic
-//purpose :
+//purpose :
//=======================================================================
CORBA::Boolean SMESH_MeshEditor_i::ConvertFromQuadratic()
//=======================================================================
//function : makeMesh
-//purpose : create a named imported mesh
+//purpose : create a named imported mesh
//=======================================================================
SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::makeMesh(const char* theMeshName)
//function : DumpGroupsList
//purpose :
//=======================================================================
-void SMESH_MeshEditor_i::DumpGroupsList(TPythonDump & theDumpPython,
+void SMESH_MeshEditor_i::DumpGroupsList(TPythonDump & theDumpPython,
const SMESH::ListOfGroups * theGroupList)
{
bool isDumpGroupList = theGroupList && theGroupList->length() > 0;
{
SMESH::ListOfGroups_var groups = myMesh_i->GetGroups();
set<string> groupNames;
-
+
// Get existing group names
for (int i = 0, nbGroups = groups->length(); i < nbGroups; i++ ) {
SMESH::SMESH_GroupBase_var aGroup = groups[i];
}
++index;
}
-
+
return name;
}
/*!
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
\param theNodes - identifiers of nodes to be doubled
- \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
- nodes. If list of element identifiers is empty then nodes are doubled but
+ \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
+ nodes. If list of element identifiers is empty then nodes are doubled but
they not assigned to elements
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNodes,
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNodes,
const SMESH::long_array& theModifiedElems )
{
initData();
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( CORBA::Long theNodeId,
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( CORBA::Long theNodeId,
const SMESH::long_array& theModifiedElems )
{
SMESH::long_array_var aNodes = new SMESH::long_array;
SMESH::long_array_var aModifiedElems;
if ( !CORBA::is_nil( theModifiedElems ) )
aModifiedElems = theModifiedElems->GetListOfID();
- else
+ else
{
aModifiedElems = new SMESH::long_array;
aModifiedElems->length( 0 );
{
if ( CORBA::is_nil( theNodes ) && theNodes->GetType() != SMESH::NODE )
return false;
-
+
SMESH::SMESH_Group_var aNewGroup;
// Duplicate nodes
aModifiedElems = new SMESH::long_array;
aModifiedElems->length( 0 );
}
-
+
TPythonDump pyDump; // suppress dump by the next line
bool aResult = DoubleNodes( aNodes, aModifiedElems );
aNewGroup->Add(anIds);
}
}
-
+
pyDump << "createdNodes = " << this << ".DoubleNodeGroupNew( " << theNodes << ", "
<< theModifiedElems << " )";
\param theElems - the list of elements (edges or faces) to be replicated
The nodes for duplication could be found from these elements
\param theNodesNot - list of nodes to NOT replicate
- \param theAffectedElems - the list of elements (cells and edges) to which the
+ \param theAffectedElems - the list of elements (cells and edges) to which the
replicated nodes should be associated to.
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNodeGroup(), DoubleNodeGroups()
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theElems,
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theElems,
const SMESH::long_array& theNodesNot,
const SMESH::long_array& theAffectedElems )
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::long_array& theElems,
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::long_array& theElems,
const SMESH::long_array& theNodesNot,
GEOM::GEOM_Object_ptr theShape )
SMESHDS_Mesh* aMeshDS = GetMeshDS();
TIDSortedElemSet anElems, aNodes, anAffected;
- idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
- idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
+ idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
+ idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
idSourceToSet( theAffectedElems, aMeshDS, anAffected, SMDSAbs_All );
bool aResult = aMeshEditor.DoubleNodes( anElems, aNodes, anAffected );
SMESHDS_Mesh* aMeshDS = GetMeshDS();
TIDSortedElemSet anElems, aNodes, anAffected;
- idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
- idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
+ idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
+ idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
idSourceToSet( theAffectedElems, aMeshDS, anAffected, SMDSAbs_All );
-
+
bool aResult = aMeshEditor.DoubleNodes( anElems, aNodes, anAffected );
-
+
storeResult( aMeshEditor) ;
if ( aResult ) {
SMESHDS_Mesh* aMeshDS = GetMeshDS();
TIDSortedElemSet anElems, aNodes, anAffected;
- idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
- idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
+ idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
+ idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
TopoDS_Shape aShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theShape );
bool aResult = aMeshEditor.DoubleNodesInRegion( anElems, aNodes, aShape );
for ( int i = 0, n = theGrpList.length(); i < n; i++ )
{
SMESH::SMESH_GroupBase_var aGrp = theGrpList[ i ];
- if ( !CORBA::is_nil( aGrp ) && (theIsNodeGrp ? aGrp->GetType() == SMESH::NODE
+ if ( !CORBA::is_nil( aGrp ) && (theIsNodeGrp ? aGrp->GetType() == SMESH::NODE
: aGrp->GetType() != SMESH::NODE ) )
{
SMESH::long_array_var anIDs = aGrp->GetIDs();
* \param meshName - a name of new mesh to store created boundary elements in,
* "" means not to create the new mesh
* \param toCopyElements - if true, the checked elements will be copied into the new mesh
- * \param toCopyExistingBondary - if true, not only new but also pre-existing
+ * \param toCopyExistingBondary - if true, not only new but also pre-existing
* boundary elements will be copied into the new mesh
* \param group - returns the create group, if any
* \retval SMESH::SMESH_Mesh - the mesh where elements were added to
if ( dim > SMESH::BND_1DFROM2D )
THROW_SALOME_CORBA_EXCEPTION("Invalid boundary dimension", SALOME::BAD_PARAM);
-
+
SMESHDS_Mesh* aMeshDS = GetMeshDS();
SMESH::SMESH_Mesh_var mesh_var;