#include <BRepAdaptor_Surface.hxx>
#include <BRepBndLib.hxx>
+#include <BRepBuilderAPI_Copy.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <BRep_Tool.hxx>
#include <Geom_CylindricalSurface.hxx>
return myGroup ? myGroup->GetType() : SMDSAbs_All;
}
-/*
- ElementsOnSurface
-*/
+//================================================================================
+// ElementsOnSurface
+//================================================================================
ElementsOnSurface::ElementsOnSurface()
{
}
-/*
- ElementsOnShape
-*/
+//================================================================================
+// ElementsOnShape
+//================================================================================
+
+namespace {
+ const int theIsCheckedFlag = 0x0000100;
+}
struct ElementsOnShape::Classifier
{
- Classifier(const TopoDS_Shape& s, double tol) { Init(s,tol); }
- void Init(const TopoDS_Shape& s, double tol);
- bool IsOut(const gp_Pnt& p) { return myIsChecked = true, (this->*myIsOutFun)( p ); }
+ //Classifier(const TopoDS_Shape& s, double tol) { Init(s,tol); }
+ void Init(const TopoDS_Shape& s, double tol, const Bnd_B3d* box = 0 );
+ bool IsOut(const gp_Pnt& p) { return SetChecked( true ), (this->*myIsOutFun)( p ); }
TopAbs_ShapeEnum ShapeType() const { return myShape.ShapeType(); }
- Bnd_B3d* GetBndBox() { return & myBox; }
- bool& IsChecked() { return myIsChecked; }
+ const TopoDS_Shape& Shape() const { return myShape; }
+ 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:
bool isOutOfSolid (const gp_Pnt& p);
bool isOutOfBox (const gp_Pnt& p);
bool isOutOfVertex(const gp_Pnt& p);
bool isBox (const TopoDS_Shape& s);
- bool (Classifier::* myIsOutFun)(const gp_Pnt& p);
+ bool (Classifier::* myIsOutFun)(const gp_Pnt& p);
BRepClass3d_SolidClassifier mySolidClfr;
Bnd_B3d myBox;
GeomAPI_ProjectPointOnSurf myProjFace;
gp_Pnt myVertexXYZ;
TopoDS_Shape myShape;
double myTol;
- bool myIsChecked;
+ int myFlags;
};
struct ElementsOnShape::OctreeClassifier : public SMESH_Octree
{
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,
std::vector< ElementsOnShape::Classifier* >& classifiers );
protected:
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
{
return myType;
clearClassifiers();
myClassifiers.resize( shapesMap.Extent() );
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 )
void ElementsOnShape::clearClassifiers()
{
- for ( size_t i = 0; i < myClassifiers.size(); ++i )
- delete myClassifiers[ i ];
+ // for ( size_t i = 0; i < myClassifiers.size(); ++i )
+ // delete myClassifiers[ i ];
myClassifiers.clear();
delete myOctree;
myOctree = 0;
}
-bool ElementsOnShape::IsSatisfy (long elemId)
+bool ElementsOnShape::IsSatisfy( long elemId )
{
const SMDS_Mesh* mesh = myMeshModifTracer.GetMesh();
const SMDS_MeshElement* elem =
gp_XYZ centerXYZ (0, 0, 0);
if ( !myOctree && myClassifiers.size() > 5 )
- myOctree = new OctreeClassifier( myClassifiers );
-
- std::vector< Classifier* >& classifiers = myOctree ? myWorkClassifiers : myClassifiers;
+ {
+ myWorkClassifiers.resize( myClassifiers.size() );
+ for ( size_t i = 0; i < myClassifiers.size(); ++i )
+ myWorkClassifiers[ i ] = & myClassifiers[ i ];
+ myOctree = new OctreeClassifier( myWorkClassifiers );
+ }
SMDS_ElemIteratorPtr aNodeItr = elem->nodesIterator();
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
{
myWorkClassifiers.clear();
myOctree->GetClassifiersAtPoint( aPnt, myWorkClassifiers );
- }
- 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 );
+ 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 );
+ }
setNodeIsOut( aPnt._node, isNodeOut );
}
isSatisfy = !isNodeOut;
}
// Check the center point for volumes MantisBug 0020168
- if (isSatisfy &&
- myAllNodesFlag &&
- myClassifiers[0]->ShapeType() == TopAbs_SOLID)
+ if ( isSatisfy &&
+ myAllNodesFlag &&
+ myClassifiers[0].ShapeType() == TopAbs_SOLID )
{
centerXYZ /= elem->NbNodes();
isSatisfy = false;
- for ( size_t i = 0; i < classifiers.size() && !isSatisfy; ++i )
- isSatisfy = ! classifiers[i]->IsOut( centerXYZ );
+ if ( myOctree )
+ 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;
}
-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;
myTol = theTol;
if ( !isShapeBox )
{
- 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 )
+ if ( theBox )
+ {
+ myBox = *theBox;
+ }
+ else
{
- double x = halfSize.Coord( iDim );
- halfSize.SetCoord( iDim, x + Max( myTol, 1e-2 * x ));
+ 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 );
}
}
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::
OctreeClassifier::GetClassifiersAtPoint( const gp_XYZ& point,
std::vector< ElementsOnShape::Classifier* >& result )
void ElementsOnShape::OctreeClassifier::buildChildrenData()
{
// 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 (int j = 0; j < nbChildren(); j++)
+ for ( int j = 0; j < nbChildren(); j++ )
{
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 );
// 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 );
-
- if ( child->myClassifiers.capacity() - child->myClassifiers.size() > 100 )
- SMESHUtils::CompactVector( child->myClassifiers );
}
}
BelongToGeom::BelongToGeom()
: myMeshDS(NULL),
- myType(SMDSAbs_All),
+ myType(SMDSAbs_NbElementTypes),
myIsSubshape(false),
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 )
{
- myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
- init();
+ if ( myMeshDS != theMesh )
+ {
+ myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
+ init();
+ }
}
void BelongToGeom::SetGeom( const TopoDS_Shape& theShape )
{
- myShape = theShape;
- init();
+ if ( myShape != theShape )
+ {
+ myShape = theShape;
+ init();
+ }
}
static bool IsSubShape (const TopTools_IndexedMapOfShape& theMap,
- const TopoDS_Shape& theShape)
+ const TopoDS_Shape& theShape)
{
if (theMap.Contains(theShape)) return true;
void BelongToGeom::init()
{
- if (!myMeshDS || myShape.IsNull()) return;
+ if ( !myMeshDS || myShape.IsNull() ) return;
// is sub-shape of main shape?
TopoDS_Shape aMainShape = myMeshDS->ShapeToMesh();
}
else {
TopTools_IndexedMapOfShape aMap;
- TopExp::MapShapes(aMainShape, aMap);
- myIsSubshape = IsSubShape(aMap, myShape);
+ TopExp::MapShapes( aMainShape, aMap );
+ 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
}
}
-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)
{
if (myMeshDS == 0 || myShape.IsNull())
if (myType == SMDSAbs_Node)
{
- if( const SMDS_MeshNode* aNode = myMeshDS->FindNode( theId ) )
+ if ( const SMDS_MeshNode* aNode = myMeshDS->FindNode( theId ))
{
if ( aNode->getshapeId() < 1 )
return myElementsOnShapePtr->IsSatisfy(theId);
-
- const SMDS_PositionPtr& aPosition = aNode->GetPosition();
- 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
+ return mySubShapesIDs.Contains( aNode->getshapeId() );
}
}
else
{
if ( const SMDS_MeshElement* anElem = myMeshDS->FindElement( theId ))
{
- if ( anElem->getshapeId() < 1 )
- return myElementsOnShapePtr->IsSatisfy(theId);
-
- if( myType == SMDSAbs_All )
- {
- return ( IsContains( myMeshDS,myShape,anElem,TopAbs_EDGE ) ||
- IsContains( myMeshDS,myShape,anElem,TopAbs_FACE ) ||
- IsContains( myMeshDS,myShape,anElem,TopAbs_SOLID )||
- IsContains( myMeshDS,myShape,anElem,TopAbs_SHELL ));
- }
- else if( myType == anElem->GetType() )
+ if ( anElem->GetType() == myType )
{
- 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:;
- }
+ if ( anElem->getshapeId() < 1 )
+ return myElementsOnShapePtr->IsSatisfy(theId);
+ else
+ return mySubShapesIDs.Contains( anElem->getshapeId() );
}
}
}
void BelongToGeom::SetType (SMDSAbs_ElementType theType)
{
- myType = theType;
- init();
+ if ( myType != theType )
+ {
+ myType = theType;
+ init();
+ }
}
SMDSAbs_ElementType BelongToGeom::GetType() const
void BelongToGeom::SetTolerance (double theTolerance)
{
myTolerance = theTolerance;
- if (!myIsSubshape)
- init();
+ init();
}
double BelongToGeom::GetTolerance()
/*
Class : LyingOnGeom
Description : Predicate for verifying whether entiy lying or partially lying on
- specified geometrical support
+ specified geometrical support
*/
LyingOnGeom::LyingOnGeom()
: myMeshDS(NULL),
- myType(SMDSAbs_All),
+ myType(SMDSAbs_NbElementTypes),
myIsSubshape(false),
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 )
{
- myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
- init();
+ if ( myMeshDS != theMesh )
+ {
+ myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
+ init();
+ }
}
void LyingOnGeom::SetGeom( const TopoDS_Shape& theShape )
{
- myShape = theShape;
- init();
+ if ( myShape != theShape )
+ {
+ myShape = theShape;
+ init();
+ }
}
void LyingOnGeom::init()
if ( mySubShapesIDs.Contains( elem->getshapeId() ))
return true;
- if ( elem->GetType() != SMDSAbs_Node )
+ if ( elem->GetType() != SMDSAbs_Node && elem->GetType() == myType )
{
SMDS_ElemIteratorPtr nodeItr = elem->nodesIterator();
while ( nodeItr->more() )
void LyingOnGeom::SetType( SMDSAbs_ElementType theType )
{
- myType = theType;
- init();
+ if ( myType != theType )
+ {
+ myType = theType;
+ init();
+ }
}
SMDSAbs_ElementType LyingOnGeom::GetType() const
void LyingOnGeom::SetTolerance (double theTolerance)
{
myTolerance = theTolerance;
- if (!myIsSubshape)
- init();
+ init();
}
double LyingOnGeom::GetTolerance()
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)
{}
class SMESHCONTROLS_EXPORT CoincidentNodes: public Predicate {
public:
CoincidentNodes();
+ //virtual Predicate* clone() const { return new CoincidentNodes( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
class SMESHCONTROLS_EXPORT CoincidentElements1D: public CoincidentElements {
public:
virtual SMDSAbs_ElementType GetType() const;
+ //virtual Predicate* clone() const { return new CoincidentElements1D( *this ); }
};
class SMESHCONTROLS_EXPORT CoincidentElements2D: public CoincidentElements {
public:
virtual SMDSAbs_ElementType GetType() const;
+ //virtual Predicate* clone() const { return new CoincidentElements2D( *this ); }
};
class SMESHCONTROLS_EXPORT CoincidentElements3D: public CoincidentElements {
public:
virtual SMDSAbs_ElementType GetType() const;
+ //virtual Predicate* clone() const { return new CoincidentElements3D( *this ); }
};
/*
class SMESHCONTROLS_EXPORT FreeBorders: public virtual Predicate{
public:
FreeBorders();
+ //virtual Predicate* clone() const { return new FreeBorders( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
class SMESHCONTROLS_EXPORT BadOrientedVolume: public virtual Predicate{
public:
BadOrientedVolume();
+ //virtual Predicate* clone() const { return new BadOrientedVolume( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
class SMESHCONTROLS_EXPORT ElemEntityType: public virtual Predicate{
public:
ElemEntityType();
+ //virtual Predicate* clone() const { return new ElemEntityType( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType );
{
public:
BareBorderVolume():myMesh(0) {}
+ virtual Predicate* clone() const { return new BareBorderVolume( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; }
virtual bool IsSatisfy( long theElementId );
{
public:
BareBorderFace():myMesh(0) {}
+ //virtual Predicate* clone() const { return new BareBorderFace( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
virtual bool IsSatisfy( long theElementId );
{
public:
OverConstrainedVolume():myMesh(0) {}
+ virtual Predicate* clone() const { return new OverConstrainedVolume( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; }
virtual bool IsSatisfy( long theElementId );
{
public:
OverConstrainedFace():myMesh(0) {}
+ //virtual Predicate* clone() const { return new OverConstrainedFace( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
virtual bool IsSatisfy( long theElementId );
class SMESHCONTROLS_EXPORT FreeEdges: public virtual Predicate{
public:
FreeEdges();
+ //virtual Predicate* clone() const { return new FreeEdges( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
class SMESHCONTROLS_EXPORT FreeNodes: public virtual Predicate{
public:
FreeNodes();
+ //virtual Predicate* clone() const { return new FreeNodes( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theNodeId );
virtual SMDSAbs_ElementType GetType() const;
class SMESHCONTROLS_EXPORT RangeOfIds: public virtual Predicate
{
public:
- RangeOfIds();
+ RangeOfIds();
+ //virtual Predicate* clone() const { return new RangeOfIds( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theNodeId );
virtual SMDSAbs_ElementType GetType() const;
class SMESHCONTROLS_EXPORT LessThan: public virtual Comparator{
public:
virtual bool IsSatisfy( long theElementId );
+ //virtual Predicate* clone() const { return new LessThan( *this ); }
};
class SMESHCONTROLS_EXPORT MoreThan: public virtual Comparator{
public:
virtual bool IsSatisfy( long theElementId );
+ //virtual Predicate* clone() const { return new MoreThan( *this ); }
};
class SMESHCONTROLS_EXPORT EqualTo: public virtual Comparator{
public:
EqualTo();
+ //virtual Predicate* clone() const { return new EqualTo( *this ); }
virtual bool IsSatisfy( long theElementId );
virtual void SetTolerance( double theTol );
virtual double GetTolerance();
class SMESHCONTROLS_EXPORT LogicalNOT: public virtual Predicate{
public:
LogicalNOT();
+ //virtual Predicate* clone() const { return new LogicalNOT( *this ); }
virtual ~LogicalNOT();
virtual bool IsSatisfy( long theElementId );
virtual void SetMesh( const SMDS_Mesh* theMesh );
class SMESHCONTROLS_EXPORT LogicalAND: public virtual LogicalBinary{
public:
virtual bool IsSatisfy( long theElementId );
+ //virtual Predicate* clone() const { return new LogicalAND( *this ); }
};
class SMESHCONTROLS_EXPORT LogicalOR: public virtual LogicalBinary{
public:
virtual bool IsSatisfy( long theElementId );
+ //virtual Predicate* clone() const { return new LogicalOR( *this ); }
};
ManifoldPart();
~ManifoldPart();
+ //virtual Predicate* clone() const { return new ManifoldPart( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
// inoke when all parameters already set
virtual bool IsSatisfy( long theElementId );
{
public:
BelongToMeshGroup();
+ //virtual Predicate* clone() const { return new BelongToMeshGroup( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
public:
ElementsOnSurface();
~ElementsOnSurface();
+ //virtual Predicate* clone() const { return new ElementsOnSurface( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
Description : Predicate elements that lying on indicated shape
(1D, 2D or 3D)
*/
- class SMESHCONTROLS_EXPORT ElementsOnShape : public virtual Predicate
+ class SMESHCONTROLS_EXPORT ElementsOnShape : public Predicate
{
public:
ElementsOnShape();
~ElementsOnShape();
+ virtual Predicate* clone() const;
virtual void SetMesh (const SMDS_Mesh* theMesh);
virtual bool IsSatisfy (long theElementId);
virtual SMDSAbs_ElementType GetType() const;
bool getNodeIsOut( const SMDS_MeshNode* n, bool& isOut );
void setNodeIsOut( const SMDS_MeshNode* n, bool isOut );
- std::vector< Classifier* > myClassifiers, myWorkClassifiers;
- OctreeClassifier* myOctree;
- SMDSAbs_ElementType myType;
- TopoDS_Shape myShape;
- double myToler;
- bool myAllNodesFlag;
-
- TMeshModifTracer myMeshModifTracer;
- std::vector<bool> myNodeIsChecked;
- std::vector<bool> myNodeIsOut;
+ std::vector< Classifier > myClassifiers;
+ std::vector< Classifier* > myWorkClassifiers;
+ OctreeClassifier* myOctree;
+ SMDSAbs_ElementType myType;
+ TopoDS_Shape myShape;
+ double myToler;
+ bool myAllNodesFlag;
+
+ TMeshModifTracer myMeshModifTracer;
+ std::vector<bool> myNodeIsChecked;
+ std::vector<bool> myNodeIsOut;
};
typedef boost::shared_ptr<ElementsOnShape> ElementsOnShapePtr;
{
public:
BelongToGeom();
+ virtual Predicate* clone() const;
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual void SetGeom( const TopoDS_Shape& theShape );
virtual void init();
TopoDS_Shape myShape;
+ TColStd_MapOfInteger mySubShapesIDs;
const SMESHDS_Mesh* myMeshDS;
SMDSAbs_ElementType myType;
bool myIsSubshape;
{
public:
LyingOnGeom();
+ virtual Predicate* clone() const;
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual void SetGeom( const TopoDS_Shape& theShape );
void SetTolerance( double );
double GetTolerance();
- virtual bool Contains( const SMESHDS_Mesh* theMeshDS,
- const TopoDS_Shape& theShape,
- const SMDS_MeshElement* theElem,
- TopAbs_ShapeEnum theFindShapeEnum,
- TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE );
- private:
+ private:
virtual void init();
TopoDS_Shape myShape;
class SMESHCONTROLS_EXPORT FreeFaces: public virtual Predicate{
public:
FreeFaces();
+ //virtual Predicate* clone() const { return new FreeFaces( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
class SMESHCONTROLS_EXPORT LinearOrQuadratic: public virtual Predicate{
public:
LinearOrQuadratic();
+ //virtual Predicate* clone() const { return new LinearOrQuadratic( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType );
class SMESHCONTROLS_EXPORT GroupColor: public virtual Predicate{
public:
GroupColor();
+ //virtual Predicate* clone() const { return new GroupColor( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType );
class SMESHCONTROLS_EXPORT ElemGeomType: public virtual Predicate{
public:
ElemGeomType();
+ //virtual Predicate* clone() const { return new ElemGeomType( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
void SetType( SMDSAbs_ElementType theType );
{
public:
CoplanarFaces();
+ //virtual Predicate* clone() const { return new CoplanarFaces( *this ); }
void SetFace( long theID ) { myFaceID = theID; }
long GetFace() const { return myFaceID; }
void SetTolerance (const double theToler) { myToler = theToler; }
{
public:
ConnectedElements();
+ //virtual Predicate* clone() const { return new ConnectedElements( *this ); }
void SetNode( int nodeID );
void SetPoint( double x, double y, double z );
int GetNode() const;
{
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 );
if ( typeName == &groupName[0] + bcBeg )
{
// --------------
const int spaceDim = 3;
- int meshDim = 1;
- if ( myMesh->NbFaces() > 0 ) meshDim = 2;
+ int meshDim = 1;
+ if ( myMesh->NbFaces() > 0 ) meshDim = 2;
if ( myMesh->NbVolumes() > 0 ) meshDim = 3;
if ( myMeshName.empty() )
{
int nbases = 0;
- if ( cg_nbases( _fn, &nbases) == CG_OK)
+ if ( cg_nbases( _fn, &nbases) == CG_OK )
myMeshName = ( SMESH_Comment("Base_") << nbases+1 );
else
myMeshName = "Base_0";
}
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 );
// create a Zone
// write into a section all successive elements of one geom type
int iSec;
vector< cgsize_t > elemData;
- SMDS_ElemIteratorPtr elemIt = myMesh->elementsIterator();
+ SMDS_ElemIteratorPtr elemIt = myMesh->elementsIterator();
const SMDS_MeshElement* elem = elemIt->next();
while ( elem )
{
#ifdef _DEBUG_
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
#else
static int MYDEBUG = 0;
#endif
int SMDS_VtkEdge::NbNodes() const
{
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
- int nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints();
- assert(nbPoints >= 2);
- return nbPoints;
+ vtkIdType *pts, npts;
+ grid->GetCellPoints( myVtkID, npts, pts );
+ assert(npts >= 2);
+ return npts;
}
int SMDS_VtkEdge::NbEdges() const
nbEdges = 4;
break;
case VTK_QUADRATIC_POLYGON:
- nbEdges = grid->GetCell(myVtkID)->GetNumberOfPoints() / 2;
+ nbEdges = NbNodes() / 2;
break;
case VTK_POLYGON:
default:
- nbEdges = grid->GetCell(myVtkID)->GetNumberOfPoints();
+ nbEdges = NbNodes();
break;
}
return nbEdges;
int SMDS_VtkFace::NbNodes() const
{
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
- int nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints();
- return nbPoints;
+ vtkIdType *pts, npts;
+ grid->GetCellPoints( myVtkID, npts, pts );
+ return npts;
}
/*!
bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
{
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+ vtkIdType npts = 0;
+ vtkIdType* pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+
vtkIdType aVtkType = grid->GetCellType(this->myVtkID);
int rankFirstMedium = 0;
switch (aVtkType)
rankFirstMedium = 4; // medium nodes are of rank 4,5,6,7
break;
case VTK_QUADRATIC_POLYGON:
- rankFirstMedium = grid->GetCell(myVtkID)->GetNumberOfPoints() / 2;
+ rankFirstMedium = npts / 2;
break;
default:
//MESSAGE("wrong element type " << aVtkType);
return false;
}
- vtkIdType npts = 0;
- vtkIdType* pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
vtkIdType nodeId = node->getVtkId();
for (int rank = 0; rank < npts; rank++)
{
int SMDS_VtkFace::NbCornerNodes() const
{
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
- int nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints();
+ int nbPoints = NbNodes();
vtkIdType aVtkType = grid->GetCellType(myVtkID);
switch ( aVtkType )
{
{
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
vtkIdType aVtkType = grid->GetCellType(this->myVtkID);
- int nbPoints = 0;
+ vtkIdType nbPoints = 0;
if (aVtkType != VTK_POLYHEDRON)
{
- nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints();
+ vtkIdType *pts;
+ grid->GetCellPoints( myVtkID, nbPoints, pts );
}
else
{
# --- options ---
# additional include directories
+
+IF(SALOME_SMESH_USE_TBB)
+ SET(TBB_INCLUDES ${TBB_INCLUDE_DIRS})
+ENDIF(SALOME_SMESH_USE_TBB)
+
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${CAS_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SMDS
-
+ ${TBB_INCLUDES}
)
# additional preprocessor / compiler flags
${BOOST_DEFINITIONS}
)
+IF(SALOME_SMESH_USE_TBB)
+ SET(TBB_LIBS ${TBB_LIBRARIES})
+ENDIF(SALOME_SMESH_USE_TBB)
+
# libraries to link to
SET(_link_LIBRARIES
${CAS_KERNEL}
${CAS_TKBRep}
${KERNEL_SALOMELocalTrace}
SMDS
+ ${TBB_LIBS}
)
# --- headers ---
using namespace std;
+//#undef WITH_TBB
+
//=============================================================================
/*!
* Creates a group based on thePredicate
{
myPredicate->SetMesh( GetMesh() ); // hope myPredicate updates self here if necessary
+ if ( !IsUpToDate() )
+ updateParallel();
+
elemIt = GetMesh()->elementsIterator( GetType() );
if ( IsUpToDate() )
{
if ( !IsUpToDate() )
{
me->setChanged();
- SMDS_ElemIteratorPtr elIt = GetElements();
- if ( elIt->more() ) {
- // find out nb of elements to skip w/o check before the 1st OK element
- const SMDS_MeshElement* e = me->setNbElemToSkip( elIt );
- ++me->myMeshInfo[ e->GetEntityType() ];
- while ( elIt->more() )
- ++me->myMeshInfo[ elIt->next()->GetEntityType() ];
+ if ( !updateParallel() )
+ {
+ SMDS_ElemIteratorPtr elIt = GetElements();
+ if ( elIt->more() ) {
+ // find out nb of elements to skip w/o check before the 1st OK element
+ const SMDS_MeshElement* e = me->setNbElemToSkip( elIt );
+ ++me->myMeshInfo[ e->GetEntityType() ];
+ while ( elIt->more() )
+ ++me->myMeshInfo[ elIt->next()->GetEntityType() ];
+ }
}
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
private:
void update() const;
+ bool updateParallel() const;
void setChanged(bool changed=true);
const SMDS_MeshElement* setNbElemToSkip( SMDS_ElemIteratorPtr& elIt );
int getElementIds( void* ids, size_t idSize ) const;
class SMDS_Mesh;
-namespace SMESH{
- namespace Controls{
+namespace SMESH {
+ namespace Controls {
/*
Class : Functor
Class : Predicate
Description : Base class for all predicates
*/
- class SMESHCONTROLS_EXPORT Predicate: public virtual Functor{
+ class SMESHCONTROLS_EXPORT Predicate: public virtual Functor {
public:
virtual bool IsSatisfy( long theElementId ) = 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;
const QString& theHypName,
QWidget* parent, QObject* obj, const QString& slot )
{
- MESSAGE( "Creation of hypothesis with initial params" );
setInitParamsHypothesis( initParamsHyp );
create( false, theHypName, parent, obj, slot );
}
const QString& theHypName,
QWidget* theParent, QObject* obj, const QString& slot )
{
- MESSAGE( "Creation of hypothesis" );
-
myIsCreate = true;
// Create hypothesis/algorithm
// File : SMESH_1D_Algo_i.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-// $Header$
//
#include "SMESH_1D_Algo_i.hxx"
-#include "utilities.h"
-
-using namespace std;
-
//=============================================================================
/*!
* SMESH_1D_Algo_i::SMESH_1D_Algo_i
SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA )
{
- MESSAGE( "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" );
}
//================================================================================
{
// PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside
//Unexpect aCatch(SalomeException);
- MESSAGE("StdMeshers_Hexa_3D::Compute");
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
// Shape verification
SMESH_Algo_i( thePOA ),
SMESH_2D_Algo_i( thePOA )
{
- MESSAGE( "StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i" );
myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(),
theStudyId,
theGenImpl );
StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i()
{
- MESSAGE( "StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i" );
}
//=============================================================================
::StdMeshers_Quadrangle_2D* StdMeshers_Quadrangle_2D_i::GetImpl()
{
- MESSAGE( "StdMeshers_Quadrangle_2D_i::GetImpl" );
return ( ::StdMeshers_Quadrangle_2D* )myBaseImpl;
}
SMESH_Algo_i( thePOA ),
SMESH_2D_Algo_i( thePOA )
{
- MESSAGE( "StdMeshers_QuadFromMedialAxis_1D2D_i::StdMeshers_QuadFromMedialAxis_1D2D_i" );
myBaseImpl = new ::StdMeshers_QuadFromMedialAxis_1D2D( theGenImpl->GetANewId(),
theStudyId,
theGenImpl );
StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i()
{
- MESSAGE( "StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i" );
}
//================================================================================
SMESH_Algo_i( thePOA ),
SMESH_1D_Algo_i( thePOA )
{
- MESSAGE( "StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i" );
myBaseImpl = new ::StdMeshers_Regular_1D( theGenImpl->GetANewId(),
theStudyId,
theGenImpl );
StdMeshers_Regular_1D_i::~StdMeshers_Regular_1D_i()
{
- MESSAGE( "StdMeshers_Regular_1D_i::~StdMeshers_Regular_1D_i" );
}
//=============================================================================
::StdMeshers_Regular_1D* StdMeshers_Regular_1D_i::GetImpl()
{
- MESSAGE( "StdMeshers_Regular_1D_i::GetImpl" );
return ( ::StdMeshers_Regular_1D* )myBaseImpl;
}