Version: 9.12.0
SMESH_MeshEditor_i.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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, or (at your option) any later version.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
24 // File : SMESH_MeshEditor_i.hxx
25 // Author : Nicolas REJNERI
26 // Module : SMESH
27 //
28 #ifndef _SMESH_MESHEDITOR_I_HXX_
29 #define _SMESH_MESHEDIOTR_I_HXX_
30 
31 #include "SMESH.hxx"
32 
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
35 
36 #include "SMESH_Mesh.hxx"
37 #include "SMESH_PythonDump.hxx"
38 #include "SMESH_MeshEditor.hxx"
39 #include <list>
40 #include <string>
41 
42 class SMESH_Mesh_i;
43 
44 namespace MeshEditor_I {
45  struct TPreviewMesh;
46  struct ExtrusionParams;
47 }
48 
49 class SMESH_I_EXPORT SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
50 {
51 public:
52  SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
53 
59  int GetMeshId() const { return myMesh->GetId(); }
60 
61  SMESH::SMESH_Mesh_ptr GetMesh();
62 
63  // --- CORBA
64 
68  SMESH::MeshPreviewStruct* GetPreviewData();
74  SMESH::smIdType_array* GetLastCreatedNodes();
80  SMESH::smIdType_array* GetLastCreatedElems();
84  void ClearLastCreated();
88  SMESH::ComputeError* GetLastError();
89 
93  SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::smIdType_array& IDsOfElements,
94  SMESH::ElementType type);
95  static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
96  static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, SMESH::smIdType& nbIds );
97 
101  std::string GenerateGroupName(const std::string& thePrefix);
102 
103  CORBA::Boolean RemoveElements(const SMESH::smIdType_array & IDsOfElements);
104  CORBA::Boolean RemoveNodes (const SMESH::smIdType_array & IDsOfNodes);
105  SMESH::smIdType RemoveOrphanNodes();
106  void RemoveNodeWithReconnection(SMESH::smIdType nodeID);
107 
112  SMESH::smIdType AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z);
113  SMESH::smIdType Add0DElement(SMESH::smIdType IDOfNode, CORBA::Boolean DuplicateElements);
114  SMESH::smIdType AddBall(SMESH::smIdType IDOfNodem, CORBA::Double diameter);
115  SMESH::smIdType AddEdge(const SMESH::smIdType_array & IDsOfNodes);
116  SMESH::smIdType AddFace(const SMESH::smIdType_array & IDsOfNodes);
117  SMESH::smIdType AddPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
118  SMESH::smIdType AddQuadPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
119  SMESH::smIdType AddVolume(const SMESH::smIdType_array & IDsOfNodes);
120  SMESH::smIdType AddPolyhedralVolume(const SMESH::smIdType_array & IDsOfNodes,
121  const SMESH::long_array & Quantities);
122  SMESH::smIdType AddPolyhedralVolumeByFaces(const SMESH::smIdType_array & IdsOfFaces);
123 
134  SMESH::SMESH_IDSource_ptr Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObject,
135  const char* theGroupName,
136  CORBA::Boolean theDuplicateElements);
137 
143  void SetNodeOnVertex(SMESH::smIdType NodeID, CORBA::Long VertexID);
150  void SetNodeOnEdge(SMESH::smIdType NodeID, CORBA::Long EdgeID,
151  CORBA::Double paramOnEdge);
159  void SetNodeOnFace(SMESH::smIdType NodeID, CORBA::Long FaceID,
160  CORBA::Double u, CORBA::Double v);
166  void SetNodeInVolume(SMESH::smIdType NodeID, CORBA::Long SolidID);
172  void SetMeshElementOnShape(SMESH::smIdType ElementID, CORBA::Long ShapeID);
173 
177  CORBA::Boolean MoveNode(SMESH::smIdType NodeID,
178  CORBA::Double x, CORBA::Double y, CORBA::Double z);
179 
183  CORBA::Boolean InverseDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
188  CORBA::Boolean DeleteDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
193  void AddNodeOnSegment(SMESH::smIdType segmentNode1, SMESH::smIdType segmentNode2,
194  CORBA::Double position);
199  void AddNodeOnFace(SMESH::smIdType triangle,
200  CORBA::Double x, CORBA::Double y, CORBA::Double z);
201 
205  CORBA::Boolean Reorient(const SMESH::smIdType_array & IDsOfElements);
209  CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject);
219  CORBA::Long Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup,
220  const SMESH::DirStruct& theDirection,
221  CORBA::Long theFace,
222  const SMESH::PointStruct& thePoint);
232  CORBA::Long Reorient2DByNeighbours(const SMESH::ListOfIDSources& objectFaces,
233  const SMESH::ListOfIDSources& referenceFaces);
242  CORBA::Long Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
243  SMESH::SMESH_IDSource_ptr volumes,
244  CORBA::Boolean outsideNormal);
245 
246  // Split/Join
247  CORBA::Boolean TriToQuad (const SMESH::smIdType_array & IDsOfElements,
248  SMESH::NumericalFunctor_ptr Criterion,
249  CORBA::Double MaxAngle);
250  CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject,
251  SMESH::NumericalFunctor_ptr Criterion,
252  CORBA::Double MaxAngle);
253  CORBA::Boolean QuadToTri (const SMESH::smIdType_array & IDsOfElements,
254  SMESH::NumericalFunctor_ptr Criterion);
255  CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
256  SMESH::NumericalFunctor_ptr Criterion);
257  void QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject);
258  CORBA::Boolean SplitQuad (const SMESH::smIdType_array & IDsOfElements,
259  CORBA::Boolean Diag13);
260  CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
261  CORBA::Boolean Diag13);
262  CORBA::Short BestSplit (SMESH::smIdType IDOfQuad,
263  SMESH::NumericalFunctor_ptr Criterion);
264  void SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
265  CORBA::Short methodFlags);
266  void SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr elems,
267  const SMESH::PointStruct & startHexPoint,
268  const SMESH::DirStruct& facetToSplitNormal,
269  CORBA::Short methodFlags,
270  CORBA::Boolean allDomains);
271  void SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources& elems);
272 
273  CORBA::Boolean Smooth(const SMESH::smIdType_array & IDsOfElements,
274  const SMESH::smIdType_array & IDsOfFixedNodes,
275  CORBA::Short MaxNbOfIterations,
276  CORBA::Double MaxAspectRatio,
278  CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
279  const SMESH::smIdType_array & IDsOfFixedNodes,
280  CORBA::Short MaxNbOfIterations,
281  CORBA::Double MaxAspectRatio,
283  CORBA::Boolean SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
284  const SMESH::smIdType_array & IDsOfFixedNodes,
285  CORBA::Short MaxNbOfIterations,
286  CORBA::Double MaxAspectRatio,
288  CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
289  const SMESH::smIdType_array & IDsOfFixedNodes,
290  CORBA::Short MaxNbOfIterations,
291  CORBA::Double MaxAspectRatio,
293  CORBA::Boolean smooth(const SMESH::smIdType_array & IDsOfElements,
294  const SMESH::smIdType_array & IDsOfFixedNodes,
295  CORBA::Short MaxNbOfIterations,
296  CORBA::Double MaxAspectRatio,
298  bool IsParametric);
299  CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
300  const SMESH::smIdType_array & IDsOfFixedNodes,
301  CORBA::Short MaxNbOfIterations,
302  CORBA::Double MaxAspectRatio,
304  bool IsParametric);
305 
306  CORBA::Boolean ConvertFromQuadratic();
307  void ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr theObject);
308  void ConvertToQuadratic(CORBA::Boolean Force3d);
309  void ConvertToQuadraticObject(CORBA::Boolean theForce3d,
310  SMESH::SMESH_IDSource_ptr theObject);
311  void ConvertToBiQuadratic(CORBA::Boolean theForce3d,
312  SMESH::SMESH_IDSource_ptr theObject);
313 
314  void RenumberNodes();
315  void RenumberElements();
316 
317  SMESH::ListOfGroups* RotationSweepObjects(const SMESH::ListOfIDSources & Nodes,
318  const SMESH::ListOfIDSources & Edges,
319  const SMESH::ListOfIDSources & Faces,
320  const SMESH::AxisStruct & Axis,
321  CORBA::Double AngleInRadians,
322  CORBA::Long NbOfSteps,
323  CORBA::Double Tolerance,
324  CORBA::Boolean ToMakeGroups);
325 
326  SMESH::ListOfGroups* ExtrusionSweepObjects(const SMESH::ListOfIDSources & Nodes,
327  const SMESH::ListOfIDSources & Edges,
328  const SMESH::ListOfIDSources & Faces,
329  const SMESH::DirStruct & StepVector,
330  CORBA::Long NbOfSteps,
331  CORBA::Boolean ToMakeGroups,
332  const SMESH::double_array & ScaleFactors,
333  CORBA::Boolean ScalesVariation,
334  const SMESH::double_array & BasePoint,
335  const SMESH::double_array & Angles,
336  CORBA::Boolean AnglesVariation);
337 
338  SMESH::ListOfGroups* ExtrusionByNormal(const SMESH::ListOfIDSources& objects,
339  CORBA::Double stepSize,
340  CORBA::Long nbOfSteps,
341  CORBA::Boolean byAverageNormal,
342  CORBA::Boolean useInputElemsOnly,
343  CORBA::Boolean makeGroups,
344  CORBA::Short dim);
345  SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
346  const SMESH::DirStruct & theStepVector,
347  CORBA::Long theNbOfSteps,
348  CORBA::Long theExtrFlags,
349  CORBA::Double theSewTolerance,
350  CORBA::Boolean theMakeGroups);
351 
353  ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & Nodes,
354  const SMESH::ListOfIDSources & Edges,
355  const SMESH::ListOfIDSources & Faces,
356  SMESH::SMESH_IDSource_ptr PathMesh,
357  GEOM::GEOM_Object_ptr PathShape,
358  SMESH::smIdType NodeStart,
359  CORBA::Boolean HasAngles,
360  const SMESH::double_array & Angles,
361  CORBA::Boolean AnglesVariation,
362  CORBA::Boolean HasRefPoint,
363  const SMESH::PointStruct & RefPoint,
364  bool MakeGroups,
365  const SMESH::double_array & ScaleFactors,
366  CORBA::Boolean ScalesVariation,
368 
369  SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr PathMesh,
370  GEOM::GEOM_Object_ptr PathShape,
371  const SMESH::double_array & Angles);
372 
373  void Mirror(const SMESH::smIdType_array & IDsOfElements,
374  const SMESH::AxisStruct & Axis,
376  CORBA::Boolean Copy);
377  void MirrorObject(SMESH::SMESH_IDSource_ptr theObject,
378  const SMESH::AxisStruct & Axis,
380  CORBA::Boolean Copy);
381  void Translate(const SMESH::smIdType_array & IDsOfElements,
382  const SMESH::DirStruct & Vector,
383  CORBA::Boolean Copy);
384  void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
385  const SMESH::DirStruct & Vector,
386  CORBA::Boolean Copy);
387  void Rotate(const SMESH::smIdType_array & IDsOfElements,
388  const SMESH::AxisStruct & Axis,
389  CORBA::Double Angle,
390  CORBA::Boolean Copy);
391  void RotateObject(SMESH::SMESH_IDSource_ptr theObject,
392  const SMESH::AxisStruct & Axis,
393  CORBA::Double Angle,
394  CORBA::Boolean Copy);
395 
396  SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::smIdType_array& IDsOfElements,
397  const SMESH::AxisStruct& Mirror,
399  SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
400  const SMESH::AxisStruct& Mirror,
402  SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
403  const SMESH::DirStruct& Vector);
404  SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
405  const SMESH::DirStruct& Vector);
406  SMESH::ListOfGroups* RotateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
407  const SMESH::AxisStruct& Axis,
408  CORBA::Double AngleInRadians);
409  SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
410  const SMESH::AxisStruct& Axis,
411  CORBA::Double AngleInRadians);
412 
413  SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::smIdType_array& IDsOfElements,
414  const SMESH::AxisStruct& Mirror,
416  CORBA::Boolean CopyGroups,
417  const char* MeshName);
418  SMESH::SMESH_Mesh_ptr MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
419  const SMESH::AxisStruct& Mirror,
421  CORBA::Boolean CopyGroups,
422  const char* MeshName);
423  SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
424  const SMESH::DirStruct& Vector,
425  CORBA::Boolean CopyGroups,
426  const char* MeshName);
427  SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
428  const SMESH::DirStruct& Vector,
429  CORBA::Boolean CopyGroups,
430  const char* MeshName);
431  SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
432  const SMESH::AxisStruct& Axis,
433  CORBA::Double AngleInRadians,
434  CORBA::Boolean CopyGroups,
435  const char* MeshName);
436  SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
437  const SMESH::AxisStruct& Axis,
438  CORBA::Double AngleInRadians,
439  CORBA::Boolean CopyGroups,
440  const char* MeshName);
441 
442  void Scale(SMESH::SMESH_IDSource_ptr theObject,
443  const SMESH::PointStruct& thePoint,
444  const SMESH::double_array& theScaleFact,
445  CORBA::Boolean theCopy);
446 
447  SMESH::ListOfGroups* ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
448  const SMESH::PointStruct& thePoint,
449  const SMESH::double_array& theScaleFact);
450 
451  SMESH::SMESH_Mesh_ptr ScaleMakeMesh(SMESH::SMESH_IDSource_ptr Object,
452  const SMESH::PointStruct& Point,
453  const SMESH::double_array& theScaleFact,
454  CORBA::Boolean CopyGroups,
455  const char* MeshName);
456 
457  SMESH::SMESH_Mesh_ptr Offset( SMESH::SMESH_IDSource_ptr theObject,
458  CORBA::Double Value,
459  CORBA::Boolean CopyGroups,
460  CORBA::Boolean CopyElements,
461  const char* MeshName,
462  SMESH::ListOfGroups_out Groups);
463 
464  void FindCoincidentNodes (CORBA::Double Tolerance,
465  SMESH::array_of_long_array_out GroupsOfNodes,
466  CORBA::Boolean SeparateCornersAndMedium);
467  void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr Object,
468  CORBA::Double Tolerance,
469  SMESH::array_of_long_array_out GroupsOfNodes,
470  CORBA::Boolean SeparateCornersAndMedium);
471  void FindCoincidentNodesOnPartBut(const SMESH::ListOfIDSources& Objects,
472  CORBA::Double Tolerance,
473  SMESH::array_of_long_array_out GroupsOfNodes,
474  const SMESH::ListOfIDSources& ExceptSubMeshOrGroups,
475  CORBA::Boolean SeparateCornersAndMedium);
476  void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes,
477  const SMESH::ListOfIDSources& NodesToKeep,
478  CORBA::Boolean AvoidMakingHoles );
479  void FindEqualElements(const SMESH::ListOfIDSources& Objects,
480  const SMESH::ListOfIDSources& ExceptSubMeshOrGroups,
481  SMESH::array_of_long_array_out GroupsOfElementsID);
482  void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID,
483  const SMESH::ListOfIDSources& ElementsToKeep);
484  void MergeEqualElements();
485  SMESH::smIdType MoveClosestNodeToPoint(CORBA::Double x,
486  CORBA::Double y,
487  CORBA::Double z,
488  SMESH::smIdType nodeID);
492  SMESH::smIdType FindNodeClosestTo(CORBA::Double x,
493  CORBA::Double y,
494  CORBA::Double z);
499  SMESH::smIdType_array* FindElementsByPoint(CORBA::Double x,
500  CORBA::Double y,
501  CORBA::Double z,
502  SMESH::ElementType type);
508  SMESH::smIdType_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
509  CORBA::Double x,
510  CORBA::Double y,
511  CORBA::Double z,
512  SMESH::ElementType type);
513 
520  SMESH::smIdType ProjectPoint(CORBA::Double x,
521  CORBA::Double y,
522  CORBA::Double z,
523  SMESH::ElementType type,
524  SMESH::SMESH_IDSource_ptr meshObject,
525  SMESH::double_array_out projecton);
526 
531  CORBA::Short GetPointState(CORBA::Double x, CORBA::Double y, CORBA::Double z);
532 
536  CORBA::Boolean IsManifold();
537 
541  CORBA::Boolean IsCoherentOrientation2D();
542 
550  SMESH::array_of_long_array* Get1DBranches( SMESH::SMESH_IDSource_ptr edges,
551  SMESH::smIdType startNode,
552  SMESH::array_of_long_array_out nodeGroups);
553 
557  SMESH::ListOfEdges* FindSharpEdges(CORBA::Double angle, CORBA::Boolean addExisting);
558 
562  SMESH::ListOfFreeBorders* FindFreeBorders(CORBA::Boolean closedOnly);
563 
568  SMESH::SMESH_Group_ptr FillHole(const SMESH::FreeBorder& hole,
569  const char* groupName);
570 
572  CORBA::Short SewCoincidentFreeBorders(const SMESH::CoincidentFreeBorders& freeBorders,
573  CORBA::Boolean createPolygons,
574  CORBA::Boolean createPolyedrs);
575 
577  SewFreeBorders(SMESH::smIdType FirstNodeID1,
578  SMESH::smIdType SecondNodeID1,
579  SMESH::smIdType LastNodeID1,
580  SMESH::smIdType FirstNodeID2,
581  SMESH::smIdType SecondNodeID2,
582  SMESH::smIdType LastNodeID2,
583  CORBA::Boolean CreatePolygons,
584  CORBA::Boolean CreatePolyedrs);
586  SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
587  SMESH::smIdType SecondNodeID1,
588  SMESH::smIdType LastNodeID1,
589  SMESH::smIdType FirstNodeID2,
590  SMESH::smIdType SecondNodeID2);
592  SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
593  SMESH::smIdType SecondNodeIDOnFreeBorder,
594  SMESH::smIdType LastNodeIDOnFreeBorder,
595  SMESH::smIdType FirstNodeIDOnSide,
596  SMESH::smIdType LastNodeIDOnSide,
597  CORBA::Boolean CreatePolygons,
598  CORBA::Boolean CreatePolyedrs);
600  SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
601  const SMESH::smIdType_array& IDsOfSide2Elements,
602  SMESH::smIdType NodeID1OfSide1ToMerge,
603  SMESH::smIdType NodeID1OfSide2ToMerge,
604  SMESH::smIdType NodeID2OfSide1ToMerge,
605  SMESH::smIdType NodeID2OfSide2ToMerge);
606 
612  CORBA::Boolean ChangeElemNodes(SMESH::smIdType ide, const SMESH::smIdType_array& newIDs);
613 
614  SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
615  const char* theGroupName);
616 
617  CORBA::Boolean DoubleNodes( const SMESH::smIdType_array& theNodes,
618  const SMESH::smIdType_array& theModifiedElems );
619 
620  CORBA::Boolean DoubleNode( SMESH::smIdType theNodeId,
621  const SMESH::smIdType_array& theModifiedElems );
622 
623  CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
624  SMESH::SMESH_GroupBase_ptr theModifiedElems );
625 
634  SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
635  SMESH::SMESH_GroupBase_ptr theModifiedElems );
636 
637  CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
638  const SMESH::ListOfGroups& theModifiedElems );
639 
640  SMESH::SMESH_Group_ptr DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
641  const SMESH::ListOfGroups& theModifiedElems );
642 
653  CORBA::Boolean DoubleNodeElem( const SMESH::smIdType_array& theElems,
654  const SMESH::smIdType_array& theNodesNot,
655  const SMESH::smIdType_array& theAffectedElems );
656 
668  CORBA::Boolean DoubleNodeElemInRegion( const SMESH::smIdType_array& theElems,
669  const SMESH::smIdType_array& theNodesNot,
670  GEOM::GEOM_Object_ptr theShape );
671 
681  CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
682  SMESH::SMESH_GroupBase_ptr theNodesNot,
683  SMESH::SMESH_GroupBase_ptr theAffectedElems );
684 
695  SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
696  SMESH::SMESH_GroupBase_ptr theNodesNot,
697  SMESH::SMESH_GroupBase_ptr theAffectedElems );
698 
699  SMESH::ListOfGroups* DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
700  SMESH::SMESH_GroupBase_ptr theNodesNot,
701  SMESH::SMESH_GroupBase_ptr theAffectedElems,
702  CORBA::Boolean theElemGroupNeeded,
703  CORBA::Boolean theNodeGroupNeeded);
704 
715  CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
716  SMESH::SMESH_GroupBase_ptr theNodesNot,
717  GEOM::GEOM_Object_ptr theShape );
718 
729  CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
730  const SMESH::ListOfGroups& theNodesNot,
731  const SMESH::ListOfGroups& theAffectedElems );
732 
743  SMESH::SMESH_Group_ptr DoubleNodeElemGroupsNew( const SMESH::ListOfGroups& theElems,
744  const SMESH::ListOfGroups& theNodesNot,
745  const SMESH::ListOfGroups& theAffectedElems );
746 
747  SMESH::ListOfGroups* DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems,
748  const SMESH::ListOfGroups& theNodesNot,
749  const SMESH::ListOfGroups& theAffectedElems,
750  CORBA::Boolean theElemGroupNeeded,
751  CORBA::Boolean theNodeGroupNeeded);
752 
764  CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
765  const SMESH::ListOfGroups& theNodesNot,
766  GEOM::GEOM_Object_ptr theShape );
767 
779  SMESH::ListOfGroups* AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
780  const SMESH::ListOfGroups& theNodesNot,
781  GEOM::GEOM_Object_ptr theShape );
782 
795  CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
796  CORBA::Boolean createJointElems,
797  CORBA::Boolean onAllBoundaries );
807  CORBA::Boolean CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups& theGroupsOfFaces );
808 
815  void CreateHoleSkin(CORBA::Double radius,
816  GEOM::GEOM_Object_ptr theShape,
817  const char* groupName,
818  const SMESH::double_array& theNodesCoords,
819  SMESH::array_of_long_array_out GroupsOfNodes);
820 
826  CORBA::Boolean Make2DMeshFrom3D();
827 
828  SMESH::SMESH_Mesh_ptr MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
829  SMESH::Bnd_Dimension dimension,
830  const char* groupName,
831  const char* meshName,
832  CORBA::Boolean toCopyElements,
833  CORBA::Boolean toCopyMissingBondary,
834  SMESH::SMESH_Group_out group);
835 
836  CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
837  const char* groupName,
838  const char* meshName,
839  CORBA::Boolean toCopyAll,
840  CORBA::Boolean toCreateAllElements,
841  const SMESH::ListOfIDSources& groups,
842  SMESH::SMESH_Mesh_out mesh,
843  SMESH::SMESH_Group_out group);
844 
862  const char* groupName);
863 
870  SMESH::ListOfEdges* MakeSlot(SMESH::SMESH_GroupBase_ptr segments,
871  CORBA::Double width);
872 
873 
874  private:
875 
876  ::SMESH_MeshEditor& getEditor();
877 
878  SMESHDS_Mesh * getMeshDS() { return myMesh->GetMeshDS(); }
879 
880  MeshEditor_I::TPreviewMesh * getPreviewMesh( SMDSAbs_ElementType previewType = SMDSAbs_All );
881 
882  void declareMeshModified( bool isReComputeSafe );
883 
887  void initData(bool deleteSearchers=true);
888 
892  SMESH::ListOfGroups* getGroups(const std::list<int>* groupIDs);
893 
894  SMESH::ListOfGroups* mirror(TIDSortedElemSet & IDsOfElements,
895  const SMESH::AxisStruct & Axis,
897  CORBA::Boolean Copy,
898  bool MakeGroups,
899  ::SMESH_Mesh* TargetMesh=0);
900  SMESH::ListOfGroups* translate(TIDSortedElemSet & IDsOfElements,
901  const SMESH::DirStruct & Vector,
902  CORBA::Boolean Copy,
903  bool MakeGroups,
904  ::SMESH_Mesh* TargetMesh=0);
905  SMESH::ListOfGroups* rotate(TIDSortedElemSet & IDsOfElements,
906  const SMESH::AxisStruct & Axis,
907  CORBA::Double Angle,
908  CORBA::Boolean Copy,
909  bool MakeGroups,
910  ::SMESH_Mesh* TargetMesh=0);
911 
912  SMESH::ListOfGroups* scale(SMESH::SMESH_IDSource_ptr theObject,
913  const SMESH::PointStruct& thePoint,
914  const SMESH::double_array& theScaleFact,
915  CORBA::Boolean theCopy,
916  bool theMakeGroups,
917  ::SMESH_Mesh* theTargetMesh=0);
918 
919  void convertToQuadratic(CORBA::Boolean theForce3d,
920  CORBA::Boolean theToBiQuad,
921  SMESH::SMESH_IDSource_ptr theObject = SMESH::SMESH_IDSource::_nil());
922 
923  SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
924 
925  void dumpGroupsList(SMESH::TPythonDump & theDumpPython,
926  const SMESH::ListOfGroups * theGroupList);
927 
928  void prepareIdSource(SMESH::SMESH_IDSource_ptr theObject);
929 
930 
931  enum IDSource_Error { IDSource_OK, IDSource_INVALID, IDSource_EMPTY };
932 
933  bool idSourceToSet(SMESH::SMESH_IDSource_ptr theIDSource,
934  const SMESHDS_Mesh* theMeshDS,
935  TIDSortedElemSet& theElemSet,
936  const SMDSAbs_ElementType theType,
937  const bool emptyIfIsMesh = false,
938  IDSource_Error* error = 0);
939 
940  void findCoincidentNodes( TIDSortedNodeSet & Nodes,
941  CORBA::Double Tolerance,
942  SMESH::array_of_long_array_out GroupsOfNodes,
943  CORBA::Boolean SeparateCornersAndMedium);
944 
945 
946 
947  private:
948 
952 
956  SMESH::MeshPreviewStruct_var myPreviewData;
957 
958  // temporary IDSources
959  struct _IDSource;
960 };
961 
962 #endif
SMDSAbs_ElementType
Type (node, edge, face or volume) of elements.
Definition: SMDSAbs_ElementType.hxx:34
@ SMDSAbs_All
Definition: SMDSAbs_ElementType.hxx:35
#define SMESH_I_EXPORT
Definition: SMESH.hxx:39
std::set< const SMDS_MeshNode *, TIDCompare > TIDSortedNodeSet
Definition: SMESH_OctreeNode.hxx:51
std::set< const SMDS_MeshElement *, TIDCompare > TIDSortedElemSet
Definition: SMESH_TypeDefs.hxx:55
Definition: SMESHDS_Mesh.hxx:68
Utility helping in storing SMESH engine calls as python commands.
Definition: SMESH_PythonDump.hxx:121
Definition: SMESH_MeshEditor_i.hxx:50
int GetMeshId() const
Return edited mesh ID.
Definition: SMESH_MeshEditor_i.hxx:59
::SMESH_MeshEditor * myPreviewEditor
Definition: SMESH_MeshEditor_i.hxx:955
SMESH_Mesh * myMesh
Definition: SMESH_MeshEditor_i.hxx:950
MeshEditor_I::TPreviewMesh * myPreviewMesh
Definition: SMESH_MeshEditor_i.hxx:954
SMESHDS_Mesh * getMeshDS()
Definition: SMESH_MeshEditor_i.hxx:878
::SMESH_MeshEditor myEditor
Definition: SMESH_MeshEditor_i.hxx:951
IDSource_Error
Definition: SMESH_MeshEditor_i.hxx:931
bool myIsPreviewMode
Definition: SMESH_MeshEditor_i.hxx:953
SMESH::MeshPreviewStruct_var myPreviewData
Definition: SMESH_MeshEditor_i.hxx:956
virtual ~ SMESH_MeshEditor_i()
SMESH_Mesh_i * myMesh_i
< fields
Definition: SMESH_MeshEditor_i.hxx:949
Editor of a mesh.
Definition: SMESH_MeshEditor.hxx:72
Definition: SMESH_Mesh_i.hxx:57
Definition: SMESH_Mesh.hxx:80
Sew_Error
Definition: SMESH_MeshEditor.idl:934
MirrorType
Definition: SMESH_MeshEditor.idl:659
Extrusion_Error
Definition: SMESH_MeshEditor.idl:620
Smooth_Method
Definition: SMESH_MeshEditor.idl:492
Definition: SMESH_MeshEditor_i.cxx:91
std::vector< Edge > FindSharpEdges(SMDS_Mesh *mesh, double angle, bool addExisting)
Return sharp edges of faces and non-manifold ones.
Definition: SMESH_MeshAlgos.cxx:1985
void FindFreeBorders(SMDS_Mesh &mesh, TFreeBorderVec &foundFreeBordes, const bool closedOnly, bool *isManifold=0, bool *isGoodOri=0)
Returns all or only closed TFreeBorder's.
Definition: SMESH_FreeBorders.cxx:834
void Get1DBranches(SMDS_ElemIteratorPtr edgeIt, TElemGroupVector &edgeGroups, TNodeGroupVector &nodeGroups, const SMDS_MeshNode *startNode=0)
Partition given 1D elements into groups of contiguous edges.
Definition: SMESH_MeshAlgos.cxx:2352
void MakePolyLine(SMDS_Mesh *mesh, TListOfPolySegments &segments, std::vector< const SMDS_MeshElement * > &newEdges, std::vector< const SMDS_MeshNode * > &newNodes, SMDS_MeshGroup *group=0, SMESH_ElementSearcher *searcher=0)
Create a polyline consisting of 1D mesh elements each lying on a 2D element of the initial mesh.
Definition: SMESH_PolyLine.cxx:618
void FindCoincidentFreeBorders(SMDS_Mesh &mesh, double tolerance, CoincidentFreeBorders &foundFreeBordes)
Returns TFreeBorder's coincident within the given tolerance.
Definition: SMESH_FreeBorders.cxx:442
void FillHole(const TFreeBorder &freeBorder, SMDS_Mesh &mesh, std::vector< const SMDS_MeshElement * > &newFaces)
Fill a hole defined by a TFreeBorder with 2D elements.
Definition: SMESH_FillHole.cxx:382
std::vector< Edge > MakeSlot(SMDS_ElemIteratorPtr segmentIt, double width, SMDS_Mesh *mesh, std::vector< SMDS_MeshGroup * > &groupsToUpdate)
Create a slot of given width around given 1D elements lying on a triangle mesh.
Definition: SMESH_Slot.cxx:532
Bnd_Dimension
Definition: SMESH_MeshEditor.idl:35
sequence< long_array > array_of_long_array
Definition: SMESH_Mesh.idl:47
sequence< SMESH_IDSource > ListOfIDSources
Definition: SMESH_Mesh.idl:40
sequence< smIdType > smIdType_array
Definition: SMESH_Mesh.idl:45
sequence< FaceEdge > ListOfEdges
Definition: SMESH_MeshEditor.idl:91
sequence< FreeBorder > ListOfFreeBorders
Definition: SMESH_MeshEditor.idl:50
ElementType
Enumeration for element type, like in SMDS.
Definition: SMESH_Mesh.idl:128
sequence< double > double_array
Definition: SMESH_Mesh.idl:43
sequence< SMESH_GroupBase > ListOfGroups
Definition: SMESH_Mesh.idl:38
sequence< PolySegment > ListOfPolySegments
Definition: SMESH_MeshEditor.idl:82
long AddNode(SMESH::SMESH_Mesh_ptr theMesh, float x, float y, float z, const QStringList &theParameters)
Definition: SMESHGUI_NodesDlg.cxx:96
sequence< long > long_array
Definition: SMESH_Mesh.idl:44
Mesh to apply modifications for preview purposes.
Definition: SMESH_MeshEditor_i.cxx:100
Definition: SMESH_Mesh.idl:101
Definition: SMESH_MeshEditor.idl:55
Definition: SMESH_Gen.idl:118
Definition: SMESH_Mesh.idl:99
Definition: SMESH_MeshEditor.idl:39
Structure containing mesh edit preview data.
Definition: SMESH_Mesh.idl:279
Definition: SMESH_Mesh.idl:93
Definition: SMESH_MeshEditor_i.cxx:706