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 CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
727 const SMESH::long_array& theModifiedElems )
728 throw (SALOME::SALOME_Exception);
730 CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
731 const SMESH::long_array& theModifiedElems )
732 throw (SALOME::SALOME_Exception);
734 CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
735 SMESH::SMESH_GroupBase_ptr theModifiedElems )
736 throw (SALOME::SALOME_Exception);
739 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
740 * Works as DoubleNodeGroup(), but returns a new group with newly created nodes.
741 * \param theNodes - group of nodes to be doubled.
742 * \param theModifiedElems - group of elements to be updated.
743 * \return a new group with newly created nodes
744 * \sa DoubleNodeGroup()
746 SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
747 SMESH::SMESH_GroupBase_ptr theModifiedElems )
748 throw (SALOME::SALOME_Exception);
750 CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
751 const SMESH::ListOfGroups& theModifiedElems )
752 throw (SALOME::SALOME_Exception);
754 SMESH::SMESH_Group_ptr DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
755 const SMESH::ListOfGroups& theModifiedElems )
756 throw (SALOME::SALOME_Exception);
759 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
760 * \param theElems - the list of elements (edges or faces) to be replicated
761 * The nodes for duplication could be found from these elements
762 * \param theNodesNot - list of nodes to NOT replicate
763 * \param theAffectedElems - the list of elements (cells and edges) to which the
764 * replicated nodes should be associated to.
765 * \return TRUE if operation has been completed successfully, FALSE otherwise
766 * \sa DoubleNodeGroup(), DoubleNodeGroups()
768 CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems,
769 const SMESH::long_array& theNodesNot,
770 const SMESH::long_array& theAffectedElems )
771 throw (SALOME::SALOME_Exception);
774 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
775 * \param theElems - the list of elements (edges or faces) to be replicated
776 * The nodes for duplication could be found from these elements
777 * \param theNodesNot - list of nodes to NOT replicate
778 * \param theShape - shape to detect affected elements (element which geometric center
779 * located on or inside shape).
780 * The replicated nodes should be associated to affected elements.
781 * \return TRUE if operation has been completed successfully, FALSE otherwise
782 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
784 CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems,
785 const SMESH::long_array& theNodesNot,
786 GEOM::GEOM_Object_ptr theShape )
787 throw (SALOME::SALOME_Exception);
790 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
791 * \param theElems - group of of elements (edges or faces) to be replicated
792 * \param theNodesNot - group of nodes not to replicated
793 * \param theAffectedElems - group of elements to which the replicated nodes
794 * should be associated to.
795 * \return TRUE if operation has been completed successfully, FALSE otherwise
796 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
798 CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
799 SMESH::SMESH_GroupBase_ptr theNodesNot,
800 SMESH::SMESH_GroupBase_ptr theAffectedElems )
801 throw (SALOME::SALOME_Exception);
804 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
805 * Works as DoubleNodeElemGroup(), but returns a new group with newly created elements.
806 * \param theElems - group of of elements (edges or faces) to be replicated
807 * \param theNodesNot - group of nodes not to replicated
808 * \param theAffectedElems - group of elements to which the replicated nodes
809 * should be associated to.
810 * \return a new group with newly created elements
811 * \sa DoubleNodeElemGroup()
813 SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
814 SMESH::SMESH_GroupBase_ptr theNodesNot,
815 SMESH::SMESH_GroupBase_ptr theAffectedElems )
816 throw (SALOME::SALOME_Exception);
818 SMESH::ListOfGroups* DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
819 SMESH::SMESH_GroupBase_ptr theNodesNot,
820 SMESH::SMESH_GroupBase_ptr theAffectedElems,
821 CORBA::Boolean theElemGroupNeeded,
822 CORBA::Boolean theNodeGroupNeeded)
823 throw (SALOME::SALOME_Exception);
826 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
827 * \param theElems - group of of elements (edges or faces) to be replicated
828 * \param theNodesNot - group of nodes not to replicated
829 * \param theShape - shape to detect affected elements (element which geometric center
830 * located on or inside shape).
831 * The replicated nodes should be associated to affected elements.
832 * \return TRUE if operation has been completed successfully, FALSE otherwise
833 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
835 CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
836 SMESH::SMESH_GroupBase_ptr theNodesNot,
837 GEOM::GEOM_Object_ptr theShape )
838 throw (SALOME::SALOME_Exception);
841 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
842 * This method provided for convenience works as DoubleNodes() described above.
843 * \param theElems - list of groups of elements (edges or faces) to be replicated
844 * \param theNodesNot - list of groups of nodes not to replicated
845 * \param theAffectedElems - group of elements to which the replicated nodes
846 * should be associated to.
847 * \return TRUE if operation has been completed successfully, FALSE otherwise
848 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
850 CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
851 const SMESH::ListOfGroups& theNodesNot,
852 const SMESH::ListOfGroups& theAffectedElems )
853 throw (SALOME::SALOME_Exception);
856 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
857 * Works as DoubleNodeElemGroups(), but returns a new group with newly created elements.
858 * \param theElems - list of groups of elements (edges or faces) to be replicated
859 * \param theNodesNot - list of groups of nodes not to replicated
860 * \param theAffectedElems - group of elements to which the replicated nodes
861 * should be associated to.
862 * \return a new group with newly created elements
863 * \sa DoubleNodeElemGroups()
865 SMESH::SMESH_Group_ptr DoubleNodeElemGroupsNew( const SMESH::ListOfGroups& theElems,
866 const SMESH::ListOfGroups& theNodesNot,
867 const SMESH::ListOfGroups& theAffectedElems )
868 throw (SALOME::SALOME_Exception);
870 SMESH::ListOfGroups* DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems,
871 const SMESH::ListOfGroups& theNodesNot,
872 const SMESH::ListOfGroups& theAffectedElems,
873 CORBA::Boolean theElemGroupNeeded,
874 CORBA::Boolean theNodeGroupNeeded)
875 throw (SALOME::SALOME_Exception);
878 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
879 * This method provided for convenience works as DoubleNodes() described above.
880 * \param theElems - list of groups of elements (edges or faces) to be replicated
881 * \param theNodesNot - list of groups of nodes not to replicated
882 * \param theShape - shape to detect affected elements (element which geometric center
883 * located on or inside shape).
884 * The replicated nodes should be associated to affected elements.
885 * \return TRUE if operation has been completed successfully, FALSE otherwise
886 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
888 CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
889 const SMESH::ListOfGroups& theNodesNot,
890 GEOM::GEOM_Object_ptr theShape )
891 throw (SALOME::SALOME_Exception);
894 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed.
895 * This method is the first step of DoubleNodeElemGroupsInRegion.
896 * \param theElems - list of groups of elements (edges or faces) to be replicated
897 * \param theNodesNot - list of groups of nodes not to replicated
898 * \param theShape - shape to detect affected elements (element which geometric center
899 * located on or inside shape).
900 * The replicated nodes should be associated to affected elements.
901 * \return groups of affected elements
902 * \sa DoubleNodeElemGroupsInRegion()
904 SMESH::ListOfGroups* AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
905 const SMESH::ListOfGroups& theNodesNot,
906 GEOM::GEOM_Object_ptr theShape )
907 throw (SALOME::SALOME_Exception);
910 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
911 * The list of groups must describe a partition of the mesh volumes.
912 * The nodes of the internal faces at the boundaries of the groups are doubled.
913 * In option, the internal faces are replaced by flat elements.
914 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
915 * @param theDomains - list of groups of volumes
916 * @param createJointElems - if TRUE, create the elements
917 * @return TRUE if operation has been completed successfully, FALSE otherwise
919 CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
920 CORBA::Boolean createJointElems )
921 throw (SALOME::SALOME_Exception);
923 * \brief Double nodes on some external faces and create flat elements.
924 * Flat elements are mainly used by some types of mechanic calculations.
926 * Each group of the list must be constituted of faces.
927 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
928 * @param theGroupsOfFaces - list of groups of faces
929 * @return TRUE if operation has been completed successfully, FALSE otherwise
931 CORBA::Boolean CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups& theGroupsOfFaces )
932 throw (SALOME::SALOME_Exception);
935 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
936 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
937 * groups of faces to remove insidethe object, (idem edges).
938 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
940 void CreateHoleSkin(CORBA::Double radius,
941 GEOM::GEOM_Object_ptr theShape,
942 const char* groupName,
943 const SMESH::double_array& theNodesCoords,
944 SMESH::array_of_long_array_out GroupsOfNodes)
945 throw (SALOME::SALOME_Exception);
948 * \brief Generated skin mesh (containing 2D cells) from 3D mesh
949 * The created 2D mesh elements based on nodes of free faces of boundary volumes
950 * \return TRUE if operation has been completed successfully, FALSE otherwise
952 CORBA::Boolean Make2DMeshFrom3D()
953 throw (SALOME::SALOME_Exception);
955 SMESH::SMESH_Mesh_ptr MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
956 SMESH::Bnd_Dimension dimension,
957 const char* groupName,
958 const char* meshName,
959 CORBA::Boolean toCopyElements,
960 CORBA::Boolean toCopyMissingBondary,
961 SMESH::SMESH_Group_out group)
962 throw (SALOME::SALOME_Exception);
964 CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
965 const char* groupName,
966 const char* meshName,
967 CORBA::Boolean toCopyAll,
968 const SMESH::ListOfIDSources& groups,
969 SMESH::SMESH_Mesh_out mesh,
970 SMESH::SMESH_Group_out group)
971 throw (SALOME::SALOME_Exception);
973 private: //!< private methods
975 ::SMESH_MeshEditor& getEditor();
977 SMESHDS_Mesh * getMeshDS() { return myMesh->GetMeshDS(); }
979 MeshEditor_I::TPreviewMesh * getPreviewMesh( SMDSAbs_ElementType previewType = SMDSAbs_All );
981 void declareMeshModified( bool isReComputeSafe );
984 * \brief Clear myLastCreated* or myPreviewData
986 void initData(bool deleteSearchers=true);
989 * \brief Return groups by their IDs
991 SMESH::ListOfGroups* getGroups(const std::list<int>* groupIDs)
992 throw (SALOME::SALOME_Exception);
994 SMESH::ListOfGroups* rotationSweep(const SMESH::long_array & IDsOfElements,
995 const SMESH::AxisStruct & Axis,
996 CORBA::Double AngleInRadians,
997 CORBA::Long NbOfSteps,
998 CORBA::Double Tolerance,
999 const bool MakeGroups,
1000 const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1001 throw (SALOME::SALOME_Exception);
1002 SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array & IDsOfElements,
1003 const SMESH::DirStruct & StepVector,
1004 CORBA::Long NbOfSteps,
1006 const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1007 throw (SALOME::SALOME_Exception);
1008 SMESH::ListOfGroups* advancedExtrusion(const SMESH::long_array & theIDsOfElements,
1009 const SMESH::DirStruct & theStepVector,
1010 CORBA::Long theNbOfSteps,
1011 CORBA::Long theExtrFlags,
1012 CORBA::Double theSewTolerance,
1013 const bool MakeGroups)
1014 throw (SALOME::SALOME_Exception);
1015 SMESH::ListOfGroups* extrusionAlongPath(const SMESH::long_array & IDsOfElements,
1016 SMESH::SMESH_Mesh_ptr PathMesh,
1017 GEOM::GEOM_Object_ptr PathShape,
1018 CORBA::Long NodeStart,
1019 CORBA::Boolean HasAngles,
1020 const SMESH::double_array & Angles,
1021 CORBA::Boolean HasRefPoint,
1022 const SMESH::PointStruct & RefPoint,
1023 const bool MakeGroups,
1024 SMESH::SMESH_MeshEditor::Extrusion_Error & Error,
1025 const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1026 throw (SALOME::SALOME_Exception);
1027 SMESH::ListOfGroups* extrusionAlongPathX(const SMESH::long_array & IDsOfElements,
1028 SMESH::SMESH_IDSource_ptr Path,
1029 CORBA::Long NodeStart,
1030 CORBA::Boolean HasAngles,
1031 const SMESH::double_array& Angles,
1032 CORBA::Boolean LinearVariation,
1033 CORBA::Boolean HasRefPoint,
1034 const SMESH::PointStruct& RefPoint,
1036 const SMDSAbs_ElementType ElementType,
1037 SMESH::SMESH_MeshEditor::Extrusion_Error & theError)
1038 throw (SALOME::SALOME_Exception);
1039 SMESH::ListOfGroups* mirror(TIDSortedElemSet & IDsOfElements,
1040 const SMESH::AxisStruct & Axis,
1041 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
1042 CORBA::Boolean Copy,
1044 ::SMESH_Mesh* TargetMesh=0)
1045 throw (SALOME::SALOME_Exception);
1046 SMESH::ListOfGroups* translate(TIDSortedElemSet & IDsOfElements,
1047 const SMESH::DirStruct & Vector,
1048 CORBA::Boolean Copy,
1050 ::SMESH_Mesh* TargetMesh=0)
1051 throw (SALOME::SALOME_Exception);
1052 SMESH::ListOfGroups* rotate(TIDSortedElemSet & IDsOfElements,
1053 const SMESH::AxisStruct & Axis,
1054 CORBA::Double Angle,
1055 CORBA::Boolean Copy,
1057 ::SMESH_Mesh* TargetMesh=0)
1058 throw (SALOME::SALOME_Exception);
1060 SMESH::ListOfGroups* scale(SMESH::SMESH_IDSource_ptr theObject,
1061 const SMESH::PointStruct& thePoint,
1062 const SMESH::double_array& theScaleFact,
1063 CORBA::Boolean theCopy,
1065 ::SMESH_Mesh* theTargetMesh=0)
1066 throw (SALOME::SALOME_Exception);
1068 void convertToQuadratic(CORBA::Boolean theForce3d,
1069 CORBA::Boolean theToBiQuad,
1070 SMESH::SMESH_IDSource_ptr theObject = SMESH::SMESH_IDSource::_nil())
1071 throw (SALOME::SALOME_Exception);
1073 SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
1075 void dumpGroupsList(SMESH::TPythonDump & theDumpPython,
1076 const SMESH::ListOfGroups * theGroupList);
1078 string generateGroupName(const string& thePrefix);
1080 private: //!< fields
1082 SMESH_Mesh_i* myMesh_i;
1083 SMESH_Mesh * myMesh;
1084 ::SMESH_MeshEditor myEditor;
1086 bool myIsPreviewMode;
1087 MeshEditor_I::TPreviewMesh * myPreviewMesh;
1088 ::SMESH_MeshEditor * myPreviewEditor;
1089 SMESH::MeshPreviewStruct_var myPreviewData;
1091 // temporary IDSources
1093 std::list< _IDSource* > myAuxIDSources;
1094 void deleteAuxIDSources();