00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _SMESH_FILTER_IDL_
00027 #define _SMESH_FILTER_IDL_
00028
00029 #include "SALOME_Exception.idl"
00030 #include "SALOME_GenericObj.idl"
00031 #include "GEOM_Gen.idl"
00032 #include "SMESH_Mesh.idl"
00033
00034 module SMESH
00035 {
00036
00040 enum FunctorType
00041 {
00042 FT_AspectRatio,
00043 FT_AspectRatio3D,
00044 FT_Warping,
00045 FT_MinimumAngle,
00046 FT_Taper,
00047 FT_Skew,
00048 FT_Area,
00049 FT_Volume3D,
00050 FT_MaxElementLength2D,
00051 FT_MaxElementLength3D,
00052 FT_FreeBorders,
00053 FT_FreeEdges,
00054 FT_FreeNodes,
00055 FT_FreeFaces,
00056 FT_MultiConnection,
00057 FT_MultiConnection2D,
00058 FT_Length,
00059 FT_Length2D,
00060 FT_BelongToGeom,
00061 FT_BelongToPlane,
00062 FT_BelongToCylinder,
00063 FT_BelongToGenSurface,
00064 FT_LyingOnGeom,
00065 FT_RangeOfIds,
00066 FT_BadOrientedVolume,
00067 FT_BareBorderVolume,
00068 FT_BareBorderFace,
00069 FT_OverConstrainedVolume,
00070 FT_OverConstrainedFace,
00071 FT_LinearOrQuadratic,
00072 FT_GroupColor,
00073 FT_ElemGeomType,
00074 FT_CoplanarFaces,
00075 FT_LessThan,
00076 FT_MoreThan,
00077 FT_EqualTo,
00078 FT_LogicalNOT,
00079 FT_LogicalAND,
00080 FT_LogicalOR,
00081 FT_Undefined
00082 };
00083
00087 struct HistogramRectangle
00088 {
00089 long nbEvents;
00090 double min;
00091 double max;
00092 };
00093 typedef sequence<HistogramRectangle> Histogram;
00094
00095
00099 interface Functor: SALOME::GenericObj
00100 {
00101 void SetMesh( in SMESH_Mesh theMesh );
00102 FunctorType GetFunctorType();
00103 ElementType GetElementType();
00104 };
00105
00109 interface NumericalFunctor: Functor
00110 {
00111 double GetValue( in long theElementId );
00112
00113 Histogram GetHistogram( in short nbIntervals );
00114
00119 void SetPrecision( in long thePrecision );
00120 long GetPrecision();
00121 };
00122 interface MinimumAngle : NumericalFunctor{};
00123 interface AspectRatio : NumericalFunctor{};
00124 interface AspectRatio3D : NumericalFunctor{};
00125 interface Warping : NumericalFunctor{};
00126 interface Taper : NumericalFunctor{};
00127 interface Skew : NumericalFunctor{};
00128 interface Area : NumericalFunctor{};
00129 interface Volume3D : NumericalFunctor{};
00130 interface MaxElementLength2D : NumericalFunctor{};
00131 interface MaxElementLength3D : NumericalFunctor{};
00132 interface Length : NumericalFunctor{};
00133 interface Length2D : NumericalFunctor
00134 {
00135 struct Value
00136 {
00137 double myLength;
00138 long myPnt1, myPnt2;
00139 };
00140 typedef sequence<Value> Values;
00141 Values GetValues();
00142 };
00143 interface MultiConnection : NumericalFunctor{};
00144 interface MultiConnection2D : NumericalFunctor
00145 {
00146 struct Value
00147 {
00148 long myNbConnects;
00149 long myPnt1, myPnt2;
00150 };
00151
00152 typedef sequence<Value> Values;
00153 Values GetValues();
00154 };
00155
00156
00161 interface Predicate: Functor
00162 {
00163 boolean IsSatisfy( in long thEntityId );
00164 };
00165
00171 interface BadOrientedVolume: Predicate {};
00172
00177 interface BareBorderVolume: Predicate {};
00183 interface BareBorderFace: Predicate {};
00184
00189 interface OverConstrainedVolume: Predicate {};
00194 interface OverConstrainedFace: Predicate {};
00195
00200 interface BelongToGeom: Predicate
00201 {
00202 void SetGeom( in GEOM::GEOM_Object theGeom );
00203 void SetElementType( in ElementType theType );
00204
00207 void SetTolerance( in double theToler );
00208 double GetTolerance();
00209
00210 void SetShapeName( in string theName );
00211 void SetShape( in string theID, in string theName );
00212 string GetShapeName();
00213 string GetShapeID();
00214 };
00215
00221 interface BelongToSurface: Predicate
00222 {
00223 void SetTolerance( in double theToler );
00224 double GetTolerance();
00225 void SetShapeName( in string theName, in ElementType theType );
00226 void SetShape( in string theID, in string theName, in ElementType theType );
00227 string GetShapeName();
00228 string GetShapeID();
00233 void SetUseBoundaries( in boolean theUseBndRestrictions );
00234 boolean GetUseBoundaries();
00235 };
00236
00241 interface BelongToPlane: BelongToSurface
00242 {
00243 void SetPlane( in GEOM::GEOM_Object theGeom, in ElementType theType );
00244 };
00245
00250 interface BelongToCylinder: BelongToSurface
00251 {
00252 void SetCylinder( in GEOM::GEOM_Object theGeom, in ElementType theType );
00253 };
00254
00259 interface BelongToGenSurface: BelongToSurface
00260 {
00261 void SetSurface( in GEOM::GEOM_Object theGeom, in ElementType theType );
00262 };
00263
00268 interface LyingOnGeom: Predicate
00269 {
00270 void SetGeom( in GEOM::GEOM_Object theGeom );
00271 void SetElementType( in ElementType theType );
00272
00275 void SetTolerance( in double theToler );
00276 double GetTolerance();
00277
00278 void SetShapeName( in string theName );
00279 void SetShape( in string theID, in string theName );
00280 string GetShapeName();
00281 string GetShapeID();
00282 };
00283
00288 interface FreeBorders: Predicate{};
00289
00294 interface FreeEdges: Predicate
00295 {
00296 struct Border
00297 {
00298 long myElemId;
00299 long myPnt1, myPnt2;
00300 };
00301 typedef sequence<Border> Borders;
00302 Borders GetBorders();
00303 };
00304
00309 interface FreeNodes: Predicate{};
00310
00315 interface FreeFaces: Predicate{};
00316
00321 interface RangeOfIds: Predicate
00322 {
00323 void SetRange( in long_array theIds );
00324 boolean SetRangeStr( in string theRange );
00325 string GetRangeStr();
00326
00327 void SetElementType( in ElementType theType );
00328 };
00329
00334 interface Comparator: Predicate
00335 {
00336 void SetMargin( in double theValue );
00337 void SetNumFunctor( in NumericalFunctor theFunct );
00338 double GetMargin();
00339 };
00340 interface LessThan: Comparator{};
00341 interface MoreThan: Comparator{};
00342 interface EqualTo : Comparator
00343 {
00344 void SetTolerance( in double theToler );
00345 double GetTolerance();
00346 };
00347
00351 interface Logical: Predicate{};
00352
00353 interface LogicalNOT: Logical
00354 {
00355 void SetPredicate(in Predicate thePredicate);
00356 };
00357
00358 interface LogicalBinary: Logical
00359 {
00360 void SetPredicate1( in Predicate thePredicate );
00361 void SetPredicate2( in Predicate thePredicate );
00362 };
00363
00364 interface LogicalAND: LogicalBinary{};
00365 interface LogicalOR : LogicalBinary{};
00366
00371 interface LinearOrQuadratic: Predicate {
00372 void SetElementType( in ElementType theType );
00373 };
00374
00379 interface GroupColor : Predicate{
00380 void SetElementType( in ElementType theType );
00381 void SetColorStr( in string theColor );
00382 string GetColorStr();
00383 };
00384
00389 interface ElemGeomType : Predicate{
00390 void SetElementType ( in ElementType theType );
00391 void SetGeometryType( in GeometryType theType );
00392 };
00393
00399 interface CoplanarFaces : Predicate{
00400 void SetFace ( in long theFaceID );
00401 void SetTolerance( in double theToler );
00402 };
00403
00407 interface Filter: SALOME::GenericObj, SMESH_IDSource
00408 {
00428 struct Criterion
00429 {
00430 long Type;
00431 long Compare;
00432 double Threshold;
00433 string ThresholdStr;
00434 string ThresholdID;
00435 long UnaryOp;
00436 long BinaryOp;
00437 double Tolerance;
00438 ElementType TypeOfElement;
00439 long Precision;
00440 };
00441
00442 typedef sequence<Criterion> Criteria;
00443
00444 void SetPredicate( in Predicate thePredicate );
00445 void SetMesh( in SMESH_Mesh theMesh );
00446
00447 long_array GetElementsId( in SMESH_Mesh theMesh );
00448 ElementType GetElementType();
00449 Predicate GetPredicate();
00450
00451 boolean GetCriteria( out Criteria theCriteria );
00452 boolean SetCriteria( in Criteria theCriteria );
00453 };
00454
00455
00459 interface FilterLibrary : SALOME::GenericObj
00460 {
00464 Filter Copy( in string theFilterName );
00465
00469 boolean Add ( in string theFilterName, in Filter theFilter );
00470 boolean AddEmpty( in string theFilterName, in ElementType theType );
00471 boolean Delete ( in string theFilterName );
00472 boolean Replace ( in string theFilterName, in string theNewName, in Filter theFilter );
00473
00477 boolean Save();
00478 boolean SaveAs( in string aFileName );
00479
00483 boolean IsPresent( in string aFilterName );
00484 long NbFilters( in ElementType aType );
00485 string_array GetNames( in ElementType aType );
00486 string_array GetAllNames();
00487 void SetFileName( in string aFilterName );
00488 string GetFileName();
00489 };
00490
00491
00495 interface FilterManager: SALOME::GenericObj
00496 {
00500 MinimumAngle CreateMinimumAngle();
00501 AspectRatio CreateAspectRatio();
00502 AspectRatio3D CreateAspectRatio3D();
00503 Warping CreateWarping();
00504 Taper CreateTaper();
00505 Skew CreateSkew();
00506 Area CreateArea();
00507 Volume3D CreateVolume3D();
00508 MaxElementLength2D CreateMaxElementLength2D();
00509 MaxElementLength3D CreateMaxElementLength3D();
00510 Length CreateLength();
00511 Length2D CreateLength2D();
00512 MultiConnection CreateMultiConnection();
00513 MultiConnection2D CreateMultiConnection2D();
00514
00518 BelongToGeom CreateBelongToGeom();
00519 BelongToPlane CreateBelongToPlane();
00520 BelongToCylinder CreateBelongToCylinder();
00521 BelongToGenSurface CreateBelongToGenSurface();
00522
00523 LyingOnGeom CreateLyingOnGeom();
00524
00525 FreeBorders CreateFreeBorders();
00526 FreeEdges CreateFreeEdges();
00527 FreeNodes CreateFreeNodes();
00528 FreeFaces CreateFreeFaces();
00529
00530 RangeOfIds CreateRangeOfIds();
00531
00532 BadOrientedVolume CreateBadOrientedVolume();
00533 BareBorderVolume CreateBareBorderVolume();
00534 BareBorderFace CreateBareBorderFace();
00535 OverConstrainedVolume CreateOverConstrainedVolume();
00536 OverConstrainedFace CreateOverConstrainedFace();
00537 LinearOrQuadratic CreateLinearOrQuadratic();
00538
00539 GroupColor CreateGroupColor();
00540 ElemGeomType CreateElemGeomType();
00541 CoplanarFaces CreateCoplanarFaces();
00542
00546 LessThan CreateLessThan();
00547 MoreThan CreateMoreThan();
00548 EqualTo CreateEqualTo();
00549
00553 LogicalNOT CreateLogicalNOT();
00554 LogicalAND CreateLogicalAND();
00555 LogicalOR CreateLogicalOR();
00556
00560 Filter CreateFilter();
00561
00565 FilterLibrary LoadLibrary( in string aFileName );
00566
00570 FilterLibrary CreateLibrary();
00571
00575 boolean DeleteLibrary( in string aFileName );
00576 };
00577 };
00578
00579
00580 #endif