1 // Copyright (C) 2007-2008 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
22 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
23 // File : SMESH_MeshEditor_i.hxx
24 // Author : Nicolas REJNERI
27 #ifndef _SMESH_MESHEDITOR_I_HXX_
28 #define _SMESH_MESHEDIOTR_I_HXX_
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
35 #include "SMESH_Mesh.hxx"
36 #include "SMESH_PythonDump.hxx"
39 class SMESH_MeshEditor;
42 class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
45 SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
47 virtual ~ SMESH_MeshEditor_i();
50 CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
51 CORBA::Boolean RemoveNodes(const SMESH::long_array & IDsOfNodes);
54 * Methods for creation new elements.
55 * Returns ID of created element or 0 if element not created
57 CORBA::Long AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z);
58 CORBA::Long Add0DElement(CORBA::Long IDOfNode);
59 CORBA::Long AddEdge(const SMESH::long_array & IDsOfNodes);
60 CORBA::Long AddFace(const SMESH::long_array & IDsOfNodes);
61 CORBA::Long AddPolygonalFace(const SMESH::long_array & IDsOfNodes);
62 CORBA::Long AddVolume(const SMESH::long_array & IDsOfNodes);
63 CORBA::Long AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes,
64 const SMESH::long_array & Quantities);
65 CORBA::Long AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces);
68 * \brief Bind a node to a vertex
69 * \param NodeID - node ID
70 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
72 void SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexID)
73 throw (SALOME::SALOME_Exception);
75 * \brief Store node position on an edge
76 * \param NodeID - node ID
77 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
78 * \param paramOnEdge - parameter on edge where the node is located
80 void SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
81 CORBA::Double paramOnEdge)
82 throw (SALOME::SALOME_Exception);
84 * \brief Store node position on a face
85 * \param NodeID - node ID
86 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
87 * \param u - U parameter on face where the node is located
88 * \param v - V parameter on face where the node is located
90 void SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
91 CORBA::Double u, CORBA::Double v)
92 throw (SALOME::SALOME_Exception);
94 * \brief Bind a node to a solid
95 * \param NodeID - node ID
96 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
98 void SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID)
99 throw (SALOME::SALOME_Exception);
101 * \brief Bind an element to a shape
102 * \param ElementID - element ID
103 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
105 void SetMeshElementOnShape(CORBA::Long ElementID, CORBA::Long ShapeID)
106 throw (SALOME::SALOME_Exception);
109 CORBA::Boolean MoveNode(CORBA::Long NodeID,
110 CORBA::Double x, CORBA::Double y, CORBA::Double z);
112 CORBA::Boolean InverseDiag(CORBA::Long NodeID1, CORBA::Long NodeID2);
113 CORBA::Boolean DeleteDiag(CORBA::Long NodeID1, CORBA::Long NodeID2);
114 CORBA::Boolean Reorient(const SMESH::long_array & IDsOfElements);
115 CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject);
118 CORBA::Boolean TriToQuad (const SMESH::long_array & IDsOfElements,
119 SMESH::NumericalFunctor_ptr Criterion,
120 CORBA::Double MaxAngle);
121 CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject,
122 SMESH::NumericalFunctor_ptr Criterion,
123 CORBA::Double MaxAngle);
124 CORBA::Boolean QuadToTri (const SMESH::long_array & IDsOfElements,
125 SMESH::NumericalFunctor_ptr Criterion);
126 CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
127 SMESH::NumericalFunctor_ptr Criterion);
128 CORBA::Boolean SplitQuad (const SMESH::long_array & IDsOfElements,
129 CORBA::Boolean Diag13);
130 CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
131 CORBA::Boolean Diag13);
132 CORBA::Long BestSplit (CORBA::Long IDOfQuad,
133 SMESH::NumericalFunctor_ptr Criterion);
135 CORBA::Boolean Smooth(const SMESH::long_array & IDsOfElements,
136 const SMESH::long_array & IDsOfFixedNodes,
137 CORBA::Long MaxNbOfIterations,
138 CORBA::Double MaxAspectRatio,
139 SMESH::SMESH_MeshEditor::Smooth_Method Method);
140 CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
141 const SMESH::long_array & IDsOfFixedNodes,
142 CORBA::Long MaxNbOfIterations,
143 CORBA::Double MaxAspectRatio,
144 SMESH::SMESH_MeshEditor::Smooth_Method Method);
145 CORBA::Boolean SmoothParametric(const SMESH::long_array & IDsOfElements,
146 const SMESH::long_array & IDsOfFixedNodes,
147 CORBA::Long MaxNbOfIterations,
148 CORBA::Double MaxAspectRatio,
149 SMESH::SMESH_MeshEditor::Smooth_Method Method);
150 CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
151 const SMESH::long_array & IDsOfFixedNodes,
152 CORBA::Long MaxNbOfIterations,
153 CORBA::Double MaxAspectRatio,
154 SMESH::SMESH_MeshEditor::Smooth_Method Method);
155 CORBA::Boolean smooth(const SMESH::long_array & IDsOfElements,
156 const SMESH::long_array & IDsOfFixedNodes,
157 CORBA::Long MaxNbOfIterations,
158 CORBA::Double MaxAspectRatio,
159 SMESH::SMESH_MeshEditor::Smooth_Method Method,
161 CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
162 const SMESH::long_array & IDsOfFixedNodes,
163 CORBA::Long MaxNbOfIterations,
164 CORBA::Double MaxAspectRatio,
165 SMESH::SMESH_MeshEditor::Smooth_Method Method,
169 void ConvertToQuadratic(CORBA::Boolean Force3d);
170 CORBA::Boolean ConvertFromQuadratic();
172 void RenumberNodes();
173 void RenumberElements();
175 void RotationSweep(const SMESH::long_array & IDsOfElements,
176 const SMESH::AxisStruct & Axis,
177 CORBA::Double AngleInRadians,
178 CORBA::Long NbOfSteps,
179 CORBA::Double Tolerance);
180 void RotationSweepObject(SMESH::SMESH_IDSource_ptr theObject,
181 const SMESH::AxisStruct & Axis,
182 CORBA::Double AngleInRadians,
183 CORBA::Long NbOfSteps,
184 CORBA::Double Tolerance);
185 void RotationSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
186 const SMESH::AxisStruct & Axis,
187 CORBA::Double AngleInRadians,
188 CORBA::Long NbOfSteps,
189 CORBA::Double Tolerance);
190 void RotationSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
191 const SMESH::AxisStruct & Axis,
192 CORBA::Double AngleInRadians,
193 CORBA::Long NbOfSteps,
194 CORBA::Double Tolerance);
196 void ExtrusionSweep(const SMESH::long_array & IDsOfElements,
197 const SMESH::DirStruct & StepVector,
198 CORBA::Long NbOfSteps);
199 void ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObject,
200 const SMESH::DirStruct & StepVector,
201 CORBA::Long NbOfSteps);
202 void ExtrusionSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
203 const SMESH::DirStruct & StepVector,
204 CORBA::Long NbOfSteps);
205 void ExtrusionSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
206 const SMESH::DirStruct & StepVector,
207 CORBA::Long NbOfSteps);
208 void AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
209 const SMESH::DirStruct & theStepVector,
210 CORBA::Long theNbOfSteps,
211 CORBA::Long theExtrFlags,
212 CORBA::Double theSewTolerance);
214 SMESH::SMESH_MeshEditor::Extrusion_Error
215 ExtrusionAlongPath(const SMESH::long_array & IDsOfElements,
216 SMESH::SMESH_Mesh_ptr PathMesh,
217 GEOM::GEOM_Object_ptr PathShape,
218 CORBA::Long NodeStart,
219 CORBA::Boolean HasAngles,
220 const SMESH::double_array & Angles,
221 CORBA::Boolean HasRefPoint,
222 const SMESH::PointStruct & RefPoint);
224 SMESH::SMESH_MeshEditor::Extrusion_Error
225 ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObject,
226 SMESH::SMESH_Mesh_ptr PathMesh,
227 GEOM::GEOM_Object_ptr PathShape,
228 CORBA::Long NodeStart,
229 CORBA::Boolean HasAngles,
230 const SMESH::double_array & Angles,
231 CORBA::Boolean HasRefPoint,
232 const SMESH::PointStruct & RefPoint);
233 SMESH::SMESH_MeshEditor::Extrusion_Error
234 ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr theObject,
235 SMESH::SMESH_Mesh_ptr PathMesh,
236 GEOM::GEOM_Object_ptr PathShape,
237 CORBA::Long NodeStart,
238 CORBA::Boolean HasAngles,
239 const SMESH::double_array & Angles,
240 CORBA::Boolean HasRefPoint,
241 const SMESH::PointStruct & RefPoint);
242 SMESH::SMESH_MeshEditor::Extrusion_Error
243 ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr theObject,
244 SMESH::SMESH_Mesh_ptr PathMesh,
245 GEOM::GEOM_Object_ptr PathShape,
246 CORBA::Long NodeStart,
247 CORBA::Boolean HasAngles,
248 const SMESH::double_array & Angles,
249 CORBA::Boolean HasRefPoint,
250 const SMESH::PointStruct & RefPoint);
252 SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr PathMesh,
253 GEOM::GEOM_Object_ptr PathShape,
254 const SMESH::double_array & Angles);
256 void Mirror(const SMESH::long_array & IDsOfElements,
257 const SMESH::AxisStruct & Axis,
258 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
259 CORBA::Boolean Copy);
260 void MirrorObject(SMESH::SMESH_IDSource_ptr theObject,
261 const SMESH::AxisStruct & Axis,
262 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
263 CORBA::Boolean Copy);
264 void Translate(const SMESH::long_array & IDsOfElements,
265 const SMESH::DirStruct & Vector,
266 CORBA::Boolean Copy);
267 void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
268 const SMESH::DirStruct & Vector,
269 CORBA::Boolean Copy);
270 void Rotate(const SMESH::long_array & IDsOfElements,
271 const SMESH::AxisStruct & Axis,
273 CORBA::Boolean Copy);
274 void RotateObject(SMESH::SMESH_IDSource_ptr theObject,
275 const SMESH::AxisStruct & Axis,
277 CORBA::Boolean Copy);
279 SMESH::ListOfGroups* RotationSweepMakeGroups(const SMESH::long_array& IDsOfElements,
280 const SMESH::AxisStruct& Axix,
281 CORBA::Double AngleInRadians,
282 CORBA::Long NbOfSteps,
283 CORBA::Double Tolerance);
284 SMESH::ListOfGroups* RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
285 const SMESH::AxisStruct& Axix,
286 CORBA::Double AngleInRadians,
287 CORBA::Long NbOfSteps,
288 CORBA::Double Tolerance);
289 SMESH::ListOfGroups* RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
290 const SMESH::AxisStruct& Axix,
291 CORBA::Double AngleInRadians,
292 CORBA::Long NbOfSteps,
293 CORBA::Double Tolerance);
294 SMESH::ListOfGroups* RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
295 const SMESH::AxisStruct& Axix,
296 CORBA::Double AngleInRadians,
297 CORBA::Long NbOfSteps,
298 CORBA::Double Tolerance);
299 SMESH::ListOfGroups* ExtrusionSweepMakeGroups(const SMESH::long_array& IDsOfElements,
300 const SMESH::DirStruct& StepVector,
301 CORBA::Long NbOfSteps);
302 SMESH::ListOfGroups* AdvancedExtrusionMakeGroups(const SMESH::long_array& IDsOfElements,
303 const SMESH::DirStruct& StepVector,
304 CORBA::Long NbOfSteps,
305 CORBA::Long ExtrFlags,
306 CORBA::Double SewTolerance);
307 SMESH::ListOfGroups* ExtrusionSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
308 const SMESH::DirStruct& StepVector,
309 CORBA::Long NbOfSteps);
310 SMESH::ListOfGroups* ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
311 const SMESH::DirStruct& StepVector,
312 CORBA::Long NbOfSteps);
313 SMESH::ListOfGroups* ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
314 const SMESH::DirStruct& StepVector,
315 CORBA::Long NbOfSteps);
316 SMESH::ListOfGroups* ExtrusionAlongPathMakeGroups(const SMESH::long_array& IDsOfElements,
317 SMESH::SMESH_Mesh_ptr PathMesh,
318 GEOM::GEOM_Object_ptr PathShape,
319 CORBA::Long NodeStart,
320 CORBA::Boolean HasAngles,
321 const SMESH::double_array& Angles,
322 CORBA::Boolean HasRefPoint,
323 const SMESH::PointStruct& RefPoint,
324 SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
325 SMESH::ListOfGroups* ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
326 SMESH::SMESH_Mesh_ptr PathMesh,
327 GEOM::GEOM_Object_ptr PathShape,
328 CORBA::Long NodeStart,
329 CORBA::Boolean HasAngles,
330 const SMESH::double_array& Angles,
331 CORBA::Boolean HasRefPoint,
332 const SMESH::PointStruct& RefPoint,
333 SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
334 SMESH::ListOfGroups* ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
335 SMESH::SMESH_Mesh_ptr PathMesh,
336 GEOM::GEOM_Object_ptr PathShape,
337 CORBA::Long NodeStart,
338 CORBA::Boolean HasAngles,
339 const SMESH::double_array& Angles,
340 CORBA::Boolean HasRefPoint,
341 const SMESH::PointStruct& RefPoint,
342 SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
343 SMESH::ListOfGroups* ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
344 SMESH::SMESH_Mesh_ptr PathMesh,
345 GEOM::GEOM_Object_ptr PathShape,
346 CORBA::Long NodeStart,
347 CORBA::Boolean HasAngles,
348 const SMESH::double_array& Angles,
349 CORBA::Boolean HasRefPoint,
350 const SMESH::PointStruct& RefPoint,
351 SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
354 SMESH::ListOfGroups* ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr Object,
355 SMESH::SMESH_IDSource_ptr Path,
356 CORBA::Long NodeStart,
357 CORBA::Boolean HasAngles,
358 const SMESH::double_array& Angles,
359 CORBA::Boolean LinearVariation,
360 CORBA::Boolean HasRefPoint,
361 const SMESH::PointStruct& RefPoint,
362 CORBA::Boolean MakeGroups,
363 SMESH::ElementType ElemType,
364 SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
365 SMESH::ListOfGroups* ExtrusionAlongPathX(const SMESH::long_array& IDsOfElements,
366 SMESH::SMESH_IDSource_ptr Path,
367 CORBA::Long NodeStart,
368 CORBA::Boolean HasAngles,
369 const SMESH::double_array& Angles,
370 CORBA::Boolean LinearVariation,
371 CORBA::Boolean HasRefPoint,
372 const SMESH::PointStruct& RefPoint,
373 CORBA::Boolean MakeGroups,
374 SMESH::ElementType ElemType,
375 SMESH::SMESH_MeshEditor::Extrusion_Error& Error);
377 SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array& IDsOfElements,
378 const SMESH::AxisStruct& Mirror,
379 SMESH::SMESH_MeshEditor::MirrorType MirrorType);
380 SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
381 const SMESH::AxisStruct& Mirror,
382 SMESH::SMESH_MeshEditor::MirrorType MirrorType);
383 SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::long_array& IDsOfElements,
384 const SMESH::DirStruct& Vector);
385 SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
386 const SMESH::DirStruct& Vector);
387 SMESH::ListOfGroups* RotateMakeGroups(const SMESH::long_array& IDsOfElements,
388 const SMESH::AxisStruct& Axis,
389 CORBA::Double AngleInRadians);
390 SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
391 const SMESH::AxisStruct& Axis,
392 CORBA::Double AngleInRadians);
394 SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::long_array& IDsOfElements,
395 const SMESH::AxisStruct& Mirror,
396 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
397 CORBA::Boolean CopyGroups,
398 const char* MeshName);
399 SMESH::SMESH_Mesh_ptr MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
400 const SMESH::AxisStruct& Mirror,
401 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
402 CORBA::Boolean CopyGroups,
403 const char* MeshName);
404 SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::long_array& IDsOfElements,
405 const SMESH::DirStruct& Vector,
406 CORBA::Boolean CopyGroups,
407 const char* MeshName);
408 SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
409 const SMESH::DirStruct& Vector,
410 CORBA::Boolean CopyGroups,
411 const char* MeshName);
412 SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::long_array& IDsOfElements,
413 const SMESH::AxisStruct& Axis,
414 CORBA::Double AngleInRadians,
415 CORBA::Boolean CopyGroups,
416 const char* MeshName);
417 SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
418 const SMESH::AxisStruct& Axis,
419 CORBA::Double AngleInRadians,
420 CORBA::Boolean CopyGroups,
421 const char* MeshName);
423 void FindCoincidentNodes (CORBA::Double Tolerance,
424 SMESH::array_of_long_array_out GroupsOfNodes);
425 void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr Object,
426 CORBA::Double Tolerance,
427 SMESH::array_of_long_array_out GroupsOfNodes);
428 void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes);
429 void FindEqualElements(SMESH::SMESH_IDSource_ptr Object,
430 SMESH::array_of_long_array_out GroupsOfElementsID);
431 void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID);
432 void MergeEqualElements();
433 CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
438 * \brief Return ID of node closest to a given point
440 CORBA::Long FindNodeClosestTo(CORBA::Double x,
444 * Return elements of given type where the given point is IN or ON.
446 * 'ALL' type means elements of any type excluding nodes
448 SMESH::long_array* FindElementsByPoint(CORBA::Double x,
451 SMESH::ElementType type);
454 SMESH::SMESH_MeshEditor::Sew_Error
455 SewFreeBorders(CORBA::Long FirstNodeID1,
456 CORBA::Long SecondNodeID1,
457 CORBA::Long LastNodeID1,
458 CORBA::Long FirstNodeID2,
459 CORBA::Long SecondNodeID2,
460 CORBA::Long LastNodeID2,
461 CORBA::Boolean CreatePolygons,
462 CORBA::Boolean CreatePolyedrs);
463 SMESH::SMESH_MeshEditor::Sew_Error
464 SewConformFreeBorders(CORBA::Long FirstNodeID1,
465 CORBA::Long SecondNodeID1,
466 CORBA::Long LastNodeID1,
467 CORBA::Long FirstNodeID2,
468 CORBA::Long SecondNodeID2);
469 SMESH::SMESH_MeshEditor::Sew_Error
470 SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
471 CORBA::Long SecondNodeIDOnFreeBorder,
472 CORBA::Long LastNodeIDOnFreeBorder,
473 CORBA::Long FirstNodeIDOnSide,
474 CORBA::Long LastNodeIDOnSide,
475 CORBA::Boolean CreatePolygons,
476 CORBA::Boolean CreatePolyedrs);
477 SMESH::SMESH_MeshEditor::Sew_Error
478 SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
479 const SMESH::long_array& IDsOfSide2Elements,
480 CORBA::Long NodeID1OfSide1ToMerge,
481 CORBA::Long NodeID1OfSide2ToMerge,
482 CORBA::Long NodeID2OfSide1ToMerge,
483 CORBA::Long NodeID2OfSide2ToMerge);
486 * Set new nodes for given element.
487 * If number of nodes is not corresponded to type of
488 * element - returns false
490 CORBA::Boolean ChangeElemNodes(CORBA::Long ide, const SMESH::long_array& newIDs);
493 * Return data of mesh edition preview
495 SMESH::MeshPreviewStruct* GetPreviewData();
498 * If during last operation of MeshEditor some nodes were
499 * created this method returns list of it's IDs, if new nodes
500 * not creared - returns empty list
502 SMESH::long_array* GetLastCreatedNodes();
505 * If during last operation of MeshEditor some elements were
506 * created this method returns list of it's IDs, if new elements
507 * not creared - returns empty list
509 SMESH::long_array* GetLastCreatedElems();
512 * \brief Return edited mesh ID
513 * \retval int - mesh ID
515 int GetMeshId() const { return myMesh->GetId(); }
517 CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
518 const SMESH::long_array& theModifiedElems );
520 CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
521 const SMESH::long_array& theModifiedElems );
523 CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
524 SMESH::SMESH_GroupBase_ptr theModifiedElems );
526 CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
527 const SMESH::ListOfGroups& theModifiedElems);
530 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
531 * \param theElems - the list of elements (edges or faces) to be replicated
532 * The nodes for duplication could be found from these elements
533 * \param theNodesNot - list of nodes to NOT replicate
534 * \param theAffectedElems - the list of elements (cells and edges) to which the
535 * replicated nodes should be associated to.
536 * \return TRUE if operation has been completed successfully, FALSE otherwise
537 * \sa DoubleNodeGroup(), DoubleNodeGroups()
539 CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems,
540 const SMESH::long_array& theNodesNot,
541 const SMESH::long_array& theAffectedElems );
544 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
545 * \param theElems - the list of elements (edges or faces) to be replicated
546 * The nodes for duplication could be found from these elements
547 * \param theNodesNot - list of nodes to NOT replicate
548 * \param theShape - shape to detect affected elements (element which geometric center
549 * located on or inside shape).
550 * The replicated nodes should be associated to affected elements.
551 * \return TRUE if operation has been completed successfully, FALSE otherwise
552 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
554 CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems,
555 const SMESH::long_array& theNodesNot,
556 GEOM::GEOM_Object_ptr theShape );
559 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
560 * \param theElems - group of of elements (edges or faces) to be replicated
561 * \param theNodesNot - group of nodes not to replicated
562 * \param theAffectedElems - group of elements to which the replicated nodes
563 * should be associated to.
564 * \return TRUE if operation has been completed successfully, FALSE otherwise
565 * \sa DoubleNodes(), DoubleNodeGroups()
567 CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
568 SMESH::SMESH_GroupBase_ptr theNodesNot,
569 SMESH::SMESH_GroupBase_ptr theAffectedElems );
572 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
573 * \param theElems - group of of elements (edges or faces) to be replicated
574 * \param theNodesNot - group of nodes not to replicated
575 * \param theShape - shape to detect affected elements (element which geometric center
576 * located on or inside shape).
577 * The replicated nodes should be associated to affected elements.
578 * \return TRUE if operation has been completed successfully, FALSE otherwise
579 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
581 CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
582 SMESH::SMESH_GroupBase_ptr theNodesNot,
583 GEOM::GEOM_Object_ptr theShape );
586 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
587 * This method provided for convenience works as DoubleNodes() described above.
588 * \param theElems - list of groups of elements (edges or faces) to be replicated
589 * \param theNodesNot - list of groups of nodes not to replicated
590 * \param theAffectedElems - group of elements to which the replicated nodes
591 * should be associated to.
592 * \return TRUE if operation has been completed successfully, FALSE otherwise
593 * \sa DoubleNodeGroup(), DoubleNodes()
595 CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
596 const SMESH::ListOfGroups& theNodesNot,
597 const SMESH::ListOfGroups& theAffectedElems );
601 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
602 * This method provided for convenience works as DoubleNodes() described above.
603 * \param theElems - list of groups of elements (edges or faces) to be replicated
604 * \param theNodesNot - list of groups of nodes not to replicated
605 * \param theShape - shape to detect affected elements (element which geometric center
606 * located on or inside shape).
607 * The replicated nodes should be associated to affected elements.
608 * \return TRUE if operation has been completed successfully, FALSE otherwise
609 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
611 CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
612 const SMESH::ListOfGroups& theNodesNot,
613 GEOM::GEOM_Object_ptr theShape );
616 * \brief Generated skin mesh (containing 2D cells) from 3D mesh
617 * The created 2D mesh elements based on nodes of free faces of boundary volumes
618 * \return TRUE if operation has been completed successfully, FALSE otherwise
620 CORBA::Boolean Make2DMeshFrom3D();
622 private: //!< private methods
624 SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
627 * \brief Update myLastCreated* or myPreviewData
628 * \param anEditor - it contains edition results
630 void storeResult(::SMESH_MeshEditor& anEditor);
632 * \brief Clear myLastCreated* or myPreviewData
634 void initData(bool deleteSearchers=true);
637 * \brief Return groups by their IDs
639 SMESH::ListOfGroups* getGroups(const std::list<int>* groupIDs);
641 SMESH::ListOfGroups* rotationSweep(const SMESH::long_array & IDsOfElements,
642 const SMESH::AxisStruct & Axis,
643 CORBA::Double AngleInRadians,
644 CORBA::Long NbOfSteps,
645 CORBA::Double Tolerance,
646 const bool MakeGroups,
647 const SMDSAbs_ElementType ElementType=SMDSAbs_All);
648 SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array & IDsOfElements,
649 const SMESH::DirStruct & StepVector,
650 CORBA::Long NbOfSteps,
651 const bool MakeGroups,
652 const SMDSAbs_ElementType ElementType=SMDSAbs_All);
653 SMESH::ListOfGroups* advancedExtrusion(const SMESH::long_array & theIDsOfElements,
654 const SMESH::DirStruct & theStepVector,
655 CORBA::Long theNbOfSteps,
656 CORBA::Long theExtrFlags,
657 CORBA::Double theSewTolerance,
658 const bool MakeGroups);
659 SMESH::ListOfGroups* extrusionAlongPath(const SMESH::long_array & IDsOfElements,
660 SMESH::SMESH_Mesh_ptr PathMesh,
661 GEOM::GEOM_Object_ptr PathShape,
662 CORBA::Long NodeStart,
663 CORBA::Boolean HasAngles,
664 const SMESH::double_array & Angles,
665 CORBA::Boolean HasRefPoint,
666 const SMESH::PointStruct & RefPoint,
667 const bool MakeGroups,
668 SMESH::SMESH_MeshEditor::Extrusion_Error & Error,
669 const SMDSAbs_ElementType ElementType=SMDSAbs_All);
670 SMESH::ListOfGroups* extrusionAlongPathX(const SMESH::long_array & IDsOfElements,
671 SMESH::SMESH_IDSource_ptr Path,
672 CORBA::Long NodeStart,
673 CORBA::Boolean HasAngles,
674 const SMESH::double_array& Angles,
675 CORBA::Boolean LinearVariation,
676 CORBA::Boolean HasRefPoint,
677 const SMESH::PointStruct& RefPoint,
678 const bool MakeGroups,
679 const SMDSAbs_ElementType ElementType,
680 SMESH::SMESH_MeshEditor::Extrusion_Error & theError);
681 SMESH::ListOfGroups* mirror(const SMESH::long_array & IDsOfElements,
682 const SMESH::AxisStruct & Axis,
683 SMESH::SMESH_MeshEditor::MirrorType MirrorType,
685 const bool MakeGroups,
686 ::SMESH_Mesh* TargetMesh=0);
687 SMESH::ListOfGroups* translate(const SMESH::long_array & IDsOfElements,
688 const SMESH::DirStruct & Vector,
690 const bool MakeGroups,
691 ::SMESH_Mesh* TargetMesh=0);
692 SMESH::ListOfGroups* rotate(const SMESH::long_array & IDsOfElements,
693 const SMESH::AxisStruct & Axis,
696 const bool MakeGroups,
697 ::SMESH_Mesh* TargetMesh=0);
699 SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
701 void DumpGroupsList(SMESH::TPythonDump & theDumpPython,
702 const SMESH::ListOfGroups * theGroupList);
706 SMESH_Mesh_i* myMesh_i;
709 SMESH::long_array_var myLastCreatedElems;
710 SMESH::long_array_var myLastCreatedNodes;
712 SMESH::MeshPreviewStruct_var myPreviewData;