1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
24 // File : SMESH_MeshEditor_i.hxx
25 // Author : Nicolas REJNERI
28 #ifndef _SMESH_MESHEDITOR_I_HXX_
29 #define _SMESH_MESHEDIOTR_I_HXX_
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
36 #include "SMESH_Mesh.hxx"
37 #include "SMESH_PythonDump.hxx"
38 #include "SMESH_MeshEditor.hxx"
43 namespace MeshEditor_I {
47 class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
50 SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
52 virtual ~ SMESH_MeshEditor_i();
54 * \brief Return edited mesh ID
55 * \retval int - mesh ID
57 int GetMeshId() const { return myMesh->GetId(); }
62 * Return data of mesh edition preview
64 SMESH::MeshPreviewStruct* GetPreviewData() throw (SALOME::SALOME_Exception);
66 * If during last operation of MeshEditor some nodes were
67 * created this method returns list of their IDs, if new nodes
68 * not created - returns an empty list
70 SMESH::long_array* GetLastCreatedNodes() throw (SALOME::SALOME_Exception);
72 * If during last operation of MeshEditor some elements were
73 * created this method returns list of their IDs, if new elements
74 * not created - returns an empty list
76 SMESH::long_array* GetLastCreatedElems() throw (SALOME::SALOME_Exception);
78 * \brief Clears sequences of last created elements and nodes
80 void ClearLastCreated() throw (SALOME::SALOME_Exception);
82 * \brief Returns description of an error/warning occured during the last operation
84 SMESH::ComputeError* GetLastError() throw (SALOME::SALOME_Exception);
87 * \brief Wrap a sequence of ids in a SMESH_IDSource
89 SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements,
90 SMESH::ElementType type);
91 static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
93 CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements)
94 throw (SALOME::SALOME_Exception);
95 CORBA::Boolean RemoveNodes (const SMESH::long_array & IDsOfNodes)
96 throw (SALOME::SALOME_Exception);
97 CORBA::Long RemoveOrphanNodes()
98 throw (SALOME::SALOME_Exception);
101 * Methods for creation new elements.
102 * Returns ID of created element or 0 if element not created
104 CORBA::Long AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z)
105 throw (SALOME::SALOME_Exception);
106 CORBA::Long Add0DElement(CORBA::Long IDOfNode)
107 throw (SALOME::SALOME_Exception);
108 CORBA::Long AddBall(CORBA::Long IDOfNodem, CORBA::Double diameter)
109 throw (SALOME::SALOME_Exception);
110 CORBA::Long AddEdge(const SMESH::long_array & IDsOfNodes)
111 throw (SALOME::SALOME_Exception);
112 CORBA::Long AddFace(const SMESH::long_array & IDsOfNodes)
113 throw (SALOME::SALOME_Exception);
114 CORBA::Long AddPolygonalFace(const SMESH::long_array & IDsOfNodes)
115 throw (SALOME::SALOME_Exception);
116 CORBA::Long AddVolume(const SMESH::long_array & IDsOfNodes)
117 throw (SALOME::SALOME_Exception);
118 CORBA::Long AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes,
119 const SMESH::long_array & Quantities)
120 throw (SALOME::SALOME_Exception);
121 CORBA::Long AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces)
122 throw (SALOME::SALOME_Exception);
125 * \brief Create 0D elements on all nodes of the given object except those
126 * nodes on which a 0D element already exists.
127 * \param theObject object on whose nodes 0D elements will be created.
128 * \param theGroupName optional name of a group to add 0D elements created
129 * and/or found on nodes of \a theObject.
130 * \return an object (a new group or a temporary SMESH_IDSource) holding
131 * ids of new and/or found 0D elements.
133 SMESH::SMESH_IDSource_ptr Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObject,
134 const char* theGroupName)
135 throw (SALOME::SALOME_Exception);
138 * \brief Bind a node to a vertex
139 * \param NodeID - node ID
140 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
142 void SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexID)
143 throw (SALOME::SALOME_Exception);
145 * \brief Store node position on an edge
146 * \param NodeID - node ID
147 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
148 * \param paramOnEdge - parameter on edge where the node is located
150 void SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
151 CORBA::Double paramOnEdge)
152 throw (SALOME::SALOME_Exception);
154 * \brief Store node position on a face
155 * \param NodeID - node ID
156 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
157 * \param u - U parameter on face where the node is located
158 * \param v - V parameter on face where the node is located
160 void SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
161 CORBA::Double u, CORBA::Double v)
162 throw (SALOME::SALOME_Exception);
164 * \brief Bind a node to a solid
165 * \param NodeID - node ID
166 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
168 void SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID)
169 throw (SALOME::SALOME_Exception);
171 * \brief Bind an element to a shape
172 * \param ElementID - element ID
173 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
175 void SetMeshElementOnShape(CORBA::Long ElementID, CORBA::Long ShapeID)
176 throw (SALOME::SALOME_Exception);
179 CORBA::Boolean MoveNode(CORBA::Long NodeID,
180 CORBA::Double x, CORBA::Double y, CORBA::Double z)
181 throw (SALOME::SALOME_Exception);
183 CORBA::Boolean InverseDiag(CORBA::Long NodeID1, CORBA::Long NodeID2)
184 throw (SALOME::SALOME_Exception);
185 CORBA::Boolean DeleteDiag(CORBA::Long NodeID1, CORBA::Long NodeID2)
186 throw (SALOME::SALOME_Exception);
187 CORBA::Boolean Reorient(const SMESH::long_array & IDsOfElements)
188 throw (SALOME::SALOME_Exception);
189 CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject)
190 throw (SALOME::SALOME_Exception);
193 * \brief Reorient faces contained in \a the2Dgroup.
194 * \param the2Dgroup - the mesh or its part to reorient
195 * \param theDirection - desired direction of normal of \a theFace
196 * \param theFace - ID of face whose orientation is checked.
197 * It can be < 1 then \a thePoint is used to find a face.
198 * \param thePoint - is used to find a face if \a theFace < 1.
199 * \return number of reoriented elements.
201 CORBA::Long Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup,
202 const SMESH::DirStruct& theDirection,
204 const SMESH::PointStruct& thePoint) throw (SALOME::SALOME_Exception);
207 CORBA::Boolean TriToQuad (const SMESH::long_array & IDsOfElements,
208 SMESH::NumericalFunctor_ptr Criterion,
209 CORBA::Double MaxAngle)
210 throw (SALOME::SALOME_Exception);
211 CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject,
212 SMESH::NumericalFunctor_ptr Criterion,
213 CORBA::Double MaxAngle)
214 throw (SALOME::SALOME_Exception);
215 CORBA::Boolean QuadToTri (const SMESH::long_array & IDsOfElements,
216 SMESH::NumericalFunctor_ptr Criterion)
217 throw (SALOME::SALOME_Exception);
218 CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
219 SMESH::NumericalFunctor_ptr Criterion)
220 throw (SALOME::SALOME_Exception);
221 void QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject)
222 throw (SALOME::SALOME_Exception);
223 CORBA::Boolean SplitQuad (const SMESH::long_array & IDsOfElements,
224 CORBA::Boolean Diag13)
225 throw (SALOME::SALOME_Exception);
226 CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
227 CORBA::Boolean Diag13)
228 throw (SALOME::SALOME_Exception);
229 CORBA::Long BestSplit (CORBA::Long IDOfQuad,
230 SMESH::NumericalFunctor_ptr Criterion)
231 throw (SALOME::SALOME_Exception);
232 void SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
233 CORBA::Short methodFlags)
234 throw (SALOME::SALOME_Exception);
236 CORBA::Boolean Smooth(const SMESH::long_array & IDsOfElements,
237 const SMESH::long_array & IDsOfFixedNodes,
238 CORBA::Long MaxNbOfIterations,
239 CORBA::Double MaxAspectRatio,
240 SMESH::SMESH_MeshEditor::Smooth_Method Method)
241 throw (SALOME::SALOME_Exception);
242 CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
243 const SMESH::long_array & IDsOfFixedNodes,
244 CORBA::Long MaxNbOfIterations,
245 CORBA::Double MaxAspectRatio,
246 SMESH::SMESH_MeshEditor::Smooth_Method Method)
247 throw (SALOME::SALOME_Exception);
248 CORBA::Boolean SmoothParametric(const SMESH::long_array & IDsOfElements,
249 const SMESH::long_array & IDsOfFixedNodes,
250 CORBA::Long MaxNbOfIterations,
251 CORBA::Double MaxAspectRatio,
252 SMESH::SMESH_MeshEditor::Smooth_Method Method)
253 throw (SALOME::SALOME_Exception);
254 CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
255 const SMESH::long_array & IDsOfFixedNodes,
256 CORBA::Long MaxNbOfIterations,
257 CORBA::Double MaxAspectRatio,
258 SMESH::SMESH_MeshEditor::Smooth_Method Method)
259 throw (SALOME::SALOME_Exception);
260 CORBA::Boolean smooth(const SMESH::long_array & IDsOfElements,
261 const SMESH::long_array & IDsOfFixedNodes,
262 CORBA::Long MaxNbOfIterations,
263 CORBA::Double MaxAspectRatio,
264 SMESH::SMESH_MeshEditor::Smooth_Method Method,
266 throw (SALOME::SALOME_Exception);
267 CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
268 const SMESH::long_array & IDsOfFixedNodes,
269 CORBA::Long MaxNbOfIterations,
270 CORBA::Double MaxAspectRatio,
271 SMESH::SMESH_MeshEditor::Smooth_Method Method,
273 throw (SALOME::SALOME_Exception);
275 CORBA::Boolean ConvertFromQuadratic()
276 throw (SALOME::SALOME_Exception);
277 void ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr theObject)
278 throw (SALOME::SALOME_Exception);
279 void ConvertToQuadratic(CORBA::Boolean Force3d)
280 throw (SALOME::SALOME_Exception);
281 void ConvertToQuadraticObject(CORBA::Boolean theForce3d,
282 SMESH::SMESH_IDSource_ptr theObject)
283 throw (SALOME::SALOME_Exception);
284 void ConvertToBiQuadratic(CORBA::Boolean theForce3d,
285 SMESH::SMESH_IDSource_ptr theObject)
286 throw (SALOME::SALOME_Exception);
288 void RenumberNodes() throw (SALOME::SALOME_Exception);
289 void RenumberElements() throw (SALOME::SALOME_Exception);
291 void RotationSweep(const SMESH::long_array & IDsOfElements,
292 const SMESH::AxisStruct & Axis,
293 CORBA::Double AngleInRadians,
294 CORBA::Long NbOfSteps,
295 CORBA::Double Tolerance)
296 throw (SALOME::SALOME_Exception);
297 void RotationSweepObject(SMESH::SMESH_IDSource_ptr theObject,
298 const SMESH::AxisStruct & Axis,
299 CORBA::Double AngleInRadians,
300 CORBA::Long NbOfSteps,
301 CORBA::Double Tolerance)
302 throw (SALOME::SALOME_Exception);
303 void RotationSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
304 const SMESH::AxisStruct & Axis,
305 CORBA::Double AngleInRadians,
306 CORBA::Long NbOfSteps,
307 CORBA::Double Tolerance)
308 throw (SALOME::SALOME_Exception);
309 void RotationSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
310 const SMESH::AxisStruct & Axis,
311 CORBA::Double AngleInRadians,
312 CORBA::Long NbOfSteps,
313 CORBA::Double Tolerance)
314 throw (SALOME::SALOME_Exception);
316 void ExtrusionSweep(const SMESH::long_array & IDsOfElements,
317 const SMESH::DirStruct & StepVector,
318 CORBA::Long NbOfSteps)
319 throw (SALOME::SALOME_Exception);
320 void ExtrusionSweep0D(const SMESH::long_array & IDsOfElements,
321 const SMESH::DirStruct & StepVector,
322 CORBA::Long NbOfSteps)
323 throw (SALOME::SALOME_Exception);
325 void ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObject,
326 const SMESH::DirStruct & StepVector,
327 CORBA::Long NbOfSteps)
328 throw (SALOME::SALOME_Exception);
330 void ExtrusionSweepObject0D(SMESH::SMESH_IDSource_ptr theObject,
331 const SMESH::DirStruct & StepVector,
332 CORBA::Long NbOfSteps)
333 throw (SALOME::SALOME_Exception);
334 void ExtrusionSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
335 const SMESH::DirStruct & StepVector,
336 CORBA::Long NbOfSteps)
337 throw (SALOME::SALOME_Exception);
338 void ExtrusionSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
339 const SMESH::DirStruct & StepVector,
340 CORBA::Long NbOfSteps)
341 throw (SALOME::SALOME_Exception);
342 void AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
343 const SMESH::DirStruct & theStepVector,
344 CORBA::Long theNbOfSteps,
345 CORBA::Long theExtrFlags,
346 CORBA::Double theSewTolerance)
347 throw (SALOME::SALOME_Exception);
349 SMESH::SMESH_MeshEditor::Extrusion_Error
350 ExtrusionAlongPath(const SMESH::long_array & IDsOfElements,
351 SMESH::SMESH_Mesh_ptr PathMesh,
352 GEOM::GEOM_Object_ptr PathShape,
353 CORBA::Long NodeStart,
354 CORBA::Boolean HasAngles,
355 const SMESH::double_array & Angles,
356 CORBA::Boolean HasRefPoint,
357 const SMESH::PointStruct & RefPoint)
358 throw (SALOME::SALOME_Exception);
360 SMESH::SMESH_MeshEditor::Extrusion_Error
361 ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject,
362 SMESH::SMESH_Mesh_ptr PathMesh,
363 GEOM::GEOM_Object_ptr PathShape,
364 CORBA::Long NodeStart,
365 CORBA::Boolean HasAngles,
366 const SMESH::double_array & Angles,
367 CORBA::Boolean HasRefPoint,
368 const SMESH::PointStruct & RefPoint)
369 throw (SALOME::SALOME_Exception);
370 SMESH::SMESH_MeshEditor::Extrusion_Error
371 ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject,
372 SMESH::SMESH_Mesh_ptr PathMesh,
373 GEOM::GEOM_Object_ptr PathShape,
374 CORBA::Long NodeStart,
375 CORBA::Boolean HasAngles,
376 const SMESH::double_array & Angles,
377 CORBA::Boolean HasRefPoint,
378 const SMESH::PointStruct & RefPoint)
379 throw (SALOME::SALOME_Exception);
380 SMESH::SMESH_MeshEditor::Extrusion_Error
381 ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject,
382 SMESH::SMESH_Mesh_ptr PathMesh,
383 GEOM::GEOM_Object_ptr PathShape,
384 CORBA::Long NodeStart,
385 CORBA::Boolean HasAngles,
386 const SMESH::double_array & Angles,
387 CORBA::Boolean HasRefPoint,
388 const SMESH::PointStruct & RefPoint)
389 throw (SALOME::SALOME_Exception);
391 SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr PathMesh,
392 GEOM::GEOM_Object_ptr PathShape,
393 const SMESH::double_array & Angles);
395 void Mirror(const SMESH::long_array & IDsOfElements,
396 const SMESH::AxisStruct & Axis,
397 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
399 throw (SALOME::SALOME_Exception);
400 void MirrorObject(SMESH::SMESH_IDSource_ptr theObject,
401 const SMESH::AxisStruct & Axis,
402 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
404 throw (SALOME::SALOME_Exception);
405 void Translate(const SMESH::long_array & IDsOfElements,
406 const SMESH::DirStruct & Vector,
408 throw (SALOME::SALOME_Exception);
409 void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
410 const SMESH::DirStruct & Vector,
412 throw (SALOME::SALOME_Exception);
413 void Rotate(const SMESH::long_array & IDsOfElements,
414 const SMESH::AxisStruct & Axis,
417 throw (SALOME::SALOME_Exception);
418 void RotateObject(SMESH::SMESH_IDSource_ptr theObject,
419 const SMESH::AxisStruct & Axis,
422 throw (SALOME::SALOME_Exception);
424 SMESH::ListOfGroups* RotationSweepMakeGroups(const SMESH::long_array& IDsOfElements,
425 const SMESH::AxisStruct& Axix,
426 CORBA::Double AngleInRadians,
427 CORBA::Long NbOfSteps,
428 CORBA::Double Tolerance)
429 throw (SALOME::SALOME_Exception);
430 SMESH::ListOfGroups* RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
431 const SMESH::AxisStruct& Axix,
432 CORBA::Double AngleInRadians,
433 CORBA::Long NbOfSteps,
434 CORBA::Double Tolerance)
435 throw (SALOME::SALOME_Exception);
436 SMESH::ListOfGroups* RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
437 const SMESH::AxisStruct& Axix,
438 CORBA::Double AngleInRadians,
439 CORBA::Long NbOfSteps,
440 CORBA::Double Tolerance)
441 throw (SALOME::SALOME_Exception);
442 SMESH::ListOfGroups* RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
443 const SMESH::AxisStruct& Axix,
444 CORBA::Double AngleInRadians,
445 CORBA::Long NbOfSteps,
446 CORBA::Double Tolerance)
447 throw (SALOME::SALOME_Exception);
448 SMESH::ListOfGroups* ExtrusionSweepMakeGroups(const SMESH::long_array& IDsOfElements,
449 const SMESH::DirStruct& StepVector,
450 CORBA::Long NbOfSteps)
451 throw (SALOME::SALOME_Exception);
452 SMESH::ListOfGroups* ExtrusionSweepMakeGroups0D(const SMESH::long_array& IDsOfElements,
453 const SMESH::DirStruct& StepVector,
454 CORBA::Long NbOfSteps)
455 throw (SALOME::SALOME_Exception);
457 SMESH::ListOfGroups* AdvancedExtrusionMakeGroups(const SMESH::long_array& IDsOfElements,
458 const SMESH::DirStruct& StepVector,
459 CORBA::Long NbOfSteps,
460 CORBA::Long ExtrFlags,
461 CORBA::Double SewTolerance)
462 throw (SALOME::SALOME_Exception);
463 SMESH::ListOfGroups* ExtrusionSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
464 const SMESH::DirStruct& StepVector,
465 CORBA::Long NbOfSteps)
466 throw (SALOME::SALOME_Exception);
467 SMESH::ListOfGroups* ExtrusionSweepObject0DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
468 const SMESH::DirStruct& StepVector,
469 CORBA::Long NbOfSteps)
470 throw (SALOME::SALOME_Exception);
471 SMESH::ListOfGroups* ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
472 const SMESH::DirStruct& StepVector,
473 CORBA::Long NbOfSteps)
474 throw (SALOME::SALOME_Exception);
475 SMESH::ListOfGroups* ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
476 const SMESH::DirStruct& StepVector,
477 CORBA::Long NbOfSteps)
478 throw (SALOME::SALOME_Exception);
479 SMESH::ListOfGroups* ExtrusionAlongPathMakeGroups(const SMESH::long_array& IDsOfElements,
480 SMESH::SMESH_Mesh_ptr PathMesh,
481 GEOM::GEOM_Object_ptr PathShape,
482 CORBA::Long NodeStart,
483 CORBA::Boolean HasAngles,
484 const SMESH::double_array& Angles,
485 CORBA::Boolean HasRefPoint,
486 const SMESH::PointStruct& RefPoint,
487 SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
488 throw (SALOME::SALOME_Exception);
489 SMESH::ListOfGroups* ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
490 SMESH::SMESH_Mesh_ptr PathMesh,
491 GEOM::GEOM_Object_ptr PathShape,
492 CORBA::Long NodeStart,
493 CORBA::Boolean HasAngles,
494 const SMESH::double_array& Angles,
495 CORBA::Boolean HasRefPoint,
496 const SMESH::PointStruct& RefPoint,
497 SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
498 throw (SALOME::SALOME_Exception);
499 SMESH::ListOfGroups* ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
500 SMESH::SMESH_Mesh_ptr PathMesh,
501 GEOM::GEOM_Object_ptr PathShape,
502 CORBA::Long NodeStart,
503 CORBA::Boolean HasAngles,
504 const SMESH::double_array& Angles,
505 CORBA::Boolean HasRefPoint,
506 const SMESH::PointStruct& RefPoint,
507 SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
508 throw (SALOME::SALOME_Exception);
509 SMESH::ListOfGroups* ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
510 SMESH::SMESH_Mesh_ptr PathMesh,
511 GEOM::GEOM_Object_ptr PathShape,
512 CORBA::Long NodeStart,
513 CORBA::Boolean HasAngles,
514 const SMESH::double_array& Angles,
515 CORBA::Boolean HasRefPoint,
516 const SMESH::PointStruct& RefPoint,
517 SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
518 throw (SALOME::SALOME_Exception);
521 SMESH::ListOfGroups* ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr Object,
522 SMESH::SMESH_IDSource_ptr Path,
523 CORBA::Long NodeStart,
524 CORBA::Boolean HasAngles,
525 const SMESH::double_array& Angles,
526 CORBA::Boolean LinearVariation,
527 CORBA::Boolean HasRefPoint,
528 const SMESH::PointStruct& RefPoint,
529 CORBA::Boolean MakeGroups,
530 SMESH::ElementType ElemType,
531 SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
532 throw (SALOME::SALOME_Exception);
533 SMESH::ListOfGroups* ExtrusionAlongPathX(const SMESH::long_array& IDsOfElements,
534 SMESH::SMESH_IDSource_ptr Path,
535 CORBA::Long NodeStart,
536 CORBA::Boolean HasAngles,
537 const SMESH::double_array& Angles,
538 CORBA::Boolean LinearVariation,
539 CORBA::Boolean HasRefPoint,
540 const SMESH::PointStruct& RefPoint,
541 CORBA::Boolean MakeGroups,
542 SMESH::ElementType ElemType,
543 SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
544 throw (SALOME::SALOME_Exception);
546 SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array& IDsOfElements,
547 const SMESH::AxisStruct& Mirror,
548 SMESH::SMESH_MeshEditor::MirrorType MirrorType)
549 throw (SALOME::SALOME_Exception);
550 SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
551 const SMESH::AxisStruct& Mirror,
552 SMESH::SMESH_MeshEditor::MirrorType MirrorType)
553 throw (SALOME::SALOME_Exception);
554 SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::long_array& IDsOfElements,
555 const SMESH::DirStruct& Vector)
556 throw (SALOME::SALOME_Exception);
557 SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
558 const SMESH::DirStruct& Vector)
559 throw (SALOME::SALOME_Exception);
560 SMESH::ListOfGroups* RotateMakeGroups(const SMESH::long_array& IDsOfElements,
561 const SMESH::AxisStruct& Axis,
562 CORBA::Double AngleInRadians)
563 throw (SALOME::SALOME_Exception);
564 SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
565 const SMESH::AxisStruct& Axis,
566 CORBA::Double AngleInRadians)
567 throw (SALOME::SALOME_Exception);
569 SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::long_array& IDsOfElements,
570 const SMESH::AxisStruct& Mirror,
571 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
572 CORBA::Boolean CopyGroups,
573 const char* MeshName)
574 throw (SALOME::SALOME_Exception);
575 SMESH::SMESH_Mesh_ptr MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
576 const SMESH::AxisStruct& Mirror,
577 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
578 CORBA::Boolean CopyGroups,
579 const char* MeshName)
580 throw (SALOME::SALOME_Exception);
581 SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::long_array& IDsOfElements,
582 const SMESH::DirStruct& Vector,
583 CORBA::Boolean CopyGroups,
584 const char* MeshName)
585 throw (SALOME::SALOME_Exception);
586 SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
587 const SMESH::DirStruct& Vector,
588 CORBA::Boolean CopyGroups,
589 const char* MeshName)
590 throw (SALOME::SALOME_Exception);
591 SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::long_array& IDsOfElements,
592 const SMESH::AxisStruct& Axis,
593 CORBA::Double AngleInRadians,
594 CORBA::Boolean CopyGroups,
595 const char* MeshName)
596 throw (SALOME::SALOME_Exception);
597 SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
598 const SMESH::AxisStruct& Axis,
599 CORBA::Double AngleInRadians,
600 CORBA::Boolean CopyGroups,
601 const char* MeshName)
602 throw (SALOME::SALOME_Exception);
604 void Scale(SMESH::SMESH_IDSource_ptr theObject,
605 const SMESH::PointStruct& thePoint,
606 const SMESH::double_array& theScaleFact,
607 CORBA::Boolean theCopy)
608 throw (SALOME::SALOME_Exception);
610 SMESH::ListOfGroups* ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
611 const SMESH::PointStruct& thePoint,
612 const SMESH::double_array& theScaleFact)
613 throw (SALOME::SALOME_Exception);
615 SMESH::SMESH_Mesh_ptr ScaleMakeMesh(SMESH::SMESH_IDSource_ptr Object,
616 const SMESH::PointStruct& Point,
617 const SMESH::double_array& theScaleFact,
618 CORBA::Boolean CopyGroups,
619 const char* MeshName)
620 throw (SALOME::SALOME_Exception);
622 void FindCoincidentNodes (CORBA::Double Tolerance,
623 SMESH::array_of_long_array_out GroupsOfNodes)
624 throw (SALOME::SALOME_Exception);
625 void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr Object,
626 CORBA::Double Tolerance,
627 SMESH::array_of_long_array_out GroupsOfNodes)
628 throw (SALOME::SALOME_Exception);
629 void FindCoincidentNodesOnPartBut(SMESH::SMESH_IDSource_ptr Object,
630 CORBA::Double Tolerance,
631 SMESH::array_of_long_array_out GroupsOfNodes,
632 const SMESH::ListOfIDSources& ExceptSubMeshOrGroups)
633 throw (SALOME::SALOME_Exception);
634 void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes)
635 throw (SALOME::SALOME_Exception);
636 void FindEqualElements(SMESH::SMESH_IDSource_ptr Object,
637 SMESH::array_of_long_array_out GroupsOfElementsID)
638 throw (SALOME::SALOME_Exception);
639 void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID)
640 throw (SALOME::SALOME_Exception);
641 void MergeEqualElements()
642 throw (SALOME::SALOME_Exception);
643 CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
647 throw (SALOME::SALOME_Exception);
649 * \brief Return ID of node closest to a given point
651 CORBA::Long FindNodeClosestTo(CORBA::Double x,
654 throw (SALOME::SALOME_Exception);
656 * Return elements of given type where the given point is IN or ON.
657 * 'ALL' type means elements of any type excluding nodes
659 SMESH::long_array* FindElementsByPoint(CORBA::Double x,
662 SMESH::ElementType type)
663 throw (SALOME::SALOME_Exception);
665 * Searching among the given elements, return elements of given type
666 * where the given point is IN or ON.
667 * 'ALL' type means elements of any type excluding nodes
669 SMESH::long_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
673 SMESH::ElementType type)
674 throw (SALOME::SALOME_Exception);
677 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
678 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
680 CORBA::Short GetPointState(CORBA::Double x, CORBA::Double y, CORBA::Double z)
681 throw (SALOME::SALOME_Exception);
683 SMESH::SMESH_MeshEditor::Sew_Error
684 SewFreeBorders(CORBA::Long FirstNodeID1,
685 CORBA::Long SecondNodeID1,
686 CORBA::Long LastNodeID1,
687 CORBA::Long FirstNodeID2,
688 CORBA::Long SecondNodeID2,
689 CORBA::Long LastNodeID2,
690 CORBA::Boolean CreatePolygons,
691 CORBA::Boolean CreatePolyedrs)
692 throw (SALOME::SALOME_Exception);
693 SMESH::SMESH_MeshEditor::Sew_Error
694 SewConformFreeBorders(CORBA::Long FirstNodeID1,
695 CORBA::Long SecondNodeID1,
696 CORBA::Long LastNodeID1,
697 CORBA::Long FirstNodeID2,
698 CORBA::Long SecondNodeID2)
699 throw (SALOME::SALOME_Exception);
700 SMESH::SMESH_MeshEditor::Sew_Error
701 SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
702 CORBA::Long SecondNodeIDOnFreeBorder,
703 CORBA::Long LastNodeIDOnFreeBorder,
704 CORBA::Long FirstNodeIDOnSide,
705 CORBA::Long LastNodeIDOnSide,
706 CORBA::Boolean CreatePolygons,
707 CORBA::Boolean CreatePolyedrs)
708 throw (SALOME::SALOME_Exception);
709 SMESH::SMESH_MeshEditor::Sew_Error
710 SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
711 const SMESH::long_array& IDsOfSide2Elements,
712 CORBA::Long NodeID1OfSide1ToMerge,
713 CORBA::Long NodeID1OfSide2ToMerge,
714 CORBA::Long NodeID2OfSide1ToMerge,
715 CORBA::Long NodeID2OfSide2ToMerge)
716 throw (SALOME::SALOME_Exception);
719 * Set new nodes for given element.
720 * If number of nodes is not corresponded to type of
721 * element - returns false
723 CORBA::Boolean ChangeElemNodes(CORBA::Long ide, const SMESH::long_array& newIDs)
724 throw (SALOME::SALOME_Exception);
726 SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
727 const char* theGroupName)
728 throw (SALOME::SALOME_Exception);
730 CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
731 const SMESH::long_array& theModifiedElems )
732 throw (SALOME::SALOME_Exception);
734 CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
735 const SMESH::long_array& theModifiedElems )
736 throw (SALOME::SALOME_Exception);
738 CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
739 SMESH::SMESH_GroupBase_ptr theModifiedElems )
740 throw (SALOME::SALOME_Exception);
743 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
744 * Works as DoubleNodeGroup(), but returns a new group with newly created nodes.
745 * \param theNodes - group of nodes to be doubled.
746 * \param theModifiedElems - group of elements to be updated.
747 * \return a new group with newly created nodes
748 * \sa DoubleNodeGroup()
750 SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
751 SMESH::SMESH_GroupBase_ptr theModifiedElems )
752 throw (SALOME::SALOME_Exception);
754 CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
755 const SMESH::ListOfGroups& theModifiedElems )
756 throw (SALOME::SALOME_Exception);
758 SMESH::SMESH_Group_ptr DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
759 const SMESH::ListOfGroups& theModifiedElems )
760 throw (SALOME::SALOME_Exception);
763 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
764 * \param theElems - the list of elements (edges or faces) to be replicated
765 * The nodes for duplication could be found from these elements
766 * \param theNodesNot - list of nodes to NOT replicate
767 * \param theAffectedElems - the list of elements (cells and edges) to which the
768 * replicated nodes should be associated to.
769 * \return TRUE if operation has been completed successfully, FALSE otherwise
770 * \sa DoubleNodeGroup(), DoubleNodeGroups()
772 CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems,
773 const SMESH::long_array& theNodesNot,
774 const SMESH::long_array& theAffectedElems )
775 throw (SALOME::SALOME_Exception);
778 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
779 * \param theElems - the list of elements (edges or faces) to be replicated
780 * The nodes for duplication could be found from these elements
781 * \param theNodesNot - list of nodes to NOT replicate
782 * \param theShape - shape to detect affected elements (element which geometric center
783 * located on or inside shape).
784 * The replicated nodes should be associated to affected elements.
785 * \return TRUE if operation has been completed successfully, FALSE otherwise
786 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
788 CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems,
789 const SMESH::long_array& theNodesNot,
790 GEOM::GEOM_Object_ptr theShape )
791 throw (SALOME::SALOME_Exception);
794 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
795 * \param theElems - group of of elements (edges or faces) to be replicated
796 * \param theNodesNot - group of nodes not to replicated
797 * \param theAffectedElems - group of elements to which the replicated nodes
798 * should be associated to.
799 * \return TRUE if operation has been completed successfully, FALSE otherwise
800 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
802 CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
803 SMESH::SMESH_GroupBase_ptr theNodesNot,
804 SMESH::SMESH_GroupBase_ptr theAffectedElems )
805 throw (SALOME::SALOME_Exception);
808 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
809 * Works as DoubleNodeElemGroup(), but returns a new group with newly created elements.
810 * \param theElems - group of of elements (edges or faces) to be replicated
811 * \param theNodesNot - group of nodes not to replicated
812 * \param theAffectedElems - group of elements to which the replicated nodes
813 * should be associated to.
814 * \return a new group with newly created elements
815 * \sa DoubleNodeElemGroup()
817 SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
818 SMESH::SMESH_GroupBase_ptr theNodesNot,
819 SMESH::SMESH_GroupBase_ptr theAffectedElems )
820 throw (SALOME::SALOME_Exception);
822 SMESH::ListOfGroups* DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
823 SMESH::SMESH_GroupBase_ptr theNodesNot,
824 SMESH::SMESH_GroupBase_ptr theAffectedElems,
825 CORBA::Boolean theElemGroupNeeded,
826 CORBA::Boolean theNodeGroupNeeded)
827 throw (SALOME::SALOME_Exception);
830 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
831 * \param theElems - group of of elements (edges or faces) to be replicated
832 * \param theNodesNot - group of nodes not to replicated
833 * \param theShape - shape to detect affected elements (element which geometric center
834 * located on or inside shape).
835 * The replicated nodes should be associated to affected elements.
836 * \return TRUE if operation has been completed successfully, FALSE otherwise
837 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
839 CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
840 SMESH::SMESH_GroupBase_ptr theNodesNot,
841 GEOM::GEOM_Object_ptr theShape )
842 throw (SALOME::SALOME_Exception);
845 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
846 * This method provided for convenience works as DoubleNodes() described above.
847 * \param theElems - list of groups of elements (edges or faces) to be replicated
848 * \param theNodesNot - list of groups of nodes not to replicated
849 * \param theAffectedElems - group of elements to which the replicated nodes
850 * should be associated to.
851 * \return TRUE if operation has been completed successfully, FALSE otherwise
852 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
854 CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
855 const SMESH::ListOfGroups& theNodesNot,
856 const SMESH::ListOfGroups& theAffectedElems )
857 throw (SALOME::SALOME_Exception);
860 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
861 * Works as DoubleNodeElemGroups(), but returns a new group with newly created elements.
862 * \param theElems - list of groups of elements (edges or faces) to be replicated
863 * \param theNodesNot - list of groups of nodes not to replicated
864 * \param theAffectedElems - group of elements to which the replicated nodes
865 * should be associated to.
866 * \return a new group with newly created elements
867 * \sa DoubleNodeElemGroups()
869 SMESH::SMESH_Group_ptr DoubleNodeElemGroupsNew( const SMESH::ListOfGroups& theElems,
870 const SMESH::ListOfGroups& theNodesNot,
871 const SMESH::ListOfGroups& theAffectedElems )
872 throw (SALOME::SALOME_Exception);
874 SMESH::ListOfGroups* DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems,
875 const SMESH::ListOfGroups& theNodesNot,
876 const SMESH::ListOfGroups& theAffectedElems,
877 CORBA::Boolean theElemGroupNeeded,
878 CORBA::Boolean theNodeGroupNeeded)
879 throw (SALOME::SALOME_Exception);
882 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
883 * This method provided for convenience works as DoubleNodes() described above.
884 * \param theElems - list of groups of elements (edges or faces) to be replicated
885 * \param theNodesNot - list of groups of nodes not to replicated
886 * \param theShape - shape to detect affected elements (element which geometric center
887 * located on or inside shape).
888 * The replicated nodes should be associated to affected elements.
889 * \return TRUE if operation has been completed successfully, FALSE otherwise
890 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
892 CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
893 const SMESH::ListOfGroups& theNodesNot,
894 GEOM::GEOM_Object_ptr theShape )
895 throw (SALOME::SALOME_Exception);
898 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed.
899 * This method is the first step of DoubleNodeElemGroupsInRegion.
900 * \param theElems - list of groups of elements (edges or faces) to be replicated
901 * \param theNodesNot - list of groups of nodes not to replicated
902 * \param theShape - shape to detect affected elements (element which geometric center
903 * located on or inside shape).
904 * The replicated nodes should be associated to affected elements.
905 * \return groups of affected elements
906 * \sa DoubleNodeElemGroupsInRegion()
908 SMESH::ListOfGroups* AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
909 const SMESH::ListOfGroups& theNodesNot,
910 GEOM::GEOM_Object_ptr theShape )
911 throw (SALOME::SALOME_Exception);
914 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
915 * The list of groups must describe a partition of the mesh volumes.
916 * The nodes of the internal faces at the boundaries of the groups are doubled.
917 * In option, the internal faces are replaced by flat elements.
918 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
919 * @param theDomains - list of groups of volumes
920 * @param createJointElems - if TRUE, create the elements
921 * @return TRUE if operation has been completed successfully, FALSE otherwise
923 CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
924 CORBA::Boolean createJointElems )
925 throw (SALOME::SALOME_Exception);
927 * \brief Double nodes on some external faces and create flat elements.
928 * Flat elements are mainly used by some types of mechanic calculations.
930 * Each group of the list must be constituted of faces.
931 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
932 * @param theGroupsOfFaces - list of groups of faces
933 * @return TRUE if operation has been completed successfully, FALSE otherwise
935 CORBA::Boolean CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups& theGroupsOfFaces )
936 throw (SALOME::SALOME_Exception);
939 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
940 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
941 * groups of faces to remove insidethe object, (idem edges).
942 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
944 void CreateHoleSkin(CORBA::Double radius,
945 GEOM::GEOM_Object_ptr theShape,
946 const char* groupName,
947 const SMESH::double_array& theNodesCoords,
948 SMESH::array_of_long_array_out GroupsOfNodes)
949 throw (SALOME::SALOME_Exception);
952 * \brief Generated skin mesh (containing 2D cells) from 3D mesh
953 * The created 2D mesh elements based on nodes of free faces of boundary volumes
954 * \return TRUE if operation has been completed successfully, FALSE otherwise
956 CORBA::Boolean Make2DMeshFrom3D()
957 throw (SALOME::SALOME_Exception);
959 SMESH::SMESH_Mesh_ptr MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
960 SMESH::Bnd_Dimension dimension,
961 const char* groupName,
962 const char* meshName,
963 CORBA::Boolean toCopyElements,
964 CORBA::Boolean toCopyMissingBondary,
965 SMESH::SMESH_Group_out group)
966 throw (SALOME::SALOME_Exception);
968 CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
969 const char* groupName,
970 const char* meshName,
971 CORBA::Boolean toCopyAll,
972 const SMESH::ListOfIDSources& groups,
973 SMESH::SMESH_Mesh_out mesh,
974 SMESH::SMESH_Group_out group)
975 throw (SALOME::SALOME_Exception);
977 private: //!< private methods
979 ::SMESH_MeshEditor& getEditor();
981 SMESHDS_Mesh * getMeshDS() { return myMesh->GetMeshDS(); }
983 MeshEditor_I::TPreviewMesh * getPreviewMesh( SMDSAbs_ElementType previewType = SMDSAbs_All );
985 void declareMeshModified( bool isReComputeSafe );
988 * \brief Clear myLastCreated* or myPreviewData
990 void initData(bool deleteSearchers=true);
993 * \brief Return groups by their IDs
995 SMESH::ListOfGroups* getGroups(const std::list<int>* groupIDs)
996 throw (SALOME::SALOME_Exception);
998 SMESH::ListOfGroups* rotationSweep(const SMESH::long_array & IDsOfElements,
999 const SMESH::AxisStruct & Axis,
1000 CORBA::Double AngleInRadians,
1001 CORBA::Long NbOfSteps,
1002 CORBA::Double Tolerance,
1003 const bool MakeGroups,
1004 const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1005 throw (SALOME::SALOME_Exception);
1006 SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array & IDsOfElements,
1007 const SMESH::DirStruct & StepVector,
1008 CORBA::Long NbOfSteps,
1010 const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1011 throw (SALOME::SALOME_Exception);
1012 SMESH::ListOfGroups* advancedExtrusion(const SMESH::long_array & theIDsOfElements,
1013 const SMESH::DirStruct & theStepVector,
1014 CORBA::Long theNbOfSteps,
1015 CORBA::Long theExtrFlags,
1016 CORBA::Double theSewTolerance,
1017 const bool MakeGroups)
1018 throw (SALOME::SALOME_Exception);
1019 SMESH::ListOfGroups* extrusionAlongPath(const SMESH::long_array & IDsOfElements,
1020 SMESH::SMESH_Mesh_ptr PathMesh,
1021 GEOM::GEOM_Object_ptr PathShape,
1022 CORBA::Long NodeStart,
1023 CORBA::Boolean HasAngles,
1024 const SMESH::double_array & Angles,
1025 CORBA::Boolean HasRefPoint,
1026 const SMESH::PointStruct & RefPoint,
1027 const bool MakeGroups,
1028 SMESH::SMESH_MeshEditor::Extrusion_Error & Error,
1029 const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1030 throw (SALOME::SALOME_Exception);
1031 SMESH::ListOfGroups* extrusionAlongPathX(const SMESH::long_array & IDsOfElements,
1032 SMESH::SMESH_IDSource_ptr Path,
1033 CORBA::Long NodeStart,
1034 CORBA::Boolean HasAngles,
1035 const SMESH::double_array& Angles,
1036 CORBA::Boolean LinearVariation,
1037 CORBA::Boolean HasRefPoint,
1038 const SMESH::PointStruct& RefPoint,
1040 const SMDSAbs_ElementType ElementType,
1041 SMESH::SMESH_MeshEditor::Extrusion_Error & theError)
1042 throw (SALOME::SALOME_Exception);
1043 SMESH::ListOfGroups* mirror(TIDSortedElemSet & IDsOfElements,
1044 const SMESH::AxisStruct & Axis,
1045 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
1046 CORBA::Boolean Copy,
1048 ::SMESH_Mesh* TargetMesh=0)
1049 throw (SALOME::SALOME_Exception);
1050 SMESH::ListOfGroups* translate(TIDSortedElemSet & IDsOfElements,
1051 const SMESH::DirStruct & Vector,
1052 CORBA::Boolean Copy,
1054 ::SMESH_Mesh* TargetMesh=0)
1055 throw (SALOME::SALOME_Exception);
1056 SMESH::ListOfGroups* rotate(TIDSortedElemSet & IDsOfElements,
1057 const SMESH::AxisStruct & Axis,
1058 CORBA::Double Angle,
1059 CORBA::Boolean Copy,
1061 ::SMESH_Mesh* TargetMesh=0)
1062 throw (SALOME::SALOME_Exception);
1064 SMESH::ListOfGroups* scale(SMESH::SMESH_IDSource_ptr theObject,
1065 const SMESH::PointStruct& thePoint,
1066 const SMESH::double_array& theScaleFact,
1067 CORBA::Boolean theCopy,
1069 ::SMESH_Mesh* theTargetMesh=0)
1070 throw (SALOME::SALOME_Exception);
1072 void convertToQuadratic(CORBA::Boolean theForce3d,
1073 CORBA::Boolean theToBiQuad,
1074 SMESH::SMESH_IDSource_ptr theObject = SMESH::SMESH_IDSource::_nil())
1075 throw (SALOME::SALOME_Exception);
1077 SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
1079 void dumpGroupsList(SMESH::TPythonDump & theDumpPython,
1080 const SMESH::ListOfGroups * theGroupList);
1082 string generateGroupName(const string& thePrefix);
1084 void prepareIdSource(SMESH::SMESH_IDSource_ptr theObject);
1086 private: //!< fields
1088 SMESH_Mesh_i* myMesh_i;
1089 SMESH_Mesh * myMesh;
1090 ::SMESH_MeshEditor myEditor;
1092 bool myIsPreviewMode;
1093 MeshEditor_I::TPreviewMesh * myPreviewMesh;
1094 ::SMESH_MeshEditor * myPreviewEditor;
1095 SMESH::MeshPreviewStruct_var myPreviewData;
1097 // temporary IDSources
1099 std::list< _IDSource* > myAuxIDSources;
1100 void deleteAuxIDSources();