mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-14 03:57:27 +05:00
untabify
This commit is contained in:
parent
e9bec6bddf
commit
752ad5bd14
File diff suppressed because it is too large
Load Diff
@ -1,21 +1,21 @@
|
|||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
/* */
|
/* */
|
||||||
/* LIBMESH V 5.46 */
|
/* LIBMESH V 5.46 */
|
||||||
/* */
|
/* */
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
/* */
|
/* */
|
||||||
/* Description: handle .meshb file format I/O */
|
/* Description: handle .meshb file format I/O */
|
||||||
/* Author: Loic MARECHAL */
|
/* Author: Loic MARECHAL */
|
||||||
/* Creation date: feb 16 2007 */
|
/* Creation date: feb 16 2007 */
|
||||||
/* Last modification: dec 09 2011 */
|
/* Last modification: dec 09 2011 */
|
||||||
/* */
|
/* */
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
/* Defines */
|
/* Defines */
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
|
|
||||||
#include "SMESH_DriverGMF.hxx"
|
#include "SMESH_DriverGMF.hxx"
|
||||||
@ -35,92 +35,92 @@
|
|||||||
|
|
||||||
enum GmfKwdCod
|
enum GmfKwdCod
|
||||||
{
|
{
|
||||||
GmfReserved1, \
|
GmfReserved1, \
|
||||||
GmfVersionFormatted, \
|
GmfVersionFormatted, \
|
||||||
GmfReserved2, \
|
GmfReserved2, \
|
||||||
GmfDimension, \
|
GmfDimension, \
|
||||||
GmfVertices, \
|
GmfVertices, \
|
||||||
GmfEdges, \
|
GmfEdges, \
|
||||||
GmfTriangles, \
|
GmfTriangles, \
|
||||||
GmfQuadrilaterals, \
|
GmfQuadrilaterals, \
|
||||||
GmfTetrahedra, \
|
GmfTetrahedra, \
|
||||||
GmfPrisms, \
|
GmfPrisms, \
|
||||||
GmfHexahedra, \
|
GmfHexahedra, \
|
||||||
GmfIterationsAll, \
|
GmfIterationsAll, \
|
||||||
GmfTimesAll, \
|
GmfTimesAll, \
|
||||||
GmfCorners, \
|
GmfCorners, \
|
||||||
GmfRidges, \
|
GmfRidges, \
|
||||||
GmfRequiredVertices, \
|
GmfRequiredVertices, \
|
||||||
GmfRequiredEdges, \
|
GmfRequiredEdges, \
|
||||||
GmfRequiredTriangles, \
|
GmfRequiredTriangles, \
|
||||||
GmfRequiredQuadrilaterals, \
|
GmfRequiredQuadrilaterals, \
|
||||||
GmfTangentAtEdgeVertices, \
|
GmfTangentAtEdgeVertices, \
|
||||||
GmfNormalAtVertices, \
|
GmfNormalAtVertices, \
|
||||||
GmfNormalAtTriangleVertices, \
|
GmfNormalAtTriangleVertices, \
|
||||||
GmfNormalAtQuadrilateralVertices, \
|
GmfNormalAtQuadrilateralVertices, \
|
||||||
GmfAngleOfCornerBound, \
|
GmfAngleOfCornerBound, \
|
||||||
GmfTrianglesP2, \
|
GmfTrianglesP2, \
|
||||||
GmfEdgesP2, \
|
GmfEdgesP2, \
|
||||||
GmfSolAtPyramids, \
|
GmfSolAtPyramids, \
|
||||||
GmfQuadrilateralsQ2, \
|
GmfQuadrilateralsQ2, \
|
||||||
GmfISolAtPyramids, \
|
GmfISolAtPyramids, \
|
||||||
GmfSubDomainFromGeom, \
|
GmfSubDomainFromGeom, \
|
||||||
GmfTetrahedraP2, \
|
GmfTetrahedraP2, \
|
||||||
GmfFault_NearTri, \
|
GmfFault_NearTri, \
|
||||||
GmfFault_Inter, \
|
GmfFault_Inter, \
|
||||||
GmfHexahedraQ2, \
|
GmfHexahedraQ2, \
|
||||||
GmfExtraVerticesAtEdges, \
|
GmfExtraVerticesAtEdges, \
|
||||||
GmfExtraVerticesAtTriangles, \
|
GmfExtraVerticesAtTriangles, \
|
||||||
GmfExtraVerticesAtQuadrilaterals, \
|
GmfExtraVerticesAtQuadrilaterals, \
|
||||||
GmfExtraVerticesAtTetrahedra, \
|
GmfExtraVerticesAtTetrahedra, \
|
||||||
GmfExtraVerticesAtPrisms, \
|
GmfExtraVerticesAtPrisms, \
|
||||||
GmfExtraVerticesAtHexahedra, \
|
GmfExtraVerticesAtHexahedra, \
|
||||||
GmfVerticesOnGeometricVertices, \
|
GmfVerticesOnGeometricVertices, \
|
||||||
GmfVerticesOnGeometricEdges, \
|
GmfVerticesOnGeometricEdges, \
|
||||||
GmfVerticesOnGeometricTriangles, \
|
GmfVerticesOnGeometricTriangles, \
|
||||||
GmfVerticesOnGeometricQuadrilaterals, \
|
GmfVerticesOnGeometricQuadrilaterals, \
|
||||||
GmfEdgesOnGeometricEdges, \
|
GmfEdgesOnGeometricEdges, \
|
||||||
GmfFault_FreeEdge, \
|
GmfFault_FreeEdge, \
|
||||||
GmfPolyhedra, \
|
GmfPolyhedra, \
|
||||||
GmfPolygons, \
|
GmfPolygons, \
|
||||||
GmfFault_Overlap, \
|
GmfFault_Overlap, \
|
||||||
GmfPyramids, \
|
GmfPyramids, \
|
||||||
GmfBoundingBox, \
|
GmfBoundingBox, \
|
||||||
GmfBody, \
|
GmfBody, \
|
||||||
GmfPrivateTable, \
|
GmfPrivateTable, \
|
||||||
GmfFault_BadShape, \
|
GmfFault_BadShape, \
|
||||||
GmfEnd, \
|
GmfEnd, \
|
||||||
GmfTrianglesOnGeometricTriangles, \
|
GmfTrianglesOnGeometricTriangles, \
|
||||||
GmfTrianglesOnGeometricQuadrilaterals, \
|
GmfTrianglesOnGeometricQuadrilaterals, \
|
||||||
GmfQuadrilateralsOnGeometricTriangles, \
|
GmfQuadrilateralsOnGeometricTriangles, \
|
||||||
GmfQuadrilateralsOnGeometricQuadrilaterals, \
|
GmfQuadrilateralsOnGeometricQuadrilaterals, \
|
||||||
GmfTangents, \
|
GmfTangents, \
|
||||||
GmfNormals, \
|
GmfNormals, \
|
||||||
GmfTangentAtVertices, \
|
GmfTangentAtVertices, \
|
||||||
GmfSolAtVertices, \
|
GmfSolAtVertices, \
|
||||||
GmfSolAtEdges, \
|
GmfSolAtEdges, \
|
||||||
GmfSolAtTriangles, \
|
GmfSolAtTriangles, \
|
||||||
GmfSolAtQuadrilaterals, \
|
GmfSolAtQuadrilaterals, \
|
||||||
GmfSolAtTetrahedra, \
|
GmfSolAtTetrahedra, \
|
||||||
GmfSolAtPrisms, \
|
GmfSolAtPrisms, \
|
||||||
GmfSolAtHexahedra, \
|
GmfSolAtHexahedra, \
|
||||||
GmfDSolAtVertices, \
|
GmfDSolAtVertices, \
|
||||||
GmfISolAtVertices, \
|
GmfISolAtVertices, \
|
||||||
GmfISolAtEdges, \
|
GmfISolAtEdges, \
|
||||||
GmfISolAtTriangles, \
|
GmfISolAtTriangles, \
|
||||||
GmfISolAtQuadrilaterals, \
|
GmfISolAtQuadrilaterals, \
|
||||||
GmfISolAtTetrahedra, \
|
GmfISolAtTetrahedra, \
|
||||||
GmfISolAtPrisms, \
|
GmfISolAtPrisms, \
|
||||||
GmfISolAtHexahedra, \
|
GmfISolAtHexahedra, \
|
||||||
GmfIterations, \
|
GmfIterations, \
|
||||||
GmfTime, \
|
GmfTime, \
|
||||||
GmfFault_SmallTri, \
|
GmfFault_SmallTri, \
|
||||||
GmfCoarseHexahedra
|
GmfCoarseHexahedra
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
/* External procedures */
|
/* External procedures */
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
|
|
||||||
MESHDriverGMF_EXPORT extern int GmfOpenMesh(const char *, int, ...);
|
MESHDriverGMF_EXPORT extern int GmfOpenMesh(const char *, int, ...);
|
||||||
@ -133,7 +133,7 @@ MESHDriverGMF_EXPORT extern void GmfSetLin(int, int, ...);
|
|||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
/* Fortran 77 API */
|
/* Fortran 77 API */
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
|
|
||||||
#if defined(F77_NO_UNDER_SCORE)
|
#if defined(F77_NO_UNDER_SCORE)
|
||||||
@ -144,7 +144,7 @@ MESHDriverGMF_EXPORT extern void GmfSetLin(int, int, ...);
|
|||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
/* Transmesh private API */
|
/* Transmesh private API */
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef TRANSMESH
|
#ifdef TRANSMESH
|
||||||
|
@ -645,8 +645,8 @@ void SMESH_ActorDef::SetPointsLabeled( bool theIsPointsLabeled )
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SMESH_ActorDef::SetPointsFontProperties( SMESH::LabelFont theFamily, int theSize,
|
void SMESH_ActorDef::SetPointsFontProperties( SMESH::LabelFont theFamily, int theSize,
|
||||||
bool theBold, bool theItalic, bool theShadow,
|
bool theBold, bool theItalic, bool theShadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
||||||
{
|
{
|
||||||
if(myNodeActor) {
|
if(myNodeActor) {
|
||||||
myNodeActor->SetFontProperties( theFamily, theSize, theBold, theItalic, theShadow, r, g, b );
|
myNodeActor->SetFontProperties( theFamily, theSize, theBold, theItalic, theShadow, r, g, b );
|
||||||
@ -656,8 +656,8 @@ void SMESH_ActorDef::SetPointsFontProperties( SMESH::LabelFont theFamily, int th
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SMESH_ActorDef::SetCellsFontProperties( SMESH::LabelFont theFamily, int theSize,
|
void SMESH_ActorDef::SetCellsFontProperties( SMESH::LabelFont theFamily, int theSize,
|
||||||
bool theBold, bool theItalic, bool theShadow,
|
bool theBold, bool theItalic, bool theShadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
||||||
{
|
{
|
||||||
if(my3DActor) {
|
if(my3DActor) {
|
||||||
my3DActor->SetFontProperties( theFamily, theSize, theBold, theItalic, theShadow, r, g, b );
|
my3DActor->SetFontProperties( theFamily, theSize, theBold, theItalic, theShadow, r, g, b );
|
||||||
|
@ -164,11 +164,11 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
|
|||||||
virtual void UpdateDistribution() = 0;
|
virtual void UpdateDistribution() = 0;
|
||||||
|
|
||||||
virtual void SetPointsFontProperties( SMESH::LabelFont family, int size,
|
virtual void SetPointsFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b ) = 0;
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b ) = 0;
|
||||||
virtual void SetCellsFontProperties( SMESH::LabelFont family, int size,
|
virtual void SetCellsFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b ) = 0;
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b ) = 0;
|
||||||
|
|
||||||
#ifndef DISABLE_PLOT2DVIEWER
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
virtual SPlot2d_Histogram* GetPlot2Histogram() = 0;
|
virtual SPlot2d_Histogram* GetPlot2Histogram() = 0;
|
||||||
|
@ -181,11 +181,11 @@ class SMESH_ActorDef : public SMESH_Actor
|
|||||||
virtual bool GetPointsLabeled();
|
virtual bool GetPointsLabeled();
|
||||||
|
|
||||||
virtual void SetPointsFontProperties( SMESH::LabelFont family, int size,
|
virtual void SetPointsFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
||||||
virtual void SetCellsFontProperties( SMESH::LabelFont family, int size,
|
virtual void SetCellsFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
||||||
|
|
||||||
virtual void SetCellsLabeled(bool theIsCellsLabeled);
|
virtual void SetCellsLabeled(bool theIsCellsLabeled);
|
||||||
virtual bool GetCellsLabeled();
|
virtual bool GetCellsLabeled();
|
||||||
|
@ -144,10 +144,10 @@ namespace SMESH
|
|||||||
|
|
||||||
void
|
void
|
||||||
GetColor( const QString& theSect,
|
GetColor( const QString& theSect,
|
||||||
const QString& theName,
|
const QString& theName,
|
||||||
QColor& color,
|
QColor& color,
|
||||||
int& delta,
|
int& delta,
|
||||||
QString def)
|
QString def)
|
||||||
{
|
{
|
||||||
|
|
||||||
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||||
@ -160,15 +160,15 @@ namespace SMESH
|
|||||||
std::map<SMDSAbs_ElementType,int> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
|
std::map<SMDSAbs_ElementType,int> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
|
||||||
std::map<SMDSAbs_ElementType,int> entities;
|
std::map<SMDSAbs_ElementType,int> entities;
|
||||||
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_0DElement,
|
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_0DElement,
|
||||||
theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));
|
theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));
|
||||||
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Ball,
|
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Ball,
|
||||||
theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0));
|
theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0));
|
||||||
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Edge,
|
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Edge,
|
||||||
theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0));
|
theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0));
|
||||||
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Face,
|
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Face,
|
||||||
theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0));
|
theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0));
|
||||||
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Volume,
|
entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Volume,
|
||||||
theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0));
|
theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0));
|
||||||
return entities;
|
return entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,10 +78,10 @@ SMESHOBJECT_EXPORT
|
|||||||
SMESHOBJECT_EXPORT
|
SMESHOBJECT_EXPORT
|
||||||
void
|
void
|
||||||
GetColor( const QString& theSect,
|
GetColor( const QString& theSect,
|
||||||
const QString& theName,
|
const QString& theName,
|
||||||
QColor& color,
|
QColor& color,
|
||||||
int& delta,
|
int& delta,
|
||||||
QString def);
|
QString def);
|
||||||
|
|
||||||
SMESHOBJECT_EXPORT
|
SMESHOBJECT_EXPORT
|
||||||
std::map<SMDSAbs_ElementType,int>
|
std::map<SMDSAbs_ElementType,int>
|
||||||
|
@ -119,8 +119,8 @@ SMESH_CellLabelActor::~SMESH_CellLabelActor() {
|
|||||||
|
|
||||||
|
|
||||||
void SMESH_CellLabelActor::SetFontProperties( SMESH::LabelFont family, int size,
|
void SMESH_CellLabelActor::SetFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
||||||
{
|
{
|
||||||
switch ( family ) {
|
switch ( family ) {
|
||||||
case SMESH::FntArial:
|
case SMESH::FntArial:
|
||||||
|
@ -61,8 +61,8 @@ public:
|
|||||||
virtual void RemoveFromRender(vtkRenderer* theRenderer);
|
virtual void RemoveFromRender(vtkRenderer* theRenderer);
|
||||||
|
|
||||||
virtual void SetFontProperties( SMESH::LabelFont family, int size,
|
virtual void SetFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
||||||
|
|
||||||
void UpdateLabels();
|
void UpdateLabels();
|
||||||
|
|
||||||
|
@ -111,8 +111,8 @@ SMESH_NodeLabelActor::~SMESH_NodeLabelActor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SMESH_NodeLabelActor::SetFontProperties( SMESH::LabelFont family, int size,
|
void SMESH_NodeLabelActor::SetFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
|
||||||
{
|
{
|
||||||
switch ( family ) {
|
switch ( family ) {
|
||||||
case SMESH::FntArial:
|
case SMESH::FntArial:
|
||||||
|
@ -58,8 +58,8 @@ public:
|
|||||||
virtual void RemoveFromRender(vtkRenderer* theRenderer);
|
virtual void RemoveFromRender(vtkRenderer* theRenderer);
|
||||||
|
|
||||||
virtual void SetFontProperties( SMESH::LabelFont family, int size,
|
virtual void SetFontProperties( SMESH::LabelFont family, int size,
|
||||||
bool bold, bool italic, bool shadow,
|
bool bold, bool italic, bool shadow,
|
||||||
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
|
||||||
|
|
||||||
void UpdateLabels();
|
void UpdateLabels();
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ SMESH_PreviewActorsCollection::~SMESH_PreviewActorsCollection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape,
|
bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape,
|
||||||
TopAbs_ShapeEnum theType,
|
TopAbs_ShapeEnum theType,
|
||||||
const QString& theEntry )
|
const QString& theEntry )
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
|
||||||
|
@ -129,9 +129,9 @@ SMESH_SVTKActor
|
|||||||
if (aCell->GetCellType() != VTK_POLYHEDRON)
|
if (aCell->GetCellType() != VTK_POLYHEDRON)
|
||||||
#endif
|
#endif
|
||||||
if(aCell->GetCellType() == VTK_VERTEX ) {
|
if(aCell->GetCellType() == VTK_VERTEX ) {
|
||||||
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||||
} else if(aCell->GetCellType() == VTK_POLY_VERTEX ) {
|
} else if(aCell->GetCellType() == VTK_POLY_VERTEX ) {
|
||||||
myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||||
} else {
|
} else {
|
||||||
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ void memostat(const char* f, int l);
|
|||||||
void memostat(const char* f, int l)
|
void memostat(const char* f, int l)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
//rnv: TODO: find alternative of the malloc_stats() on windows platform
|
//rnv: TODO: find alternative of the malloc_stats() on windows platform
|
||||||
#else
|
#else
|
||||||
/* struct mallinfo mem = mallinfo(); */
|
/* struct mallinfo mem = mallinfo(); */
|
||||||
/* std::cerr << f << ":"<< l << " " << mem.arena << " " << mem.ordblks << " " << mem.hblks << " " << mem.hblkhd << " " << mem.uordblks << " " << mem.fordblks << " " << mem.keepcost << std::endl; */
|
/* std::cerr << f << ":"<< l << " " << mem.arena << " " << mem.ordblks << " " << mem.hblks << " " << mem.hblkhd << " " << mem.uordblks << " " << mem.fordblks << " " << mem.keepcost << std::endl; */
|
||||||
|
@ -559,9 +559,9 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
|
|||||||
myWidgets[i2DQuadrangles][iLinear] ->setProperty( "text", "?" );
|
myWidgets[i2DQuadrangles][iLinear] ->setProperty( "text", "?" );
|
||||||
myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", "?" );
|
myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", "?" );
|
||||||
myWidgets[i2DPolygons][iTotal] ->setProperty( "text", "?" );
|
myWidgets[i2DPolygons][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iTotal] ->setProperty( "text", "?" );
|
myWidgets[iNb][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iLinear] ->setProperty( "text", "?" );
|
myWidgets[iNb][iLinear] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iQuadratic] ->setProperty( "text", "?" );
|
myWidgets[iNb][iQuadratic] ->setProperty( "text", "?" );
|
||||||
}
|
}
|
||||||
else if ( nb3DLinear + nb3DQuadratic > 0 )
|
else if ( nb3DLinear + nb3DQuadratic > 0 )
|
||||||
{
|
{
|
||||||
@ -581,9 +581,9 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
|
|||||||
myWidgets[i3DPrisms][iQuadratic] ->setProperty( "text", "?" );
|
myWidgets[i3DPrisms][iQuadratic] ->setProperty( "text", "?" );
|
||||||
myWidgets[i3DHexaPrisms][iTotal] ->setProperty( "text", "?" );
|
myWidgets[i3DHexaPrisms][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[i3DPolyhedrons][iTotal] ->setProperty( "text", "?" );
|
myWidgets[i3DPolyhedrons][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iTotal] ->setProperty( "text", "?" );
|
myWidgets[iNb][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iLinear] ->setProperty( "text", "?" );
|
myWidgets[iNb][iLinear] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iQuadratic] ->setProperty( "text", "?" );
|
myWidgets[iNb][iQuadratic] ->setProperty( "text", "?" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -621,9 +621,9 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
|
|||||||
myWidgets[i3DPrisms][iQuadratic] ->setProperty( "text", "?" );
|
myWidgets[i3DPrisms][iQuadratic] ->setProperty( "text", "?" );
|
||||||
myWidgets[i3DHexaPrisms][iTotal] ->setProperty( "text", "?" );
|
myWidgets[i3DHexaPrisms][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[i3DPolyhedrons][iTotal] ->setProperty( "text", "?" );
|
myWidgets[i3DPolyhedrons][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iTotal] ->setProperty( "text", "?" );
|
myWidgets[iNb][iTotal] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iLinear] ->setProperty( "text", "?" );
|
myWidgets[iNb][iLinear] ->setProperty( "text", "?" );
|
||||||
myWidgets[iNb][iQuadratic] ->setProperty( "text", "?" );
|
myWidgets[iNb][iQuadratic] ->setProperty( "text", "?" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1105,100 +1105,100 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
|
|||||||
myInfo->append( QString( "<b>%1</b>" ).arg( SMESHGUI_ElemInfo::tr( "FREE_NODE" ) ).arg( id ) );
|
myInfo->append( QString( "<b>%1</b>" ).arg( SMESHGUI_ElemInfo::tr( "FREE_NODE" ) ).arg( id ) );
|
||||||
}
|
}
|
||||||
// node position
|
// node position
|
||||||
SMESH::SMESH_Mesh_ptr aMeshPtr = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMeshPtr = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMeshPtr ) ) {
|
if ( !CORBA::is_nil( aMeshPtr ) ) {
|
||||||
SMESH::NodePosition_var pos = aMeshPtr->GetNodePosition( id );
|
SMESH::NodePosition_var pos = aMeshPtr->GetNodePosition( id );
|
||||||
int shapeID = pos->shapeID;
|
int shapeID = pos->shapeID;
|
||||||
if ( shapeID > 0 ) {
|
if ( shapeID > 0 ) {
|
||||||
QString shapeType;
|
QString shapeType;
|
||||||
double u, v;
|
double u, v;
|
||||||
switch ( pos->shapeType ) {
|
switch ( pos->shapeType ) {
|
||||||
case GEOM::EDGE:
|
case GEOM::EDGE:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" );
|
||||||
if ( pos->params.length() == 1 )
|
if ( pos->params.length() == 1 )
|
||||||
u = pos->params[0];
|
u = pos->params[0];
|
||||||
break;
|
break;
|
||||||
case GEOM::FACE:
|
case GEOM::FACE:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" );
|
||||||
if ( pos->params.length() == 2 ) {
|
if ( pos->params.length() == 2 ) {
|
||||||
u = pos->params[0];
|
u = pos->params[0];
|
||||||
v = pos->params[1];
|
v = pos->params[1];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GEOM::VERTEX:
|
case GEOM::VERTEX:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// separator
|
// separator
|
||||||
myInfo->append( "" );
|
myInfo->append( "" );
|
||||||
myInfo->append( QString( "<b>%1:" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" ) ) );
|
myInfo->append( QString( "<b>%1:" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" ) ) );
|
||||||
myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( shapeType ).arg( shapeID ) );
|
myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( shapeType ).arg( shapeID ) );
|
||||||
if ( pos->shapeType == GEOM::EDGE || pos->shapeType == GEOM::FACE ) {
|
if ( pos->shapeType == GEOM::EDGE || pos->shapeType == GEOM::FACE ) {
|
||||||
myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "U_POSITION" ) ).
|
myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "U_POSITION" ) ).
|
||||||
arg( QString::number( u, precision > 0 ? 'f' : 'g', qAbs( precision )) ) );
|
arg( QString::number( u, precision > 0 ? 'f' : 'g', qAbs( precision )) ) );
|
||||||
if ( pos->shapeType == GEOM::FACE ) {
|
if ( pos->shapeType == GEOM::FACE ) {
|
||||||
myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "V_POSITION" ) ).
|
myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "V_POSITION" ) ).
|
||||||
arg( QString::number( v, precision > 0 ? 'f' : 'g', qAbs( precision )) ) );
|
arg( QString::number( v, precision > 0 ? 'f' : 'g', qAbs( precision )) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// groups node belongs to
|
// groups node belongs to
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMesh ) ) {
|
if ( !CORBA::is_nil( aMesh ) ) {
|
||||||
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
||||||
myInfo->append( "" ); // separator
|
myInfo->append( "" ); // separator
|
||||||
bool top_created = false;
|
bool top_created = false;
|
||||||
for ( int i = 0; i < groups->length(); i++ ) {
|
for ( int i = 0; i < groups->length(); i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
||||||
if ( CORBA::is_nil( aGrp ) ) continue;
|
if ( CORBA::is_nil( aGrp ) ) continue;
|
||||||
QString aName = aGrp->GetName();
|
QString aName = aGrp->GetName();
|
||||||
if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
||||||
if ( !top_created ) {
|
if ( !top_created ) {
|
||||||
myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" ) ) );
|
myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" ) ) );
|
||||||
top_created = true;
|
top_created = true;
|
||||||
}
|
}
|
||||||
myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ) );
|
myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ) );
|
||||||
if ( grp_details ) {
|
if ( grp_details ) {
|
||||||
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
||||||
|
|
||||||
// type : group on geometry, standalone group, group on filter
|
// type : group on geometry, standalone group, group on filter
|
||||||
if ( !CORBA::is_nil( aStdGroup ) ) {
|
if ( !CORBA::is_nil( aStdGroup ) ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) ) );
|
arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) ) );
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) ) );
|
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) ) );
|
||||||
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
||||||
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
||||||
if ( sobj ) {
|
if ( sobj ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) ).arg( sobj->GetName().c_str() ) );
|
arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) ).arg( sobj->GetName().c_str() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ) );
|
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// size
|
// size
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" ) ).
|
||||||
arg( QString::number( aGrp->Size() ) ) );
|
arg( QString::number( aGrp->Size() ) ) );
|
||||||
|
|
||||||
// color
|
// color
|
||||||
SALOMEDS::Color color = aGrp->GetColor();
|
SALOMEDS::Color color = aGrp->GetColor();
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" ) ).
|
||||||
arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ) );
|
arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//
|
//
|
||||||
@ -1372,79 +1372,79 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
|
|||||||
afunctor->SetMesh( actor()->GetObject()->GetMesh() );
|
afunctor->SetMesh( actor()->GetObject()->GetMesh() );
|
||||||
myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" ) ).arg( afunctor->GetValue( id ) ) );
|
myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" ) ).arg( afunctor->GetValue( id ) ) );
|
||||||
}
|
}
|
||||||
// element position
|
// element position
|
||||||
if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
|
if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMesh ) ) {
|
if ( !CORBA::is_nil( aMesh ) ) {
|
||||||
SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
|
SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
|
||||||
int shapeID = pos.shapeID;
|
int shapeID = pos.shapeID;
|
||||||
if ( shapeID > 0 ) {
|
if ( shapeID > 0 ) {
|
||||||
myInfo->append( "" ); // separator
|
myInfo->append( "" ); // separator
|
||||||
QString shapeType;
|
QString shapeType;
|
||||||
switch ( pos.shapeType ) {
|
switch ( pos.shapeType ) {
|
||||||
case GEOM::EDGE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" ); break;
|
case GEOM::EDGE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" ); break;
|
||||||
case GEOM::FACE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" ); break;
|
case GEOM::FACE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" ); break;
|
||||||
case GEOM::VERTEX: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" ); break;
|
case GEOM::VERTEX: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" ); break;
|
||||||
case GEOM::SOLID: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" ); break;
|
case GEOM::SOLID: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" ); break;
|
||||||
case GEOM::SHELL: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHELL" ); break;
|
case GEOM::SHELL: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHELL" ); break;
|
||||||
default: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHAPE" ); break;
|
default: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHAPE" ); break;
|
||||||
}
|
}
|
||||||
myInfo->append( QString( "<b>%1:</b> %2 #%3" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" ) ).arg( shapeType ).arg( shapeID ) );
|
myInfo->append( QString( "<b>%1:</b> %2 #%3" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" ) ).arg( shapeType ).arg( shapeID ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// groups element belongs to
|
// groups element belongs to
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMesh ) ) {
|
if ( !CORBA::is_nil( aMesh ) ) {
|
||||||
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
||||||
myInfo->append( "" ); // separator
|
myInfo->append( "" ); // separator
|
||||||
bool top_created = false;
|
bool top_created = false;
|
||||||
for ( int i = 0; i < groups->length(); i++ ) {
|
for ( int i = 0; i < groups->length(); i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
||||||
if ( CORBA::is_nil( aGrp ) ) continue;
|
if ( CORBA::is_nil( aGrp ) ) continue;
|
||||||
QString aName = aGrp->GetName();
|
QString aName = aGrp->GetName();
|
||||||
if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
||||||
if ( !top_created ) {
|
if ( !top_created ) {
|
||||||
myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" ) ) );
|
myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" ) ) );
|
||||||
top_created = true;
|
top_created = true;
|
||||||
}
|
}
|
||||||
myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ) );
|
myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ) );
|
||||||
if ( grp_details ) {
|
if ( grp_details ) {
|
||||||
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
||||||
|
|
||||||
// type : group on geometry, standalone group, group on filter
|
// type : group on geometry, standalone group, group on filter
|
||||||
if ( !CORBA::is_nil( aStdGroup ) ) {
|
if ( !CORBA::is_nil( aStdGroup ) ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) ) );
|
arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) ) );
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) ) );
|
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) ) );
|
||||||
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
||||||
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
||||||
if ( sobj ) {
|
if ( sobj ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) ).arg( sobj->GetName().c_str() ) );
|
arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) ).arg( sobj->GetName().c_str() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
|
||||||
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ) );
|
arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" ) ).
|
||||||
arg( QString::number( aGrp->Size() ) ) );
|
arg( QString::number( aGrp->Size() ) ) );
|
||||||
|
|
||||||
// color
|
// color
|
||||||
SALOMEDS::Color color = aGrp->GetColor();
|
SALOMEDS::Color color = aGrp->GetColor();
|
||||||
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" ) ).
|
myInfo->append( QString( " - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" ) ).
|
||||||
arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ) );
|
arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// separator
|
// separator
|
||||||
if ( ids.count() > 1 ) {
|
if ( ids.count() > 1 ) {
|
||||||
@ -1584,131 +1584,131 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
|
|||||||
QTreeWidgetItem* i = createItem( conItem );
|
QTreeWidgetItem* i = createItem( conItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
con = formatConnectivity( connectivity, SMDSAbs_Edge );
|
con = formatConnectivity( connectivity, SMDSAbs_Edge );
|
||||||
if ( !con.isEmpty() ) {
|
if ( !con.isEmpty() ) {
|
||||||
QTreeWidgetItem* i = createItem( conItem );
|
QTreeWidgetItem* i = createItem( conItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
con = formatConnectivity( connectivity, SMDSAbs_Face );
|
con = formatConnectivity( connectivity, SMDSAbs_Face );
|
||||||
if ( !con.isEmpty() ) {
|
if ( !con.isEmpty() ) {
|
||||||
QTreeWidgetItem* i = createItem( conItem );
|
QTreeWidgetItem* i = createItem( conItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
con = formatConnectivity( connectivity, SMDSAbs_Volume );
|
con = formatConnectivity( connectivity, SMDSAbs_Volume );
|
||||||
if ( !con.isEmpty() ) {
|
if ( !con.isEmpty() ) {
|
||||||
QTreeWidgetItem* i = createItem( conItem );
|
QTreeWidgetItem* i = createItem( conItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
conItem->setText( 1, SMESHGUI_ElemInfo::tr( "FREE_NODE" ) );
|
conItem->setText( 1, SMESHGUI_ElemInfo::tr( "FREE_NODE" ) );
|
||||||
}
|
}
|
||||||
// node position
|
// node position
|
||||||
SMESH::SMESH_Mesh_ptr aMeshPtr = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMeshPtr = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMeshPtr ) ) {
|
if ( !CORBA::is_nil( aMeshPtr ) ) {
|
||||||
SMESH::NodePosition_var pos = aMeshPtr->GetNodePosition( id );
|
SMESH::NodePosition_var pos = aMeshPtr->GetNodePosition( id );
|
||||||
int shapeID = pos->shapeID;
|
int shapeID = pos->shapeID;
|
||||||
if ( shapeID > 0 ) {
|
if ( shapeID > 0 ) {
|
||||||
QString shapeType;
|
QString shapeType;
|
||||||
double u, v;
|
double u, v;
|
||||||
switch ( pos->shapeType ) {
|
switch ( pos->shapeType ) {
|
||||||
case GEOM::EDGE:
|
case GEOM::EDGE:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" );
|
||||||
if ( pos->params.length() == 1 )
|
if ( pos->params.length() == 1 )
|
||||||
u = pos->params[0];
|
u = pos->params[0];
|
||||||
break;
|
break;
|
||||||
case GEOM::FACE:
|
case GEOM::FACE:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" );
|
||||||
if ( pos->params.length() == 2 ) {
|
if ( pos->params.length() == 2 ) {
|
||||||
u = pos->params[0];
|
u = pos->params[0];
|
||||||
v = pos->params[1];
|
v = pos->params[1];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GEOM::VERTEX:
|
case GEOM::VERTEX:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" );
|
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
QTreeWidgetItem* posItem = createItem( nodeItem, Bold );
|
QTreeWidgetItem* posItem = createItem( nodeItem, Bold );
|
||||||
posItem->setText( 0, SMESHGUI_ElemInfo::tr("POSITION") );
|
posItem->setText( 0, SMESHGUI_ElemInfo::tr("POSITION") );
|
||||||
posItem->setText( 1, (shapeType + " #%1").arg( shapeID ));
|
posItem->setText( 1, (shapeType + " #%1").arg( shapeID ));
|
||||||
if ( pos->shapeType == GEOM::EDGE || pos->shapeType == GEOM::FACE ) {
|
if ( pos->shapeType == GEOM::EDGE || pos->shapeType == GEOM::FACE ) {
|
||||||
QTreeWidgetItem* uItem = createItem( posItem );
|
QTreeWidgetItem* uItem = createItem( posItem );
|
||||||
uItem->setText( 0, SMESHGUI_ElemInfo::tr("U_POSITION") );
|
uItem->setText( 0, SMESHGUI_ElemInfo::tr("U_POSITION") );
|
||||||
uItem->setText( 1, QString::number( u, precision > 0 ? 'f' : 'g', qAbs( precision )));
|
uItem->setText( 1, QString::number( u, precision > 0 ? 'f' : 'g', qAbs( precision )));
|
||||||
if ( pos->shapeType == GEOM::FACE ) {
|
if ( pos->shapeType == GEOM::FACE ) {
|
||||||
QTreeWidgetItem* vItem = createItem( posItem );
|
QTreeWidgetItem* vItem = createItem( posItem );
|
||||||
vItem->setText( 0, SMESHGUI_ElemInfo::tr("V_POSITION") );
|
vItem->setText( 0, SMESHGUI_ElemInfo::tr("V_POSITION") );
|
||||||
vItem->setText( 1, QString::number( v, precision > 0 ? 'f' : 'g', qAbs( precision )));
|
vItem->setText( 1, QString::number( v, precision > 0 ? 'f' : 'g', qAbs( precision )));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// groups node belongs to
|
// groups node belongs to
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMesh ) ) {
|
if ( !CORBA::is_nil( aMesh ) ) {
|
||||||
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
||||||
QTreeWidgetItem* groupsItem = 0;
|
QTreeWidgetItem* groupsItem = 0;
|
||||||
for ( int i = 0; i < groups->length(); i++ ) {
|
for ( int i = 0; i < groups->length(); i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
||||||
if ( CORBA::is_nil( aGrp ) ) continue;
|
if ( CORBA::is_nil( aGrp ) ) continue;
|
||||||
QString aName = aGrp->GetName();
|
QString aName = aGrp->GetName();
|
||||||
if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
||||||
if ( !groupsItem ) {
|
if ( !groupsItem ) {
|
||||||
groupsItem = createItem( nodeItem, Bold );
|
groupsItem = createItem( nodeItem, Bold );
|
||||||
groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ) );
|
groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ) );
|
||||||
}
|
}
|
||||||
QTreeWidgetItem* it = createItem( groupsItem, Bold );
|
QTreeWidgetItem* it = createItem( groupsItem, Bold );
|
||||||
it->setText( 0, aName.trimmed() );
|
it->setText( 0, aName.trimmed() );
|
||||||
if ( grp_details ) {
|
if ( grp_details ) {
|
||||||
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
||||||
|
|
||||||
// type : group on geometry, standalone group, group on filter
|
// type : group on geometry, standalone group, group on filter
|
||||||
QTreeWidgetItem* typeItem = createItem( it );
|
QTreeWidgetItem* typeItem = createItem( it );
|
||||||
typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ) );
|
typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ) );
|
||||||
if ( !CORBA::is_nil( aStdGroup ) ) {
|
if ( !CORBA::is_nil( aStdGroup ) ) {
|
||||||
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) );
|
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) );
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
||||||
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) );
|
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) );
|
||||||
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
||||||
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
||||||
if ( sobj ) {
|
if ( sobj ) {
|
||||||
QTreeWidgetItem* gobjItem = createItem( typeItem );
|
QTreeWidgetItem* gobjItem = createItem( typeItem );
|
||||||
gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) );
|
gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) );
|
||||||
gobjItem->setText( 1, sobj->GetName().c_str() );
|
gobjItem->setText( 1, sobj->GetName().c_str() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
||||||
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
|
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// size
|
// size
|
||||||
QTreeWidgetItem* sizeItem = createItem( it );
|
QTreeWidgetItem* sizeItem = createItem( it );
|
||||||
sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ) );
|
sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ) );
|
||||||
sizeItem->setText( 1, QString::number( aGrp->Size() ) );
|
sizeItem->setText( 1, QString::number( aGrp->Size() ) );
|
||||||
|
|
||||||
// color
|
// color
|
||||||
SALOMEDS::Color color = aGrp->GetColor();
|
SALOMEDS::Color color = aGrp->GetColor();
|
||||||
QTreeWidgetItem* colorItem = createItem( it );
|
QTreeWidgetItem* colorItem = createItem( it );
|
||||||
colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ) );
|
colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ) );
|
||||||
colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ) );
|
colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//
|
//
|
||||||
@ -1813,8 +1813,8 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
|
|||||||
QTreeWidgetItem* nodeItem = createItem( conItem, Bold );
|
QTreeWidgetItem* nodeItem = createItem( conItem, Bold );
|
||||||
nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( idx ).arg( e->NbNodes() ) );
|
nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( idx ).arg( e->NbNodes() ) );
|
||||||
nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ) );
|
nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ) );
|
||||||
nodeItem->setData( 1, TypeRole, ElemConnectivity );
|
nodeItem->setData( 1, TypeRole, ElemConnectivity );
|
||||||
nodeItem->setData( 1, IdRole, node->GetID() );
|
nodeItem->setData( 1, IdRole, node->GetID() );
|
||||||
nodeItem->setExpanded( false );
|
nodeItem->setExpanded( false );
|
||||||
// node coordinates
|
// node coordinates
|
||||||
QTreeWidgetItem* coordItem = createItem( nodeItem );
|
QTreeWidgetItem* coordItem = createItem( nodeItem );
|
||||||
@ -1844,28 +1844,28 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
|
|||||||
QTreeWidgetItem* i = createItem( nconItem );
|
QTreeWidgetItem* i = createItem( nconItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
con = formatConnectivity( connectivity, SMDSAbs_Ball );
|
con = formatConnectivity( connectivity, SMDSAbs_Ball );
|
||||||
if ( !con.isEmpty() ) {
|
if ( !con.isEmpty() ) {
|
||||||
QTreeWidgetItem* i = createItem( nconItem );
|
QTreeWidgetItem* i = createItem( nconItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
con = formatConnectivity( connectivity, SMDSAbs_Face );
|
con = formatConnectivity( connectivity, SMDSAbs_Face );
|
||||||
if ( !con.isEmpty() ) {
|
if ( !con.isEmpty() ) {
|
||||||
QTreeWidgetItem* i = createItem( nconItem );
|
QTreeWidgetItem* i = createItem( nconItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
con = formatConnectivity( connectivity, SMDSAbs_Volume );
|
con = formatConnectivity( connectivity, SMDSAbs_Volume );
|
||||||
if ( !con.isEmpty() ) {
|
if ( !con.isEmpty() ) {
|
||||||
QTreeWidgetItem* i = createItem( nconItem );
|
QTreeWidgetItem* i = createItem( nconItem );
|
||||||
i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
|
i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
|
||||||
i->setText( 1, con );
|
i->setText( 1, con );
|
||||||
i->setData( 1, TypeRole, NodeConnectivity );
|
i->setData( 1, TypeRole, NodeConnectivity );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1950,83 +1950,83 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
|
|||||||
diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) );
|
diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) );
|
||||||
diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
|
diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
|
||||||
}
|
}
|
||||||
// element position
|
// element position
|
||||||
if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
|
if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMesh ) ) {
|
if ( !CORBA::is_nil( aMesh ) ) {
|
||||||
SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
|
SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
|
||||||
int shapeID = pos.shapeID;
|
int shapeID = pos.shapeID;
|
||||||
if ( shapeID > 0 ) {
|
if ( shapeID > 0 ) {
|
||||||
QTreeWidgetItem* shItem = createItem( elemItem, Bold );
|
QTreeWidgetItem* shItem = createItem( elemItem, Bold );
|
||||||
QString shapeType;
|
QString shapeType;
|
||||||
switch ( pos.shapeType ) {
|
switch ( pos.shapeType ) {
|
||||||
case GEOM::EDGE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" ); break;
|
case GEOM::EDGE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" ); break;
|
||||||
case GEOM::FACE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" ); break;
|
case GEOM::FACE: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_FACE" ); break;
|
||||||
case GEOM::VERTEX: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" ); break;
|
case GEOM::VERTEX: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_VERTEX" ); break;
|
||||||
case GEOM::SOLID: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" ); break;
|
case GEOM::SOLID: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SOLID" ); break;
|
||||||
case GEOM::SHELL: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHELL" ); break;
|
case GEOM::SHELL: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHELL" ); break;
|
||||||
default: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHAPE" ); break;
|
default: shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHAPE" ); break;
|
||||||
}
|
}
|
||||||
shItem->setText( 0, SMESHGUI_ElemInfo::tr( "POSITION" ) );
|
shItem->setText( 0, SMESHGUI_ElemInfo::tr( "POSITION" ) );
|
||||||
shItem->setText( 1, QString( "%1 #%2" ).arg( shapeType ).arg( shapeID ) );
|
shItem->setText( 1, QString( "%1 #%2" ).arg( shapeType ).arg( shapeID ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// groups element belongs to
|
// groups element belongs to
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
|
||||||
if ( !CORBA::is_nil( aMesh ) ) {
|
if ( !CORBA::is_nil( aMesh ) ) {
|
||||||
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
SMESH::ListOfGroups_var groups = aMesh->GetGroups();
|
||||||
QTreeWidgetItem* groupsItem = 0;
|
QTreeWidgetItem* groupsItem = 0;
|
||||||
for ( int i = 0; i < groups->length(); i++ ) {
|
for ( int i = 0; i < groups->length(); i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
SMESH::SMESH_GroupBase_var aGrp = groups[i];
|
||||||
if ( CORBA::is_nil( aGrp ) ) continue;
|
if ( CORBA::is_nil( aGrp ) ) continue;
|
||||||
QString aName = aGrp->GetName();
|
QString aName = aGrp->GetName();
|
||||||
if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
|
||||||
if ( !groupsItem ) {
|
if ( !groupsItem ) {
|
||||||
groupsItem = createItem( elemItem, Bold );
|
groupsItem = createItem( elemItem, Bold );
|
||||||
groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ) );
|
groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ) );
|
||||||
}
|
}
|
||||||
QTreeWidgetItem* it = createItem( groupsItem, Bold );
|
QTreeWidgetItem* it = createItem( groupsItem, Bold );
|
||||||
it->setText( 0, aName.trimmed() );
|
it->setText( 0, aName.trimmed() );
|
||||||
if ( grp_details ) {
|
if ( grp_details ) {
|
||||||
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
|
||||||
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
SMESH::SMESH_GroupOnFilter_var aFltGroup = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
|
||||||
|
|
||||||
// type : group on geometry, standalone group, group on filter
|
// type : group on geometry, standalone group, group on filter
|
||||||
QTreeWidgetItem* typeItem = createItem( it );
|
QTreeWidgetItem* typeItem = createItem( it );
|
||||||
typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ) );
|
typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ) );
|
||||||
if ( !CORBA::is_nil( aStdGroup ) ) {
|
if ( !CORBA::is_nil( aStdGroup ) ) {
|
||||||
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) );
|
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) );
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
else if ( !CORBA::is_nil( aGeomGroup ) ) {
|
||||||
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) );
|
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) );
|
||||||
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
|
||||||
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
_PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
|
||||||
if ( sobj ) {
|
if ( sobj ) {
|
||||||
QTreeWidgetItem* gobjItem = createItem( typeItem );
|
QTreeWidgetItem* gobjItem = createItem( typeItem );
|
||||||
gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) );
|
gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) );
|
||||||
gobjItem->setText( 1, sobj->GetName().c_str() );
|
gobjItem->setText( 1, sobj->GetName().c_str() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
else if ( !CORBA::is_nil( aFltGroup ) ) {
|
||||||
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
|
typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// size
|
// size
|
||||||
QTreeWidgetItem* sizeItem = createItem( it );
|
QTreeWidgetItem* sizeItem = createItem( it );
|
||||||
sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ) );
|
sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ) );
|
||||||
sizeItem->setText( 1, QString::number( aGrp->Size() ) );
|
sizeItem->setText( 1, QString::number( aGrp->Size() ) );
|
||||||
|
|
||||||
// color
|
// color
|
||||||
SALOMEDS::Color color = aGrp->GetColor();
|
SALOMEDS::Color color = aGrp->GetColor();
|
||||||
QTreeWidgetItem* colorItem = createItem( it );
|
QTreeWidgetItem* colorItem = createItem( it );
|
||||||
colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ) );
|
colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ) );
|
||||||
colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ) );
|
colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2582,7 +2582,7 @@ void SMESHGUI_AddInfo::saveInfo( QTextStream &out )
|
|||||||
if ( !( ( *it )->text(0) ).isEmpty() ) {
|
if ( !( ( *it )->text(0) ).isEmpty() ) {
|
||||||
out << QString( SPACING_INFO * itemDepth( *it ), ' ' ) << ( *it )->text(0);
|
out << QString( SPACING_INFO * itemDepth( *it ), ' ' ) << ( *it )->text(0);
|
||||||
if ( ( *it )->text(0) == tr( "COLOR" ) ) {
|
if ( ( *it )->text(0) == tr( "COLOR" ) ) {
|
||||||
out << ": " << ( ( ( *it )->background(1) ).color() ).name();
|
out << ": " << ( ( ( *it )->background(1) ).color() ).name();
|
||||||
}
|
}
|
||||||
else if ( !( ( *it )->text(1) ).isEmpty() ) out << ": " << ( *it )->text(1);
|
else if ( !( ( *it )->text(1) ).isEmpty() ) out << ": " << ( *it )->text(1);
|
||||||
out << "\n";
|
out << "\n";
|
||||||
@ -2959,7 +2959,7 @@ void SMESHGUI_MeshInfoDlg::dump()
|
|||||||
|
|
||||||
QFile aFile( aFileName );
|
QFile aFile( aFileName );
|
||||||
if ( !aFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
if ( !aFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QTextStream out( &aFile );
|
QTextStream out( &aFile );
|
||||||
|
|
||||||
|
@ -982,23 +982,23 @@ namespace SMESH
|
|||||||
foreach ( SUIT_ViewManager* vm, vmList ) {
|
foreach ( SUIT_ViewManager* vm, vmList ) {
|
||||||
QVector<SUIT_ViewWindow*> views = vm->getViews();
|
QVector<SUIT_ViewWindow*> views = vm->getViews();
|
||||||
foreach ( SUIT_ViewWindow* vw, views ) {
|
foreach ( SUIT_ViewWindow* vw, views ) {
|
||||||
// update VTK viewer properties
|
// update VTK viewer properties
|
||||||
if ( SVTK_ViewWindow* aVtkView = GetVtkViewWindow( vw ) ) {
|
if ( SVTK_ViewWindow* aVtkView = GetVtkViewWindow( vw ) ) {
|
||||||
// update actors
|
// update actors
|
||||||
vtkRenderer* aRenderer = aVtkView->getRenderer();
|
vtkRenderer* aRenderer = aVtkView->getRenderer();
|
||||||
VTK::ActorCollectionCopy aCopy( aRenderer->GetActors() );
|
VTK::ActorCollectionCopy aCopy( aRenderer->GetActors() );
|
||||||
vtkActorCollection* aCollection = aCopy.GetActors();
|
vtkActorCollection* aCollection = aCopy.GetActors();
|
||||||
aCollection->InitTraversal();
|
aCollection->InitTraversal();
|
||||||
while ( vtkActor* anAct = aCollection->GetNextActor() ) {
|
while ( vtkActor* anAct = aCollection->GetNextActor() ) {
|
||||||
if ( SMESH_NodeLabelActor* anActor = dynamic_cast< SMESH_NodeLabelActor* >( anAct ) ) {
|
if ( SMESH_NodeLabelActor* anActor = dynamic_cast< SMESH_NodeLabelActor* >( anAct ) ) {
|
||||||
anActor->SetFontProperties( aFamilyNd, aSizeNd, aBoldNd, anItalicNd, aShadowNd, anRGBNd[0], anRGBNd[1], anRGBNd[2] );
|
anActor->SetFontProperties( aFamilyNd, aSizeNd, aBoldNd, anItalicNd, aShadowNd, anRGBNd[0], anRGBNd[1], anRGBNd[2] );
|
||||||
}
|
}
|
||||||
else if ( SMESH_CellLabelActor* anActor = dynamic_cast< SMESH_CellLabelActor* >( anAct ) ) {
|
else if ( SMESH_CellLabelActor* anActor = dynamic_cast< SMESH_CellLabelActor* >( anAct ) ) {
|
||||||
anActor->SetFontProperties( aFamilyEl, aSizeEl, aBoldEl, anItalicEl, aShadowEl, anRGBEl[0], anRGBEl[1], anRGBEl[2] );
|
anActor->SetFontProperties( aFamilyEl, aSizeEl, aBoldEl, anItalicEl, aShadowEl, anRGBEl[0], anRGBEl[1], anRGBEl[2] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aVtkView->Repaint( false );
|
aVtkView->Repaint( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1121,8 +1121,8 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
// Création de la famille
|
// Création de la famille
|
||||||
if (MEDfamilyCr(fid, maa, nomfam, numfam, 0, MED_NO_GROUP) < 0)
|
if (MEDfamilyCr(fid, maa, nomfam, numfam, 0, MED_NO_GROUP) < 0)
|
||||||
ERREUR("Error MEDfamilyCr");
|
ERREUR("Error MEDfamilyCr");
|
||||||
delete gro;
|
delete gro;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1437,7 +1437,7 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
if (MEDfamilyCr(fid, maa, nomfam, numfam, 1, gro) < 0)
|
if (MEDfamilyCr(fid, maa, nomfam, numfam, 1, gro) < 0)
|
||||||
ERREUR("Error MEDfamilyCr");
|
ERREUR("Error MEDfamilyCr");
|
||||||
|
|
||||||
delete gro;
|
delete gro;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,9 +294,9 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_lastErrorMessage =
|
_lastErrorMessage =
|
||||||
std::string("The type of the file ")+
|
std::string("The type of the file ")+
|
||||||
std::string(currentMesh.file_name)+
|
std::string(currentMesh.file_name)+
|
||||||
std::string(" is not recognized");
|
std::string(" is not recognized");
|
||||||
LOG(_lastErrorMessage);
|
LOG(_lastErrorMessage);
|
||||||
return JOBID_UNDEFINED;
|
return JOBID_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,9 @@ public:
|
|||||||
~MeshJobManager_i();
|
~MeshJobManager_i();
|
||||||
|
|
||||||
bool configure (const char *configId,
|
bool configure (const char *configId,
|
||||||
const MESHJOB::ConfigParameter & configParameter);
|
const MESHJOB::ConfigParameter & configParameter);
|
||||||
CORBA::Long initialize (const MESHJOB::MeshJobParameterList & meshJobParameterList,
|
CORBA::Long initialize (const MESHJOB::MeshJobParameterList & meshJobParameterList,
|
||||||
const char *configId);
|
const char *configId);
|
||||||
bool start (CORBA::Long jobId);
|
bool start (CORBA::Long jobId);
|
||||||
char* getState (CORBA::Long jobId);
|
char* getState (CORBA::Long jobId);
|
||||||
MESHJOB::MeshJobResults * finalize(CORBA::Long jobId);
|
MESHJOB::MeshJobResults * finalize(CORBA::Long jobId);
|
||||||
|
@ -33,8 +33,8 @@ class SPADDERPluginTester_i:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SPADDERPluginTester_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa,
|
SPADDERPluginTester_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa,
|
||||||
PortableServer::ObjectId * contId,
|
PortableServer::ObjectId * contId,
|
||||||
const char *instanceName, const char *interfaceName);
|
const char *instanceName, const char *interfaceName);
|
||||||
virtual ~SPADDERPluginTester_i();
|
virtual ~SPADDERPluginTester_i();
|
||||||
|
|
||||||
void demo(CORBA::Double a,CORBA::Double b,CORBA::Double& c);
|
void demo(CORBA::Double a,CORBA::Double b,CORBA::Double& c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user