Version: 9.16.0
SMESH_ControlsDef.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#ifndef _SMESH_CONTROLSDEF_HXX_
24#define _SMESH_CONTROLSDEF_HXX_
25
26#include "SMESH_Controls.hxx"
27
28#include "SMESH_TypeDefs.hxx"
30
31#include <Bnd_B3d.hxx>
32#include <GeomAPI_ProjectPointOnCurve.hxx>
33#include <GeomAPI_ProjectPointOnSurf.hxx>
34#include <Quantity_Color.hxx>
35#include <TColStd_MapOfInteger.hxx>
36#include <TCollection_AsciiString.hxx>
37#include <NCollection_Map.hxx>
38#include <TopAbs.hxx>
39#include <TopoDS_Face.hxx>
40#include <gp_XYZ.hxx>
41
42#include <set>
43#include <map>
44#include <vector>
45
46#include <boost/shared_ptr.hpp>
47
49class SMDS_MeshFace;
50class SMDS_MeshNode;
51class SMDS_Mesh;
52
53class SMESHDS_Mesh;
54class SMESHDS_SubMesh;
56
57class BRepClass3d_SolidClassifier;
58class ShapeAnalysis_Surface;
59class gp_Pln;
60class gp_Pnt;
61
62typedef NCollection_Map< smIdType, smIdHasher > TIDsMap;
63typedef NCollection_Sequence<smIdType> TIDsSeq;
64
65namespace SMESH{
66 namespace Controls{
67
69 {
70 typedef std::vector<gp_XYZ>::size_type size_type;
71
72 public:
74
75 explicit TSequenceOfXYZ(size_type n);
76
77 TSequenceOfXYZ(size_type n, const gp_XYZ& t);
78
79 TSequenceOfXYZ(const TSequenceOfXYZ& theSequenceOfXYZ);
80
81 template <class InputIterator>
82 TSequenceOfXYZ(InputIterator theBegin, InputIterator theEnd);
83
85
86 TSequenceOfXYZ& operator=(const TSequenceOfXYZ& theSequenceOfXYZ);
87
88 gp_XYZ& operator()(size_type n);
89
90 const gp_XYZ& operator()(size_type n) const;
91
92 void clear();
93
94 void reserve(size_type n);
95
96 void push_back(const gp_XYZ& v);
97
98 size_type size() const;
99
100
101 void setElement(const SMDS_MeshElement* e) { myElem = e; }
102
103 const SMDS_MeshElement* getElement() const { return myElem; }
104
105 SMDSAbs_EntityType getElementEntity() const;
106
107 private:
108 std::vector<gp_XYZ> myArray;
110 };
111
117 {
118 unsigned long myMeshModifTime;
120 public:
122 void SetMesh( const SMDS_Mesh* theMesh );
123 const SMDS_Mesh* GetMesh() const { return myMesh; }
124 bool IsMeshModified();
125 };
126
127 /*
128 Class : NumericalFunctor
129 Description : Root of all Functors returning numeric value
130 */
132 public:
134 virtual void SetMesh( const SMDS_Mesh* theMesh );
135 virtual double GetValue( long theElementId );
136 virtual double GetValue(const TSequenceOfXYZ& /*thePoints*/) { return -1.0;};
137 void GetHistogram(int nbIntervals,
138 std::vector<int>& nbEvents,
139 std::vector<double>& funValues,
140 const std::vector<::smIdType>& elements,
141 const double* minmax=0,
142 const bool isLogarithmic = false);
143 bool IsApplicable( long theElementId ) const;
144 virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
145 virtual SMDSAbs_ElementType GetType() const = 0;
146 virtual double GetBadRate( double Value, int nbNodes ) const = 0;
147 long GetPrecision() const;
148 void SetPrecision( const long thePrecision );
149 double Round( const double & value );
150
151 bool GetPoints(const ::smIdType theId, TSequenceOfXYZ& theRes) const;
152 static bool GetPoints(const SMDS_MeshElement* theElem, TSequenceOfXYZ& theRes);
153 protected:
158 };
159
160
161 /*
162 Class : Volume
163 Description : Functor calculating volume of 3D mesh element
164 */
166 public:
167 virtual double GetValue( long theElementId );
168 //virtual double GetValue( const TSequenceOfXYZ& thePoints );
169 virtual double GetBadRate( double Value, int nbNodes ) const;
170 virtual SMDSAbs_ElementType GetType() const;
171 };
172
173
174 /*
175 Class : MaxElementLength2D
176 Description : Functor calculating maximum length of 2D element
177 */
179 public:
180 virtual double GetValue( long theElementId );
181 virtual double GetValue( const TSequenceOfXYZ& P );
182 virtual double GetBadRate( double Value, int nbNodes ) const;
183 virtual SMDSAbs_ElementType GetType() const;
184 };
185
186
187 /*
188 Class : MaxElementLength3D
189 Description : Functor calculating maximum length of 3D element
190 */
192 public:
193 virtual double GetValue( long theElementId );
194 virtual double GetBadRate( double Value, int nbNodes ) const;
195 virtual SMDSAbs_ElementType GetType() const;
196 };
197
198
199 /*
200 Class : SMESH_MinimumAngle
201 Description : Functor for calculation of minimum angle
202 */
204 public:
205 virtual double GetValue( const TSequenceOfXYZ& thePoints );
206 virtual double GetBadRate( double Value, int nbNodes ) const;
207 virtual SMDSAbs_ElementType GetType() const;
208 };
209
210
211 /*
212 Class : AspectRatio
213 Description : Functor for calculating aspect ratio
214 */
216 public:
217 virtual double GetValue( long theElementId );
218 virtual double GetValue( const TSequenceOfXYZ& thePoints );
219 virtual double GetBadRate( double Value, int nbNodes ) const;
220 virtual SMDSAbs_ElementType GetType() const;
221 virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
222 };
223
224
225 /*
226 Class : AspectRatio3D
227 Description : Functor for calculating aspect ratio of 3D elems.
228 */
230 public:
231 virtual double GetValue( long theElementId );
232 virtual double GetValue( const TSequenceOfXYZ& thePoints );
233 virtual double GetBadRate( double Value, int nbNodes ) const;
234 virtual SMDSAbs_ElementType GetType() const;
235 virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
236 };
237
238
239 /*
240 Class : Warping
241 Description : Functor for calculating warping
242 */
244 public:
245 virtual double GetValue( const TSequenceOfXYZ& thePoints );
246 virtual double GetBadRate( double Value, int nbNodes ) const;
247 virtual SMDSAbs_ElementType GetType() const;
248 virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
249
250 protected:
251 double ComputeA( const gp_XYZ&, const gp_XYZ&, const gp_XYZ&, const gp_XYZ& ) const;
252 double ComputeValue( const TSequenceOfXYZ& thePoints ) const;
253 };
254
255 /*
256 Class : Warping3D
257 Description : Functor for calculating warping
258 */
259 class SMESHCONTROLS_EXPORT Warping3D: public virtual Warping {
260 public:
261 virtual bool IsApplicable(const SMDS_MeshElement* element) const;
262 virtual double GetValue(const TSequenceOfXYZ& thePoints);
263 virtual double GetValue(long theId);
264 virtual SMDSAbs_ElementType GetType() const;
265
266 struct Value {
267 double myWarp;
268 std::vector<long> myPntIds;
269 bool operator<(const Value& x) const;
270 };
271
272 typedef std::vector<Value> WValues;
273 void GetValues(WValues& theValues);
274
275 private:
276 void ProcessVolumeELement(WValues& theValues);
277 };
278 typedef boost::shared_ptr<Warping3D> Warping3DPtr;
279
280
281 /*
282 Class : Taper
283 Description : Functor for calculating taper
284 */
286 public:
287 virtual double GetValue( const TSequenceOfXYZ& thePoints );
288 virtual double GetBadRate( double Value, int nbNodes ) const;
289 virtual SMDSAbs_ElementType GetType() const;
290 virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
291 };
292
293 /*
294 Class : Skew
295 Description : Functor for calculating skew in degrees
296 */
298 public:
299 virtual double GetValue( const TSequenceOfXYZ& thePoints );
300 virtual double GetBadRate( double Value, int nbNodes ) const;
301 virtual SMDSAbs_ElementType GetType() const;
302 virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
303 };
304
305
306 /*
307 Class : Area
308 Description : Functor for calculating area
309 */
311 public:
312 virtual double GetValue( const TSequenceOfXYZ& thePoints );
313 virtual double GetBadRate( double Value, int nbNodes ) const;
314 virtual SMDSAbs_ElementType GetType() const;
315 };
316
317
318 /*
319 Class : Length
320 Description : Functor for calculating length of edge
321 */
323 public:
324 virtual double GetValue( const TSequenceOfXYZ& thePoints );
325 virtual double GetBadRate( double Value, int nbNodes ) const;
326 virtual SMDSAbs_ElementType GetType() const;
327 };
328
329 /*
330 Class : Length2D
331 Description : Functor for calculating minimal length of edges of element
332 */
334 public:
336 virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
337 virtual double GetValue( const TSequenceOfXYZ& thePoints );
338 virtual double GetBadRate( double Value, int nbNodes ) const;
339 virtual SMDSAbs_ElementType GetType() const;
340 struct Value{
341 double myLength;
342 long myPntId[2];
343 Value(double theLength, long thePntId1, long thePntId2);
344 bool operator<(const Value& x) const;
345 };
346 typedef std::set<Value> TValues;
347 void GetValues(TValues& theValues);
348
349 private:
351 };
352 typedef boost::shared_ptr<Length2D> Length2DPtr;
353
354 /*
355 Class : Length2D
356 Description : Functor for calculating minimal length of edges of 3D element
357 */
358 class SMESHCONTROLS_EXPORT Length3D: public virtual Length2D {
359 public:
360 Length3D();
361 };
362 typedef boost::shared_ptr<Length3D> Length3DPtr;
363
364 /*
365 Class : Deflection2D
366 Description : Functor for calculating distance between a face and geometry
367 */
369 public:
370 virtual void SetMesh( const SMDS_Mesh* theMesh );
371 virtual double GetValue( const TSequenceOfXYZ& thePoints );
372 virtual double GetBadRate( double Value, int nbNodes ) const;
373 virtual SMDSAbs_ElementType GetType() const;
374 private:
375 Handle(ShapeAnalysis_Surface) mySurface;
377 boost::shared_ptr<gp_Pln> myPlane;
378 };
379
380 /*
381 Class : MultiConnection
382 Description : Functor for calculating number of faces connected to the edge
383 */
385 public:
386 virtual double GetValue( long theElementId );
387 virtual double GetValue( const TSequenceOfXYZ& thePoints );
388 virtual double GetBadRate( double Value, int nbNodes ) const;
389 virtual SMDSAbs_ElementType GetType() const;
390 };
391
392 /*
393 Class : MultiConnection2D
394 Description : Functor for calculating number of faces connected to the edge
395 */
397 public:
398 virtual double GetValue( long theElementId );
399 virtual double GetValue( const TSequenceOfXYZ& thePoints );
400 virtual double GetBadRate( double Value, int nbNodes ) const;
401 virtual SMDSAbs_ElementType GetType() const;
402 struct Value{
403 long myPntId[2];
404 Value(long thePntId1, long thePntId2);
405 bool operator<(const Value& x) const;
406 };
407 typedef std::map<Value,int> MValues;
408
409 void GetValues(MValues& theValues);
410 };
411 typedef boost::shared_ptr<MultiConnection2D> MultiConnection2DPtr;
412
413 /*
414 Class : BallDiameter
415 Description : Functor returning diameter of a ball element
416 */
418 public:
419 virtual double GetValue( long theElementId );
420 virtual double GetBadRate( double Value, int nbNodes ) const;
421 virtual SMDSAbs_ElementType GetType() const;
422 };
423
424 /*
425 Class : NodeConnectivityNumber
426 Description : Functor returning number of elements connected to a node
427 */
429 public:
430 virtual double GetValue( long theNodeId );
431 virtual double GetBadRate( double Value, int nbNodes ) const;
432 virtual SMDSAbs_ElementType GetType() const;
433 };
434
435 /*
436 Class : ScaledJacobian
437 Description : Functor returning the ScaledJacobian as implemented in VTK for volumetric elements
438 */
440 public:
441 virtual double GetValue( long theNodeId );
442 virtual double GetBadRate( double Value, int nbNodes ) const;
443 virtual SMDSAbs_ElementType GetType() const;
444 };
445
446
447 /*
448 PREDICATES
449 */
450 /*
451 Class : CoincidentNodes
452 Description : Predicate of Coincident Nodes
453 Note : This class is suitable only for visualization of Coincident Nodes
454 */
456 public:
458 //virtual Predicate* clone() const { return new CoincidentNodes( *this ); }
459 virtual void SetMesh( const SMDS_Mesh* theMesh );
460 virtual bool IsSatisfy( long theElementId );
461 virtual SMDSAbs_ElementType GetType() const;
462
463 void SetTolerance (const double theToler);
464 double GetTolerance () const { return myToler; }
465
466 private:
467 double myToler;
470 };
471 typedef boost::shared_ptr<CoincidentNodes> CoincidentNodesPtr;
472
473 /*
474 Class : CoincidentElements
475 Description : Predicate of Coincident Elements
476 Note : This class is suitable only for visualization of Coincident Elements
477 */
479 public:
481 virtual void SetMesh( const SMDS_Mesh* theMesh );
482 virtual bool IsSatisfy( long theElementId );
483
484 private:
486 };
488 public:
489 virtual SMDSAbs_ElementType GetType() const;
490 //virtual Predicate* clone() const { return new CoincidentElements1D( *this ); }
491 };
493 public:
494 virtual SMDSAbs_ElementType GetType() const;
495 //virtual Predicate* clone() const { return new CoincidentElements2D( *this ); }
496 };
498 public:
499 virtual SMDSAbs_ElementType GetType() const;
500 //virtual Predicate* clone() const { return new CoincidentElements3D( *this ); }
501 };
502
503 /*
504 Class : FreeBorders
505 Description : Predicate for free borders
506 */
508 public:
509 FreeBorders();
510 //virtual Predicate* clone() const { return new FreeBorders( *this ); }
511 virtual void SetMesh( const SMDS_Mesh* theMesh );
512 virtual bool IsSatisfy( long theElementId );
513 virtual SMDSAbs_ElementType GetType() const;
514
515 protected:
517 };
518
519
520 /*
521 Class : BadOrientedVolume
522 Description : Predicate bad oriented volumes
523 */
525 public:
527 //virtual Predicate* clone() const { return new BadOrientedVolume( *this ); }
528 virtual void SetMesh( const SMDS_Mesh* theMesh );
529 virtual bool IsSatisfy( long theElementId );
530 virtual SMDSAbs_ElementType GetType() const;
531
532 protected:
534 };
535
536 /*
537 Class : ElemEntityType
538 Description : Functor for calculating entity type
539 */
541 public:
543 //virtual Predicate* clone() const { return new ElemEntityType( *this ); }
544 virtual void SetMesh( const SMDS_Mesh* theMesh );
545 virtual bool IsSatisfy( long theElementId );
546 void SetType( SMDSAbs_ElementType theType );
547 virtual SMDSAbs_ElementType GetType() const;
548 void SetElemEntityType( SMDSAbs_EntityType theEntityType );
549 SMDSAbs_EntityType GetElemEntityType() const;
550
551 private:
555 };
556 typedef boost::shared_ptr<ElemEntityType> ElemEntityTypePtr;
557
558
559 /*
560 BareBorderVolume
561 */
563 {
564 public:
565 BareBorderVolume():myMesh(0) {}
566 virtual Predicate* clone() const { return new BareBorderVolume( *this ); }
567 virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
568 virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; }
569 virtual bool IsSatisfy( long theElementId );
570 protected:
572 };
573 typedef boost::shared_ptr<BareBorderVolume> BareBorderVolumePtr;
574
575 /*
576 BareBorderFace
577 */
579 {
580 public:
581 BareBorderFace():myMesh(0) {}
582 //virtual Predicate* clone() const { return new BareBorderFace( *this ); }
583 virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
584 virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
585 virtual bool IsSatisfy( long theElementId );
586 protected:
588 std::vector< const SMDS_MeshNode* > myLinkNodes;
589 };
590 typedef boost::shared_ptr<BareBorderFace> BareBorderFacePtr;
591
592 /*
593 OverConstrainedVolume
594 */
596 {
597 public:
599 virtual Predicate* clone() const { return new OverConstrainedVolume( *this ); }
600 virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
601 virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; }
602 virtual bool IsSatisfy( long theElementId );
603 protected:
605 };
606 typedef boost::shared_ptr<OverConstrainedVolume> OverConstrainedVolumePtr;
607
608 /*
609 OverConstrainedFace
610 */
612 {
613 public:
614 OverConstrainedFace():myMesh(0) {}
615 //virtual Predicate* clone() const { return new OverConstrainedFace( *this ); }
616 virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
617 virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
618 virtual bool IsSatisfy( long theElementId );
619 protected:
621 };
622 typedef boost::shared_ptr<OverConstrainedFace> OverConstrainedFacePtr;
623
624 /*
625 Class : FreeEdges
626 Description : Predicate for free Edges
627 */
629 public:
630 FreeEdges();
631 //virtual Predicate* clone() const { return new FreeEdges( *this ); }
632 virtual void SetMesh( const SMDS_Mesh* theMesh );
633 virtual bool IsSatisfy( long theElementId );
634 virtual SMDSAbs_ElementType GetType() const;
635 static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const ::smIdType theFaceId );
636 typedef long TElemId;
637 struct Border{
639 TElemId myPntId[2];
640 Border(long theElemId, long thePntId1, long thePntId2);
641 bool operator<(const Border& x) const;
642 };
643 typedef std::set<Border> TBorders;
644 void GetBoreders(TBorders& theBorders);
645
646 protected:
648 };
649 typedef boost::shared_ptr<FreeEdges> FreeEdgesPtr;
650
651
652 /*
653 Class : FreeNodes
654 Description : Predicate for free nodes
655 */
657 public:
658 FreeNodes();
659 //virtual Predicate* clone() const { return new FreeNodes( *this ); }
660 virtual void SetMesh( const SMDS_Mesh* theMesh );
661 virtual bool IsSatisfy( long theNodeId );
662 virtual SMDSAbs_ElementType GetType() const;
663
664 protected:
666 };
667
668
669 /*
670 Class : RangeOfIds
671 Description : Predicate for Range of Ids.
672 Range may be specified with two ways.
673 1. Using AddToRange method
674 2. With SetRangeStr method. Parameter of this method is a string
675 like as "1,2,3,50-60,63,67,70-"
676 */
678 {
679 public:
680 RangeOfIds();
681 //virtual Predicate* clone() const { return new RangeOfIds( *this ); }
682 virtual void SetMesh( const SMDS_Mesh* theMesh );
683 virtual bool IsSatisfy( long theNodeId );
684 virtual SMDSAbs_ElementType GetType() const;
685 virtual void SetType( SMDSAbs_ElementType theType );
686
687 bool AddToRange( long theEntityId );
688 void GetRangeStr( TCollection_AsciiString& );
689 bool SetRangeStr( const TCollection_AsciiString& );
690
691 protected:
693
694 std::vector< ::smIdType > myMin;
695 std::vector< ::smIdType > myMax;
697
699 };
700
701 typedef boost::shared_ptr<RangeOfIds> RangeOfIdsPtr;
702
703
704 /*
705 Class : Comparator
706 Description : Base class for comparators
707 */
709 public:
710 Comparator();
711 virtual ~Comparator();
712 virtual void SetMesh( const SMDS_Mesh* theMesh );
713 virtual void SetMargin(double theValue);
714 virtual void SetNumFunctor(NumericalFunctorPtr theFunct);
715 virtual bool IsSatisfy( long theElementId ) = 0;
716 virtual SMDSAbs_ElementType GetType() const;
717 double GetMargin();
718
719 protected:
720 double myMargin;
722 };
723 typedef boost::shared_ptr<Comparator> ComparatorPtr;
724
725
726 /*
727 Class : LessThan
728 Description : Comparator "<"
729 */
731 public:
732 virtual bool IsSatisfy( long theElementId );
733 //virtual Predicate* clone() const { return new LessThan( *this ); }
734 };
735
736
737 /*
738 Class : MoreThan
739 Description : Comparator ">"
740 */
742 public:
743 virtual bool IsSatisfy( long theElementId );
744 //virtual Predicate* clone() const { return new MoreThan( *this ); }
745 };
746
747
748 /*
749 Class : EqualTo
750 Description : Comparator "="
751 */
753 public:
754 EqualTo();
755 //virtual Predicate* clone() const { return new EqualTo( *this ); }
756 virtual bool IsSatisfy( long theElementId );
757 virtual void SetTolerance( double theTol );
758 virtual double GetTolerance();
759
760 private:
761 double myToler;
762 };
763 typedef boost::shared_ptr<EqualTo> EqualToPtr;
764
765
766 /*
767 Class : LogicalNOT
768 Description : Logical NOT predicate
769 */
771 public:
772 LogicalNOT();
773 //virtual Predicate* clone() const { return new LogicalNOT( *this ); }
774 virtual ~LogicalNOT();
775 virtual bool IsSatisfy( long theElementId );
776 virtual void SetMesh( const SMDS_Mesh* theMesh );
777 virtual void SetPredicate(PredicatePtr thePred);
778 virtual SMDSAbs_ElementType GetType() const;
779
780 private:
782 };
783 typedef boost::shared_ptr<LogicalNOT> LogicalNOTPtr;
784
785
786 /*
787 Class : LogicalBinary
788 Description : Base class for binary logical predicate
789 */
791 public:
793 virtual ~LogicalBinary();
794 virtual void SetMesh( const SMDS_Mesh* theMesh );
795 virtual void SetPredicate1(PredicatePtr thePred);
796 virtual void SetPredicate2(PredicatePtr thePred);
797 virtual SMDSAbs_ElementType GetType() const;
798
799 protected:
802 };
803 typedef boost::shared_ptr<LogicalBinary> LogicalBinaryPtr;
804
805
806 /*
807 Class : LogicalAND
808 Description : Logical AND
809 */
811 public:
812 virtual bool IsSatisfy( long theElementId );
813 //virtual Predicate* clone() const { return new LogicalAND( *this ); }
814 };
815
816
817 /*
818 Class : LogicalOR
819 Description : Logical OR
820 */
822 public:
823 virtual bool IsSatisfy( long theElementId );
824 //virtual Predicate* clone() const { return new LogicalOR( *this ); }
825 };
826
827
828 /*
829 Class : ManifoldPart
830 Description : Predicate for manifold part of mesh
831 */
833 public:
834
835 /* internal class for algorithm uses */
836 class Link
837 {
838 public:
839 Link( SMDS_MeshNode* theNode1,
840 SMDS_MeshNode* theNode2 );
841 ~Link();
842
843 bool IsEqual( const ManifoldPart::Link& theLink ) const;
844 bool operator<(const ManifoldPart::Link& x) const;
845
848 };
849
850 bool IsEqual( const ManifoldPart::Link& theLink1,
851 const ManifoldPart::Link& theLink2 );
852
853 typedef std::set<ManifoldPart::Link> TMapOfLink;
854 typedef std::vector<SMDS_MeshFace*> TVectorOfFacePtr;
855 typedef std::vector<ManifoldPart::Link> TVectorOfLink;
856 typedef std::map<SMDS_MeshFace*,int> TDataMapFacePtrInt;
857 typedef std::map<ManifoldPart::Link,SMDS_MeshFace*> TDataMapOfLinkFacePtr;
858
859 ManifoldPart();
861 //virtual Predicate* clone() const { return new ManifoldPart( *this ); }
862 virtual void SetMesh( const SMDS_Mesh* theMesh );
863 // invoke when all parameters already set
864 virtual bool IsSatisfy( long theElementId );
865 virtual SMDSAbs_ElementType GetType() const;
866
867 void SetAngleTolerance( const double theAngToler );
868 double GetAngleTolerance() const;
869 void SetIsOnlyManifold( const bool theIsOnly );
870 void SetStartElem( const long theStartElemId );
871
872 private:
873 bool process();
874 bool findConnected( const TDataMapFacePtrInt& theAllFacePtrInt,
875 SMDS_MeshFace* theStartFace,
876 TMapOfLink& theNonManifold,
877 TIDsMap& theResFaces );
878 bool isInPlane( const SMDS_MeshFace* theFace1,
879 const SMDS_MeshFace* theFace2 );
880 void expandBoundary( TMapOfLink& theMapOfBoundary,
881 TVectorOfLink& theSeqOfBoundary,
882 TDataMapOfLinkFacePtr& theDMapLinkFacePtr,
883 TMapOfLink& theNonManifold,
884 SMDS_MeshFace* theNextFace ) const;
885
886 void getFacesByLink( const Link& theLink,
887 TVectorOfFacePtr& theFaces ) const;
888
889 private:
898
899 };
900 typedef boost::shared_ptr<ManifoldPart> ManifoldPartPtr;
901
902 /*
903 Class : BelongToMeshGroup
904 Description : Verify whether a mesh element is included into a mesh group
905 */
907 {
908 public:
910 //virtual Predicate* clone() const { return new BelongToMeshGroup( *this ); }
911 virtual void SetMesh( const SMDS_Mesh* theMesh );
912 virtual bool IsSatisfy( long theElementId );
913 virtual SMDSAbs_ElementType GetType() const;
914
915 void SetGroup( SMESHDS_GroupBase* g );
916 void SetStoreName( const std::string& sn );
917 const SMESHDS_GroupBase* GetGroup() const { return myGroup; }
918
919 private:
921 std::string myStoreName;
922 };
923 typedef boost::shared_ptr<BelongToMeshGroup> BelongToMeshGroupPtr;
924
925 /*
926 Class : ElementsOnSurface
927 Description : Predicate elements that lying on indicated surface
928 (plane or cylinder)
929 */
931 public:
934 //virtual Predicate* clone() const { return new ElementsOnSurface( *this ); }
935 virtual void SetMesh( const SMDS_Mesh* theMesh );
936 virtual bool IsSatisfy( long theElementId );
937 virtual SMDSAbs_ElementType GetType() const;
938
939 void SetTolerance( const double theToler );
940 double GetTolerance() const;
941 void SetSurface( const TopoDS_Shape& theShape,
942 const SMDSAbs_ElementType theType );
943 void SetUseBoundaries( bool theUse );
944 bool GetUseBoundaries() const { return myUseBoundaries; }
945
946 private:
947 void process();
948 void process( const SMDS_MeshElement* theElem );
949 bool isOnSurface( const SMDS_MeshNode* theNode );
950
951 private:
955 TopoDS_Face mySurf;
956 double myToler;
958 GeomAPI_ProjectPointOnSurf myProjector;
959 };
960
961 typedef boost::shared_ptr<ElementsOnSurface> ElementsOnSurfacePtr;
962
963
964 /*
965 Class : ElementsOnShape
966 Description : Predicate elements that lying on indicated shape
967 (1D, 2D or 3D)
968 */
970 {
971 public:
974
975 virtual Predicate* clone() const;
976 virtual void SetMesh (const SMDS_Mesh* theMesh);
977 virtual bool IsSatisfy (long theElementId);
978 virtual SMDSAbs_ElementType GetType() const;
979
980 void SetTolerance (const double theToler);
981 double GetTolerance() const;
982 void SetAllNodes (bool theAllNodes);
983 bool GetAllNodes() const { return myAllNodesFlag; }
984 void SetShape (const TopoDS_Shape& theShape,
985 const SMDSAbs_ElementType theType);
986 bool IsSatisfy (const SMDS_MeshElement* elem);
987 bool IsSatisfy (const SMDS_MeshNode* node, TopoDS_Shape* okShape=0);
988 void GetParams( double & u, double & v ) const { u = myU; v = myV; }
989
990 private:
991
992 struct OctreeClassifier;
993
994 void clearClassifiers();
995 bool getNodeIsOut( const SMDS_MeshNode* n, bool& isOut );
996 void setNodeIsOut( const SMDS_MeshNode* n, bool isOut );
997
998 std::vector< Classifier > myClassifiers;
999 std::vector< Classifier* > myWorkClassifiers;
1002 TopoDS_Shape myShape;
1003 double myToler;
1004 double myU, myV; // result of node projection on EDGE or FACE
1006
1008 std::vector<bool> myNodeIsChecked;
1009 std::vector<bool> myNodeIsOut;
1010 };
1011
1012 typedef boost::shared_ptr<ElementsOnShape> ElementsOnShapePtr;
1013
1014
1015 /*
1016 Class : BelongToGeom
1017 Description : Predicate for verifying whether entity belong to
1018 specified geometrical support
1019 */
1021 {
1022 public:
1023 BelongToGeom();
1024 virtual Predicate* clone() const;
1025
1026 virtual void SetMesh( const SMDS_Mesh* theMesh );
1027 virtual void SetGeom( const TopoDS_Shape& theShape );
1028
1029 virtual bool IsSatisfy( long theElementId );
1030
1031 virtual void SetType( SMDSAbs_ElementType theType );
1032 virtual SMDSAbs_ElementType GetType() const;
1033
1034 TopoDS_Shape GetShape();
1035 const SMESHDS_Mesh* GetMeshDS() const;
1036
1037 void SetTolerance( double );
1038 double GetTolerance();
1039
1040 private:
1041 virtual void init();
1042
1043 TopoDS_Shape myShape;
1044 TColStd_MapOfInteger mySubShapesIDs;
1048 double myTolerance; // only if myIsSubshape == false
1049 Controls::ElementsOnShapePtr myElementsOnShapePtr; // only if myIsSubshape == false
1050 };
1051 typedef boost::shared_ptr<BelongToGeom> BelongToGeomPtr;
1052
1053 /*
1054 Class : LyingOnGeom
1055 Description : Predicate for verifying whether entity lying or partially lying on
1056 specified geometrical support
1057 */
1059 {
1060 public:
1061 LyingOnGeom();
1062 virtual Predicate* clone() const;
1063
1064 virtual void SetMesh( const SMDS_Mesh* theMesh );
1065 virtual void SetGeom( const TopoDS_Shape& theShape );
1066
1067 virtual bool IsSatisfy( long theElementId );
1068
1069 virtual void SetType( SMDSAbs_ElementType theType );
1070 virtual SMDSAbs_ElementType GetType() const;
1071
1072 TopoDS_Shape GetShape();
1073 const SMESHDS_Mesh* GetMeshDS() const;
1074
1075 void SetTolerance( double );
1076 double GetTolerance();
1077
1078 private:
1079 virtual void init();
1080
1081 TopoDS_Shape myShape;
1082 TColStd_MapOfInteger mySubShapesIDs;
1086 double myTolerance; // only if myIsSubshape == false
1087 Controls::ElementsOnShapePtr myElementsOnShapePtr; // only if myIsSubshape == false
1088 };
1089 typedef boost::shared_ptr<LyingOnGeom> LyingOnGeomPtr;
1090
1091 /*
1092 Class : FreeFaces
1093 Description : Predicate for free faces
1094 */
1096 public:
1097 FreeFaces();
1098 //virtual Predicate* clone() const { return new FreeFaces( *this ); }
1099 virtual void SetMesh( const SMDS_Mesh* theMesh );
1100 virtual bool IsSatisfy( long theElementId );
1101 virtual SMDSAbs_ElementType GetType() const;
1102
1103 private:
1105 };
1106
1107 /*
1108 Class : LinearOrQuadratic
1109 Description : Predicate for free faces
1110 */
1112 public:
1114 //virtual Predicate* clone() const { return new LinearOrQuadratic( *this ); }
1115 virtual void SetMesh( const SMDS_Mesh* theMesh );
1116 virtual bool IsSatisfy( long theElementId );
1117 void SetType( SMDSAbs_ElementType theType );
1118 virtual SMDSAbs_ElementType GetType() const;
1119
1120 private:
1123 };
1124 typedef boost::shared_ptr<LinearOrQuadratic> LinearOrQuadraticPtr;
1125
1126 /*
1127 Class : GroupColor
1128 Description : Functor for check color of group to which mesh element belongs to
1129 */
1131 public:
1132 GroupColor();
1133 //virtual Predicate* clone() const { return new GroupColor( *this ); }
1134 virtual void SetMesh( const SMDS_Mesh* theMesh );
1135 virtual bool IsSatisfy( long theElementId );
1136 void SetType( SMDSAbs_ElementType theType );
1137 virtual SMDSAbs_ElementType GetType() const;
1138 void SetColorStr( const TCollection_AsciiString& );
1139 void GetColorStr( TCollection_AsciiString& ) const;
1140
1141 private:
1142 typedef std::set< long > TIDs;
1143
1144 Quantity_Color myColor;
1147 };
1148 typedef boost::shared_ptr<GroupColor> GroupColorPtr;
1149
1150 /*
1151 Class : ElemGeomType
1152 Description : Predicate to check element geometry type
1153 */
1155 public:
1156 ElemGeomType();
1157 //virtual Predicate* clone() const { return new ElemGeomType( *this ); }
1158 virtual void SetMesh( const SMDS_Mesh* theMesh );
1159 virtual bool IsSatisfy( long theElementId );
1160 void SetType( SMDSAbs_ElementType theType );
1161 virtual SMDSAbs_ElementType GetType() const;
1162 void SetGeomType( SMDSAbs_GeometryType theType );
1163 SMDSAbs_GeometryType GetGeomType() const;
1164
1165 private:
1169 };
1170 typedef boost::shared_ptr<ElemGeomType> ElemGeomTypePtr;
1171
1172 /*
1173 Class : CoplanarFaces
1174 Description : Predicate to check angle between faces
1175 */
1177 {
1178 public:
1179 CoplanarFaces();
1180 //virtual Predicate* clone() const { return new CoplanarFaces( *this ); }
1181 void SetFace( long theID ) { myFaceID = theID; }
1182 long GetFace() const { return myFaceID; }
1183 void SetTolerance (const double theToler) { myToler = theToler; }
1184 double GetTolerance () const { return myToler; }
1185 virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
1186
1187 virtual void SetMesh( const SMDS_Mesh* theMesh );
1188 virtual bool IsSatisfy( long theElementId );
1189
1190 private:
1193 double myToler;
1195 };
1196 typedef boost::shared_ptr<CoplanarFaces> CoplanarFacesPtr;
1197
1198 /*
1199 Class : ConnectedElements
1200 Description : Predicate to get elements of one domain
1201 */
1203 {
1204 public:
1206 //virtual Predicate* clone() const { return new ConnectedElements( *this ); }
1207 void SetNode( ::smIdType nodeID );
1208 void SetPoint( double x, double y, double z );
1209 ::smIdType GetNode() const;
1210 std::vector<double> GetPoint() const;
1211
1212 void SetType( SMDSAbs_ElementType theType );
1213 virtual SMDSAbs_ElementType GetType() const;
1214
1215 virtual void SetMesh( const SMDS_Mesh* theMesh );
1216 virtual bool IsSatisfy( long theElementId );
1217
1218 //const std::set<long>& GetDomainIDs() const { return myOkIDs; }
1219
1220 private:
1221 ::smIdType myNodeID;
1222 std::vector<double> myXYZ;
1225
1226 void clearOkIDs();
1228 std::set<::smIdType> myOkIDs; // empty means that there is one domain
1229 };
1230 typedef boost::shared_ptr<ConnectedElements> ConnectedElementsPtr;
1231
1232 /*
1233 FILTER
1234 */
1236 public:
1237 Filter();
1238 virtual ~Filter();
1239 virtual void SetPredicate(PredicatePtr thePred);
1240
1241 typedef std::vector<long> TIdSequence;
1242
1243 virtual
1244 void
1245 GetElementsId( const SMDS_Mesh* theMesh,
1246 TIdSequence& theSequence,
1247 SMDS_ElemIteratorPtr theElements=0);
1248
1249 static
1250 void
1251 GetElementsId( const SMDS_Mesh* theMesh,
1252 PredicatePtr thePredicate,
1253 TIdSequence& theSequence,
1254 SMDS_ElemIteratorPtr theElements=0 );
1255
1256 protected:
1258 };
1259 }
1260}
1261
1262
1263#endif
SMDSAbs_GeometryType
enumeration for element geometry type
Definition: SMDSAbs_ElementType.hxx:47
SMDSAbs_ElementType
Type (node, edge, face or volume) of elements.
Definition: SMDSAbs_ElementType.hxx:34
@ SMDSAbs_Face
Definition: SMDSAbs_ElementType.hxx:38
@ SMDSAbs_Volume
Definition: SMDSAbs_ElementType.hxx:39
SMDSAbs_EntityType
Enumeration of entity type used in mesh info array.
Definition: SMDSAbs_ElementType.hxx:79
boost::shared_ptr< SMDS_Iterator< const SMDS_MeshElement * > > SMDS_ElemIteratorPtr
Definition: SMDS_ElemIterator.hxx:43
const int Border
Definition: SMESHGUI_PatternWidget.cxx:34
NCollection_Sequence< smIdType > TIDsSeq
Definition: SMESH_ControlsDef.hxx:63
NCollection_Map< smIdType, smIdHasher > TIDsMap
Definition: SMESH_ControlsDef.hxx:62
#define SMESHCONTROLS_EXPORT
Definition: SMESH_Controls.hxx:41
bool process(const TCollection_AsciiString &str, int convMode, bool &syntax, bool &args, bool &non_neg, bool &non_zero, bool &singulars, double &sing_point)
this function parses the expression 'str' in order to check if syntax is correct ( result in 'syntax'...
Definition: StdMeshers_NumberOfSegments.cxx:358
Base class for elements.
Definition: SMDS_MeshElement.hxx:56
Mesh face.
Definition: SMDS_MeshFace.hxx:41
Definition: SMDS_MeshNode.hxx:36
Definition: SMDS_Mesh.hxx:53
Definition: SMESHDS_GroupBase.hxx:42
Definition: SMESHDS_Mesh.hxx:98
Definition: SMESHDS_SubMesh.hxx:48
Definition: SMESH_ControlsDef.hxx:310
Definition: SMESH_ControlsDef.hxx:229
Definition: SMESH_ControlsDef.hxx:215
Definition: SMESH_ControlsDef.hxx:524
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:533
Definition: SMESH_ControlsDef.hxx:417
Definition: SMESH_ControlsDef.hxx:579
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:587
virtual SMDSAbs_ElementType GetType() const
Definition: SMESH_ControlsDef.hxx:584
virtual void SetMesh(const SMDS_Mesh *theMesh)
Definition: SMESH_ControlsDef.hxx:583
std::vector< const SMDS_MeshNode * > myLinkNodes
Definition: SMESH_ControlsDef.hxx:588
BareBorderFace()
Definition: SMESH_ControlsDef.hxx:581
Definition: SMESH_ControlsDef.hxx:563
BareBorderVolume()
Definition: SMESH_ControlsDef.hxx:565
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:571
virtual void SetMesh(const SMDS_Mesh *theMesh)
Definition: SMESH_ControlsDef.hxx:567
virtual Predicate * clone() const
Definition: SMESH_ControlsDef.hxx:566
virtual SMDSAbs_ElementType GetType() const
Definition: SMESH_ControlsDef.hxx:568
Definition: SMESH_ControlsDef.hxx:1021
TopoDS_Shape myShape
Definition: SMESH_ControlsDef.hxx:1043
TColStd_MapOfInteger mySubShapesIDs
Definition: SMESH_ControlsDef.hxx:1044
const SMESHDS_Mesh * myMeshDS
Definition: SMESH_ControlsDef.hxx:1045
bool myIsSubshape
Definition: SMESH_ControlsDef.hxx:1047
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:1046
double myTolerance
Definition: SMESH_ControlsDef.hxx:1048
Controls::ElementsOnShapePtr myElementsOnShapePtr
Definition: SMESH_ControlsDef.hxx:1049
Definition: SMESH_ControlsDef.hxx:907
const SMESHDS_GroupBase * GetGroup() const
Definition: SMESH_ControlsDef.hxx:917
SMESHDS_GroupBase * myGroup
Definition: SMESH_ControlsDef.hxx:920
std::string myStoreName
Definition: SMESH_ControlsDef.hxx:921
Definition: SMESH_ControlsDef.hxx:487
Definition: SMESH_ControlsDef.hxx:492
Definition: SMESH_ControlsDef.hxx:497
Definition: SMESH_ControlsDef.hxx:478
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:485
Definition: SMESH_ControlsDef.hxx:455
TMeshModifTracer myMeshModifTracer
Definition: SMESH_ControlsDef.hxx:469
TIDsMap myCoincidentIDs
Definition: SMESH_ControlsDef.hxx:468
double GetTolerance() const
Definition: SMESH_ControlsDef.hxx:464
double myToler
Definition: SMESH_ControlsDef.hxx:467
Definition: SMESH_ControlsDef.hxx:708
virtual bool IsSatisfy(long theElementId)=0
NumericalFunctorPtr myFunctor
Definition: SMESH_ControlsDef.hxx:721
double myMargin
Definition: SMESH_ControlsDef.hxx:720
Definition: SMESH_ControlsDef.hxx:1203
std::set<::smIdType > myOkIDs
Definition: SMESH_ControlsDef.hxx:1228
TMeshModifTracer myMeshModifTracer
Definition: SMESH_ControlsDef.hxx:1224
std::vector< double > myXYZ
Definition: SMESH_ControlsDef.hxx:1222
void SetNode(::smIdType nodeID)
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:1223
bool myOkIDsReady
Definition: SMESH_ControlsDef.hxx:1227
::smIdType myNodeID
Definition: SMESH_ControlsDef.hxx:1221
Definition: SMESH_ControlsDef.hxx:1177
long myFaceID
Definition: SMESH_ControlsDef.hxx:1192
virtual SMDSAbs_ElementType GetType() const
Definition: SMESH_ControlsDef.hxx:1185
void SetTolerance(const double theToler)
Definition: SMESH_ControlsDef.hxx:1183
TMeshModifTracer myMeshModifTracer
Definition: SMESH_ControlsDef.hxx:1191
double myToler
Definition: SMESH_ControlsDef.hxx:1193
TIDsMap myCoplanarIDs
Definition: SMESH_ControlsDef.hxx:1194
double GetTolerance() const
Definition: SMESH_ControlsDef.hxx:1184
long GetFace() const
Definition: SMESH_ControlsDef.hxx:1182
void SetFace(long theID)
Definition: SMESH_ControlsDef.hxx:1181
Definition: SMESH_ControlsDef.hxx:368
int myShapeIndex
Definition: SMESH_ControlsDef.hxx:376
boost::shared_ptr< gp_Pln > myPlane
Definition: SMESH_ControlsDef.hxx:377
Handle(ShapeAnalysis_Surface) mySurface
Definition: SMESH_ControlsDef.hxx:540
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:553
SMDSAbs_EntityType myEntityType
Definition: SMESH_ControlsDef.hxx:554
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:552
Definition: SMESH_ControlsDef.hxx:1154
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:1166
SMDSAbs_GeometryType myGeomType
Definition: SMESH_ControlsDef.hxx:1168
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:1167
Definition: SMESH_ControlsDef.hxx:970
std::vector< Classifier > myClassifiers
Definition: SMESH_ControlsDef.hxx:998
std::vector< Classifier * > myWorkClassifiers
Definition: SMESH_ControlsDef.hxx:999
std::vector< bool > myNodeIsOut
Definition: SMESH_ControlsDef.hxx:1009
bool GetAllNodes() const
Definition: SMESH_ControlsDef.hxx:983
TMeshModifTracer myMeshModifTracer
Definition: SMESH_ControlsDef.hxx:1007
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:1001
double myU
Definition: SMESH_ControlsDef.hxx:1004
OctreeClassifier * myOctree
Definition: SMESH_ControlsDef.hxx:1000
bool myAllNodesFlag
Definition: SMESH_ControlsDef.hxx:1005
TopoDS_Shape myShape
Definition: SMESH_ControlsDef.hxx:1002
void GetParams(double &u, double &v) const
Definition: SMESH_ControlsDef.hxx:988
double myToler
Definition: SMESH_ControlsDef.hxx:1003
std::vector< bool > myNodeIsChecked
Definition: SMESH_ControlsDef.hxx:1008
Definition: SMESH_ControlsDef.hxx:930
bool GetUseBoundaries() const
Definition: SMESH_ControlsDef.hxx:944
TIDsMap myIds
Definition: SMESH_ControlsDef.hxx:953
TMeshModifTracer myMeshModifTracer
Definition: SMESH_ControlsDef.hxx:952
bool myUseBoundaries
Definition: SMESH_ControlsDef.hxx:957
double myToler
Definition: SMESH_ControlsDef.hxx:956
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:954
TopoDS_Face mySurf
Definition: SMESH_ControlsDef.hxx:955
GeomAPI_ProjectPointOnSurf myProjector
Definition: SMESH_ControlsDef.hxx:958
Definition: SMESH_ControlsDef.hxx:752
double myToler
Definition: SMESH_ControlsDef.hxx:761
Definition: SMESH_ControlsDef.hxx:1235
PredicatePtr myPredicate
Definition: SMESH_ControlsDef.hxx:1257
std::vector< long > TIdSequence
Definition: SMESH_ControlsDef.hxx:1241
Definition: SMESH_ControlsDef.hxx:507
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:516
Definition: SMESH_ControlsDef.hxx:628
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:647
long TElemId
Definition: SMESH_ControlsDef.hxx:636
std::set< Border > TBorders
Definition: SMESH_ControlsDef.hxx:643
Definition: SMESH_ControlsDef.hxx:1095
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:1104
Definition: SMESH_ControlsDef.hxx:656
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:665
Definition: SMESH_Controls.hxx:54
Definition: SMESH_ControlsDef.hxx:1130
TIDs myIDs
Definition: SMESH_ControlsDef.hxx:1146
std::set< long > TIDs
Definition: SMESH_ControlsDef.hxx:1142
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:1145
Quantity_Color myColor
Definition: SMESH_ControlsDef.hxx:1144
Definition: SMESH_ControlsDef.hxx:333
std::set< Value > TValues
Definition: SMESH_ControlsDef.hxx:346
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:350
Definition: SMESH_ControlsDef.hxx:358
Definition: SMESH_ControlsDef.hxx:322
Definition: SMESH_ControlsDef.hxx:730
Definition: SMESH_ControlsDef.hxx:1111
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:1121
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:1122
Definition: SMESH_ControlsDef.hxx:810
Definition: SMESH_ControlsDef.hxx:790
PredicatePtr myPredicate2
Definition: SMESH_ControlsDef.hxx:801
PredicatePtr myPredicate1
Definition: SMESH_ControlsDef.hxx:800
Definition: SMESH_ControlsDef.hxx:770
PredicatePtr myPredicate
Definition: SMESH_ControlsDef.hxx:781
Definition: SMESH_ControlsDef.hxx:821
Definition: SMESH_ControlsDef.hxx:1059
Controls::ElementsOnShapePtr myElementsOnShapePtr
Definition: SMESH_ControlsDef.hxx:1087
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:1084
double myTolerance
Definition: SMESH_ControlsDef.hxx:1086
bool myIsSubshape
Definition: SMESH_ControlsDef.hxx:1085
TColStd_MapOfInteger mySubShapesIDs
Definition: SMESH_ControlsDef.hxx:1082
TopoDS_Shape myShape
Definition: SMESH_ControlsDef.hxx:1081
const SMESHDS_Mesh * myMeshDS
Definition: SMESH_ControlsDef.hxx:1083
Definition: SMESH_ControlsDef.hxx:832
bool myIsOnlyManifold
Definition: SMESH_ControlsDef.hxx:896
TDataMapFacePtrInt myAllFacePtrIntDMap
Definition: SMESH_ControlsDef.hxx:894
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:890
TIDsMap myMapBadGeomIds
Definition: SMESH_ControlsDef.hxx:892
TIDsMap myMapIds
Definition: SMESH_ControlsDef.hxx:891
TVectorOfFacePtr myAllFacePtr
Definition: SMESH_ControlsDef.hxx:893
double myAngToler
Definition: SMESH_ControlsDef.hxx:895
std::vector< SMDS_MeshFace * > TVectorOfFacePtr
Definition: SMESH_ControlsDef.hxx:854
std::map< SMDS_MeshFace *, int > TDataMapFacePtrInt
Definition: SMESH_ControlsDef.hxx:856
long myStartElemId
Definition: SMESH_ControlsDef.hxx:897
std::set< ManifoldPart::Link > TMapOfLink
Definition: SMESH_ControlsDef.hxx:853
std::map< ManifoldPart::Link, SMDS_MeshFace * > TDataMapOfLinkFacePtr
Definition: SMESH_ControlsDef.hxx:857
std::vector< ManifoldPart::Link > TVectorOfLink
Definition: SMESH_ControlsDef.hxx:855
Definition: SMESH_ControlsDef.hxx:178
Definition: SMESH_ControlsDef.hxx:191
Definition: SMESH_ControlsDef.hxx:203
Definition: SMESH_ControlsDef.hxx:741
Definition: SMESH_ControlsDef.hxx:396
std::map< Value, int > MValues
Definition: SMESH_ControlsDef.hxx:407
Definition: SMESH_ControlsDef.hxx:384
Definition: SMESH_ControlsDef.hxx:428
Definition: SMESH_ControlsDef.hxx:131
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:154
const SMDS_MeshElement * myCurrElement
Definition: SMESH_ControlsDef.hxx:155
void GetHistogram(int nbIntervals, std::vector< int > &nbEvents, std::vector< double > &funValues, const std::vector<::smIdType > &elements, const double *minmax=0, const bool isLogarithmic=false)
bool GetPoints(const ::smIdType theId, TSequenceOfXYZ &theRes) const
long myPrecision
Definition: SMESH_ControlsDef.hxx:156
double myPrecisionValue
Definition: SMESH_ControlsDef.hxx:157
virtual double GetBadRate(double Value, int nbNodes) const =0
virtual SMDSAbs_ElementType GetType() const =0
virtual double GetValue(const TSequenceOfXYZ &)
Definition: SMESH_ControlsDef.hxx:136
Definition: SMESH_ControlsDef.hxx:612
OverConstrainedFace()
Definition: SMESH_ControlsDef.hxx:614
virtual void SetMesh(const SMDS_Mesh *theMesh)
Definition: SMESH_ControlsDef.hxx:616
virtual SMDSAbs_ElementType GetType() const
Definition: SMESH_ControlsDef.hxx:617
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:620
Definition: SMESH_ControlsDef.hxx:596
virtual SMDSAbs_ElementType GetType() const
Definition: SMESH_ControlsDef.hxx:601
OverConstrainedVolume()
Definition: SMESH_ControlsDef.hxx:598
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:604
virtual Predicate * clone() const
Definition: SMESH_ControlsDef.hxx:599
virtual void SetMesh(const SMDS_Mesh *theMesh)
Definition: SMESH_ControlsDef.hxx:600
Definition: SMESH_Controls.hxx:70
Definition: SMESH_ControlsDef.hxx:678
TIDsMap myIds
Definition: SMESH_ControlsDef.hxx:696
std::vector< ::smIdType > myMin
Definition: SMESH_ControlsDef.hxx:694
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:692
SMDSAbs_ElementType myType
Definition: SMESH_ControlsDef.hxx:698
std::vector< ::smIdType > myMax
Definition: SMESH_ControlsDef.hxx:695
Definition: SMESH_ControlsDef.hxx:439
Definition: SMESH_ControlsDef.hxx:297
Class used to detect mesh modification: IsMeshModified() returns true if a mesh has changed since las...
Definition: SMESH_ControlsDef.hxx:117
const SMDS_Mesh * myMesh
Definition: SMESH_ControlsDef.hxx:119
const SMDS_Mesh * GetMesh() const
Definition: SMESH_ControlsDef.hxx:123
unsigned long myMeshModifTime
Definition: SMESH_ControlsDef.hxx:118
Definition: SMESH_ControlsDef.hxx:69
void setElement(const SMDS_MeshElement *e)
Definition: SMESH_ControlsDef.hxx:101
const SMDS_MeshElement * getElement() const
Definition: SMESH_ControlsDef.hxx:103
std::vector< gp_XYZ > myArray
Definition: SMESH_ControlsDef.hxx:108
const SMDS_MeshElement * myElem
Definition: SMESH_ControlsDef.hxx:109
std::vector< gp_XYZ >::size_type size_type
Definition: SMESH_ControlsDef.hxx:70
Definition: SMESH_ControlsDef.hxx:285
Definition: SMESH_ControlsDef.hxx:165
Definition: SMESH_ControlsDef.hxx:259
std::vector< Value > WValues
Definition: SMESH_ControlsDef.hxx:272
Definition: SMESH_ControlsDef.hxx:243
bool IsEqual(TFloat theLeft, TFloat theRight)
Definition: MED_GaussUtils.cxx:132
bool operator<(const TFamilyTSize &theLeft, const TFamilyTSize &theRight)
Compare two MED FAMILIES.
Definition: MED_Algorithm.cxx:160
boost::shared_ptr< BareBorderFace > BareBorderFacePtr
Definition: SMESH_ControlsDef.hxx:590
boost::shared_ptr< FreeEdges > FreeEdgesPtr
Definition: SMESH_ControlsDef.hxx:649
boost::shared_ptr< ElementsOnSurface > ElementsOnSurfacePtr
Definition: SMESH_ControlsDef.hxx:961
boost::shared_ptr< ElemGeomType > ElemGeomTypePtr
Definition: SMESH_ControlsDef.hxx:1170
boost::shared_ptr< OverConstrainedVolume > OverConstrainedVolumePtr
Definition: SMESH_ControlsDef.hxx:606
boost::shared_ptr< Length3D > Length3DPtr
Definition: SMESH_ControlsDef.hxx:362
boost::shared_ptr< EqualTo > EqualToPtr
Definition: SMESH_ControlsDef.hxx:763
boost::shared_ptr< LogicalBinary > LogicalBinaryPtr
Definition: SMESH_ControlsDef.hxx:803
boost::shared_ptr< Length2D > Length2DPtr
Definition: SMESH_ControlsDef.hxx:352
boost::shared_ptr< NumericalFunctor > NumericalFunctorPtr
Definition: SMESH_Controls.hxx:64
boost::shared_ptr< CoplanarFaces > CoplanarFacesPtr
Definition: SMESH_ControlsDef.hxx:1196
boost::shared_ptr< LinearOrQuadratic > LinearOrQuadraticPtr
Definition: SMESH_ControlsDef.hxx:1124
boost::shared_ptr< OverConstrainedFace > OverConstrainedFacePtr
Definition: SMESH_ControlsDef.hxx:622
boost::shared_ptr< CoincidentNodes > CoincidentNodesPtr
Definition: SMESH_ControlsDef.hxx:471
boost::shared_ptr< Comparator > ComparatorPtr
Definition: SMESH_ControlsDef.hxx:723
boost::shared_ptr< MultiConnection2D > MultiConnection2DPtr
Definition: SMESH_ControlsDef.hxx:411
boost::shared_ptr< ConnectedElements > ConnectedElementsPtr
Definition: SMESH_ControlsDef.hxx:1230
boost::shared_ptr< LogicalNOT > LogicalNOTPtr
Definition: SMESH_ControlsDef.hxx:783
boost::shared_ptr< Warping3D > Warping3DPtr
Definition: SMESH_ControlsDef.hxx:278
boost::shared_ptr< BelongToGeom > BelongToGeomPtr
Definition: SMESH_ControlsDef.hxx:1051
boost::shared_ptr< BelongToMeshGroup > BelongToMeshGroupPtr
Definition: SMESH_ControlsDef.hxx:923
boost::shared_ptr< ManifoldPart > ManifoldPartPtr
Definition: SMESH_ControlsDef.hxx:900
boost::shared_ptr< ElemEntityType > ElemEntityTypePtr
Definition: SMESH_ControlsDef.hxx:556
boost::shared_ptr< Predicate > PredicatePtr
Definition: SMESH_Controls.hxx:76
boost::shared_ptr< GroupColor > GroupColorPtr
Definition: SMESH_ControlsDef.hxx:1148
boost::shared_ptr< ElementsOnShape > ElementsOnShapePtr
Definition: SMESH_ControlsDef.hxx:1012
boost::shared_ptr< LyingOnGeom > LyingOnGeomPtr
Definition: SMESH_ControlsDef.hxx:1089
boost::shared_ptr< RangeOfIds > RangeOfIdsPtr
Definition: SMESH_ControlsDef.hxx:701
boost::shared_ptr< BareBorderVolume > BareBorderVolumePtr
Definition: SMESH_ControlsDef.hxx:573
Definition: SMESH_ControlsClassifier.cxx:39
bool IsApplicable(const QString &aHypType, GEOM::GEOM_Object_ptr theGeomObject, const bool toCheckAll)
Definition: SMESHGUI_HypothesesUtils.cxx:617
Definition: SMESH_Controls.cxx:4495
Definition: SMESH_ControlsDef.hxx:637
TElemId myElemId
Definition: SMESH_ControlsDef.hxx:638
Definition: SMESH_ControlsDef.hxx:340
double myLength
Definition: SMESH_ControlsDef.hxx:341
Definition: SMESH_ControlsDef.hxx:402
Definition: SMESH_ControlsDef.hxx:266
double myWarp
Definition: SMESH_ControlsDef.hxx:267
std::vector< long > myPntIds
Definition: SMESH_ControlsDef.hxx:268