}
};// struct TPreviewMesh
- static SMESH_NodeSearcher * myNodeSearcher = 0;
+ static SMESH_NodeSearcher * theNodeSearcher = 0;
+ static SMESH_ElementSearcher * theElementSearcher = 0;
//=============================================================================
/*!
- * \brief Deleter of myNodeSearcher at any compute event occured
+ * \brief Deleter of theNodeSearcher at any compute event occured
*/
//=============================================================================
- struct TNodeSearcherDeleter : public SMESH_subMeshEventListener
+ struct TSearchersDeleter : public SMESH_subMeshEventListener
{
SMESH_Mesh* myMesh;
//!< Constructor
- TNodeSearcherDeleter(): SMESH_subMeshEventListener( false ), // won't be deleted by submesh
+ TSearchersDeleter(): SMESH_subMeshEventListener( false ), // won't be deleted by submesh
myMesh(0) {}
- //!< Delete myNodeSearcher
+ //!< Delete theNodeSearcher
static void Delete()
{
- if ( myNodeSearcher ) { delete myNodeSearcher; myNodeSearcher = 0; }
+ if ( theNodeSearcher ) delete theNodeSearcher; theNodeSearcher = 0;
+ if ( theElementSearcher ) delete theElementSearcher; theElementSearcher = 0;
}
typedef map < int, SMESH_subMesh * > TDependsOnMap;
//!< The meshod called by submesh: do my main job
Unset( sm->GetFather() );
}
}
- //!< set self on all submeshes and delete myNodeSearcher if other mesh is set
+ //!< set self on all submeshes and delete theNodeSearcher if other mesh is set
void Set(SMESH_Mesh* mesh)
{
- if ( myMesh && myMesh != mesh ) {
- Delete();
- Unset( myMesh );
- }
- myMesh = mesh;
- if ( SMESH_subMesh* myMainSubMesh = mesh->GetSubMeshContaining(1) ) {
- const TDependsOnMap & subMeshes = myMainSubMesh->DependsOn();
- TDependsOnMap::const_iterator sm;
- for (sm = subMeshes.begin(); sm != subMeshes.end(); sm++)
- sm->second->SetEventListener( this, 0, sm->second );
+ if ( myMesh != mesh )
+ {
+ if ( myMesh ) {
+ Delete();
+ Unset( myMesh );
+ }
+ myMesh = mesh;
+ if ( SMESH_subMesh* myMainSubMesh = mesh->GetSubMeshContaining(1) ) {
+ const TDependsOnMap & subMeshes = myMainSubMesh->DependsOn();
+ TDependsOnMap::const_iterator sm;
+ for (sm = subMeshes.begin(); sm != subMeshes.end(); sm++)
+ sm->second->SetEventListener( this, 0, sm->second );
+ }
}
}
//!< delete self from all submeshes
}
myMesh = 0;
}
- };
+
+ } theSearchersDeleter;
TCollection_AsciiString mirrorTypeName( SMESH::SMESH_MeshEditor::MirrorType theMirrorType )
{
*/
//================================================================================
-void SMESH_MeshEditor_i::initData()
+void SMESH_MeshEditor_i::initData(bool deleteSearchers)
{
if ( myPreviewMode ) {
myPreviewData = new SMESH::MeshPreviewStruct();
else {
myLastCreatedElems = new SMESH::long_array();
myLastCreatedNodes = new SMESH::long_array();
- TNodeSearcherDeleter::Delete();
+ if ( deleteSearchers )
+ TSearchersDeleter::Delete();
}
}
elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
nodes[4], nodes[5], nodes[6], nodes[7]);
}
+ else if (NbNodes > 2) {
+ elem = GetMeshDS()->AddPolygonalFace(nodes);
+ }
// Update Python script
TPythonDump() << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )";
mesh->SetMeshElementOnShape( elem, ShapeID );
}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long NodeID,
- CORBA::Double x,
- CORBA::Double y,
- CORBA::Double z)
-{
- initData();
-
- const SMDS_MeshNode * node = GetMeshDS()->FindNode( NodeID );
- if ( !node )
- return false;
-
- GetMeshDS()->MoveNode(node, x, y, z);
-
- // Update Python script
- TPythonDump() << "isDone = " << this << ".MoveNode( "
- << NodeID << ", " << x << ", " << y << ", " << z << " )";
-
- return true;
-}
-
//=============================================================================
/*!
*
TPythonDump() << this << ".MergeEqualElements()";
}
+//=============================================================================
+/*!
+ * Move the node to a given point
+ */
+//=============================================================================
+
+CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long NodeID,
+ CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z)
+{
+ initData(/*deleteSearchers=*/false);
+
+ const SMDS_MeshNode * node = GetMeshDS()->FindNode( NodeID );
+ if ( !node )
+ return false;
+
+ if ( theNodeSearcher )
+ theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other
+
+ if ( theNodeSearcher ) // move node and update theNodeSearcher data accordingly
+ theNodeSearcher->MoveNode(node, gp_Pnt( x,y,z ));
+ else
+ GetMeshDS()->MoveNode(node, x, y, z);
+
+ // Update Python script
+ TPythonDump() << "isDone = " << this << ".MoveNode( "
+ << NodeID << ", " << x << ", " << y << ", " << z << " )";
+
+ return true;
+}
+
+//================================================================================
+/*!
+ * \brief Return ID of node closest to a given point
+ */
+//================================================================================
+
+CORBA::Long SMESH_MeshEditor_i::FindNodeClosestTo(CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z)
+{
+ theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other
+
+ if ( !theNodeSearcher ) {
+ ::SMESH_MeshEditor anEditor( myMesh );
+ theNodeSearcher = anEditor.GetNodeSearcher();
+ }
+ gp_Pnt p( x,y,z );
+ if ( const SMDS_MeshNode* node = theNodeSearcher->FindClosestTo( p ))
+ return node->GetID();
+
+ return 0;
+}
+
//================================================================================
/*!
* \brief If the given ID is a valid node ID (nodeID > 0), just move this node, else
CORBA::Double z,
CORBA::Long theNodeID)
{
- // We keep myNodeSearcher until any mesh modification:
- // 1) initData() deletes myNodeSearcher at any edition,
- // 2) TNodeSearcherDeleter - at any mesh compute event and mesh change
+ // We keep theNodeSearcher until any mesh modification:
+ // 1) initData() deletes theNodeSearcher at any edition,
+ // 2) TSearchersDeleter - at any mesh compute event and mesh change
- initData();
+ initData(/*deleteSearchers=*/false);
+
+ theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other
int nodeID = theNodeID;
const SMDS_MeshNode* node = GetMeshDS()->FindNode( nodeID );
- if ( !node )
+ if ( !node ) // preview moving node
{
- static TNodeSearcherDeleter deleter;
- deleter.Set( myMesh );
- if ( !myNodeSearcher ) {
+ if ( !theNodeSearcher ) {
::SMESH_MeshEditor anEditor( myMesh );
- myNodeSearcher = anEditor.GetNodeSearcher();
+ theNodeSearcher = anEditor.GetNodeSearcher();
}
gp_Pnt p( x,y,z );
- node = myNodeSearcher->FindClosestTo( p );
+ node = theNodeSearcher->FindClosestTo( p );
}
if ( node ) {
nodeID = node->GetID();
::SMESH_MeshEditor anEditor( & tmpMesh );
storeResult( anEditor );
}
+ else if ( theNodeSearcher ) // move node and update theNodeSearcher data accordingly
+ {
+ theNodeSearcher->MoveNode(node, gp_Pnt( x,y,z ));
+ }
else
{
GetMeshDS()->MoveNode(node, x, y, z);
return nodeID;
}
+//=======================================================================
+/*!
+ * Return elements of given type where the given point is IN or ON.
+ *
+ * 'ALL' type means elements of any type excluding nodes
+ */
+//=======================================================================
+
+SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z,
+ SMESH::ElementType type)
+{
+ SMESH::long_array_var res = new SMESH::long_array;
+ vector< const SMDS_MeshElement* > foundElems;
+
+ theSearchersDeleter.Set( myMesh );
+ if ( !theElementSearcher ) {
+ ::SMESH_MeshEditor anEditor( myMesh );
+ theElementSearcher = anEditor.GetElementSearcher();
+ }
+ theElementSearcher->FindElementsByPoint( gp_Pnt( x,y,z ),
+ SMDSAbs_ElementType( type ),
+ foundElems);
+ res->length( foundElems.size() );
+ for ( int i = 0; i < foundElems.size(); ++i )
+ res[i] = foundElems[i]->GetID();
+
+ if ( !myPreviewMode ) // call from tui
+ TPythonDump() << res << " = " << this << ".FindElementsByPoint( "
+ << x << ", "
+ << y << ", "
+ << z << ", "
+ << type << " )";
+
+ return res._retn();
+}
+
//=======================================================================
//function : convError
//purpose :
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
- CORBA::Double MaxAspectRatio,
- SMESH::SMESH_MeshEditor::Smooth_Method Method);
+ const SMESH::long_array & IDsOfFixedNodes,
+ CORBA::Long MaxNbOfIterations,
+ CORBA::Double MaxAspectRatio,
+ SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean SmoothParametric(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric);
CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
- CORBA::Double MaxAspectRatio,
- SMESH::SMESH_MeshEditor::Smooth_Method Method,
+ const SMESH::long_array & IDsOfFixedNodes,
+ CORBA::Long MaxNbOfIterations,
+ CORBA::Double MaxAspectRatio,
+ SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric);
CORBA::Long NbOfSteps,
CORBA::Double Tolerance);
void RotationSweepObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & Axis,
- CORBA::Double AngleInRadians,
- CORBA::Long NbOfSteps,
- CORBA::Double Tolerance);
+ const SMESH::AxisStruct & Axis,
+ CORBA::Double AngleInRadians,
+ CORBA::Long NbOfSteps,
+ CORBA::Double Tolerance);
void RotationSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & Axis,
- CORBA::Double AngleInRadians,
- CORBA::Long NbOfSteps,
- CORBA::Double Tolerance);
+ const SMESH::AxisStruct & Axis,
+ CORBA::Double AngleInRadians,
+ CORBA::Long NbOfSteps,
+ CORBA::Double Tolerance);
void RotationSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & Axis,
- CORBA::Double AngleInRadians,
- CORBA::Long NbOfSteps,
- CORBA::Double Tolerance);
+ const SMESH::AxisStruct & Axis,
+ CORBA::Double AngleInRadians,
+ CORBA::Long NbOfSteps,
+ CORBA::Double Tolerance);
void ExtrusionSweep(const SMESH::long_array & IDsOfElements,
const SMESH::DirStruct & StepVector,
CORBA::Long NbOfSteps);
void ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::DirStruct & StepVector,
- CORBA::Long NbOfSteps);
+ const SMESH::DirStruct & StepVector,
+ CORBA::Long NbOfSteps);
void ExtrusionSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::DirStruct & StepVector,
CORBA::Long NbOfSteps);
const SMESH::DirStruct & StepVector,
CORBA::Long NbOfSteps);
void 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);
SMESH::SMESH_MeshEditor::Extrusion_Error
- ExtrusionAlongPath(const SMESH::long_array & IDsOfElements,
- SMESH::SMESH_Mesh_ptr PathMesh,
- GEOM::GEOM_Object_ptr PathShape,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array & Angles,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct & RefPoint);
+ ExtrusionAlongPath(const SMESH::long_array & IDsOfElements,
+ SMESH::SMESH_Mesh_ptr PathMesh,
+ GEOM::GEOM_Object_ptr PathShape,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array & Angles,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct & RefPoint);
SMESH::SMESH_MeshEditor::Extrusion_Error
- ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject,
+ ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject,
+ SMESH::SMESH_Mesh_ptr PathMesh,
+ GEOM::GEOM_Object_ptr PathShape,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array & Angles,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct & RefPoint);
+ SMESH::SMESH_MeshEditor::Extrusion_Error
+ ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject,
SMESH::SMESH_Mesh_ptr PathMesh,
GEOM::GEOM_Object_ptr PathShape,
CORBA::Long NodeStart,
CORBA::Boolean HasRefPoint,
const SMESH::PointStruct & RefPoint);
SMESH::SMESH_MeshEditor::Extrusion_Error
- ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject,
- SMESH::SMESH_Mesh_ptr PathMesh,
- GEOM::GEOM_Object_ptr PathShape,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array & Angles,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct & RefPoint);
- SMESH::SMESH_MeshEditor::Extrusion_Error
- ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject,
- SMESH::SMESH_Mesh_ptr PathMesh,
- GEOM::GEOM_Object_ptr PathShape,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array & Angles,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct & RefPoint);
+ ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject,
+ SMESH::SMESH_Mesh_ptr PathMesh,
+ GEOM::GEOM_Object_ptr PathShape,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array & Angles,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct & RefPoint);
SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr PathMesh,
GEOM::GEOM_Object_ptr PathShape,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean Copy);
void MirrorObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & Axis,
- SMESH::SMESH_MeshEditor::MirrorType MirrorType,
- CORBA::Boolean Copy);
+ const SMESH::AxisStruct & Axis,
+ SMESH::SMESH_MeshEditor::MirrorType MirrorType,
+ CORBA::Boolean Copy);
void Translate(const SMESH::long_array & IDsOfElements,
const SMESH::DirStruct & Vector,
CORBA::Boolean Copy);
void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::DirStruct & Vector,
- CORBA::Boolean Copy);
+ const SMESH::DirStruct & Vector,
+ CORBA::Boolean Copy);
void Rotate(const SMESH::long_array & IDsOfElements,
const SMESH::AxisStruct & Axis,
CORBA::Double Angle,
CORBA::Boolean Copy);
void RotateObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::AxisStruct & Axis,
- CORBA::Double Angle,
- CORBA::Boolean Copy);
+ const SMESH::AxisStruct & Axis,
+ CORBA::Double Angle,
+ CORBA::Boolean Copy);
SMESH::ListOfGroups* RotationSweepMakeGroups(const SMESH::long_array& IDsOfElements,
const SMESH::AxisStruct& Axix,
CORBA::Long NbOfSteps,
CORBA::Double Tolerance);
SMESH::ListOfGroups* RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
- const SMESH::AxisStruct& Axix,
- CORBA::Double AngleInRadians,
- CORBA::Long NbOfSteps,
- CORBA::Double Tolerance);
+ const SMESH::AxisStruct& Axix,
+ CORBA::Double AngleInRadians,
+ CORBA::Long NbOfSteps,
+ CORBA::Double Tolerance);
SMESH::ListOfGroups* RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
- const SMESH::AxisStruct& Axix,
- CORBA::Double AngleInRadians,
- CORBA::Long NbOfSteps,
- CORBA::Double Tolerance);
+ const SMESH::AxisStruct& Axix,
+ CORBA::Double AngleInRadians,
+ CORBA::Long NbOfSteps,
+ CORBA::Double Tolerance);
SMESH::ListOfGroups* ExtrusionSweepMakeGroups(const SMESH::long_array& IDsOfElements,
const SMESH::DirStruct& StepVector,
CORBA::Long NbOfSteps);
const SMESH::PointStruct& RefPoint,
SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
SMESH::ListOfGroups* ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
- SMESH::SMESH_Mesh_ptr PathMesh,
- GEOM::GEOM_Object_ptr PathShape,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array& Angles,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct& RefPoint,
- SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
+ SMESH::SMESH_Mesh_ptr PathMesh,
+ GEOM::GEOM_Object_ptr PathShape,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array& Angles,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct& RefPoint,
+ SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
SMESH::ListOfGroups* ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
- SMESH::SMESH_Mesh_ptr PathMesh,
- GEOM::GEOM_Object_ptr PathShape,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array& Angles,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct& RefPoint,
- SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
+ SMESH::SMESH_Mesh_ptr PathMesh,
+ GEOM::GEOM_Object_ptr PathShape,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array& Angles,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct& RefPoint,
+ SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
// skl 04.06.2009
SMESH::ListOfGroups* ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr Object,
- SMESH::SMESH_IDSource_ptr Path,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array& Angles,
- CORBA::Boolean LinearVariation,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct& RefPoint,
- CORBA::Boolean MakeGroups,
- SMESH::ElementType ElemType,
- SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
+ SMESH::SMESH_IDSource_ptr Path,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array& Angles,
+ CORBA::Boolean LinearVariation,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct& RefPoint,
+ CORBA::Boolean MakeGroups,
+ SMESH::ElementType ElemType,
+ SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
SMESH::ListOfGroups* ExtrusionAlongPathX(const SMESH::long_array& IDsOfElements,
- SMESH::SMESH_IDSource_ptr Path,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array& Angles,
- CORBA::Boolean LinearVariation,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct& RefPoint,
- CORBA::Boolean MakeGroups,
- SMESH::ElementType ElemType,
- SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
+ SMESH::SMESH_IDSource_ptr Path,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array& Angles,
+ CORBA::Boolean LinearVariation,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct& RefPoint,
+ CORBA::Boolean MakeGroups,
+ SMESH::ElementType ElemType,
+ SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array& IDsOfElements,
const SMESH::AxisStruct& Mirror,
CORBA::Double y,
CORBA::Double z,
CORBA::Long nodeID);
-
+ /*!
+ * \brief Return ID of node closest to a given point
+ */
+ CORBA::Long SMESH_MeshEditor_i::FindNodeClosestTo(CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z);
+ /*!
+ * Return elements of given type where the given point is IN or ON.
+ *
+ * 'ALL' type means elements of any type excluding nodes
+ */
+ SMESH::long_array* FindElementsByPoint(CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z,
+ SMESH::ElementType type);
SMESH::SMESH_MeshEditor::Sew_Error
* element - returns false
*/
CORBA::Boolean ChangeElemNodes(CORBA::Long ide, const SMESH::long_array& newIDs);
-
+
/*!
* Return data of mesh edition preview
*/
/*!
* \brief Return edited mesh ID
- * \retval int - mesh ID
+ * \retval int - mesh ID
*/
int GetMeshId() const { return myMesh->GetId(); }
-
+
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* replicated nodes should be associated to.
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroup(), DoubleNodeGroups()
- */
+ */
CORBA::Boolean DoubleNodes( const SMESH::long_array& theElems,
const SMESH::long_array& theNodesNot,
const SMESH::long_array& theAffectedElems );
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodes(), DoubleNodeGroups()
*/
- CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theElems,
- SMESH::SMESH_GroupBase_ptr theNodesNot,
- SMESH::SMESH_GroupBase_ptr theAffectedElems );
+ CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theElems,
+ SMESH::SMESH_GroupBase_ptr theNodesNot,
+ SMESH::SMESH_GroupBase_ptr 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 DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
*/
- CORBA::Boolean DoubleNodeGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
- SMESH::SMESH_GroupBase_ptr theNodesNot,
- GEOM::GEOM_Object_ptr theShape );
+ CORBA::Boolean DoubleNodeGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
+ SMESH::SMESH_GroupBase_ptr theNodesNot,
+ GEOM::GEOM_Object_ptr theShape );
/*!
* \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 DoubleNodeGroup(), DoubleNodes()
*/
- CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theElems,
- const SMESH::ListOfGroups& theNodesNot,
- const SMESH::ListOfGroups& theAffectedElems );
+ CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theElems,
+ const SMESH::ListOfGroups& theNodesNot,
+ const SMESH::ListOfGroups& theAffectedElems );
/*!
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
*/
- CORBA::Boolean DoubleNodeGroupsInRegion( const SMESH::ListOfGroups& theElems,
- const SMESH::ListOfGroups& theNodesNot,
- GEOM::GEOM_Object_ptr theShape );
+ CORBA::Boolean DoubleNodeGroupsInRegion( const SMESH::ListOfGroups& theElems,
+ const SMESH::ListOfGroups& theNodesNot,
+ GEOM::GEOM_Object_ptr theShape );
- private: //!< private methods
+private: //!< private methods
SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
/*!
* \brief Update myLastCreated* or myPreviewData
- * \param anEditor - it contains edition results
+ * \param anEditor - it contains edition results
*/
void storeResult(::SMESH_MeshEditor& anEditor);
/*!
* \brief Clear myLastCreated* or myPreviewData
*/
- void initData();
+ void initData(bool deleteSearchers=true);
/*!
* \brief Return groups by their IDs
CORBA::Long NbOfSteps,
CORBA::Double Tolerance,
const bool MakeGroups,
- const SMDSAbs_ElementType ElementType=SMDSAbs_All);
+ const SMDSAbs_ElementType ElementType=SMDSAbs_All);
SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array & IDsOfElements,
const SMESH::DirStruct & StepVector,
CORBA::Long NbOfSteps,
const SMESH::PointStruct & RefPoint,
const bool MakeGroups,
SMESH::SMESH_MeshEditor::Extrusion_Error & Error,
- const SMDSAbs_ElementType ElementType=SMDSAbs_All);
+ const SMDSAbs_ElementType ElementType=SMDSAbs_All);
SMESH::ListOfGroups* extrusionAlongPathX(const SMESH::long_array & IDsOfElements,
- SMESH::SMESH_IDSource_ptr Path,
- CORBA::Long NodeStart,
- CORBA::Boolean HasAngles,
- const SMESH::double_array& Angles,
- CORBA::Boolean LinearVariation,
- CORBA::Boolean HasRefPoint,
- const SMESH::PointStruct& RefPoint,
- const bool MakeGroups,
- const SMDSAbs_ElementType ElementType,
- SMESH::SMESH_MeshEditor::Extrusion_Error & theError);
+ SMESH::SMESH_IDSource_ptr Path,
+ CORBA::Long NodeStart,
+ CORBA::Boolean HasAngles,
+ const SMESH::double_array& Angles,
+ CORBA::Boolean LinearVariation,
+ CORBA::Boolean HasRefPoint,
+ const SMESH::PointStruct& RefPoint,
+ const bool MakeGroups,
+ const SMDSAbs_ElementType ElementType,
+ SMESH::SMESH_MeshEditor::Extrusion_Error & theError);
SMESH::ListOfGroups* mirror(const SMESH::long_array & IDsOfElements,
const SMESH::AxisStruct & Axis,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
::SMESH_Mesh* TargetMesh=0);
SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
-
+
void DumpGroupsList(SMESH::TPythonDump & theDumpPython,
const SMESH::ListOfGroups * theGroupList);