#include "SALOME_GenericObj.idl"\r
#include "SMESH_Mesh.idl"\r
\r
-module SMESH{\r
\r
- interface Functor: SALOME::GenericObj{\r
- void SetMesh(in SMESH_Mesh theMesh);\r
+module GEOM\r
+{\r
+ interface GEOM_Object;\r
+};\r
+\r
+\r
+module SMESH\r
+{\r
+\r
+ /*!\r
+ * Enumeration of functor types\r
+ */\r
+ enum FunctorType\r
+ {\r
+ FT_AspectRatio,\r
+ FT_Warping, \r
+ FT_MinimumAngle,\r
+ FT_Taper, \r
+ FT_Skew, \r
+ FT_Area, \r
+ FT_FreeBorders,\r
+ FT_FreeEdges,\r
+ FT_MultiConnection,\r
+ FT_Length,\r
+ FT_BelongToGeom,\r
+ FT_BelongToPlane,\r
+ FT_BelongToCylinder,\r
+ FT_RangeOfIds,\r
+ FT_LessThan,\r
+ FT_MoreThan,\r
+ FT_EqualTo,\r
+ FT_LogicalNOT,\r
+ FT_LogicalAND,\r
+ FT_LogicalOR,\r
+ FT_Undefined\r
};\r
\r
- interface NumericalFunctor: Functor{\r
- double GetValue(in long theElementId);\r
+ /*!\r
+ * Base interface for all functors ( i.e. numerical functors and predicates )\r
+ */\r
+ interface Functor: SALOME::GenericObj\r
+ {\r
+ void SetMesh( in SMESH_Mesh theMesh );\r
+ FunctorType GetFunctorType();\r
+ ElementType GetElementType();\r
};\r
\r
- interface MinimumAngle: NumericalFunctor{};\r
- interface AspectRatio: NumericalFunctor{};\r
- interface Warping: NumericalFunctor{};\r
- interface Taper: NumericalFunctor{};\r
- interface Skew: NumericalFunctor{};\r
- interface Area: NumericalFunctor{};\r
- interface Length: NumericalFunctor{};\r
- interface MultiConnection: NumericalFunctor{};\r
\r
- interface Predicate: Functor{\r
- boolean IsSatisfy(in long thEntityId);\r
+\r
+ /*!\r
+ * Numerical functors are intended for calculating value by Id of mesh entity\r
+ */\r
+ interface NumericalFunctor: Functor\r
+ {\r
+ double GetValue( in long theElementId );\r
+\r
+ /*!\r
+ * Set precision for calculation. It is a position after point which is\r
+ * used to functor value after calculation.\r
+ */\r
+ void SetPrecision( in long thePrecision );\r
+ long GetPrecision();\r
+ };\r
+ interface MinimumAngle : NumericalFunctor{};\r
+ interface AspectRatio : NumericalFunctor{};\r
+ interface Warping : NumericalFunctor{};\r
+ interface Taper : NumericalFunctor{};\r
+ interface Skew : NumericalFunctor{};\r
+ interface Area : NumericalFunctor{};\r
+ interface Length : NumericalFunctor{};\r
+ interface MultiConnection : NumericalFunctor{};\r
+\r
+ /*!\r
+ * Predicates are intended for verification of criteria,\r
+ * must return bool value by mesh id\r
+ */\r
+ interface Predicate: Functor\r
+ {\r
+ boolean IsSatisfy( in long thEntityId );\r
+ };\r
+\r
+ /*!\r
+ * Logical functor (predicate) "Belong To Geometry".\r
+ * Verify whether mesh element or node belong to pointed Geom Object\r
+ */\r
+ interface BelongToGeom: Predicate\r
+ {\r
+ void SetGeom( in GEOM::GEOM_Object theGeom );\r
+ void SetElementType( in ElementType theType );\r
+\r
+ void SetShapeName( in string theName );\r
+ string GetShapeName(); \r
+ };\r
+\r
+ /*!\r
+ * Logical functor (predicate) "Belong To Surface".\r
+ * Base interface for "belong to plane" and "belong to cylinder interfaces"\r
+ */\r
+ interface BelongToSurface: Predicate\r
+ {\r
+ void SetTolerance( in double theToler );\r
+ double GetTolerance();\r
+ void SetShapeName( in string theName, in ElementType theType );\r
+ string GetShapeName();\r
};\r
\r
+\r
+ /*!\r
+ * Logical functor (predicate) "Belong To Plane".\r
+ * Verify whether mesh element lie in pointed Geom planar object\r
+ */\r
+ interface BelongToPlane: BelongToSurface\r
+ {\r
+ void SetPlane( in GEOM::GEOM_Object theGeom, in ElementType theType );\r
+ };\r
+\r
+ /*!\r
+ * Logical functor (predicate) "Belong To Culinder".\r
+ * Verify whether mesh element lie in pointed Geom cylindrical object\r
+ */\r
+ interface BelongToCylinder: BelongToSurface\r
+ {\r
+ void SetCylinder( in GEOM::GEOM_Object theGeom, in ElementType theType );\r
+ };\r
+\r
+ /*!\r
+ * Logical functor (predicate) "Free borders".\r
+ * Verify whether 1D mesh element is free ( i.e. connected to one face only )\r
+ */\r
interface FreeBorders: Predicate{};\r
\r
- interface Comparator: Predicate{\r
- void SetMargin(in double theValue);\r
- void SetNumFunctor(in NumericalFunctor theFunct);\r
+ /*!\r
+ * Logical functor (predicate) "Free edges".\r
+ * Verify whether 2D mesh element has free edges( i.e. edges connected to one face only )\r
+ */\r
+ interface FreeEdges: Predicate\r
+\r
+ {\r
+ struct Border\r
+ {\r
+ long myElemId;\r
+ long myPnt1, myPnt2;\r
+ };\r
+ typedef sequence<Border> Borders;\r
+ Borders GetBorders();\r
};\r
\r
+\r
+ /*!\r
+ * Abstract logical functor (predicate) "RangeOfIds".\r
+ * Verify whether an Entity Id belongs to defined sequence of id's\r
+ */\r
+ interface RangeOfIds: Predicate\r
+ {\r
+ void SetRange( in long_array theIds );\r
+ boolean SetRangeStr( in string theRange );\r
+ string GetRangeStr();\r
+\r
+ void SetElementType( in ElementType theType );\r
+ };\r
+\r
+ /*!\r
+ * Comparator. Predicate for compare value calculated\r
+ * by numerical functor with threshold value\r
+ */\r
+ interface Comparator: Predicate\r
+ {\r
+ void SetMargin( in double theValue );\r
+ void SetNumFunctor( in NumericalFunctor theFunct );\r
+ double GetMargin();\r
+ };\r
interface LessThan: Comparator{};\r
interface MoreThan: Comparator{};\r
- interface EqualTo: Comparator{\r
- void SetTolerance(in double theTolerance );\r
+ interface EqualTo : Comparator\r
+ {\r
+ void SetTolerance( in double theToler );\r
+ double GetTolerance();\r
};\r
\r
+ /*!\r
+ * Logical predicates are intended for compose predicates using boolean operations\r
+ */\r
interface Logical: Predicate{};\r
\r
- interface LogicalNOT: Logical{\r
+ interface LogicalNOT: Logical\r
+ {\r
void SetPredicate(in Predicate thePredicate);\r
};\r
\r
- interface LogicalBinary: Logical{\r
- void SetPredicate1(in Predicate thePredicate);\r
- void SetPredicate2(in Predicate thePredicate);\r
+ interface LogicalBinary: Logical\r
+{\r
+ void SetPredicate1( in Predicate thePredicate );\r
+ void SetPredicate2( in Predicate thePredicate );\r
};\r
- \r
+\r
interface LogicalAND: LogicalBinary{};\r
- interface LogicalOR: LogicalBinary{};\r
- interface Filter: SALOME::GenericObj{\r
- void SetPredicate( in Predicate thePredicate );\r
- long_array GetElementsId( in SMESH_Mesh theMesh );\r
- };\r
-\r
- interface FilterManager: SALOME::GenericObj{\r
- MinimumAngle CreateMinimumAngle();\r
- AspectRatio CreateAspectRatio();\r
- Warping CreateWarping();\r
- Taper CreateTaper();\r
- Skew CreateSkew();\r
- Area CreateArea();\r
- Length CreateLength();\r
- MultiConnection CreateMultiConnection();\r
-\r
- FreeBorders CreateFreeBorders();\r
-\r
- LessThan CreateLessThan();\r
- MoreThan CreateMoreThan();\r
- EqualTo CreateEqualTo();\r
- \r
- LogicalNOT CreateLogicalNOT();\r
- LogicalAND CreateLogicalAND();\r
- LogicalOR CreateLogicalOR();\r
- Filter CreateFilter();\r
- };\r
- \r
+ interface LogicalOR : LogicalBinary{};\r
+\r
+ /*!\r
+ * Filter\r
+ */\r
+ interface Filter: SALOME::GenericObj\r
+ {\r
+ /*!\r
+ * Structure containing information about one criterion\r
+ * Type - FT_Taper, FT_Skew ...\r
+ * Compare - FT_LessThan, FT_MoreThan, FT_EqualTo\r
+ * Threshold - threshold value\r
+ * UnaryOp - unary logical operation: FT_LogicalNOT or FT_Undefined\r
+ * BinaryOp - binary logical operation FT_LogicalAND, FT_LogicalOR or\r
+ * (FT_Undefined must be for the last criterion)\r
+ * ThresholdStr - Threshold value defined as string. Used for:\r
+ * 1. Diaposon of identifiers. Example: "1,2,3,5-10,12,27-29"\r
+ * 2. BelongToGeom predicate for storing name of shape\r
+ * Tolerance - Tolerance is used for comparators (EqualTo comparision) and for\r
+ * "Belong to plane" and "Belong to cylinder" predicates\r
+ * TypeOfElement - type of element SMESH::NODE, SMESH::FACE (used by BelongToGeom predicate only)\r
+ * Precision - Precision of numerical functors\r
+ */\r
+ struct Criterion\r
+ {\r
+ long Type;\r
+ long Compare;\r
+ double Threshold;\r
+ string ThresholdStr;\r
+ long UnaryOp;\r
+ long BinaryOp;\r
+ double Tolerance;\r
+ ElementType TypeOfElement;\r
+ long Precision;\r
+ };\r
+\r
+ typedef sequence<Criterion> Criteria;\r
+\r
+ void SetPredicate( in Predicate thePredicate );\r
+ long_array GetElementsId( in SMESH_Mesh theMesh );\r
+ ElementType GetElementType();\r
+ Predicate GetPredicate();\r
+\r
+ boolean GetCriteria( out Criteria theCriteria );\r
+ boolean SetCriteria( in Criteria theCriteria );\r
+ };\r
+\r
+\r
+ /*!\r
+ * Interface for working with library of filters\r
+ */\r
+ interface FilterLibrary : SALOME::GenericObj\r
+ {\r
+ /*!\r
+ * Copy filter from library by name (new filter is created)\r
+ */\r
+ Filter Copy( in string theFilterName );\r
+\r
+ /*!\r
+ * Methods for editing library\r
+ */\r
+ boolean Add ( in string theFilterName, in Filter theFilter );\r
+ boolean AddEmpty( in string theFilterName, in ElementType theType ); // add empty filter\r
+ boolean Delete ( in string theFilterName );\r
+ boolean Replace ( in string theFilterName, in string theNewName, in Filter theFilter );\r
+\r
+ /*!\r
+ * Save library on disk\r
+ */\r
+ boolean Save();\r
+ boolean SaveAs( in string aFileName );\r
+\r
+ /*!\r
+ * Query methods\r
+ */\r
+ boolean IsPresent( in string aFilterName );\r
+ long NbFilters( in ElementType aType );\r
+ string_array GetNames( in ElementType aType );\r
+ string_array GetAllNames();\r
+ void SetFileName( in string aFilterName );\r
+ string GetFileName();\r
+ };\r
+\r
+\r
+ /*!\r
+ * Interface of Filter manager\r
+ */\r
+ interface FilterManager: SALOME::GenericObj\r
+ {\r
+ /*!\r
+ * Create numerical functors\r
+ */\r
+ MinimumAngle CreateMinimumAngle();\r
+ AspectRatio CreateAspectRatio();\r
+ Warping CreateWarping();\r
+ Taper CreateTaper();\r
+ Skew CreateSkew();\r
+ Area CreateArea();\r
+ Length CreateLength();\r
+ MultiConnection CreateMultiConnection();\r
+\r
+ /*!\r
+ * Create logical functors ( predicates )\r
+ */\r
+ BelongToGeom CreateBelongToGeom();\r
+ BelongToPlane CreateBelongToPlane();\r
+ BelongToCylinder CreateBelongToCylinder();\r
+\r
+ FreeBorders CreateFreeBorders();\r
+ FreeEdges CreateFreeEdges();\r
+\r
+ RangeOfIds CreateRangeOfIds();\r
+\r
+ /*!\r
+ * Create comparators ( predicates )\r
+ */\r
+ LessThan CreateLessThan();\r
+ MoreThan CreateMoreThan();\r
+ EqualTo CreateEqualTo();\r
+\r
+ /*!\r
+ * Create boolean operations ( predicates )\r
+ */\r
+ LogicalNOT CreateLogicalNOT();\r
+ LogicalAND CreateLogicalAND();\r
+ LogicalOR CreateLogicalOR();\r
+\r
+ /*!\r
+ * Create filter\r
+ */\r
+ Filter CreateFilter();\r
+\r
+ /*!\r
+ * Load filter library. If libary does not exist it is created\r
+ */\r
+ FilterLibrary LoadLibrary( in string aFileName );\r
+\r
+ /*!\r
+ * Create new library\r
+ */\r
+ FilterLibrary CreateLibrary();\r
+\r
+ /*!\r
+ * Delete library\r
+ */\r
+ boolean DeleteLibrary( in string aFileName );\r
+ };\r
};\r
\r
+\r
#endif\r