IPAL53401: BelongToGeom is very long on multiple lines

More optimization of octree + parallel update of GroupOnFilter

  Remove useless warnings
This commit is contained in:
eap 2016-06-27 20:07:19 +03:00
parent b582abf7fa
commit 911ca90c3d
16 changed files with 441 additions and 227 deletions

View File

@ -40,6 +40,7 @@
#include <BRepAdaptor_Surface.hxx> #include <BRepAdaptor_Surface.hxx>
#include <BRepBndLib.hxx> #include <BRepBndLib.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepClass_FaceClassifier.hxx> #include <BRepClass_FaceClassifier.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <Geom_CylindricalSurface.hxx> #include <Geom_CylindricalSurface.hxx>
@ -3950,9 +3951,9 @@ SMDSAbs_ElementType BelongToMeshGroup::GetType() const
return myGroup ? myGroup->GetType() : SMDSAbs_All; return myGroup ? myGroup->GetType() : SMDSAbs_All;
} }
/* //================================================================================
ElementsOnSurface // ElementsOnSurface
*/ //================================================================================
ElementsOnSurface::ElementsOnSurface() ElementsOnSurface::ElementsOnSurface()
{ {
@ -4086,18 +4087,27 @@ bool ElementsOnSurface::isOnSurface( const SMDS_MeshNode* theNode )
} }
/* //================================================================================
ElementsOnShape // ElementsOnShape
*/ //================================================================================
namespace {
const int theIsCheckedFlag = 0x0000100;
}
struct ElementsOnShape::Classifier struct ElementsOnShape::Classifier
{ {
Classifier(const TopoDS_Shape& s, double tol) { Init(s,tol); } //Classifier(const TopoDS_Shape& s, double tol) { Init(s,tol); }
void Init(const TopoDS_Shape& s, double tol); void Init(const TopoDS_Shape& s, double tol, const Bnd_B3d* box = 0 );
bool IsOut(const gp_Pnt& p) { return myIsChecked = true, (this->*myIsOutFun)( p ); } bool IsOut(const gp_Pnt& p) { return SetChecked( true ), (this->*myIsOutFun)( p ); }
TopAbs_ShapeEnum ShapeType() const { return myShape.ShapeType(); } TopAbs_ShapeEnum ShapeType() const { return myShape.ShapeType(); }
Bnd_B3d* GetBndBox() { return & myBox; } const TopoDS_Shape& Shape() const { return myShape; }
bool& IsChecked() { return myIsChecked; } const Bnd_B3d* GetBndBox() const { return & myBox; }
bool IsChecked() { return myFlags & theIsCheckedFlag; }
bool IsSetFlag( int flag ) const { return myFlags & flag; }
void SetChecked( bool is ) { is ? SetFlag( theIsCheckedFlag ) : UnsetFlag( theIsCheckedFlag ); }
void SetFlag ( int flag ) { myFlags |= flag; }
void UnsetFlag( int flag ) { myFlags &= ~flag; }
private: private:
bool isOutOfSolid (const gp_Pnt& p); bool isOutOfSolid (const gp_Pnt& p);
bool isOutOfBox (const gp_Pnt& p); bool isOutOfBox (const gp_Pnt& p);
@ -4106,7 +4116,7 @@ private:
bool isOutOfVertex(const gp_Pnt& p); bool isOutOfVertex(const gp_Pnt& p);
bool isBox (const TopoDS_Shape& s); bool isBox (const TopoDS_Shape& s);
bool (Classifier::* myIsOutFun)(const gp_Pnt& p); bool (Classifier::* myIsOutFun)(const gp_Pnt& p);
BRepClass3d_SolidClassifier mySolidClfr; BRepClass3d_SolidClassifier mySolidClfr;
Bnd_B3d myBox; Bnd_B3d myBox;
GeomAPI_ProjectPointOnSurf myProjFace; GeomAPI_ProjectPointOnSurf myProjFace;
@ -4114,12 +4124,15 @@ private:
gp_Pnt myVertexXYZ; gp_Pnt myVertexXYZ;
TopoDS_Shape myShape; TopoDS_Shape myShape;
double myTol; double myTol;
bool myIsChecked; int myFlags;
}; };
struct ElementsOnShape::OctreeClassifier : public SMESH_Octree struct ElementsOnShape::OctreeClassifier : public SMESH_Octree
{ {
OctreeClassifier( const std::vector< ElementsOnShape::Classifier* >& classifiers ); OctreeClassifier( const std::vector< ElementsOnShape::Classifier* >& classifiers );
OctreeClassifier( const OctreeClassifier* otherTree,
const std::vector< ElementsOnShape::Classifier >& clsOther,
std::vector< ElementsOnShape::Classifier >& cls );
void GetClassifiersAtPoint( const gp_XYZ& p, void GetClassifiersAtPoint( const gp_XYZ& p,
std::vector< ElementsOnShape::Classifier* >& classifiers ); std::vector< ElementsOnShape::Classifier* >& classifiers );
protected: protected:
@ -4145,6 +4158,25 @@ ElementsOnShape::~ElementsOnShape()
clearClassifiers(); clearClassifiers();
} }
Predicate* ElementsOnShape::clone() const
{
ElementsOnShape* cln = new ElementsOnShape();
cln->SetAllNodes ( myAllNodesFlag );
cln->SetTolerance( myToler );
cln->SetMesh ( myMeshModifTracer.GetMesh() );
cln->myShape = myShape; // avoid creation of myClassifiers
cln->SetShape ( myShape, myType );
cln->myClassifiers.resize( myClassifiers.size() );
for ( size_t i = 0; i < myClassifiers.size(); ++i )
cln->myClassifiers[ i ].Init( BRepBuilderAPI_Copy( myClassifiers[ i ].Shape()),
myToler, myClassifiers[ i ].GetBndBox() );
if ( myOctree ) // copy myOctree
{
cln->myOctree = new OctreeClassifier( myOctree, myClassifiers, cln->myClassifiers );
}
return cln;
}
SMDSAbs_ElementType ElementsOnShape::GetType() const SMDSAbs_ElementType ElementsOnShape::GetType() const
{ {
return myType; return myType;
@ -4233,7 +4265,7 @@ void ElementsOnShape::SetShape (const TopoDS_Shape& theShape,
clearClassifiers(); clearClassifiers();
myClassifiers.resize( shapesMap.Extent() ); myClassifiers.resize( shapesMap.Extent() );
for ( int i = 0; i < shapesMap.Extent(); ++i ) for ( int i = 0; i < shapesMap.Extent(); ++i )
myClassifiers[ i ] = new Classifier( shapesMap( i+1 ), myToler ); myClassifiers[ i ].Init( shapesMap( i+1 ), myToler );
} }
if ( theType == SMDSAbs_Node ) if ( theType == SMDSAbs_Node )
@ -4249,15 +4281,15 @@ void ElementsOnShape::SetShape (const TopoDS_Shape& theShape,
void ElementsOnShape::clearClassifiers() void ElementsOnShape::clearClassifiers()
{ {
for ( size_t i = 0; i < myClassifiers.size(); ++i ) // for ( size_t i = 0; i < myClassifiers.size(); ++i )
delete myClassifiers[ i ]; // delete myClassifiers[ i ];
myClassifiers.clear(); myClassifiers.clear();
delete myOctree; delete myOctree;
myOctree = 0; myOctree = 0;
} }
bool ElementsOnShape::IsSatisfy (long elemId) bool ElementsOnShape::IsSatisfy( long elemId )
{ {
const SMDS_Mesh* mesh = myMeshModifTracer.GetMesh(); const SMDS_Mesh* mesh = myMeshModifTracer.GetMesh();
const SMDS_MeshElement* elem = const SMDS_MeshElement* elem =
@ -4270,9 +4302,12 @@ bool ElementsOnShape::IsSatisfy (long elemId)
gp_XYZ centerXYZ (0, 0, 0); gp_XYZ centerXYZ (0, 0, 0);
if ( !myOctree && myClassifiers.size() > 5 ) if ( !myOctree && myClassifiers.size() > 5 )
myOctree = new OctreeClassifier( myClassifiers ); {
myWorkClassifiers.resize( myClassifiers.size() );
std::vector< Classifier* >& classifiers = myOctree ? myWorkClassifiers : myClassifiers; for ( size_t i = 0; i < myClassifiers.size(); ++i )
myWorkClassifiers[ i ] = & myClassifiers[ i ];
myOctree = new OctreeClassifier( myWorkClassifiers );
}
SMDS_ElemIteratorPtr aNodeItr = elem->nodesIterator(); SMDS_ElemIteratorPtr aNodeItr = elem->nodesIterator();
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag)) while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
@ -4287,34 +4322,45 @@ bool ElementsOnShape::IsSatisfy (long elemId)
{ {
myWorkClassifiers.clear(); myWorkClassifiers.clear();
myOctree->GetClassifiersAtPoint( aPnt, myWorkClassifiers ); myOctree->GetClassifiersAtPoint( aPnt, myWorkClassifiers );
for ( size_t i = 0; i < myWorkClassifiers.size(); ++i )
myWorkClassifiers[i]->SetChecked( false );
for ( size_t i = 0; i < myWorkClassifiers.size() && isNodeOut; ++i )
if ( !myWorkClassifiers[i]->IsChecked() )
isNodeOut = myWorkClassifiers[i]->IsOut( aPnt );
}
else
{
for ( size_t i = 0; i < myClassifiers.size() && isNodeOut; ++i )
isNodeOut = myClassifiers[i].IsOut( aPnt );
} }
for ( size_t i = 0; i < classifiers.size(); ++i )
classifiers[i]->IsChecked() = false;
for ( size_t i = 0; i < classifiers.size() && isNodeOut; ++i )
if ( !classifiers[i]->IsChecked() )
isNodeOut = classifiers[i]->IsOut( aPnt );
setNodeIsOut( aPnt._node, isNodeOut ); setNodeIsOut( aPnt._node, isNodeOut );
} }
isSatisfy = !isNodeOut; isSatisfy = !isNodeOut;
} }
// Check the center point for volumes MantisBug 0020168 // Check the center point for volumes MantisBug 0020168
if (isSatisfy && if ( isSatisfy &&
myAllNodesFlag && myAllNodesFlag &&
myClassifiers[0]->ShapeType() == TopAbs_SOLID) myClassifiers[0].ShapeType() == TopAbs_SOLID )
{ {
centerXYZ /= elem->NbNodes(); centerXYZ /= elem->NbNodes();
isSatisfy = false; isSatisfy = false;
for ( size_t i = 0; i < classifiers.size() && !isSatisfy; ++i ) if ( myOctree )
isSatisfy = ! classifiers[i]->IsOut( centerXYZ ); for ( size_t i = 0; i < myWorkClassifiers.size() && !isSatisfy; ++i )
isSatisfy = ! myWorkClassifiers[i]->IsOut( centerXYZ );
else
for ( size_t i = 0; i < myClassifiers.size() && !isSatisfy; ++i )
isSatisfy = ! myClassifiers[i].IsOut( centerXYZ );
} }
return isSatisfy; return isSatisfy;
} }
void ElementsOnShape::Classifier::Init (const TopoDS_Shape& theShape, double theTol) void ElementsOnShape::Classifier::Init( const TopoDS_Shape& theShape,
double theTol,
const Bnd_B3d* theBox )
{ {
myShape = theShape; myShape = theShape;
myTol = theTol; myTol = theTol;
@ -4364,18 +4410,25 @@ void ElementsOnShape::Classifier::Init (const TopoDS_Shape& theShape, double the
if ( !isShapeBox ) if ( !isShapeBox )
{ {
Bnd_Box box; if ( theBox )
BRepBndLib::Add( myShape, box );
myBox.Clear();
myBox.Add( box.CornerMin() );
myBox.Add( box.CornerMax() );
gp_XYZ halfSize = 0.5 * ( box.CornerMax().XYZ() - box.CornerMin().XYZ() );
for ( int iDim = 1; iDim <= 3; ++iDim )
{ {
double x = halfSize.Coord( iDim ); myBox = *theBox;
halfSize.SetCoord( iDim, x + Max( myTol, 1e-2 * x )); }
else
{
Bnd_Box box;
BRepBndLib::Add( myShape, box );
myBox.Clear();
myBox.Add( box.CornerMin() );
myBox.Add( box.CornerMax() );
gp_XYZ halfSize = 0.5 * ( box.CornerMax().XYZ() - box.CornerMin().XYZ() );
for ( int iDim = 1; iDim <= 3; ++iDim )
{
double x = halfSize.Coord( iDim );
halfSize.SetCoord( iDim, x + Max( myTol, 1e-2 * x ));
}
myBox.SetHSize( halfSize );
} }
myBox.SetHSize( halfSize );
} }
} }
@ -4452,6 +4505,33 @@ OctreeClassifier::OctreeClassifier( const std::vector< ElementsOnShape::Classifi
compute(); compute();
} }
ElementsOnShape::
OctreeClassifier::OctreeClassifier( const OctreeClassifier* otherTree,
const std::vector< ElementsOnShape::Classifier >& clsOther,
std::vector< ElementsOnShape::Classifier >& cls )
:SMESH_Octree( new SMESH_TreeLimit )
{
myBox = new Bnd_B3d( *otherTree->getBox() );
if (( myIsLeaf = otherTree->isLeaf() ))
{
myClassifiers.resize( otherTree->myClassifiers.size() );
for ( size_t i = 0; i < otherTree->myClassifiers.size(); ++i )
{
int ind = otherTree->myClassifiers[i] - & clsOther[0];
myClassifiers[ i ] = & cls[ ind ];
}
}
else if ( otherTree->myChildren )
{
myChildren = new SMESH_Tree*[ 8 ];
for ( int i = 0; i < nbChildren(); i++ )
myChildren[i] =
new OctreeClassifier( static_cast<const OctreeClassifier*>( otherTree->myChildren[i]),
clsOther, cls );
}
}
void ElementsOnShape:: void ElementsOnShape::
OctreeClassifier::GetClassifiersAtPoint( const gp_XYZ& point, OctreeClassifier::GetClassifiersAtPoint( const gp_XYZ& point,
std::vector< ElementsOnShape::Classifier* >& result ) std::vector< ElementsOnShape::Classifier* >& result )
@ -4475,26 +4555,50 @@ OctreeClassifier::GetClassifiersAtPoint( const gp_XYZ& point,
void ElementsOnShape::OctreeClassifier::buildChildrenData() void ElementsOnShape::OctreeClassifier::buildChildrenData()
{ {
// distribute myClassifiers among myChildren // distribute myClassifiers among myChildren
const int childFlag[8] = { 0x0000001,
0x0000002,
0x0000004,
0x0000008,
0x0000010,
0x0000020,
0x0000040,
0x0000080 };
int nbInChild[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
for ( size_t i = 0; i < myClassifiers.size(); ++i ) for ( size_t i = 0; i < myClassifiers.size(); ++i )
{ {
for (int j = 0; j < nbChildren(); j++) for ( int j = 0; j < nbChildren(); j++ )
{ {
if ( !myClassifiers[i]->GetBndBox()->IsOut( *myChildren[j]->getBox() )) if ( !myClassifiers[i]->GetBndBox()->IsOut( *myChildren[j]->getBox() ))
{ {
((OctreeClassifier*)myChildren[j])->myClassifiers.push_back( myClassifiers[i]); myClassifiers[i]->SetFlag( childFlag[ j ]);
++nbInChild[ j ];
}
}
}
for ( int j = 0; j < nbChildren(); j++ )
{
OctreeClassifier* child = static_cast<OctreeClassifier*>( myChildren[ j ]);
child->myClassifiers.resize( nbInChild[ j ]);
for ( size_t i = 0; nbInChild[ j ] && i < myClassifiers.size(); ++i )
{
if ( myClassifiers[ i ]->IsSetFlag( childFlag[ j ]))
{
--nbInChild[ j ];
child->myClassifiers[ nbInChild[ j ]] = myClassifiers[ i ];
myClassifiers[ i ]->UnsetFlag( childFlag[ j ]);
} }
} }
} }
SMESHUtils::FreeVector( myClassifiers ); SMESHUtils::FreeVector( myClassifiers );
// define if a child isLeaf() // define if a child isLeaf()
for (int i = 0; i < nbChildren(); i++) for ( int i = 0; i < nbChildren(); i++ )
{ {
OctreeClassifier* child = static_cast<OctreeClassifier*>( myChildren[i]); OctreeClassifier* child = static_cast<OctreeClassifier*>( myChildren[ i ]);
child->myIsLeaf = ( child->myClassifiers.size() <= 5 ); child->myIsLeaf = ( child->myClassifiers.size() <= 5 );
if ( child->myClassifiers.capacity() - child->myClassifiers.size() > 100 )
SMESHUtils::CompactVector( child->myClassifiers );
} }
} }
@ -4514,25 +4618,38 @@ Bnd_B3d* ElementsOnShape::OctreeClassifier::buildRootBox()
BelongToGeom::BelongToGeom() BelongToGeom::BelongToGeom()
: myMeshDS(NULL), : myMeshDS(NULL),
myType(SMDSAbs_All), myType(SMDSAbs_NbElementTypes),
myIsSubshape(false), myIsSubshape(false),
myTolerance(Precision::Confusion()) myTolerance(Precision::Confusion())
{} {}
Predicate* BelongToGeom::clone() const
{
BelongToGeom* cln = new BelongToGeom( *this );
cln->myElementsOnShapePtr.reset( static_cast<ElementsOnShape*>( myElementsOnShapePtr->clone() ));
return cln;
}
void BelongToGeom::SetMesh( const SMDS_Mesh* theMesh ) void BelongToGeom::SetMesh( const SMDS_Mesh* theMesh )
{ {
myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh); if ( myMeshDS != theMesh )
init(); {
myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
init();
}
} }
void BelongToGeom::SetGeom( const TopoDS_Shape& theShape ) void BelongToGeom::SetGeom( const TopoDS_Shape& theShape )
{ {
myShape = theShape; if ( myShape != theShape )
init(); {
myShape = theShape;
init();
}
} }
static bool IsSubShape (const TopTools_IndexedMapOfShape& theMap, static bool IsSubShape (const TopTools_IndexedMapOfShape& theMap,
const TopoDS_Shape& theShape) const TopoDS_Shape& theShape)
{ {
if (theMap.Contains(theShape)) return true; if (theMap.Contains(theShape)) return true;
@ -4554,7 +4671,7 @@ static bool IsSubShape (const TopTools_IndexedMapOfShape& theMap,
void BelongToGeom::init() void BelongToGeom::init()
{ {
if (!myMeshDS || myShape.IsNull()) return; if ( !myMeshDS || myShape.IsNull() ) return;
// is sub-shape of main shape? // is sub-shape of main shape?
TopoDS_Shape aMainShape = myMeshDS->ShapeToMesh(); TopoDS_Shape aMainShape = myMeshDS->ShapeToMesh();
@ -4563,8 +4680,20 @@ void BelongToGeom::init()
} }
else { else {
TopTools_IndexedMapOfShape aMap; TopTools_IndexedMapOfShape aMap;
TopExp::MapShapes(aMainShape, aMap); TopExp::MapShapes( aMainShape, aMap );
myIsSubshape = IsSubShape(aMap, myShape); myIsSubshape = IsSubShape( aMap, myShape );
if ( myIsSubshape )
{
aMap.Clear();
TopExp::MapShapes( myShape, aMap );
mySubShapesIDs.Clear();
for ( int i = 1; i <= aMap.Extent(); ++i )
{
int subID = myMeshDS->ShapeToIndex( aMap( i ));
if ( subID > 0 )
mySubShapesIDs.Add( subID );
}
}
} }
//if (!myIsSubshape) // to be always ready to check an element not bound to geometry //if (!myIsSubshape) // to be always ready to check an element not bound to geometry
@ -4578,26 +4707,6 @@ void BelongToGeom::init()
} }
} }
static bool IsContains( const SMESHDS_Mesh* theMeshDS,
const TopoDS_Shape& theShape,
const SMDS_MeshElement* theElem,
TopAbs_ShapeEnum theFindShapeEnum,
TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE )
{
TopExp_Explorer anExp( theShape,theFindShapeEnum,theAvoidShapeEnum );
while( anExp.More() )
{
const TopoDS_Shape& aShape = anExp.Current();
if( SMESHDS_SubMesh* aSubMesh = theMeshDS->MeshElements( aShape ) ){
if( aSubMesh->Contains( theElem ) )
return true;
}
anExp.Next();
}
return false;
}
bool BelongToGeom::IsSatisfy (long theId) bool BelongToGeom::IsSatisfy (long theId)
{ {
if (myMeshDS == 0 || myShape.IsNull()) if (myMeshDS == 0 || myShape.IsNull())
@ -4612,48 +4721,24 @@ bool BelongToGeom::IsSatisfy (long theId)
if (myType == SMDSAbs_Node) if (myType == SMDSAbs_Node)
{ {
if( const SMDS_MeshNode* aNode = myMeshDS->FindNode( theId ) ) if ( const SMDS_MeshNode* aNode = myMeshDS->FindNode( theId ))
{ {
if ( aNode->getshapeId() < 1 ) if ( aNode->getshapeId() < 1 )
return myElementsOnShapePtr->IsSatisfy(theId); return myElementsOnShapePtr->IsSatisfy(theId);
else
const SMDS_PositionPtr& aPosition = aNode->GetPosition(); return mySubShapesIDs.Contains( aNode->getshapeId() );
SMDS_TypeOfPosition aTypeOfPosition = aPosition->GetTypeOfPosition();
switch( aTypeOfPosition )
{
case SMDS_TOP_VERTEX : return ( IsContains( myMeshDS,myShape,aNode,TopAbs_VERTEX ));
case SMDS_TOP_EDGE : return ( IsContains( myMeshDS,myShape,aNode,TopAbs_EDGE ));
case SMDS_TOP_FACE : return ( IsContains( myMeshDS,myShape,aNode,TopAbs_FACE ));
case SMDS_TOP_3DSPACE: return ( IsContains( myMeshDS,myShape,aNode,TopAbs_SOLID ) ||
IsContains( myMeshDS,myShape,aNode,TopAbs_SHELL ));
default:;
}
} }
} }
else else
{ {
if ( const SMDS_MeshElement* anElem = myMeshDS->FindElement( theId )) if ( const SMDS_MeshElement* anElem = myMeshDS->FindElement( theId ))
{ {
if ( anElem->getshapeId() < 1 ) if ( anElem->GetType() == myType )
return myElementsOnShapePtr->IsSatisfy(theId);
if( myType == SMDSAbs_All )
{ {
return ( IsContains( myMeshDS,myShape,anElem,TopAbs_EDGE ) || if ( anElem->getshapeId() < 1 )
IsContains( myMeshDS,myShape,anElem,TopAbs_FACE ) || return myElementsOnShapePtr->IsSatisfy(theId);
IsContains( myMeshDS,myShape,anElem,TopAbs_SOLID )|| else
IsContains( myMeshDS,myShape,anElem,TopAbs_SHELL )); return mySubShapesIDs.Contains( anElem->getshapeId() );
}
else if( myType == anElem->GetType() )
{
switch( myType )
{
case SMDSAbs_Edge : return ( IsContains( myMeshDS,myShape,anElem,TopAbs_EDGE ));
case SMDSAbs_Face : return ( IsContains( myMeshDS,myShape,anElem,TopAbs_FACE ));
case SMDSAbs_Volume: return ( IsContains( myMeshDS,myShape,anElem,TopAbs_SOLID )||
IsContains( myMeshDS,myShape,anElem,TopAbs_SHELL ));
default:;
}
} }
} }
} }
@ -4663,8 +4748,11 @@ bool BelongToGeom::IsSatisfy (long theId)
void BelongToGeom::SetType (SMDSAbs_ElementType theType) void BelongToGeom::SetType (SMDSAbs_ElementType theType)
{ {
myType = theType; if ( myType != theType )
init(); {
myType = theType;
init();
}
} }
SMDSAbs_ElementType BelongToGeom::GetType() const SMDSAbs_ElementType BelongToGeom::GetType() const
@ -4685,8 +4773,7 @@ const SMESHDS_Mesh* BelongToGeom::GetMeshDS() const
void BelongToGeom::SetTolerance (double theTolerance) void BelongToGeom::SetTolerance (double theTolerance)
{ {
myTolerance = theTolerance; myTolerance = theTolerance;
if (!myIsSubshape) init();
init();
} }
double BelongToGeom::GetTolerance() double BelongToGeom::GetTolerance()
@ -4697,26 +4784,39 @@ double BelongToGeom::GetTolerance()
/* /*
Class : LyingOnGeom Class : LyingOnGeom
Description : Predicate for verifying whether entiy lying or partially lying on Description : Predicate for verifying whether entiy lying or partially lying on
specified geometrical support specified geometrical support
*/ */
LyingOnGeom::LyingOnGeom() LyingOnGeom::LyingOnGeom()
: myMeshDS(NULL), : myMeshDS(NULL),
myType(SMDSAbs_All), myType(SMDSAbs_NbElementTypes),
myIsSubshape(false), myIsSubshape(false),
myTolerance(Precision::Confusion()) myTolerance(Precision::Confusion())
{} {}
Predicate* LyingOnGeom::clone() const
{
LyingOnGeom* cln = new LyingOnGeom( *this );
cln->myElementsOnShapePtr.reset( static_cast<ElementsOnShape*>( myElementsOnShapePtr->clone() ));
return cln;
}
void LyingOnGeom::SetMesh( const SMDS_Mesh* theMesh ) void LyingOnGeom::SetMesh( const SMDS_Mesh* theMesh )
{ {
myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh); if ( myMeshDS != theMesh )
init(); {
myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
init();
}
} }
void LyingOnGeom::SetGeom( const TopoDS_Shape& theShape ) void LyingOnGeom::SetGeom( const TopoDS_Shape& theShape )
{ {
myShape = theShape; if ( myShape != theShape )
init(); {
myShape = theShape;
init();
}
} }
void LyingOnGeom::init() void LyingOnGeom::init()
@ -4773,7 +4873,7 @@ bool LyingOnGeom::IsSatisfy( long theId )
if ( mySubShapesIDs.Contains( elem->getshapeId() )) if ( mySubShapesIDs.Contains( elem->getshapeId() ))
return true; return true;
if ( elem->GetType() != SMDSAbs_Node ) if ( elem->GetType() != SMDSAbs_Node && elem->GetType() == myType )
{ {
SMDS_ElemIteratorPtr nodeItr = elem->nodesIterator(); SMDS_ElemIteratorPtr nodeItr = elem->nodesIterator();
while ( nodeItr->more() ) while ( nodeItr->more() )
@ -4789,8 +4889,11 @@ bool LyingOnGeom::IsSatisfy( long theId )
void LyingOnGeom::SetType( SMDSAbs_ElementType theType ) void LyingOnGeom::SetType( SMDSAbs_ElementType theType )
{ {
myType = theType; if ( myType != theType )
init(); {
myType = theType;
init();
}
} }
SMDSAbs_ElementType LyingOnGeom::GetType() const SMDSAbs_ElementType LyingOnGeom::GetType() const
@ -4811,8 +4914,7 @@ const SMESHDS_Mesh* LyingOnGeom::GetMeshDS() const
void LyingOnGeom::SetTolerance (double theTolerance) void LyingOnGeom::SetTolerance (double theTolerance)
{ {
myTolerance = theTolerance; myTolerance = theTolerance;
if (!myIsSubshape) init();
init();
} }
double LyingOnGeom::GetTolerance() double LyingOnGeom::GetTolerance()
@ -4820,39 +4922,6 @@ double LyingOnGeom::GetTolerance()
return myTolerance; return myTolerance;
} }
bool LyingOnGeom::Contains( const SMESHDS_Mesh* theMeshDS,
const TopoDS_Shape& theShape,
const SMDS_MeshElement* theElem,
TopAbs_ShapeEnum theFindShapeEnum,
TopAbs_ShapeEnum theAvoidShapeEnum )
{
// if (IsContains(theMeshDS, theShape, theElem, theFindShapeEnum, theAvoidShapeEnum))
// return true;
// TopTools_MapOfShape aSubShapes;
// TopExp_Explorer exp( theShape, theFindShapeEnum, theAvoidShapeEnum );
// for ( ; exp.More(); exp.Next() )
// {
// const TopoDS_Shape& aShape = exp.Current();
// if ( !aSubShapes.Add( aShape )) continue;
// if ( SMESHDS_SubMesh* aSubMesh = theMeshDS->MeshElements( aShape ))
// {
// if ( aSubMesh->Contains( theElem ))
// return true;
// SMDS_ElemIteratorPtr nodeItr = theElem->nodesIterator();
// while ( nodeItr->more() )
// {
// const SMDS_MeshElement* aNode = nodeItr->next();
// if ( aSubMesh->Contains( aNode ))
// return true;
// }
// }
// }
return false;
}
TSequenceOfXYZ::TSequenceOfXYZ(): myElem(0) TSequenceOfXYZ::TSequenceOfXYZ(): myElem(0)
{} {}

View File

@ -364,6 +364,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT CoincidentNodes: public Predicate { class SMESHCONTROLS_EXPORT CoincidentNodes: public Predicate {
public: public:
CoincidentNodes(); CoincidentNodes();
//virtual Predicate* clone() const { return new CoincidentNodes( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -395,14 +396,17 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT CoincidentElements1D: public CoincidentElements { class SMESHCONTROLS_EXPORT CoincidentElements1D: public CoincidentElements {
public: public:
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
//virtual Predicate* clone() const { return new CoincidentElements1D( *this ); }
}; };
class SMESHCONTROLS_EXPORT CoincidentElements2D: public CoincidentElements { class SMESHCONTROLS_EXPORT CoincidentElements2D: public CoincidentElements {
public: public:
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
//virtual Predicate* clone() const { return new CoincidentElements2D( *this ); }
}; };
class SMESHCONTROLS_EXPORT CoincidentElements3D: public CoincidentElements { class SMESHCONTROLS_EXPORT CoincidentElements3D: public CoincidentElements {
public: public:
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
//virtual Predicate* clone() const { return new CoincidentElements3D( *this ); }
}; };
/* /*
@ -412,6 +416,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT FreeBorders: public virtual Predicate{ class SMESHCONTROLS_EXPORT FreeBorders: public virtual Predicate{
public: public:
FreeBorders(); FreeBorders();
//virtual Predicate* clone() const { return new FreeBorders( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -428,6 +433,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT BadOrientedVolume: public virtual Predicate{ class SMESHCONTROLS_EXPORT BadOrientedVolume: public virtual Predicate{
public: public:
BadOrientedVolume(); BadOrientedVolume();
//virtual Predicate* clone() const { return new BadOrientedVolume( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -443,6 +449,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT ElemEntityType: public virtual Predicate{ class SMESHCONTROLS_EXPORT ElemEntityType: public virtual Predicate{
public: public:
ElemEntityType(); ElemEntityType();
//virtual Predicate* clone() const { return new ElemEntityType( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType ); void SetType( SMDSAbs_ElementType theType );
@ -465,6 +472,7 @@ namespace SMESH{
{ {
public: public:
BareBorderVolume():myMesh(0) {} BareBorderVolume():myMesh(0) {}
virtual Predicate* clone() const { return new BareBorderVolume( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; } virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; } virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; }
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
@ -480,6 +488,7 @@ namespace SMESH{
{ {
public: public:
BareBorderFace():myMesh(0) {} BareBorderFace():myMesh(0) {}
//virtual Predicate* clone() const { return new BareBorderFace( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; } virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; } virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
@ -496,6 +505,7 @@ namespace SMESH{
{ {
public: public:
OverConstrainedVolume():myMesh(0) {} OverConstrainedVolume():myMesh(0) {}
virtual Predicate* clone() const { return new OverConstrainedVolume( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; } virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; } virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; }
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
@ -511,6 +521,7 @@ namespace SMESH{
{ {
public: public:
OverConstrainedFace():myMesh(0) {} OverConstrainedFace():myMesh(0) {}
//virtual Predicate* clone() const { return new OverConstrainedFace( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; } virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; } virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
@ -526,6 +537,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT FreeEdges: public virtual Predicate{ class SMESHCONTROLS_EXPORT FreeEdges: public virtual Predicate{
public: public:
FreeEdges(); FreeEdges();
//virtual Predicate* clone() const { return new FreeEdges( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -553,6 +565,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT FreeNodes: public virtual Predicate{ class SMESHCONTROLS_EXPORT FreeNodes: public virtual Predicate{
public: public:
FreeNodes(); FreeNodes();
//virtual Predicate* clone() const { return new FreeNodes( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theNodeId ); virtual bool IsSatisfy( long theNodeId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -573,7 +586,8 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT RangeOfIds: public virtual Predicate class SMESHCONTROLS_EXPORT RangeOfIds: public virtual Predicate
{ {
public: public:
RangeOfIds(); RangeOfIds();
//virtual Predicate* clone() const { return new RangeOfIds( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theNodeId ); virtual bool IsSatisfy( long theNodeId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -625,6 +639,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT LessThan: public virtual Comparator{ class SMESHCONTROLS_EXPORT LessThan: public virtual Comparator{
public: public:
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
//virtual Predicate* clone() const { return new LessThan( *this ); }
}; };
@ -635,6 +650,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT MoreThan: public virtual Comparator{ class SMESHCONTROLS_EXPORT MoreThan: public virtual Comparator{
public: public:
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
//virtual Predicate* clone() const { return new MoreThan( *this ); }
}; };
@ -645,6 +661,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT EqualTo: public virtual Comparator{ class SMESHCONTROLS_EXPORT EqualTo: public virtual Comparator{
public: public:
EqualTo(); EqualTo();
//virtual Predicate* clone() const { return new EqualTo( *this ); }
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual void SetTolerance( double theTol ); virtual void SetTolerance( double theTol );
virtual double GetTolerance(); virtual double GetTolerance();
@ -662,6 +679,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT LogicalNOT: public virtual Predicate{ class SMESHCONTROLS_EXPORT LogicalNOT: public virtual Predicate{
public: public:
LogicalNOT(); LogicalNOT();
//virtual Predicate* clone() const { return new LogicalNOT( *this ); }
virtual ~LogicalNOT(); virtual ~LogicalNOT();
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
@ -701,6 +719,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT LogicalAND: public virtual LogicalBinary{ class SMESHCONTROLS_EXPORT LogicalAND: public virtual LogicalBinary{
public: public:
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
//virtual Predicate* clone() const { return new LogicalAND( *this ); }
}; };
@ -711,6 +730,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT LogicalOR: public virtual LogicalBinary{ class SMESHCONTROLS_EXPORT LogicalOR: public virtual LogicalBinary{
public: public:
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
//virtual Predicate* clone() const { return new LogicalOR( *this ); }
}; };
@ -747,6 +767,7 @@ namespace SMESH{
ManifoldPart(); ManifoldPart();
~ManifoldPart(); ~ManifoldPart();
//virtual Predicate* clone() const { return new ManifoldPart( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
// inoke when all parameters already set // inoke when all parameters already set
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
@ -795,6 +816,7 @@ namespace SMESH{
{ {
public: public:
BelongToMeshGroup(); BelongToMeshGroup();
//virtual Predicate* clone() const { return new BelongToMeshGroup( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -818,6 +840,7 @@ namespace SMESH{
public: public:
ElementsOnSurface(); ElementsOnSurface();
~ElementsOnSurface(); ~ElementsOnSurface();
//virtual Predicate* clone() const { return new ElementsOnSurface( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -852,12 +875,13 @@ namespace SMESH{
Description : Predicate elements that lying on indicated shape Description : Predicate elements that lying on indicated shape
(1D, 2D or 3D) (1D, 2D or 3D)
*/ */
class SMESHCONTROLS_EXPORT ElementsOnShape : public virtual Predicate class SMESHCONTROLS_EXPORT ElementsOnShape : public Predicate
{ {
public: public:
ElementsOnShape(); ElementsOnShape();
~ElementsOnShape(); ~ElementsOnShape();
virtual Predicate* clone() const;
virtual void SetMesh (const SMDS_Mesh* theMesh); virtual void SetMesh (const SMDS_Mesh* theMesh);
virtual bool IsSatisfy (long theElementId); virtual bool IsSatisfy (long theElementId);
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -878,16 +902,17 @@ namespace SMESH{
bool getNodeIsOut( const SMDS_MeshNode* n, bool& isOut ); bool getNodeIsOut( const SMDS_MeshNode* n, bool& isOut );
void setNodeIsOut( const SMDS_MeshNode* n, bool isOut ); void setNodeIsOut( const SMDS_MeshNode* n, bool isOut );
std::vector< Classifier* > myClassifiers, myWorkClassifiers; std::vector< Classifier > myClassifiers;
OctreeClassifier* myOctree; std::vector< Classifier* > myWorkClassifiers;
SMDSAbs_ElementType myType; OctreeClassifier* myOctree;
TopoDS_Shape myShape; SMDSAbs_ElementType myType;
double myToler; TopoDS_Shape myShape;
bool myAllNodesFlag; double myToler;
bool myAllNodesFlag;
TMeshModifTracer myMeshModifTracer; TMeshModifTracer myMeshModifTracer;
std::vector<bool> myNodeIsChecked; std::vector<bool> myNodeIsChecked;
std::vector<bool> myNodeIsOut; std::vector<bool> myNodeIsOut;
}; };
typedef boost::shared_ptr<ElementsOnShape> ElementsOnShapePtr; typedef boost::shared_ptr<ElementsOnShape> ElementsOnShapePtr;
@ -902,6 +927,7 @@ namespace SMESH{
{ {
public: public:
BelongToGeom(); BelongToGeom();
virtual Predicate* clone() const;
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual void SetGeom( const TopoDS_Shape& theShape ); virtual void SetGeom( const TopoDS_Shape& theShape );
@ -921,6 +947,7 @@ namespace SMESH{
virtual void init(); virtual void init();
TopoDS_Shape myShape; TopoDS_Shape myShape;
TColStd_MapOfInteger mySubShapesIDs;
const SMESHDS_Mesh* myMeshDS; const SMESHDS_Mesh* myMeshDS;
SMDSAbs_ElementType myType; SMDSAbs_ElementType myType;
bool myIsSubshape; bool myIsSubshape;
@ -938,6 +965,7 @@ namespace SMESH{
{ {
public: public:
LyingOnGeom(); LyingOnGeom();
virtual Predicate* clone() const;
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual void SetGeom( const TopoDS_Shape& theShape ); virtual void SetGeom( const TopoDS_Shape& theShape );
@ -953,12 +981,7 @@ namespace SMESH{
void SetTolerance( double ); void SetTolerance( double );
double GetTolerance(); double GetTolerance();
virtual bool Contains( const SMESHDS_Mesh* theMeshDS, private:
const TopoDS_Shape& theShape,
const SMDS_MeshElement* theElem,
TopAbs_ShapeEnum theFindShapeEnum,
TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE );
private:
virtual void init(); virtual void init();
TopoDS_Shape myShape; TopoDS_Shape myShape;
@ -978,6 +1001,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT FreeFaces: public virtual Predicate{ class SMESHCONTROLS_EXPORT FreeFaces: public virtual Predicate{
public: public:
FreeFaces(); FreeFaces();
//virtual Predicate* clone() const { return new FreeFaces( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
@ -993,6 +1017,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT LinearOrQuadratic: public virtual Predicate{ class SMESHCONTROLS_EXPORT LinearOrQuadratic: public virtual Predicate{
public: public:
LinearOrQuadratic(); LinearOrQuadratic();
//virtual Predicate* clone() const { return new LinearOrQuadratic( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType ); void SetType( SMDSAbs_ElementType theType );
@ -1011,6 +1036,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT GroupColor: public virtual Predicate{ class SMESHCONTROLS_EXPORT GroupColor: public virtual Predicate{
public: public:
GroupColor(); GroupColor();
//virtual Predicate* clone() const { return new GroupColor( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType ); void SetType( SMDSAbs_ElementType theType );
@ -1034,6 +1060,7 @@ namespace SMESH{
class SMESHCONTROLS_EXPORT ElemGeomType: public virtual Predicate{ class SMESHCONTROLS_EXPORT ElemGeomType: public virtual Predicate{
public: public:
ElemGeomType(); ElemGeomType();
//virtual Predicate* clone() const { return new ElemGeomType( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType ); void SetType( SMDSAbs_ElementType theType );
@ -1056,6 +1083,7 @@ namespace SMESH{
{ {
public: public:
CoplanarFaces(); CoplanarFaces();
//virtual Predicate* clone() const { return new CoplanarFaces( *this ); }
void SetFace( long theID ) { myFaceID = theID; } void SetFace( long theID ) { myFaceID = theID; }
long GetFace() const { return myFaceID; } long GetFace() const { return myFaceID; }
void SetTolerance (const double theToler) { myToler = theToler; } void SetTolerance (const double theToler) { myToler = theToler; }
@ -1081,6 +1109,7 @@ namespace SMESH{
{ {
public: public:
ConnectedElements(); ConnectedElements();
//virtual Predicate* clone() const { return new ConnectedElements( *this ); }
void SetNode( int nodeID ); void SetNode( int nodeID );
void SetPoint( double x, double y, double z ); void SetPoint( double x, double y, double z );
int GetNode() const; int GetNode() const;

View File

@ -172,7 +172,7 @@ namespace
{ {
for ( int t = 0; t < NofValidBCTypes; ++t ) for ( int t = 0; t < NofValidBCTypes; ++t )
{ {
CGNS_ENUMT( BCType_t ) type = CGNS_ENUMT( BCType_t)( t ); CGNS_ENUMT( BCType_t ) type = CGNS_ENUMT( BCType_t )( t );
string typeName = cg_BCTypeName( type ); string typeName = cg_BCTypeName( type );
if ( typeName == &groupName[0] + bcBeg ) if ( typeName == &groupName[0] + bcBeg )
{ {
@ -251,20 +251,20 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
// -------------- // --------------
const int spaceDim = 3; const int spaceDim = 3;
int meshDim = 1; int meshDim = 1;
if ( myMesh->NbFaces() > 0 ) meshDim = 2; if ( myMesh->NbFaces() > 0 ) meshDim = 2;
if ( myMesh->NbVolumes() > 0 ) meshDim = 3; if ( myMesh->NbVolumes() > 0 ) meshDim = 3;
if ( myMeshName.empty() ) if ( myMeshName.empty() )
{ {
int nbases = 0; int nbases = 0;
if ( cg_nbases( _fn, &nbases) == CG_OK) if ( cg_nbases( _fn, &nbases) == CG_OK )
myMeshName = ( SMESH_Comment("Base_") << nbases+1 ); myMeshName = ( SMESH_Comment("Base_") << nbases+1 );
else else
myMeshName = "Base_0"; myMeshName = "Base_0";
} }
int iBase; int iBase;
if ( cg_base_write( _fn, myMeshName.c_str(), meshDim, spaceDim, &iBase)) if ( cg_base_write( _fn, myMeshName.c_str(), meshDim, spaceDim, &iBase ))
return addMessage( cg_get_error(), /*fatal = */true ); return addMessage( cg_get_error(), /*fatal = */true );
// create a Zone // create a Zone
@ -330,7 +330,7 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
// write into a section all successive elements of one geom type // write into a section all successive elements of one geom type
int iSec; int iSec;
vector< cgsize_t > elemData; vector< cgsize_t > elemData;
SMDS_ElemIteratorPtr elemIt = myMesh->elementsIterator(); SMDS_ElemIteratorPtr elemIt = myMesh->elementsIterator();
const SMDS_MeshElement* elem = elemIt->next(); const SMDS_MeshElement* elem = elemIt->next();
while ( elem ) while ( elem )
{ {

View File

@ -39,7 +39,7 @@ using namespace std;
#ifdef _DEBUG_ #ifdef _DEBUG_
static int MYDEBUG = 1; static int MYDEBUG = 0;
#else #else
static int MYDEBUG = 0; static int MYDEBUG = 0;
#endif #endif

View File

@ -99,9 +99,10 @@ void SMDS_VtkEdge::Print(std::ostream & OS) const
int SMDS_VtkEdge::NbNodes() const int SMDS_VtkEdge::NbNodes() const
{ {
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
int nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints(); vtkIdType *pts, npts;
assert(nbPoints >= 2); grid->GetCellPoints( myVtkID, npts, pts );
return nbPoints; assert(npts >= 2);
return npts;
} }
int SMDS_VtkEdge::NbEdges() const int SMDS_VtkEdge::NbEdges() const

View File

@ -136,11 +136,11 @@ int SMDS_VtkFace::NbEdges() const
nbEdges = 4; nbEdges = 4;
break; break;
case VTK_QUADRATIC_POLYGON: case VTK_QUADRATIC_POLYGON:
nbEdges = grid->GetCell(myVtkID)->GetNumberOfPoints() / 2; nbEdges = NbNodes() / 2;
break; break;
case VTK_POLYGON: case VTK_POLYGON:
default: default:
nbEdges = grid->GetCell(myVtkID)->GetNumberOfPoints(); nbEdges = NbNodes();
break; break;
} }
return nbEdges; return nbEdges;
@ -154,8 +154,9 @@ int SMDS_VtkFace::NbFaces() const
int SMDS_VtkFace::NbNodes() const int SMDS_VtkFace::NbNodes() const
{ {
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
int nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints(); vtkIdType *pts, npts;
return nbPoints; grid->GetCellPoints( myVtkID, npts, pts );
return npts;
} }
/*! /*!
@ -217,6 +218,10 @@ bool SMDS_VtkFace::IsPoly() const
bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
{ {
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
vtkIdType npts = 0;
vtkIdType* pts = 0;
grid->GetCellPoints(myVtkID, npts, pts);
vtkIdType aVtkType = grid->GetCellType(this->myVtkID); vtkIdType aVtkType = grid->GetCellType(this->myVtkID);
int rankFirstMedium = 0; int rankFirstMedium = 0;
switch (aVtkType) switch (aVtkType)
@ -230,15 +235,12 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
rankFirstMedium = 4; // medium nodes are of rank 4,5,6,7 rankFirstMedium = 4; // medium nodes are of rank 4,5,6,7
break; break;
case VTK_QUADRATIC_POLYGON: case VTK_QUADRATIC_POLYGON:
rankFirstMedium = grid->GetCell(myVtkID)->GetNumberOfPoints() / 2; rankFirstMedium = npts / 2;
break; break;
default: default:
//MESSAGE("wrong element type " << aVtkType); //MESSAGE("wrong element type " << aVtkType);
return false; return false;
} }
vtkIdType npts = 0;
vtkIdType* pts = 0;
grid->GetCellPoints(myVtkID, npts, pts);
vtkIdType nodeId = node->getVtkId(); vtkIdType nodeId = node->getVtkId();
for (int rank = 0; rank < npts; rank++) for (int rank = 0; rank < npts; rank++)
{ {
@ -261,7 +263,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
int SMDS_VtkFace::NbCornerNodes() const int SMDS_VtkFace::NbCornerNodes() const
{ {
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
int nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints(); int nbPoints = NbNodes();
vtkIdType aVtkType = grid->GetCellType(myVtkID); vtkIdType aVtkType = grid->GetCellType(myVtkID);
switch ( aVtkType ) switch ( aVtkType )
{ {

View File

@ -228,10 +228,11 @@ int SMDS_VtkVolume::NbNodes() const
{ {
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
vtkIdType aVtkType = grid->GetCellType(this->myVtkID); vtkIdType aVtkType = grid->GetCellType(this->myVtkID);
int nbPoints = 0; vtkIdType nbPoints = 0;
if (aVtkType != VTK_POLYHEDRON) if (aVtkType != VTK_POLYHEDRON)
{ {
nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints(); vtkIdType *pts;
grid->GetCellPoints( myVtkID, nbPoints, pts );
} }
else else
{ {

View File

@ -19,13 +19,18 @@
# --- options --- # --- options ---
# additional include directories # additional include directories
IF(SALOME_SMESH_USE_TBB)
SET(TBB_INCLUDES ${TBB_INCLUDE_DIRS})
ENDIF(SALOME_SMESH_USE_TBB)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS}
${CAS_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SMDS ${PROJECT_SOURCE_DIR}/src/SMDS
${TBB_INCLUDES}
) )
# additional preprocessor / compiler flags # additional preprocessor / compiler flags
@ -34,12 +39,17 @@ ADD_DEFINITIONS(
${BOOST_DEFINITIONS} ${BOOST_DEFINITIONS}
) )
IF(SALOME_SMESH_USE_TBB)
SET(TBB_LIBS ${TBB_LIBRARIES})
ENDIF(SALOME_SMESH_USE_TBB)
# libraries to link to # libraries to link to
SET(_link_LIBRARIES SET(_link_LIBRARIES
${CAS_KERNEL} ${CAS_KERNEL}
${CAS_TKBRep} ${CAS_TKBRep}
${KERNEL_SALOMELocalTrace} ${KERNEL_SALOMELocalTrace}
SMDS SMDS
${TBB_LIBS}
) )
# --- headers --- # --- headers ---

View File

@ -33,6 +33,8 @@
using namespace std; using namespace std;
//#undef WITH_TBB
//============================================================================= //=============================================================================
/*! /*!
* Creates a group based on thePredicate * Creates a group based on thePredicate
@ -245,6 +247,9 @@ SMDS_ElemIteratorPtr SMESHDS_GroupOnFilter::GetElements() const
{ {
myPredicate->SetMesh( GetMesh() ); // hope myPredicate updates self here if necessary myPredicate->SetMesh( GetMesh() ); // hope myPredicate updates self here if necessary
if ( !IsUpToDate() )
updateParallel();
elemIt = GetMesh()->elementsIterator( GetType() ); elemIt = GetMesh()->elementsIterator( GetType() );
if ( IsUpToDate() ) if ( IsUpToDate() )
{ {
@ -360,18 +365,132 @@ void SMESHDS_GroupOnFilter::update() const
if ( !IsUpToDate() ) if ( !IsUpToDate() )
{ {
me->setChanged(); me->setChanged();
SMDS_ElemIteratorPtr elIt = GetElements(); if ( !updateParallel() )
if ( elIt->more() ) { {
// find out nb of elements to skip w/o check before the 1st OK element SMDS_ElemIteratorPtr elIt = GetElements();
const SMDS_MeshElement* e = me->setNbElemToSkip( elIt ); if ( elIt->more() ) {
++me->myMeshInfo[ e->GetEntityType() ]; // find out nb of elements to skip w/o check before the 1st OK element
while ( elIt->more() ) const SMDS_MeshElement* e = me->setNbElemToSkip( elIt );
++me->myMeshInfo[ elIt->next()->GetEntityType() ]; ++me->myMeshInfo[ e->GetEntityType() ];
while ( elIt->more() )
++me->myMeshInfo[ elIt->next()->GetEntityType() ];
}
} }
me->setChanged( false ); me->setChanged( false );
} }
} }
//================================================================================
/*!
* \brief Updates myElements in parallel
*/
//================================================================================
#ifdef WITH_TBB
#include <tbb/parallel_for.h>
#include "tbb/enumerable_thread_specific.h"
// a predicate per a thread
typedef tbb::enumerable_thread_specific<SMESH_PredicatePtr> TLocalPredicat;
struct IsSatisfyParallel
{
vector< char >& myIsElemOK;
SMESH_PredicatePtr myPredicate;
TLocalPredicat& myLocalPredicates;
IsSatisfyParallel( SMESH_PredicatePtr mainPred, TLocalPredicat& locPred, vector< char >& isOk )
: myIsElemOK(isOk), myPredicate( mainPred ), myLocalPredicates( locPred )
{}
void operator() ( const tbb::blocked_range<size_t>& r ) const
{
SMESH_PredicatePtr& pred = myLocalPredicates.local();
if ( !pred )
{
if ( r.begin() == 0 )
pred = myPredicate;
else
pred.reset( myPredicate->clone() );
}
for ( size_t i = r.begin(); i != r.end(); ++i )
myIsElemOK[ i ] = char( pred->IsSatisfy( i ));
}
};
bool SMESHDS_GroupOnFilter::updateParallel() const
{
// if ( !getenv("updateParallel"))
// return false;
size_t nbElemsOfType = GetMesh()->GetMeshInfo().NbElements( GetType() );
if ( nbElemsOfType == 0 )
return true;
if ( nbElemsOfType < 1000000 )
return false; // no sense in parallel work
SMDS_ElemIteratorPtr elemIt = GetMesh()->elementsIterator( GetType() );
const int minID = elemIt->next()->GetID();
myPredicate->IsSatisfy( minID ); // make myPredicate fully initialized for clone()
SMESH_PredicatePtr clone( myPredicate->clone() );
if ( !clone )
return false;
TLocalPredicat threadPredicates;
threadPredicates.local() = clone;
int maxID = ( GetType() == SMDSAbs_Node ) ? GetMesh()->MaxNodeID() : GetMesh()->MaxElementID();
vector< char > isElemOK( 1 + maxID );
tbb::parallel_for ( tbb::blocked_range<size_t>( 0, isElemOK.size() ),
IsSatisfyParallel( myPredicate, threadPredicates, isElemOK ),
tbb::simple_partitioner());
SMESHDS_GroupOnFilter* me = const_cast<SMESHDS_GroupOnFilter*>( this );
int nbOkElems = 0;
for ( size_t i = minID; i < isElemOK.size(); ++i )
nbOkElems += ( isElemOK[ i ]);
me->myElements.resize( nbOkElems );
const SMDS_MeshElement* e;
size_t iElem = 0;
if ( GetType() == SMDSAbs_Node )
{
for ( size_t i = minID; i < isElemOK.size(); ++i )
if (( isElemOK[ i ] ) &&
( e = GetMesh()->FindNode( i )))
{
me->myElements[ iElem++ ] = e;
}
me->myMeshInfo[ SMDSEntity_Node ] = myElements.size();
}
else
{
for ( size_t i = minID; i < isElemOK.size(); ++i )
if (( isElemOK[ i ] ) &&
( e = GetMesh()->FindElement( i )) &&
( e->GetType() == GetType() ))
{
me->myElements[ iElem++ ] = e;
++me->myMeshInfo[ e->GetEntityType() ];
}
}
me->myElementsOK = ( iElem < nbElemsOfType );
if ( !myElementsOK )
clearVector( me->myElements ); // all elements satisfy myPredicate
else
me->myElements.resize( iElem );
me->setChanged( false );
return true;
}
#else
bool SMESHDS_GroupOnFilter::updateParallel() const
{
return false;
}
#endif
//================================================================================ //================================================================================
/*! /*!
* \brief Sets myMeshModifTime and clear fields according to modification state * \brief Sets myMeshModifTime and clear fields according to modification state

View File

@ -72,6 +72,7 @@ class SMESHDS_EXPORT SMESHDS_GroupOnFilter: public SMESHDS_GroupBase
private: private:
void update() const; void update() const;
bool updateParallel() const;
void setChanged(bool changed=true); void setChanged(bool changed=true);
const SMDS_MeshElement* setNbElemToSkip( SMDS_ElemIteratorPtr& elIt ); const SMDS_MeshElement* setNbElemToSkip( SMDS_ElemIteratorPtr& elIt );
int getElementIds( void* ids, size_t idSize ) const; int getElementIds( void* ids, size_t idSize ) const;

View File

@ -43,8 +43,8 @@
class SMDS_Mesh; class SMDS_Mesh;
namespace SMESH{ namespace SMESH {
namespace Controls{ namespace Controls {
/* /*
Class : Functor Class : Functor
@ -67,10 +67,11 @@ namespace SMESH{
Class : Predicate Class : Predicate
Description : Base class for all predicates Description : Base class for all predicates
*/ */
class SMESHCONTROLS_EXPORT Predicate: public virtual Functor{ class SMESHCONTROLS_EXPORT Predicate: public virtual Functor {
public: public:
virtual bool IsSatisfy( long theElementId ) = 0; virtual bool IsSatisfy( long theElementId ) = 0;
virtual SMDSAbs_ElementType GetType() const = 0; virtual SMDSAbs_ElementType GetType() const = 0;
virtual Predicate* clone() const { return 0; } // return a thread-safe copy of this
}; };
typedef boost::shared_ptr<Predicate> PredicatePtr; typedef boost::shared_ptr<Predicate> PredicatePtr;

View File

@ -85,7 +85,6 @@ void SMESHGUI_GenericHypothesisCreator::create( SMESH::SMESH_Hypothesis_ptr init
const QString& theHypName, const QString& theHypName,
QWidget* parent, QObject* obj, const QString& slot ) QWidget* parent, QObject* obj, const QString& slot )
{ {
MESSAGE( "Creation of hypothesis with initial params" );
setInitParamsHypothesis( initParamsHyp ); setInitParamsHypothesis( initParamsHyp );
create( false, theHypName, parent, obj, slot ); create( false, theHypName, parent, obj, slot );
} }
@ -94,8 +93,6 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
const QString& theHypName, const QString& theHypName,
QWidget* theParent, QObject* obj, const QString& slot ) QWidget* theParent, QObject* obj, const QString& slot )
{ {
MESSAGE( "Creation of hypothesis" );
myIsCreate = true; myIsCreate = true;
// Create hypothesis/algorithm // Create hypothesis/algorithm

View File

@ -24,14 +24,9 @@
// File : SMESH_1D_Algo_i.cxx // File : SMESH_1D_Algo_i.cxx
// Author : Paul RASCLE, EDF // Author : Paul RASCLE, EDF
// Module : SMESH // Module : SMESH
// $Header$
// //
#include "SMESH_1D_Algo_i.hxx" #include "SMESH_1D_Algo_i.hxx"
#include "utilities.h"
using namespace std;
//============================================================================= //=============================================================================
/*! /*!
* SMESH_1D_Algo_i::SMESH_1D_Algo_i * SMESH_1D_Algo_i::SMESH_1D_Algo_i
@ -45,7 +40,6 @@ SMESH_1D_Algo_i::SMESH_1D_Algo_i( PortableServer::POA_ptr thePOA )
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ) SMESH_Algo_i( thePOA )
{ {
MESSAGE( "SMESH_1D_Algo_i::SMESH_1D_Algo_i" );
} }
//============================================================================= //=============================================================================
@ -58,7 +52,6 @@ SMESH_1D_Algo_i::SMESH_1D_Algo_i( PortableServer::POA_ptr thePOA )
SMESH_1D_Algo_i::~SMESH_1D_Algo_i() SMESH_1D_Algo_i::~SMESH_1D_Algo_i()
{ {
MESSAGE( "SMESH_1D_Algo_i::~SMESH_1D_Algo_i" );
} }
//================================================================================ //================================================================================

View File

@ -353,7 +353,6 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
{ {
// PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside // PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside
//Unexpect aCatch(SalomeException); //Unexpect aCatch(SalomeException);
MESSAGE("StdMeshers_Hexa_3D::Compute");
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS(); SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
// Shape verification // Shape verification

View File

@ -52,7 +52,6 @@ StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr
SMESH_Algo_i( thePOA ), SMESH_Algo_i( thePOA ),
SMESH_2D_Algo_i( thePOA ) SMESH_2D_Algo_i( thePOA )
{ {
MESSAGE( "StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i" );
myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
@ -69,7 +68,6 @@ StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr
StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i() StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i()
{ {
MESSAGE( "StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i" );
} }
//============================================================================= //=============================================================================
@ -82,7 +80,6 @@ StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i()
::StdMeshers_Quadrangle_2D* StdMeshers_Quadrangle_2D_i::GetImpl() ::StdMeshers_Quadrangle_2D* StdMeshers_Quadrangle_2D_i::GetImpl()
{ {
MESSAGE( "StdMeshers_Quadrangle_2D_i::GetImpl" );
return ( ::StdMeshers_Quadrangle_2D* )myBaseImpl; return ( ::StdMeshers_Quadrangle_2D* )myBaseImpl;
} }
@ -117,7 +114,6 @@ StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA,
SMESH_Algo_i( thePOA ), SMESH_Algo_i( thePOA ),
SMESH_2D_Algo_i( thePOA ) SMESH_2D_Algo_i( thePOA )
{ {
MESSAGE( "StdMeshers_QuadFromMedialAxis_1D2D_i::StdMeshers_QuadFromMedialAxis_1D2D_i" );
myBaseImpl = new ::StdMeshers_QuadFromMedialAxis_1D2D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_QuadFromMedialAxis_1D2D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
@ -134,7 +130,6 @@ StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA,
StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i() StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i()
{ {
MESSAGE( "StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i" );
} }
//================================================================================ //================================================================================

View File

@ -50,7 +50,6 @@ StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA
SMESH_Algo_i( thePOA ), SMESH_Algo_i( thePOA ),
SMESH_1D_Algo_i( thePOA ) SMESH_1D_Algo_i( thePOA )
{ {
MESSAGE( "StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i" );
myBaseImpl = new ::StdMeshers_Regular_1D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Regular_1D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
@ -66,7 +65,6 @@ StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA
StdMeshers_Regular_1D_i::~StdMeshers_Regular_1D_i() StdMeshers_Regular_1D_i::~StdMeshers_Regular_1D_i()
{ {
MESSAGE( "StdMeshers_Regular_1D_i::~StdMeshers_Regular_1D_i" );
} }
//============================================================================= //=============================================================================
@ -79,7 +77,6 @@ StdMeshers_Regular_1D_i::~StdMeshers_Regular_1D_i()
::StdMeshers_Regular_1D* StdMeshers_Regular_1D_i::GetImpl() ::StdMeshers_Regular_1D* StdMeshers_Regular_1D_i::GetImpl()
{ {
MESSAGE( "StdMeshers_Regular_1D_i::GetImpl" );
return ( ::StdMeshers_Regular_1D* )myBaseImpl; return ( ::StdMeshers_Regular_1D* )myBaseImpl;
} }