Back to index

salome-smesh  6.5.0
SMESH_Pattern.idl
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // File    : SMESH_Pattern.idl
00024 // Created : Mon Aug  2 10:48:36 2004
00025 // Author  : Edward AGAPOV (eap)
00026 //  $Header:
00027 //
00028 #ifndef _SMESH_PATTERN_IDL_
00029 #define _SMESH_PATTERN_IDL_
00030 
00031 #include "SMESH_Mesh.idl"
00032 
00033 module SMESH
00034 {
00035   
00036   typedef sequence<SMESH::PointStruct> point_array;
00037 
00041   interface SMESH_Pattern {
00042 
00046     boolean LoadFromFile(in string theFileContents);
00047 
00053     boolean LoadFromFace(in SMESH_Mesh        theMesh,
00054                          in GEOM::GEOM_Object theFace,
00055                          in boolean           theProject);
00056 
00060     boolean LoadFrom3DBlock(in SMESH_Mesh        theMesh,
00061                             in GEOM::GEOM_Object theBlock);
00062 
00069     point_array  ApplyToFace(in GEOM::GEOM_Object theFace,
00070                              in GEOM::GEOM_Object theVertexOnKeyPoint1,
00071                              in boolean           theReverse);
00072 
00079     point_array  ApplyTo3DBlock(in GEOM::GEOM_Object theBlock,
00080                                 in GEOM::GEOM_Object theVertex000,
00081                                 in GEOM::GEOM_Object theVertex001);
00082 
00088     point_array  ApplyToMeshFaces(in SMESH_Mesh theMesh,
00089                                   in long_array theFacesIDs,
00090                                   in long       theNodeIndexOnKeyPoint1,
00091                                   in boolean    theReverse);
00092 
00100     point_array  ApplyToHexahedrons(in SMESH_Mesh theMesh,
00101                                     in long_array theVolumesIDs,
00102                                     in long       theNode000Index,
00103                                     in long       theNode001Index);
00104 
00113     boolean MakeMesh (in SMESH_Mesh theMesh,
00114                     in boolean    CreatePolygons,
00115                     in boolean    CreatePolyedrs);
00116 
00120     string GetString();
00121 
00125     enum ErrorCode {
00126       ERR_OK,
00127       // Load(file)
00128       ERR_READ_NB_POINTS, // couldn't read nb of points
00129       ERR_READ_POINT_COORDS, // invalid nb of point coordinates
00130       ERR_READ_TOO_FEW_POINTS,  // too few points in a pattern
00131       ERR_READ_3D_COORD,  // coordinate of 3D point out of [0,1] range
00132       ERR_READ_NO_KEYPOINT, // no key-points in 2D pattern
00133       ERR_READ_BAD_INDEX, // invalid point index
00134       ERR_READ_ELEM_POINTS, // invalid nb of points in element
00135       ERR_READ_NO_ELEMS, // no elements in a pattern
00136       ERR_READ_BAD_KEY_POINT, // a key-point not on a boundary
00137       // Save(file)
00138       ERR_SAVE_NOT_LOADED, // pattern was not loaded
00139       // Load(shape)
00140       ERR_LOAD_EMPTY_SUBMESH, // no elements to load
00141       // Load(face)
00142       ERR_LOADF_NARROW_FACE, // too narrow face
00143       ERR_LOADF_CLOSED_FACE, // closed face
00144       ERR_LOADF_CANT_PROJECT, // impossible to project nodes
00145       // Load(volume)
00146       ERR_LOADV_BAD_SHAPE, // volume is not a brick of 6 faces
00147       ERR_LOADV_COMPUTE_PARAMS, // cant compute point parameters
00148       // Apply(shape)
00149       ERR_APPL_NOT_LOADED, // pattern was not loaded
00150       ERR_APPL_BAD_DIMENTION, // wrong shape dimention
00151       ERR_APPL_BAD_NB_VERTICES, // keypoints - vertices mismatch
00152       // Apply(face)
00153       ERR_APPLF_BAD_TOPOLOGY, // bad pattern topology
00154       ERR_APPLF_BAD_VERTEX, // first vertex not on an outer face boundary
00155       ERR_APPLF_INTERNAL_EEROR, // program error
00156       // Apply(volume)
00157       ERR_APPLV_BAD_SHAPE, // volume is not a brick of 6 faces
00158       // MakeMesh
00159       ERR_MAKEM_NOT_COMPUTED // mapping failed
00160       };
00161 
00165     ErrorCode GetErrorCode();
00166 
00170     boolean Is2D();
00171 
00175     point_array GetPoints();
00176 
00181     long_array GetKeyPoints();
00182 
00187     array_of_long_array GetElementPoints(in boolean all);
00188   };
00189 };
00190 
00191 #endif