In MESH you can create a group of elements of a certain type. The main way to create a group, is to
select in the **Mesh** menu **Create Group** item (also available in the context menu of the mesh).
-To create a group you should define the following:
+To create a group you should define the following:
-* **Mesh** - the mesh whose elements will form your group. You can select your mesh in the Objet Browser or in the 3D viewer.
+* **Mesh** - the mesh whose elements will form your group. You can select your mesh in the Object Browser or in the 3D viewer.
* **Elements Type** - set of radio buttons allows to select the type of elements which will form your group:
* **Nodes**
* **0D Element**
the following ways:
* By adding all entities of the chosen type existing in the mesh. For this, turn on the **Select All** check-box. In this mode all controls, which allow selecting the entities, are disabled.
-* By choosing entities manually with the mouse in the 3D Viewer. For this, turn on the **Enable manual edition** check box. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. The **Set filter** button allows to define the filter for selection of the elements for your group. See more about filters on the :ref:`selection_filter_library_page` page.
+* By choosing entities manually with the mouse in the 3D Viewer. For this, turn on the **Enable manual edition** check box. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. The **Set filter** button allows to define the filter for selection of the elements for your group. See more about filters on the :ref:`selection_filter_library_page` page.
* By adding entities from either a sub-mesh or another group. For this, turn on the **Enable manual edition** check box. **Select from** fields group allows to select a sub-mesh or a group of the appropriate type and to **Add** their elements to the group.
In the **manual edition** mode you can
.. centered::
Brown cells belong to a group defined manually
-**See Also** a sample TUI Script of a :ref:`tui_create_standalone_group` operation.
+**See Also** a sample TUI Script of a :ref:`tui_create_standalone_group` operation.
.. _group_on_geom:
* *Direct geometry selection* to select a shape in the Object Browser or in the Viewer;
* *Find geometry by mesh element selection* to activate a dialog which retrieves a shape by the selected element generated on this shape.
-.. note::
+.. note::
This choice is available only if the mesh elements are already generated.
.. image:: ../images/a-creategroup.png
"Group on Filter"
#################
-To create a group on filter check **Group on filter** in the **Group type** field.
-The group on filter contains the elements of a certain type satisfying the defined filter.
+To create a group on filter check **Group on filter** in the **Group type** field.
+The group on filter contains the elements of a certain type satisfying the defined filter.
Group contents are dynamically updated if the mesh is modified.
-To define a group, click the **Set filter** button and define criteria of the filter in the opened dialog. After the operation is confirmed, a new group of mesh elements will be created. See more about filters on the :ref:`selection_filter_library_page` page.
+To define a group, click the **Set filter** button and define criteria of the filter in the opened dialog. After the operation is confirmed, a new group of mesh elements will be created. See more about filters on the :ref:`selection_filter_library_page` page.
.. image:: ../images/creategroup_on_filter.png
:align: center
// Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject();
// anIO->setEntry( theEntry.toUtf8().constData() );
-
- // get indexes of seleted elements
+
+ // get indexes of selected elements
TopExp::MapShapes( theMainShape, myMapOfShapes );
TopExp_Explorer exp( theShape, theType );
QSet<int> indices;
//! To publish the actor an all its internal devices
virtual
void
- AddToRender(vtkRenderer* theRendere);
+ AddToRender(vtkRenderer* theRendere);
virtual void SetVisibility( int theVisibility );
- //! Initialiaze the instance completely
+ //! Initialize the instance completely
virtual void
Initialize();
vtkUnstructuredGrid* my0DGrid;
vtkUnstructuredGrid* myBallGrid;
TVisualObjPtr myVisualObj;
-
+
SMESH_SVTKActor();
virtual ~SMESH_SVTKActor();
};
}
}
}
-
+
// Warn the user about presence of not supported elements
QString format;
std::vector< SMESH::EntityType > notSupportedElemTypes, presentNotSupported;
QList< QPair< GEOM::ListOfFields_var, QString > > aFieldList;
- // Get a file name to write in and additional otions
+ // Get a file name to write in and additional options
if ( isUNV || isDAT || isGMF ) // Export w/o options
{
if ( isUNV )
if ( !anInitialPath.isEmpty() )
fd->setDirectory( anInitialPath );
fd->selectFile(aMeshName);
-
-
+
+
QListView *lview = fd->findChild<QListView*>("listView");
if( lview ) {
lview->setMinimumHeight(200);
presentEntities = presentEntities | SMESH_Actor::e0DElements;
if ( !(presentEntities & SMESH_Actor::eBallElem) && anActor->GetObject()->GetNbEntities( SMDSAbs_Ball ) )
presentEntities = presentEntities | SMESH_Actor::eBallElem;
-
+
// as we know that all types of elements are present, we can exit the loop
if ( presentEntities == SMESH_Actor::eAllEntity )
break;
dlg.setShrinkCoef( int( shrinkCoef * 100. ) );
// hide unused controls
dlg.showControls( presentEntities, hasNodes );
-
+
if ( dlg.exec() ) {
nodeColor = dlg.nodeColor();
markerType = dlg.nodeMarkerType();
if ( !IObject->hasEntry() ) continue;
SMESH_Actor* anActor = SMESH::FindActorByEntry( IObject->getEntry() );
if ( !anActor ) continue;
-
+
// nodes: color, marker
anActor->SetNodeColor( nodeColor.redF(), nodeColor.greenF(), nodeColor.blueF() );
if ( markerType != VTK::MT_USER ) {
aColor = nodeColor; break;
case SMESH::EDGE:
aColor = edgeColor; break;
- case SMESH::FACE:
+ case SMESH::FACE:
aColor = faceColor; break;
case SMESH::VOLUME:
aColor = volumeColor; break;
- case SMESH::ELEM0D:
+ case SMESH::ELEM0D:
aColor = elem0dColor; break;
- case SMESH::BALL:
+ case SMESH::BALL:
aColor = ballColor; break;
default: break;
}
-
+
if ( aColor.isValid() ) {
SALOMEDS::Color aGroupColor;
aGroupColor.R = aColor.redF();
v = qMax( uint(0), qMin ( v, size-1 ) );
return v;
}
-
+
} //namespace
void SMESHGUI::OnEditDelete()
SMESH::long_array_var info = theMesh->GetMeshInfo();
long nbOdElems = info[SMDSEntity_0D];
long nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge];
- long nbFaces = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] +
- info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle] +
+ long nbFaces = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] +
+ info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle] +
info[SMDSEntity_Polygon] + info[SMDSEntity_Quad_Polygon];
- long nbVolumes = info[SMDSEntity_Tetra] + info[SMDSEntity_Quad_Tetra] +
- info[SMDSEntity_Hexa] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa] +
- info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid] +
+ long nbVolumes = info[SMDSEntity_Tetra] + info[SMDSEntity_Quad_Tetra] +
+ info[SMDSEntity_Hexa] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa] +
+ info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid] +
info[SMDSEntity_Penta] + info[SMDSEntity_Quad_Penta] + info[SMDSEntity_BiQuad_Penta] +
- info[SMDSEntity_Polyhedra] +
+ info[SMDSEntity_Polyhedra] +
info[SMDSEntity_Hexagonal_Prism];
long nbBalls = info[SMDSEntity_Ball];
long requestedSize = nbOdElems + nbBalls + nbEdges + nbFaces + nbVolumes;
*nbElements = requestedSize;
-
+
*entities = SMESH_Actor::eAllEntity;
*hidden = 0;
SALOME_ListIteratorOfListIO It( selected );
for ( ; It.More(); It.Next() ) {
SMESHGUI_MeshInfoDlg* dlg = new SMESHGUI_MeshInfoDlg( SMESHGUI::desktop(), page );
- dlg->showInfo( It.Value() );
+ dlg->showInfo( It.Value() );
dlg->show();
}
}
addElemTb = createTool( tr( "TB_ADD" ), QString( "SMESHAddElementToolbar" ) ),
addNonElemTb = createTool( tr( "TB_ADDNON" ), QString( "SMESHAddElementToolbar" ) ),
remTb = createTool( tr( "TB_REM" ), QString( "SMESHRemoveToolbar" ) ),
- //renumbTb = createTool( tr( "TB_RENUMBER" ), QString( "SMESHRenumberingToolbar" ) ),
- transformTb = createTool( tr( "TB_TRANSFORM" ), QString( "SMESHTransformationToolbar" ) ),
+ //renumbTb = createTool( tr( "TB_RENUMBER" ), QString( "SMESHRenumberingToolbar" ) ),
+ transformTb = createTool( tr( "TB_TRANSFORM" ), QString( "SMESHTransformationToolbar" ) ),
modifyTb = createTool( tr( "TB_MODIFY" ), QString( "SMESHModificationToolbar" ) ),
measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ),
dispModeTb = createTool( tr( "TB_DISP_MODE" ), QString( "SMESHDisplayModeToolbar" ) );
int numGroup = addPreference( tr( "PREF_GROUP_NUMBERING" ), meshTab );
setPreferenceProperty( numGroup, "columns", 2 );
-
+
addPreference( tr( "PREF_NUMBERING_NODE" ), numGroup, LightApp_Preferences::Color, "SMESH", "numbering_node_color" );
addVtkFontPref( tr( "PREF_NUMBERING_FONT" ), numGroup, "numbering_node_font", true );
* \brief Store visual parameters
*
* This method is called just before the study document is saved.
- * Store visual parameters in AttributeParameter attribue(s)
+ * Store visual parameters in AttributeParameter attribute(s)
*/
void SMESHGUI::storeVisualParameters (int savePoint)
{
* \brief Restore visual parameters
*
* This method is called after the study document is opened.
- * Restore visual parameters from AttributeParameter attribue(s)
+ * Restore visual parameters from AttributeParameter attribute(s)
*/
void SMESHGUI::restoreVisualParameters (int savePoint)
{
aPlaneData.Mode = aPropertyValueList[0].toInt( &ok );
if( !ok )
continue;
-
+
ok = false;
aPlaneData.isOpenGLClipping = aPropertyValueList[1].toInt( &ok );
if( !ok )
// Clipping
else if (paramNameStr.startsWith("ClippingPlane")) {
QStringList vals = val.split(gDigitsSep, QString::SkipEmptyParts);
- // old format - val looks like "Off" or "1:0:0:0.5:0:0"
+ // old format - val looks like "Off" or "1:0:0:0.5:0:0"
// (mode(relative), is OpenGL clipping plane, orientation, distance, two angles)
- // or "0:1:1:10.5:1.0:1.0:15.0:10.0:10.0"
+ // or "0:1:1:10.5:1.0:1.0:15.0:10.0:10.0"
// (mode(absolute), is OpenGL clipping plane, orientation, base point(x, y, z), direction (dx, dy, dz))
// new format - val looks like "Off" or "0" (plane id)
// (note: in new format "Off" value is used only for consistency,
break;
}
}
-
+
}
}
-
+
// update all VTK views
QList<SUIT_ViewManager*> lst;
while( vtkActor* aVTKActor = anAllActors->GetNextActor() )
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) )
anActor->SetOpenGLClippingPlane();
-
+
vtkView->getRenderer()->ResetCameraClippingRange();
vtkView->Repaint();
}
name = SMESH::fromUtf8(obj->GetName());
if ( name.isEmpty() )
return;
-
+
if ( data.last() == "stop" )
application()->putInfo( tr( "MESH_LOADING_MSG_FINISHED" ).arg( name ) );
else
return false;
SalomeApp_DataObject* obj = dynamic_cast<SalomeApp_DataObject*>(appStudy->findObjectByEntry(entry));
-
+
if(!obj)
return false;
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( application() );
if( !anApp )
return false;
-
+
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
if(!appStudy)
return false;
-
+
_PTR(Study) aStudy = appStudy->studyDS();
-
+
if(!aStudy)
return false;
-
+
bool aLocked = (_PTR(AttributeStudyProperties)(appStudy->studyDS()->GetProperties()))->IsLocked();
if ( aLocked ) {
SUIT_MessageBox::warning ( anApp->desktop(), QObject::tr("WRN_WARNING"), QObject::tr("WRN_STUDY_LOCKED") );
//use PseudoShape in case if mesh has no shape
if(HasShapeToMesh())
myLocSubShape = _gen_i->GeomObjectToShape( aSubShape);
- else
+ else
myLocSubShape = _impl->GetShapeToMesh();
-
+
const int hypId = anHyp->GetId();
std::string error;
status = _impl->AddHypothesis( myLocSubShape, hypId, &error );
TopoDS_Shape aShape = _gen_i->GeomObjectToShape( theGeomObj );
if ( !aShape.IsNull() )
{
- aNewGroup =
+ aNewGroup =
SMESH::SMESH_GroupOnGeom::_narrow( createGroup( theElemType, theName, aShape ));
if ( _gen_i->CanPublishInStudy( aNewGroup ) )
//=============================================================================
/*!
- \brief Intersect list of groups. New group is created. All mesh elements that
+ \brief Intersect list of groups. New group is created. All mesh elements that
are present in all initial groups simultaneously are added to the new one.
\param theGroups list of groups
\param theName name of group to be created
}
//=============================================================================
-/*!
+/*!
* New group is created. All mesh elements that are present in
* a main group but is not present in a tool group are added to the new one
*/
//=============================================================================
/*!
- \brief Cut lists of groups. New group is created. All mesh elements that are
+ \brief Cut lists of groups. New group is created. All mesh elements that are
present in main groups but do not present in tool groups are added to the new one
\param theMainGroups list of main groups
\param theToolGroups list of tool groups
*/
//=============================================================================
SMESH::SMESH_Group_ptr
-SMESH_Mesh_i::CutListOfGroups(const SMESH::ListOfGroups& theMainGroups,
- const SMESH::ListOfGroups& theToolGroups,
+SMESH_Mesh_i::CutListOfGroups(const SMESH::ListOfGroups& theMainGroups,
+ const SMESH::ListOfGroups& theToolGroups,
const char* theName )
throw (SALOME::SALOME_Exception)
{
return aResult._retn();
}
-
+
//=============================================================================
/*!
* Returns type of elements for given submesh
SMESH_CATCH( SMESH::throwCorbaException );
- return type;
+ return type;
}
-
+
//=============================================================================
/*!
// find inverse elements
SMDS_ElemIteratorPtr eIt = aNode->GetInverseElementIterator();
- aResult->length( aNode->NbInverseElements() );
+ aResult->length( aNode->NbInverseElements() );
for( int i = 0; eIt->more(); ++i )
{
const SMDS_MeshElement* elem = eIt->next();
//=============================================================================
/*!
- * For given element returns ID of result shape after
+ * For given element returns ID of result shape after
* ::FindShape() from SMESH_MeshEditor
* If there is not element for given ID - returns -1
*/
int nbGrp = NbGroups();
if ( !nbGrp )
return;
-
+
SMESH::ListOfGroups* grpList = 0;
// avoid dump of "GetGroups"
{
aWriter->Write();
char* str = aWriter->GetOutputString();
int size = aWriter->GetOutputStringLength();
-
- //Allocate octect buffer of required size
+
+ //Allocate octet buffer of required size
CORBA::Octet* OctetBuf = SALOMEDS::TMPFile::allocbuf(size);
- //Copy ostrstream content to the octect buffer
+ //Copy ostrstream content to the octet buffer
memcpy(OctetBuf, str, size);
//Create and return TMPFile
SeqFile = new SALOMEDS::TMPFile(size, size, OctetBuf, 1);
}
return isShared;
}
-
+
//-----------------------------------------------------------------------------
//! check algorithms
static bool checkAlgo(const SMESHDS_Hypothesis* theA1,
return strcmp( theA1->GetName(), theA2->GetName() ) == 0;
}
-
+
//-----------------------------------------------------------------------------
//! Check if sub-shape hypotheses are concurrent
bool IsConcurrent(const SMESH_DimHyp* theOther) const
return ( this->_subMesh->GetId() < theOther->_subMesh->GetId() );
}
-
+
}; // end of SMESH_DimHyp
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void addDimHypInstance(const int theDim,
+void addDimHypInstance(const int theDim,
const TopoDS_Shape& theShape,
const SMESH_Algo* theAlgo,
const SMESH_subMesh* theSubMesh,
dimHyp->_hypotheses.push_front(theAlgo);
listOfdimHyp.push_back( dimHyp );
}
-
+
SMESH_DimHyp* dimHyp = const_cast<SMESH_DimHyp*>( listOfdimHyp.back() );
dimHyp->_hypotheses.insert( dimHyp->_hypotheses.end(),
theHypList.begin(), theHypList.end() );
if ( find_first_of( theListOfId.begin(), theListOfId.end(),
otherListOfId.begin(), otherListOfId.end() ) == theListOfId.end() )
continue;
-
+
// union two lists (from source into target)
TListOfInt::iterator it2 = otherListOfId.begin();
for ( ; it2 != otherListOfId.end(); it2++ ) {
addDimHypInstance( j, aSubMeshShape, anAlgo, sm, hypList, dimHypListArr );
}
} // end iterations on submesh
-
+
// iterate on created dimension-hypotheses and check for concurrents
for ( int i = 0; i < 4; i++ ) {
const TDimHypList& listOfDimHyp = dimHypListArr[i];
}
}
}
-
+
removeDimHyps(dimHypListArr);
-
+
// now, minimize the number of concurrent groups
// Here we assume that lists of submeshes can have same submesh
// in case of multi-dimension algorithms, as result
mesh.SetMeshOrder( subMeshOrder );
res = true;
-
+
SMESH::SMESH_Mesh_var me = _this();
_gen_i->UpdateIcons( me );
// END Implementation of SMESH_MeshPartDS
//
//================================================================================
-
-
/// may only be needed to be called in case if mesh objects are
/// created when no active study is set to %SMESH component.
/// In this case, mentioned functions can be used to forcibly
-/// publish existing objects in the currrently active study.
+/// publish existing objects in the currently active study.
///
/// Note that if there are no open study, these methods will do
/// nothing.
{
SUIT_ViewManager* vm = app->getViewManager( SVTK_Viewer::Type(), create );
if ( vm )
- {
+ {
window = dynamic_cast<SALOME_View*>( vm->getViewModel() );
}
}
props.nodeColor.b );
props.markerType = actor->GetMarkerType();
props.markerScale = actor->GetMarkerScale();
-
+
actor->GetEdgeColor( props.edgeColor.r,
props.edgeColor.g,
props.edgeColor.b );
props.edgeWidth = qMax( (int)actor->GetLineWidth(), 1 );
-
+
actor->GetSufaceColor( props.surfaceColor.r,
props.surfaceColor.g,
props.surfaceColor.b,
props.surfaceColor.delta );
-
+
actor->GetVolumeColor( props.volumeColor.r,
props.volumeColor.g,
props.volumeColor.b,
props.volumeColor.delta );
-
+
actor->Get0DColor( props.elem0dColor.r,
props.elem0dColor.g,
props.elem0dColor.b );
props.elem0dSize = qMax( (int)actor->Get0DSize(), 1 );
-
+
actor->GetBallColor( props.ballColor.r,
props.ballColor.g,
props.ballColor.b );
props.ballScale = qMax( actor->GetBallScale(), 1e-2 );
-
+
actor->GetOutlineColor( props.outlineColor.r,
props.outlineColor.g,
props.outlineColor.b );
props.outlineWidth = qMax( (int)actor->GetOutlineWidth(), 1 );
-
+
actor->GetFacesOrientationColor( props.orientationColor.r,
props.orientationColor.g,
props.orientationColor.b );
props.orientationScale = actor->GetFacesOrientationScale();
props.orientation3d = actor->GetFacesOrientation3DVectors();
-
+
props.shrinkFactor = actor->GetShrinkFactor();
-
+
props.opacity = actor->GetOpacity();
}
return props;
props.nodeColor.b );
if ( props.markerType != VTK::MT_USER )
actor->SetMarkerStd( props.markerType, props.markerScale );
-
+
actor->SetEdgeColor( props.edgeColor.r,
props.edgeColor.g,
props.edgeColor.b );
actor->SetLineWidth( qMax( (double)props.edgeWidth, 1. ) );
-
+
actor->SetSufaceColor( props.surfaceColor.r,
props.surfaceColor.g,
props.surfaceColor.b,
props.surfaceColor.delta );
-
+
actor->SetVolumeColor( props.volumeColor.r,
props.volumeColor.g,
props.volumeColor.b,
props.volumeColor.delta );
-
+
actor->Set0DColor( props.elem0dColor.r,
props.elem0dColor.g,
props.elem0dColor.b );
actor->Set0DSize( qMax( (double)props.elem0dSize, 1. ) );
-
+
actor->SetBallColor( props.ballColor.r,
props.ballColor.g,
props.ballColor.b );
actor->SetBallScale( qMax( props.ballScale, 1e-2 ) );
-
+
actor->SetOutlineColor( props.outlineColor.r,
props.outlineColor.g,
props.outlineColor.b );
actor->SetOutlineWidth( qMax( (double)props.outlineWidth, 1. ) );
-
+
actor->SetFacesOrientationColor( props.orientationColor.r,
props.orientationColor.g,
props.orientationColor.b );
actor->SetFacesOrientationScale( props.orientationScale );
actor->SetFacesOrientation3DVectors( props.orientation3d );
-
+
actor->SetShrinkFactor( props.shrinkFactor );
-
+
actor->SetOpacity( props.opacity );
-
+
view->Repaint();
}
}
TUpdateEvent( const char* uid ) : myUid( uid ) {}
virtual void Execute()
{
- Handle(SALOME_InteractiveObject) io =
+ Handle(SALOME_InteractiveObject) io =
new SALOME_InteractiveObject( myUid, "SMESH", "" );
SMESH::Update( io, true );
}
if ( !selMgr )
return;
-
+
selMgr->clearFilters();
SVTK_ViewWindow* vw = SMESH::GetViewWindow();
return;
SMESH_Actor* actor = SMESH::FindActorByEntry( myUid );
-
+
if ( !actor || !actor->hasIO() )
return;
-
+
Handle(SALOME_InteractiveObject) io = actor->getIO();
SALOME_ListIO ios;
ios.Append( io );
if ( vw->SelectionMode() == ActorSelection )
return;
-
+
TColStd_MapOfInteger idMap;
std::vector<int>::const_iterator it;
for ( it = myIds.begin(); it != myIds.end(); ++it )
if ( sobject )
ProcessVoidEvent( new TSelectListEvent( sobject->GetID().c_str(), ids, append ) );
}
-
+
/////////////////////////////////////////////////////////////////
/// \brief Select element of the mesh, sub-mesh or group.
/// \param uid Mesh object's study UID or IOR.
if ( !selMgr )
return;
-
+
selMgr->clearFilters();
SVTK_ViewWindow* vw = SMESH::GetViewWindow();
return;
SMESH_Actor* actor = SMESH::FindActorByEntry( myUid );
-
+
if ( !actor || !actor->hasIO() )
return;
-
+
Handle(SALOME_InteractiveObject) io = actor->getIO();
SALOME_ListIO ios;
ios.Append( io );
if ( vw->SelectionMode() != EdgeOfCellSelection )
return;
-
+
SVTK_IndexedMapOfIds idMap;
std::vector<std::pair<int, int> >::const_iterator it;
for ( it = myIds.begin(); it != myIds.end(); ++it )
void SMESH_Swig::setSelectionMode(SelectionMode mode, int viewUid)
{
init();
- ProcessVoidEvent( new TSetSelectionModeEvent( mode, viewUid ) );
+ ProcessVoidEvent( new TSetSelectionModeEvent( mode, viewUid ) );
}
/////////////////////////////////////////////////////////////////
typedef std::vector<int> TResult;
TResult myResult;
const char* myUid;
-
+
TGetSelectedEvent( const char* uid )
: myUid( uid ) {}
-
+
virtual void Execute()
{
SVTK_ViewWindow* vw = SMESH::GetViewWindow();
if ( !vw )
return;
- SVTK_Selector* selector = vw->GetSelector();
+ SVTK_Selector* selector = vw->GetSelector();
if ( !selector )
return;
typedef std::vector<std::pair<int, int> > TResult;
TResult myResult;
const char* myUid;
-
+
TGetSelectedPairEvent( const char* uid )
: myUid( uid ) {}
-
+
virtual void Execute()
{
SVTK_ViewWindow* vw = SMESH::GetViewWindow();
if ( vw->SelectionMode() != EdgeOfCellSelection )
return;
- SVTK_Selector* selector = vw->GetSelector();
+ SVTK_Selector* selector = vw->GetSelector();
if ( !selector )
return;
int nbEdges = thePrism.myNbEdgesInWires.front(); // nb outer edges
int nbSides = nbEdges;
-
+
list< TopoDS_Edge >::const_iterator edgeIt = thePrism.myBottomEdges.begin();
std::advance( edgeIt, nbEdges-1 );
TopoDS_Edge prevE = *edgeIt;
// isPrevStraight = isCurStraight;
// iPrev = iE;
// }
-
+
return nbSides;
}
//=======================================================================
//function : StdMeshers_Prism_3D
-//purpose :
+//purpose :
//=======================================================================
StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, SMESH_Gen* gen)
//=======================================================================
//function : CheckHypothesis
-//purpose :
+//purpose :
//=======================================================================
bool StdMeshers_Prism_3D::CheckHypothesis(SMESH_Mesh& aMesh,
StdMeshers_Quadrangle_2D* quadAlgo = TQuadrangleAlgo::instance( this, myHelper );
TopTools_MapOfShape faceMap;
- TopTools_IndexedDataMapOfShapeListOfShape edgeToFaces;
+ TopTools_IndexedDataMapOfShapeListOfShape edgeToFaces;
TopExp::MapShapesAndAncestors( thePrism.myShape3D,
TopAbs_EDGE, TopAbs_FACE, edgeToFaces );
for ( size_t iN = 1; iN < srcNodeStr.size(); ++iN ) // add segments
{
// find an EDGE to set a new segment
- std::pair<int, TopAbs_ShapeEnum> id2type =
+ std::pair<int, TopAbs_ShapeEnum> id2type =
myHelper->GetMediumPos( newNodes[ iN-1 ], newNodes[ iN ] );
if ( id2type.second != TopAbs_EDGE )
{
{
SMESH_MeshEditor::TListOfListOfNodes lln( 1, list< const SMDS_MeshNode* >() );
lln.back().push_back ( vn );
- lln.back().push_front( newNodes[ iN-isPrev ] ); // to keep
+ lln.back().push_front( newNodes[ iN-isPrev ] ); // to keep
SMESH_MeshEditor( mesh ).MergeNodes( lln );
}
}
std::vector<int> aVec = (*anIt).second;
nb2d += Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
}
-
+
MapShapeNbElemsItr anIt = aResMap.find( meshFaces[NumBase-1] );
std::vector<int> aVec = (*anIt).second;
bool IsQuadratic = (aVec[SMDSEntity_Quad_Triangle]>aVec[SMDSEntity_Triangle]) ||
{
return true;
}
- NSProjUtils::TNodeNodeMap& n2nMap =
+ NSProjUtils::TNodeNodeMap& n2nMap =
(NSProjUtils::TNodeNodeMap&) TProjction2dAlgo::instance( this )->GetNodesMap();
n2nMap.clear();
meshDS->MoveNode( topNode, distXYZ[1], distXYZ[2], distXYZ[3] ); // transform can be inaccurate
}
// create node column
- TNode2ColumnMap::iterator bN_col =
+ TNode2ColumnMap::iterator bN_col =
myBotToColumnMap.insert( make_pair ( bN, TNodeColumn() )).first;
TNodeColumn & column = bN_col->second;
column.resize( zSize );
for ( int iN = 0; iN < nbNodes; ++iN )
nodes[ iN ] = nIt->next();
nodes.back() = nodes[0];
-
+
// loop on links
double dist2;
for ( int iN = 0; iN < nbNodes; ++iN )
EdgeWithNeighbors() {}
bool IsInternal() const { return !_edge.IsNull() && _edge.Orientation() == TopAbs_INTERNAL; }
};
- // PrismSide contains all FACEs linking a bottom EDGE with a top one.
- struct PrismSide
+ // PrismSide contains all FACEs linking a bottom EDGE with a top one.
+ struct PrismSide
{
TopoDS_Face _face; // a currently treated upper FACE
TopTools_IndexedMapOfShape *_faces; // all FACEs (pointer because of a private copy constructor)
}
return edges.size();
}
-
+
//--------------------------------------------------------------------------------
/*!
* \brief Return number of faces sharing given edges
SMESH_Block::init();
myShapeIDMap.Clear();
myShapeIndex2ColumnMap.clear();
-
+
int wallFaceIds[ NB_WALL_FACES ] = { // to walk around a block
SMESH_Block::ID_Fx0z, SMESH_Block::ID_F1yz,
SMESH_Block::ID_Fx1z, SMESH_Block::ID_F0yz
<< n << ", " << n+1 << ", "
<< n+nb+2 << ", " << n+nb+1 << "]) " << endl;
}
-
+
#endif
}
//================================================================================
/*!
* \brief Return geometry of the top or bottom curve
- * \param isTop -
- * \retval Adaptor3d_Curve* -
+ * \param isTop -
+ * \retval Adaptor3d_Curve* -
*/
//================================================================================
meshDS->IndexToShape( notFaceID2 ),
*myHelper.GetMesh(),
TopAbs_FACE );
- if ( face.IsNull() )
+ if ( face.IsNull() )
throw SALOME_Exception("StdMeshers_PrismAsBlock::TSideFace::Value() face.IsNull()");
int faceID = meshDS->ShapeToIndex( face );
me->mySurface = me->myShapeID2Surf[ faceID ];
if ( v1.ShapeType() == TopAbs_VERTEX ) {
nbInserted += SMESH_Block::Insert( v1, vertIdVec[ 1 ], shapeMap);
}
-
+
// from V1 column
SMESH_Block::GetEdgeVertexIDs( edgeIdVec[ V1_EDGE ], vertIdVec);
GetColumns(1, col1, col2 );
// if ( edgeID = edgeIdVec[ _v1 ]) edgeID = edgeIdVec[ _v0 ];
// else edgeID = edgeIdVec[ _v1 ];
// SMESH_Block::Insert( sideEdge, edgeID, shapeMap);
-
+
// // top edge
// TopoDS_Edge topEdge = GetEdge( TOP_EDGE );
// SMESH_Block::Insert( topEdge, edgeIdVec[ _u1 ], shapeMap);
//================================================================================
/*!
- * \brief Creates TVerticalEdgeAdaptor
+ * \brief Creates TVerticalEdgeAdaptor
* \param columnsMap - node column map
* \param parameter - normalized parameter
*/
TParam2ColumnIt col, col2;
TParam2ColumnMap* u2cols = side->GetColumns();
side->GetColumns( u , col, col2 );
-
+
int j, i = myV ? mySide->ColumnHeight()-1 : 0;
const SMDS_MeshNode* n = 0;
//================================================================================
/*!
- * \brief Costructor of TPCurveOnHorFaceAdaptor fills its map of
+ * \brief Constructor of TPCurveOnHorFaceAdaptor fills its map of
* normalized parameter to node UV on a horizontal face
* \param [in] sideFace - lateral prism side
* \param [in] isTop - is \a horFace top or bottom of the prism