mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-11 05:53:07 +05:00
Merge branch 'master' into gni/evolution
This commit is contained in:
commit
7d695e3d0c
@ -72,8 +72,6 @@ class MESHDRIVER_EXPORT Driver_Mesh
|
|||||||
|
|
||||||
virtual SMESH_ComputeErrorPtr GetError();
|
virtual SMESH_ComputeErrorPtr GetError();
|
||||||
|
|
||||||
//virtual bool CanExportMesh() const { return false; } //= 0;
|
|
||||||
|
|
||||||
// check if a mesh is too large to export it using IDTYPE;
|
// check if a mesh is too large to export it using IDTYPE;
|
||||||
// check either max ID or number of elements
|
// check either max ID or number of elements
|
||||||
template< typename IDTYPE >
|
template< typename IDTYPE >
|
||||||
|
@ -503,7 +503,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
|||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
vector<TInt> aNodeIds(aNbNodes);
|
vector<TInt> aNodeIds(aNbNodes);
|
||||||
for ( int iElem = 0; iElem < aNbElems; iElem++ )
|
for ( TInt iElem = 0; iElem < aNbElems; iElem++ )
|
||||||
{
|
{
|
||||||
bool anIsValidConnect = false;
|
bool anIsValidConnect = false;
|
||||||
TCConnSlice aConnSlice = aCellInfo->GetConnSlice(iElem);
|
TCConnSlice aConnSlice = aCellInfo->GetConnSlice(iElem);
|
||||||
|
@ -786,7 +786,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
|
|
||||||
// iterator on elements of a current type
|
// iterator on elements of a current type
|
||||||
SMDS_ElemIteratorPtr elemIterator;
|
SMDS_ElemIteratorPtr elemIterator;
|
||||||
int iElem = 0;
|
TInt iElem = 0;
|
||||||
|
|
||||||
// Treat POLYGONs
|
// Treat POLYGONs
|
||||||
// ---------------
|
// ---------------
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
// SALOME GEOM includes
|
// SALOME GEOM includes
|
||||||
#include <GEOMBase.h>
|
#include <GEOMBase.h>
|
||||||
#include <GEOMImpl_Types.hxx>
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
#include <GEOM_Client.hxx>
|
||||||
#include <GEOM_SelectionFilter.h>
|
#include <GEOM_SelectionFilter.h>
|
||||||
#include <GEOM_wrap.hxx>
|
#include <GEOM_wrap.hxx>
|
||||||
#include <GeometryGUI.h>
|
#include <GeometryGUI.h>
|
||||||
@ -318,10 +319,29 @@ SUIT_SelectionFilter* SMESHGUI_MeshOp::createFilter( const int theId ) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Return type of shape contained in a group
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
TopAbs_ShapeEnum getGroupType(const TopoDS_Shape& group)
|
||||||
|
{
|
||||||
|
if ( group.ShapeType() != TopAbs_COMPOUND )
|
||||||
|
return group.ShapeType();
|
||||||
|
|
||||||
|
// iterate on a compound
|
||||||
|
TopoDS_Iterator it( group );
|
||||||
|
if ( it.More() )
|
||||||
|
return getGroupType( it.Value() );
|
||||||
|
|
||||||
|
return TopAbs_SHAPE;
|
||||||
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief check if selected shape is a sub-shape of the shape to mesh
|
* \brief check if selected shape is a sub-shape of the shape to mesh
|
||||||
* \retval bool - check result
|
* \retval bool - check result
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
bool SMESHGUI_MeshOp::isSubshapeOk() const
|
bool SMESHGUI_MeshOp::isSubshapeOk() const
|
||||||
@ -354,7 +374,8 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
|
|||||||
|
|
||||||
// check all selected shapes
|
// check all selected shapes
|
||||||
QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
|
QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
|
||||||
for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++) {
|
for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++)
|
||||||
|
{
|
||||||
QString aSubGeomEntry = (*aSubShapesIter);
|
QString aSubGeomEntry = (*aSubShapesIter);
|
||||||
_PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data());
|
_PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data());
|
||||||
if (!pSubGeom) return false;
|
if (!pSubGeom) return false;
|
||||||
@ -366,7 +387,8 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
|
|||||||
// skl for NPAL14695 - implementation of searching of mainObj
|
// skl for NPAL14695 - implementation of searching of mainObj
|
||||||
GEOM::GEOM_Object_var mainObj = op->GetMainShape(aSubGeomVar); /* _var not _wrap as
|
GEOM::GEOM_Object_var mainObj = op->GetMainShape(aSubGeomVar); /* _var not _wrap as
|
||||||
mainObj already exists! */
|
mainObj already exists! */
|
||||||
while( !mainObj->_is_nil()) {
|
while( !mainObj->_is_nil())
|
||||||
|
{
|
||||||
CORBA::String_var entry1 = mainObj->GetEntry();
|
CORBA::String_var entry1 = mainObj->GetEntry();
|
||||||
CORBA::String_var entry2 = mainGeom->GetEntry();
|
CORBA::String_var entry2 = mainGeom->GetEntry();
|
||||||
if (std::string( entry1.in() ) == entry2.in() )
|
if (std::string( entry1.in() ) == entry2.in() )
|
||||||
@ -382,21 +404,18 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
|
|||||||
GEOM::SHAPE,/*sorted=*/false);
|
GEOM::SHAPE,/*sorted=*/false);
|
||||||
if ( ids->length() > 0 )
|
if ( ids->length() > 0 )
|
||||||
{
|
{
|
||||||
ids->length( 1 );
|
GEOM_Client geomClient;
|
||||||
GEOM::GEOM_Object_var compSub = geomGen->AddSubShape( aSubGeomVar, ids );
|
TopoDS_Shape subShape = geomClient.GetShape( geomGen, aSubGeomVar );
|
||||||
if ( !compSub->_is_nil() )
|
TopoDS_Shape mainShape = geomClient.GetShape( geomGen, mainGeom );
|
||||||
{
|
if ( subShape.IsNull() || mainShape.IsNull() )
|
||||||
GEOM::ListOfGO_var shared = sop->GetSharedShapes( mainGeom,
|
return false;
|
||||||
compSub,
|
|
||||||
compSub->GetShapeType() );
|
TopAbs_ShapeEnum subType = getGroupType( subShape );
|
||||||
geomGen->RemoveObject( compSub );
|
TopTools_IndexedMapOfShape subMap;
|
||||||
compSub->UnRegister();
|
TopExp::MapShapes( subShape, subType, subMap );
|
||||||
if ( shared->length() > 0 ) {
|
for ( TopExp_Explorer exp( mainShape, subType ); exp.More(); exp.Next() )
|
||||||
geomGen->RemoveObject( shared[0] );
|
if ( subMap.Contains( exp.Current() ))
|
||||||
shared[0]->UnRegister();
|
return true;
|
||||||
}
|
|
||||||
return ( shared->length() > 0 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ Cracked bended pipes being a common encountered case, a specific module was deve
|
|||||||
:align: center
|
:align: center
|
||||||
:alt: Print screen of GUI
|
:alt: Print screen of GUI
|
||||||
|
|
||||||
Print screen of GUI of the extension *Meshed Pipe with a crack*
|
Print screen of GUI of the extension *Meshed Pipe with a crack*
|
||||||
|
|
||||||
The GUI is a window with mandatory and optional parameters. Optional parameters have to be activated by ticking the corresponding check box. Parameters are explained on the following figures and table. Angles are in degrees and lengths dimensions are all the same and shall then be consistent with each other’s.
|
The GUI is a window with mandatory and optional parameters. Optional parameters have to be activated by ticking the corresponding check box. Parameters are explained on the following figures and table. Angles are in degrees and lengths dimensions are all the same and shall then be consistent with each other’s.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user