SMESH_Mesh* myMesh;
//!< Constructor
TSearchersDeleter(): SMESH_subMeshEventListener( false ), // won't be deleted by submesh
- myMesh(0) {}
+ myMesh(0) {}
//!< Delete theNodeSearcher
static void Delete()
{
//=============================================================================
CORBA::Boolean
- SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
+SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
{
initData();
* AddPolygonalFace
*/
//=============================================================================
-CORBA::Long SMESH_MeshEditor_i::AddPolygonalFace
- (const SMESH::long_array & IDsOfNodes)
+CORBA::Long SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsOfNodes)
{
initData();
nodes[i] = GetMeshDS()->FindNode(IDsOfNodes[i]);
const SMDS_MeshElement* elem = GetMeshDS()->AddPolygonalFace(nodes);
-
+
// Update Python script
TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
#ifdef _DEBUG_
* AddPolyhedralVolume
*/
//=============================================================================
-CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume
- (const SMESH::long_array & IDsOfNodes,
- const SMESH::long_array & Quantities)
+CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & IDsOfNodes,
+ const SMESH::long_array & Quantities)
{
initData();
* AddPolyhedralVolumeByFaces
*/
//=============================================================================
-CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces
- (const SMESH::long_array & IdsOfFaces)
+CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_array & IdsOfFaces)
{
initData();
if ( isOut ) {
#ifdef _DEBUG_
MESSAGE ( "FACE " << FaceID << " (" << u << "," << v << ") out of "
- << " u( " << surf.FirstUParameter()
- << "," << surf.LastUParameter()
- << ") v( " << surf.FirstVParameter()
- << "," << surf.LastVParameter() << ")" );
+ << " u( " << surf.FirstUParameter()
+ << "," << surf.LastUParameter()
+ << ") v( " << surf.FirstVParameter()
+ << "," << surf.LastVParameter() << ")" );
#endif
THROW_SALOME_CORBA_EXCEPTION("Invalid UV", SALOME::BAD_PARAM);
}
//================================================================================
/*!
* \brief function for conversion long_array to TIDSortedElemSet
- * \param IDs - array of IDs
- * \param aMesh - mesh
- * \param aMap - collection to fill
- * \param aType - element type
+ * \param IDs - array of IDs
+ * \param aMesh - mesh
+ * \param aMap - collection to fill
+ * \param aType - element type
*/
//================================================================================
CORBA::Long ind = IDs[i];
const SMDS_MeshElement * elem =
(aType == SMDSAbs_Node ? aMesh->FindNode(ind)
- : aMesh->FindElement(ind));
+ : aMesh->FindElement(ind));
if ( elem && ( aType == SMDSAbs_All || elem->GetType() == aType ))
aMap.insert( elem );
}
//=======================================================================
CORBA::Boolean
- SMESH_MeshEditor_i::Smooth(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
- CORBA::Double MaxAspectRatio,
- SMESH::SMESH_MeshEditor::Smooth_Method Method)
+SMESH_MeshEditor_i::Smooth(const SMESH::long_array & IDsOfElements,
+ const SMESH::long_array & IDsOfFixedNodes,
+ CORBA::Long MaxNbOfIterations,
+ CORBA::Double MaxAspectRatio,
+ SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
return smooth( IDsOfElements, IDsOfFixedNodes, MaxNbOfIterations,
- MaxAspectRatio, Method, false );
+ MaxAspectRatio, Method, false );
}
//=======================================================================
CORBA::Boolean
- SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
- CORBA::Double MaxAspectRatio,
- SMESH::SMESH_MeshEditor::Smooth_Method Method)
+SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array & IDsOfElements,
+ const SMESH::long_array & IDsOfFixedNodes,
+ CORBA::Long MaxNbOfIterations,
+ CORBA::Double MaxAspectRatio,
+ SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
return smooth( IDsOfElements, IDsOfFixedNodes, MaxNbOfIterations,
- MaxAspectRatio, Method, true );
+ MaxAspectRatio, Method, true );
}
//=======================================================================
CORBA::Boolean
- SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
- CORBA::Double MaxAspectRatio,
- SMESH::SMESH_MeshEditor::Smooth_Method Method)
+SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
+ const SMESH::long_array & IDsOfFixedNodes,
+ CORBA::Long MaxNbOfIterations,
+ CORBA::Double MaxAspectRatio,
+ SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
return smoothObject (theObject, IDsOfFixedNodes, MaxNbOfIterations,
MaxAspectRatio, Method, false);
//=======================================================================
CORBA::Boolean
- SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
- CORBA::Double MaxAspectRatio,
- SMESH::SMESH_MeshEditor::Smooth_Method Method)
+SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
+ const SMESH::long_array & IDsOfFixedNodes,
+ CORBA::Long MaxNbOfIterations,
+ CORBA::Double MaxAspectRatio,
+ SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
return smoothObject (theObject, IDsOfFixedNodes, MaxNbOfIterations,
MaxAspectRatio, Method, true);
//=============================================================================
CORBA::Boolean
- SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
- CORBA::Double MaxAspectRatio,
- SMESH::SMESH_MeshEditor::Smooth_Method Method,
- bool IsParametric)
+SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
+ const SMESH::long_array & IDsOfFixedNodes,
+ CORBA::Long MaxNbOfIterations,
+ CORBA::Double MaxAspectRatio,
+ SMESH::SMESH_MeshEditor::Smooth_Method Method,
+ bool IsParametric)
{
initData();
}
//=======================================================================
- /*!
- * \brief Return groups by their IDs
- */
+/*!
+ * \brief Return groups by their IDs
+ */
//=======================================================================
SMESH::ListOfGroups* SMESH_MeshEditor_i::getGroups(const std::list<int>* groupIDs)
CORBA::Long theNbOfSteps,
CORBA::Double theTolerance,
const bool theMakeGroups,
- const SMDSAbs_ElementType theElementType)
+ const SMDSAbs_ElementType theElementType)
{
initData();
::SMESH_MeshEditor anEditor( mesh );
::SMESH_MeshEditor::PGroupIDs groupIds =
- anEditor.RotationSweep (*workElements, Ax1, theAngleInRadians,
- theNbOfSteps, theTolerance, theMakeGroups, makeWalls);
+ anEditor.RotationSweep (*workElements, Ax1, theAngleInRadians,
+ theNbOfSteps, theTolerance, theMakeGroups, makeWalls);
storeResult(anEditor);
return theMakeGroups ? getGroups(groupIds.get()) : 0;
//=======================================================================
void SMESH_MeshEditor_i::RotationSweepObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & theAxis,
- CORBA::Double theAngleInRadians,
- CORBA::Long theNbOfSteps,
- CORBA::Double theTolerance)
+ const SMESH::AxisStruct & theAxis,
+ CORBA::Double theAngleInRadians,
+ CORBA::Long theNbOfSteps,
+ CORBA::Double theTolerance)
{
if ( !myPreviewMode ) {
TPythonDump() << this << ".RotationSweepObject( "
//=======================================================================
void SMESH_MeshEditor_i::ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::DirStruct & theStepVector,
- CORBA::Long theNbOfSteps)
+ const SMESH::DirStruct & theStepVector,
+ CORBA::Long theNbOfSteps)
{
SMESH::long_array_var anElementsId = theObject->GetIDs();
extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false );
CORBA::Long theNbOfSteps)
{
SMESH::ListOfGroups* aGroups = extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, true );
-
+
if ( !myPreviewMode ) {
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
{
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = extrusionSweep (anElementsId, theStepVector, theNbOfSteps, true );
-
+
if ( !myPreviewMode ) {
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( "
- << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
+ << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
}
return aGroups;
}
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( "
- << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
+ << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
}
return aGroups;
}
//=======================================================================
void SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
- const SMESH::DirStruct & theStepVector,
- CORBA::Long theNbOfSteps,
- CORBA::Long theExtrFlags,
- CORBA::Double theSewTolerance)
+ const SMESH::DirStruct & theStepVector,
+ CORBA::Long theNbOfSteps,
+ CORBA::Long theExtrFlags,
+ CORBA::Double theSewTolerance)
{
if ( !myPreviewMode ) {
TPythonDump() << "stepVector = " << theStepVector;
CORBA::Double theSewTolerance)
{
SMESH::ListOfGroups * aGroups = advancedExtrusion( theIDsOfElements,
- theStepVector,
- theNbOfSteps,
- theExtrFlags,
- theSewTolerance,
- true);
-
+ theStepVector,
+ theNbOfSteps,
+ theExtrFlags,
+ theSewTolerance,
+ true);
+
if ( !myPreviewMode ) {
TPythonDump() << "stepVector = " << theStepVector;
TPythonDump aPythonDump;
static SMESH::SMESH_MeshEditor::Extrusion_Error convExtrError( const::SMESH_MeshEditor::Extrusion_Error e )
{
switch ( e ) {
- RETCASE( EXTR_OK );
- RETCASE( EXTR_NO_ELEMENTS );
- RETCASE( EXTR_PATH_NOT_EDGE );
- RETCASE( EXTR_BAD_PATH_SHAPE );
- RETCASE( EXTR_BAD_STARTING_NODE );
- RETCASE( EXTR_BAD_ANGLES_NUMBER );
- RETCASE( EXTR_CANT_GET_TANGENT );
+ RETCASE( EXTR_OK );
+ RETCASE( EXTR_NO_ELEMENTS );
+ RETCASE( EXTR_PATH_NOT_EDGE );
+ RETCASE( EXTR_BAD_PATH_SHAPE );
+ RETCASE( EXTR_BAD_STARTING_NODE );
+ RETCASE( EXTR_BAD_ANGLES_NUMBER );
+ RETCASE( EXTR_CANT_GET_TANGENT );
}
return SMESH::SMESH_MeshEditor::EXTR_OK;
}
//=======================================================================
SMESH::SMESH_MeshEditor::Extrusion_Error
- SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfElements,
- SMESH::SMESH_Mesh_ptr thePathMesh,
- GEOM::GEOM_Object_ptr thePathShape,
- CORBA::Long theNodeStart,
- CORBA::Boolean theHasAngles,
- const SMESH::double_array & theAngles,
- CORBA::Boolean theHasRefPoint,
- const SMESH::PointStruct & theRefPoint)
+SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array & theIDsOfElements,
+ SMESH::SMESH_Mesh_ptr thePathMesh,
+ GEOM::GEOM_Object_ptr thePathShape,
+ CORBA::Long theNodeStart,
+ CORBA::Boolean theHasAngles,
+ const SMESH::double_array & theAngles,
+ CORBA::Boolean theHasRefPoint,
+ const SMESH::PointStruct & theRefPoint)
{
if ( !myPreviewMode ) {
TPythonDump() << "error = " << this << ".ExtrusionAlongPath( "
const SMESH::PointStruct& theRefPoint,
SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
{
- SMESH::ListOfGroups * aGroups = extrusionAlongPath( theIDsOfElements,
- thePathMesh,
- thePathShape,
- theNodeStart,
- theHasAngles,
- theAngles,
- theHasRefPoint,
- theRefPoint,
- true,
- Error);
+ SMESH::ListOfGroups * aGroups = extrusionAlongPath( theIDsOfElements,
+ thePathMesh,
+ thePathShape,
+ theNodeStart,
+ theHasAngles,
+ theAngles,
+ theHasRefPoint,
+ theRefPoint,
+ true,
+ Error);
if ( !myPreviewMode ) {
TPythonDump() << "rotAngles = " << theAngles;
aPythonDump << ", error)";
else
aPythonDump <<"error";
-
+
aPythonDump<<" = "<< this << ".ExtrusionAlongPathMakeGroups( "
<< theIDsOfElements << ", "
<< thePathMesh << ", "
theRefPoint,
true,
Error);
-
+
if ( !myPreviewMode ) {
bool isDumpGroups = aGroups && aGroups->length() > 0;
TPythonDump aPythonDump;
<< theNodeStart << ", "
<< theHasAngles << ", "
<< theAngles << ", "
- << theHasRefPoint << ", "
- << "SMESH.PointStruct( "
- << ( theHasRefPoint ? theRefPoint.x : 0 ) << ", "
- << ( theHasRefPoint ? theRefPoint.y : 0 ) << ", "
- << ( theHasRefPoint ? theRefPoint.z : 0 ) << " ) )";
+ << theHasRefPoint << ", "
+ << "SMESH.PointStruct( "
+ << ( theHasRefPoint ? theRefPoint.x : 0 ) << ", "
+ << ( theHasRefPoint ? theRefPoint.y : 0 ) << ", "
+ << ( theHasRefPoint ? theRefPoint.z : 0 ) << " ) )";
}
return aGroups;
}
/*!
* \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
- * which proceeds the extrusion
- * \param PathShape is shape(edge); as the mesh can be complex, the edge
- * is used to define the sub-mesh for the path
+ * \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
+ * is used to define the sub-mesh for the path
*/
//================================================================================
int iP = int( angPrevFloor );
double angPrevCeil = ceil(angPrev);
angle = ( angPrevCeil - angPrev ) * theAngles[ iP ];
-
+
int iC = int( angCurFloor );
if ( iC < nbAngles )
angle += ( angCur - angCurFloor ) * theAngles[ iC ];
//=======================================================================
void SMESH_MeshEditor_i::MirrorObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & theAxis,
- SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
- CORBA::Boolean theCopy)
+ const SMESH::AxisStruct & theAxis,
+ SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
+ CORBA::Boolean theCopy)
{
if ( !myPreviewMode ) {
TPythonDump() << this << ".MirrorObject( "
SMESH::SMESH_Mesh_var mesh;
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
-
+
TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
false, theCopyGroups, & mesh_i->GetImpl());
mesh_i->CreateGroupServants();
}
-
+
if ( !myPreviewMode ) {
pydump << mesh << " = " << this << ".MirrorMakeMesh( "
<< theIDsOfElements << ", "
//dump "GetGroups"
if(!myPreviewMode && mesh_i)
mesh_i->GetGroups();
-
+
return mesh._retn();
}
SMESH::SMESH_Mesh_var mesh;
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
-
+
TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
//dump "GetGroups"
if(!myPreviewMode && mesh_i)
mesh_i->GetGroups();
-
+
return mesh._retn();
}
//=======================================================================
void SMESH_MeshEditor_i::TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::DirStruct & theVector,
- CORBA::Boolean theCopy)
+ const SMESH::DirStruct & theVector,
+ CORBA::Boolean theCopy)
{
if ( !myPreviewMode ) {
TPythonDump() << this << ".TranslateObject( "
{
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = translate(anElementsId, theVector, true, true);
-
+
if ( !myPreviewMode ) {
TPythonDump aPythonDump;
{
SMESH_Mesh_i* mesh_i;
SMESH::SMESH_Mesh_var mesh;
-
+
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
TPythonDump pydump; // to prevent dump at mesh creation
-
+
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
-
+
if ( mesh_i ) {
translate(theIDsOfElements, theVector,
false, theCopyGroups, & mesh_i->GetImpl());
mesh_i->CreateGroupServants();
}
-
+
if ( !myPreviewMode ) {
pydump << mesh << " = " << this << ".TranslateMakeMesh( "
<< theIDsOfElements << ", "
<< theMeshName << "' )";
}
}
-
+
//dump "GetGroups"
if(!myPreviewMode && mesh_i)
mesh_i->GetGroups();
-
+
return mesh._retn();
}
SMESH::SMESH_Mesh_var mesh;
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
-
+
TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
-
+
if ( mesh_i ) {
SMESH::long_array_var anElementsId = theObject->GetIDs();
translate(anElementsId, theVector,
<< theMeshName << "' )";
}
}
-
+
//dump "GetGroups"
if(!myPreviewMode && mesh_i)
mesh_i->GetGroups();
-
+
return mesh._retn();
}
//=======================================================================
void SMESH_MeshEditor_i::RotateObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & theAxis,
- CORBA::Double theAngle,
- CORBA::Boolean theCopy)
+ const SMESH::AxisStruct & theAxis,
+ CORBA::Double theAngle,
+ CORBA::Boolean theCopy)
{
if ( !myPreviewMode ) {
TPythonDump() << this << ".RotateObject( "
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".RotateMakeGroups( "
<< theIDsOfElements << ", "
- << theAxis << ", "
+ << theAxis << ", "
<< theAngle << " )";
}
return aGroups;
{
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::ListOfGroups * aGroups = rotate(anElementsId,theAxis,theAngle,true,true);
-
+
if ( !myPreviewMode ) {
TPythonDump aPythonDump;
DumpGroupsList(aPythonDump,aGroups);
aPythonDump << this << ".RotateObjectMakeGroups( "
- << theObject << ", "
- << theAxis << ", "
- << theAngle << " )";
+ << theObject << ", "
+ << theAxis << ", "
+ << theAngle << " )";
}
return aGroups;
}
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
-
+
TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
-
+
if ( mesh_i ) {
rotate(theIDsOfElements, theAxis, theAngleInRadians,
false, theCopyGroups, & mesh_i->GetImpl());
<< theMeshName << "' )";
}
}
-
+
//dump "GetGroups"
if(!myPreviewMode && mesh_i)
mesh_i->GetGroups();
-
+
return mesh._retn();
}
{
SMESH::SMESH_Mesh_var mesh;
SMESH_Mesh_i* mesh_i;
-
+
{// open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
-
+
TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
-
+
if (mesh_i ) {
SMESH::long_array_var anElementsId = theObject->GetIDs();
rotate(anElementsId, theAxis, theAngleInRadians,
<< theMeshName << "' )";
}
}
-
+
//dump "GetGroups"
if(!myPreviewMode && mesh_i)
mesh_i->GetGroups();
-
+
return mesh._retn();
}
set<const SMDS_MeshNode*> nodes;
if ( !CORBA::is_nil(SMESH::SMESH_GroupBase::_narrow(theObject)) &&
- SMESH::SMESH_GroupBase::_narrow(theObject)->GetType() == SMESH::NODE) {
+ SMESH::SMESH_GroupBase::_narrow(theObject)->GetType() == SMESH::NODE) {
for(int i = 0; i < aElementsId->length(); i++) {
CORBA::Long ind = aElementsId[i];
const SMDS_MeshNode * elem = aMesh->FindNode(ind);
}
}
}
-
-
+
+
::SMESH_MeshEditor::TListOfListOfNodes aListOfListOfNodes;
::SMESH_MeshEditor anEditor( myMesh );
if(!nodes.empty())
anEditor.FindCoincidentNodes( nodes, Tolerance, aListOfListOfNodes );
-
+
GroupsOfNodes = new SMESH::array_of_long_array;
GroupsOfNodes->length( aListOfListOfNodes.size() );
::SMESH_MeshEditor::TListOfListOfNodes::iterator llIt = aListOfListOfNodes.begin();
//purpose :
//=======================================================================
void SMESH_MeshEditor_i::FindEqualElements(SMESH::SMESH_IDSource_ptr theObject,
- SMESH::array_of_long_array_out GroupsOfElementsID)
+ SMESH::array_of_long_array_out GroupsOfElementsID)
{
initData();
if ( !(!CORBA::is_nil(SMESH::SMESH_GroupBase::_narrow(theObject)) &&
- SMESH::SMESH_GroupBase::_narrow(theObject)->GetType() == SMESH::NODE) ) {
+ SMESH::SMESH_GroupBase::_narrow(theObject)->GetType() == SMESH::NODE) ) {
typedef list<int> TListOfIDs;
set<const SMDS_MeshElement*> elems;
SMESH::long_array_var aElementsId = theObject->GetIDs();
CORBA::Long anID = aElementsId[i];
const SMDS_MeshElement * elem = aMesh->FindElement(anID);
if (elem) {
- elems.insert(elem);
+ elems.insert(elem);
}
}
aGroup.length( listOfIDs.size() );
TListOfIDs::iterator idIt = listOfIDs.begin();
for (int k = 0; idIt != listOfIDs.end(); ++idIt, ++k ) {
- aGroup[ k ] = *idIt;
+ aGroup[ k ] = *idIt;
}
}
- TPythonDump() << "equal_elements = " << this << ".FindEqualElements( "
- <<theObject<<" )";
+ TPythonDump() << "equal_elements = " << this << ".FindEqualElements( "
+ <<theObject<<" )";
}
}
static SMESH::SMESH_MeshEditor::Sew_Error convError( const::SMESH_MeshEditor::Sew_Error e )
{
switch ( e ) {
- RETCASE( SEW_OK );
- RETCASE( SEW_BORDER1_NOT_FOUND );
- RETCASE( SEW_BORDER2_NOT_FOUND );
- RETCASE( SEW_BOTH_BORDERS_NOT_FOUND );
- RETCASE( SEW_BAD_SIDE_NODES );
- RETCASE( SEW_VOLUMES_TO_SPLIT );
- RETCASE( SEW_DIFF_NB_OF_ELEMENTS );
- RETCASE( SEW_TOPO_DIFF_SETS_OF_ELEMENTS );
- RETCASE( SEW_BAD_SIDE1_NODES );
- RETCASE( SEW_BAD_SIDE2_NODES );
+ RETCASE( SEW_OK );
+ RETCASE( SEW_BORDER1_NOT_FOUND );
+ RETCASE( SEW_BORDER2_NOT_FOUND );
+ RETCASE( SEW_BOTH_BORDERS_NOT_FOUND );
+ RETCASE( SEW_BAD_SIDE_NODES );
+ RETCASE( SEW_VOLUMES_TO_SPLIT );
+ RETCASE( SEW_DIFF_NB_OF_ELEMENTS );
+ RETCASE( SEW_TOPO_DIFF_SETS_OF_ELEMENTS );
+ RETCASE( SEW_BAD_SIDE1_NODES );
+ RETCASE( SEW_BAD_SIDE2_NODES );
}
return SMESH::SMESH_MeshEditor::SEW_OK;
}
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
- SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
- CORBA::Long SecondNodeID1,
- CORBA::Long LastNodeID1,
- CORBA::Long FirstNodeID2,
- CORBA::Long SecondNodeID2,
- CORBA::Long LastNodeID2,
- CORBA::Boolean CreatePolygons,
- CORBA::Boolean CreatePolyedrs)
+SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
+ CORBA::Long SecondNodeID1,
+ CORBA::Long LastNodeID1,
+ CORBA::Long FirstNodeID2,
+ CORBA::Long SecondNodeID2,
+ CORBA::Long LastNodeID2,
+ CORBA::Boolean CreatePolygons,
+ CORBA::Boolean CreatePolyedrs)
{
initData();
//================================================================================
/*!
* \brief Set new nodes for given element
- * \param ide - element id
- * \param newIDs - new node ids
- * \retval CORBA::Boolean - true if result is OK
+ * \param ide - element id
+ * \param newIDs - new node ids
+ * \retval CORBA::Boolean - true if result is OK
*/
//================================================================================
return GetMeshDS()->ChangeElementNodes( elem, & aNodes[0], nbn1+1 );
}
-
+
//================================================================================
/*!
* \brief Update myLastCreated* or myPreviewData
- * \param anEditor - it contains last modification results
+ * \param anEditor - it contains last modification results
*/
//================================================================================
/*if (aMeshElem->GetType() == SMDSAbs_Volume) {
aType = SMDSAbs_Node;
isPoly = false;
- }
- else*/ {
+ }
+ else*/ {
aType = aMeshElem->GetType();
isPoly = aMeshElem->IsPoly();
}
myPreviewData->elementConnectivities.length(aNodesConnectivity.size());
for( int i = 0; aConnIter != aNodesConnectivity.end(); aConnIter++, i++ )
myPreviewData->elementConnectivities[i] = *aConnIter;
-
+
return;
}
//================================================================================
/*!
* \brief Returns list of it's IDs of created nodes
- * \retval SMESH::long_array* - list of node ID
+ * \retval SMESH::long_array* - list of node ID
*/
//================================================================================
//================================================================================
/*!
* \brief Returns list of it's IDs of created elements
- * \retval SMESH::long_array* - list of elements' ID
+ * \retval SMESH::long_array* - list of elements' ID
*/
//================================================================================
/*!
\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
+ 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
- replicated nodes should be associated to.
+ replicated nodes should be associated to.
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNodeGroup(), DoubleNodeGroups()
*/
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theElems,
const SMESH::long_array& theNodesNot,
const SMESH::long_array& theAffectedElems )
-
+
{
initData();
/*!
\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
+ The nodes for duplication could be found from these elements
\param theNodesNot - list of nodes to NOT replicate
\param theShape - shape to detect affected elements (element which geometric center
- located on or inside shape).
- The replicated nodes should be associated to affected elements.
+ located on or inside shape).
+ The replicated nodes should be associated to affected elements.
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
*/
//================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesInRegion
- ( const SMESH::long_array& theElems,
- const SMESH::long_array& theNodesNot,
- GEOM::GEOM_Object_ptr theShape )
-
+( const SMESH::long_array& theElems,
+ const SMESH::long_array& theNodesNot,
+ GEOM::GEOM_Object_ptr theShape )
+
{
initData();
\param theElems - group of of elements (edges or faces) to be replicated
\param theNodesNot - group of nodes not to replicated
\param theAffectedElems - group of elements to which the replicated nodes
- should be associated to.
+ should be associated to.
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNodes(), DoubleNodeGroups()
*/
SMESHDS_Mesh* theMeshDS,
TIDSortedElemSet& theElemSet,
const SMDSAbs_ElementType theType)
-
+
{
if ( CORBA::is_nil( theGrp ) )
return;
}
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroup(
- SMESH::SMESH_GroupBase_ptr theElems,
- SMESH::SMESH_GroupBase_ptr theNodesNot,
- SMESH::SMESH_GroupBase_ptr theAffectedElems )
+ SMESH::SMESH_GroupBase_ptr theElems,
+ SMESH::SMESH_GroupBase_ptr theNodesNot,
+ SMESH::SMESH_GroupBase_ptr theAffectedElems )
{
if ( CORBA::is_nil( theElems ) && theElems->GetType() == SMESH::NODE )
return false;
-
+
initData();
::SMESH_MeshEditor aMeshEditor( myMesh );
\param theElems - group of of elements (edges or faces) to be replicated
\param theNodesNot - group of nodes not to replicated
\param theShape - shape to detect affected elements (element which geometric center
- located on or inside shape).
- The replicated nodes should be associated to affected elements.
+ located on or inside shape).
+ The replicated nodes should be associated to affected elements.
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
*/
//================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroupInRegion(
- SMESH::SMESH_GroupBase_ptr theElems,
- SMESH::SMESH_GroupBase_ptr theNodesNot,
- GEOM::GEOM_Object_ptr theShape )
+ SMESH::SMESH_GroupBase_ptr theElems,
+ SMESH::SMESH_GroupBase_ptr theNodesNot,
+ GEOM::GEOM_Object_ptr theShape )
{
if ( CORBA::is_nil( theElems ) && theElems->GetType() == SMESH::NODE )
return false;
-
+
initData();
::SMESH_MeshEditor aMeshEditor( myMesh );
\param theElems - list of groups of elements (edges or faces) to be replicated
\param theNodesNot - list of groups of nodes not to replicated
\param theAffectedElems - group of elements to which the replicated nodes
- should be associated to.
+ should be associated to.
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNodeGroup(), DoubleNodes()
*/
{
SMESH::SMESH_GroupBase_var aGrp = theGrpList[ i ];
if ( !CORBA::is_nil( aGrp ) && (theIsNodeGrp ? aGrp->GetType() == SMESH::NODE
- : aGrp->GetType() != SMESH::NODE ) )
+ : aGrp->GetType() != SMESH::NODE ) )
{
SMESH::long_array_var anIDs = aGrp->GetIDs();
arrayToSet( anIDs, theMeshDS, theElemSet, theIsNodeGrp ? SMDSAbs_Node : SMDSAbs_All );
}
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(
- const SMESH::ListOfGroups& theElems,
- const SMESH::ListOfGroups& theNodesNot,
- const SMESH::ListOfGroups& theAffectedElems )
+ const SMESH::ListOfGroups& theElems,
+ const SMESH::ListOfGroups& theNodesNot,
+ const SMESH::ListOfGroups& theAffectedElems )
{
initData();
\param theElems - list of groups of elements (edges or faces) to be replicated
\param theNodesNot - list of groups of nodes not to replicated
\param theShape - shape to detect affected elements (element which geometric center
- located on or inside shape).
- The replicated nodes should be associated to affected elements.
+ located on or inside shape).
+ The replicated nodes should be associated to affected elements.
\return TRUE if operation has been completed successfully, FALSE otherwise
\sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
*/
//================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroupsInRegion(
- const SMESH::ListOfGroups& theElems,
- const SMESH::ListOfGroups& theNodesNot,
- GEOM::GEOM_Object_ptr theShape )
+ const SMESH::ListOfGroups& theElems,
+ const SMESH::ListOfGroups& theNodesNot,
+ GEOM::GEOM_Object_ptr theShape )
{
initData();