Version: 9.16.0
SMESH_MeshEditor_i.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 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
42class SMESH_Mesh_i;
43
44namespace MeshEditor_I {
45 struct TPreviewMesh;
46 struct ExtrusionParams;
47}
48
49class SMESH_I_EXPORT SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
50{
51public:
52 SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
53
54 virtual ~ SMESH_MeshEditor_i();
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,
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 SplitVolumesIntoTetraAvoidOverConstrainedVolumes(SMESH::SMESH_IDSource_ptr elems,
267 CORBA::Short methodFlags);
268 void SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr elems,
269 const SMESH::PointStruct & startHexPoint,
270 const SMESH::DirStruct& facetToSplitNormal,
271 CORBA::Short methodFlags,
272 CORBA::Boolean allDomains);
273 void SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources& elems);
274
275 CORBA::Boolean Smooth(const SMESH::smIdType_array & IDsOfElements,
276 const SMESH::smIdType_array & IDsOfFixedNodes,
277 CORBA::Short MaxNbOfIterations,
278 CORBA::Double MaxAspectRatio,
280 CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
281 const SMESH::smIdType_array & IDsOfFixedNodes,
282 CORBA::Short MaxNbOfIterations,
283 CORBA::Double MaxAspectRatio,
285 CORBA::Boolean SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
286 const SMESH::smIdType_array & IDsOfFixedNodes,
287 CORBA::Short MaxNbOfIterations,
288 CORBA::Double MaxAspectRatio,
290 CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
291 const SMESH::smIdType_array & IDsOfFixedNodes,
292 CORBA::Short MaxNbOfIterations,
293 CORBA::Double MaxAspectRatio,
295 CORBA::Boolean smooth(const SMESH::smIdType_array & IDsOfElements,
296 const SMESH::smIdType_array & IDsOfFixedNodes,
297 CORBA::Short MaxNbOfIterations,
298 CORBA::Double MaxAspectRatio,
300 bool IsParametric);
301 CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
302 const SMESH::smIdType_array & IDsOfFixedNodes,
303 CORBA::Short MaxNbOfIterations,
304 CORBA::Double MaxAspectRatio,
306 bool IsParametric);
307
308 CORBA::Boolean ConvertFromQuadratic();
309 void ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr theObject);
310 void ConvertToQuadratic(CORBA::Boolean Force3d);
311 void ConvertToQuadraticObject(CORBA::Boolean theForce3d,
312 SMESH::SMESH_IDSource_ptr theObject);
313 void ConvertToBiQuadratic(CORBA::Boolean theForce3d,
314 SMESH::SMESH_IDSource_ptr theObject);
315
316 void RenumberNodes();
317 void RenumberElements();
318
319 SMESH::ListOfGroups* RotationSweepObjects(const SMESH::ListOfIDSources & Nodes,
320 const SMESH::ListOfIDSources & Edges,
321 const SMESH::ListOfIDSources & Faces,
322 const SMESH::AxisStruct & Axis,
323 CORBA::Double AngleInRadians,
324 CORBA::Long NbOfSteps,
325 CORBA::Double Tolerance,
326 CORBA::Boolean ToMakeGroups);
327
328 SMESH::ListOfGroups* ExtrusionSweepObjects(const SMESH::ListOfIDSources & Nodes,
329 const SMESH::ListOfIDSources & Edges,
330 const SMESH::ListOfIDSources & Faces,
331 const SMESH::DirStruct & StepVector,
332 CORBA::Long NbOfSteps,
333 CORBA::Boolean ToMakeGroups,
334 const SMESH::double_array & ScaleFactors,
335 CORBA::Boolean ScalesVariation,
336 const SMESH::double_array & BasePoint,
337 const SMESH::double_array & Angles,
338 CORBA::Boolean AnglesVariation);
339
340 SMESH::ListOfGroups* ExtrusionByNormal(const SMESH::ListOfIDSources& objects,
341 CORBA::Double stepSize,
342 CORBA::Long nbOfSteps,
343 CORBA::Boolean byAverageNormal,
344 CORBA::Boolean useInputElemsOnly,
345 CORBA::Boolean makeGroups,
346 CORBA::Short dim);
347 SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
348 const SMESH::DirStruct & theStepVector,
349 CORBA::Long theNbOfSteps,
350 CORBA::Long theExtrFlags,
351 CORBA::Double theSewTolerance,
352 CORBA::Boolean theMakeGroups);
353
355 ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & Nodes,
356 const SMESH::ListOfIDSources & Edges,
357 const SMESH::ListOfIDSources & Faces,
358 SMESH::SMESH_IDSource_ptr PathMesh,
359 GEOM::GEOM_Object_ptr PathShape,
360 SMESH::smIdType NodeStart,
361 CORBA::Boolean HasAngles,
362 const SMESH::double_array & Angles,
363 CORBA::Boolean AnglesVariation,
364 CORBA::Boolean HasRefPoint,
365 const SMESH::PointStruct & RefPoint,
366 bool MakeGroups,
367 const SMESH::double_array & ScaleFactors,
368 CORBA::Boolean ScalesVariation,
370
371 SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr PathMesh,
372 GEOM::GEOM_Object_ptr PathShape,
373 const SMESH::double_array & Angles);
374
375 void Mirror(const SMESH::smIdType_array & IDsOfElements,
376 const SMESH::AxisStruct & Axis,
378 CORBA::Boolean Copy);
379 void MirrorObject(SMESH::SMESH_IDSource_ptr theObject,
380 const SMESH::AxisStruct & Axis,
382 CORBA::Boolean Copy);
383 void Translate(const SMESH::smIdType_array & IDsOfElements,
384 const SMESH::DirStruct & Vector,
385 CORBA::Boolean Copy);
386 void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
387 const SMESH::DirStruct & Vector,
388 CORBA::Boolean Copy);
389 void Rotate(const SMESH::smIdType_array & IDsOfElements,
390 const SMESH::AxisStruct & Axis,
391 CORBA::Double Angle,
392 CORBA::Boolean Copy);
393 void RotateObject(SMESH::SMESH_IDSource_ptr theObject,
394 const SMESH::AxisStruct & Axis,
395 CORBA::Double Angle,
396 CORBA::Boolean Copy);
397
398 SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::smIdType_array& IDsOfElements,
399 const SMESH::AxisStruct& Mirror,
401 SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
402 const SMESH::AxisStruct& Mirror,
404 SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
405 const SMESH::DirStruct& Vector);
406 SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
407 const SMESH::DirStruct& Vector);
408 SMESH::ListOfGroups* RotateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
409 const SMESH::AxisStruct& Axis,
410 CORBA::Double AngleInRadians);
411 SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
412 const SMESH::AxisStruct& Axis,
413 CORBA::Double AngleInRadians);
414
415 SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::smIdType_array& IDsOfElements,
416 const SMESH::AxisStruct& Mirror,
418 CORBA::Boolean CopyGroups,
419 const char* MeshName);
420 SMESH::SMESH_Mesh_ptr MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
421 const SMESH::AxisStruct& Mirror,
423 CORBA::Boolean CopyGroups,
424 const char* MeshName);
425 SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
426 const SMESH::DirStruct& Vector,
427 CORBA::Boolean CopyGroups,
428 const char* MeshName);
429 SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
430 const SMESH::DirStruct& Vector,
431 CORBA::Boolean CopyGroups,
432 const char* MeshName);
433 SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
434 const SMESH::AxisStruct& Axis,
435 CORBA::Double AngleInRadians,
436 CORBA::Boolean CopyGroups,
437 const char* MeshName);
438 SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
439 const SMESH::AxisStruct& Axis,
440 CORBA::Double AngleInRadians,
441 CORBA::Boolean CopyGroups,
442 const char* MeshName);
443
444 void Scale(SMESH::SMESH_IDSource_ptr theObject,
445 const SMESH::PointStruct& thePoint,
446 const SMESH::double_array& theScaleFact,
447 CORBA::Boolean theCopy);
448
449 SMESH::ListOfGroups* ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
450 const SMESH::PointStruct& thePoint,
451 const SMESH::double_array& theScaleFact);
452
453 SMESH::SMESH_Mesh_ptr ScaleMakeMesh(SMESH::SMESH_IDSource_ptr Object,
454 const SMESH::PointStruct& Point,
455 const SMESH::double_array& theScaleFact,
456 CORBA::Boolean CopyGroups,
457 const char* MeshName);
458
459 SMESH::SMESH_Mesh_ptr Offset( SMESH::SMESH_IDSource_ptr theObject,
460 CORBA::Double Value,
461 CORBA::Boolean CopyGroups,
462 CORBA::Boolean CopyElements,
463 const char* MeshName,
464 SMESH::ListOfGroups_out Groups);
465
466 void FindCoincidentNodes (CORBA::Double Tolerance,
467 SMESH::array_of_long_array_out GroupsOfNodes,
468 CORBA::Boolean SeparateCornersAndMedium);
469 void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr Object,
470 CORBA::Double Tolerance,
471 SMESH::array_of_long_array_out GroupsOfNodes,
472 CORBA::Boolean SeparateCornersAndMedium);
473 void FindCoincidentNodesOnPartBut(const SMESH::ListOfIDSources& Objects,
474 CORBA::Double Tolerance,
475 SMESH::array_of_long_array_out GroupsOfNodes,
476 const SMESH::ListOfIDSources& ExceptSubMeshOrGroups,
477 CORBA::Boolean SeparateCornersAndMedium);
478 void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes,
479 const SMESH::ListOfIDSources& NodesToKeep,
480 CORBA::Boolean AvoidMakingHoles );
481 void FindEqualElements(const SMESH::ListOfIDSources& Objects,
482 const SMESH::ListOfIDSources& ExceptSubMeshOrGroups,
483 SMESH::array_of_long_array_out GroupsOfElementsID);
484 void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID,
485 const SMESH::ListOfIDSources& ElementsToKeep);
486 void MergeEqualElements();
487 SMESH::smIdType MoveClosestNodeToPoint(CORBA::Double x,
488 CORBA::Double y,
489 CORBA::Double z,
490 SMESH::smIdType nodeID);
494 SMESH::smIdType FindNodeClosestTo(CORBA::Double x,
495 CORBA::Double y,
496 CORBA::Double z);
501 SMESH::smIdType_array* FindElementsByPoint(CORBA::Double x,
502 CORBA::Double y,
503 CORBA::Double z,
504 SMESH::ElementType type);
510 SMESH::smIdType_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
511 CORBA::Double x,
512 CORBA::Double y,
513 CORBA::Double z,
514 SMESH::ElementType type);
515
522 SMESH::smIdType ProjectPoint(CORBA::Double x,
523 CORBA::Double y,
524 CORBA::Double z,
526 SMESH::SMESH_IDSource_ptr meshObject,
527 SMESH::double_array_out projecton);
528
533 CORBA::Short GetPointState(CORBA::Double x, CORBA::Double y, CORBA::Double z);
534
538 CORBA::Boolean IsManifold();
539
543 CORBA::Boolean IsCoherentOrientation2D();
544
552 SMESH::array_of_long_array* Get1DBranches( SMESH::SMESH_IDSource_ptr edges,
553 SMESH::smIdType startNode,
554 SMESH::array_of_long_array_out nodeGroups);
555
559 SMESH::ListOfEdges* FindSharpEdges(CORBA::Double angle, CORBA::Boolean addExisting);
560
564 SMESH::ListOfFreeBorders* FindFreeBorders(CORBA::Boolean closedOnly);
565
570 SMESH::SMESH_Group_ptr FillHole(const SMESH::FreeBorder& hole,
571 const char* groupName);
572
574 CORBA::Short SewCoincidentFreeBorders(const SMESH::CoincidentFreeBorders& freeBorders,
575 CORBA::Boolean createPolygons,
576 CORBA::Boolean createPolyedrs);
577
579 SewFreeBorders(SMESH::smIdType FirstNodeID1,
580 SMESH::smIdType SecondNodeID1,
581 SMESH::smIdType LastNodeID1,
582 SMESH::smIdType FirstNodeID2,
583 SMESH::smIdType SecondNodeID2,
584 SMESH::smIdType LastNodeID2,
585 CORBA::Boolean CreatePolygons,
586 CORBA::Boolean CreatePolyedrs);
588 SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
589 SMESH::smIdType SecondNodeID1,
590 SMESH::smIdType LastNodeID1,
591 SMESH::smIdType FirstNodeID2,
592 SMESH::smIdType SecondNodeID2);
594 SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
595 SMESH::smIdType SecondNodeIDOnFreeBorder,
596 SMESH::smIdType LastNodeIDOnFreeBorder,
597 SMESH::smIdType FirstNodeIDOnSide,
598 SMESH::smIdType LastNodeIDOnSide,
599 CORBA::Boolean CreatePolygons,
600 CORBA::Boolean CreatePolyedrs);
602 SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
603 const SMESH::smIdType_array& IDsOfSide2Elements,
604 SMESH::smIdType NodeID1OfSide1ToMerge,
605 SMESH::smIdType NodeID1OfSide2ToMerge,
606 SMESH::smIdType NodeID2OfSide1ToMerge,
607 SMESH::smIdType NodeID2OfSide2ToMerge);
608
614 CORBA::Boolean ChangeElemNodes(SMESH::smIdType ide, const SMESH::smIdType_array& newIDs);
615
616 SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
617 const char* theGroupName);
618
619 CORBA::Boolean DoubleNodes( const SMESH::smIdType_array& theNodes,
620 const SMESH::smIdType_array& theModifiedElems );
621
622 CORBA::Boolean DoubleNode( SMESH::smIdType theNodeId,
623 const SMESH::smIdType_array& theModifiedElems );
624
625 CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
626 SMESH::SMESH_GroupBase_ptr theModifiedElems );
627
636 SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
637 SMESH::SMESH_GroupBase_ptr theModifiedElems );
638
639 CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
640 const SMESH::ListOfGroups& theModifiedElems );
641
642 SMESH::SMESH_Group_ptr DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
643 const SMESH::ListOfGroups& theModifiedElems );
644
655 CORBA::Boolean DoubleNodeElem( const SMESH::smIdType_array& theElems,
656 const SMESH::smIdType_array& theNodesNot,
657 const SMESH::smIdType_array& theAffectedElems );
658
670 CORBA::Boolean DoubleNodeElemInRegion( const SMESH::smIdType_array& theElems,
671 const SMESH::smIdType_array& theNodesNot,
672 GEOM::GEOM_Object_ptr theShape );
673
683 CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
684 SMESH::SMESH_GroupBase_ptr theNodesNot,
685 SMESH::SMESH_GroupBase_ptr theAffectedElems );
686
697 SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
698 SMESH::SMESH_GroupBase_ptr theNodesNot,
699 SMESH::SMESH_GroupBase_ptr theAffectedElems );
700
701 SMESH::ListOfGroups* DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
702 SMESH::SMESH_GroupBase_ptr theNodesNot,
703 SMESH::SMESH_GroupBase_ptr theAffectedElems,
704 CORBA::Boolean theElemGroupNeeded,
705 CORBA::Boolean theNodeGroupNeeded);
706
717 CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
718 SMESH::SMESH_GroupBase_ptr theNodesNot,
719 GEOM::GEOM_Object_ptr theShape );
720
731 CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
732 const SMESH::ListOfGroups& theNodesNot,
733 const SMESH::ListOfGroups& theAffectedElems );
734
745 SMESH::SMESH_Group_ptr DoubleNodeElemGroupsNew( const SMESH::ListOfGroups& theElems,
746 const SMESH::ListOfGroups& theNodesNot,
747 const SMESH::ListOfGroups& theAffectedElems );
748
749 SMESH::ListOfGroups* DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems,
750 const SMESH::ListOfGroups& theNodesNot,
751 const SMESH::ListOfGroups& theAffectedElems,
752 CORBA::Boolean theElemGroupNeeded,
753 CORBA::Boolean theNodeGroupNeeded);
754
766 CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
767 const SMESH::ListOfGroups& theNodesNot,
768 GEOM::GEOM_Object_ptr theShape );
769
781 SMESH::ListOfGroups* AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
782 const SMESH::ListOfGroups& theNodesNot,
783 GEOM::GEOM_Object_ptr theShape );
784
797 CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
798 CORBA::Boolean createJointElems,
799 CORBA::Boolean onAllBoundaries );
809 CORBA::Boolean CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups& theGroupsOfFaces );
810
817 void CreateHoleSkin(CORBA::Double radius,
818 GEOM::GEOM_Object_ptr theShape,
819 const char* groupName,
820 const SMESH::double_array& theNodesCoords,
821 SMESH::array_of_long_array_out GroupsOfNodes);
822
828 CORBA::Boolean Make2DMeshFrom3D();
829
830 SMESH::SMESH_Mesh_ptr MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
831 SMESH::Bnd_Dimension dimension,
832 const char* groupName,
833 const char* meshName,
834 CORBA::Boolean toCopyElements,
835 CORBA::Boolean toCopyMissingBondary,
836 SMESH::SMESH_Group_out group);
837
838 CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
839 const char* groupName,
840 const char* meshName,
841 CORBA::Boolean toCopyAll,
842 CORBA::Boolean toCreateAllElements,
843 const SMESH::ListOfIDSources& groups,
844 SMESH::SMESH_Mesh_out mesh,
845 SMESH::SMESH_Group_out group);
846
864 const char* groupName);
865
872 SMESH::ListOfEdges* MakeSlot(SMESH::SMESH_GroupBase_ptr segments,
873 CORBA::Double width);
874
875
876 private:
877
878 ::SMESH_MeshEditor& getEditor();
879
880 SMESHDS_Mesh * getMeshDS() { return myMesh->GetMeshDS(); }
881
882 MeshEditor_I::TPreviewMesh * getPreviewMesh( SMDSAbs_ElementType previewType = SMDSAbs_All );
883
884 void declareMeshModified( bool isReComputeSafe );
885
889 void initData(bool deleteSearchers=true);
890
894 SMESH::ListOfGroups* getGroups(const std::list<int>* groupIDs);
895
896 SMESH::ListOfGroups* mirror(TIDSortedElemSet & IDsOfElements,
897 const SMESH::AxisStruct & Axis,
899 CORBA::Boolean Copy,
900 bool MakeGroups,
901 ::SMESH_Mesh* TargetMesh=0);
902 SMESH::ListOfGroups* translate(TIDSortedElemSet & IDsOfElements,
903 const SMESH::DirStruct & Vector,
904 CORBA::Boolean Copy,
905 bool MakeGroups,
906 ::SMESH_Mesh* TargetMesh=0);
907 SMESH::ListOfGroups* rotate(TIDSortedElemSet & IDsOfElements,
908 const SMESH::AxisStruct & Axis,
909 CORBA::Double Angle,
910 CORBA::Boolean Copy,
911 bool MakeGroups,
912 ::SMESH_Mesh* TargetMesh=0);
913
914 SMESH::ListOfGroups* scale(SMESH::SMESH_IDSource_ptr theObject,
915 const SMESH::PointStruct& thePoint,
916 const SMESH::double_array& theScaleFact,
917 CORBA::Boolean theCopy,
918 bool theMakeGroups,
919 ::SMESH_Mesh* theTargetMesh=0);
920
921 void convertToQuadratic(CORBA::Boolean theForce3d,
922 CORBA::Boolean theToBiQuad,
923 SMESH::SMESH_IDSource_ptr theObject = SMESH::SMESH_IDSource::_nil());
924
925 SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
926
927 void dumpGroupsList(SMESH::TPythonDump & theDumpPython,
928 const SMESH::ListOfGroups * theGroupList);
929
930 void prepareIdSource(SMESH::SMESH_IDSource_ptr theObject);
931
932
933 enum IDSource_Error { IDSource_OK, IDSource_INVALID, IDSource_EMPTY };
934
935 bool idSourceToSet(SMESH::SMESH_IDSource_ptr theIDSource,
936 const SMESHDS_Mesh* theMeshDS,
937 TIDSortedElemSet& theElemSet,
938 const SMDSAbs_ElementType theType,
939 const bool emptyIfIsMesh = false,
940 IDSource_Error* error = 0);
941
942 void findCoincidentNodes( TIDSortedNodeSet & Nodes,
943 CORBA::Double Tolerance,
944 SMESH::array_of_long_array_out GroupsOfNodes,
945 CORBA::Boolean SeparateCornersAndMedium);
946
947
948
949 private:
950
954
958 SMESH::MeshPreviewStruct_var myPreviewData;
959
960 // temporary IDSources
961 struct _IDSource;
962};
963
964#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:58
Definition: SMESHDS_Mesh.hxx:98
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:957
SMESH_Mesh * myMesh
Definition: SMESH_MeshEditor_i.hxx:952
MeshEditor_I::TPreviewMesh * myPreviewMesh
Definition: SMESH_MeshEditor_i.hxx:956
SMESHDS_Mesh * getMeshDS()
Definition: SMESH_MeshEditor_i.hxx:880
::SMESH_MeshEditor myEditor
Definition: SMESH_MeshEditor_i.hxx:953
IDSource_Error
Definition: SMESH_MeshEditor_i.hxx:933
bool myIsPreviewMode
Definition: SMESH_MeshEditor_i.hxx:955
SMESH::MeshPreviewStruct_var myPreviewData
Definition: SMESH_MeshEditor_i.hxx:958
SMESH_Mesh_i * myMesh_i
< fields
Definition: SMESH_MeshEditor_i.hxx:951
Editor of a mesh.
Definition: SMESH_MeshEditor.hxx:74
Definition: SMESH_Mesh_i.hxx:57
Definition: SMESH_Mesh.hxx:80
Sew_Error
Definition: SMESH_MeshEditor.idl:946
MirrorType
Definition: SMESH_MeshEditor.idl:671
Extrusion_Error
Definition: SMESH_MeshEditor.idl:632
Smooth_Method
Definition: SMESH_MeshEditor.idl:504
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:41
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:39
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