1 // Copyright (C) 2004-2012 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // GHS3DPlugin : C++ implementation
21 // File : GHS3DPlugin_Hypothesis_i.hxx
25 #ifndef _GHS3DPlugin_Hypothesis_i_HXX_
26 #define _GHS3DPlugin_Hypothesis_i_HXX_
28 #include "GHS3DPlugin_Defs.hxx"
30 #include <SALOMEconfig.h>
31 #include CORBA_SERVER_HEADER(GHS3DPlugin_Algorithm)
33 #include "SMESH_Hypothesis_i.hxx"
34 #include "SMESH_Mesh_i.hxx"
35 #include "GHS3DPlugin_Hypothesis.hxx"
39 // GHS3DPlugin parameters hypothesis
41 class GHS3DPLUGIN_EXPORT GHS3DPlugin_Hypothesis_i:
42 public virtual POA_GHS3DPlugin::GHS3DPlugin_Hypothesis,
43 public virtual SMESH_Hypothesis_i
47 GHS3DPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
49 ::SMESH_Gen* theGenImpl);
51 virtual ~GHS3DPlugin_Hypothesis_i();
54 * To mesh "holes" in a solid or not. Default is to mesh.
56 void SetToMeshHoles(CORBA::Boolean toMesh);
57 CORBA::Boolean GetToMeshHoles();
59 * Maximal size of memory to be used by the algorithm (in Megabytes)
61 void SetMaximumMemory(CORBA::Short MB) throw ( SALOME::SALOME_Exception );
62 CORBA::Short GetMaximumMemory();
64 * Initial size of memory to be used by the algorithm (in Megabytes) in
65 * automatic memory adjustment mode. Default is zero
67 void SetInitialMemory(CORBA::Short MB) throw ( SALOME::SALOME_Exception );
68 CORBA::Short GetInitialMemory();
70 * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
72 void SetOptimizationLevel(CORBA::Short level) throw ( SALOME::SALOME_Exception );
73 CORBA::Short GetOptimizationLevel();
75 * Path to working directory
77 void SetWorkingDirectory(const char* path) throw ( SALOME::SALOME_Exception );
78 char* GetWorkingDirectory();
80 * To keep working files or remove them. Log file remains in case of errors anyway.
82 void SetKeepFiles(CORBA::Boolean toKeep);
83 CORBA::Boolean GetKeepFiles();
85 * Verbose level [0-10]
86 * 0 - no standard output,
87 * 2 - prints the data, quality statistics of the skin and final meshes and
88 * indicates when the final mesh is being saved. In addition the software
89 * gives indication regarding the CPU time.
90 * 10 - same as 2 plus the main steps in the computation, quality statistics
91 * histogram of the skin mesh, quality statistics histogram together with
92 * the characteristics of the final mesh.
94 void SetVerboseLevel(CORBA::Short level) throw ( SALOME::SALOME_Exception );
95 CORBA::Short GetVerboseLevel();
99 void SetToCreateNewNodes(CORBA::Boolean toCreate);
100 CORBA::Boolean GetToCreateNewNodes();
102 * To use boundary recovery version which tries to create mesh on a very poor
103 * quality surface mesh
105 void SetToUseBoundaryRecoveryVersion(CORBA::Boolean toUse);
106 CORBA::Boolean GetToUseBoundaryRecoveryVersion();
108 * Applies finite-element correction by replacing overconstrained elements where
109 * it is possible. The process is cutting first the overconstrained edges and
110 * second the overconstrained facets. This insure that no edges have two boundary
111 * vertices and that no facets have three boundary vertices.
113 void SetFEMCorrection(CORBA::Boolean toUseFem);
114 CORBA::Boolean GetFEMCorrection();
116 * To removes initial central point.
118 void SetToRemoveCentralPoint(CORBA::Boolean toRemove);
119 CORBA::Boolean GetToRemoveCentralPoint();
121 * To set hiden/undocumented/advanced options
123 void SetTextOption(const char* option);
124 char* GetTextOption();
126 * To set an enforced vertex
128 bool p_SetEnforcedVertex(CORBA::Double size, CORBA::Double x = 0, CORBA::Double y = 0, CORBA::Double z = 0,
129 const char* theVertexName = "", const char* theVertexEntry = "", const char* theGroupName = "",
130 CORBA::Boolean isCompound = false)
131 throw (SALOME::SALOME_Exception);
132 bool SetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size) throw (SALOME::SALOME_Exception);
133 bool SetEnforcedVertexNamed(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size, const char* theVertexName) throw (SALOME::SALOME_Exception);
134 bool SetEnforcedVertexWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size, const char* theGroupName) throw (SALOME::SALOME_Exception);
135 bool SetEnforcedVertexNamedWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size, const char* theVertexName, const char* theGroupName) throw (SALOME::SALOME_Exception);
136 bool SetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex, CORBA::Double size) throw (SALOME::SALOME_Exception);
137 bool SetEnforcedVertexGeomWithGroup(GEOM::GEOM_Object_ptr theVertex, CORBA::Double size, const char* theGroupName) throw (SALOME::SALOME_Exception);
138 CORBA::Double GetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
139 CORBA::Double GetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex) throw (SALOME::SALOME_Exception);
140 bool RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
141 bool RemoveEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex) throw (SALOME::SALOME_Exception);
142 GHS3DPlugin::GHS3DEnforcedVertexList* GetEnforcedVertices();
143 void ClearEnforcedVertices();
145 * To set an enforced mesh
147 bool p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, double size = -1, const char* theGroupName="") throw (SALOME::SALOME_Exception);
148 bool SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType) throw (SALOME::SALOME_Exception);
149 bool SetEnforcedMeshWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, const char* theGroupName) throw (SALOME::SALOME_Exception);
150 bool SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, double size) throw (SALOME::SALOME_Exception);
151 bool SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, double size, const char* theGroupName) throw (SALOME::SALOME_Exception);
152 GHS3DPlugin::GHS3DEnforcedMeshList* GetEnforcedMeshes();
153 void ClearEnforcedMeshes();
155 // Get implementation
156 ::GHS3DPlugin_Hypothesis* GetImpl();
158 // Verify whether hypothesis supports given entity type
159 CORBA::Boolean IsDimSupported( SMESH::Dimension type );