mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-19 22:13:06 +05:00
This commit was generated by cvs2git to create branch 'BR-D5-38-2003'.
Cherrypick from master 2005-10-11 13:41:57 UTC eap <eap@opencascade.com> 'PAL10196. use renamed GetGroupNames()->GetGroupNamesAndTypes() of MED Driver': src/Controls/SMESH_ControlsDef.hxx src/DriverMED/DriverMED_Family.h src/DriverMED/DriverMED_R_SMESHDS_Mesh.h src/OBJECT/SMESH_Actor.cxx src/OBJECT/SMESH_Actor.h src/SMDS/SMDS_VolumeTool.hxx src/SMESH/SMESH_Mesh.cxx src/SMESH/SMESH_Mesh.hxx src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx src/SMESHGUI/SMESHGUI_FilterUtils.cxx src/SMESHGUI/SMESHGUI_FilterUtils.h src/SMESH_I/SMESH_MEDFamily_i.hxx src/SMESH_I/SMESH_MEDSupport_i.hxx
This commit is contained in:
parent
3d00133235
commit
cd6f3c42cf
660
src/Controls/SMESH_ControlsDef.hxx
Normal file
660
src/Controls/SMESH_ControlsDef.hxx
Normal file
@ -0,0 +1,660 @@
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
|
||||
#ifndef _SMESH_CONTROLSDEF_HXX_
|
||||
#define _SMESH_CONTROLSDEF_HXX_
|
||||
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <TColStd_MapOfInteger.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
#include "SMDSAbs_ElementType.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
|
||||
#include "SMESH_Controls.hxx"
|
||||
|
||||
class SMDS_MeshElement;
|
||||
class SMDS_MeshFace;
|
||||
class SMDS_MeshNode;
|
||||
class SMDS_Mesh;
|
||||
|
||||
class SMESHDS_Mesh;
|
||||
class SMESHDS_SubMesh;
|
||||
|
||||
class gp_Pnt;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
namespace SMESH{
|
||||
namespace Controls{
|
||||
|
||||
class TSequenceOfXYZ: public std::vector<gp_XYZ>
|
||||
{
|
||||
public:
|
||||
typedef std::vector<gp_XYZ> TSuperClass;
|
||||
TSequenceOfXYZ()
|
||||
{}
|
||||
|
||||
TSequenceOfXYZ(size_type n):
|
||||
TSuperClass(n)
|
||||
{}
|
||||
|
||||
TSequenceOfXYZ(size_type n, const value_type& t):
|
||||
TSuperClass(n,t)
|
||||
{}
|
||||
|
||||
TSequenceOfXYZ(const TSequenceOfXYZ& theSequenceOfXYZ):
|
||||
TSuperClass(theSequenceOfXYZ)
|
||||
{}
|
||||
|
||||
template <class InputIterator>
|
||||
TSequenceOfXYZ(InputIterator theBegin, InputIterator theEnd):
|
||||
TSuperClass(theBegin,theEnd)
|
||||
{}
|
||||
|
||||
TSequenceOfXYZ& operator=(const TSequenceOfXYZ& theSequenceOfXYZ){
|
||||
TSuperClass::operator=(theSequenceOfXYZ);
|
||||
return *this;
|
||||
}
|
||||
|
||||
reference operator()(size_type n){
|
||||
return TSuperClass::operator[](n-1);
|
||||
}
|
||||
|
||||
const_reference operator()(size_type n) const{
|
||||
return TSuperClass::operator[](n-1);
|
||||
}
|
||||
|
||||
private:
|
||||
reference operator[](size_type n);
|
||||
|
||||
const_reference operator[](size_type n) const;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : Functor
|
||||
Description : Root of all Functors
|
||||
*/
|
||||
class Functor
|
||||
{
|
||||
public:
|
||||
~Functor(){}
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh ) = 0;
|
||||
virtual SMDSAbs_ElementType GetType() const = 0;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : NumericalFunctor
|
||||
Description : Root of all Functors returning numeric value
|
||||
*/
|
||||
class NumericalFunctor: public virtual Functor{
|
||||
public:
|
||||
NumericalFunctor();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual double GetValue( long theElementId );
|
||||
virtual double GetValue(const TSequenceOfXYZ& thePoints) { return -1.0;};
|
||||
virtual SMDSAbs_ElementType GetType() const = 0;
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const = 0;
|
||||
long GetPrecision() const;
|
||||
void SetPrecision( const long thePrecision );
|
||||
|
||||
bool GetPoints(const int theId,
|
||||
TSequenceOfXYZ& theRes) const;
|
||||
static bool GetPoints(const SMDS_MeshElement* theElem,
|
||||
TSequenceOfXYZ& theRes);
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
long myPrecision;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : Volume
|
||||
Description : Functor calculating volume of 3D mesh element
|
||||
*/
|
||||
class Volume: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( long theElementId );
|
||||
//virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : SMESH_MinimumAngle
|
||||
Description : Functor for calculation of minimum angle
|
||||
*/
|
||||
class MinimumAngle: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : AspectRatio
|
||||
Description : Functor for calculating aspect ratio
|
||||
*/
|
||||
class AspectRatio: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : AspectRatio3D
|
||||
Description : Functor for calculating aspect ratio of 3D elems.
|
||||
*/
|
||||
class AspectRatio3D: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : Warping
|
||||
Description : Functor for calculating warping
|
||||
*/
|
||||
class Warping: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
|
||||
private:
|
||||
double ComputeA( const gp_XYZ&, const gp_XYZ&, const gp_XYZ&, const gp_XYZ& ) const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : Taper
|
||||
Description : Functor for calculating taper
|
||||
*/
|
||||
class Taper: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : Skew
|
||||
Description : Functor for calculating skew in degrees
|
||||
*/
|
||||
class Skew: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : Area
|
||||
Description : Functor for calculating area
|
||||
*/
|
||||
class Area: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : Length
|
||||
Description : Functor for calculating length of edge
|
||||
*/
|
||||
class Length: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : Length2D
|
||||
Description : Functor for calculating length of edge
|
||||
*/
|
||||
class Length2D: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( long theElementId );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
struct Value{
|
||||
double myLength;
|
||||
long myPntId[2];
|
||||
Value(double theLength, long thePntId1, long thePntId2);
|
||||
bool operator<(const Value& x) const;
|
||||
};
|
||||
typedef std::set<Value> TValues;
|
||||
void GetValues(TValues& theValues);
|
||||
|
||||
};
|
||||
typedef boost::shared_ptr<Length2D> Length2DPtr;
|
||||
|
||||
/*
|
||||
Class : MultiConnection
|
||||
Description : Functor for calculating number of faces conneted to the edge
|
||||
*/
|
||||
class MultiConnection: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( long theElementId );
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : MultiConnection2D
|
||||
Description : Functor for calculating number of faces conneted to the edge
|
||||
*/
|
||||
class MultiConnection2D: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( long theElementId );
|
||||
virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
struct Value{
|
||||
long myPntId[2];
|
||||
Value(long thePntId1, long thePntId2);
|
||||
bool operator<(const Value& x) const;
|
||||
};
|
||||
typedef std::map<Value,int> MValues;
|
||||
|
||||
void GetValues(MValues& theValues);
|
||||
};
|
||||
typedef boost::shared_ptr<MultiConnection2D> MultiConnection2DPtr;
|
||||
/*
|
||||
PREDICATES
|
||||
*/
|
||||
/*
|
||||
Class : Predicate
|
||||
Description : Base class for all predicates
|
||||
*/
|
||||
class Predicate: public virtual Functor{
|
||||
public:
|
||||
virtual bool IsSatisfy( long theElementId ) = 0;
|
||||
virtual SMDSAbs_ElementType GetType() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Class : FreeBorders
|
||||
Description : Predicate for free borders
|
||||
*/
|
||||
class FreeBorders: public virtual Predicate{
|
||||
public:
|
||||
FreeBorders();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : BadOrientedVolume
|
||||
Description : Predicate bad oriented volumes
|
||||
*/
|
||||
class BadOrientedVolume: public virtual Predicate{
|
||||
public:
|
||||
BadOrientedVolume();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : FreeEdges
|
||||
Description : Predicate for free Edges
|
||||
*/
|
||||
class FreeEdges: public virtual Predicate{
|
||||
public:
|
||||
FreeEdges();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const int theFaceId );
|
||||
typedef long TElemId;
|
||||
struct Border{
|
||||
TElemId myElemId;
|
||||
TElemId myPntId[2];
|
||||
Border(long theElemId, long thePntId1, long thePntId2);
|
||||
bool operator<(const Border& x) const;
|
||||
};
|
||||
typedef std::set<Border> TBorders;
|
||||
void GetBoreders(TBorders& theBorders);
|
||||
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
};
|
||||
typedef boost::shared_ptr<FreeEdges> FreeEdgesPtr;
|
||||
|
||||
|
||||
/*
|
||||
Class : RangeOfIds
|
||||
Description : Predicate for Range of Ids.
|
||||
Range may be specified with two ways.
|
||||
1. Using AddToRange method
|
||||
2. With SetRangeStr method. Parameter of this method is a string
|
||||
like as "1,2,3,50-60,63,67,70-"
|
||||
*/
|
||||
class RangeOfIds: public virtual Predicate
|
||||
{
|
||||
public:
|
||||
RangeOfIds();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual bool IsSatisfy( long theNodeId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
virtual void SetType( SMDSAbs_ElementType theType );
|
||||
|
||||
bool AddToRange( long theEntityId );
|
||||
void GetRangeStr( TCollection_AsciiString& );
|
||||
bool SetRangeStr( const TCollection_AsciiString& );
|
||||
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
|
||||
TColStd_SequenceOfInteger myMin;
|
||||
TColStd_SequenceOfInteger myMax;
|
||||
TColStd_MapOfInteger myIds;
|
||||
|
||||
SMDSAbs_ElementType myType;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<RangeOfIds> RangeOfIdsPtr;
|
||||
|
||||
|
||||
/*
|
||||
Class : Comparator
|
||||
Description : Base class for comparators
|
||||
*/
|
||||
class Comparator: public virtual Predicate{
|
||||
public:
|
||||
Comparator();
|
||||
virtual ~Comparator();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual void SetMargin(double theValue);
|
||||
virtual void SetNumFunctor(NumericalFunctorPtr theFunct);
|
||||
virtual bool IsSatisfy( long theElementId ) = 0;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
double GetMargin();
|
||||
|
||||
protected:
|
||||
double myMargin;
|
||||
NumericalFunctorPtr myFunctor;
|
||||
};
|
||||
typedef boost::shared_ptr<Comparator> ComparatorPtr;
|
||||
|
||||
|
||||
/*
|
||||
Class : LessThan
|
||||
Description : Comparator "<"
|
||||
*/
|
||||
class LessThan: public virtual Comparator{
|
||||
public:
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : MoreThan
|
||||
Description : Comparator ">"
|
||||
*/
|
||||
class MoreThan: public virtual Comparator{
|
||||
public:
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : EqualTo
|
||||
Description : Comparator "="
|
||||
*/
|
||||
class EqualTo: public virtual Comparator{
|
||||
public:
|
||||
EqualTo();
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual void SetTolerance( double theTol );
|
||||
virtual double GetTolerance();
|
||||
|
||||
private:
|
||||
double myToler;
|
||||
};
|
||||
typedef boost::shared_ptr<EqualTo> EqualToPtr;
|
||||
|
||||
|
||||
/*
|
||||
Class : LogicalNOT
|
||||
Description : Logical NOT predicate
|
||||
*/
|
||||
class LogicalNOT: public virtual Predicate{
|
||||
public:
|
||||
LogicalNOT();
|
||||
virtual ~LogicalNOT();
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual void SetPredicate(PredicatePtr thePred);
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
|
||||
private:
|
||||
PredicatePtr myPredicate;
|
||||
};
|
||||
typedef boost::shared_ptr<LogicalNOT> LogicalNOTPtr;
|
||||
|
||||
|
||||
/*
|
||||
Class : LogicalBinary
|
||||
Description : Base class for binary logical predicate
|
||||
*/
|
||||
class LogicalBinary: public virtual Predicate{
|
||||
public:
|
||||
LogicalBinary();
|
||||
virtual ~LogicalBinary();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual void SetPredicate1(PredicatePtr thePred);
|
||||
virtual void SetPredicate2(PredicatePtr thePred);
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
|
||||
protected:
|
||||
PredicatePtr myPredicate1;
|
||||
PredicatePtr myPredicate2;
|
||||
};
|
||||
typedef boost::shared_ptr<LogicalBinary> LogicalBinaryPtr;
|
||||
|
||||
|
||||
/*
|
||||
Class : LogicalAND
|
||||
Description : Logical AND
|
||||
*/
|
||||
class LogicalAND: public virtual LogicalBinary{
|
||||
public:
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : LogicalOR
|
||||
Description : Logical OR
|
||||
*/
|
||||
class LogicalOR: public virtual LogicalBinary{
|
||||
public:
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : ManifoldPart
|
||||
Description : Predicate for manifold part of mesh
|
||||
*/
|
||||
class ManifoldPart: public virtual Predicate{
|
||||
public:
|
||||
|
||||
/* internal class for algorithm uses */
|
||||
class Link
|
||||
{
|
||||
public:
|
||||
Link( SMDS_MeshNode* theNode1,
|
||||
SMDS_MeshNode* theNode2 );
|
||||
~Link();
|
||||
|
||||
bool IsEqual( const ManifoldPart::Link& theLink ) const;
|
||||
bool operator<(const ManifoldPart::Link& x) const;
|
||||
|
||||
SMDS_MeshNode* myNode1;
|
||||
SMDS_MeshNode* myNode2;
|
||||
};
|
||||
|
||||
bool IsEqual( const ManifoldPart::Link& theLink1,
|
||||
const ManifoldPart::Link& theLink2 );
|
||||
|
||||
typedef std::set<ManifoldPart::Link> TMapOfLink;
|
||||
typedef std::vector<SMDS_MeshFace*> TVectorOfFacePtr;
|
||||
typedef std::vector<ManifoldPart::Link> TVectorOfLink;
|
||||
typedef std::map<SMDS_MeshFace*,int> TDataMapFacePtrInt;
|
||||
typedef std::map<ManifoldPart::Link,SMDS_MeshFace*> TDataMapOfLinkFacePtr;
|
||||
|
||||
ManifoldPart();
|
||||
~ManifoldPart();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
// inoke when all parameters already set
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
|
||||
void SetAngleTolerance( const double theAngToler );
|
||||
double GetAngleTolerance() const;
|
||||
void SetIsOnlyManifold( const bool theIsOnly );
|
||||
void SetStartElem( const long theStartElemId );
|
||||
|
||||
private:
|
||||
bool process();
|
||||
bool findConnected( const TDataMapFacePtrInt& theAllFacePtrInt,
|
||||
SMDS_MeshFace* theStartFace,
|
||||
TMapOfLink& theNonManifold,
|
||||
TColStd_MapOfInteger& theResFaces );
|
||||
bool isInPlane( const SMDS_MeshFace* theFace1,
|
||||
const SMDS_MeshFace* theFace2 );
|
||||
void expandBoundary( TMapOfLink& theMapOfBoundary,
|
||||
TVectorOfLink& theSeqOfBoundary,
|
||||
TDataMapOfLinkFacePtr& theDMapLinkFacePtr,
|
||||
TMapOfLink& theNonManifold,
|
||||
SMDS_MeshFace* theNextFace ) const;
|
||||
|
||||
void getFacesByLink( const Link& theLink,
|
||||
TVectorOfFacePtr& theFaces ) const;
|
||||
|
||||
private:
|
||||
const SMDS_Mesh* myMesh;
|
||||
TColStd_MapOfInteger myMapIds;
|
||||
TColStd_MapOfInteger myMapBadGeomIds;
|
||||
TVectorOfFacePtr myAllFacePtr;
|
||||
TDataMapFacePtrInt myAllFacePtrIntDMap;
|
||||
double myAngToler;
|
||||
bool myIsOnlyManifold;
|
||||
long myStartElemId;
|
||||
|
||||
};
|
||||
typedef boost::shared_ptr<ManifoldPart> ManifoldPartPtr;
|
||||
|
||||
|
||||
/*
|
||||
Class : ElementsOnSurface
|
||||
Description : Predicate elements that lying on indicated surface
|
||||
(plane or cylinder)
|
||||
*/
|
||||
class ElementsOnSurface : public virtual Predicate {
|
||||
public:
|
||||
ElementsOnSurface();
|
||||
~ElementsOnSurface();
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
|
||||
void SetTolerance( const double theToler );
|
||||
double GetTolerance() const;
|
||||
void SetSurface( const TopoDS_Shape& theShape,
|
||||
const SMDSAbs_ElementType theType );
|
||||
|
||||
private:
|
||||
void process();
|
||||
void process( const SMDS_MeshElement* theElem );
|
||||
bool isOnSurface( const SMDS_MeshNode* theNode ) const;
|
||||
|
||||
private:
|
||||
const SMDS_Mesh* myMesh;
|
||||
TColStd_MapOfInteger myIds;
|
||||
SMDSAbs_ElementType myType;
|
||||
Handle(Geom_Surface) mySurf;
|
||||
double myToler;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<ElementsOnSurface> ElementsOnSurfacePtr;
|
||||
|
||||
|
||||
/*
|
||||
FILTER
|
||||
*/
|
||||
class Filter{
|
||||
public:
|
||||
Filter();
|
||||
virtual ~Filter();
|
||||
virtual void SetPredicate(PredicatePtr thePred);
|
||||
|
||||
typedef std::vector<long> TIdSequence;
|
||||
|
||||
virtual
|
||||
void
|
||||
GetElementsId( const SMDS_Mesh* theMesh,
|
||||
TIdSequence& theSequence );
|
||||
|
||||
static
|
||||
void
|
||||
GetElementsId( const SMDS_Mesh* theMesh,
|
||||
PredicatePtr thePredicate,
|
||||
TIdSequence& theSequence );
|
||||
|
||||
protected:
|
||||
PredicatePtr myPredicate;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
120
src/DriverMED/DriverMED_Family.h
Normal file
120
src/DriverMED/DriverMED_Family.h
Normal file
@ -0,0 +1,120 @@
|
||||
// SMESH DriverMED : tool to split groups on families
|
||||
//
|
||||
// Copyright (C) 2003 CEA
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : DriverMED_Family.hxx
|
||||
// Author : Julia DOROVSKIKH
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _INCLUDE_DRIVERMED_FAMILY
|
||||
#define _INCLUDE_DRIVERMED_FAMILY
|
||||
|
||||
#include "SMDS_Mesh.hxx"
|
||||
#include "SMESHDS_GroupBase.hxx"
|
||||
#include "SMESHDS_SubMesh.hxx"
|
||||
#include "MED_Common.hxx"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <set>
|
||||
|
||||
#define REST_NODES_FAMILY 1
|
||||
#define REST_EDGES_FAMILY -1
|
||||
#define REST_FACES_FAMILY -2
|
||||
#define REST_VOLUMES_FAMILY -3
|
||||
#define FIRST_NODE_FAMILY 2
|
||||
#define FIRST_ELEM_FAMILY -4
|
||||
|
||||
class DriverMED_Family;
|
||||
typedef boost::shared_ptr<DriverMED_Family> DriverMED_FamilyPtr;
|
||||
|
||||
class DriverMED_Family
|
||||
{
|
||||
public:
|
||||
|
||||
// Methods for groups storing to MED
|
||||
|
||||
static std::list<DriverMED_FamilyPtr> MakeFamilies (const std::map <int, SMESHDS_SubMesh*>& theSubMeshes,
|
||||
const std::list<SMESHDS_GroupBase*>& theGroups,
|
||||
const bool doGroupOfNodes,
|
||||
const bool doGroupOfEdges,
|
||||
const bool doGroupOfFaces,
|
||||
const bool doGroupOfVolumes);
|
||||
// Split each group from list <theGroups> and each sub-mesh from list <theSubMeshes>
|
||||
// on some parts (families) on the basis of the elements membership in other groups
|
||||
// from <theGroups> and other sub-meshes from <theSubMeshes>.
|
||||
// Resulting families have no common elements.
|
||||
|
||||
MED::PFamilyInfo GetFamilyInfo (const MED::PWrapper& theWrapper,
|
||||
const MED::PMeshInfo& theMeshInfo) const;
|
||||
// Create TFamilyInfo for this family
|
||||
|
||||
const std::set<const SMDS_MeshElement *>& GetElements () const { return myElements; }
|
||||
// Returns elements of this family
|
||||
|
||||
int GetId () const { return myId; }
|
||||
// Returns a family ID
|
||||
|
||||
public:
|
||||
|
||||
// Methods for groups reading from MED
|
||||
|
||||
void AddElement (const SMDS_MeshElement* theElement) { myElements.insert(theElement); }
|
||||
|
||||
void AddGroupName (std::string theGroupName) { myGroupNames.insert(theGroupName); }
|
||||
|
||||
void SetType (const SMDSAbs_ElementType theType) { myType = theType; }
|
||||
SMDSAbs_ElementType GetType () { return myType; }
|
||||
|
||||
bool MemberOf (std::string theGroupName) const
|
||||
{ return (myGroupNames.find(theGroupName) != myGroupNames.end()); }
|
||||
|
||||
const MED::TStringSet& GetGroupNames () const { return myGroupNames; }
|
||||
|
||||
void SetId (const int theId) { myId = theId; }
|
||||
// Sets a family ID
|
||||
|
||||
private:
|
||||
void Init (SMESHDS_GroupBase* group);
|
||||
// Initialize the tool by SMESHDS_GroupBase
|
||||
|
||||
static std::list<DriverMED_FamilyPtr> SplitByType (SMESHDS_SubMesh* theSubMesh,
|
||||
const int theId);
|
||||
// Split <theSubMesh> on some parts (families)
|
||||
// on the basis of the elements type.
|
||||
|
||||
void Split (DriverMED_FamilyPtr by,
|
||||
DriverMED_FamilyPtr common);
|
||||
// Remove from <Elements> elements, common with <by>,
|
||||
// Remove from <by> elements, common with <Elements>,
|
||||
// Create family <common> from common elements, with combined groups list.
|
||||
|
||||
bool IsEmpty () const { return myElements.empty(); }
|
||||
// Check, if this family has empty list of elements
|
||||
|
||||
private:
|
||||
int myId;
|
||||
SMDSAbs_ElementType myType;
|
||||
std::set<const SMDS_MeshElement *> myElements;
|
||||
MED::TStringSet myGroupNames;
|
||||
};
|
||||
|
||||
#endif
|
69
src/DriverMED/DriverMED_R_SMESHDS_Mesh.h
Normal file
69
src/DriverMED/DriverMED_R_SMESHDS_Mesh.h
Normal file
@ -0,0 +1,69 @@
|
||||
// SMESH DriverMED : driver to read and write 'med' files
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : DriverMED_R_SMESHDS_Mesh.h
|
||||
// Module : SMESH
|
||||
|
||||
#ifndef _INCLUDE_DRIVERMED_R_SMESHDS_MESH
|
||||
#define _INCLUDE_DRIVERMED_R_SMESHDS_MESH
|
||||
|
||||
#include "Driver_SMESHDS_Mesh.h"
|
||||
#include "DriverMED_Family.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
class SMESHDS_Mesh;
|
||||
class SMESHDS_Group;
|
||||
class SMESHDS_SubMesh;
|
||||
|
||||
typedef std::pair< std::string, SMDSAbs_ElementType > TNameAndType;
|
||||
|
||||
class DriverMED_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
|
||||
{
|
||||
public:
|
||||
virtual Status Perform();
|
||||
|
||||
std::list< TNameAndType > GetGroupNamesAndTypes();
|
||||
void GetGroup(SMESHDS_Group* theGroup);
|
||||
void CreateAllSubMeshes();
|
||||
void GetSubMesh(SMESHDS_SubMesh* theSubMesh, const int theId);
|
||||
|
||||
std::list<std::string> GetMeshNames(Status& theStatus);
|
||||
void SetMeshName(std::string theMeshName);
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief Ensure aFamily has required ID
|
||||
* \param aFamily - a family to check
|
||||
* \param anID - an ID aFamily should have
|
||||
* \retval bool - true if successful
|
||||
*/
|
||||
bool checkFamilyID(DriverMED_FamilyPtr & aFamily, int anID) const;
|
||||
|
||||
private:
|
||||
std::string myMeshName;
|
||||
std::map<int, DriverMED_FamilyPtr> myFamilies;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
1627
src/OBJECT/SMESH_Actor.cxx
Normal file
1627
src/OBJECT/SMESH_Actor.cxx
Normal file
File diff suppressed because it is too large
Load Diff
121
src/OBJECT/SMESH_Actor.h
Normal file
121
src/OBJECT/SMESH_Actor.h
Normal file
@ -0,0 +1,121 @@
|
||||
// SMESH OBJECT : interactive object for SMESH visualization
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Actor.h
|
||||
// Author : Nicolas REJNERI
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef SMESH_ACTOR_H
|
||||
#define SMESH_ACTOR_H
|
||||
|
||||
#include <SALOME_Actor.h>
|
||||
#include "SMESH_Object.h"
|
||||
|
||||
class vtkUnstructuredGrid;
|
||||
|
||||
class vtkScalarBarActor;
|
||||
|
||||
class vtkPlane;
|
||||
class vtkImplicitBoolean;
|
||||
|
||||
class SMESH_Actor: public SALOME_Actor
|
||||
{
|
||||
static SMESH_Actor* New() { return NULL;}
|
||||
|
||||
public:
|
||||
vtkTypeMacro(SMESH_Actor,SALOME_Actor);
|
||||
static SMESH_Actor* New(TVisualObjPtr theVisualObj,
|
||||
const char* theEntry,
|
||||
const char* theName,
|
||||
int theIsClear);
|
||||
|
||||
virtual void SetSufaceColor(float r,float g,float b) = 0;
|
||||
virtual void GetSufaceColor(float& r,float& g,float& b) = 0;
|
||||
|
||||
virtual void SetBackSufaceColor(float r,float g,float b) = 0;
|
||||
virtual void GetBackSufaceColor(float& r,float& g,float& b) = 0;
|
||||
|
||||
virtual void SetEdgeColor(float r,float g,float b) = 0;
|
||||
virtual void GetEdgeColor(float& r,float& g,float& b) = 0;
|
||||
|
||||
virtual void SetNodeColor(float r,float g,float b) = 0;
|
||||
virtual void GetNodeColor(float& r,float& g,float& b) = 0;
|
||||
|
||||
virtual void SetHighlightColor(float r,float g,float b) = 0;
|
||||
virtual void GetHighlightColor(float& r,float& g,float& b) = 0;
|
||||
|
||||
virtual void SetPreHighlightColor(float r,float g,float b) = 0;
|
||||
virtual void GetPreHighlightColor(float& r,float& g,float& b) = 0;
|
||||
|
||||
virtual float GetLineWidth() = 0;
|
||||
virtual void SetLineWidth(float theVal) = 0;
|
||||
|
||||
virtual void SetNodeSize(float size) = 0;
|
||||
virtual float GetNodeSize() = 0;
|
||||
|
||||
enum EReperesent { ePoint, eEdge, eSurface};
|
||||
|
||||
enum EEntityMode { eEdges = 0x01, eFaces = 0x02, eVolumes = 0x04, eAllEntity = 0x07};
|
||||
virtual void SetEntityMode(unsigned int theMode) = 0;
|
||||
virtual unsigned int GetEntityMode() const = 0;
|
||||
|
||||
virtual void SetPointRepresentation(bool theIsPointsVisible) = 0;
|
||||
virtual bool GetPointRepresentation() = 0;
|
||||
|
||||
virtual vtkUnstructuredGrid* GetUnstructuredGrid() = 0;
|
||||
|
||||
virtual void SetShrinkFactor(float theValue) = 0;
|
||||
|
||||
virtual void SetPointsLabeled(bool theIsPointsLabeled) = 0;
|
||||
virtual bool GetPointsLabeled() = 0;
|
||||
|
||||
virtual void SetCellsLabeled(bool theIsCellsLabeled) = 0;
|
||||
virtual bool GetCellsLabeled() = 0;
|
||||
|
||||
enum eControl{eNone, eLength, eLength2D, eFreeBorders, eFreeEdges, eMultiConnection,
|
||||
eArea, eTaper, eAspectRatio, eMinimumAngle, eWarping, eSkew,
|
||||
eAspectRatio3D, eMultiConnection2D, eVolume3D};
|
||||
virtual void SetControlMode(eControl theMode) = 0;
|
||||
virtual eControl GetControlMode() = 0;
|
||||
|
||||
virtual vtkScalarBarActor* GetScalarBarActor() = 0;
|
||||
|
||||
virtual void SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane) = 0;
|
||||
virtual void GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane) = 0;
|
||||
|
||||
virtual void RemoveAllClippingPlanes() = 0;
|
||||
virtual vtkIdType GetNumberOfClippingPlanes() = 0;
|
||||
virtual vtkPlane* GetClippingPlane(vtkIdType theID) = 0;
|
||||
virtual vtkIdType AddClippingPlane(vtkPlane* thePlane) = 0;
|
||||
|
||||
virtual TVisualObjPtr GetObject() = 0;
|
||||
|
||||
virtual void SetControlsPrecision( const long ) = 0;
|
||||
virtual long GetControlsPrecision() const = 0;
|
||||
|
||||
virtual void UpdateScalarBar() = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif //SMESH_ACTOR_H
|
265
src/SMDS/SMDS_VolumeTool.hxx
Normal file
265
src/SMDS/SMDS_VolumeTool.hxx
Normal file
@ -0,0 +1,265 @@
|
||||
// SMESH SMDS : implementaion of Salome mesh data structure
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMDS_VolumeTool.hxx
|
||||
// Module : SMESH
|
||||
// Created : Tue Jul 13 11:27:17 2004
|
||||
// Author : Edward AGAPOV (eap)
|
||||
|
||||
|
||||
#ifndef SMDS_VolumeTool_HeaderFile
|
||||
#define SMDS_VolumeTool_HeaderFile
|
||||
|
||||
class SMDS_MeshElement;
|
||||
class SMDS_MeshNode;
|
||||
class SMDS_PolyhedralVolumeOfNodes;
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
//#ifdef WNT
|
||||
//#include <SALOME_WNT.hxx>
|
||||
//#else
|
||||
//#define SALOME_WNT_EXPORT
|
||||
//#endif
|
||||
|
||||
#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
|
||||
#define SMDS_WNT_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define SMDS_WNT_EXPORT
|
||||
#endif
|
||||
|
||||
// =========================================================================
|
||||
//
|
||||
// Class providing topological and other information about SMDS_MeshVolume:
|
||||
// allows iteration on faces or, to be precise, on nodes of volume sides;
|
||||
// provides info on nodes connection etc.
|
||||
//
|
||||
// =========================================================================
|
||||
|
||||
class SMDS_WNT_EXPORT SMDS_VolumeTool
|
||||
{
|
||||
public:
|
||||
|
||||
enum VolumeType { UNKNOWN = -1, TETRA = 0, PYRAM, PENTA, HEXA, POLYHEDA };
|
||||
|
||||
SMDS_VolumeTool ();
|
||||
~SMDS_VolumeTool ();
|
||||
SMDS_VolumeTool (const SMDS_MeshElement* theVolume);
|
||||
|
||||
bool Set (const SMDS_MeshElement* theVolume);
|
||||
// Set volume.
|
||||
// Return false if theVolume is not of type SMDSAbs_Volume
|
||||
|
||||
// -----------------------
|
||||
// general info
|
||||
// -----------------------
|
||||
|
||||
VolumeType GetVolumeType() const;
|
||||
|
||||
bool IsForward() const { return myVolForward; }
|
||||
// Check volume orientation. can be changed by Inverse().
|
||||
// See node order of forward volumes at the file bottom
|
||||
|
||||
void Inverse();
|
||||
// Change nodes order as if the volume changes its orientation:
|
||||
// top and bottom faces are reversed.
|
||||
// Result of IsForward() and methods returning nodes change
|
||||
|
||||
const SMDS_MeshNode** GetNodes() { return myVolumeNodes; }
|
||||
// Return array of volume nodes
|
||||
|
||||
int NbNodes() { return myVolumeNbNodes; }
|
||||
// Return array of volume nodes
|
||||
|
||||
double GetSize() const;
|
||||
// Return element volume
|
||||
|
||||
bool GetBaryCenter (double & X, double & Y, double & Z) const;
|
||||
|
||||
|
||||
// -----------------------
|
||||
// info on node connection
|
||||
// -----------------------
|
||||
|
||||
bool IsLinked (const SMDS_MeshNode* theNode1,
|
||||
const SMDS_MeshNode* theNode2) const;
|
||||
// Return true if theNode1 is linked with theNode2.
|
||||
|
||||
bool IsLinked (const int theNode1Index,
|
||||
const int theNode2Index) const;
|
||||
// Return true if the node with theNode1Index is linked
|
||||
// with the node with theNode2Index
|
||||
|
||||
int GetNodeIndex(const SMDS_MeshNode* theNode) const;
|
||||
// Return an index of theNode
|
||||
|
||||
// -------------
|
||||
// info on faces
|
||||
// -------------
|
||||
|
||||
void SetExternalNormal ();
|
||||
// Node order in faces will be so that faces normals are external.
|
||||
|
||||
int NbFaces() const { return myNbFaces; }
|
||||
// Return number of faces of the volume. In the following
|
||||
// methods 0 <= faceIndex < NbFaces()
|
||||
|
||||
int NbFaceNodes( int faceIndex );
|
||||
// Return number of nodes in the array of face nodes
|
||||
|
||||
const int* GetFaceNodesIndices( int faceIndex );
|
||||
// Return the array of face nodes indices
|
||||
// To comfort link iteration, the array
|
||||
// length == NbFaceNodes( faceIndex ) + 1 and
|
||||
// the last node index == the first one.
|
||||
|
||||
const SMDS_MeshNode** GetFaceNodes( int faceIndex );
|
||||
// Return the array of face nodes.
|
||||
// To comfort link iteration, the array
|
||||
// length == NbFaceNodes( faceIndex ) + 1 and
|
||||
// the last node == the first one.
|
||||
// WARNING: do not modify the array, some methods
|
||||
// work basing on its contents
|
||||
|
||||
bool GetFaceNodes (int faceIndex,
|
||||
std::set<const SMDS_MeshNode*>& theFaceNodes );
|
||||
// Return a set of face nodes.
|
||||
|
||||
bool IsFaceExternal( int faceIndex );
|
||||
// Check normal orientation of a face.
|
||||
// SetExternalNormal() is taken into account.
|
||||
|
||||
bool IsFreeFace( int faceIndex );
|
||||
// Check that all volumes built on the face nodes lays on one side
|
||||
|
||||
bool GetFaceNormal (int faceIndex, double & X, double & Y, double & Z);
|
||||
// Return a normal to a face
|
||||
|
||||
double GetFaceArea( int faceIndex );
|
||||
// Return face area
|
||||
|
||||
int GetOppFaceIndex( int faceIndex ) const;
|
||||
// Return index of the opposite face if it exists, else -1.
|
||||
|
||||
int GetFaceIndex( const std::set<const SMDS_MeshNode*>& theFaceNodes );
|
||||
// Return index of a face formed by theFaceNodes.
|
||||
// Return -1 if a face not found
|
||||
|
||||
//int GetFaceIndex( const std::set<int>& theFaceNodesIndices );
|
||||
// Return index of a face formed by theFaceNodesIndices
|
||||
// Return -1 if a face not found
|
||||
|
||||
// ------------------------
|
||||
// static methods for faces
|
||||
// ------------------------
|
||||
|
||||
static VolumeType GetType(int nbNodes);
|
||||
// return VolumeType by nb of nodes in a volume
|
||||
|
||||
static int NbFaces( VolumeType type );
|
||||
// return nb of faces by volume type
|
||||
|
||||
static const int* GetFaceNodesIndices(VolumeType type,
|
||||
int faceIndex,
|
||||
bool external);
|
||||
// Return the array of face nodes indices
|
||||
// To comfort link iteration, the array
|
||||
// length == NbFaceNodes( faceIndex ) + 1 and
|
||||
// the last node index == the first one.
|
||||
|
||||
static int NbFaceNodes(VolumeType type,
|
||||
int faceIndex );
|
||||
// Return number of nodes in the array of face nodes
|
||||
|
||||
private:
|
||||
|
||||
bool setFace( int faceIndex );
|
||||
|
||||
const SMDS_MeshElement* myVolume;
|
||||
const SMDS_PolyhedralVolumeOfNodes* myPolyedre;
|
||||
|
||||
bool myVolForward;
|
||||
int myNbFaces;
|
||||
int myVolumeNbNodes;
|
||||
const SMDS_MeshNode** myVolumeNodes;
|
||||
|
||||
bool myExternalFaces;
|
||||
|
||||
int myCurFace;
|
||||
int myFaceNbNodes;
|
||||
int* myFaceNodeIndices;
|
||||
const SMDS_MeshNode** myFaceNodes;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ORDER OF NODES OF FORWARD ELEMENT
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
// N3
|
||||
// +
|
||||
// /|\
|
||||
// / | \
|
||||
// / | \
|
||||
// N0 +---|---+ N1 TETRAHEDRON
|
||||
// \ | /
|
||||
// \ | /
|
||||
// \ | /
|
||||
// \|/
|
||||
// +
|
||||
// N2
|
||||
|
||||
// + N4
|
||||
// /|\
|
||||
// / | \
|
||||
// / | \
|
||||
// / | \
|
||||
// N3 +---------+ N5
|
||||
// | | |
|
||||
// | + N1 |
|
||||
// | / \ | PENTAHEDRON
|
||||
// | / \ |
|
||||
// | / \ |
|
||||
// |/ \|
|
||||
// N0 +---------+ N2
|
||||
|
||||
// N5+----------+N6
|
||||
// /| /|
|
||||
// / | / |
|
||||
// / | / |
|
||||
// N4+----------+N7 |
|
||||
// | | | | HEXAHEDRON
|
||||
// | | | |
|
||||
// | | | |
|
||||
// | N1+------|---+N2
|
||||
// | / | /
|
||||
// | / | /
|
||||
// |/ |/
|
||||
// N0+----------+N3
|
||||
//
|
||||
*/
|
1430
src/SMESH/SMESH_Mesh.cxx
Normal file
1430
src/SMESH/SMESH_Mesh.cxx
Normal file
File diff suppressed because it is too large
Load Diff
256
src/SMESH/SMESH_Mesh.hxx
Normal file
256
src/SMESH/SMESH_Mesh.hxx
Normal file
@ -0,0 +1,256 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Mesh.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_MESH_HXX_
|
||||
#define _SMESH_MESH_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
//#include "SMESH_subMesh.hxx"
|
||||
|
||||
#include "SMESHDS_Document.hxx"
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "SMESHDS_Command.hxx"
|
||||
#include "SMDSAbs_ElementType.hxx"
|
||||
|
||||
//#include "NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx"
|
||||
#include "SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx"
|
||||
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <TopoDS_CompSolid.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopoDS_Shell.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
class SMESH_Gen;
|
||||
class SMESH_Group;
|
||||
class TopTools_ListOfShape;
|
||||
class SMESH_subMesh;
|
||||
class SMESH_HypoFilter;
|
||||
|
||||
//typedef NMTTools_IndexedDataMapOfShapeIndexedMapOfShape IndexedMapOfChain;
|
||||
typedef SMESH_IndexedDataMapOfShapeIndexedMapOfShape IndexedMapOfChain;
|
||||
|
||||
class SMESH_Mesh
|
||||
{
|
||||
SMESH_Mesh();
|
||||
SMESH_Mesh(const SMESH_Mesh&);
|
||||
public:
|
||||
SMESH_Mesh(int localId, int studyId, SMESH_Gen * gen,
|
||||
SMESHDS_Document * myDocument);
|
||||
|
||||
virtual ~SMESH_Mesh();
|
||||
|
||||
void ShapeToMesh(const TopoDS_Shape & aShape);
|
||||
|
||||
int UNVToMesh(const char* theFileName);
|
||||
/*!
|
||||
* consult DriverMED_R_SMESHDS_Mesh::ReadStatus for returned value
|
||||
*/
|
||||
int MEDToMesh(const char* theFileName, const char* theMeshName);
|
||||
|
||||
int STLToMesh(const char* theFileName);
|
||||
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
AddHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
RemoveHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
const list <const SMESHDS_Hypothesis * >&
|
||||
GetHypothesisList(const TopoDS_Shape & aSubShape) const
|
||||
throw(SALOME_Exception);
|
||||
|
||||
const SMESH_Hypothesis * GetHypothesis(const TopoDS_Shape & aSubShape,
|
||||
const SMESH_HypoFilter& aFilter,
|
||||
const bool andAncestors) const;
|
||||
|
||||
bool GetHypotheses(const TopoDS_Shape & aSubShape,
|
||||
const SMESH_HypoFilter& aFilter,
|
||||
list <const SMESHDS_Hypothesis * >& aHypList,
|
||||
const bool andAncestors) const;
|
||||
|
||||
const list<SMESHDS_Command*> & GetLog() throw(SALOME_Exception);
|
||||
|
||||
void ClearLog() throw(SALOME_Exception);
|
||||
|
||||
int GetId();
|
||||
|
||||
SMESHDS_Mesh * GetMeshDS();
|
||||
|
||||
SMESH_Gen *GetGen();
|
||||
|
||||
SMESH_subMesh *GetSubMesh(const TopoDS_Shape & aSubShape)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
SMESH_subMesh *GetSubMeshContaining(const TopoDS_Shape & aSubShape)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
SMESH_subMesh *GetSubMeshContaining(const int aShapeID)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
const list < SMESH_subMesh * >&
|
||||
GetSubMeshUsingHypothesis(SMESHDS_Hypothesis * anHyp)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
bool IsUsedHypothesis(SMESHDS_Hypothesis * anHyp,
|
||||
const TopoDS_Shape & aSubShape);
|
||||
// Return True if anHyp is used to mesh aSubShape
|
||||
|
||||
bool IsNotConformAllowed() const;
|
||||
// check if a hypothesis alowing notconform mesh is present
|
||||
|
||||
bool IsMainShape(const TopoDS_Shape& theShape) const;
|
||||
|
||||
const TopTools_ListOfShape& GetAncestors(const TopoDS_Shape& theSubShape) const;
|
||||
// return list of ancestors of theSubShape in the order
|
||||
// that lower dimention shapes come first.
|
||||
|
||||
void ExportMED(const char *file,
|
||||
const char* theMeshName = NULL,
|
||||
bool theAutoGroups = true,
|
||||
int theVersion = 0)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
void ExportDAT(const char *file) throw(SALOME_Exception);
|
||||
void ExportUNV(const char *file) throw(SALOME_Exception);
|
||||
void ExportSTL(const char *file, const bool isascii) throw(SALOME_Exception);
|
||||
|
||||
int NbNodes() throw(SALOME_Exception);
|
||||
|
||||
int NbEdges() throw(SALOME_Exception);
|
||||
|
||||
int NbFaces() throw(SALOME_Exception);
|
||||
|
||||
int NbTriangles() throw(SALOME_Exception);
|
||||
|
||||
int NbQuadrangles() throw(SALOME_Exception);
|
||||
|
||||
int NbPolygons() throw(SALOME_Exception);
|
||||
|
||||
int NbVolumes() throw(SALOME_Exception);
|
||||
|
||||
int NbTetras() throw(SALOME_Exception);
|
||||
|
||||
int NbHexas() throw(SALOME_Exception);
|
||||
|
||||
int NbPyramids() throw(SALOME_Exception);
|
||||
|
||||
int NbPrisms() throw(SALOME_Exception);
|
||||
|
||||
int NbPolyhedrons() throw(SALOME_Exception);
|
||||
|
||||
int NbSubMesh() throw(SALOME_Exception);
|
||||
|
||||
int NbGroup() const { return _mapGroup.size(); }
|
||||
|
||||
SMESH_Group* AddGroup (const SMDSAbs_ElementType theType,
|
||||
const char* theName,
|
||||
int& theId,
|
||||
const TopoDS_Shape& theShape=TopoDS_Shape());
|
||||
|
||||
SMESH_Group* GetGroup (const int theGroupID);
|
||||
|
||||
list<int> GetGroupIds();
|
||||
|
||||
void RemoveGroup (const int theGroupID);
|
||||
|
||||
// Propagation hypothesis management
|
||||
|
||||
const SMESH_Hypothesis* IsLocal1DHypothesis (const TopoDS_Shape& theEdge);
|
||||
// Returns a local 1D hypothesis used for theEdge.
|
||||
|
||||
bool IsPropagationHypothesis (const TopoDS_Shape& theEdge);
|
||||
// Returns true, if a local Propagation hypothesis is set directly on <theEdge>
|
||||
|
||||
bool IsPropagatedHypothesis (const TopoDS_Shape& theEdge,
|
||||
TopoDS_Shape& theMainEdge);
|
||||
// Returns true, if a local 1D hypothesis is
|
||||
// propagated on <theEdge> from some other edge.
|
||||
// Returns through <theMainEdge> the edge, from
|
||||
// which the 1D hypothesis is propagated on <theEdge>
|
||||
|
||||
bool IsReversedInChain (const TopoDS_Shape& theEdge,
|
||||
const TopoDS_Shape& theMainEdge);
|
||||
// Returns true if theEdge should be reversed to be
|
||||
// co-directed with theMainEdge
|
||||
|
||||
bool RebuildPropagationChains();
|
||||
bool RemovePropagationChain (const TopoDS_Shape& theMainEdge);
|
||||
bool BuildPropagationChain (const TopoDS_Shape& theMainEdge);
|
||||
|
||||
SMDSAbs_ElementType GetElementType( const int id, const bool iselem );
|
||||
|
||||
//
|
||||
|
||||
ostream& Dump(ostream & save);
|
||||
|
||||
private:
|
||||
// Propagation hypothesis management
|
||||
void CleanMeshOnPropagationChain(const TopoDS_Shape& theMainEdge);
|
||||
//
|
||||
|
||||
private:
|
||||
int _id; // id given by creator (unique within the creator instance)
|
||||
int _studyId;
|
||||
int _idDoc; // id given by SMESHDS_Document
|
||||
int _groupId; // id generator for group objects
|
||||
bool _isShapeToMesh;// set to true when a shape is given (only once)
|
||||
list <SMESH_subMesh *> _subMeshesUsingHypothesisList;
|
||||
SMESHDS_Document * _myDocument;
|
||||
SMESHDS_Mesh * _myMeshDS;
|
||||
map <int, SMESH_subMesh *> _mapSubMesh;
|
||||
map <int, SMESH_Group *> _mapGroup;
|
||||
SMESH_Gen * _gen;
|
||||
|
||||
TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors;
|
||||
|
||||
IndexedMapOfChain _mapPropagationChains; // Propagation hypothesis management
|
||||
};
|
||||
|
||||
#endif
|
1133
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
Normal file
1133
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
Normal file
File diff suppressed because it is too large
Load Diff
37
src/SMESHGUI/SMESHGUI_FilterUtils.cxx
Normal file
37
src/SMESHGUI/SMESHGUI_FilterUtils.cxx
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
|
||||
|
||||
#include "SMESHGUI_FilterUtils.h"
|
||||
|
||||
#include "SMESHGUI.h"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
namespace SMESH
|
||||
{
|
||||
SMESH::FilterManager_var& GetFilterManager()
|
||||
{
|
||||
static SMESH::FilterManager_var aFilterManager;
|
||||
if (CORBA::is_nil(aFilterManager)) {
|
||||
aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
|
||||
}
|
||||
return aFilterManager;
|
||||
}
|
||||
}
|
34
src/SMESHGUI/SMESHGUI_FilterUtils.h
Normal file
34
src/SMESHGUI/SMESHGUI_FilterUtils.h
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
|
||||
#ifndef SMESHGUI_FilterUtils_HeaderFile
|
||||
#define SMESHGUI_FilterUtils_HeaderFile
|
||||
|
||||
#include "SALOMEconfig.h"
|
||||
#include CORBA_SERVER_HEADER(SMESH_Filter)
|
||||
|
||||
|
||||
namespace SMESH{
|
||||
|
||||
SMESH::FilterManager_var& GetFilterManager();
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
90
src/SMESH_I/SMESH_MEDFamily_i.hxx
Normal file
90
src/SMESH_I/SMESH_MEDFamily_i.hxx
Normal file
@ -0,0 +1,90 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MEDFamily_i.hxx
|
||||
// Module : SMESH
|
||||
|
||||
#ifndef SMESH_MED_FAMILY_I_HXX_
|
||||
#define SMESH_MED_FAMILY_I_HXX_
|
||||
|
||||
#include "SMESH_MEDSupport_i.hxx"
|
||||
|
||||
#include<string>
|
||||
|
||||
class SMESH_MEDFamily_i:
|
||||
public virtual POA_SALOME_MED::FAMILY,
|
||||
public virtual SMESH_MEDSupport_i
|
||||
{
|
||||
protected :
|
||||
SMESH_MEDFamily_i();
|
||||
~SMESH_MEDFamily_i();
|
||||
|
||||
::SMESH_subMesh_i* _subMesh_i;
|
||||
|
||||
// Values
|
||||
int _identifier;
|
||||
int _numberOfAttribute;
|
||||
int * _attributeIdentifier;
|
||||
int * _attributeValue;
|
||||
string * _attributeDescription;
|
||||
int _numberOfGroup ;
|
||||
string * _groupName ;
|
||||
|
||||
|
||||
public :
|
||||
|
||||
// Constructors and associated internal methods
|
||||
SMESH_MEDFamily_i(int identifier, SMESH_subMesh_i* sm,
|
||||
string name, string description, SALOME_MED::medEntityMesh entity );
|
||||
SMESH_MEDFamily_i(const SMESH_MEDFamily_i & f);
|
||||
|
||||
// IDL Methods
|
||||
void setProtocol(SALOME::TypeOfCommunication typ) {}
|
||||
void release() {}
|
||||
SALOME::SenderInt_ptr getSenderForNumber(long int) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForNumberIndex() {return SALOME::SenderInt::_nil();}
|
||||
|
||||
CORBA::Long getIdentifier()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
CORBA::Long getNumberOfAttributes()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
SALOME_MED::long_array* getAttributesIdentifiers()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
CORBA::Long getAttributeIdentifier(CORBA::Long i)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
SALOME_MED::long_array* getAttributesValues()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
CORBA::Long getAttributeValue(CORBA::Long i)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
SALOME_MED::string_array* getAttributesDescriptions()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
char* getAttributeDescription( CORBA::Long i)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
CORBA::Long getNumberOfGroups()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
char * getGroupName( CORBA::Long i)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
SALOME_MED::string_array* getGroupsNames()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
};
|
||||
#endif /* MED_FAMILY_I_HXX_ */
|
111
src/SMESH_I/SMESH_MEDSupport_i.hxx
Normal file
111
src/SMESH_I/SMESH_MEDSupport_i.hxx
Normal file
@ -0,0 +1,111 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MEDSupport_i.hxx
|
||||
// Module : SMESH
|
||||
|
||||
#ifndef _MED_SMESH_MEDSUPPORT_I_HXX_
|
||||
#define _MED_SMESH_MEDSUPPORT_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(MED)
|
||||
#include <string>
|
||||
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "SMESHDS_SubMesh.hxx"
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
|
||||
#include "SMESH_MEDSupport_i.hxx"
|
||||
#include "SALOME_GenericObj_i.hh"
|
||||
class SMESH_subMesh_i;
|
||||
|
||||
class SMESH_MEDSupport_i:
|
||||
public virtual POA_SALOME_MED::SUPPORT, public virtual SALOME::GenericObj_i
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors and associated internal methods
|
||||
SMESH_MEDSupport_i(SMESH_subMesh_i * sm,
|
||||
string name, string description, SALOME_MED::medEntityMesh entity);
|
||||
SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
|
||||
|
||||
// IDL Methods
|
||||
char *getName() throw(SALOME::SALOME_Exception);
|
||||
char *getDescription() throw(SALOME::SALOME_Exception);
|
||||
SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception);
|
||||
CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
|
||||
SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
|
||||
CORBA::Long
|
||||
getNumberOfElements(SALOME_MED::medGeometryElement geomElement)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfTypes() throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getNumber(SALOME_MED::medGeometryElement geomElement)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array * getNumberIndex()
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long
|
||||
getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array* getNumbersOfGaussPoint()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::medGeometryElement_array *getTypes()
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
void getBoundaryElements() throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::SUPPORT::supportInfos * getSupportGlobal()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
void createSeq() throw(SALOME::SALOME_Exception);
|
||||
|
||||
public: //public field
|
||||
const SMESHDS_SubMesh * _subMeshDS;
|
||||
::SMESH_subMesh_i * _subMesh_i;
|
||||
|
||||
SMESHDS_Mesh * _meshDS;
|
||||
string _name;
|
||||
string _description;
|
||||
bool _isOnAllElements;
|
||||
bool _seqNumber;
|
||||
int _seqLength;
|
||||
|
||||
SALOME_MED::medEntityMesh _entity;
|
||||
SALOME_MED::medGeometryElement * _geometricType;
|
||||
int _numberOfGeometricType;
|
||||
|
||||
protected:
|
||||
SMESH_MEDSupport_i();
|
||||
~SMESH_MEDSupport_i();
|
||||
};
|
||||
|
||||
#endif /* _MED_MEDSUPPORT_I_HXX_ */
|
Loading…
Reference in New Issue
Block a user