Version: 8.3.0
Main Page
Related Pages
Packages
Data Structures
Files
File List
Globals
SALOME Mesh Module Developer
Use the SpherePadder SMESH Plugin
Todo List
Packages
Data Structures
Files
File List
idl
src
Controls
Driver
DriverCGNS
DriverDAT
DriverGMF
DriverMED
DriverSTL
DriverUNV
MEDWrapper
MEFISTO2
OBJECT
PluginUtils
SMDS
SMESH
SMESH_I
SMESH_SWIG_WITHIHM
SMESHClient
SMESHDS
SMESHFiltersSelection
SMESHGUI
SMESHUtils
SMESH_Block.cxx
SMESH_Block.hxx
SMESH_Comment.hxx
SMESH_ComputeError.hxx
SMESH_ControlPnt.cxx
SMESH_ControlPnt.hxx
SMESH_DeMerge.cxx
SMESH_File.cxx
SMESH_File.hxx
SMESH_FreeBorders.cxx
SMESH_MAT2d.cxx
SMESH_MAT2d.hxx
SMESH_MeshAlgos.cxx
SMESH_MeshAlgos.hxx
SMESH_Octree.cxx
SMESH_Octree.hxx
SMESH_OctreeNode.cxx
SMESH_OctreeNode.hxx
SMESH_Quadtree.cxx
SMESH_Quadtree.hxx
SMESH_Tree.hxx
SMESH_TryCatch.cxx
SMESH_TryCatch.hxx
SMESH_TypeDefs.hxx
SMESH_Utils.hxx
StdMeshers
StdMeshers_I
StdMeshersGUI
Tools
Globals
SMESH_ComputeError.hxx
Go to the documentation of this file.
1
// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2
//
3
// This library is free software; you can redistribute it and/or
4
// modify it under the terms of the GNU Lesser General Public
5
// License as published by the Free Software Foundation; either
6
// version 2.1 of the License, or (at your option) any later version.
7
//
8
// This library is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
// Lesser General Public License for more details.
12
//
13
// You should have received a copy of the GNU Lesser General Public
14
// License along with this library; if not, write to the Free Software
15
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
//
17
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
//
19
20
// File : SMESH_ComputeError.hxx
21
// Author : Edward AGAPOV (eap)
22
// Module : SMESH
23
//
24
#ifndef SMESH_ComputeError_HeaderFile
25
#define SMESH_ComputeError_HeaderFile
26
27
#include "
SMESH_Utils.hxx
"
28
29
#include <string>
30
#include <list>
31
#include <boost/shared_ptr.hpp>
32
33
class
SMESH_Algo
;
34
class
SMDS_MeshElement
;
35
struct
SMESH_ComputeError
;
36
37
typedef
boost::shared_ptr<SMESH_ComputeError>
SMESH_ComputeErrorPtr
;
38
39
// =============================================================
40
41
enum
SMESH_ComputeErrorName
42
{
43
// If you modify it, pls update SMESH_ComputeError::CommonName() below.
44
// Positive values are for algo specific errors
45
COMPERR_OK
= -1,
46
COMPERR_BAD_INPUT_MESH
= -2,
47
COMPERR_STD_EXCEPTION
= -3,
48
COMPERR_OCC_EXCEPTION
= -4,
49
COMPERR_SLM_EXCEPTION
= -5,
50
COMPERR_EXCEPTION
= -6,
51
COMPERR_MEMORY_PB
= -7,
52
COMPERR_ALGO_FAILED
= -8,
53
COMPERR_BAD_SHAPE
= -9,
54
COMPERR_WARNING
= -10,
55
COMPERR_CANCELED
= -11,
56
COMPERR_NO_MESH_ON_SHAPE
= -12,
57
COMPERR_BAD_PARMETERS
= -13,
58
COMPERR_LAST_ALGO_ERROR
= -100,
59
// Errors of SMESH_MeshEditor follow
60
EDITERR_NO_MEDIUM_ON_GEOM
= -101
/* during conversion to quadratic,
61
some medium nodes not placed on geometry
62
to avoid distorting elements, which are
63
stored in SMESH_ComputeError::myBadElements */
64
};
65
66
// =============================================================
70
// =============================================================
71
72
struct
SMESHUtils_EXPORT
SMESH_ComputeError
73
{
74
int
myName
;
75
std::string
myComment
;
76
const
SMESH_Algo
*
myAlgo
;
77
78
std::list<const SMDS_MeshElement*>
myBadElements
;
79
80
static
SMESH_ComputeErrorPtr
New(
int
error =
COMPERR_OK
,
81
std::string comment =
""
,
82
const
SMESH_Algo
* algo = 0)
83
{
return
SMESH_ComputeErrorPtr
(
new
SMESH_ComputeError
( error, comment, algo )); }
84
85
SMESH_ComputeError
(
int
error =
COMPERR_OK
,
86
std::string comment =
""
,
87
const
SMESH_Algo
* algo = 0)
88
:myName(error),myComment(comment),myAlgo(algo) {}
89
90
bool
IsOK
()
const
{
return
myName ==
COMPERR_OK
; }
91
bool
IsKO
()
const
{
return
myName !=
COMPERR_OK
&& myName !=
COMPERR_WARNING
; }
92
bool
IsCommon
()
const
{
return
myName < 0 && myName >
COMPERR_LAST_ALGO_ERROR
; }
93
bool
HasBadElems
()
const
{
return
!myBadElements.empty(); }
94
95
// not inline methods are implemented in src/SMESHUtils/SMESH_TryCatch.cxx
96
97
// Return myName as text, to be used to dump errors in terminal
98
std::string CommonName()
const
;
99
100
// Return the most severe error
101
static
SMESH_ComputeErrorPtr
Worst(
SMESH_ComputeErrorPtr
er1,
102
SMESH_ComputeErrorPtr
er2 );
103
};
104
105
#endif
src
SMESHUtils
SMESH_ComputeError.hxx
Copyright © 2007-2017 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS