mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
Merge from V5_1_2_BR branch (14 July 2009)
This commit is contained in:
parent
142fbce46d
commit
686a864564
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 32 KiB |
@ -53,8 +53,7 @@ the information is displayed in Python Console.
|
|||||||
\anchor mesh_element_info_anchor
|
\anchor mesh_element_info_anchor
|
||||||
<h2>Mesh Element Info</h2>
|
<h2>Mesh Element Info</h2>
|
||||||
|
|
||||||
The <b>Mesh Element Info</b> box gives basic information about the
|
The <b>Mesh Element Info</b> dialog box gives basic information about the type, coordinates and connectivity of the selected mesh node or element.
|
||||||
type and the coordinates of the selected mesh element.
|
|
||||||
\n It is possible to input the Element ID or to select the Element in
|
\n It is possible to input the Element ID or to select the Element in
|
||||||
the Viewer.
|
the Viewer.
|
||||||
|
|
||||||
|
@ -382,4 +382,9 @@ n23_params = algo3D.Parameters()
|
|||||||
tetraN.Compute()
|
tetraN.Compute()
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
\n Other meshing algorithms:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>\subpage tui_defining_blsurf_hypotheses_page</li>
|
||||||
|
</ul>
|
||||||
*/
|
*/
|
@ -68,6 +68,8 @@
|
|||||||
<parameter name="show_result_notification" value="2"/>
|
<parameter name="show_result_notification" value="2"/>
|
||||||
<parameter name="segmentation" value="10"/>
|
<parameter name="segmentation" value="10"/>
|
||||||
<parameter name="nb_segments_per_edge" value="15"/>
|
<parameter name="nb_segments_per_edge" value="15"/>
|
||||||
|
<parameter name="quadratic_mode" value="0"/>
|
||||||
|
<parameter name="max_angle" value="2"/>
|
||||||
</section>
|
</section>
|
||||||
<section name="resources">
|
<section name="resources">
|
||||||
<!-- Module resources -->
|
<!-- Module resources -->
|
||||||
|
@ -1955,22 +1955,22 @@ bool ElemGeomType::IsSatisfy( long theId )
|
|||||||
|
|
||||||
case SMDSAbs_Face:
|
case SMDSAbs_Face:
|
||||||
if ( myGeomType == SMDSGeom_TRIANGLE )
|
if ( myGeomType == SMDSGeom_TRIANGLE )
|
||||||
isOk = (!anElem->IsPoly() && aNbNode == 3);
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3));
|
||||||
else if ( myGeomType == SMDSGeom_QUADRANGLE )
|
else if ( myGeomType == SMDSGeom_QUADRANGLE )
|
||||||
isOk = (!anElem->IsPoly() && aNbNode == 4);
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 8 : aNbNode == 4));
|
||||||
else if ( myGeomType == SMDSGeom_POLYGON )
|
else if ( myGeomType == SMDSGeom_POLYGON )
|
||||||
isOk = anElem->IsPoly();
|
isOk = anElem->IsPoly();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SMDSAbs_Volume:
|
case SMDSAbs_Volume:
|
||||||
if ( myGeomType == SMDSGeom_TETRA )
|
if ( myGeomType == SMDSGeom_TETRA )
|
||||||
isOk = (!anElem->IsPoly() && aNbNode == 4);
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 10 : aNbNode == 4));
|
||||||
else if ( myGeomType == SMDSGeom_PYRAMID )
|
else if ( myGeomType == SMDSGeom_PYRAMID )
|
||||||
isOk = (!anElem->IsPoly() && aNbNode == 5);
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 13 : aNbNode == 5));
|
||||||
else if ( myGeomType == SMDSGeom_PENTA )
|
else if ( myGeomType == SMDSGeom_PENTA )
|
||||||
isOk = (!anElem->IsPoly() && aNbNode == 6);
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6));
|
||||||
else if ( myGeomType == SMDSGeom_HEXA )
|
else if ( myGeomType == SMDSGeom_HEXA )
|
||||||
isOk = (!anElem->IsPoly() && aNbNode == 8);
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 20 : aNbNode == 8));
|
||||||
else if ( myGeomType == SMDSGeom_POLYHEDRA )
|
else if ( myGeomType == SMDSGeom_POLYHEDRA )
|
||||||
isOk = anElem->IsPoly();
|
isOk = anElem->IsPoly();
|
||||||
break;
|
break;
|
||||||
|
@ -1163,11 +1163,19 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
|
|||||||
aFilter = myBaseActor->GetExtractUnstructuredGrid();
|
aFilter = myBaseActor->GetExtractUnstructuredGrid();
|
||||||
aFilter->ClearRegisteredCellsWithType();
|
aFilter->ClearRegisteredCellsWithType();
|
||||||
aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
|
aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
|
||||||
|
|
||||||
|
VTKViewer_ExtractUnstructuredGrid* aHightFilter = myHighlitableActor->GetExtractUnstructuredGrid();
|
||||||
|
aHightFilter->ClearRegisteredCellsWithType();
|
||||||
|
aHightFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
|
||||||
|
|
||||||
|
|
||||||
if(myEntityMode & eEdges){
|
if(myEntityMode & eEdges){
|
||||||
if (MYDEBUG) MESSAGE("EDGES");
|
if (MYDEBUG) MESSAGE("EDGES");
|
||||||
aFilter->RegisterCellsWithType(VTK_LINE);
|
aFilter->RegisterCellsWithType(VTK_LINE);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
|
||||||
|
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_LINE);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myEntityMode & eFaces){
|
if(myEntityMode & eFaces){
|
||||||
@ -1177,6 +1185,12 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
|
|||||||
aFilter->RegisterCellsWithType(VTK_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUAD);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
||||||
|
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_TRIANGLE);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_POLYGON);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_QUAD);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myEntityMode & eVolumes){
|
if(myEntityMode & eVolumes){
|
||||||
@ -1190,6 +1204,16 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
|
|||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
||||||
|
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_TETRA);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_VOXEL);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_WEDGE);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_PYRAMID);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
||||||
}
|
}
|
||||||
aFilter->Update();
|
aFilter->Update();
|
||||||
if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
|
if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
|
||||||
|
@ -53,8 +53,8 @@ enum SMDSAbs_GeometryType
|
|||||||
// 3D element
|
// 3D element
|
||||||
SMDSGeom_TETRA,
|
SMDSGeom_TETRA,
|
||||||
SMDSGeom_PYRAMID,
|
SMDSGeom_PYRAMID,
|
||||||
SMDSGeom_PENTA,
|
|
||||||
SMDSGeom_HEXA,
|
SMDSGeom_HEXA,
|
||||||
|
SMDSGeom_PENTA,
|
||||||
SMDSGeom_POLYHEDRA,
|
SMDSGeom_POLYHEDRA,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4971,7 +4971,7 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
|
|||||||
SMDS_MeshNode tgtNode( thePnt.X(), thePnt.Y(), thePnt.Z() );
|
SMDS_MeshNode tgtNode( thePnt.X(), thePnt.Y(), thePnt.Z() );
|
||||||
list<const SMDS_MeshNode*> nodes;
|
list<const SMDS_MeshNode*> nodes;
|
||||||
const double precision = 1e-6;
|
const double precision = 1e-6;
|
||||||
myOctreeNode->NodesAround( &tgtNode, &nodes, precision );
|
//myOctreeNode->NodesAround( &tgtNode, &nodes, precision );
|
||||||
|
|
||||||
double minSqDist = DBL_MAX;
|
double minSqDist = DBL_MAX;
|
||||||
Bnd_B3d box;
|
Bnd_B3d box;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
// File : SMESHGUI.cxx
|
// File : SMESHGUI.cxx
|
||||||
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
//
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_NodesDlg.h"
|
#include "SMESHGUI_NodesDlg.h"
|
||||||
#include "SMESHGUI_TransparencyDlg.h"
|
#include "SMESHGUI_TransparencyDlg.h"
|
||||||
@ -2091,9 +2091,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
/* Warning : however by internal mechanism all subMeshes icons are changed ! */
|
/* Warning : however by internal mechanism all subMeshes icons are changed ! */
|
||||||
if ( !aHypothesis->_is_nil() )
|
if ( !aHypothesis->_is_nil() )
|
||||||
{
|
{
|
||||||
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName());
|
// BUG 0020378
|
||||||
if (aCreator)
|
//SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName());
|
||||||
|
SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName());
|
||||||
|
if (aCreator) {
|
||||||
aCreator->edit( aHypothesis.in(), anIObject->getName(), desktop() );
|
aCreator->edit( aHypothesis.in(), anIObject->getName(), desktop() );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// report error
|
// report error
|
||||||
@ -3056,8 +3059,7 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
|
|
||||||
popupMgr()->insert( separator(), -1, 0 );
|
popupMgr()->insert( separator(), -1, 0 );
|
||||||
createPopupItem( 701, OB, mesh, "&& isComputable" ); // COMPUTE
|
createPopupItem( 701, OB, mesh, "&& isComputable" ); // COMPUTE
|
||||||
createPopupItem( 711, OB, mesh, "&& isComputable" ); // PRECOMPUTE
|
createPopupItem( 711, OB, mesh, "&& isComputable && isPreComputable" ); // PRECOMPUTE
|
||||||
createPopupItem( 712, OB, mesh ); // EVALUATE
|
|
||||||
createPopupItem( 214, OB, mesh_group ); // UPDATE
|
createPopupItem( 214, OB, mesh_group ); // UPDATE
|
||||||
createPopupItem( 900, OB, mesh_group ); // ADV_INFO
|
createPopupItem( 900, OB, mesh_group ); // ADV_INFO
|
||||||
createPopupItem( 902, OB, mesh ); // STD_INFO
|
createPopupItem( 902, OB, mesh ); // STD_INFO
|
||||||
|
@ -1622,7 +1622,7 @@ void SMESHGUI_PrecomputeOp::stopOperation()
|
|||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief perform it's intention action: reinitialise dialog
|
* \brief reinitialize dialog after operaiton become active again
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
@ -1633,16 +1633,48 @@ void SMESHGUI_PrecomputeOp::resumeOperation()
|
|||||||
SMESHGUI_BaseComputeOp::resumeOperation();
|
SMESHGUI_BaseComputeOp::resumeOperation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief perform it's intention action: reinitialise dialog
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_PrecomputeOp::initDialog()
|
void SMESHGUI_PrecomputeOp::initDialog()
|
||||||
{
|
{
|
||||||
QList<int> modes;
|
QList<int> modes;
|
||||||
|
|
||||||
QMap<int, int> modeMap;
|
QMap<int, int> modeMap;
|
||||||
|
_PTR(SObject) pMesh = studyDS()->FindObjectID( myIObject->getEntry() );
|
||||||
|
getAssignedAlgos( pMesh, modeMap );
|
||||||
|
if ( modeMap.contains( SMESH::DIM_3D ) )
|
||||||
|
{
|
||||||
|
if ( modeMap.contains( SMESH::DIM_2D ) )
|
||||||
|
modes.append( SMESH::DIM_2D );
|
||||||
|
if ( modeMap.contains( SMESH::DIM_1D ) )
|
||||||
|
modes.append( SMESH::DIM_1D );
|
||||||
|
}
|
||||||
|
else if ( modeMap.contains( SMESH::DIM_2D ) )
|
||||||
|
{
|
||||||
|
if ( modeMap.contains( SMESH::DIM_1D ) )
|
||||||
|
modes.append( SMESH::DIM_1D );
|
||||||
|
}
|
||||||
|
|
||||||
|
myDlg->setPreviewModes( modes );
|
||||||
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief detect asigned mesh algorithms
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject) theMesh,
|
||||||
|
QMap<int,int>& theModeMap)
|
||||||
|
{
|
||||||
_PTR(SObject) aHypRoot;
|
_PTR(SObject) aHypRoot;
|
||||||
_PTR(GenericAttribute) anAttr;
|
_PTR(GenericAttribute) anAttr;
|
||||||
int aPart = SMESH::Tag_RefOnAppliedAlgorithms;
|
int aPart = SMESH::Tag_RefOnAppliedAlgorithms;
|
||||||
|
if ( theMesh && theMesh->FindSubObject( aPart, aHypRoot ) )
|
||||||
_PTR(SObject) pMesh = studyDS()->FindObjectID( myIObject->getEntry() );
|
|
||||||
if ( pMesh && pMesh->FindSubObject( aPart, aHypRoot ) )
|
|
||||||
{
|
{
|
||||||
_PTR(ChildIterator) anIter =
|
_PTR(ChildIterator) anIter =
|
||||||
SMESH::GetActiveStudyDocument()->NewChildIterator( aHypRoot );
|
SMESH::GetActiveStudyDocument()->NewChildIterator( aHypRoot );
|
||||||
@ -1660,28 +1692,22 @@ void SMESHGUI_PrecomputeOp::initDialog()
|
|||||||
CORBA::Object_var aVar = _CAST(SObject,anObj)->GetObject();
|
CORBA::Object_var aVar = _CAST(SObject,anObj)->GetObject();
|
||||||
if ( CORBA::is_nil( aVar ) )
|
if ( CORBA::is_nil( aVar ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SMESH::SMESH_Algo_var algo = SMESH::SMESH_3D_Algo::_narrow( aVar );
|
for( int dim = SMESH::DIM_1D; dim <= SMESH::DIM_3D; dim++ )
|
||||||
if ( !algo->_is_nil() )
|
|
||||||
{
|
{
|
||||||
modeMap[ SMESH::DIM_1D ] = 0;
|
SMESH::SMESH_Algo_var algo;
|
||||||
modeMap[ SMESH::DIM_2D ] = 0;
|
switch(dim) {
|
||||||
}
|
case SMESH::DIM_1D: algo = SMESH::SMESH_1D_Algo::_narrow( aVar ); break;
|
||||||
else
|
case SMESH::DIM_2D: algo = SMESH::SMESH_2D_Algo::_narrow( aVar ); break;
|
||||||
{
|
case SMESH::DIM_3D: algo = SMESH::SMESH_3D_Algo::_narrow( aVar ); break;
|
||||||
algo = SMESH::SMESH_2D_Algo::_narrow( aVar );
|
default: break;
|
||||||
|
}
|
||||||
if ( !algo->_is_nil() )
|
if ( !algo->_is_nil() )
|
||||||
modeMap[ SMESH::DIM_1D ] = 0;
|
theModeMap[ dim ] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( modeMap.contains( SMESH::DIM_1D ) )
|
|
||||||
modes.append( SMESH::DIM_1D );
|
|
||||||
if ( modeMap.contains( SMESH::DIM_2D ) )
|
|
||||||
modes.append( SMESH::DIM_2D );
|
|
||||||
|
|
||||||
myDlg->setPreviewModes( modes );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
@ -147,6 +147,12 @@ public:
|
|||||||
|
|
||||||
virtual LightApp_Dialog* dlg() const;
|
virtual LightApp_Dialog* dlg() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief returns map of assigned algorithms modes
|
||||||
|
*/
|
||||||
|
static void getAssignedAlgos(_PTR(SObject) theMesh,
|
||||||
|
QMap<int,int>& theModeMap);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void startOperation();
|
virtual void startOperation();
|
||||||
virtual void stopOperation();
|
virtual void stopOperation();
|
||||||
|
@ -337,6 +337,7 @@ SMESHGUI_ExtrusionDlg::~SMESHGUI_ExtrusionDlg()
|
|||||||
void SMESHGUI_ExtrusionDlg::Init (bool ResetControls)
|
void SMESHGUI_ExtrusionDlg::Init (bool ResetControls)
|
||||||
{
|
{
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
myIDs.clear();
|
||||||
|
|
||||||
LineEditElements->clear();
|
LineEditElements->clear();
|
||||||
myNbOkElements = 0;
|
myNbOkElements = 0;
|
||||||
@ -400,6 +401,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
|
|||||||
GroupArguments->setTitle(tr("EXTRUSION_1D"));
|
GroupArguments->setTitle(tr("EXTRUSION_1D"));
|
||||||
if (!CheckBoxMesh->isChecked())
|
if (!CheckBoxMesh->isChecked())
|
||||||
{
|
{
|
||||||
|
LineEditElements->clear();
|
||||||
|
myIDs.clear();
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(EdgeSelection);
|
aViewWindow->SetSelectionMode(EdgeSelection);
|
||||||
}
|
}
|
||||||
@ -410,6 +413,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
|
|||||||
GroupArguments->setTitle(tr("EXTRUSION_2D"));
|
GroupArguments->setTitle(tr("EXTRUSION_2D"));
|
||||||
if (!CheckBoxMesh->isChecked())
|
if (!CheckBoxMesh->isChecked())
|
||||||
{
|
{
|
||||||
|
LineEditElements->clear();
|
||||||
|
myIDs.clear();
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(FaceSelection);
|
aViewWindow->SetSelectionMode(FaceSelection);
|
||||||
}
|
}
|
||||||
@ -586,17 +591,6 @@ void SMESHGUI_ExtrusionDlg::ClickOnOk()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_ExtrusionDlg::ClickOnCancel()
|
void SMESHGUI_ExtrusionDlg::ClickOnCancel()
|
||||||
{
|
{
|
||||||
disconnect(mySelectionMgr, 0, this, 0);
|
|
||||||
mySelectionMgr->clearFilters();
|
|
||||||
//mySelectionMgr->clearSelected();
|
|
||||||
if (SMESH::GetCurrentVtkView()) {
|
|
||||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
|
||||||
SMESH::SetPointRepresentation(false);
|
|
||||||
SMESH::SetPickable();
|
|
||||||
}
|
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
|
||||||
aViewWindow->SetSelectionMode(ActorSelection);
|
|
||||||
mySMESHGUI->ResetState();
|
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -878,16 +872,45 @@ void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*)
|
|||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : closeEvent()
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
void SMESHGUI_ExtrusionDlg::closeEvent( QCloseEvent* )
|
||||||
|
{
|
||||||
|
/* same than click on cancel button */
|
||||||
|
disconnect(mySelectionMgr, 0, this, 0);
|
||||||
|
mySelectionMgr->clearFilters();
|
||||||
|
//mySelectionMgr->clearSelected();
|
||||||
|
if (SMESH::GetCurrentVtkView()) {
|
||||||
|
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||||
|
SMESH::SetPointRepresentation(false);
|
||||||
|
SMESH::SetPickable();
|
||||||
|
}
|
||||||
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
|
aViewWindow->SetSelectionMode(ActorSelection);
|
||||||
|
mySMESHGUI->ResetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_ExtrusionDlg::reject()
|
||||||
|
{
|
||||||
|
QDialog::reject();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : onSelectMesh()
|
// function : onSelectMesh()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
||||||
{
|
{
|
||||||
if (toSelectMesh)
|
if (toSelectMesh) {
|
||||||
|
myIDs = LineEditElements->text();
|
||||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||||
|
|
||||||
myFilterBtn->setEnabled(!toSelectMesh);
|
myFilterBtn->setEnabled(!toSelectMesh);
|
||||||
|
|
||||||
if (myEditCurrentArgument != LineEditElements) {
|
if (myEditCurrentArgument != LineEditElements) {
|
||||||
@ -910,7 +933,7 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(EdgeSelection);
|
aViewWindow->SetSelectionMode(EdgeSelection);
|
||||||
}
|
}
|
||||||
else if (aConstructorId == 0)
|
else if (aConstructorId == 1)
|
||||||
{
|
{
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(FaceSelection);
|
aViewWindow->SetSelectionMode(FaceSelection);
|
||||||
@ -922,6 +945,9 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
|
|
||||||
|
if (!toSelectMesh)
|
||||||
|
LineEditElements->setText( myIDs );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -69,9 +69,12 @@ public:
|
|||||||
SMESHGUI_ExtrusionDlg( SMESHGUI* );
|
SMESHGUI_ExtrusionDlg( SMESHGUI* );
|
||||||
~SMESHGUI_ExtrusionDlg();
|
~SMESHGUI_ExtrusionDlg();
|
||||||
|
|
||||||
|
void reject();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init( bool = true );
|
void Init( bool = true );
|
||||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||||
|
void closeEvent( QCloseEvent* );
|
||||||
void keyPressEvent( QKeyEvent* );
|
void keyPressEvent( QKeyEvent* );
|
||||||
int GetConstructorId();
|
int GetConstructorId();
|
||||||
|
|
||||||
@ -135,6 +138,7 @@ private:
|
|||||||
QPushButton* buttonHelp;
|
QPushButton* buttonHelp;
|
||||||
|
|
||||||
QString myHelpFileName;
|
QString myHelpFileName;
|
||||||
|
QString myIDs;
|
||||||
|
|
||||||
QPushButton* myFilterBtn;
|
QPushButton* myFilterBtn;
|
||||||
SMESHGUI_FilterDlg* myFilterDlg;
|
SMESHGUI_FilterDlg* myFilterDlg;
|
||||||
|
@ -560,11 +560,11 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup,
|
|||||||
myGrpTypeGroup->button(grpType)->setChecked(true);
|
myGrpTypeGroup->button(grpType)->setChecked(true);
|
||||||
onGrpTypeChanged(grpType);
|
onGrpTypeChanged(grpType);
|
||||||
|
|
||||||
|
myTypeId = aType;
|
||||||
if ( grpType == 0 ) {
|
if ( grpType == 0 ) {
|
||||||
myCurrentLineEdit = 0;
|
myCurrentLineEdit = 0;
|
||||||
myElements->clear();
|
myElements->clear();
|
||||||
setSelectionMode(aType);
|
setSelectionMode(aType);
|
||||||
myTypeId = aType;
|
|
||||||
|
|
||||||
setShowEntityMode(); // depends on myTypeId
|
setShowEntityMode(); // depends on myTypeId
|
||||||
|
|
||||||
|
@ -498,10 +498,10 @@ void SMESHGUI_GenericHypothesisCreator::onReject()
|
|||||||
QString SMESHGUI_GenericHypothesisCreator::helpPage() const
|
QString SMESHGUI_GenericHypothesisCreator::helpPage() const
|
||||||
{
|
{
|
||||||
QString aHypType = hypType();
|
QString aHypType = hypType();
|
||||||
QString aHelpFileName;
|
QString aHelpFileName = "";
|
||||||
if ( aHypType == "LocalLength" )
|
if ( aHypType == "LocalLength" )
|
||||||
aHelpFileName = "a1d_meshing_hypo_page.html#average_length_anchor";
|
aHelpFileName = "a1d_meshing_hypo_page.html#average_length_anchor";
|
||||||
if ( aHypType == "MaxLength" )
|
else if ( aHypType == "MaxLength" )
|
||||||
aHelpFileName = "a1d_meshing_hypo_page.html#max_length_anchor";
|
aHelpFileName = "a1d_meshing_hypo_page.html#max_length_anchor";
|
||||||
else if ( aHypType == "Arithmetic1D")
|
else if ( aHypType == "Arithmetic1D")
|
||||||
aHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor";
|
aHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor";
|
||||||
@ -528,9 +528,8 @@ QString SMESHGUI_GenericHypothesisCreator::helpPage() const
|
|||||||
else if ( aHypType == "LayerDistribution")
|
else if ( aHypType == "LayerDistribution")
|
||||||
aHelpFileName = "radial_prism_algo_page.html";
|
aHelpFileName = "radial_prism_algo_page.html";
|
||||||
else if ( aHypType == "SegmentLengthAroundVertex")
|
else if ( aHypType == "SegmentLengthAroundVertex")
|
||||||
aHelpFileName = "segments_around_vertex_algo.html";
|
aHelpFileName = "segments_around_vertex_algo_page.html";
|
||||||
else
|
|
||||||
aHelpFileName = "";
|
|
||||||
return aHelpFileName;
|
return aHelpFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// SMESH SMESHGUI : GUI for SMESH component
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
// File : SMESHGUI_HypothesesUtils.cxx
|
// File : SMESHGUI_HypothesesUtils.cxx
|
||||||
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
|
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
|
||||||
|
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
//
|
|
||||||
#include "SMESHGUI_HypothesesUtils.h"
|
#include "SMESHGUI_HypothesesUtils.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -82,8 +82,9 @@ namespace SMESH
|
|||||||
THypothesisDataMap myHypothesesMap;
|
THypothesisDataMap myHypothesesMap;
|
||||||
THypothesisDataMap myAlgorithmsMap;
|
THypothesisDataMap myAlgorithmsMap;
|
||||||
|
|
||||||
typedef QMap<QString,SMESHGUI_GenericHypothesisCreator*> THypCreatorMap;
|
// BUG 0020378
|
||||||
THypCreatorMap myHypCreatorMap;
|
//typedef QMap<QString,SMESHGUI_GenericHypothesisCreator*> THypCreatorMap;
|
||||||
|
//THypCreatorMap myHypCreatorMap;
|
||||||
|
|
||||||
QList<HypothesesSet*> myListOfHypothesesSets;
|
QList<HypothesesSet*> myListOfHypothesesSets;
|
||||||
|
|
||||||
@ -319,24 +320,26 @@ namespace SMESH
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator(const QString& aHypType)
|
HypothesisCreatorPtr GetHypothesisCreator(const QString& aHypType)
|
||||||
{
|
{
|
||||||
if(MYDEBUG) MESSAGE("Get HypothesisCreator for " << aHypType.toLatin1().data());
|
if(MYDEBUG) MESSAGE("Get HypothesisCreator for " << aHypType.toLatin1().data());
|
||||||
|
|
||||||
SMESHGUI_GenericHypothesisCreator* aCreator = 0;
|
SMESHGUI_GenericHypothesisCreator* aCreator = 0;
|
||||||
|
|
||||||
// check, if creator for this hypothesis type already exists
|
// check, if creator for this hypothesis type already exists
|
||||||
if (myHypCreatorMap.find(aHypType) != myHypCreatorMap.end()) {
|
// BUG 0020378
|
||||||
aCreator = myHypCreatorMap[aHypType];
|
//if (myHypCreatorMap.find(aHypType) != myHypCreatorMap.end()) {
|
||||||
}
|
// aCreator = myHypCreatorMap[aHypType];
|
||||||
else {
|
//}
|
||||||
|
//else
|
||||||
|
{
|
||||||
// 1. Init list of available hypotheses, if needed
|
// 1. Init list of available hypotheses, if needed
|
||||||
InitAvailableHypotheses();
|
InitAvailableHypotheses();
|
||||||
|
|
||||||
// 2. Get names of plugin libraries
|
// 2. Get names of plugin libraries
|
||||||
HypothesisData* aHypData = GetHypothesisData(aHypType);
|
HypothesisData* aHypData = GetHypothesisData(aHypType);
|
||||||
if (!aHypData)
|
if (!aHypData)
|
||||||
return aCreator;
|
return HypothesisCreatorPtr(aCreator);
|
||||||
QString aClientLibName = aHypData->ClientLibName;
|
QString aClientLibName = aHypData->ClientLibName;
|
||||||
QString aServerLibName = aHypData->ServerLibName;
|
QString aServerLibName = aHypData->ServerLibName;
|
||||||
|
|
||||||
@ -376,7 +379,8 @@ namespace SMESH
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// map hypothesis creator to a hypothesis name
|
// map hypothesis creator to a hypothesis name
|
||||||
myHypCreatorMap[aHypType] = aCreator;
|
// BUG 0020378
|
||||||
|
//myHypCreatorMap[aHypType] = aCreator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -386,7 +390,7 @@ namespace SMESH
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return aCreator;
|
return HypothesisCreatorPtr(aCreator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
// SMESH SMESHGUI : GUI for SMESH component
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
// File : SMESHGUI_HypothesesUtils.h
|
// File : SMESHGUI_HypothesesUtils.h
|
||||||
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
|
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
|
||||||
//
|
|
||||||
#ifndef SMESHGUI_HYPOTHESESUTILS_H
|
#ifndef SMESHGUI_HYPOTHESESUTILS_H
|
||||||
#define SMESHGUI_HYPOTHESESUTILS_H
|
#define SMESHGUI_HYPOTHESESUTILS_H
|
||||||
|
|
||||||
@ -47,6 +47,9 @@
|
|||||||
// STL includes
|
// STL includes
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
// boost includes
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
class HypothesisData;
|
class HypothesisData;
|
||||||
class HypothesesSet;
|
class HypothesesSet;
|
||||||
class SMESHGUI_GenericHypothesisCreator;
|
class SMESHGUI_GenericHypothesisCreator;
|
||||||
@ -55,6 +58,8 @@ class algo_error_array;
|
|||||||
|
|
||||||
namespace SMESH
|
namespace SMESH
|
||||||
{
|
{
|
||||||
|
typedef boost::shared_ptr<SMESHGUI_GenericHypothesisCreator> HypothesisCreatorPtr;
|
||||||
|
|
||||||
SMESHGUI_EXPORT
|
SMESHGUI_EXPORT
|
||||||
void InitAvailableHypotheses();
|
void InitAvailableHypotheses();
|
||||||
|
|
||||||
@ -82,12 +87,12 @@ namespace SMESH
|
|||||||
const HypothesisData* );
|
const HypothesisData* );
|
||||||
|
|
||||||
SMESHGUI_EXPORT
|
SMESHGUI_EXPORT
|
||||||
SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& );
|
HypothesisCreatorPtr GetHypothesisCreator( const QString& );
|
||||||
|
|
||||||
SMESHGUI_EXPORT
|
SMESHGUI_EXPORT
|
||||||
SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&,
|
SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&,
|
||||||
const QString&,
|
const QString&,
|
||||||
const bool = false);
|
const bool = false );
|
||||||
|
|
||||||
SMESHGUI_EXPORT
|
SMESHGUI_EXPORT
|
||||||
bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr );
|
bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr );
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// SMESH SMESHGUI : GUI for SMESH component
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
// File : SMESHGUI_MeshOp.cxx
|
// File : SMESHGUI_MeshOp.cxx
|
||||||
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
||||||
|
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
//
|
|
||||||
#include "SMESHGUI_MeshOp.h"
|
#include "SMESHGUI_MeshOp.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -1053,7 +1053,9 @@ void SMESHGUI_MeshOp::createHypothesis (const int theDim,
|
|||||||
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
||||||
} else {
|
} else {
|
||||||
// Get hypotheses creator client (GUI)
|
// Get hypotheses creator client (GUI)
|
||||||
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(theTypeName);
|
// BUG 0020378
|
||||||
|
//SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(theTypeName);
|
||||||
|
SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(theTypeName);
|
||||||
|
|
||||||
// Create hypothesis
|
// Create hypothesis
|
||||||
if (aCreator) {
|
if (aCreator) {
|
||||||
@ -1117,7 +1119,9 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex )
|
|||||||
if ( aHyp->_is_nil() )
|
if ( aHyp->_is_nil() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator( aHyp->GetName() );
|
// BUG 0020378
|
||||||
|
//SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHyp->GetName());
|
||||||
|
SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHyp->GetName());
|
||||||
if ( aCreator )
|
if ( aCreator )
|
||||||
{
|
{
|
||||||
// Get initial parameters
|
// Get initial parameters
|
||||||
@ -1699,11 +1703,14 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
|
|||||||
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
||||||
} else {
|
} else {
|
||||||
// Get hypotheses creator client (GUI)
|
// Get hypotheses creator client (GUI)
|
||||||
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName);
|
// BUG 0020378
|
||||||
|
//SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName);
|
||||||
|
SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHypName);
|
||||||
|
|
||||||
// Create algorithm
|
// Create algorithm
|
||||||
if (aCreator)
|
if (aCreator) {
|
||||||
aCreator->create(true, aHypName, myDlg);
|
aCreator->create(true, aHypName, myDlg);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
|
|||||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||||
myVectorDefinition(NONE_SELECT),
|
myVectorDefinition(NONE_SELECT),
|
||||||
myFilterDlg( 0 ),
|
myFilterDlg( 0 ),
|
||||||
mySelectedObject(SMESH::SMESH_IDSource::_nil())
|
mySelectedObject(SMESH::SMESH_IDSource::_nil()),
|
||||||
|
myActor(0)
|
||||||
{
|
{
|
||||||
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
|
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
|
||||||
|
|
||||||
@ -383,6 +384,7 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls)
|
|||||||
LineEditElements->clear();
|
LineEditElements->clear();
|
||||||
myElementsId = "";
|
myElementsId = "";
|
||||||
myNbOkElements = 0;
|
myNbOkElements = 0;
|
||||||
|
myIDs.clear();
|
||||||
|
|
||||||
myActor = 0;
|
myActor = 0;
|
||||||
myMesh = SMESH::SMESH_Mesh::_nil();
|
myMesh = SMESH::SMESH_Mesh::_nil();
|
||||||
@ -412,14 +414,13 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
||||||
{
|
{
|
||||||
//disconnect(mySelectionMgr, 0, this, 0);
|
disconnect(mySelectionMgr, 0, this, 0);
|
||||||
|
|
||||||
SALOME_ListIO io;
|
/* SALOME_ListIO io;
|
||||||
mySelectionMgr->selectedObjects( io );
|
mySelectionMgr->selectedObjects( io );
|
||||||
SALOME_ListIO aList;
|
SALOME_ListIO aList;
|
||||||
mySelectionMgr->setSelectedObjects( aList );
|
mySelectionMgr->setSelectedObjects( aList );*/
|
||||||
// LineEditElements->clear();
|
|
||||||
myNbOkElements = 0;
|
|
||||||
buttonApply->setEnabled(false);
|
buttonApply->setEnabled(false);
|
||||||
buttonOk->setEnabled(false);
|
buttonOk->setEnabled(false);
|
||||||
mySimulation->SetVisibility(false);
|
mySimulation->SetVisibility(false);
|
||||||
@ -447,6 +448,9 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
|||||||
|
|
||||||
if (!CheckBoxMesh->isChecked())
|
if (!CheckBoxMesh->isChecked())
|
||||||
{
|
{
|
||||||
|
LineEditElements->clear();
|
||||||
|
myIDs.clear();
|
||||||
|
myNbOkElements = 0;
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(aSelMode);
|
aViewWindow->SetSelectionMode(aSelMode);
|
||||||
}
|
}
|
||||||
@ -457,8 +461,8 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
|||||||
if (CheckBoxMesh->isChecked())
|
if (CheckBoxMesh->isChecked())
|
||||||
onSelectMesh(true);
|
onSelectMesh(true);
|
||||||
|
|
||||||
//connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||||
mySelectionMgr->setSelectedObjects( io );
|
// mySelectionMgr->setSelectedObjects( io );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -545,6 +549,7 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
|
SMESH::Update(myIO, SMESH::eDisplay);
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
|
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
|
||||||
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
||||||
Init(false);
|
Init(false);
|
||||||
@ -572,19 +577,14 @@ void SMESHGUI_RevolutionDlg::ClickOnOk()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_RevolutionDlg::ClickOnCancel()
|
void SMESHGUI_RevolutionDlg::ClickOnCancel()
|
||||||
{
|
{
|
||||||
disconnect(mySelectionMgr, 0, this, 0);
|
|
||||||
mySelectionMgr->clearFilters();
|
|
||||||
//mySelectionMgr->clearSelected();
|
|
||||||
if (SMESH::GetCurrentVtkView()) {
|
|
||||||
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
|
||||||
SMESH::SetPointRepresentation(false);
|
|
||||||
}
|
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
|
||||||
aViewWindow->SetSelectionMode(ActorSelection);
|
|
||||||
mySMESHGUI->ResetState();
|
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_RevolutionDlg::reject()
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ClickOnHelp()
|
// function : ClickOnHelp()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -685,7 +685,6 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
|
|||||||
if (myBusy) return;
|
if (myBusy) return;
|
||||||
|
|
||||||
// clear
|
// clear
|
||||||
myActor = 0;
|
|
||||||
QString aString = "";
|
QString aString = "";
|
||||||
|
|
||||||
myBusy = true;
|
myBusy = true;
|
||||||
@ -708,20 +707,23 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Handle(SALOME_InteractiveObject) IO = aList.First();
|
Handle(SALOME_InteractiveObject) IO = aList.First();
|
||||||
myMesh = SMESH::GetMeshByIO(IO);
|
SMESH::SMESH_Mesh_var aMeshVar = SMESH::GetMeshByIO(IO);
|
||||||
if (myMesh->_is_nil())
|
if (aMeshVar->_is_nil())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
myActor = SMESH::FindActorByObject(myMesh);
|
SMESH_Actor* anActor = SMESH::FindActorByObject(aMeshVar);
|
||||||
if (!myActor)
|
if (!anActor)
|
||||||
myActor = SMESH::FindActorByEntry(IO->getEntry());
|
anActor = SMESH::FindActorByEntry(IO->getEntry());
|
||||||
if (!myActor)
|
if (!anActor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int aNbUnits = 0;
|
int aNbUnits = 0;
|
||||||
|
|
||||||
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
||||||
myElementsId = "";
|
myElementsId = "";
|
||||||
|
myMesh = aMeshVar;
|
||||||
|
myActor = anActor;
|
||||||
|
myIO = IO;
|
||||||
|
|
||||||
// MakeGroups is available if there are groups
|
// MakeGroups is available if there are groups
|
||||||
if ( myMesh->NbGroups() == 0 ) {
|
if ( myMesh->NbGroups() == 0 ) {
|
||||||
@ -747,7 +749,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
|
|||||||
myNbOkElements = true;
|
myNbOkElements = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
|
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
||||||
if (!aMesh)
|
if (!aMesh)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -909,17 +911,16 @@ void SMESHGUI_RevolutionDlg::enterEvent (QEvent*)
|
|||||||
void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*)
|
void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*)
|
||||||
{
|
{
|
||||||
/* same than click on cancel button */
|
/* same than click on cancel button */
|
||||||
ClickOnCancel();
|
disconnect(mySelectionMgr, 0, this, 0);
|
||||||
}
|
mySelectionMgr->clearFilters();
|
||||||
|
//mySelectionMgr->clearSelected();
|
||||||
//=======================================================================
|
if (SMESH::GetCurrentVtkView()) {
|
||||||
// function : hideEvent()
|
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
|
||||||
// purpose : caused by ESC key
|
SMESH::SetPointRepresentation(false);
|
||||||
//=======================================================================
|
}
|
||||||
void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*)
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
{
|
aViewWindow->SetSelectionMode(ActorSelection);
|
||||||
if (!isMinimized())
|
mySMESHGUI->ResetState();
|
||||||
ClickOnCancel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -928,8 +929,10 @@ void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
||||||
{
|
{
|
||||||
if (toSelectMesh)
|
if (toSelectMesh) {
|
||||||
|
myIDs = LineEditElements->text();
|
||||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||||
myFilterBtn->setEnabled(!toSelectMesh);
|
myFilterBtn->setEnabled(!toSelectMesh);
|
||||||
@ -956,7 +959,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(EdgeSelection);
|
aViewWindow->SetSelectionMode(EdgeSelection);
|
||||||
}
|
}
|
||||||
else if (aConstructorId == 0)
|
else if (aConstructorId == 1)
|
||||||
{
|
{
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(FaceSelection);
|
aViewWindow->SetSelectionMode(FaceSelection);
|
||||||
@ -969,6 +972,9 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
|
|
||||||
|
if (!toSelectMesh)
|
||||||
|
LineEditElements->setText( myIDs );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -1118,6 +1124,8 @@ void SMESHGUI_RevolutionDlg::onSelectVectorMenu( QAction* action){
|
|||||||
if(!action)
|
if(!action)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
disconnect(mySelectionMgr, 0, this, 0);
|
||||||
|
|
||||||
switch(myMenuActions[action]) {
|
switch(myMenuActions[action]) {
|
||||||
case POINT_SELECT:
|
case POINT_SELECT:
|
||||||
SMESH::SetPointRepresentation(true);
|
SMESH::SetPointRepresentation(true);
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
// SMESH includes
|
// SMESH includes
|
||||||
#include "SMESH_SMESHGUI.hxx"
|
#include "SMESH_SMESHGUI.hxx"
|
||||||
|
|
||||||
|
// SALOME GUI includes
|
||||||
|
#include <SALOME_InteractiveObject.hxx>
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
@ -70,13 +73,14 @@ public:
|
|||||||
SMESHGUI_RevolutionDlg( SMESHGUI* );
|
SMESHGUI_RevolutionDlg( SMESHGUI* );
|
||||||
~SMESHGUI_RevolutionDlg();
|
~SMESHGUI_RevolutionDlg();
|
||||||
|
|
||||||
|
void reject();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
|
enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
|
||||||
|
|
||||||
void Init( bool = true);
|
void Init( bool = true);
|
||||||
void closeEvent( QCloseEvent* );
|
void closeEvent( QCloseEvent* );
|
||||||
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
void enterEvent( QEvent* ); /* mouse enter the QWidget */
|
||||||
void hideEvent( QHideEvent* ); /* ESC key */
|
|
||||||
void keyPressEvent( QKeyEvent* );
|
void keyPressEvent( QKeyEvent* );
|
||||||
int GetConstructorId();
|
int GetConstructorId();
|
||||||
bool IsAxisOk();
|
bool IsAxisOk();
|
||||||
@ -90,6 +94,7 @@ private:
|
|||||||
QString myElementsId;
|
QString myElementsId;
|
||||||
QWidget* myEditCurrentArgument; /* Current argument */
|
QWidget* myEditCurrentArgument; /* Current argument */
|
||||||
SVTK_Selector* mySelector;
|
SVTK_Selector* mySelector;
|
||||||
|
Handle(SALOME_InteractiveObject) myIO;
|
||||||
|
|
||||||
SMESH::SMESH_IDSource_var mySelectedObject;
|
SMESH::SMESH_IDSource_var mySelectedObject;
|
||||||
|
|
||||||
@ -152,6 +157,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
QString myHelpFileName;
|
QString myHelpFileName;
|
||||||
|
QString myIDs;
|
||||||
|
|
||||||
QPushButton* myFilterBtn;
|
QPushButton* myFilterBtn;
|
||||||
SMESHGUI_FilterDlg* myFilterDlg;
|
SMESHGUI_FilterDlg* myFilterDlg;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "SMESHGUI_Utils.h"
|
#include "SMESHGUI_Utils.h"
|
||||||
#include "SMESHGUI_VTKUtils.h"
|
#include "SMESHGUI_VTKUtils.h"
|
||||||
#include "SMESHGUI_GEOMGenUtils.h"
|
#include "SMESHGUI_GEOMGenUtils.h"
|
||||||
|
#include "SMESHGUI_ComputeDlg.h"
|
||||||
|
|
||||||
#include <SMESH_Type.h>
|
#include <SMESH_Type.h>
|
||||||
#include <SMESH_Actor.h>
|
#include <SMESH_Actor.h>
|
||||||
@ -113,6 +114,7 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const
|
|||||||
else if ( p=="controlMode" ) val = QVariant( controlMode( ind ) );
|
else if ( p=="controlMode" ) val = QVariant( controlMode( ind ) );
|
||||||
else if ( p=="displayMode" ) val = QVariant( displayMode( ind ) );
|
else if ( p=="displayMode" ) val = QVariant( displayMode( ind ) );
|
||||||
else if ( p=="isComputable" ) val = QVariant( isComputable( ind ) );
|
else if ( p=="isComputable" ) val = QVariant( isComputable( ind ) );
|
||||||
|
else if ( p=="isPreComputable" ) val = QVariant( isPreComputable( ind ) );
|
||||||
else if ( p=="hasReference" ) val = QVariant( hasReference( ind ) );
|
else if ( p=="hasReference" ) val = QVariant( hasReference( ind ) );
|
||||||
else if ( p=="isImported" ) val = QVariant( isImported( ind ) );
|
else if ( p=="isImported" ) val = QVariant( isImported( ind ) );
|
||||||
else if ( p=="facesOrientationMode" ) val = QVariant( facesOrientationMode( ind ) );
|
else if ( p=="facesOrientationMode" ) val = QVariant( facesOrientationMode( ind ) );
|
||||||
@ -384,6 +386,23 @@ QVariant SMESHGUI_Selection::isComputable( int ind ) const
|
|||||||
return QVariant( false );
|
return QVariant( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : isPreComputable
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
QVariant SMESHGUI_Selection::isPreComputable( int ind ) const
|
||||||
|
{
|
||||||
|
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
|
||||||
|
{
|
||||||
|
QMap<int,int> modeMap;
|
||||||
|
_PTR(SObject) pMesh = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
|
||||||
|
SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap );
|
||||||
|
return QVariant( modeMap.size() > 1 );
|
||||||
|
}
|
||||||
|
return QVariant( false );
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : hasReference
|
//function : hasReference
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -54,6 +54,7 @@ public:
|
|||||||
virtual bool isAutoColor( int ) const;
|
virtual bool isAutoColor( int ) const;
|
||||||
virtual int numberOfNodes( int ) const;
|
virtual int numberOfNodes( int ) const;
|
||||||
virtual QVariant isComputable( int ) const;
|
virtual QVariant isComputable( int ) const;
|
||||||
|
virtual QVariant isPreComputable( int ) const;
|
||||||
virtual QVariant hasReference( int ) const;
|
virtual QVariant hasReference( int ) const;
|
||||||
virtual QVariant isVisible( int ) const;
|
virtual QVariant isVisible( int ) const;
|
||||||
|
|
||||||
|
@ -130,6 +130,26 @@ namespace SMESH
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TPythonDump&
|
||||||
|
TPythonDump::
|
||||||
|
operator<<(const SMESH::GeometryType& theArg)
|
||||||
|
{
|
||||||
|
myStream<<"SMESH.";
|
||||||
|
switch(theArg){
|
||||||
|
case Geom_POINT: myStream<<"Geom_POINT"; break;
|
||||||
|
case Geom_EDGE: myStream<<"Geom_EDGE"; break;
|
||||||
|
case Geom_TRIANGLE: myStream<<"Geom_TRIANGLE"; break;
|
||||||
|
case Geom_QUADRANGLE: myStream<<"Geom_QUADRANGLE"; break;
|
||||||
|
case Geom_POLYGON: myStream<<"Geom_POLYGON"; break;
|
||||||
|
case Geom_TETRA: myStream<<"Geom_TETRA"; break;
|
||||||
|
case Geom_PYRAMID: myStream<<"Geom_PYRAMID"; break;
|
||||||
|
case Geom_HEXA: myStream<<"Geom_HEXA"; break;
|
||||||
|
case Geom_PENTA: myStream<<"Geom_PENTA"; break;
|
||||||
|
case Geom_POLYHEDRA: myStream<<"Geom_POLYHEDRA"; break;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template<class TArray>
|
template<class TArray>
|
||||||
void DumpArray(const TArray& theArray, std::ostringstream & theStream)
|
void DumpArray(const TArray& theArray, std::ostringstream & theStream)
|
||||||
{
|
{
|
||||||
@ -225,9 +245,11 @@ namespace SMESH
|
|||||||
case FT_Taper: myStream<< "aTaper"; break;
|
case FT_Taper: myStream<< "aTaper"; break;
|
||||||
case FT_Skew: myStream<< "aSkew"; break;
|
case FT_Skew: myStream<< "aSkew"; break;
|
||||||
case FT_Area: myStream<< "aArea"; break;
|
case FT_Area: myStream<< "aArea"; break;
|
||||||
|
case FT_Volume3D: myStream<< "aVolume3D"; break;
|
||||||
case FT_FreeBorders: myStream<< "aFreeBorders"; break;
|
case FT_FreeBorders: myStream<< "aFreeBorders"; break;
|
||||||
case FT_FreeEdges: myStream<< "aFreeEdges"; break;
|
case FT_FreeEdges: myStream<< "aFreeEdges"; break;
|
||||||
case FT_FreeNodes: myStream<< "aFreeNodes"; break;
|
case FT_FreeNodes: myStream<< "aFreeNodes"; break;
|
||||||
|
case FT_FreeFaces: myStream<< "aFreeFaces"; break;
|
||||||
case FT_MultiConnection: myStream<< "aMultiConnection"; break;
|
case FT_MultiConnection: myStream<< "aMultiConnection"; break;
|
||||||
case FT_MultiConnection2D:myStream<< "aMultiConnection2D";break;
|
case FT_MultiConnection2D:myStream<< "aMultiConnection2D";break;
|
||||||
case FT_Length: myStream<< "aLength"; break;
|
case FT_Length: myStream<< "aLength"; break;
|
||||||
@ -239,13 +261,17 @@ namespace SMESH
|
|||||||
case FT_LyingOnGeom: myStream<< "aLyingOnGeom"; break;
|
case FT_LyingOnGeom: myStream<< "aLyingOnGeom"; break;
|
||||||
case FT_RangeOfIds: myStream<< "aRangeOfIds"; break;
|
case FT_RangeOfIds: myStream<< "aRangeOfIds"; break;
|
||||||
case FT_BadOrientedVolume:myStream<< "aBadOrientedVolume";break;
|
case FT_BadOrientedVolume:myStream<< "aBadOrientedVolume";break;
|
||||||
|
case FT_LinearOrQuadratic:myStream<< "aLinearOrQuadratic";break;
|
||||||
|
case FT_GroupColor: myStream<< "aGroupColor"; break;
|
||||||
|
case FT_ElemGeomType: myStream<< "anElemGeomType"; break;
|
||||||
case FT_LessThan: myStream<< "aLessThan"; break;
|
case FT_LessThan: myStream<< "aLessThan"; break;
|
||||||
case FT_MoreThan: myStream<< "aMoreThan"; break;
|
case FT_MoreThan: myStream<< "aMoreThan"; break;
|
||||||
case FT_EqualTo: myStream<< "anEqualTo"; break;
|
case FT_EqualTo: myStream<< "anEqualTo"; break;
|
||||||
case FT_LogicalNOT: myStream<< "aLogicalNOT"; break;
|
case FT_LogicalNOT: myStream<< "aLogicalNOT"; break;
|
||||||
case FT_LogicalAND: myStream<< "aLogicalAND"; break;
|
case FT_LogicalAND: myStream<< "aLogicalAND"; break;
|
||||||
case FT_LogicalOR: myStream<< "aLogicalOR"; break;
|
case FT_LogicalOR: myStream<< "aLogicalOR"; break;
|
||||||
case FT_Undefined: myStream<< "anUndefined"; break;
|
case FT_Undefined:
|
||||||
|
default: myStream<< "anUndefined"; break;
|
||||||
}
|
}
|
||||||
myStream<<theArg;
|
myStream<<theArg;
|
||||||
}
|
}
|
||||||
|
@ -1510,10 +1510,10 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh
|
|||||||
if ( aNbNode > 4 )
|
if ( aNbNode > 4 )
|
||||||
aNbNode /= 2; // do not take into account additional middle nodes
|
aNbNode /= 2; // do not take into account additional middle nodes
|
||||||
|
|
||||||
SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 1 );
|
SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 0 );
|
||||||
for ( int nIndx = 1; nIndx <= aNbNode; nIndx++ )
|
for ( int nIndx = 0; nIndx < aNbNode; nIndx++ )
|
||||||
{
|
{
|
||||||
SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx < aNbNode ? nIndx+1 : 1 );
|
SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx+1 < aNbNode ? nIndx+1 : 0 );
|
||||||
if ( setOfEdge.insert( SMESH_TLink ( node1, node2 ) ).second )
|
if ( setOfEdge.insert( SMESH_TLink ( node1, node2 ) ).second )
|
||||||
{
|
{
|
||||||
listOfElemType.push_back( SMDSAbs_Edge );
|
listOfElemType.push_back( SMDSAbs_Edge );
|
||||||
@ -3840,7 +3840,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
int smID = smIDs[ i ];
|
int smID = smIDs[ i ];
|
||||||
if ( smID == 0 ) continue;
|
if ( smID == 0 ) continue;
|
||||||
const SMDS_MeshElement* elem = *iE;
|
const SMDS_MeshElement* elem = *iE;
|
||||||
if( smID >= maxID ) {
|
if( smID > maxID ) {
|
||||||
// corresponding subshape no longer exists: maybe geom group has been edited
|
// corresponding subshape no longer exists: maybe geom group has been edited
|
||||||
if ( myNewMeshImpl->HasShapeToMesh() )
|
if ( myNewMeshImpl->HasShapeToMesh() )
|
||||||
mySMESHDSMesh->RemoveElement( elem );
|
mySMESHDSMesh->RemoveElement( elem );
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
* \retval TCollection_AsciiString - The file name
|
* \retval TCollection_AsciiString - The file name
|
||||||
*/
|
*/
|
||||||
static const char* SmeshpyName() { return "smesh"; }
|
static const char* SmeshpyName() { return "smesh"; }
|
||||||
static const char* GenName() { return "smesh.smesh"; }
|
static const char* GenName() { return "smesh"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace SMESH
|
namespace SMESH
|
||||||
@ -108,6 +108,9 @@ namespace SMESH
|
|||||||
TPythonDump&
|
TPythonDump&
|
||||||
operator<<(const SMESH::ElementType& theArg);
|
operator<<(const SMESH::ElementType& theArg);
|
||||||
|
|
||||||
|
TPythonDump&
|
||||||
|
operator<<(const SMESH::GeometryType& theArg);
|
||||||
|
|
||||||
TPythonDump&
|
TPythonDump&
|
||||||
operator<<(const SMESH::long_array& theArg);
|
operator<<(const SMESH::long_array& theArg);
|
||||||
|
|
||||||
|
@ -93,6 +93,6 @@ Compound1 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0,
|
|||||||
smesh.SetName(Compound1, 'Compound_with_RenamedGrps_and_MergeElems')
|
smesh.SetName(Compound1, 'Compound_with_RenamedGrps_and_MergeElems')
|
||||||
# create a compound of two meshes with uniting groups with the same names and
|
# create a compound of two meshes with uniting groups with the same names and
|
||||||
# creating groups of all elements
|
# creating groups of all elements
|
||||||
Compound2 = smesh.smesh.ConcatenateWithGroups([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05)
|
Compound2 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05, True)
|
||||||
smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems')
|
smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems')
|
||||||
#end
|
#end
|
||||||
|
@ -557,24 +557,6 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
aMesh = Mesh(self, self.geompyD, aSmeshMesh)
|
aMesh = Mesh(self, self.geompyD, aSmeshMesh)
|
||||||
return aMesh
|
return aMesh
|
||||||
|
|
||||||
## Concatenate the given meshes into one mesh.
|
|
||||||
# @return an instance of Mesh class
|
|
||||||
# @param meshes the meshes to combine into one mesh
|
|
||||||
# @param uniteIdenticalGroups if true, groups with same names are united, else they are renamed
|
|
||||||
# @param mergeNodesAndElements if true, equal nodes and elements aremerged
|
|
||||||
# @param mergeTolerance tolerance for merging nodes
|
|
||||||
# @param allGroups forces creation of groups of all elements
|
|
||||||
def Concatenate( self, meshes, uniteIdenticalGroups,
|
|
||||||
mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False):
|
|
||||||
if allGroups:
|
|
||||||
aSmeshMesh = SMESH._objref_SMESH_Gen.ConcatenateWithGroups(
|
|
||||||
self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
|
|
||||||
else:
|
|
||||||
aSmeshMesh = SMESH._objref_SMESH_Gen.Concatenate(
|
|
||||||
self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
|
|
||||||
aMesh = Mesh(self, self.geompyD, aSmeshMesh)
|
|
||||||
return aMesh
|
|
||||||
|
|
||||||
## From SMESH_Gen interface
|
## From SMESH_Gen interface
|
||||||
# @return the list of integer values
|
# @return the list of integer values
|
||||||
# @ingroup l1_auxiliary
|
# @ingroup l1_auxiliary
|
||||||
|
@ -198,8 +198,9 @@ void StdMeshersGUI_LayerDistributionParamWdg::onEdit()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
CORBA::String_var hypType = myHyp->GetName();
|
CORBA::String_var hypType = myHyp->GetName();
|
||||||
SMESHGUI_GenericHypothesisCreator*
|
// BUG 0020378
|
||||||
editor = SMESH::GetHypothesisCreator( hypType.in() );
|
//SMESHGUI_GenericHypothesisCreator* editor = SMESH::GetHypothesisCreator(hypType.in());
|
||||||
|
SMESH::HypothesisCreatorPtr editor = SMESH::GetHypothesisCreator(hypType.in());
|
||||||
if ( !editor ) return;
|
if ( !editor ) return;
|
||||||
|
|
||||||
if ( myDlg ) myDlg->hide();
|
if ( myDlg ) myDlg->hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user