From dcf2fe5cadade3e9581d68b44e6b9d5db5040247 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 15 Jun 2015 21:31:23 +0300 Subject: [PATCH 01/48] [HYDRO module - Feature #523] river, channel, embankment meshing --- .../SMESH/images/quad_from_ma_medial_axis.png | Bin 0 -> 9580 bytes .../gui/SMESH/images/quad_from_ma_mesh.png | Bin 0 -> 10961 bytes .../gui/SMESH/input/basic_meshing_algos.doc | 3 +- .../gui/SMESH/input/quad_from_ma_algo.doc | 30 + idl/SMESH_BasicHypothesis.idl | 7 + resources/StdMeshers.xml.in | 13 + src/SMESH/SMESH_MesherHelper.cxx | 23 + src/SMESH/SMESH_MesherHelper.hxx | 8 +- src/SMESHUtils/CMakeLists.txt | 2 + src/SMESHUtils/SMESH_MAT2d.cxx | 1571 +++++++++++++++++ src/SMESHUtils/SMESH_MAT2d.hxx | 224 +++ src/SMESH_SWIG/StdMeshersBuilder.py | 48 +- src/StdMeshers/CMakeLists.txt | 2 + src/StdMeshers/StdMeshers_MEFISTO_2D.cxx | 16 +- .../StdMeshers_QuadFromMedialAxis_1D2D.cxx | 1251 +++++++++++++ .../StdMeshers_QuadFromMedialAxis_1D2D.hxx | 65 + src/StdMeshers/StdMeshers_Quadrangle_2D.cxx | 32 +- src/StdMeshers/StdMeshers_Quadrangle_2D.hxx | 2 + src/StdMeshersGUI/StdMeshers_images.ts | 4 + .../StdMeshers_Quadrangle_2D_i.cxx | 38 + .../StdMeshers_Quadrangle_2D_i.hxx | 23 + src/StdMeshers_I/StdMeshers_i.cxx | 2 + 22 files changed, 3335 insertions(+), 29 deletions(-) create mode 100644 doc/salome/gui/SMESH/images/quad_from_ma_medial_axis.png create mode 100644 doc/salome/gui/SMESH/images/quad_from_ma_mesh.png create mode 100644 doc/salome/gui/SMESH/input/quad_from_ma_algo.doc create mode 100644 src/SMESHUtils/SMESH_MAT2d.cxx create mode 100644 src/SMESHUtils/SMESH_MAT2d.hxx create mode 100644 src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx create mode 100644 src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx diff --git a/doc/salome/gui/SMESH/images/quad_from_ma_medial_axis.png b/doc/salome/gui/SMESH/images/quad_from_ma_medial_axis.png new file mode 100644 index 0000000000000000000000000000000000000000..b02ceabcd1ec527a60281d981bafcb0a4ab79d56 GIT binary patch literal 9580 zcmV-yC6n5TP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#00007bV*G`2j2z{ z5(g>j&X^eh03ZNKL_t(|+U;F!kXzSTel|_0wy8z&OloR;xhRWoMb@3W+q`LZJ1uMCf*RpSYc|` zIE~`$N^yuC+x0r1PHG~4oU5aw`=u-059vtnJN{wsu64Cn&wbDP@x0GF)@U?9My7~e zMz?^B@JdETcqJpe(k&n(yplQX?Afz)69})$*z)r7%*@OiZ@fXbB8rVsJu4mi;0Hgr zX3d(TM~~ig(@k_Y2(JTwqsPVo(A}nZKmjY4%K$9PqFX_DB_q6&#cGvG1wb~NrCUMq zD+RCQU&-RLdc6*SF-Et7@T!1St5pEHuG6g`yebpCl2QCh!7KS!G74S^uN1t}tsuOT zQT$3q!7KS!GBU#Jpc~O#2(M&>SF&V`XfBj*DP#3|J(I~$vPJ$?jmVXQ70s3b8R2zs z!J5zK#Xn1>65SKRt75SM-2}p`8fKa%@5+)9UL_xP8uily@lFiG5P#=PmwY}yJ3C8W zmg)llP_Ce|1alDp*j5zogtl%VLRiLFp-`w+t0J7WEK5c+*~sCwTtR-W?JI)-SvPG! zBw-xHnx+x>MlK%MyLWH?6Jt10#))z(UR*@!aG#wkT%1?KFnD9uG|fyV!+(aXYip=% z9>34Dg=vc&=;yoQxU?)Q;JX1oKo($X#{=aG@(t_lE;3=-Bu6`1@hdlWpn*O1A9kQoJLM5FT9)M=`r}`Z>uuC(H4&RK#=4Dn zDWVOPu?)lS&;+Y>BosJ23DnWCD?bli;Z=q#p>~+_Ek_93nCYePBy&^bn4zoFS%j^^ z0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ck=RKlUv_2Wst3vVzcu=v?CJHPqa zRjrqlkG%!19LJ8=jpH#j<}$x)#4XI{T;6p;D_I_?H<~lnSVVwUjDf HSOoqb3W$dn literal 0 HcmV?d00001 diff --git a/doc/salome/gui/SMESH/input/basic_meshing_algos.doc b/doc/salome/gui/SMESH/input/basic_meshing_algos.doc index f494926d1..b82b67f89 100644 --- a/doc/salome/gui/SMESH/input/basic_meshing_algos.doc +++ b/doc/salome/gui/SMESH/input/basic_meshing_algos.doc @@ -58,7 +58,8 @@ without geometrical objects. There is also a number of more specific algorithms:
    -
  • \subpage prism_3d_algo_page "for meshing prismatic shapes"
  • +
  • \subpage prism_3d_algo_page "for meshing prismatic 3D shapes"
  • +
  • \subpage quad_from_ma_algo_page "for meshing faces with sinuous borders"
  • \subpage projection_algos_page "for meshing by projection of another mesh"
  • \subpage import_algos_page "for meshing by importing elements from another mesh"
  • \subpage radial_prism_algo_page "for meshing geometrical objects with cavities"
  • diff --git a/doc/salome/gui/SMESH/input/quad_from_ma_algo.doc b/doc/salome/gui/SMESH/input/quad_from_ma_algo.doc new file mode 100644 index 000000000..976783d40 --- /dev/null +++ b/doc/salome/gui/SMESH/input/quad_from_ma_algo.doc @@ -0,0 +1,30 @@ +/*! + +\page quad_from_ma_algo_page Medial Axis Projection Quadrangle meshing algorithm + +Medial Axis Projection algorithm can be used for meshing faces with +sinuous borders and having channel-like shape, for which is it +difficult to define 1D hypotheses so that generated quadrangles to be +of good shape. + +\image html quad_from_ma_mesh.png "A mesh of a river model" + +The algorithm assures good shape of quadrangles by constructing Medial +Axis between sinuous borders of the face and using it to +discretize the borders. + +\image html quad_from_ma_medial_axis.png "Media Axis between two blue sinuous borders" + +The Medial Axis is used in two ways: +
      +
    1. If there is a sub-mesh on either sinuous border, then the nodes of + this border are mapped to the opposite border via the Medial + Axis.
    2. +
    3. If there is no sub-meshes on the sinuous borders, then a part of + the Medial Axis that can be mapped to both borders is discretized + using a hypothesis assigned to the face or its ancestor shapes, + and the division points are mapped from the Medial Axis to the both + borders.
    4. +
    + +*/ diff --git a/idl/SMESH_BasicHypothesis.idl b/idl/SMESH_BasicHypothesis.idl index 274365bf2..60f603caa 100644 --- a/idl/SMESH_BasicHypothesis.idl +++ b/idl/SMESH_BasicHypothesis.idl @@ -1090,6 +1090,13 @@ module StdMeshers { }; + /*! + * StdMeshers_QuadFromMedialAxis_1D2D: interface of "Quadrangle (Medial Axis Projection)" algorithm + */ + interface StdMeshers_QuadFromMedialAxis_1D2D : SMESH::SMESH_2D_Algo + { + }; + /*! * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm */ diff --git a/resources/StdMeshers.xml.in b/resources/StdMeshers.xml.in index 350b9ba8c..4150b42dc 100644 --- a/resources/StdMeshers.xml.in +++ b/resources/StdMeshers.xml.in @@ -311,6 +311,19 @@ + + + QuadFromMedialAxis_1D2D=Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ) + ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges()) + + + ( hyp ); + SMESH_HypoFilter hypFilter( SMESH_HypoFilter::Is( h )); + + TopoDS_Shape shapeOfHyp; + mesh->GetHypothesis( shape, hypFilter, /*checkAncestors=*/true, &shapeOfHyp ); + return shapeOfHyp; +} + //======================================================================= //function : IsQuadraticMesh //purpose : Check mesh without geometry for: if all elements on this shape are quadratic, diff --git a/src/SMESH/SMESH_MesherHelper.hxx b/src/SMESH/SMESH_MesherHelper.hxx index 9b17d6bb9..05173ae06 100644 --- a/src/SMESH/SMESH_MesherHelper.hxx +++ b/src/SMESH/SMESH_MesherHelper.hxx @@ -236,6 +236,10 @@ class SMESH_EXPORT SMESH_MesherHelper static TopAbs_ShapeEnum GetGroupType(const TopoDS_Shape& group, const bool avoidCompound=false); + static TopoDS_Shape GetShapeOfHypothesis( const SMESHDS_Hypothesis * hyp, + const TopoDS_Shape& shape, + SMESH_Mesh* mesh); + public: // ---------- PUBLIC INSTANCE METHODS ---------- @@ -243,7 +247,9 @@ public: // constructor SMESH_MesherHelper(SMESH_Mesh& theMesh); - SMESH_Mesh* GetMesh() const { return myMesh; } + SMESH_Gen* GetGen() const { return GetMesh()->GetGen(); } + + SMESH_Mesh* GetMesh() const { return myMesh; } SMESHDS_Mesh* GetMeshDS() const { return GetMesh()->GetMeshDS(); } diff --git a/src/SMESHUtils/CMakeLists.txt b/src/SMESHUtils/CMakeLists.txt index 486454e74..8c2f3217d 100644 --- a/src/SMESHUtils/CMakeLists.txt +++ b/src/SMESHUtils/CMakeLists.txt @@ -63,6 +63,7 @@ SET(SMESHUtils_HEADERS SMESH_Utils.hxx SMESH_TryCatch.hxx SMESH_MeshAlgos.hxx + SMESH_MAT2d.hxx ) # --- sources --- @@ -76,6 +77,7 @@ SET(SMESHUtils_SOURCES SMESH_TryCatch.cxx SMESH_File.cxx SMESH_MeshAlgos.cxx + SMESH_MAT2d.cxx ) # --- rules --- diff --git a/src/SMESHUtils/SMESH_MAT2d.cxx b/src/SMESHUtils/SMESH_MAT2d.cxx new file mode 100644 index 000000000..390d337b8 --- /dev/null +++ b/src/SMESHUtils/SMESH_MAT2d.cxx @@ -0,0 +1,1571 @@ +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : SMESH_MAT2d.cxx +// Created : Thu May 28 17:49:53 2015 +// Author : Edward AGAPOV (eap) + +#include "SMESH_MAT2d.hxx" + +#include + +#include +#include +#include +#include +#include +#include +//#include +#include +// #include +// #include +#include +//#include +#include +#include +#include +#include +#include +#include + +#ifdef _DEBUG_ +#include "SMESH_File.hxx" +#include "SMESH_Comment.hxx" +#endif + +using namespace std; +using boost::polygon::x; +using boost::polygon::y; +using SMESH_MAT2d::TVD; +using SMESH_MAT2d::TVDEdge; +using SMESH_MAT2d::TVDCell; +using SMESH_MAT2d::TVDVertex; + +namespace +{ + // Input data for construct_voronoi() + // ------------------------------------------------------------------------------------- + + struct InPoint + { + int _a, _b; + double _param; + InPoint(int x, int y, double param) : _a(x), _b(y), _param(param) {} + InPoint() : _a(0), _b(0), _param(0) {} + + // working data + list< const TVDEdge* > _edges; // MA edges of a concave InPoint in CCW order + + size_t index( const vector< InPoint >& inPoints ) const { return this - &inPoints[0]; } + bool operator==( const InPoint& other ) const { return _a == other._a && _b == other._b; } + }; + // ------------------------------------------------------------------------------------- + + struct InSegment + { + InPoint * _p0; + InPoint * _p1; + + // working data + size_t _geomEdgeInd; // EDGE index within the FACE + const TVDCell* _cell; + list< const TVDEdge* > _edges; // MA edges in CCW order within _cell + + InSegment( InPoint * p0, InPoint * p1, size_t iE) + : _p0(p0), _p1(p1), _geomEdgeInd(iE) {} + InSegment() : _p0(0), _p1(0), _geomEdgeInd(0) {} + + inline bool isConnected( const TVDEdge* edge ); + + inline bool isExternal( const TVDEdge* edge ); + + static void setGeomEdgeToCell( const TVDCell* cell, size_t eID ) { cell->color( eID ); } + + static size_t getGeomEdge( const TVDCell* cell ) { return cell->color(); } + }; + + // check if a TVDEdge begins at my end or ends at my start + inline bool InSegment::isConnected( const TVDEdge* edge ) + { + return ((Abs( edge->vertex0()->x() - _p1->_a ) < 1.&& + Abs( edge->vertex0()->y() - _p1->_b ) < 1. ) || + (Abs( edge->vertex1()->x() - _p0->_a ) < 1.&& + Abs( edge->vertex1()->y() - _p0->_b ) < 1. )); + } + + // check if a MA TVDEdge is outside of a domain + inline bool InSegment::isExternal( const TVDEdge* edge ) + { + double dot = // x1*x2 + y1*y2; (x1,y1) - internal normal of InSegment + ( _p0->_b - _p1->_b ) * ( 0.5 * ( edge->vertex0()->x() + edge->vertex1()->x() ) - _p0->_a ) + + ( _p1->_a - _p0->_a ) * ( 0.5 * ( edge->vertex0()->y() + edge->vertex1()->y() ) - _p0->_b ); + return dot < 0.; + } + + // // ------------------------------------------------------------------------------------- + // const size_t theExternMA = 111; // to mark external MA edges + + // bool isExternal( const TVDEdge* edge ) + // { + // return ( SMESH_MAT2d::Branch::getBndSegment( edge ) == theExternMA ); + // } + + // // mark external MA edges + // void markExternalEdges( const TVDEdge* edge ) + // { + // if ( isExternal( edge )) + // return; + // SMESH_MAT2d::Branch::setBndSegment( theExternMA, edge ); + // SMESH_MAT2d::Branch::setBndSegment( theExternMA, edge->twin() ); + // if ( edge->is_primary() && edge->vertex1() ) + // { + // const TVDVertex * v = edge->vertex1(); + // edge = v->incident_edge(); + // do { + // markExternalEdges( edge ); + // edge = edge->rot_next(); + // } while ( edge != v->incident_edge() ); + // } + // } + + // ------------------------------------------------------------------------------------- +#ifdef _DEBUG_ + // writes segments into a txt file readable by voronoi_visualizer + void inSegmentsToFile( vector< InSegment>& inSegments) + { + if ( inSegments.size() > 1000 ) + return; + const char* fileName = "/misc/dn25/salome/eap/salome/misc/Code/C++/MAdebug.txt"; + SMESH_File file(fileName, false ); + file.openForWriting(); + SMESH_Comment text; + text << "0\n"; // nb points + text << inSegments.size() << "\n"; // nb segments + for ( size_t i = 0; i < inSegments.size(); ++i ) + { + text << inSegments[i]._p0->_a << " " + << inSegments[i]._p0->_b << " " + << inSegments[i]._p1->_a << " " + << inSegments[i]._p1->_b << "\n"; + } + text << "\n"; + file.write( text.c_str(), text.size() ); + cout << "Write " << fileName << endl; + } + void dumpEdge( const TVDEdge* edge ) + { + cout << "*Edge_" << edge; + if ( !edge->vertex0() ) + cout << " ( INF, INF"; + else + cout << " ( " << edge->vertex0()->x() << ", " << edge->vertex0()->y(); + if ( !edge->vertex1() ) + cout << ") -> ( INF, INF"; + else + cout << ") -> (" << edge->vertex1()->x() << ", " << edge->vertex1()->y(); + cout << ")\t cell=" << edge->cell() + << " iBnd=" << edge->color() + << " twin=" << edge->twin() + << " twin_cell=" << edge->twin()->cell() + << " prev=" << edge->prev() << " next=" << edge->next() + << ( edge->is_primary() ? " MA " : " SCND" ) + << ( edge->is_linear() ? " LIN " : " CURV" ) + << endl; + } + void dumpCell( const TVDCell* cell ) + { + cout << "**Cell_" << cell << " GEOM=" << cell->color() << " "; + cout << ( cell->contains_segment() ? " SEG " : " PNT " ); + if ( cell-> is_degenerate() ) + cout << " degen "; + else + { + cout << endl; + const TVDEdge* edge = cell->incident_edge(); + size_t i = 0; + do { + edge = edge->next(); + cout << " - " << ++i << " "; + dumpEdge( edge ); + } while (edge != cell->incident_edge()); + } + } +#else + void inSegmentsToFile( vector< InSegment>& inSegments) {} + void dumpEdge( const TVDedge* edge ) {} + void dumpCell( const TVDCell* cell ) {} +#endif +} +// ------------------------------------------------------------------------------------- + +namespace boost { + namespace polygon { + + template <> + struct geometry_concept { + typedef point_concept type; + }; + template <> + struct point_traits { + typedef int coordinate_type; + + static inline coordinate_type get(const InPoint& point, orientation_2d orient) { + return (orient == HORIZONTAL) ? point._a : point._b; + } + }; + + template <> + struct geometry_concept { + typedef segment_concept type; + }; + + template <> + struct segment_traits { + typedef int coordinate_type; + typedef InPoint point_type; + + static inline point_type get(const InSegment& segment, direction_1d dir) { + return *(dir.to_int() ? segment._p1 : segment._p0); + } + }; + } // namespace polygon +} // namespace boost + // ------------------------------------------------------------------------------------- + +namespace +{ + const int theNoBrachID = 0; // std::numeric_limits::max(); + + // ------------------------------------------------------------------------------------- + /*! + * \brief Intermediate DS to create InPoint's + */ + struct UVU + { + gp_Pnt2d _uv; + double _u; + UVU( gp_Pnt2d uv, double u ): _uv(uv), _u(u) {} + InPoint getInPoint( double scale[2] ) + { + return InPoint( int( _uv.X() * scale[0]), int( _uv.Y() * scale[1]), _u ); + } + }; + // ------------------------------------------------------------------------------------- + /*! + * \brief A segment on EDGE, used to create BndPoints + */ + struct BndSeg + { + InSegment* _inSeg; + const TVDEdge* _edge; + double _uLast; + int _branchID; // negative ID means reverse direction + + BndSeg( InSegment* seg, const TVDEdge* edge, double u ): + _inSeg(seg), _edge(edge), _uLast(u), _branchID( theNoBrachID ) {} + + void setIndexToEdge( size_t id ) + { + SMESH_MAT2d::Branch::setBndSegment( id, _edge ); + } + + int branchID() const { return Abs( _branchID ); } + + size_t geomEdge() const { return _inSeg->_geomEdgeInd; } + + void setBranch( int branchID, vector< BndSeg >& bndSegs ) + { + _branchID = branchID; + + if ( _edge ) // pass branch to an opposite BndSeg + { + size_t oppSegIndex = SMESH_MAT2d::Branch::getBndSegment( _edge->twin() ); + if ( oppSegIndex < bndSegs.size() /*&& bndSegs[ oppSegIndex ]._branchID == theNoBrachID*/ ) + bndSegs[ oppSegIndex ]._branchID = -branchID; + } + } + bool hasOppositeEdge( const size_t noEdgeID ) + { + if ( !_edge ) return false; + return ( _inSeg->getGeomEdge( _edge->twin()->cell() ) != noEdgeID ); + } + + // check a next segment in CW order + bool isSameBranch( const BndSeg& seg2 ) + { + if ( !_edge || !seg2._edge ) + return true; + + const TVDCell* cell1 = this->_edge->twin()->cell(); + const TVDCell* cell2 = seg2. _edge->twin()->cell(); + if ( cell1 == cell2 ) + return true; + + const TVDEdge* edgeMedium1 = this->_edge->twin()->next(); + const TVDEdge* edgeMedium2 = seg2. _edge->twin()->prev(); + + if ( edgeMedium1->is_secondary() && edgeMedium2->is_secondary() ) + { + if ( edgeMedium1->twin() == edgeMedium2 ) + return true; + // edgeMedium's are edges whose twin()->cell is built on an end point of inSegment + // and is located between cell1 and cell2 + if ( edgeMedium1->twin() == edgeMedium2->twin() ) // is this possible??? + return true; + if ( edgeMedium1->twin() == edgeMedium2->twin()->next() && + edgeMedium1->twin()->cell()->contains_point() ) + return true; + } + else if ( edgeMedium1->is_primary() && edgeMedium2->is_primary() ) + { + if ( edgeMedium1->twin() == edgeMedium2 && + SMESH_MAT2d::Branch::getBndSegment( edgeMedium1 ) == + SMESH_MAT2d::Branch::getBndSegment( edgeMedium2 )) + // this is an ignored MA edge between inSegment's on one EDGE forming a convex corner + return true; + } + + return false; + } + }; + + //================================================================================ + /*! + * \brief Computes length of of TVDEdge + */ + //================================================================================ + + double length( const TVDEdge* edge ) + { + gp_XY d( edge->vertex0()->x() - edge->vertex1()->x(), + edge->vertex0()->y() - edge->vertex1()->y() ); + return d.Modulus(); + } + + //================================================================================ + /*! + * \brief Compute scale to have the same 2d proportions as in 3d + */ + //================================================================================ + + void computeProportionScale( const TopoDS_Face& face, + const Bnd_B2d& uvBox, + double scale[2]) + { + scale[0] = scale[1] = 1.; + if ( uvBox.IsVoid() ) return; + + TopLoc_Location loc; + Handle(Geom_Surface) surface = BRep_Tool::Surface( face, loc ); + + const int nbDiv = 30; + gp_XY uvMin = uvBox.CornerMin(), uvMax = uvBox.CornerMax(); + gp_XY uvMid = 0.5 * ( uvMin + uvMax ); + double du = ( uvMax.X() - uvMin.X() ) / nbDiv; + double dv = ( uvMax.Y() - uvMin.Y() ) / nbDiv; + + double uLen3d = 0, vLen3d = 0; + gp_Pnt uPrevP = surface->Value( uvMin.X(), uvMid.Y() ); + gp_Pnt vPrevP = surface->Value( uvMid.X(), uvMin.Y() ); + for (int i = 1; i <= nbDiv; i++) + { + double u = uvMin.X() + du * i; + double v = uvMin.Y() + dv * i; + gp_Pnt uP = surface->Value( u, uvMid.Y() ); + gp_Pnt vP = surface->Value( uvMid.X(), v ); + uLen3d += uP.Distance( uPrevP ); + vLen3d += vP.Distance( vPrevP ); + uPrevP = uP; + vPrevP = vP; + } + scale[0] = uLen3d / ( uvMax.X() - uvMin.X() ); + scale[1] = vLen3d / ( uvMax.Y() - uvMin.Y() ); + } + + //================================================================================ + /*! + * \brief Fill input data for construct_voronoi() + */ + //================================================================================ + + bool makeInputData(const TopoDS_Face& face, + const std::vector< TopoDS_Edge >& edges, + const double minSegLen, + vector< InPoint >& inPoints, + vector< InSegment>& inSegments, + double scale[2]) + { + const double theDiscrCoef = 0.5; // to decrease minSegLen for discretization + TopLoc_Location loc; + + // discretize the EDGEs to get 2d points and segments + + vector< vector< UVU > > uvuVec( edges.size() ); + Bnd_B2d uvBox; + for ( size_t iE = 0; iE < edges.size(); ++iE ) + { + vector< UVU > & points = uvuVec[ iE ]; + + double f,l; + Handle(Geom_Curve) c3d = BRep_Tool::Curve ( edges[ iE ], loc, f, l ); + Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface( edges[ iE ], face, f, l ); + if ( c2d.IsNull() ) return false; + + points.push_back( UVU( c2d->Value( f ), f )); + uvBox.Add( points.back()._uv ); + + Geom2dAdaptor_Curve c2dAdaptor (c2d, f,l ); + double curDeflect = 0.3; //0.01; //Curvature deflection + double angDeflect = 0.2; // 0.09; //Angular deflection + + GCPnts_TangentialDeflection discret(c2dAdaptor, angDeflect, curDeflect); + // if ( discret.NbPoints() > 2 ) + // { + // cout << endl; + // do + // { + // discret.Initialize( c2dAdaptor, 100, curDeflect ); + // cout << "C " << curDeflect << " " << discret.NbPoints() << endl; + // curDeflect *= 1.5; + // } + // while ( discret.NbPoints() > 5 ); + // cout << endl; + // do + // { + // discret.Initialize( c2dAdaptor, angDeflect, 100 ); + // cout << "A " << angDeflect << " " << discret.NbPoints() << endl; + // angDeflect *= 1.5; + // } + // while ( discret.NbPoints() > 5 ); + // } + gp_Pnt p, pPrev; + if ( !c3d.IsNull() ) + pPrev = c3d->Value( f ); + for ( int i = 2; i <= discret.NbPoints(); i++ ) // skip the 1st point + { + double u = discret.Parameter(i); + if ( !c3d.IsNull() ) + { + p = c3d->Value( u ); + int nbDiv = int( p.Distance( pPrev ) / minSegLen / theDiscrCoef ); + double dU = ( u - points.back()._u ) / nbDiv; + for ( int iD = 1; iD < nbDiv; ++iD ) + { + double uD = points.back()._u + dU; + points.push_back( UVU( c2d->Value( uD ), uD )); + } + pPrev = p; + } + points.push_back( UVU( c2d->Value( u ), u )); + uvBox.Add( points.back()._uv ); + } + // if ( !c3d.IsNull() ) + // { + // vector params; + // GeomAdaptor_Curve c3dAdaptor( c3d,f,l ); + // if ( useDefl ) + // { + // const double deflection = minSegLen * 0.1; + // GCPnts_UniformDeflection discret( c3dAdaptor, deflection, f, l, true ); + // if ( !discret.IsDone() ) + // return false; + // int nbP = discret.NbPoints(); + // for ( int i = 2; i < nbP; i++ ) // skip 1st and last points + // params.push_back( discret.Parameter(i) ); + // } + // else + // { + // double eLen = GCPnts_AbscissaPoint::Length( c3dAdaptor ); + // int nbSeg = Max( 1, int( eLen / minSegLen / theDiscrCoef )); + // double segLen = eLen / nbSeg; + // GCPnts_UniformAbscissa discret( c3dAdaptor, segLen, f, l ); + // int nbP = Min( discret.NbPoints(), nbSeg + 1 ); + // for ( int i = 2; i < nbP; i++ ) // skip 1st and last points + // params.push_back( discret.Parameter(i) ); + // } + // for ( size_t i = 0; i < params.size(); ++i ) + // { + // points.push_back( UVU( c2d->Value( params[i] ), params[i] )); + // uvBox.Add( points.back()._uv ); + // } + // } + if ( points.size() < 2 ) + { + points.push_back( UVU( c2d->Value( l ), l )); + uvBox.Add( points.back()._uv ); + } + if ( edges[ iE ].Orientation() == TopAbs_REVERSED ) + std::reverse( points.begin(), points.end() ); + } + + // make connected EDGEs have same UV at shared VERTEX + TopoDS_Vertex vShared; + for ( size_t iE = 0; iE < edges.size(); ++iE ) + { + size_t iE2 = (iE+1) % edges.size(); + if ( !TopExp::CommonVertex( edges[iE], edges[iE2], vShared )) + continue; + if ( !vShared.IsSame( TopExp::LastVertex( edges[iE], true ))) + return false; + vector< UVU > & points1 = uvuVec[ iE ]; + vector< UVU > & points2 = uvuVec[ iE2 ]; + gp_Pnt2d & uv1 = points1.back() ._uv; + gp_Pnt2d & uv2 = points2.front()._uv; + uv1 = uv2 = 0.5 * ( uv1.XY() + uv2.XY() ); + } + + // get scale to have the same 2d proportions as in 3d + computeProportionScale( face, uvBox, scale ); + + // make scale to have coordinates precise enough when converted to int + + gp_XY uvMin = uvBox.CornerMin(), uvMax = uvBox.CornerMax(); + uvMin.ChangeCoord(1) = uvMin.X() * scale[0]; + uvMin.ChangeCoord(2) = uvMin.Y() * scale[1]; + uvMax.ChangeCoord(1) = uvMax.X() * scale[0]; + uvMax.ChangeCoord(2) = uvMax.Y() * scale[1]; + double vMax[2] = { Max( Abs( uvMin.X() ), Abs( uvMax.X() )), + Max( Abs( uvMin.Y() ), Abs( uvMax.Y() )) }; + int iMax = ( vMax[0] > vMax[1] ) ? 0 : 1; + const double precision = 1e-5; + double preciScale = Min( vMax[iMax] / precision, + std::numeric_limits::max() / vMax[iMax] ); + preciScale /= scale[iMax]; + double roundedScale = 10; // to ease debug + while ( roundedScale * 10 < preciScale ) + roundedScale *= 10.; + scale[0] *= roundedScale; + scale[1] *= roundedScale; + + // create input points and segments + + inPoints.clear(); + inSegments.clear(); + size_t nbPnt = 0; + for ( size_t iE = 0; iE < uvuVec.size(); ++iE ) + nbPnt += uvuVec[ iE ].size(); + inPoints.resize( nbPnt ); + inSegments.reserve( nbPnt ); + + size_t iP = 0; + if ( face.Orientation() == TopAbs_REVERSED ) + { + for ( int iE = uvuVec.size()-1; iE >= 0; --iE ) + { + vector< UVU > & points = uvuVec[ iE ]; + inPoints[ iP++ ] = points.back().getInPoint( scale ); + for ( size_t i = points.size()-1; i >= 1; --i ) + { + inPoints[ iP++ ] = points[i-1].getInPoint( scale ); + inSegments.push_back( InSegment( & inPoints[ iP-2 ], & inPoints[ iP-1 ], iE )); + } + } + } + else + { + for ( size_t iE = 0; iE < uvuVec.size(); ++iE ) + { + vector< UVU > & points = uvuVec[ iE ]; + inPoints[ iP++ ] = points[0].getInPoint( scale ); + for ( size_t i = 1; i < points.size(); ++i ) + { + inPoints[ iP++ ] = points[i].getInPoint( scale ); + inSegments.push_back( InSegment( & inPoints[ iP-2 ], & inPoints[ iP-1 ], iE )); + } + } + } + return true; + } + + //================================================================================ + /*! + * \brief Create MA branches and FACE boundary data + * \param [in] vd - voronoi diagram of \a inSegments + * \param [in] inPoints - FACE boundary points + * \param [in,out] inSegments - FACE boundary segments + * \param [out] branch - MA branches to fill + * \param [out] branchEnd - ends of MA branches to fill + * \param [out] boundary - FACE boundary to fill + */ + //================================================================================ + + void makeMA( const TVD& vd, + vector< InPoint >& inPoints, + vector< InSegment > & inSegments, + vector< SMESH_MAT2d::Branch >& branch, + vector< const SMESH_MAT2d::BranchEnd* >& branchPnt, + SMESH_MAT2d::Boundary& boundary ) + { + const size_t noEdgeID = inSegments.size() + 1; // ID of non-existent geom EDGE + + // Associate MA cells with inSegments + for (TVD::const_cell_iterator it = vd.cells().begin(); it != vd.cells().end(); ++it) + { + const TVDCell* cell = &(*it); + if ( cell->contains_segment() ) + { + InSegment& seg = inSegments[ cell->source_index() ]; + seg._cell = cell; + seg.setGeomEdgeToCell( cell, seg._geomEdgeInd ); + } + else + { + InSegment::setGeomEdgeToCell( cell, noEdgeID ); + } + } + + vector< bool > inPntChecked( inPoints.size(), false ); + + // Find MA edges of each inSegment + + for ( size_t i = 0; i < inSegments.size(); ++i ) + { + InSegment& inSeg = inSegments[i]; + + // get edges around the cell lying on MA + bool hasSecondary = false; + const TVDEdge* edge = inSeg._cell->incident_edge(); + do { + edge = edge->next(); // Returns the CCW next edge within the cell. + if ( edge->is_primary() && !inSeg.isExternal( edge ) ) + inSeg._edges.push_back( edge ); // edge equidistant from two InSegments + else + hasSecondary = true; + } while (edge != inSeg._cell->incident_edge()); + + // there can be several continuous MA edges but maEdges can begin in the middle of + // a chain of continuous MA edges. Make the chain continuous. + list< const TVDEdge* >& maEdges = inSeg._edges; + if ( maEdges.empty() ) + continue; + if ( hasSecondary ) + while ( maEdges.back()->next() == maEdges.front() ) + maEdges.splice( maEdges.end(), maEdges, maEdges.begin() ); + + // remove maEdges equidistant from two neighbor InSegments of the same geom EDGE + list< const TVDEdge* >::iterator e = maEdges.begin(); + while ( e != maEdges.end() ) + { + const TVDCell* cell2 = (*e)->twin()->cell(); // cell on the other side of a MA edge + size_t geoE2 = InSegment::getGeomEdge( cell2 ); + bool toRemove = ( inSeg._geomEdgeInd == geoE2 && inSeg.isConnected( *e )); + if ( toRemove ) + e = maEdges.erase( e ); + else + ++e; + } + if ( maEdges.empty() ) + continue; + + // add MA edges corresponding to concave InPoints + for ( int is2nd = 0; is2nd < 2; ++is2nd ) // loop on two ends of inSeg + { + InPoint& inPnt = *( is2nd ? inSeg._p1 : inSeg._p0 ); + size_t pInd = inPnt.index( inPoints ); + if ( inPntChecked[ pInd ] ) + continue; + if ( pInd > 0 && + inPntChecked[ pInd-1 ] && + inPoints[ pInd-1 ] == inPnt ) + continue; + inPntChecked[ pInd ] = true; + + const TVDEdge* edge = // a TVDEdge passing through an end of inSeg + is2nd ? maEdges.front()->prev() : maEdges.back()->next(); + while ( true ) + { + if ( edge->is_primary() ) break; // this should not happen + const TVDEdge* edge2 = edge->twin(); // we are in a neighbor cell, add MA edges to inPnt + if ( inSeg.getGeomEdge( edge2->cell() ) != noEdgeID ) + break; // cell of an InSegment + bool hasInfinite = false; + list< const TVDEdge* > pointEdges; + edge = edge2; + do + { + edge = edge->next(); // Returns the CCW next edge within the cell. + if ( edge->is_infinite() ) + hasInfinite = true; + else if ( edge->is_primary() && !inSeg.isExternal( edge )) + pointEdges.push_back( edge ); + } + while ( edge != edge2 && !hasInfinite ); + + if ( hasInfinite || pointEdges.empty() ) + break; + inPnt._edges.splice( inPnt._edges.end(), pointEdges ); + inSeg.setGeomEdgeToCell( edge->cell(), inSeg._geomEdgeInd ); + + edge = is2nd ? inPnt._edges.front()->prev() : inPnt._edges.back()->next(); + } + } // add MA edges corresponding to concave InPoints + + } // loop on inSegments to find corresponding MA edges + + + // ------------------------------------------- + // Create Branches and BndPoints for each EDGE + // ------------------------------------------- + + if ( inPoints.front() == inPoints.back() /*&& !inPoints[0]._edges.empty()*/ ) + { + inPntChecked[0] = false; // do not use the 1st point twice + //InSegment::setGeomEdgeToCell( inPoints[0]._edges.back()->cell(), noEdgeID ); + inPoints[0]._edges.clear(); + } + + // Divide InSegment's into BndSeg's + + vector< BndSeg > bndSegs; + bndSegs.reserve( inSegments.size() * 3 ); + + list< const TVDEdge* >::reverse_iterator e; + for ( size_t i = 0; i < inSegments.size(); ++i ) + { + InSegment& inSeg = inSegments[i]; + + // segments around 1st concave point + size_t ip0 = inSeg._p0->index( inPoints ); + if ( inPntChecked[ ip0 ] ) + for ( e = inSeg._p0->_edges.rbegin(); e != inSeg._p0->_edges.rend(); ++e ) + bndSegs.push_back( BndSeg( &inSeg, *e, inSeg._p0->_param )); + inPntChecked[ ip0 ] = false; + + // segments of InSegment's + size_t nbMaEdges = inSeg._edges.size(); + switch ( nbMaEdges ) { + case 0: // "around" circle center + bndSegs.push_back( BndSeg( &inSeg, 0, inSeg._p1->_param )); break; + case 1: + bndSegs.push_back( BndSeg( &inSeg, inSeg._edges.back(), inSeg._p1->_param )); break; + default: + vector< double > len; + len.push_back(0); + for ( e = inSeg._edges.rbegin(); e != inSeg._edges.rend(); ++e ) + len.push_back( len.back() + length( *e )); + + e = inSeg._edges.rbegin(); + for ( size_t l = 1; l < len.size(); ++e, ++l ) + { + double dl = len[l] / len.back(); + double u = dl * inSeg._p1->_param + ( 1. - dl ) * inSeg._p0->_param; + bndSegs.push_back( BndSeg( &inSeg, *e, u )); + } + } + // segments around 2nd concave point + size_t ip1 = inSeg._p1->index( inPoints ); + if ( inPntChecked[ ip1 ] ) + for ( e = inSeg._p1->_edges.rbegin(); e != inSeg._p1->_edges.rend(); ++e ) + bndSegs.push_back( BndSeg( &inSeg, *e, inSeg._p1->_param )); + inPntChecked[ ip1 ] = false; + } + + // make TVDEdge's know it's BndSeg to enable passing branchID to + // an opposite BndSeg in BndSeg::setBranch() + for ( size_t i = 0; i < bndSegs.size(); ++i ) + bndSegs[i].setIndexToEdge( i ); + + + // Find TVDEdge's of Branches and associate them with bndSegs + + vector< vector > branchEdges; + branchEdges.reserve( boundary.nbEdges() * 4 ); + + map< const TVDVertex*, SMESH_MAT2d::BranchEndType > endType; + + int branchID = 1; // we code orientation as branchID sign + branchEdges.resize( branchID + 1 ); + + size_t i1st = 0; + while ( i1st < bndSegs.size() && !bndSegs[i1st].hasOppositeEdge( noEdgeID )) + ++i1st; + bndSegs[i1st].setBranch( branchID, bndSegs ); // set to i-th and the opposite bndSeg + branchEdges[ branchID ].push_back( bndSegs[i1st]._edge ); + + for ( size_t i = i1st+1; i < bndSegs.size(); ++i ) + { + if ( bndSegs[i].branchID() ) + { + branchID = bndSegs[i]._branchID; // with sign + + if ( bndSegs[i]._branchID == -bndSegs[i-1]._branchID && + bndSegs[i]._edge ) + { + SMESH_MAT2d::BranchEndType type = + ( bndSegs[i]._inSeg->isConnected( bndSegs[i]._edge ) ? + SMESH_MAT2d::BE_ON_VERTEX : + SMESH_MAT2d::BE_END ); + endType.insert( make_pair( bndSegs[i]._edge->vertex1(), type )); + } + continue; + } + if ( !bndSegs[i-1].isSameBranch( bndSegs[i] )) + { + branchEdges.resize(( branchID = branchEdges.size()) + 1 ); + if ( bndSegs[i]._edge ) + endType.insert( make_pair( bndSegs[i]._edge->vertex1(), + SMESH_MAT2d::BE_BRANCH_POINT )); + } + bndSegs[i].setBranch( branchID, bndSegs ); // set to i-th and the opposite bndSeg + if ( bndSegs[i].hasOppositeEdge( noEdgeID )) + branchEdges[ bndSegs[i].branchID() ].push_back( bndSegs[i]._edge ); + } + // define BranchEndType of the first TVDVertex + if ( bndSegs.front()._branchID == -bndSegs.back()._branchID ) + { + if ( bndSegs[0]._edge ) + { + SMESH_MAT2d::BranchEndType type = + ( bndSegs[0]._inSeg->isConnected( bndSegs[0]._edge ) ? + SMESH_MAT2d::BE_ON_VERTEX : + SMESH_MAT2d::BE_END ); + endType.insert( make_pair( bndSegs[0]._edge->vertex1(), type )); + } + else if ( bndSegs.back()._edge ) + { + SMESH_MAT2d::BranchEndType type = + ( bndSegs.back()._inSeg->isConnected( bndSegs.back()._edge ) ? + SMESH_MAT2d::BE_ON_VERTEX : + SMESH_MAT2d::BE_END ); + endType.insert( make_pair( bndSegs.back()._edge->vertex0(), type )); + } + } + // join the 1st and the last branch edges if it is the same branch + if ( bndSegs.back().branchID() != bndSegs.front().branchID() && + bndSegs.back().isSameBranch( bndSegs.front() )) + { + vector & br1 = branchEdges[ bndSegs.front().branchID() ]; + vector & br2 = branchEdges[ bndSegs.back().branchID() ]; + br1.insert( br1.begin(), br2.begin(), br2.end() ); + br2.clear(); + } + + // associate branchIDs and the input branch vector (arg) + vector< const SMESH_MAT2d::Branch* > branchByID( branchEdges.size() ); + int nbBranches = 0; + for ( size_t i = 0; i < branchEdges.size(); ++i ) + { + nbBranches += ( !branchEdges[i].empty() ); + } + branch.resize( nbBranches ); + for ( size_t iBr = 0, brID = 0; brID < branchEdges.size(); ++brID ) + { + if ( !branchEdges[ brID ].empty() ) + branchByID[ brID ] = & branch[ iBr++ ]; + } + + // Fill in BndPoints of each EDGE of the boundary + + size_t iSeg = 0; + int edgeInd = -1, dInd = 0; + while ( iSeg < bndSegs.size() ) + { + const size_t geomID = bndSegs[ iSeg ].geomEdge(); + SMESH_MAT2d::BndPoints & bndPoints = boundary.getPoints( geomID ); + + size_t nbSegs = 0; + for ( size_t i = iSeg; i < bndSegs.size() && geomID == bndSegs[ i ].geomEdge(); ++i ) + ++nbSegs; + size_t iSegEnd = iSeg + nbSegs; + + // make TVDEdge know an index of bndSegs within BndPoints + for ( size_t i = iSeg; i < iSegEnd; ++i ) + if ( bndSegs[i]._edge ) + SMESH_MAT2d::Branch::setBndSegment( i - iSeg, bndSegs[i]._edge ); + + // parameters on EDGE + + bndPoints._params.reserve( nbSegs + 1 ); + bndPoints._params.push_back( bndSegs[ iSeg ]._inSeg->_p0->_param ); + + for ( size_t i = iSeg; i < iSegEnd; ++i ) + bndPoints._params.push_back( bndSegs[ i ]._uLast ); + + // MA edges + + bndPoints._maEdges.reserve( nbSegs ); + + for ( size_t i = iSeg; i < iSegEnd; ++i ) + { + const size_t brID = bndSegs[ i ].branchID(); + const SMESH_MAT2d::Branch* br = branchByID[ brID ]; + + if ( bndSegs[ i ]._edge && !branchEdges[ brID ].empty() ) + { + edgeInd += dInd; + + if ( edgeInd < 0 || + edgeInd >= (int) branchEdges[ brID ].size() || + branchEdges[ brID ][ edgeInd ] != bndSegs[ i ]._edge ) + { + if ( bndSegs[ i ]._branchID < 0 && + branchEdges[ brID ].back() == bndSegs[ i ]._edge ) + { + edgeInd = branchEdges[ brID ].size() - 1; + dInd = -1; + } + else if ( bndSegs[ i ]._branchID > 0 && + branchEdges[ brID ].front() == bndSegs[ i ]._edge ) + { + edgeInd = 0; + dInd = +1; + } + else + { + for ( edgeInd = 0; edgeInd < branchEdges[ brID ].size(); ++edgeInd ) + if ( branchEdges[ brID ][ edgeInd ] == bndSegs[ i ]._edge ) + break; + dInd = bndSegs[ i ]._branchID > 0 ? +1 : -1; + } + } + } + else + { + // no MA edge, bndSeg corresponds to an end point of a branch + if ( bndPoints._maEdges.empty() ) + { + // should not get here according to algo design + edgeInd = 0; + } + else + { + edgeInd = branchEdges[ brID ].size(); + dInd = bndSegs[ i ]._branchID > 0 ? +1 : -1; + } + } + + bndPoints._maEdges.push_back( make_pair( br, ( 1 + edgeInd ) * dInd )); + + } // loop on bndSegs of an EDGE + + iSeg = iSegEnd; + + } // loop on all bndSegs + + + // fill the branches with MA edges + for ( size_t iBr = 0, brID = 0; brID < branchEdges.size(); ++brID ) + if ( !branchEdges[brID].empty() ) + { + branch[ iBr ].init( branchEdges[brID], & boundary, endType ); + iBr++; + } + // set branches to branch ends + for ( size_t i = 0; i < branch.size(); ++i ) + branch[i].setBranchesToEnds( branch ); + + // fill branchPnt arg + map< const TVDVertex*, const SMESH_MAT2d::BranchEnd* > v2end; + for ( size_t i = 0; i < branch.size(); ++i ) + { + if ( branch[i].getEnd(0)->_branches.size() > 2 ) + v2end.insert( make_pair( branch[i].getEnd(0)->_vertex, branch[i].getEnd(0) )); + if ( branch[i].getEnd(1)->_branches.size() > 2 ) + v2end.insert( make_pair( branch[i].getEnd(1)->_vertex, branch[i].getEnd(1) )); + } + branchPnt.resize( v2end.size() ); + map< const TVDVertex*, const SMESH_MAT2d::BranchEnd* >::iterator v2e = v2end.begin(); + for ( size_t i = 0; v2e != v2end.end(); ++v2e, ++i ) + branchPnt[ i ] = v2e->second; + + } // makeMA() + +} // namespace + +//================================================================================ +/*! + * \brief MedialAxis constructor + * \param [in] face - a face to create MA for + * \param [in] edges - edges of the face (possibly not all) on the order they + * encounter in the face boundary. + * \param [in] minSegLen - minimal length of a mesh segment used to discretize + * the edges. It is used to define precision of MA approximation + */ +//================================================================================ + +SMESH_MAT2d::MedialAxis::MedialAxis(const TopoDS_Face& face, + const std::vector< TopoDS_Edge >& edges, + const double minSegLen, + const bool ignoreCorners): + _face( face ), _boundary( edges.size() ) +{ + // input to construct_voronoi() + vector< InPoint > inPoints; + vector< InSegment> inSegments; + if ( !makeInputData( face, edges, minSegLen, inPoints, inSegments, _scale )) + return; + + //inSegmentsToFile( inSegments ); + + // build voronoi diagram + construct_voronoi( inSegments.begin(), inSegments.end(), &_vd ); + + // make MA data + makeMA( _vd, inPoints, inSegments, _branch, _branchPnt, _boundary ); +} + +//================================================================================ +/*! + * \brief Return UVs of ends of MA edges of a branch + */ +//================================================================================ + +void SMESH_MAT2d::MedialAxis::getPoints( const Branch& branch, + std::vector< gp_XY >& points) const +{ + branch.getPoints( points, _scale ); +} + +//================================================================================ +/*! + * \brief Returns a BranchPoint corresponding to a given point on a geom EDGE + * \param [in] iGeomEdge - index of geom EDGE within a vector passed at construction + * \param [in] u - parameter of the point on EDGE curve + * \param [out] p - the found BranchPoint + * \return bool - is OK + */ +//================================================================================ + +bool SMESH_MAT2d::Boundary::getBranchPoint( const std::size_t iEdge, + double u, + BranchPoint& p ) const +{ + if ( iEdge >= _pointsPerEdge.size() || _pointsPerEdge[iEdge]._params.empty() ) + return false; + + const BndPoints& points = _pointsPerEdge[ iEdge ]; + const bool edgeReverse = ( points._params[0] > points._params.back() ); + + if ( u < ( edgeReverse ? points._params.back() : points._params[0] )) + u = edgeReverse ? points._params.back() : points._params[0]; + else if ( u > ( edgeReverse ? points._params[0] : points._params.back()) ) + u = edgeReverse ? points._params[0] : points._params.back(); + + double r = ( u - points._params[0] ) / ( points._params.back() - points._params[0] ); + int i = int( r * double( points._maEdges.size()-1 )); + if ( edgeReverse ) + { + while ( points._params[i ] < u ) --i; + while ( points._params[i+1] > u ) ++i; + } + else + { + while ( points._params[i ] > u ) --i; + while ( points._params[i+1] < u ) ++i; + } + double edgeParam = ( u - points._params[i] ) / ( points._params[i+1] - points._params[i] ); + + const std::pair< const Branch*, int >& maE = points._maEdges[ i ]; + bool maReverse = ( maE.second < 0 ); + + p._branch = maE.first; + p._iEdge = maE.second - 1; // countered from 1 to store sign + p._edgeParam = maReverse ? ( 1. - edgeParam ) : edgeParam; + + return true; +} + +//================================================================================ +/*! + * \brief Check if a given boundary segment is a null-length segment on a concave + * boundary corner. + * \param [in] iEdge - index of a geom EDGE + * \param [in] iSeg - index of a boundary segment + * \return bool - true if the segment is on concave corner + */ +//================================================================================ + +bool SMESH_MAT2d::Boundary::IsConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const +{ + if ( iEdge >= _pointsPerEdge.size() || _pointsPerEdge[iEdge]._params.empty() ) + return false; + + const BndPoints& points = _pointsPerEdge[ iEdge ]; + if ( points._params.size() >= iSeg+1 ) + return false; + + return Abs( points._params[ iEdge ] - points._params[ iEdge+1 ]) < 1e-20; +} + +//================================================================================ +/*! + * \brief Creates a 3d curve corresponding to a Branch + * \param [in] branch - the Branch + * \return Adaptor3d_Curve* - the new curve the caller is to delete + */ +//================================================================================ + +Adaptor3d_Curve* SMESH_MAT2d::MedialAxis::make3DCurve(const Branch& branch) const +{ + Handle(Geom_Surface) surface = BRep_Tool::Surface( _face ); + if ( surface.IsNull() ) + return 0; + + vector< gp_XY > uv; + branch.getPoints( uv, _scale ); + if ( uv.size() < 2 ) + return 0; + + vector< TopoDS_Vertex > vertex( uv.size() ); + for ( size_t i = 0; i < uv.size(); ++i ) + vertex[i] = BRepBuilderAPI_MakeVertex( surface->Value( uv[i].X(), uv[i].Y() )); + + TopoDS_Wire aWire; + BRep_Builder aBuilder; + aBuilder.MakeWire(aWire); + for ( size_t i = 1; i < vertex.size(); ++i ) + { + TopoDS_Edge edge = BRepBuilderAPI_MakeEdge( vertex[i-1], vertex[i] ); + aBuilder.Add( aWire, edge ); + } + + // if ( myEdge.size() == 2 && FirstVertex().IsSame( LastVertex() )) + // aWire.Closed(true); // issue 0021141 + + return new BRepAdaptor_CompCurve( aWire ); +} + +//================================================================================ +/*! + * \brief Copy points of an EDGE + */ +//================================================================================ + +void SMESH_MAT2d::Branch::init( vector& maEdges, + const Boundary* boundary, + map< const TVDVertex*, BranchEndType > endType ) +{ + if ( maEdges.empty() ) return; + + _boundary = boundary; + _maEdges.swap( maEdges ); + + + _params.reserve( _maEdges.size() + 1 ); + _params.push_back( 0. ); + for ( size_t i = 0; i < _maEdges.size(); ++i ) + _params.push_back( _params.back() + length( _maEdges[i] )); + + for ( size_t i = 1; i < _params.size(); ++i ) + _params[i] /= _params.back(); + + + _endPoint1._vertex = _maEdges.front()->vertex1(); + _endPoint2._vertex = _maEdges.back ()->vertex0(); + + if ( endType.count( _endPoint1._vertex )) + _endPoint1._type = endType[ _endPoint1._vertex ]; + if ( endType.count( _endPoint2._vertex )) + _endPoint2._type = endType[ _endPoint2._vertex ]; +} + +//================================================================================ +/*! + * \brief fill BranchEnd::_branches of its ends + */ +//================================================================================ + +void SMESH_MAT2d::Branch::setBranchesToEnds( const vector< Branch >& branches ) +{ + for ( size_t i = 0; i < branches.size(); ++i ) + { + if ( this->_endPoint1._vertex == branches[i]._endPoint1._vertex || + this->_endPoint1._vertex == branches[i]._endPoint2._vertex ) + this->_endPoint1._branches.push_back( &branches[i] ); + + if ( this->_endPoint2._vertex == branches[i]._endPoint1._vertex || + this->_endPoint2._vertex == branches[i]._endPoint2._vertex ) + this->_endPoint2._branches.push_back( &branches[i] ); + } +} + +//================================================================================ +/*! + * \brief Returns points on two EDGEs, equidistant from a given point of this Branch + * \param [in] param - [0;1] normalized param on the Branch + * \param [out] bp1 - BoundaryPoint on EDGE with a lower index + * \param [out] bp2 - BoundaryPoint on EDGE with a higher index + * \return bool - true if the BoundaryPoint's found + */ +//================================================================================ + +bool SMESH_MAT2d::Branch::getBoundaryPoints(double param, + BoundaryPoint& bp1, + BoundaryPoint& bp2 ) const +{ + if ( param < _params[0] || param > _params.back() ) + return false; + + // look for an index of a MA edge by param + double ip = param * _params.size(); + size_t i = size_t( Min( int( _maEdges.size()-1), int( ip ))); + + while ( param < _params[i ] ) --i; + while ( param > _params[i+1] ) ++i; + + double r = ( param - _params[i] ) / ( _params[i+1] - _params[i] ); + + return getBoundaryPoints( i, r, bp1, bp2 ); +} + +//================================================================================ +/*! + * \brief Returns points on two EDGEs, equidistant from a given point of this Branch + * \param [in] iMAEdge - index of a MA edge within this Branch + * \param [in] maEdgeParam - [0;1] normalized param on the \a iMAEdge + * \param [out] bp1 - BoundaryPoint on EDGE with a lower index + * \param [out] bp2 - BoundaryPoint on EDGE with a higher index + * \return bool - true if the BoundaryPoint's found + */ +//================================================================================ + +bool SMESH_MAT2d::Branch::getBoundaryPoints(std::size_t iMAEdge, + double maEdgeParam, + BoundaryPoint& bp1, + BoundaryPoint& bp2 ) const +{ + if ( iMAEdge > _maEdges.size() ) + return false; + + size_t iGeom1 = getGeomEdge( _maEdges[ iMAEdge ] ); + size_t iGeom2 = getGeomEdge( _maEdges[ iMAEdge ]->twin() ); + size_t iSeg1 = getBndSegment( _maEdges[ iMAEdge ] ); + size_t iSeg2 = getBndSegment( _maEdges[ iMAEdge ]->twin() ); + + return ( _boundary->getPoint( iGeom1, iSeg1, maEdgeParam, bp1 ) && + _boundary->getPoint( iGeom2, iSeg2, maEdgeParam, bp2 )); +} + +//================================================================================ +/*! + * \brief Returns points on two EDGEs, equidistant from a given point of this Branch + */ +//================================================================================ + +bool SMESH_MAT2d::Branch::getBoundaryPoints(const BranchPoint& p, + BoundaryPoint& bp1, + BoundaryPoint& bp2 ) const +{ + return ( p._branch ? p._branch : this )->getBoundaryPoints( p._iEdge, p._edgeParam, bp1, bp2 ); +} + +//================================================================================ +/*! + * \brief Return a parameter of a BranchPoint normalized within this Branch + */ +//================================================================================ + +bool SMESH_MAT2d::Branch::getParameter(const BranchPoint & p, double & u ) const +{ + if ( p._iEdge > _params.size()-1 ) + return false; + + u = ( _params[ p._iEdge ] * ( 1 - p._edgeParam ) + + _params[ p._iEdge+1 ] * p._edgeParam ); + + return true; +} + +//================================================================================ +/*! + * \brief Check type of both ends + */ +//================================================================================ + +bool SMESH_MAT2d::Branch::hasEndOfType(BranchEndType type) const +{ + return ( _endPoint1._type == type || _endPoint2._type == type ); +} + +//================================================================================ +/*! + * \brief Returns MA points + * \param [out] points - the 2d points + * \param [in] scale - the scale that was used to scale the 2d space of MA + */ +//================================================================================ + +void SMESH_MAT2d::Branch::getPoints( std::vector< gp_XY >& points, + const double scale[2]) const +{ + points.resize( _maEdges.size() + 1 ); + + points[0].SetCoord( _maEdges[0]->vertex1()->x() / scale[0], // CCW order! -> vertex1 not vertex0 + _maEdges[0]->vertex1()->y() / scale[1] ); + + for ( size_t i = 0; i < _maEdges.size(); ++i ) + points[i+1].SetCoord( _maEdges[i]->vertex0()->x() / scale[0], + _maEdges[i]->vertex0()->y() / scale[1] ); +} + +//================================================================================ +/*! + * \brief Return indices of EDGEs equidistant from this branch + */ +//================================================================================ + +void SMESH_MAT2d::Branch::getGeomEdges( std::vector< std::size_t >& edgeIDs1, + std::vector< std::size_t >& edgeIDs2 ) const +{ + edgeIDs1.push_back( getGeomEdge( _maEdges[0] )); + edgeIDs2.push_back( getGeomEdge( _maEdges[0]->twin() )); + + for ( size_t i = 1; i < _maEdges.size(); ++i ) + { + size_t ie1 = getGeomEdge( _maEdges[i] ); + size_t ie2 = getGeomEdge( _maEdges[i]->twin() ); + + if ( edgeIDs1.back() != ie1 ) edgeIDs1.push_back( ie1 ); + if ( edgeIDs2.back() != ie2 ) edgeIDs2.push_back( ie2 ); + } +} + +//================================================================================ +/*! + * \brief Looks for a BranchPoint position around a concave VERTEX + */ +//================================================================================ + +bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >& edgeIDs1, + std::vector< std::size_t >& edgeIDs2, + std::vector< BranchPoint >& divPoints, + const vector& maEdges, + const vector& maEdgesTwin, + size_t & i) const +{ + // if there is a concave vertex between EDGEs + // then position of a dividing BranchPoint is undefined, it is somewhere + // on an arc-shaped part of the Branch around the concave vertex. + // Chose this position by a VERTEX of the opposite EDGE, or put it in the middle + // of the arc if there is no opposite VERTEX. + // All null-length segments around a VERTEX belong to one of EDGEs. + + BranchPoint divisionPnt; + divisionPnt._branch = this; + + size_t ie1 = getGeomEdge( maEdges [i] ); + size_t ie2 = getGeomEdge( maEdgesTwin[i] ); + + size_t iSeg1 = getBndSegment( maEdges[ i-1 ] ); + size_t iSeg2 = getBndSegment( maEdges[ i ] ); + bool isConcaPrev = _boundary->IsConcaveSegment( edgeIDs1.back(), iSeg1 ); + bool isConcaNext = _boundary->IsConcaveSegment( ie1, iSeg2 ); + if ( !isConcaNext && !isConcaPrev ) + return false; + + bool isConcaveV = false; + + int iPrev = i-1, iNext = i; + if ( isConcaNext ) // all null-length segments follow + { + // look for a VERTEX of the opposite EDGE + ++iNext; // end of null-length segments + while ( iNext < maEdges.size() ) + { + iSeg2 = getBndSegment( maEdges[ iNext ] ); + if ( _boundary->IsConcaveSegment( ie1, iSeg2 )) + ++iNext; + else + break; + } + bool vertexFound = false; + for ( size_t iE = i+1; iE < iNext; ++iE ) + { + ie2 = getGeomEdge( maEdgesTwin[iE] ); + if ( ie2 != edgeIDs2.back() ) + { + // opposite VERTEX found + divisionPnt._iEdge = iE; + divisionPnt._edgeParam = 0; + divPoints.push_back( divisionPnt ); + edgeIDs1.push_back( ie1 ); + edgeIDs2.push_back( ie2 ); + vertexFound = true; + } + } + if ( vertexFound ) + { + i = --iNext; + isConcaveV = true; + } + } + else if ( isConcaPrev ) + { + // all null-length segments passed, find their beginning + while ( iPrev-1 >= 0 ) + { + iSeg1 = getBndSegment( maEdges[ iPrev-1 ] ); + if ( _boundary->IsConcaveSegment( edgeIDs1.back(), iSeg1 )) + --iPrev; + else + break; + } + } + + if ( iPrev < i-1 || iNext > i ) + { + // no VERTEX on the opposite EDGE, put the Branch Point in the middle + double par1 = _params[ iPrev ], par2 = _params[ iNext ]; + double midPar = 0.5 * ( par1 + par2 ); + divisionPnt._iEdge = iPrev; + while ( _params[ divisionPnt._iEdge + 1 ] < midPar ) + ++divisionPnt._iEdge; + divisionPnt._edgeParam = + ( _params[ divisionPnt._iEdge + 1 ] - midPar ) / + ( _params[ divisionPnt._iEdge + 1 ] - _params[ divisionPnt._iEdge ] ); + divPoints.push_back( divisionPnt ); + isConcaveV = true; + } + + return isConcaveV; +} + +//================================================================================ +/*! + * \brief Return indices of opposite parts of EDGEs equidistant from this branch + * \param [out] edgeIDs1 - EDGE index opposite to the edgeIDs2[i]-th EDGE + * \param [out] edgeIDs2 - EDGE index opposite to the edgeIDs1[i]-th EDGE + * \param [out] divPoints - BranchPoint's located between two successive unique + * pairs of EDGE indices. A \a divPoints[i] can separate e.g. two following pairs + * of EDGE indices < 0, 2 > and < 0, 1 >. Number of \a divPoints is one less + * than number of \a edgeIDs + */ +//================================================================================ + +void SMESH_MAT2d::Branch::getOppositeGeomEdges( std::vector< std::size_t >& edgeIDs1, + std::vector< std::size_t >& edgeIDs2, + std::vector< BranchPoint >& divPoints) const +{ + edgeIDs1.clear(); + edgeIDs2.clear(); + divPoints.clear(); + + edgeIDs1.push_back( getGeomEdge( _maEdges[0] )); + edgeIDs2.push_back( getGeomEdge( _maEdges[0]->twin() )); + + std::vector twins( _maEdges.size() ); + for ( size_t i = 0; i < _maEdges.size(); ++i ) + twins[i] = _maEdges[i]->twin(); + + // size_t lastConcaE1 = _boundary.nbEdges(); + // size_t lastConcaE2 = _boundary.nbEdges(); + + BranchPoint divisionPnt; + divisionPnt._branch = this; + + for ( size_t i = 0; i < _maEdges.size(); ++i ) + { + size_t ie1 = getGeomEdge( _maEdges[i] ); + size_t ie2 = getGeomEdge( _maEdges[i]->twin() ); + + if ( edgeIDs1.back() != ie1 || edgeIDs2.back() != ie2 ) + { + bool isConcaveV = false; + if ( edgeIDs1.back() != ie1 && edgeIDs2.back() == ie2 ) + { + isConcaveV = addDivPntForConcaVertex( edgeIDs1, edgeIDs2, divPoints, _maEdges, twins, i ); + } + if ( edgeIDs1.back() == ie1 && edgeIDs2.back() != ie2 ) + { + isConcaveV = addDivPntForConcaVertex( edgeIDs2, edgeIDs1, divPoints, twins, _maEdges, i ); + } + + if ( isConcaveV ) + { + ie1 = getGeomEdge( _maEdges[i] ); + ie2 = getGeomEdge( _maEdges[i]->twin() ); + } + if (( !isConcaveV ) || + ( edgeIDs1.back() != ie1 || edgeIDs2.back() != ie2 )) + { + edgeIDs1.push_back( ie1 ); + edgeIDs2.push_back( ie2 ); + } + if ( divPoints.size() < edgeIDs1.size() - 1 ) + { + divisionPnt._iEdge = i; + divisionPnt._edgeParam = 0; + divPoints.push_back( divisionPnt ); + } + + } // if ( edgeIDs1.back() != ie1 || edgeIDs2.back() != ie2 ) + } // loop on _maEdges +} + +//================================================================================ +/*! + * \brief Store data of boundary segments in TVDEdge + */ +//================================================================================ + +void SMESH_MAT2d::Branch::setGeomEdge( std::size_t geomIndex, const TVDEdge* maEdge ) +{ + if ( maEdge ) maEdge->cell()->color( geomIndex ); +} +std::size_t SMESH_MAT2d::Branch::getGeomEdge( const TVDEdge* maEdge ) +{ + return maEdge ? maEdge->cell()->color() : std::string::npos; +} +void SMESH_MAT2d::Branch::setBndSegment( std::size_t segIndex, const TVDEdge* maEdge ) +{ + if ( maEdge ) maEdge->color( segIndex ); +} +std::size_t SMESH_MAT2d::Branch::getBndSegment( const TVDEdge* maEdge ) +{ + return maEdge ? maEdge->color() : std::string::npos; +} + +//================================================================================ +/*! + * \brief Returns a boundary point on a given EDGE + * \param [in] iEdge - index of the EDGE within MedialAxis + * \param [in] iSeg - index of a boundary segment within this Branch + * \param [in] u - [0;1] normalized param within \a iSeg-th segment + * \param [out] bp - the found BoundaryPoint + * \return bool - true if the BoundaryPoint is found + */ +//================================================================================ + +bool SMESH_MAT2d::Boundary::getPoint( std::size_t iEdge, + std::size_t iSeg, + double u, + BoundaryPoint& bp ) const +{ + if ( iEdge >= _pointsPerEdge.size() ) + return false; + if ( iSeg+1 >= _pointsPerEdge[ iEdge ]._params.size() ) + return false; + + // This method is called by Branch that can have an opposite orientation, + // hence u is inverted depending on orientation coded as a sign of _maEdge index + bool isReverse = ( _pointsPerEdge[ iEdge ]._maEdges[ iSeg ].second < 0 ); + if ( isReverse ) + u = 1. - u; + + double p0 = _pointsPerEdge[ iEdge ]._params[ iSeg ]; + double p1 = _pointsPerEdge[ iEdge ]._params[ iSeg+1 ]; + + bp._param = p0 * ( 1. - u ) + p1 * u; + bp._edgeIndex = iEdge; + + return true; +} + diff --git a/src/SMESHUtils/SMESH_MAT2d.hxx b/src/SMESHUtils/SMESH_MAT2d.hxx new file mode 100644 index 000000000..7e1061d05 --- /dev/null +++ b/src/SMESHUtils/SMESH_MAT2d.hxx @@ -0,0 +1,224 @@ +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : SMESH_MAT2d.hxx +// Created : Thu May 28 17:49:53 2015 +// Author : Edward AGAPOV (eap) + +#ifndef __SMESH_MAT2d_HXX__ +#define __SMESH_MAT2d_HXX__ + +#include "SMESH_Utils.hxx" + +#include +#include + +#include +#include + +#include +#include + +class Adaptor3d_Curve; + +// Medial Axis Transform 2D +namespace SMESH_MAT2d +{ + class MedialAxis; // MedialAxis is the entry point + class Branch; + class BranchEnd; + class Boundary; + struct BoundaryPoint; + + typedef boost::polygon::voronoi_diagram TVD; + typedef TVD::cell_type TVDCell; + typedef TVD::edge_type TVDEdge; + typedef TVD::vertex_type TVDVertex; + + //------------------------------------------------------------------------------------- + // type of Branch end point + enum BranchEndType { BE_UNDEF, + BE_ON_VERTEX, // branch ends at a convex VRTEX + BE_BRANCH_POINT, // branch meats 2 or more other branches + BE_END // branch end equidistant from several adjacent segments + }; + //------------------------------------------------------------------------------------- + /*! + * \brief End point of MA Branch + */ + struct SMESHUtils_EXPORT BranchEnd + { + const TVDVertex* _vertex; + BranchEndType _type; + std::vector< const Branch* > _branches; + + BranchEnd(): _vertex(0), _type( BE_UNDEF ) {} + }; + //------------------------------------------------------------------------------------- + /*! + * \brief Point on MA Branch + */ + struct SMESHUtils_EXPORT BranchPoint + { + const Branch* _branch; + std::size_t _iEdge; // MA edge index within the branch + double _edgeParam; // normalized param within the MA edge + + BranchPoint(): _branch(0), _iEdge(0), _edgeParam(-1) {} + }; + //------------------------------------------------------------------------------------- + /*! + * \brief Branch is a set of MA edges enclosed between branch points and/or MA ends. + * It's main feature is to return two BoundaryPoint's per a point on it. + */ + class SMESHUtils_EXPORT Branch + { + public: + bool getBoundaryPoints(double param, BoundaryPoint& bp1, BoundaryPoint& bp2 ) const; + bool getBoundaryPoints(std::size_t iMAEdge, double maEdgeParam, + BoundaryPoint& bp1, BoundaryPoint& bp2 ) const; + bool getBoundaryPoints(const BranchPoint& p, + BoundaryPoint& bp1, BoundaryPoint& bp2 ) const; + bool getParameter(const BranchPoint& p, double & u ) const; + + std::size_t nbEdges() const { return _maEdges.size(); } + + const BranchEnd* getEnd(bool the2nd) const { return & ( the2nd ? _endPoint2 : _endPoint1 ); } + + bool hasEndOfType(BranchEndType type) const; + + void getPoints( std::vector< gp_XY >& points, const double scale[2]) const; + + void getGeomEdges( std::vector< std::size_t >& edgeIDs1, + std::vector< std::size_t >& edgeIDs2 ) const; + + void getOppositeGeomEdges( std::vector< std::size_t >& edgeIDs1, + std::vector< std::size_t >& edgeIDs2, + std::vector< BranchPoint >& divPoints) const; + + // construction + void init( std::vector& maEdges, + const Boundary* boundary, + std::map< const TVDVertex*, BranchEndType > endType); + void setBranchesToEnds( const std::vector< Branch >& branches); + + static void setGeomEdge( std::size_t geomIndex, const TVDEdge* maEdge ); + static std::size_t getGeomEdge( const TVDEdge* maEdge ); + static void setBndSegment( std::size_t segIndex, const TVDEdge* maEdge ); + static std::size_t getBndSegment( const TVDEdge* maEdge ); + + private: + + bool addDivPntForConcaVertex( std::vector< std::size_t >& edgeIDs1, + std::vector< std::size_t >& edgeIDs2, + std::vector< BranchPoint >& divPoints, + const std::vector& maEdges, + const std::vector& maEdgesTwin, + size_t & i) const; + + // association of _maEdges with boundary segments is stored in this way: + // index of an EDGE: TVDEdge->cell()->color() + // index of a segment on EDGE: TVDEdge->color() + std::vector _maEdges; // MA edges ending at points located at _params + std::vector _params; // params of points on MA, normalized [0;1] within this branch + const Boundary* _boundary; // face boundary + BranchEnd _endPoint1; + BranchEnd _endPoint2; + }; + + //------------------------------------------------------------------------------------- + /*! + * \brief Data of a discretized EDGE allowing to get a point on MA by a parameter on EDGE + */ + struct BndPoints + { + std::vector< double > _params; // params of discretization points on an EDGE + std::vector< std::pair< const Branch*, int > > _maEdges; /* index of TVDEdge in branch; + index sign means orientation; + index == Branch->nbEdges() means + end point of a Branch */ + }; + //------------------------------------------------------------------------------------- + /*! + * \brief Face boundary is discretized so that each its segment to correspond to + * an edge of MA + */ + class Boundary + { + public: + + Boundary( std::size_t nbEdges ): _pointsPerEdge( nbEdges ) {} + BndPoints& getPoints( std::size_t iEdge ) { return _pointsPerEdge[ iEdge ]; } + std::size_t nbEdges() const { return _pointsPerEdge.size(); } + + bool getPoint( std::size_t iEdge, std::size_t iSeg, double u, BoundaryPoint& bp ) const; + + bool getBranchPoint( const std::size_t iEdge, double u, BranchPoint& p ) const; + + bool IsConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const; + + private: + std::vector< BndPoints > _pointsPerEdge; + }; + + //------------------------------------------------------------------------------------- + /*! + * \brief Point on FACE boundary + */ + struct SMESHUtils_EXPORT BoundaryPoint + { + std::size_t _edgeIndex; // index of an EDGE in a sequence passed to MedialAxis() + double _param; // parameter of this EDGE + }; + //------------------------------------------------------------------------------------- + /*! + * \brief Medial axis (MA) is defined as the loci of centres of locally + * maximal balls inside 2D representation of a face. This class + * implements a piecewise approximation of MA. + */ + class SMESHUtils_EXPORT MedialAxis + { + public: + MedialAxis(const TopoDS_Face& face, + const std::vector< TopoDS_Edge >& edges, + const double minSegLen, + const bool ignoreCorners = false ); + const Boundary& getBoundary() const { return _boundary; } + const std::vector< Branch >& getBranches() const { return _branch; } + const std::vector< const BranchEnd* >& getBranchPoints() const { return _branchPnt; } + + void getPoints( const Branch& branch, std::vector< gp_XY >& points) const; + Adaptor3d_Curve* make3DCurve(const Branch& branch) const; + + private: + + private: + TopoDS_Face _face; + TVD _vd; + std::vector< Branch > _branch; + std::vector< const BranchEnd* > _branchPnt; + Boundary _boundary; + double _scale[2]; + }; + +} + +#endif diff --git a/src/SMESH_SWIG/StdMeshersBuilder.py b/src/SMESH_SWIG/StdMeshersBuilder.py index 41e0c2269..3a07810ad 100644 --- a/src/SMESH_SWIG/StdMeshersBuilder.py +++ b/src/SMESH_SWIG/StdMeshersBuilder.py @@ -42,6 +42,8 @@ Hexa = "Hexa_3D" QUADRANGLE = "Quadrangle_2D" ## Algorithm type: Radial Quadrangle 1D-2D algorithm, see StdMeshersBuilder_RadialQuadrangle1D2D RADIAL_QUAD = "RadialQuadrangle_1D2D" +## Algorithm type: Quadrangle (Medial Axis Projection) 1D-2D algorithm, see StdMeshersBuilder_QuadMA_1D2D +QUAD_MA_PROJ = "QuadFromMedialAxis_1D2D" # import items of enums for e in StdMeshers.QuadType._items: exec('%s = StdMeshers.%s'%(e,e)) @@ -455,9 +457,6 @@ class StdMeshersBuilder_Segment_Python(Mesh_Algorithm): algoType = PYTHON ## doc string of the method # @internal - docHelper = "Creates tetrahedron 3D algorithm for solids" - ## doc string of the method - # @internal docHelper = "Creates segment 1D algorithm for edges" ## Private constructor. @@ -856,7 +855,7 @@ class StdMeshersBuilder_Projection1D2D(StdMeshersBuilder_Projection2D): algoType = "Projection_1D2D" ## doc string of the method # @internal - docHelper = "Creates projection 1D-2D algorithm for edges and faces" + docHelper = "Creates projection 1D-2D algorithm for faces" ## Private constructor. # @param mesh parent mesh object algorithm is assigned to @@ -1115,7 +1114,7 @@ class StdMeshersBuilder_RadialPrism3D(StdMeshersBuilder_Prism3D): algoType = "RadialPrism_3D" ## doc string of the method # @internal - docHelper = "Creates prism 3D algorithm for volumes" + docHelper = "Creates Raial Prism 3D algorithm for volumes" ## Private constructor. # @param mesh parent mesh object algorithm is assigned to @@ -1147,7 +1146,7 @@ class StdMeshersBuilder_RadialQuadrangle1D2D(Mesh_Algorithm): algoType = RADIAL_QUAD ## doc string of the method # @internal - docHelper = "Creates quadrangle 1D-2D algorithm for triangular faces" + docHelper = "Creates quadrangle 1D-2D algorithm for faces having a shape of disk or a disk segment" ## Private constructor. # @param mesh parent mesh object algorithm is assigned to @@ -1258,6 +1257,35 @@ class StdMeshersBuilder_RadialQuadrangle1D2D(Mesh_Algorithm): pass # end of StdMeshersBuilder_RadialQuadrangle1D2D class +## Defines a Quadrangle (Medial Axis Projection) 1D-2D algorithm +# +# It is created by calling smeshBuilder.Mesh.Quadrangle(smeshBuilder.QUAD_MA_PROJ,geom=0) +# +# @ingroup l2_algos_quad_ma +class StdMeshersBuilder_QuadMA_1D2D(Mesh_Algorithm): + + ## name of the dynamic method in smeshBuilder.Mesh class + # @internal + meshMethod = "Quadrangle" + ## type of algorithm used with helper function in smeshBuilder.Mesh class + # @internal + algoType = QUAD_MA_PROJ + ## doc string of the method + # @internal + docHelper = "Creates quadrangle 1D-2D algorithm for faces" + + ## Private constructor. + # @param mesh parent mesh object algorithm is assigned to + # @param geom geometry (shape/sub-shape) algorithm is assigned to; + # if it is @c 0 (default), the algorithm is assigned to the main shape + def __init__(self, mesh, geom=0): + Mesh_Algorithm.__init__(self) + self.Create(mesh, geom, self.algoType) + pass + + pass + + ## Defines a Use Existing Elements 1D algorithm # # It is created by calling smeshBuilder.Mesh.UseExisting1DElements(geom=0) @@ -1327,7 +1355,7 @@ class StdMeshersBuilder_UseExistingElements_1D2D(Mesh_Algorithm): isDefault = True ## doc string of the method # @internal - docHelper = "Creates 1D-2D algorithm for edges/faces with reusing of existing mesh elements" + docHelper = "Creates 1D-2D algorithm for faces with reusing of existing mesh elements" ## Private constructor. # @param mesh parent mesh object algorithm is assigned to @@ -1375,7 +1403,7 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm): isDefault = True ## doc string of the method # @internal - docHelper = "Creates body fitting 3D algorithm for volumes" + docHelper = "Creates Body Fitting 3D algorithm for volumes" ## Private constructor. # @param mesh parent mesh object algorithm is assigned to @@ -1505,7 +1533,7 @@ class StdMeshersBuilder_UseExisting_1D(Mesh_Algorithm): algoType = "UseExisting_1D" ## doc string of the method # @internal - docHelper = "Creates 1D algorithm for edges with reusing of existing mesh elements" + docHelper = "Creates 1D algorithm allowing batch meshing of edges" ## Private constructor. # @param mesh parent mesh object algorithm is assigned to @@ -1533,7 +1561,7 @@ class StdMeshersBuilder_UseExisting_2D(Mesh_Algorithm): algoType = "UseExisting_2D" ## doc string of the method # @internal - docHelper = "Creates 2D algorithm for faces with reusing of existing mesh elements" + docHelper = "Creates 2D algorithm allowing batch meshing of faces" ## Private constructor. # @param mesh parent mesh object algorithm is assigned to diff --git a/src/StdMeshers/CMakeLists.txt b/src/StdMeshers/CMakeLists.txt index 46b756b75..8714c1b4f 100644 --- a/src/StdMeshers/CMakeLists.txt +++ b/src/StdMeshers/CMakeLists.txt @@ -130,6 +130,7 @@ SET(StdMeshers_HEADERS StdMeshers_Projection_1D2D.hxx StdMeshers_CartesianParameters3D.hxx StdMeshers_Cartesian_3D.hxx + StdMeshers_QuadFromMedialAxis_1D2D.hxx ) IF(SALOME_SMESH_ENABLE_MEFISTO) @@ -193,6 +194,7 @@ SET(StdMeshers_SOURCES StdMeshers_CartesianParameters3D.cxx StdMeshers_Cartesian_3D.cxx StdMeshers_Adaptive1D.cxx + StdMeshers_QuadFromMedialAxis_1D2D.cxx ) IF(SALOME_SMESH_ENABLE_MEFISTO) diff --git a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx index 0616b630d..264189170 100644 --- a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx +++ b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx @@ -696,7 +696,7 @@ void StdMeshers_MEFISTO_2D::ComputeScaleOnFace(SMESH_Mesh & aMesh, double xmax = -1.e300; double ymin = 1.e300; double ymax = -1.e300; - int nbp = 23; + const int nbp = 23; scalex = 1; scaley = 1; @@ -720,13 +720,8 @@ void StdMeshers_MEFISTO_2D::ComputeScaleOnFace(SMESH_Mesh & aMesh, ymin = p.Y(); if (p.Y() > ymax) ymax = p.Y(); - // MESSAGE(" "<< f<<" "< maxratio) { - SCRUTE( scaley ); scaley *= xyratio / maxratio; - SCRUTE( scaley ); } else if (xyratio < 1./maxratio) { - SCRUTE( scalex ); scalex *= 1 / xyratio / maxratio; - SCRUTE( scalex ); } - ASSERT(scalex); - ASSERT(scaley); } // namespace diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx new file mode 100644 index 000000000..a6d372d5f --- /dev/null +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx @@ -0,0 +1,1251 @@ +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : StdMeshers_QuadFromMedialAxis_1D2D.cxx +// Created : Wed Jun 3 17:33:45 2015 +// Author : Edward AGAPOV (eap) + +#include "StdMeshers_QuadFromMedialAxis_1D2D.hxx" + +#include "SMESH_Block.hxx" +#include "SMESH_Gen.hxx" +#include "SMESH_MAT2d.hxx" +#include "SMESH_Mesh.hxx" +#include "SMESH_MesherHelper.hxx" +#include "SMESH_ProxyMesh.hxx" +#include "SMESH_subMesh.hxx" +#include "StdMeshers_FaceSide.hxx" +#include "StdMeshers_Regular_1D.hxx" +#include "StdMeshers_ViscousLayers2D.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//================================================================================ +/*! + * \brief 1D algo + */ +class StdMeshers_QuadFromMedialAxis_1D2D::Algo1D : public StdMeshers_Regular_1D +{ +public: + Algo1D(int studyId, SMESH_Gen* gen): + StdMeshers_Regular_1D( gen->GetANewId(), studyId, gen ) + { + } + void SetSegmentLength( double len ) + { + _value[ BEG_LENGTH_IND ] = len; + _value[ PRECISION_IND ] = 1e-7; + _hypType = LOCAL_LENGTH; + } +}; + +//================================================================================ +/*! + * \brief Constructor sets algo features + */ +//================================================================================ + +StdMeshers_QuadFromMedialAxis_1D2D::StdMeshers_QuadFromMedialAxis_1D2D(int hypId, + int studyId, + SMESH_Gen* gen) + : StdMeshers_Quadrangle_2D(hypId, studyId, gen), + _regular1D( 0 ) +{ + _name = "QuadFromMedialAxis_1D2D"; + _shapeType = (1 << TopAbs_FACE); + _onlyUnaryInput = true; // FACE by FACE so far + _requireDiscreteBoundary = false; // make 1D by myself + _supportSubmeshes = true; // make 1D by myself + _neededLowerHyps[ 1 ] = true; // suppress warning on hiding a global 1D algo + _neededLowerHyps[ 2 ] = true; // suppress warning on hiding a global 2D algo + _compatibleHypothesis.clear(); + //_compatibleHypothesis.push_back("ViscousLayers2D"); +} + +//================================================================================ +/*! + * \brief Destructor + */ +//================================================================================ + +StdMeshers_QuadFromMedialAxis_1D2D::~StdMeshers_QuadFromMedialAxis_1D2D() +{ + delete _regular1D; + _regular1D = 0; +} + +//================================================================================ +/*! + * \brief Check if needed hypotheses are present + */ +//================================================================================ + +bool StdMeshers_QuadFromMedialAxis_1D2D::CheckHypothesis(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + Hypothesis_Status& aStatus) +{ + return true; // does not require hypothesis +} + +namespace +{ + //================================================================================ + /*! + * \brief Temporary mesh + */ + struct TmpMesh : public SMESH_Mesh + { + TmpMesh() + { + _myMeshDS = new SMESHDS_Mesh(/*id=*/0, /*isEmbeddedMode=*/true); + } + }; + + //================================================================================ + /*! + * \brief Select two EDGEs from a map, either mapped to least values or to max values + */ + //================================================================================ + + // template< class TVal2EdgesMap > + // void getTwo( bool least, + // TVal2EdgesMap& map, + // vector& twoEdges, + // vector& otherEdges) + // { + // twoEdges.clear(); + // otherEdges.clear(); + // if ( least ) + // { + // TVal2EdgesMap::iterator i = map.begin(); + // twoEdges.push_back( i->second ); + // twoEdges.push_back( ++i->second ); + // for ( ; i != map.end(); ++i ) + // otherEdges.push_back( i->second ); + // } + // else + // { + // TVal2EdgesMap::reverse_iterator i = map.rbegin(); + // twoEdges.push_back( i->second ); + // twoEdges.push_back( ++i->second ); + // for ( ; i != map.rend(); ++i ) + // otherEdges.push_back( i->second ); + // } + // TopoDS_Vertex v; + // if ( TopExp::CommonVertex( twoEdges[0], twoEdges[1], v )) + // { + // twoEdges.clear(); // two EDGEs must not be connected + // otherEdges.clear(); + // } + // } + + //================================================================================ + /*! + * \brief Finds out a minimal segment length given EDGEs will be divided into. + * This length is further used to discretize the Medial Axis + */ + //================================================================================ + + double getMinSegLen(SMESH_MesherHelper& theHelper, + const vector& theEdges) + { + TmpMesh tmpMesh; + SMESH_Mesh* mesh = theHelper.GetMesh(); + + vector< SMESH_Algo* > algos( theEdges.size() ); + for ( size_t i = 0; i < theEdges.size(); ++i ) + { + SMESH_subMesh* sm = mesh->GetSubMesh( theEdges[i] ); + algos[i] = sm->GetAlgo(); + } + + const int nbSegDflt = mesh->GetGen()->GetDefaultNbSegments(); + double minSegLen = Precision::Infinite(); + + for ( size_t i = 0; i < theEdges.size(); ++i ) + { + SMESH_subMesh* sm = mesh->GetSubMesh( theEdges[i] ); + if ( SMESH_Algo::IsStraight( theEdges[i], /*degenResult=*/true )) + continue; + // get algo + size_t iOpp = ( theEdges.size() == 4 ? (i+2)%4 : i ); + SMESH_Algo* algo = sm->GetAlgo(); + if ( !algo ) algo = algos[ iOpp ]; + // get hypo + SMESH_Hypothesis::Hypothesis_Status status = SMESH_Hypothesis::HYP_MISSING; + if ( algo ) + { + if ( !algo->CheckHypothesis( *mesh, theEdges[i], status )) + algo->CheckHypothesis( *mesh, theEdges[iOpp], status ); + } + // compute + if ( status != SMESH_Hypothesis::HYP_OK ) + { + minSegLen = Min( minSegLen, SMESH_Algo::EdgeLength( theEdges[i] ) / nbSegDflt ); + } + else + { + tmpMesh.Clear(); + tmpMesh.ShapeToMesh( TopoDS_Shape()); + tmpMesh.ShapeToMesh( theEdges[i] ); + try { + mesh->GetGen()->Compute( tmpMesh, theEdges[i], true, true ); // make nodes on VERTEXes + if ( !algo->Compute( tmpMesh, theEdges[i] )) + continue; + } + catch (...) { + continue; + } + SMDS_EdgeIteratorPtr segIt = tmpMesh.GetMeshDS()->edgesIterator(); + while ( segIt->more() ) + { + const SMDS_MeshElement* seg = segIt->next(); + double len = SMESH_TNodeXYZ( seg->GetNode(0) ).Distance( seg->GetNode(1) ); + minSegLen = Min( minSegLen, len ); + } + } + } + if ( Precision::IsInfinite( minSegLen )) + minSegLen = mesh->GetShapeDiagonalSize() / nbSegDflt; + + return minSegLen; + } + + //================================================================================ + /*! + * \brief Returns EDGEs located between two VERTEXes at which given MA branches end + * \param [in] br1 - one MA branch + * \param [in] br2 - one more MA branch + * \param [in] allEdges - all EDGEs of a FACE + * \param [out] shortEdges - the found EDGEs + * \return bool - is OK or not + */ + //================================================================================ + + bool getConnectedEdges( const SMESH_MAT2d::Branch* br1, + const SMESH_MAT2d::Branch* br2, + const vector& allEdges, + vector& shortEdges) + { + vector< size_t > edgeIDs[4]; + br1->getGeomEdges( edgeIDs[0], edgeIDs[1] ); + br2->getGeomEdges( edgeIDs[2], edgeIDs[3] ); + + // EDGEs returned by a Branch form a connected chain with a VERTEX where + // the Branch ends at the chain middle. One of end EDGEs of the chain is common + // with either end EDGE of the chain of the other Branch, or the chains are connected + // at a common VERTEX; + + // Get indices of end EDGEs of the branches + bool vAtStart1 = ( br1->getEnd(0)->_type == SMESH_MAT2d::BE_ON_VERTEX ); + bool vAtStart2 = ( br2->getEnd(0)->_type == SMESH_MAT2d::BE_ON_VERTEX ); + size_t iEnd[4] = { + vAtStart1 ? edgeIDs[0].back() : edgeIDs[0][0], + vAtStart1 ? edgeIDs[1].back() : edgeIDs[1][0], + vAtStart2 ? edgeIDs[2].back() : edgeIDs[2][0], + vAtStart2 ? edgeIDs[3].back() : edgeIDs[3][0] + }; + + set< size_t > connectedIDs; + TopoDS_Vertex vCommon; + // look for the same EDGEs + for ( int i = 0; i < 2; ++i ) + for ( int j = 2; j < 4; ++j ) + if ( iEnd[i] == iEnd[j] ) + { + connectedIDs.insert( edgeIDs[i].begin(), edgeIDs[i].end() ); + connectedIDs.insert( edgeIDs[j].begin(), edgeIDs[j].end() ); + i = j = 4; + } + if ( connectedIDs.empty() ) + // look for connected EDGEs + for ( int i = 0; i < 2; ++i ) + for ( int j = 2; j < 4; ++j ) + if ( TopExp::CommonVertex( allEdges[ iEnd[i]], allEdges[ iEnd[j]], vCommon )) + { + connectedIDs.insert( edgeIDs[i].begin(), edgeIDs[i].end() ); + connectedIDs.insert( edgeIDs[j].begin(), edgeIDs[j].end() ); + i = j = 4; + } + if ( connectedIDs.empty() || // nothing + allEdges.size() - connectedIDs.size() < 2 ) // too many + return false; + + // set shortEdges in the order as in allEdges + if ( connectedIDs.count( 0 ) && + connectedIDs.count( allEdges.size()-1 )) + { + size_t iE = allEdges.size()-1; + while ( connectedIDs.count( iE-1 )) + --iE; + for ( size_t i = 0; i < connectedIDs.size(); ++i ) + { + shortEdges.push_back( allEdges[ iE ]); + iE = ( iE + 1 ) % allEdges.size(); + } + } + else + { + set< size_t >::iterator i = connectedIDs.begin(); + for ( ; i != connectedIDs.end(); ++i ) + shortEdges.push_back( allEdges[ *i ]); + } + return true; + } + + //================================================================================ + /*! + * \brief Find EDGEs to discretize using projection from MA + * \param [in] theFace - the FACE to be meshed + * \param [in] theWire - ordered EDGEs of the FACE + * \param [out] theSinuEdges - the EDGEs to discretize using projection from MA + * \param [out] theShortEdges - other EDGEs + * \return bool - OK or not + * + * Is separate all EDGEs into four sides of a quadrangle connected in the order: + * theSinuEdges[0], theShortEdges[0], theSinuEdges[1], theShortEdges[1] + */ + //================================================================================ + + bool getSinuousEdges( SMESH_MesherHelper& theHelper, + const TopoDS_Face& theFace, + list& theWire, + vector theSinuEdges[2], + vector theShortEdges[2]) + { + theSinuEdges[0].clear(); + theSinuEdges[1].clear(); + theShortEdges[0].clear(); + theShortEdges[1].clear(); + + vector allEdges( theWire.begin(), theWire.end() ); + const size_t nbEdges = allEdges.size(); + if ( nbEdges < 4 ) + return false; + + // create MedialAxis to find short edges by analyzing MA branches + double minSegLen = getMinSegLen( theHelper, allEdges ); + SMESH_MAT2d::MedialAxis ma( theFace, allEdges, minSegLen ); + + // in an initial request case, theFace represents a part of a river with almost parallel banks + // so there should be two branch points + using SMESH_MAT2d::BranchEnd; + using SMESH_MAT2d::Branch; + const vector< const BranchEnd* >& braPoints = ma.getBranchPoints(); + if ( braPoints.size() < 2 ) + return false; + TopTools_MapOfShape shortMap; + size_t nbBranchPoints = 0; + for ( size_t i = 0; i < braPoints.size(); ++i ) + { + vector< const Branch* > vertBranches; // branches with an end on VERTEX + for ( size_t ib = 0; ib < braPoints[i]->_branches.size(); ++ib ) + { + const Branch* branch = braPoints[i]->_branches[ ib ]; + if ( branch->hasEndOfType( SMESH_MAT2d::BE_ON_VERTEX )) + vertBranches.push_back( branch ); + } + if ( vertBranches.size() != 2 || braPoints[i]->_branches.size() != 3) + continue; + + // get common EDGEs of two branches + if ( !getConnectedEdges( vertBranches[0], vertBranches[1], + allEdges, theShortEdges[ nbBranchPoints > 0 ] )) + return false; + + for ( size_t iS = 0; iS < theShortEdges[ nbBranchPoints ].size(); ++iS ) + shortMap.Add( theShortEdges[ nbBranchPoints ][ iS ]); + + ++nbBranchPoints; + } + + if ( nbBranchPoints != 2 ) + return false; + + // add to theSinuEdges all edges that are not theShortEdges + vector< vector > sinuEdges(1); + TopoDS_Vertex vCommon; + for ( size_t i = 0; i < allEdges.size(); ++i ) + { + if ( !shortMap.Contains( allEdges[i] )) + { + if ( !sinuEdges.back().empty() ) + if ( !TopExp::CommonVertex( sinuEdges.back().back(), allEdges[ i ], vCommon )) + sinuEdges.resize( sinuEdges.size() + 1 ); + + sinuEdges.back().push_back( allEdges[i] ); + } + } + if ( sinuEdges.size() == 3 ) + { + if ( !TopExp::CommonVertex( sinuEdges.back().back(), sinuEdges[0][0], vCommon )) + return false; + vector& last = sinuEdges.back(); + last.insert( last.end(), sinuEdges[0].begin(), sinuEdges[0].end() ); + sinuEdges[0].swap( last ); + sinuEdges.resize( 2 ); + } + if ( sinuEdges.size() != 2 ) + return false; + + theSinuEdges[0].swap( sinuEdges[0] ); + theSinuEdges[1].swap( sinuEdges[1] ); + + if ( !TopExp::CommonVertex( theSinuEdges[0].back(), theShortEdges[0][0], vCommon ) || + !vCommon.IsSame( theHelper.IthVertex( 1, theSinuEdges[0].back() ))) + theShortEdges[0].swap( theShortEdges[1] ); + + return ( theShortEdges[0].size() > 0 && theShortEdges[1].size() > 0 && + theSinuEdges [0].size() > 0 && theSinuEdges [1].size() > 0 ); + + // the sinuous EDGEs can be composite and C0 continuous, + // therefor we use a complex criterion to find TWO short non-sinuous EDGEs + // and the rest EDGEs will be treated as sinuous. + // A short edge should have the following features: + // a) straight + // b) short + // c) with convex corners at ends + // d) far from the other short EDGE + + // vector< double > isStraightEdge( nbEdges, 0 ); // criterion value + + // // a0) evaluate continuity + // const double contiWgt = 0.5; // weight of continuity in the criterion + // multimap< int, TopoDS_Edge > continuity; + // for ( size_t i = 0; i < nbEdges; ++I ) + // { + // BRepAdaptor_Curve curve( allEdges[i] ); + // GeomAbs_Shape C = GeomAbs_CN; + // try: + // C = curve.Continuity(); // C0, G1, C1, G2, C2, C3, CN + // catch ( Standard_Failure ) {} + // continuity.insert( make_pair( C, allEdges[i] )); + // isStraight[i] += double( C ) / double( CN ) * contiWgt; + // } + + // // try to choose by continuity + // int mostStraight = (int) continuity.rbegin()->first; + // int lessStraight = (int) continuity.begin()->first; + // if ( mostStraight != lessStraight ) + // { + // int nbStraight = continuity.count( mostStraight ); + // if ( nbStraight == 2 ) + // { + // getTwo( /*least=*/false, continuity, theShortEdges, theSinuEdges ); + // } + // else if ( nbStraight == 3 && nbEdges == 4 ) + // { + // theSinuEdges.push_back( continuity.begin()->second ); + // vector::iterator it = + // std::find( allEdges.begin(), allEdges.end(), theSinuEdges[0] ); + // int i = std::distance( allEdges.begin(), it ); + // theSinuEdges .push_back( allEdges[( i+2 )%4 ]); + // theShortEdges.push_back( allEdges[( i+1 )%4 ]); + // theShortEdges.push_back( allEdges[( i+3 )%4 ]); + // } + // if ( theShortEdges.size() == 2 ) + // return true; + // } + + // // a) curvature; evaluate aspect ratio + // { + // const double curvWgt = 0.5; + // for ( size_t i = 0; i < nbEdges; ++I ) + // { + // BRepAdaptor_Curve curve( allEdges[i] ); + // double curvature = 1; + // if ( !curve.IsClosed() ) + // { + // const double f = curve.FirstParameter(), l = curve.LastParameter(); + // gp_Pnt pf = curve.Value( f ), pl = curve.Value( l ); + // gp_Lin line( pf, pl.XYZ() - pf.XYZ() ); + // double distMax = 0; + // for ( double u = f; u < l; u += (l-f)/30. ) + // distMax = Max( distMax, line.SquareDistance( curve.Value( u ))); + // curvature = Sqrt( distMax ) / ( pf.Distance( pl )); + // } + // isStraight[i] += curvWgt / ( curvature + 1e-20 ); + // } + // } + // // b) length + // { + // const double lenWgt = 0.5; + // for ( size_t i = 0; i < nbEdges; ++I ) + // { + // double length = SMESH_Algo::Length( allEdges[i] ); + // if ( length > 0 ) + // isStraight[i] += lenWgt / length; + // } + // } + // // c) with convex corners at ends + // { + // const double cornerWgt = 0.25; + // for ( size_t i = 0; i < nbEdges; ++I ) + // { + // double convex = 0; + // int iPrev = SMESH_MesherHelper::WrapIndex( int(i)-1, nbEdges ); + // int iNext = SMESH_MesherHelper::WrapIndex( int(i)+1, nbEdges ); + // TopoDS_Vertex v = helper.IthVertex( 0, allEdges[i] ); + // double angle = SMESH_MesherHelper::GetAngle( allEdges[iPrev], allEdges[i], theFace, v ); + // if ( angle < M_PI ) // [-PI; PI] + // convex += ( angle + M_PI ) / M_PI / M_PI; + // v = helper.IthVertex( 1, allEdges[i] ); + // angle = SMESH_MesherHelper::GetAngle( allEdges[iNext], allEdges[i], theFace, v ); + // if ( angle < M_PI ) // [-PI; PI] + // convex += ( angle + M_PI ) / M_PI / M_PI; + // isStraight[i] += cornerWgt * convex; + // } + // } + } + + //================================================================================ + /*! + * \brief Creates an EDGE from a sole branch of MA + */ + //================================================================================ + + TopoDS_Edge makeEdgeFromMA( SMESH_MesherHelper& theHelper, + const SMESH_MAT2d::MedialAxis& theMA ) + { + if ( theMA.getBranches().size() != 1 ) + return TopoDS_Edge(); + + vector< gp_XY > uv; + theMA.getPoints( theMA.getBranches()[0], uv ); + if ( uv.size() < 2 ) + return TopoDS_Edge(); + + TopoDS_Face face = TopoDS::Face( theHelper.GetSubShape() ); + Handle(Geom_Surface) surface = BRep_Tool::Surface( face ); + + // cout << "from salome.geom import geomBuilder" << endl; + // cout << "geompy = geomBuilder.New(salome.myStudy)" << endl; + Handle(TColgp_HArray1OfPnt) points = new TColgp_HArray1OfPnt(1, uv.size()); + for ( size_t i = 0; i < uv.size(); ++i ) + { + gp_Pnt p = surface->Value( uv[i].X(), uv[i].Y() ); + points->SetValue( i+1, p ); + //cout << "geompy.MakeVertex( "<< p.X()<<", " << p.Y()<<", " << p.Z()<<" )" << endl; + } + + GeomAPI_Interpolate interpol( points, /*isClosed=*/false, gp::Resolution()); + interpol.Perform(); + if ( !interpol.IsDone()) + return TopoDS_Edge(); + + TopoDS_Edge branchEdge = BRepBuilderAPI_MakeEdge(interpol.Curve()); + return branchEdge; + } + + //================================================================================ + /*! + * \brief Returns a type of shape, to which a hypothesis used to mesh a given edge is assigned + */ + //================================================================================ + + TopAbs_ShapeEnum getHypShape( SMESH_Mesh* mesh, const TopoDS_Shape& edge ) + { + TopAbs_ShapeEnum shapeType = TopAbs_SHAPE; + + SMESH_subMesh* sm = mesh->GetSubMesh( edge ); + SMESH_Algo* algo = sm->GetAlgo(); + if ( !algo ) return shapeType; + + const list & hyps = + algo->GetUsedHypothesis( *mesh, edge, /*ignoreAuxiliary=*/true ); + if ( hyps.empty() ) return shapeType; + + TopoDS_Shape shapeOfHyp = + SMESH_MesherHelper::GetShapeOfHypothesis( hyps.front(), edge, mesh); + + return SMESH_MesherHelper::GetGroupType( shapeOfHyp, /*woCompound=*/true); + } + + //================================================================================ + /*! + * \brief Discretize a sole branch of MA an returns parameters of divisions on MA + */ + //================================================================================ + + bool divideMA( SMESH_MesherHelper& theHelper, + const SMESH_MAT2d::MedialAxis& theMA, + const vector& theSinuEdges, + const size_t theSinuSide0Size, + SMESH_Algo* the1dAlgo, + vector& theMAParams ) + { + // check if all EDGEs of one size are meshed, then MA discretization is not needed + SMESH_Mesh* mesh = theHelper.GetMesh(); + size_t nbComputedEdges[2] = { 0, 0 }; + for ( size_t i = 1; i < theSinuEdges.size(); ++i ) + { + bool isComputed = ( ! mesh->GetSubMesh( theSinuEdges[i] )->IsEmpty() ); + nbComputedEdges[ i < theSinuSide0Size ] += isComputed; + } + if ( nbComputedEdges[0] == theSinuSide0Size || + nbComputedEdges[1] == theSinuEdges.size() - theSinuSide0Size ) + return true; // discretization is not needed + + + TopoDS_Edge branchEdge = makeEdgeFromMA( theHelper, theMA ); + if ( branchEdge.IsNull() ) + return false; + + // const char* file = "/misc/dn25/salome/eap/salome/misc/tmp/MAedge.brep"; + // BRepTools::Write( branchEdge, file); + // cout << "Write " << file << endl; + + // look for a most local hyps assigned to theSinuEdges + TopoDS_Edge edge = theSinuEdges[0]; + int mostSimpleShape = (int) getHypShape( mesh, edge ); + for ( size_t i = 1; i < theSinuEdges.size(); ++i ) + { + int shapeType = (int) getHypShape( mesh, theSinuEdges[i] ); + if ( shapeType > mostSimpleShape ) + edge = theSinuEdges[i]; + } + + SMESH_Algo* algo = the1dAlgo; + if ( mostSimpleShape != TopAbs_SHAPE ) + { + algo = mesh->GetSubMesh( edge )->GetAlgo(); + SMESH_Hypothesis::Hypothesis_Status status; + if ( !algo->CheckHypothesis( *mesh, edge, status )) + algo = the1dAlgo; + } + + TmpMesh tmpMesh; + tmpMesh.ShapeToMesh( branchEdge ); + try { + mesh->GetGen()->Compute( tmpMesh, branchEdge, true, true ); // make nodes on VERTEXes + if ( !algo->Compute( tmpMesh, branchEdge )) + return false; + } + catch (...) { + return false; + } + return SMESH_Algo::GetNodeParamOnEdge( tmpMesh.GetMeshDS(), branchEdge, theMAParams ); + } + + //================================================================================ + /*! + * \brief Modifies division parameters on MA to make them coincide with projections + * of VERTEXes to MA for a given pair of opposite EDGEs + * \param [in] theEdgePairInd - index of the EDGE pair + * \param [in] theDivPoints - the BranchPoint's dividing MA into parts each + * corresponding to a unique pair of opposite EDGEs + * \param [in,out] theMAParams - the MA division parameters to modify + * \param [in,out] theParBeg - index of the 1st division point for the given EDGE pair + * \param [in,out] theParEnd - index of the last division point for the given EDGE pair + * \return bool - is OK + */ + //================================================================================ + + bool getParamsForEdgePair( const size_t theEdgePairInd, + const vector< SMESH_MAT2d::BranchPoint >& theDivPoints, + const vector& theMAParams, + vector& theSelectedMAParams) + { + if ( theDivPoints.empty() ) + { + theSelectedMAParams = theMAParams; + return true; + } + if ( theEdgePairInd > theDivPoints.size() ) + return false; + + // TODO + return false; + } + + //-------------------------------------------------------------------------------- + // node or node parameter on EDGE + struct NodePoint + { + const SMDS_MeshNode* _node; + double _u; + int _edgeInd; // index in theSinuEdges vector + + NodePoint(const SMDS_MeshNode* n=0 ): _node(n), _u(0), _edgeInd(-1) {} + NodePoint(double u, size_t iEdge) : _node(0), _u(u), _edgeInd(iEdge) {} + NodePoint(const SMESH_MAT2d::BoundaryPoint& p) : _node(0), _u(p._param), _edgeInd(p._edgeIndex) {} + }; + + //================================================================================ + /*! + * \brief Finds a VERTEX corresponding to a point on EDGE, which is also filled + * with a node on the VERTEX, present or created + * \param [in,out] theNodePnt - the node position on the EDGE + * \param [in] theSinuEdges - the sinuous EDGEs + * \param [in] theMeshDS - the mesh + * \return bool - true if the \a theBndPnt is on VERTEX + */ + //================================================================================ + + bool findVertex( NodePoint& theNodePnt, + const vector& theSinuEdges, + SMESHDS_Mesh* theMeshDS) + { + if ( theNodePnt._edgeInd >= theSinuEdges.size() ) + return false; + + double f,l; + BRep_Tool::Range( theSinuEdges[ theNodePnt._edgeInd ], f,l ); + + TopoDS_Vertex V; + if ( Abs( f - theNodePnt._u )) + V = SMESH_MesherHelper::IthVertex( 0, theSinuEdges[ theNodePnt._edgeInd ], /*CumOri=*/false); + else if ( Abs( l - theNodePnt._u )) + V = SMESH_MesherHelper::IthVertex( 1, theSinuEdges[ theNodePnt._edgeInd ], /*CumOri=*/false); + + if ( !V.IsNull() ) + { + theNodePnt._node = SMESH_Algo::VertexNode( V, theMeshDS ); + if ( !theNodePnt._node ) + { + gp_Pnt p = BRep_Tool::Pnt( V ); + theNodePnt._node = theMeshDS->AddNode( p.X(), p.Y(), p.Z() ); + theMeshDS->SetNodeOnVertex( theNodePnt._node, V ); + } + return true; + } + return false; + } + + //================================================================================ + /*! + * \brief Add to the map of NodePoint's those on VERTEXes + * \param [in,out] theHelper - the helper + * \param [in] theMA - Medial Axis + * \param [in] theDivPoints - projections of VERTEXes to MA + * \param [in] theSinuEdges - the sinuous EDGEs + * \param [in] theSideEdgeIDs - indices of sinuous EDGEs per side + * \param [in] theIsEdgeComputed - is sinuous EGDE is meshed + * \param [in,out] thePointsOnE - the map to fill + */ + //================================================================================ + + bool projectVertices( SMESH_MesherHelper& theHelper, + const SMESH_MAT2d::MedialAxis& theMA, + const vector< SMESH_MAT2d::BranchPoint >& theDivPoints, + const vector& theSinuEdges, + //const vector< int > theSideEdgeIDs[2], + const vector< bool >& theIsEdgeComputed, + map< double, pair< NodePoint, NodePoint > > & thePointsOnE) + { + if ( theDivPoints.empty() ) + return true; + + SMESHDS_Mesh* meshDS = theHelper.GetMeshDS(); + + double uMA; + SMESH_MAT2d::BoundaryPoint bp[2]; + const SMESH_MAT2d::Branch& branch = theMA.getBranches()[0]; + + for ( size_t i = 0; i < theDivPoints.size(); ++i ) + { + if ( !branch.getParameter( theDivPoints[i], uMA )) + return false; + if ( !branch.getBoundaryPoints( theDivPoints[i], bp[0], bp[1] )) + return false; + + NodePoint np[2] = { NodePoint( bp[0] ), + NodePoint( bp[1] ) }; + bool isVertex[2] = { findVertex( np[0], theSinuEdges, meshDS ), + findVertex( np[1], theSinuEdges, meshDS )}; + + map< double, pair< NodePoint, NodePoint > >::iterator u2NP = + thePointsOnE.insert( make_pair( uMA, make_pair( np[0], np[1]))).first; + + if ( isVertex[0] && isVertex[1] ) + continue; + + bool isOppComputed = theIsEdgeComputed[ np[ isVertex[0] ]._edgeInd ]; + + if ( !isOppComputed ) + continue; + + // a VERTEX is projected on a meshed EDGE; there are two options: + // - a projected point is joined with a closet node if a strip between this and neighbor + // projection is wide enough; joining is done by setting the same node to the BoundaryPoint + // - a neighbor projection is merged this this one if it too close; a node of deleted + // projection is set to the BoundaryPoint of this projection + + + } + return true; + } + + //================================================================================ + /*! + * \brief Divide the sinuous EDGEs by projecting the division point of Medial + * Axis to the EGDEs + * \param [in] theHelper - the helper + * \param [in] theMA - the Medial Axis + * \param [in] theMAParams - parameters of division points of \a theMA + * \param [in] theSinuEdges - the EDGEs to make nodes on + * \param [in] theSinuSide0Size - the number of EDGEs in the 1st sinuous side + * \return bool - is OK or not + */ + //================================================================================ + + bool computeSinuEdges( SMESH_MesherHelper& theHelper, + SMESH_MAT2d::MedialAxis& theMA, + vector& theMAParams, + const vector& theSinuEdges, + const size_t theSinuSide0Size) + { + if ( theMA.getBranches().size() != 1 ) + return false; + + // normalize theMAParams + for ( size_t i = 0; i < theMAParams.size(); ++i ) + theMAParams[i] /= theMAParams.back(); + + + SMESH_Mesh* mesh = theHelper.GetMesh(); + SMESHDS_Mesh* meshDS = theHelper.GetMeshDS(); + double f,l; + + vector< Handle(Geom_Curve) > curves ( theSinuEdges.size() ); + vector< int > edgeIDs( theSinuEdges.size() ); + vector< bool > isComputed( theSinuEdges.size() ); + //bool hasComputed = false; + for ( size_t i = 0; i < theSinuEdges.size(); ++i ) + { + curves[i] = BRep_Tool::Curve( theSinuEdges[i], f,l ); + if ( !curves[i] ) + return false; + SMESH_subMesh* sm = mesh->GetSubMesh( theSinuEdges[i] ); + edgeIDs [i] = sm->GetId(); + isComputed[i] = ( !sm->IsEmpty() ); + // if ( isComputed[i] ) + // hasComputed = true; + } + + const SMESH_MAT2d::Branch& branch = theMA.getBranches()[0]; + SMESH_MAT2d::BoundaryPoint bp[2]; + + vector< std::size_t > edgeIDs1, edgeIDs2; + vector< SMESH_MAT2d::BranchPoint > divPoints; + branch.getOppositeGeomEdges( edgeIDs1, edgeIDs2, divPoints ); + for ( size_t i = 0; i < edgeIDs1.size(); ++i ) + if ( isComputed[ edgeIDs1[i]] && + isComputed[ edgeIDs2[i]]) + return false; + + // map param on MA to parameters of nodes on a pair of theSinuEdges + typedef map< double, pair< NodePoint, NodePoint > > TMAPar2NPoints; + TMAPar2NPoints pointsOnE; + vector maParams; + + // compute params of nodes on EDGEs by projecting division points from MA + //const double tol = 1e-5 * theMAParams.back(); + size_t iEdgePair = 0; + while ( iEdgePair < edgeIDs1.size() ) + { + if ( isComputed[ edgeIDs1[ iEdgePair ]] || + isComputed[ edgeIDs2[ iEdgePair ]]) + { + // "projection" from one side to the other + + size_t iEdgeComputed = edgeIDs1[iEdgePair], iSideComputed = 0; + if ( !isComputed[ iEdgeComputed ]) + ++iSideComputed, iEdgeComputed = edgeIDs2[iEdgePair]; + + map< double, const SMDS_MeshNode* > nodeParams; // params of existing nodes + if ( !SMESH_Algo::GetSortedNodesOnEdge( meshDS, theSinuEdges[ iEdgeComputed ], /*skipMedium=*/true, nodeParams )) + return false; + + SMESH_MAT2d::BoundaryPoint& bndPnt = bp[ 1-iSideComputed ]; + SMESH_MAT2d::BranchPoint brp; + NodePoint npN, npB; + NodePoint& np0 = iSideComputed ? npB : npN; + NodePoint& np1 = iSideComputed ? npN : npB; + + double maParam1st, maParamLast, maParam; + if ( !theMA.getBoundary().getBranchPoint( iEdgeComputed, nodeParams.begin()->first, brp )) + return false; + branch.getParameter( brp, maParam1st ); + if ( !theMA.getBoundary().getBranchPoint( iEdgeComputed, nodeParams.rbegin()->first, brp )) + return false; + branch.getParameter( brp, maParamLast ); + + map< double, const SMDS_MeshNode* >::iterator u2n = nodeParams.begin(), u2nEnd = --nodeParams.end(); + TMAPar2NPoints::iterator pos, end = pointsOnE.end(); + TMAPar2NPoints::iterator & hint = (maParamLast > maParam1st) ? end : pos; + for ( ++u2n; u2n != u2nEnd; ++u2n ) + { + if ( !theMA.getBoundary().getBranchPoint( iEdgeComputed, u2n->first, brp )) + return false; + if ( !branch.getBoundaryPoints( brp, bp[0], bp[1] )) + return false; + if ( !branch.getParameter( brp, maParam )) + return false; + + npN = NodePoint( u2n->second ); + npB = NodePoint( bndPnt ); + pos = pointsOnE.insert( hint, make_pair( maParam, make_pair( np0, np1 ))); + } + + // move iEdgePair forward + while ( iEdgePair < edgeIDs1.size() ) + if ( edgeIDs1[ iEdgePair ] == bp[0]._edgeIndex && + edgeIDs2[ iEdgePair ] == bp[1]._edgeIndex ) + break; + else + ++iEdgePair; + } + else + { + // projection from MA + maParams.clear(); + if ( !getParamsForEdgePair( iEdgePair, divPoints, theMAParams, maParams )) + return false; + + for ( size_t i = 1; i < maParams.size()-1; ++i ) + { + if ( !branch.getBoundaryPoints( maParams[i], bp[0], bp[1] )) + return false; + + pointsOnE.insert( pointsOnE.end(), make_pair( maParams[i], make_pair( NodePoint(bp[0]), + NodePoint(bp[1])))); + } + } + ++iEdgePair; + } + + if ( !projectVertices( theHelper, theMA, divPoints, theSinuEdges, isComputed, pointsOnE )) + return false; + + // create nodes + TMAPar2NPoints::iterator u2np = pointsOnE.begin(); + for ( ; u2np != pointsOnE.end(); ++u2np ) + { + NodePoint* np[2] = { & u2np->second.first, & u2np->second.second }; + for ( int iSide = 0; iSide < 2; ++iSide ) + { + if ( np[ iSide ]->_node ) continue; + size_t iEdge = np[ iSide ]->_edgeInd; + double u = np[ iSide ]->_u; + gp_Pnt p = curves[ iEdge ]->Value( u ); + np[ iSide ]->_node = meshDS->AddNode( p.X(), p.Y(), p.Z() ); + meshDS->SetNodeOnEdge( np[ iSide ]->_node, edgeIDs[ iEdge ], u ); + } + } + + // create mesh segments on EDGEs + theHelper.SetElementsOnShape( false ); + TopoDS_Face face = TopoDS::Face( theHelper.GetSubShape() ); + for ( size_t i = 0; i < theSinuEdges.size(); ++i ) + { + SMESH_subMesh* sm = mesh->GetSubMesh( theSinuEdges[i] ); + if ( sm->GetSubMeshDS() && sm->GetSubMeshDS()->NbElements() > 0 ) + continue; + + StdMeshers_FaceSide side( face, theSinuEdges[i], mesh, + /*isFwd=*/true, /*skipMediumNodes=*/true ); + vector nodes = side.GetOrderedNodes(); + for ( size_t in = 1; in < nodes.size(); ++in ) + { + const SMDS_MeshElement* seg = theHelper.AddEdge( nodes[in-1], nodes[in], 0, false ); + meshDS->SetMeshElementOnShape( seg, edgeIDs[ i ] ); + } + } + + // update sub-meshes on VERTEXes + for ( size_t i = 0; i < theSinuEdges.size(); ++i ) + { + mesh->GetSubMesh( theHelper.IthVertex( 0, theSinuEdges[i] )) + ->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE ); + mesh->GetSubMesh( theHelper.IthVertex( 1, theSinuEdges[i] )) + ->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE ); + } + + return true; + } + + //================================================================================ + /*! + * \brief Mesh short EDGEs + */ + //================================================================================ + + bool computeShortEdges( SMESH_MesherHelper& theHelper, + const vector& theShortEdges, + SMESH_Algo* the1dAlgo ) + { + for ( size_t i = 0; i < theShortEdges.size(); ++i ) + { + theHelper.GetGen()->Compute( *theHelper.GetMesh(), theShortEdges[i], true, true ); + + SMESH_subMesh* sm = theHelper.GetMesh()->GetSubMesh(theShortEdges[i] ); + if ( sm->IsEmpty() ) + { + try { + if ( !the1dAlgo->Compute( *theHelper.GetMesh(), theShortEdges[i] )) + return false; + } + catch (...) { + return false; + } + sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE ); + if ( sm->IsEmpty() ) + return false; + } + } + return true; + } + + inline double area( const UVPtStruct& p1, const UVPtStruct& p2, const UVPtStruct& p3 ) + { + gp_XY v1 = p2.UV() - p1.UV(); + gp_XY v2 = p3.UV() - p1.UV(); + return v2 ^ v1; + } + + bool ellipticSmooth( FaceQuadStruct::Ptr quad, int nbLoops ) + { + //nbLoops = 10; + if ( quad->uv_grid.empty() ) + return true; + + int nbhoriz = quad->iSize; + int nbvertic = quad->jSize; + + const double dksi = 0.5, deta = 0.5; + const double dksi2 = dksi*dksi, deta2 = deta*deta; + double err = 0., g11, g22, g12; + int nbErr = 0; + + FaceQuadStruct& q = *quad; + UVPtStruct pNew; + + double refArea = area( q.UVPt(0,0), q.UVPt(1,0), q.UVPt(1,1) ); + + for ( int iLoop = 0; iLoop < nbLoops; ++iLoop ) + { + err = 0; + for ( int i = 1; i < nbhoriz - 1; i++ ) + for ( int j = 1; j < nbvertic - 1; j++ ) + { + g11 = ( (q.U(i,j+1) - q.U(i,j-1))*(q.U(i,j+1) - q.U(i,j-1))/dksi2 + + (q.V(i,j+1) - q.V(i,j-1))*(q.V(i,j+1) - q.V(i,j-1))/deta2 )/4; + + g22 = ( (q.U(i+1,j) - q.U(i-1,j))*(q.U(i+1,j) - q.U(i-1,j))/dksi2 + + (q.V(i+1,j) - q.V(i-1,j))*(q.V(i+1,j) - q.V(i-1,j))/deta2 )/4; + + g12 = ( (q.U(i+1,j) - q.U(i-1,j))*(q.U(i,j+1) - q.U(i,j-1))/dksi2 + + (q.V(i+1,j) - q.V(i-1,j))*(q.V(i,j+1) - q.V(i,j-1))/deta2 )/(4*dksi*deta); + + pNew.u = dksi2/(2*(g11+g22)) * (g11*(q.U(i+1,j) + q.U(i-1,j))/dksi2 + + g22*(q.U(i,j+1) + q.U(i,j-1))/dksi2 + - 0.5*g12*q.U(i+1,j+1) + 0.5*g12*q.U(i-1,j+1) + + - 0.5*g12*q.U(i-1,j-1) + 0.5*g12*q.U(i+1,j-1)); + + pNew.v = deta2/(2*(g11+g22)) * (g11*(q.V(i+1,j) + q.V(i-1,j))/deta2 + + g22*(q.V(i,j+1) + q.V(i,j-1))/deta2 + - 0.5*g12*q.V(i+1,j+1) + 0.5*g12*q.V(i-1,j+1) + + - 0.5*g12*q.V(i-1,j-1) + 0.5*g12*q.V(i+1,j-1)); + + // if (( refArea * area( q.UVPt(i-1,j-1), q.UVPt(i,j-1), pNew ) > 0 ) && + // ( refArea * area( q.UVPt(i+1,j-1), q.UVPt(i+1,j), pNew ) > 0 ) && + // ( refArea * area( q.UVPt(i+1,j+1), q.UVPt(i,j+1), pNew ) > 0 ) && + // ( refArea * area( q.UVPt(i-1,j), q.UVPt(i-1,j-1), pNew ) > 0 )) + { + err += sqrt(( q.U(i,j) - pNew.u ) * ( q.U(i,j) - pNew.u ) + + ( q.V(i,j) - pNew.v ) * ( q.V(i,j) - pNew.v )); + q.U(i,j) = pNew.u; + q.V(i,j) = pNew.v; + } + // else if ( ++nbErr < 10 ) + // { + // cout << i << ", " << j << endl; + // cout << "x = [" + // << "[ " << q.U(i-1,j-1) << ", " < theSinuEdges[2], + const vector theShortEdges[2]) +{ + SMESH_Mesh* mesh = theHelper.GetMesh(); + SMESH_ProxyMesh::Ptr proxyMesh = StdMeshers_ViscousLayers2D::Compute( *mesh, theFace ); + if ( !proxyMesh ) + return false; + + StdMeshers_Quadrangle_2D::myProxyMesh = proxyMesh; + StdMeshers_Quadrangle_2D::myHelper = &theHelper; + StdMeshers_Quadrangle_2D::myNeedSmooth = false; + StdMeshers_Quadrangle_2D::myCheckOri = false; + StdMeshers_Quadrangle_2D::myQuadList.clear(); + + // fill FaceQuadStruct + + list< TopoDS_Edge > side[4]; + side[0].insert( side[0].end(), theShortEdges[0].begin(), theShortEdges[0].end() ); + side[1].insert( side[1].end(), theSinuEdges[1].begin(), theSinuEdges[1].end() ); + side[2].insert( side[2].end(), theShortEdges[1].begin(), theShortEdges[1].end() ); + side[3].insert( side[3].end(), theSinuEdges[0].begin(), theSinuEdges[0].end() ); + + FaceQuadStruct::Ptr quad( new FaceQuadStruct ); + quad->side.resize( 4 ); + quad->face = theFace; + for ( int i = 0; i < 4; ++i ) + { + quad->side[i] = StdMeshers_FaceSide::New( theFace, side[i], mesh, i < QUAD_TOP_SIDE, + /*skipMediumNodes=*/true, proxyMesh ); + } + int nbNodesShort0 = quad->side[0].NbPoints(); + int nbNodesShort1 = quad->side[2].NbPoints(); + + // compute UV of internal points + myQuadList.push_back( quad ); + if ( !StdMeshers_Quadrangle_2D::setNormalizedGrid( quad )) + return false; + + // elliptic smooth of internal points to get boundary cell normal to the boundary + ellipticSmooth( quad, 1 ); + + // create quadrangles + bool ok; + if ( nbNodesShort0 == nbNodesShort1 ) + ok = StdMeshers_Quadrangle_2D::computeQuadDominant( *mesh, theFace, quad ); + else + ok = StdMeshers_Quadrangle_2D::computeTriangles( *mesh, theFace, quad ); + + StdMeshers_Quadrangle_2D::myProxyMesh.reset(); + StdMeshers_Quadrangle_2D::myHelper = 0; + + return ok; +} + +//================================================================================ +/*! + * \brief Generate quadrangle mesh + */ +//================================================================================ + +bool StdMeshers_QuadFromMedialAxis_1D2D::Compute(SMESH_Mesh& theMesh, + const TopoDS_Shape& theShape) +{ + SMESH_MesherHelper helper( theMesh ); + helper.SetSubShape( theShape ); + + TopoDS_Face F = TopoDS::Face( theShape ); + if ( F.Orientation() >= TopAbs_INTERNAL ) F.Orientation( TopAbs_FORWARD ); + + list< TopoDS_Edge > edges; + list< int > nbEdgesInWire; + int nbWire = SMESH_Block::GetOrderedEdges (F, edges, nbEdgesInWire); + + vector< TopoDS_Edge > sinuSide[2], shortSide[2]; + if ( nbWire == 1 && getSinuousEdges( helper, F, edges, sinuSide, shortSide )) + { + vector< TopoDS_Edge > sinuEdges = sinuSide[0]; + sinuEdges.insert( sinuEdges.end(), sinuSide[1].begin(), sinuSide[1].end() ); + if ( sinuEdges.size() > 2 ) + return error(COMPERR_BAD_SHAPE, "Not yet supported case" ); + + double minSegLen = getMinSegLen( helper, sinuEdges ); + SMESH_MAT2d::MedialAxis ma( F, sinuEdges, minSegLen, /*ignoreCorners=*/true ); + + if ( !_regular1D ) + _regular1D = new Algo1D( _studyId, _gen ); + _regular1D->SetSegmentLength( minSegLen ); + + vector maParams; + if ( ! divideMA( helper, ma, sinuEdges, sinuSide[0].size(), _regular1D, maParams )) + return error(COMPERR_BAD_SHAPE); + + if ( !computeShortEdges( helper, shortSide[0], _regular1D ) || + !computeShortEdges( helper, shortSide[1], _regular1D )) + return error("Failed to mesh short edges"); + + if ( !computeSinuEdges( helper, ma, maParams, sinuEdges, sinuSide[0].size() )) + return error("Failed to mesh sinuous edges"); + + return computeQuads( helper, F, sinuSide, shortSide ); + } + + return error(COMPERR_BAD_SHAPE, "Not implemented so far"); +} + +//================================================================================ +/*! + * \brief Predict nb of elements + */ +//================================================================================ + +bool StdMeshers_QuadFromMedialAxis_1D2D::Evaluate(SMESH_Mesh & theMesh, + const TopoDS_Shape & theShape, + MapShapeNbElems& theResMap) +{ + return StdMeshers_Quadrangle_2D::Evaluate(theMesh,theShape,theResMap); +} + diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx new file mode 100644 index 000000000..df8a84a4c --- /dev/null +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx @@ -0,0 +1,65 @@ +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : StdMeshers_QuadFromMedialAxis_1D2D.hxx +// Created : Wed Jun 3 17:22:35 2015 +// Author : Edward AGAPOV (eap) + + +#ifndef __StdMeshers_QuadFromMedialAxis_1D2D_HXX__ +#define __StdMeshers_QuadFromMedialAxis_1D2D_HXX__ + +#include "StdMeshers_Quadrangle_2D.hxx" + +#include + +/*! + * \brief Quadrangle mesher using Medial Axis + */ +class STDMESHERS_EXPORT StdMeshers_QuadFromMedialAxis_1D2D: public StdMeshers_Quadrangle_2D +{ + public: + StdMeshers_QuadFromMedialAxis_1D2D(int hypId, int studyId, SMESH_Gen* gen); + virtual ~StdMeshers_QuadFromMedialAxis_1D2D(); + + virtual bool CheckHypothesis(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + Hypothesis_Status& aStatus); + + virtual bool Compute(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape); + + virtual bool Evaluate(SMESH_Mesh & aMesh, + const TopoDS_Shape & aShape, + MapShapeNbElems& aResMap); + + private: + + bool computeQuads( SMESH_MesherHelper& theHelper, + const TopoDS_Face& theFace, + const std::vector theSinuEdges[2], + const std::vector theShortEdges[2]); + + class Algo1D; + Algo1D* _regular1D; +}; + +#endif diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index af3d51d76..0e35c560e 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -1599,7 +1599,7 @@ void StdMeshers_Quadrangle_2D::shiftQuad(FaceQuadStruct::Ptr& quad, const int nu //================================================================================ /*! - * \brief Rotate sides of a quad by given nb of quartes + * \brief Rotate sides of a quad CCW by given nb of quartes * \param nb - number of rotation quartes * \param ori - to keep orientation of sides as in an unit quad or not * \param keepGrid - if \c true Side::grid is not changed, Side::from and Side::to @@ -1611,6 +1611,8 @@ void FaceQuadStruct::shift( size_t nb, bool ori, bool keepGrid ) { if ( nb == 0 ) return; + nb = nb % NB_QUAD_SIDES; + vector< Side > newSides( side.size() ); vector< Side* > sidePtrs( side.size() ); for (int i = QUAD_BOTTOM_SIDE; i < NB_QUAD_SIDES; ++i) @@ -1640,7 +1642,33 @@ void FaceQuadStruct::shift( size_t nb, bool ori, bool keepGrid ) } newSides.swap( side ); - uv_grid.clear(); + if ( keepGrid && !uv_grid.empty() ) + { + if ( nb == 2 ) // "PI" + { + std::reverse( uv_grid.begin(), uv_grid.end() ); + } + else + { + FaceQuadStruct newQuad; + newQuad.uv_grid.resize( uv_grid.size() ); + newQuad.iSize = jSize; + newQuad.jSize = iSize; + int i, j, iRev, jRev; + int *iNew = ( nb == 1 ) ? &jRev : &j; + int *jNew = ( nb == 1 ) ? &i : &iRev; + for ( i = 0, iRev = iSize-1; i < iSize; ++i, --iRev ) + for ( j = 0, jRev = jSize-1; j < jSize; ++j, --jRev ) + newQuad.UVPt( *iNew, *jNew ) = UVPt( i, j ); + + std::swap( iSize, jSize ); + std::swap( uv_grid, newQuad.uv_grid ); + } + } + else + { + uv_grid.clear(); + } } //======================================================================= diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx index 8687bbfda..6a06c9a46 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx @@ -119,6 +119,8 @@ struct FaceQuadStruct FaceQuadStruct ( const TopoDS_Face& F = TopoDS_Face(), const std::string& nm="main" ); UVPtStruct& UVPt( int i, int j ) { return uv_grid[ i + j * iSize ]; } + double& U( int i, int j ) { return UVPt( i, j ).u; } + double& V( int i, int j ) { return UVPt( i, j ).v; } void shift ( size_t nb, bool keepUnitOri, bool keepGrid=false ); int & nbNodeOut( int iSide ) { return side[ iSide ].nbNodeOut; } bool findCell ( const gp_XY& uv, int & i, int & j ); diff --git a/src/StdMeshersGUI/StdMeshers_images.ts b/src/StdMeshersGUI/StdMeshers_images.ts index b94521ab3..e744cf34e 100644 --- a/src/StdMeshersGUI/StdMeshers_images.ts +++ b/src/StdMeshersGUI/StdMeshers_images.ts @@ -143,6 +143,10 @@ ICON_SMESH_TREE_ALGO_RadialQuadrangle_1D2D mesh_tree_algo_radial_quadrangle_1D2D.png + + ICON_SMESH_TREE_ALGO_QuadFromMedialAxis_1D2D + mesh_tree_algo_quad.png + ICON_SMESH_TREE_ALGO_Prism_3D mesh_tree_algo_prism.png diff --git a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx index 2af7cca75..cf497681c 100644 --- a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx @@ -32,6 +32,8 @@ #include "Utils_CorbaException.hxx" #include "utilities.h" +#include "StdMeshers_QuadFromMedialAxis_1D2D.hxx" + using namespace std; //============================================================================= @@ -98,3 +100,39 @@ CORBA::Boolean StdMeshers_Quadrangle_2D_i::IsApplicable( const TopoDS_Shape &S, return ::StdMeshers_Quadrangle_2D::IsApplicable( S, toCheckAll ); } +//============================================================================= +/*! + * StdMeshers_QuadFromMedialAxis_1D2D_i::StdMeshers_QuadFromMedialAxis_1D2D_i + * + * Constructor + */ +//============================================================================= + +StdMeshers_QuadFromMedialAxis_1D2D_i:: +StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA, + int theStudyId, + ::SMESH_Gen* theGenImpl ) + : SALOME::GenericObj_i( thePOA ), + SMESH_Hypothesis_i( thePOA ), + SMESH_Algo_i( thePOA ), + SMESH_2D_Algo_i( thePOA ) +{ + MESSAGE( "StdMeshers_QuadFromMedialAxis_1D2D_i::StdMeshers_QuadFromMedialAxis_1D2D_i" ); + myBaseImpl = new ::StdMeshers_QuadFromMedialAxis_1D2D( theGenImpl->GetANewId(), + theStudyId, + theGenImpl ); +} + +//============================================================================= +/*! + * StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i + * + * Destructor + * + */ +//============================================================================= + +StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i() +{ + MESSAGE( "StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i" ); +} diff --git a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx index 4fa55b135..145d31e3c 100644 --- a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx @@ -62,4 +62,27 @@ class STDMESHERS_I_EXPORT StdMeshers_Quadrangle_2D_i: static CORBA::Boolean IsApplicable(const TopoDS_Shape &S, CORBA::Boolean toCheckAll); }; +// ====================================================== +// Quadrangle (Medial Axis Projection) 2d algorithm +// ====================================================== +class STDMESHERS_I_EXPORT StdMeshers_QuadFromMedialAxis_1D2D_i: + public virtual POA_StdMeshers::StdMeshers_QuadFromMedialAxis_1D2D, + public virtual SMESH_2D_Algo_i +{ + public: + // Constructor + StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA, + int theStudyId, + ::SMESH_Gen* theGenImpl ); + + // Destructor + virtual ~StdMeshers_QuadFromMedialAxis_1D2D_i(); + + // Get implementation + //::StdMeshers_Quadrangle_2D* GetImpl(); + + // Return true if the algorithm is applicable to a shape + //static CORBA::Boolean IsApplicable(const TopoDS_Shape &S, CORBA::Boolean toCheckAll); +}; + #endif diff --git a/src/StdMeshers_I/StdMeshers_i.cxx b/src/StdMeshers_I/StdMeshers_i.cxx index c7ae1a76a..3e9eb70b7 100644 --- a/src/StdMeshers_I/StdMeshers_i.cxx +++ b/src/StdMeshers_I/StdMeshers_i.cxx @@ -216,6 +216,8 @@ STDMESHERS_I_EXPORT #endif else if (strcmp(aHypName, "Quadrangle_2D") == 0) aCreator = new StdHypothesisCreator_i; + else if (strcmp(aHypName, "QuadFromMedialAxis_1D2D") == 0) + aCreator = new StdHypothesisCreator_i; else if (strcmp(aHypName, "Hexa_3D") == 0) aCreator = new StdHypothesisCreator_i; else if (strcmp(aHypName, "Projection_1D") == 0) From 663e6353b914bb63e087a87dc66cd151c2d9b6b3 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 16 Jun 2015 12:25:19 +0300 Subject: [PATCH 02/48] Fix misprint --- src/SMESHUtils/SMESH_MAT2d.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMESHUtils/SMESH_MAT2d.cxx b/src/SMESHUtils/SMESH_MAT2d.cxx index 390d337b8..dcde99881 100644 --- a/src/SMESHUtils/SMESH_MAT2d.cxx +++ b/src/SMESHUtils/SMESH_MAT2d.cxx @@ -210,7 +210,7 @@ namespace } #else void inSegmentsToFile( vector< InSegment>& inSegments) {} - void dumpEdge( const TVDedge* edge ) {} + void dumpEdge( const TVDEdge* edge ) {} void dumpCell( const TVDCell* cell ) {} #endif } From fb609e70fe2fefc32cc693f0120664b6286556d7 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 19 Jun 2015 15:40:37 +0300 Subject: [PATCH 03/48] patch for correct linking on Windows --- src/SMESHUtils/CMakeLists.txt | 1 + src/SMESHUtils/SMESH_MAT2d.hxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SMESHUtils/CMakeLists.txt b/src/SMESHUtils/CMakeLists.txt index 8c2f3217d..8bafe47f4 100644 --- a/src/SMESHUtils/CMakeLists.txt +++ b/src/SMESHUtils/CMakeLists.txt @@ -43,6 +43,7 @@ SET(_link_LIBRARIES ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} + ${CAS_TKTopAlgo} ${Boost_LIBRARIES} SMDS ) diff --git a/src/SMESHUtils/SMESH_MAT2d.hxx b/src/SMESHUtils/SMESH_MAT2d.hxx index 7e1061d05..2b60605bc 100644 --- a/src/SMESHUtils/SMESH_MAT2d.hxx +++ b/src/SMESHUtils/SMESH_MAT2d.hxx @@ -161,7 +161,7 @@ namespace SMESH_MAT2d * \brief Face boundary is discretized so that each its segment to correspond to * an edge of MA */ - class Boundary + class SMESHUtils_EXPORT Boundary { public: From 2a6e16b7faacf40cf3b91605690ce04f14141f1b Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 25 Aug 2015 17:28:48 +0300 Subject: [PATCH 04/48] Fix MA construction --- src/SMESHUtils/SMESH_MAT2d.cxx | 481 ++++++++++++++---- src/SMESHUtils/SMESH_MAT2d.hxx | 27 +- .../StdMeshers_QuadFromMedialAxis_1D2D.cxx | 11 +- 3 files changed, 419 insertions(+), 100 deletions(-) diff --git a/src/SMESHUtils/SMESH_MAT2d.cxx b/src/SMESHUtils/SMESH_MAT2d.cxx index dcde99881..66ac2ff30 100644 --- a/src/SMESHUtils/SMESH_MAT2d.cxx +++ b/src/SMESHUtils/SMESH_MAT2d.cxx @@ -47,6 +47,7 @@ #include #ifdef _DEBUG_ +//#define _MYDEBUG_ #include "SMESH_File.hxx" #include "SMESH_Comment.hxx" #endif @@ -66,8 +67,8 @@ namespace struct InPoint { - int _a, _b; - double _param; + int _a, _b; // coordinates + double _param; // param on EDGE InPoint(int x, int y, double param) : _a(x), _b(y), _param(param) {} InPoint() : _a(0), _b(0), _param(0) {} @@ -76,6 +77,8 @@ namespace size_t index( const vector< InPoint >& inPoints ) const { return this - &inPoints[0]; } bool operator==( const InPoint& other ) const { return _a == other._a && _b == other._b; } + bool operator==( const TVDVertex* v ) const { return ( Abs( _a - v->x() ) < 1. && + Abs( _b - v->y() ) < 1. ); } }; // ------------------------------------------------------------------------------------- @@ -105,10 +108,12 @@ namespace // check if a TVDEdge begins at my end or ends at my start inline bool InSegment::isConnected( const TVDEdge* edge ) { - return ((Abs( edge->vertex0()->x() - _p1->_a ) < 1.&& - Abs( edge->vertex0()->y() - _p1->_b ) < 1. ) || - (Abs( edge->vertex1()->x() - _p0->_a ) < 1.&& - Abs( edge->vertex1()->y() - _p0->_b ) < 1. )); + return (( edge->vertex0() && edge->vertex1() ) + && + ((Abs( edge->vertex0()->x() - _p1->_a ) < 1.&& + Abs( edge->vertex0()->y() - _p1->_b ) < 1. ) || + (Abs( edge->vertex1()->x() - _p0->_a ) < 1.&& + Abs( edge->vertex1()->y() - _p0->_b ) < 1. ))); } // check if a MA TVDEdge is outside of a domain @@ -147,7 +152,7 @@ namespace // } // ------------------------------------------------------------------------------------- -#ifdef _DEBUG_ +#ifdef _MYDEBUG_ // writes segments into a txt file readable by voronoi_visualizer void inSegmentsToFile( vector< InSegment>& inSegments) { @@ -155,6 +160,7 @@ namespace return; const char* fileName = "/misc/dn25/salome/eap/salome/misc/Code/C++/MAdebug.txt"; SMESH_File file(fileName, false ); + file.remove(); file.openForWriting(); SMESH_Comment text; text << "0\n"; // nb points @@ -180,7 +186,7 @@ namespace if ( !edge->vertex1() ) cout << ") -> ( INF, INF"; else - cout << ") -> (" << edge->vertex1()->x() << ", " << edge->vertex1()->y(); + cout << ") -> ( " << edge->vertex1()->x() << ", " << edge->vertex1()->y(); cout << ")\t cell=" << edge->cell() << " iBnd=" << edge->color() << " twin=" << edge->twin() @@ -253,6 +259,7 @@ namespace boost { namespace { const int theNoBrachID = 0; // std::numeric_limits::max(); + double theScale[2]; // scale used in bndSegsToMesh() // ------------------------------------------------------------------------------------- /*! @@ -298,7 +305,7 @@ namespace if ( _edge ) // pass branch to an opposite BndSeg { size_t oppSegIndex = SMESH_MAT2d::Branch::getBndSegment( _edge->twin() ); - if ( oppSegIndex < bndSegs.size() /*&& bndSegs[ oppSegIndex ]._branchID == theNoBrachID*/ ) + if ( oppSegIndex < bndSegs.size() && bndSegs[ oppSegIndex ]._branchID == theNoBrachID ) bndSegs[ oppSegIndex ]._branchID = -branchID; } } @@ -349,7 +356,64 @@ namespace //================================================================================ /*! - * \brief Computes length of of TVDEdge + * \brief debug: to visually check found MA edges + */ + //================================================================================ + + void bndSegsToMesh( const vector< BndSeg >& bndSegs ) + { +#ifdef _MYDEBUG_ + if ( !getenv("bndSegsToMesh")) return; + map< const TVDVertex *, int > v2Node; + map< const TVDVertex *, int >::iterator v2n; + set< const TVDEdge* > addedEdges; + + const char* fileName = "/misc/dn25/salome/eap/salome/misc/Code/C++/MAedges.py"; + SMESH_File file(fileName, false ); + file.remove(); + file.openForWriting(); + SMESH_Comment text; + text << "import salome, SMESH\n"; + text << "salome.salome_init()\n"; + text << "from salome.smesh import smeshBuilder\n"; + text << "smesh = smeshBuilder.New(salome.myStudy)\n"; + text << "m=smesh.Mesh()\n"; + for ( size_t i = 0; i < bndSegs.size(); ++i ) + { + if ( !bndSegs[i]._edge ) + text << "# " << i << " NULL edge"; + else if ( !bndSegs[i]._edge->vertex0() || + !bndSegs[i]._edge->vertex1() ) + text << "# " << i << " INFINITE edge"; + else if ( addedEdges.insert( bndSegs[i]._edge ).second && + addedEdges.insert( bndSegs[i]._edge->twin() ).second ) + { + v2n = v2Node.insert( make_pair( bndSegs[i]._edge->vertex0(), v2Node.size() + 1 )).first; + int n0 = v2n->second; + if ( n0 == v2Node.size() ) + text << "n" << n0 << " = m.AddNode( " + << bndSegs[i]._edge->vertex0()->x() / theScale[0] << ", " + << bndSegs[i]._edge->vertex0()->y() / theScale[1] << ", 0 )\n"; + + v2n = v2Node.insert( make_pair( bndSegs[i]._edge->vertex1(), v2Node.size() + 1 )).first; + int n1 = v2n->second; + if ( n1 == v2Node.size() ) + text << "n" << n1 << " = m.AddNode( " + << bndSegs[i]._edge->vertex1()->x() / theScale[0] << ", " + << bndSegs[i]._edge->vertex1()->y() / theScale[1] << ", 0 )\n"; + + text << "e" << i << " = m.AddEdge([ n" << n0 << ", n" << n1 << " ])\n"; + } + } + text << "\n"; + file.write( text.c_str(), text.size() ); + cout << "Write " << fileName << endl; +#endif + } + + //================================================================================ + /*! + * \brief Computes length of a TVDEdge */ //================================================================================ @@ -459,24 +523,25 @@ namespace gp_Pnt p, pPrev; if ( !c3d.IsNull() ) pPrev = c3d->Value( f ); - for ( int i = 2; i <= discret.NbPoints(); i++ ) // skip the 1st point - { - double u = discret.Parameter(i); - if ( !c3d.IsNull() ) + if ( discret.NbPoints() > 2 ) + for ( int i = 2; i <= discret.NbPoints(); i++ ) // skip the 1st point { - p = c3d->Value( u ); - int nbDiv = int( p.Distance( pPrev ) / minSegLen / theDiscrCoef ); - double dU = ( u - points.back()._u ) / nbDiv; - for ( int iD = 1; iD < nbDiv; ++iD ) + double u = discret.Parameter(i); + if ( !c3d.IsNull() ) { - double uD = points.back()._u + dU; - points.push_back( UVU( c2d->Value( uD ), uD )); + p = c3d->Value( u ); + int nbDiv = int( p.Distance( pPrev ) / minSegLen / theDiscrCoef ); + double dU = ( u - points.back()._u ) / nbDiv; + for ( int iD = 1; iD < nbDiv; ++iD ) + { + double uD = points.back()._u + dU; + points.push_back( UVU( c2d->Value( uD ), uD )); + } + pPrev = p; } - pPrev = p; + points.push_back( UVU( c2d->Value( u ), u )); + uvBox.Add( points.back()._uv ); } - points.push_back( UVU( c2d->Value( u ), u )); - uvBox.Add( points.back()._uv ); - } // if ( !c3d.IsNull() ) // { // vector params; @@ -592,9 +657,52 @@ namespace } } } + // debug + theScale[0] = scale[0]; + theScale[1] = scale[1]; + return true; } + //================================================================================ + /*! + * \brief Update a branch joined to another one + */ + //================================================================================ + + void updateJoinedBranch( vector< const TVDEdge* > & branchEdges, + const size_t newID, + vector< BndSeg > & bndSegs, + const bool reverse) + { + if ( reverse ) + { + for ( size_t i = 0; i < branchEdges.size(); ++i ) + { + size_t seg1 = SMESH_MAT2d::Branch::getBndSegment( branchEdges[i] ); + size_t seg2 = SMESH_MAT2d::Branch::getBndSegment( branchEdges[i]->twin() ); + bndSegs[ seg1 ]._branchID /= bndSegs[ seg1 ].branchID(); + bndSegs[ seg2 ]._branchID /= bndSegs[ seg2 ].branchID(); + bndSegs[ seg1 ]._branchID *= -newID; + bndSegs[ seg2 ]._branchID *= -newID; + branchEdges[i] = branchEdges[i]->twin(); + } + std::reverse( branchEdges.begin(), branchEdges.end() ); + } + else + { + for ( size_t i = 0; i < branchEdges.size(); ++i ) + { + size_t seg1 = SMESH_MAT2d::Branch::getBndSegment( branchEdges[i] ); + size_t seg2 = SMESH_MAT2d::Branch::getBndSegment( branchEdges[i]->twin() ); + bndSegs[ seg1 ]._branchID /= bndSegs[ seg1 ].branchID(); + bndSegs[ seg2 ]._branchID /= bndSegs[ seg2 ].branchID(); + bndSegs[ seg1 ]._branchID *= newID; + bndSegs[ seg2 ]._branchID *= newID; + } + } + } + //================================================================================ /*! * \brief Create MA branches and FACE boundary data @@ -608,6 +716,7 @@ namespace //================================================================================ void makeMA( const TVD& vd, + const bool ignoreCorners, vector< InPoint >& inPoints, vector< InSegment > & inSegments, vector< SMESH_MAT2d::Branch >& branch, @@ -688,9 +797,12 @@ namespace continue; inPntChecked[ pInd ] = true; - const TVDEdge* edge = // a TVDEdge passing through an end of inSeg - is2nd ? maEdges.front()->prev() : maEdges.back()->next(); - while ( true ) + const TVDEdge* maE = is2nd ? maEdges.front() : maEdges.back(); + if ( inPnt == ( is2nd ? maE->vertex0() : maE->vertex1() )) + continue; + const TVDEdge* edge = // a secondary TVDEdge connecting inPnt and maE + is2nd ? maE->prev() : maE->next(); + while ( inSeg.isConnected( edge )) { if ( edge->is_primary() ) break; // this should not happen const TVDEdge* edge2 = edge->twin(); // we are in a neighbor cell, add MA edges to inPnt @@ -732,7 +844,7 @@ namespace inPoints[0]._edges.clear(); } - // Divide InSegment's into BndSeg's + // Divide InSegment's into BndSeg's (so that each BndSeg corresponds to one MA edge) vector< BndSeg > bndSegs; bndSegs.reserve( inSegments.size() * 3 ); @@ -750,25 +862,26 @@ namespace inPntChecked[ ip0 ] = false; // segments of InSegment's - size_t nbMaEdges = inSeg._edges.size(); + const size_t nbMaEdges = inSeg._edges.size(); switch ( nbMaEdges ) { case 0: // "around" circle center bndSegs.push_back( BndSeg( &inSeg, 0, inSeg._p1->_param )); break; case 1: bndSegs.push_back( BndSeg( &inSeg, inSeg._edges.back(), inSeg._p1->_param )); break; default: - vector< double > len; - len.push_back(0); - for ( e = inSeg._edges.rbegin(); e != inSeg._edges.rend(); ++e ) - len.push_back( len.back() + length( *e )); - + gp_XY inSegDir( inSeg._p1->_a - inSeg._p0->_a, + inSeg._p1->_b - inSeg._p0->_b ); + const double inSegLen2 = inSegDir.SquareModulus(); e = inSeg._edges.rbegin(); - for ( size_t l = 1; l < len.size(); ++e, ++l ) + for ( size_t iE = 1; iE < nbMaEdges; ++e, ++iE ) { - double dl = len[l] / len.back(); - double u = dl * inSeg._p1->_param + ( 1. - dl ) * inSeg._p0->_param; + gp_XY toMA( (*e)->vertex0()->x() - inSeg._p0->_a, + (*e)->vertex0()->y() - inSeg._p0->_b ); + double r = toMA * inSegDir / inSegLen2; + double u = r * inSeg._p1->_param + ( 1. - r ) * inSeg._p0->_param; bndSegs.push_back( BndSeg( &inSeg, *e, u )); } + bndSegs.push_back( BndSeg( &inSeg, *e, inSeg._p1->_param )); } // segments around 2nd concave point size_t ip1 = inSeg._p1->index( inPoints ); @@ -783,6 +896,8 @@ namespace for ( size_t i = 0; i < bndSegs.size(); ++i ) bndSegs[i].setIndexToEdge( i ); + bndSegsToMesh( bndSegs ); // debug: visually check found MA edges + // Find TVDEdge's of Branches and associate them with bndSegs @@ -797,7 +912,7 @@ namespace size_t i1st = 0; while ( i1st < bndSegs.size() && !bndSegs[i1st].hasOppositeEdge( noEdgeID )) ++i1st; - bndSegs[i1st].setBranch( branchID, bndSegs ); // set to i-th and the opposite bndSeg + bndSegs[i1st].setBranch( branchID, bndSegs ); // set to the i-th and to the opposite bndSeg branchEdges[ branchID ].push_back( bndSegs[i1st]._edge ); for ( size_t i = i1st+1; i < bndSegs.size(); ++i ) @@ -824,7 +939,7 @@ namespace endType.insert( make_pair( bndSegs[i]._edge->vertex1(), SMESH_MAT2d::BE_BRANCH_POINT )); } - bndSegs[i].setBranch( branchID, bndSegs ); // set to i-th and the opposite bndSeg + bndSegs[i].setBranch( branchID, bndSegs ); // set to i-th and to the opposite bndSeg if ( bndSegs[i].hasOppositeEdge( noEdgeID )) branchEdges[ bndSegs[i].branchID() ].push_back( bndSegs[i]._edge ); } @@ -858,17 +973,92 @@ namespace br2.clear(); } + // remove branches ending at BE_ON_VERTEX + + vector isBranchRemoved( branchEdges.size(), false ); + + if ( ignoreCorners && branchEdges.size() > 2 && !branchEdges[2].empty() ) + { + // find branches to remove + map< const TVDVertex*, SMESH_MAT2d::BranchEndType >::iterator v2et; + for ( size_t iB = 1; iB < branchEdges.size(); ++iB ) + { + if ( branchEdges[iB].empty() ) + continue; + const TVDVertex* v0 = branchEdges[iB][0]->vertex1(); + const TVDVertex* v1 = branchEdges[iB].back()->vertex0(); + v2et = endType.find( v0 ); + if ( v2et != endType.end() && v2et->second == SMESH_MAT2d::BE_ON_VERTEX ) + isBranchRemoved[ iB ] = true; + v2et = endType.find( v1 ); + if ( v2et != endType.end() && v2et->second == SMESH_MAT2d::BE_ON_VERTEX ) + isBranchRemoved[ iB ] = true; + } + // try to join not removed branches into one + for ( size_t iB = 1; iB < branchEdges.size(); ++iB ) + { + if ( branchEdges[iB].empty() || isBranchRemoved[iB] ) + continue; + const TVDVertex* v0 = branchEdges[iB][0]->vertex1(); + const TVDVertex* v1 = branchEdges[iB].back()->vertex0(); + v2et = endType.find( v0 ); + if ( v2et == endType.end() || v2et->second != SMESH_MAT2d::BE_BRANCH_POINT ) + v0 = 0; + v2et = endType.find( v1 ); + if ( v2et == endType.end() || v2et->second != SMESH_MAT2d::BE_BRANCH_POINT ) + v1 = 0; + if ( !v0 && !v1 ) + continue; + + size_t iBrToJoin = 0; + for ( size_t iB2 = 1; iB2 < branchEdges.size(); ++iB2 ) + { + if ( branchEdges[iB2].empty() || isBranchRemoved[iB2] || iB == iB2 ) + continue; + const TVDVertex* v02 = branchEdges[iB2][0]->vertex1(); + const TVDVertex* v12 = branchEdges[iB2].back()->vertex0(); + if ( v0 == v02 || v0 == v12 || v1 == v02 || v1 == v12 ) + { + if ( iBrToJoin > 0 ) + { + iBrToJoin = 0; + break; // more than 2 not removed branches meat at a TVDVertex + } + iBrToJoin = iB2; + } + } + if ( iBrToJoin > 0 ) + { + vector& branch = branchEdges[ iBrToJoin ]; + const TVDVertex* v02 = branch[0]->vertex1(); + const TVDVertex* v12 = branch.back()->vertex0(); + updateJoinedBranch( branch, iB, bndSegs, /*reverse=*/(v0 == v02 || v1 == v12 )); + if ( v0 == v02 || v0 == v12 ) + branchEdges[iB].insert( branchEdges[iB].begin(), branch.begin(), branch.end() ); + else + branchEdges[iB].insert( branchEdges[iB].end(), branch.begin(), branch.end() ); + branch.clear(); + } + } // loop on branchEdges + } // if ( ignoreCorners ) + // associate branchIDs and the input branch vector (arg) - vector< const SMESH_MAT2d::Branch* > branchByID( branchEdges.size() ); + vector< SMESH_MAT2d::Branch* > branchByID( branchEdges.size(), 0 ); int nbBranches = 0; for ( size_t i = 0; i < branchEdges.size(); ++i ) { nbBranches += ( !branchEdges[i].empty() ); } branch.resize( nbBranches ); - for ( size_t iBr = 0, brID = 0; brID < branchEdges.size(); ++brID ) + size_t iBr = 0; + for ( size_t brID = 1; brID < branchEdges.size(); ++brID ) // 1st - not removed { - if ( !branchEdges[ brID ].empty() ) + if ( !branchEdges[ brID ].empty() && !isBranchRemoved[ brID ]) + branchByID[ brID ] = & branch[ iBr++ ]; + } + for ( size_t brID = 1; brID < branchEdges.size(); ++brID ) // then - removed + { + if ( !branchEdges[ brID ].empty() && isBranchRemoved[ brID ]) branchByID[ brID ] = & branch[ iBr++ ]; } @@ -912,28 +1102,24 @@ namespace { edgeInd += dInd; - if ( edgeInd < 0 || - edgeInd >= (int) branchEdges[ brID ].size() || - branchEdges[ brID ][ edgeInd ] != bndSegs[ i ]._edge ) + if (( edgeInd < 0 || + edgeInd >= (int) branchEdges[ brID ].size() ) || + ( branchEdges[ brID ][ edgeInd ] != bndSegs[ i ]._edge && + branchEdges[ brID ][ edgeInd ]->twin() != bndSegs[ i ]._edge )) { - if ( bndSegs[ i ]._branchID < 0 && - branchEdges[ brID ].back() == bndSegs[ i ]._edge ) + if ( bndSegs[ i ]._branchID < 0 ) { - edgeInd = branchEdges[ brID ].size() - 1; dInd = -1; + for ( edgeInd = branchEdges[ brID ].size() - 1; edgeInd > 0; --edgeInd ) + if ( branchEdges[ brID ][ edgeInd ]->twin() == bndSegs[ i ]._edge ) + break; } - else if ( bndSegs[ i ]._branchID > 0 && - branchEdges[ brID ].front() == bndSegs[ i ]._edge ) + else // bndSegs[ i ]._branchID > 0 { - edgeInd = 0; dInd = +1; - } - else - { for ( edgeInd = 0; edgeInd < branchEdges[ brID ].size(); ++edgeInd ) if ( branchEdges[ brID ][ edgeInd ] == bndSegs[ i ]._edge ) break; - dInd = bndSegs[ i ]._branchID > 0 ? +1 : -1; } } } @@ -941,15 +1127,10 @@ namespace { // no MA edge, bndSeg corresponds to an end point of a branch if ( bndPoints._maEdges.empty() ) - { - // should not get here according to algo design edgeInd = 0; - } else - { edgeInd = branchEdges[ brID ].size(); - dInd = bndSegs[ i ]._branchID > 0 ? +1 : -1; - } + dInd = bndSegs[ i ]._branchID > 0 ? +1 : -1; } bndPoints._maEdges.push_back( make_pair( br, ( 1 + edgeInd ) * dInd )); @@ -958,19 +1139,40 @@ namespace iSeg = iSegEnd; - } // loop on all bndSegs + } // loop on all bndSegs to construct Boundary + // Initialize branches + // find a not removed branch + size_t iBrNorRemoved = 0; + for ( size_t brID = 1; brID < branchEdges.size(); ++brID ) + if ( !branchEdges[brID].empty() && !isBranchRemoved[brID] ) + { + iBrNorRemoved = brID; + break; + } // fill the branches with MA edges - for ( size_t iBr = 0, brID = 0; brID < branchEdges.size(); ++brID ) + for ( size_t brID = 1; brID < branchEdges.size(); ++brID ) if ( !branchEdges[brID].empty() ) { - branch[ iBr ].init( branchEdges[brID], & boundary, endType ); - iBr++; + branchByID[ brID ]->init( branchEdges[brID], & boundary, endType ); + } + // mark removed branches + for ( size_t brID = 1; brID < branchEdges.size(); ++brID ) + if ( isBranchRemoved[brID] && iBrNorRemoved > 0 ) + { + SMESH_MAT2d::Branch* branch = branchByID[ brID ]; + SMESH_MAT2d::Branch* mainBranch = branchByID[ iBrNorRemoved ]; + bool is1stBrPnt = ( branch->getEnd(0)->_type == SMESH_MAT2d::BE_BRANCH_POINT ); + const TVDVertex* branchVextex = + is1stBrPnt ? branch->getEnd(0)->_vertex : branch->getEnd(1)->_vertex; + SMESH_MAT2d::BranchPoint bp = mainBranch->getPoint( branchVextex ); + branch->setRemoved( bp ); } // set branches to branch ends for ( size_t i = 0; i < branch.size(); ++i ) - branch[i].setBranchesToEnds( branch ); + if ( !branch[i].isRemoved() ) + branch[i].setBranchesToEnds( branch ); // fill branchPnt arg map< const TVDVertex*, const SMESH_MAT2d::BranchEnd* > v2end; @@ -1013,13 +1215,30 @@ SMESH_MAT2d::MedialAxis::MedialAxis(const TopoDS_Face& face, if ( !makeInputData( face, edges, minSegLen, inPoints, inSegments, _scale )) return; - //inSegmentsToFile( inSegments ); + inSegmentsToFile( inSegments ); // build voronoi diagram construct_voronoi( inSegments.begin(), inSegments.end(), &_vd ); // make MA data - makeMA( _vd, inPoints, inSegments, _branch, _branchPnt, _boundary ); + makeMA( _vd, ignoreCorners, inPoints, inSegments, _branch, _branchPnt, _boundary ); + + // count valid branches + _nbBranches = _branch.size(); + for ( size_t i = 0; i < _branch.size(); ++i ) + if ( _branch[i].isRemoved() ) + --_nbBranches; +} + +//================================================================================ +/*! + * \brief Returns the i-th branch + */ +//================================================================================ + +const SMESH_MAT2d::Branch* SMESH_MAT2d::MedialAxis::getBranch(size_t i) const +{ + return i < _nbBranches ? &_branch[i] : 0; } //================================================================================ @@ -1028,16 +1247,16 @@ SMESH_MAT2d::MedialAxis::MedialAxis(const TopoDS_Face& face, */ //================================================================================ -void SMESH_MAT2d::MedialAxis::getPoints( const Branch& branch, +void SMESH_MAT2d::MedialAxis::getPoints( const Branch* branch, std::vector< gp_XY >& points) const { - branch.getPoints( points, _scale ); + branch->getPoints( points, _scale ); } //================================================================================ /*! * \brief Returns a BranchPoint corresponding to a given point on a geom EDGE - * \param [in] iGeomEdge - index of geom EDGE within a vector passed at construction + * \param [in] iEdge - index of geom EDGE within a vector passed at MA construction * \param [in] u - parameter of the point on EDGE curve * \param [out] p - the found BranchPoint * \return bool - is OK @@ -1052,7 +1271,7 @@ bool SMESH_MAT2d::Boundary::getBranchPoint( const std::size_t iEdge, return false; const BndPoints& points = _pointsPerEdge[ iEdge ]; - const bool edgeReverse = ( points._params[0] > points._params.back() ); + const bool edgeReverse = ( points._params[0] > points._params.back() ); if ( u < ( edgeReverse ? points._params.back() : points._params[0] )) u = edgeReverse ? points._params.back() : points._params[0]; @@ -1071,14 +1290,30 @@ bool SMESH_MAT2d::Boundary::getBranchPoint( const std::size_t iEdge, while ( points._params[i ] > u ) --i; while ( points._params[i+1] < u ) ++i; } + double edgeParam = ( u - points._params[i] ) / ( points._params[i+1] - points._params[i] ); + if ( !points._maEdges[ i ].second ) // no branch at the EDGE end, look for a closest branch + { + if ( i < points._maEdges.size() / 2 ) // near 1st point + { + while ( i < points._maEdges.size()-1 && !points._maEdges[ i ].second ) + ++i; + edgeParam = edgeReverse; + } + else // near last point + { + while ( i > 0 && !points._maEdges[ i ].second ) + --i; + edgeParam = !edgeReverse; + } + } const std::pair< const Branch*, int >& maE = points._maEdges[ i ]; bool maReverse = ( maE.second < 0 ); - p._branch = maE.first; - p._iEdge = maE.second - 1; // countered from 1 to store sign - p._edgeParam = maReverse ? ( 1. - edgeParam ) : edgeParam; + p._branch = maE.first; + p._iEdge = ( maReverse ? -maE.second : maE.second ) - 1; // countered from 1 to store sign + p._edgeParam = ( maE.first && maReverse ) ? ( 1. - edgeParam ) : edgeParam; return true; } @@ -1093,16 +1328,36 @@ bool SMESH_MAT2d::Boundary::getBranchPoint( const std::size_t iEdge, */ //================================================================================ -bool SMESH_MAT2d::Boundary::IsConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const +bool SMESH_MAT2d::Boundary::isConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const { if ( iEdge >= _pointsPerEdge.size() || _pointsPerEdge[iEdge]._params.empty() ) return false; const BndPoints& points = _pointsPerEdge[ iEdge ]; - if ( points._params.size() >= iSeg+1 ) + if ( points._params.size() <= iSeg+1 ) return false; - return Abs( points._params[ iEdge ] - points._params[ iEdge+1 ]) < 1e-20; + return Abs( points._params[ iSeg ] - points._params[ iSeg+1 ]) < 1e-20; +} + +//================================================================================ +/*! + * \brief Moves (changes _param) a given BoundaryPoint to a closest EDGE end + */ +//================================================================================ + +bool SMESH_MAT2d::Boundary::moveToClosestEdgeEnd( BoundaryPoint& bp ) const +{ + if ( bp._edgeIndex >= _pointsPerEdge.size() ) + return false; + + const BndPoints& points = _pointsPerEdge[ bp._edgeIndex ]; + if ( bp._param - points._params[0] < points._params.back() - bp._param ) + bp._param = points._params[0]; + else + bp._param = points._params.back(); + + return true; } //================================================================================ @@ -1179,7 +1434,7 @@ void SMESH_MAT2d::Branch::init( vector& maEdges, //================================================================================ /*! - * \brief fill BranchEnd::_branches of its ends + * \brief fills BranchEnd::_branches of its ends */ //================================================================================ @@ -1197,6 +1452,47 @@ void SMESH_MAT2d::Branch::setBranchesToEnds( const vector< Branch >& branches ) } } +//================================================================================ +/*! + * \brief returns a BranchPoint corresponding to a TVDVertex + */ +//================================================================================ + +SMESH_MAT2d::BranchPoint SMESH_MAT2d::Branch::getPoint( const TVDVertex* vertex ) const +{ + BranchPoint p; + p._branch = this; + p._iEdge = 0; + + if ( vertex == _maEdges[0]->vertex1() ) + { + p._edgeParam = 0; + } + else + { + for ( ; p._iEdge < _maEdges.size(); ++p._iEdge ) + if ( vertex == _maEdges[ p._iEdge ]->vertex0() ) + { + p._edgeParam = _params[ p._iEdge ]; + break; + } + } + return p; +} + +//================================================================================ +/*! + * \brief Sets a proxy point for a removed branch + * \param [in] proxyPoint - a point of another branch to which all points of this + * branch are mapped + */ +//================================================================================ + +void SMESH_MAT2d::Branch::setRemoved( const BranchPoint& proxyPoint ) +{ + _proxyPoint = proxyPoint; +} + //================================================================================ /*! * \brief Returns points on two EDGEs, equidistant from a given point of this Branch @@ -1213,7 +1509,7 @@ bool SMESH_MAT2d::Branch::getBoundaryPoints(double param, { if ( param < _params[0] || param > _params.back() ) return false; - + // look for an index of a MA edge by param double ip = param * _params.size(); size_t i = size_t( Min( int( _maEdges.size()-1), int( ip ))); @@ -1242,8 +1538,13 @@ bool SMESH_MAT2d::Branch::getBoundaryPoints(std::size_t iMAEdge, BoundaryPoint& bp1, BoundaryPoint& bp2 ) const { + if ( isRemoved() ) + return _proxyPoint._branch->getBoundaryPoints( _proxyPoint, bp1, bp2 ); + if ( iMAEdge > _maEdges.size() ) return false; + if ( iMAEdge == _maEdges.size() ) + iMAEdge = _maEdges.size() - 1; size_t iGeom1 = getGeomEdge( _maEdges[ iMAEdge ] ); size_t iGeom2 = getGeomEdge( _maEdges[ iMAEdge ]->twin() ); @@ -1275,8 +1576,16 @@ bool SMESH_MAT2d::Branch::getBoundaryPoints(const BranchPoint& p, bool SMESH_MAT2d::Branch::getParameter(const BranchPoint & p, double & u ) const { + if ( this != p._branch && p._branch ) + return p._branch->getParameter( p, u ); + + if ( isRemoved() ) + return _proxyPoint._branch->getParameter( _proxyPoint, u ); + if ( p._iEdge > _params.size()-1 ) return false; + if ( p._iEdge == _params.size()-1 ) + return u = 1.; u = ( _params[ p._iEdge ] * ( 1 - p._edgeParam ) + _params[ p._iEdge+1 ] * p._edgeParam ); @@ -1366,8 +1675,8 @@ bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >& size_t iSeg1 = getBndSegment( maEdges[ i-1 ] ); size_t iSeg2 = getBndSegment( maEdges[ i ] ); - bool isConcaPrev = _boundary->IsConcaveSegment( edgeIDs1.back(), iSeg1 ); - bool isConcaNext = _boundary->IsConcaveSegment( ie1, iSeg2 ); + bool isConcaPrev = _boundary->isConcaveSegment( edgeIDs1.back(), iSeg1 ); + bool isConcaNext = _boundary->isConcaveSegment( ie1, iSeg2 ); if ( !isConcaNext && !isConcaPrev ) return false; @@ -1381,7 +1690,7 @@ bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >& while ( iNext < maEdges.size() ) { iSeg2 = getBndSegment( maEdges[ iNext ] ); - if ( _boundary->IsConcaveSegment( ie1, iSeg2 )) + if ( _boundary->isConcaveSegment( ie1, iSeg2 )) ++iNext; else break; @@ -1403,7 +1712,7 @@ bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >& } if ( vertexFound ) { - i = --iNext; + iPrev = i = --iNext; // not to add a BP in the moddle isConcaveV = true; } } @@ -1413,7 +1722,7 @@ bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >& while ( iPrev-1 >= 0 ) { iSeg1 = getBndSegment( maEdges[ iPrev-1 ] ); - if ( _boundary->IsConcaveSegment( edgeIDs1.back(), iSeg1 )) + if ( _boundary->isConcaveSegment( edgeIDs1.back(), iSeg1 )) --iPrev; else break; @@ -1423,7 +1732,7 @@ bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >& if ( iPrev < i-1 || iNext > i ) { // no VERTEX on the opposite EDGE, put the Branch Point in the middle - double par1 = _params[ iPrev ], par2 = _params[ iNext ]; + double par1 = _params[ iPrev+1 ], par2 = _params[ iNext ]; double midPar = 0.5 * ( par1 + par2 ); divisionPnt._iEdge = iPrev; while ( _params[ divisionPnt._iEdge + 1 ] < midPar ) diff --git a/src/SMESHUtils/SMESH_MAT2d.hxx b/src/SMESHUtils/SMESH_MAT2d.hxx index 2b60605bc..2ba0066c5 100644 --- a/src/SMESHUtils/SMESH_MAT2d.hxx +++ b/src/SMESHUtils/SMESH_MAT2d.hxx @@ -88,6 +88,7 @@ namespace SMESH_MAT2d /*! * \brief Branch is a set of MA edges enclosed between branch points and/or MA ends. * It's main feature is to return two BoundaryPoint's per a point on it. + * Points on a Branch are defined by [0,1] parameter */ class SMESHUtils_EXPORT Branch { @@ -114,15 +115,20 @@ namespace SMESH_MAT2d std::vector< std::size_t >& edgeIDs2, std::vector< BranchPoint >& divPoints) const; - // construction + bool isRemoved() const { return _proxyPoint._branch; } + + public: // internal: construction + void init( std::vector& maEdges, const Boundary* boundary, std::map< const TVDVertex*, BranchEndType > endType); void setBranchesToEnds( const std::vector< Branch >& branches); + BranchPoint getPoint( const TVDVertex* vertex ) const; + void setRemoved( const BranchPoint& proxyPoint ); - static void setGeomEdge( std::size_t geomIndex, const TVDEdge* maEdge ); - static std::size_t getGeomEdge( const TVDEdge* maEdge ); - static void setBndSegment( std::size_t segIndex, const TVDEdge* maEdge ); + static void setGeomEdge ( std::size_t geomIndex, const TVDEdge* maEdge ); + static std::size_t getGeomEdge ( const TVDEdge* maEdge ); + static void setBndSegment( std::size_t segIndex, const TVDEdge* maEdge ); static std::size_t getBndSegment( const TVDEdge* maEdge ); private: @@ -142,6 +148,7 @@ namespace SMESH_MAT2d const Boundary* _boundary; // face boundary BranchEnd _endPoint1; BranchEnd _endPoint2; + BranchPoint _proxyPoint; }; //------------------------------------------------------------------------------------- @@ -173,7 +180,9 @@ namespace SMESH_MAT2d bool getBranchPoint( const std::size_t iEdge, double u, BranchPoint& p ) const; - bool IsConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const; + bool isConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const; + + bool moveToClosestEdgeEnd( BoundaryPoint& bp ) const; private: std::vector< BndPoints > _pointsPerEdge; @@ -201,11 +210,12 @@ namespace SMESH_MAT2d const std::vector< TopoDS_Edge >& edges, const double minSegLen, const bool ignoreCorners = false ); - const Boundary& getBoundary() const { return _boundary; } - const std::vector< Branch >& getBranches() const { return _branch; } + std::size_t nbBranches() const { return _nbBranches; } + const Branch* getBranch(size_t i) const; const std::vector< const BranchEnd* >& getBranchPoints() const { return _branchPnt; } + const Boundary& getBoundary() const { return _boundary; } - void getPoints( const Branch& branch, std::vector< gp_XY >& points) const; + void getPoints( const Branch* branch, std::vector< gp_XY >& points) const; Adaptor3d_Curve* make3DCurve(const Branch& branch) const; private: @@ -214,6 +224,7 @@ namespace SMESH_MAT2d TopoDS_Face _face; TVD _vd; std::vector< Branch > _branch; + std::size_t _nbBranches; // removed branches ignored std::vector< const BranchEnd* > _branchPnt; Boundary _boundary; double _scale[2]; diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx index a6d372d5f..665a84efa 100644 --- a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx @@ -542,11 +542,11 @@ namespace TopoDS_Edge makeEdgeFromMA( SMESH_MesherHelper& theHelper, const SMESH_MAT2d::MedialAxis& theMA ) { - if ( theMA.getBranches().size() != 1 ) + if ( theMA.nbBranches() != 1 ) return TopoDS_Edge(); vector< gp_XY > uv; - theMA.getPoints( theMA.getBranches()[0], uv ); + theMA.getPoints( theMA.getBranch(0), uv ); if ( uv.size() < 2 ) return TopoDS_Edge(); @@ -775,7 +775,7 @@ namespace double uMA; SMESH_MAT2d::BoundaryPoint bp[2]; - const SMESH_MAT2d::Branch& branch = theMA.getBranches()[0]; + const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0); for ( size_t i = 0; i < theDivPoints.size(); ++i ) { @@ -830,7 +830,7 @@ namespace const vector& theSinuEdges, const size_t theSinuSide0Size) { - if ( theMA.getBranches().size() != 1 ) + if ( theMA.nbBranches() != 1 ) return false; // normalize theMAParams @@ -858,7 +858,7 @@ namespace // hasComputed = true; } - const SMESH_MAT2d::Branch& branch = theMA.getBranches()[0]; + const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0); SMESH_MAT2d::BoundaryPoint bp[2]; vector< std::size_t > edgeIDs1, edgeIDs2; @@ -1248,4 +1248,3 @@ bool StdMeshers_QuadFromMedialAxis_1D2D::Evaluate(SMESH_Mesh & theMesh, { return StdMeshers_Quadrangle_2D::Evaluate(theMesh,theShape,theResMap); } - From 0b0c9fc0969225849334dd98f45ef9278f0ec7e3 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 1 Dec 2015 17:51:41 +0300 Subject: [PATCH 05/48] Increment version: 7.7.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a92546766..08f747133 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7) SET(${PROJECT_NAME_UC}_MINOR_VERSION 7) -SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) +SET(${PROJECT_NAME_UC}_PATCH_VERSION 1) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) SET(${PROJECT_NAME_UC}_VERSION_DEV 0) From 762641c5edac12dcbb64246bef97a34cf39e1f45 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 1 Feb 2016 15:25:53 +0100 Subject: [PATCH 06/48] merge V7_7_BR suite --- src/SMESHUtils/SMESH_MAT2d.cxx | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/SMESHUtils/SMESH_MAT2d.cxx b/src/SMESHUtils/SMESH_MAT2d.cxx index dc445146c..970d560e5 100644 --- a/src/SMESHUtils/SMESH_MAT2d.cxx +++ b/src/SMESHUtils/SMESH_MAT2d.cxx @@ -1890,27 +1890,6 @@ void SMESH_MAT2d::Branch::getOppositeGeomEdges( std::vector< std::size_t >& edge for ( size_t i = 0; i < _maEdges.size(); ++i ) twins[i] = _maEdges[i]->twin(); - // size_t lastConcaE1 = _boundary.nbEdges(); - // size_t lastConcaE2 = _boundary.nbEdges(); - - BranchPoint divisionPnt; - divisionPnt._branch = this; - - for ( size_t i = 0; i < _maEdges.size(); ++i ) - { - size_t ie1 = getGeomEdge( _maEdges[i] ); - size_t ie2 = getGeomEdge( _maEdges[i]->twin() ); - - if ( edgeIDs1.back() != ie1 || edgeIDs2.back() != ie2 ) - { - bool isConcaveV = false; - if ( edgeIDs1.back() != ie1 && edgeIDs2.back() == ie2 ) - { - isConcaveV = addDivPntForConcaVertex( edgeIDs1, edgeIDs2, divPoints, _maEdges, twins, i ); - } - if ( edgeIDs1.back() == ie1 && edgeIDs2.back() != ie2 ) - { - isConcaveV = addDivPntForConcaVertex( edgeIDs2, edgeIDs1, divPoints, twins, _maEdges, i ); BranchIterator maIter ( _maEdges, 0 ); BranchIterator twIter ( twins, 0 ); // size_t lastConcaE1 = _boundary.nbEdges(); From db1bdbcddcfce75757ac8b446feef6d78b2f2a17 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 11 Feb 2016 18:11:47 +0300 Subject: [PATCH 07/48] 53068: Create Mesh dialog box is frozen --- .../SMESH/input/selection_filter_library.doc | 32 ++++++++++++------- src/SMESHGUI/SMESHGUI_Hypotheses.cxx | 20 ++++++++---- src/StdMeshers/StdMeshers_NumberOfLayers.cxx | 2 +- .../StdMeshersGUI_StdHypothesisCreator.cxx | 12 +++++-- 4 files changed, 45 insertions(+), 21 deletions(-) diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.doc b/doc/salome/gui/SMESH/input/selection_filter_library.doc index 7189ccc43..c87d928e8 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.doc +++ b/doc/salome/gui/SMESH/input/selection_filter_library.doc @@ -5,8 +5,8 @@ \n Selection filter library allows creating and storing in files the filters that can be later reused for operations on meshes. You can access it from the Main Menu via Tools / Selection filter library. -It is also possible to save any filter by invoking the filter library -from \a Filter dialog launched from any mesh operation. +It is also possible to save/load a filter by invoking the filter library +from \ref filtering_elements "Filter dialog" launched from any mesh operation. \image html selectionfilterlibrary.png @@ -19,6 +19,7 @@ the current study. You can \b Add or \b Delete filters. filter. By default it is prefixed with the corresponding entity type. \anchor filtering_elements +

    Filter Dialog

    When we use filters during group creation or another operation (by clicking Set Filter button in the corresponding dialog), the @@ -66,15 +67,22 @@ created. You have to select the mesh and the button will be enabled. Some criteria are applicable to all Entity types:
    • Belong to Geom selects entities whose all nodes lie on the -shape defined by Threshold Value. If the threshold shape is a -sub-shape of the main shape of the mesh the algorithm works faster, if -this is any other shape the algorithm works slower. +shape defined by Threshold Value. +If the threshold shape is a sub-shape of the main shape of the mesh, +the filtering algorithm works faster because node-to-shape association +is used instead of measuring distance between nodes and the shape, and +\b Tolerance is not used. If the threshold shape is any other shape, +the algorithm works slower because distance between nodes and the +shape is measured and is compared with \b Tolerance.
    • Lying on Geom selects entities whose at least one node lies on the shape defined by the Threshold Value. -If the threshold shape is a sub-shape of the main shape of the mesh the -algorithm works faster, if this is any other -shape, the algorithm works slower. +If the threshold shape is a sub-shape of the main shape of the mesh, +the filtering algorithm works faster because node-to-shape association +is used instead of measuring distance between nodes and the shape, and +\b Tolerance is not used. If the threshold shape is any other shape, +the algorithm works slower because distance between nodes and the +shape is measured and is compared with \b Tolerance.
    • Belong to Mesh Group selects entities included into the mesh group defined by the Threshold Value. @@ -97,7 +105,7 @@ other parts. Threshold Value locating any element of the domain can be ei
    -Some criteria are applicable to all Entity types of dimension +Some criteria are applicable to entities of dimension more than zero, i.e. to \b Edges, \b Faces and \b Volumes:
    • Linear allows selection of Linear or Quadratic elements (if Unary is set to "Not") @@ -111,8 +119,8 @@ as a combination of geometry type and the number of nodes.
    -The following criteria are applicable to all Entity types -except for Volumes: +The following criteria are applicable to Entities of \b all types +except for \a Volumes:
    • Belong to Plane selects entities whose all nodes belong to a specified plane within a given Tolerance. @@ -222,7 +230,7 @@ diagonals with a value of length, which is more, less or equal
    -The following criteria allow selecting mesh Volumes: +The following criteria allow selecting mesh Volumes:
    • Aspect ratio 3D selects 3D mesh elements with an aspect ratio (see also an \ref aspect_ratio_3d_page "Aspect Ratio 3D quality control"), which is more, less or equal diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index 7d1495845..504607da5 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -41,6 +41,7 @@ #include #include #include +#include // Qt includes #include @@ -273,13 +274,20 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result ) bool res = result==QDialog::Accepted; if( res ) { - SUIT_OverrideCursor wc; - /*QString paramValues = */storeParams(); + try + { + SUIT_OverrideCursor wc; + storeParams(); // No longer needed since NoteBook appears and "Value" OB field shows names of variable -// if ( !paramValues.isEmpty() ) { -// if ( _PTR(SObject) SHyp = SMESH::FindSObject( myHypo )) -// SMESH::SetValue( SHyp, paramValues ); -// } + // QString paramValues = storeParams(); + // if ( !paramValues.isEmpty() ) { + // if ( _PTR(SObject) SHyp = SMESH::FindSObject( myHypo )) + // SMESH::SetValue( SHyp, paramValues ); + // } + } + catch ( const SALOME::SALOME_Exception& S_ex ) { + SalomeApp_Tools::QtCatchCorbaException( S_ex ); + } } changeWidgets().clear(); diff --git a/src/StdMeshers/StdMeshers_NumberOfLayers.cxx b/src/StdMeshers/StdMeshers_NumberOfLayers.cxx index f3fa3104c..0e245845d 100644 --- a/src/StdMeshers/StdMeshers_NumberOfLayers.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfLayers.cxx @@ -77,7 +77,7 @@ void StdMeshers_NumberOfLayers::SetNumberOfLayers(int numberOfLayers) { if ( _nbLayers != numberOfLayers ) { if ( numberOfLayers <= 0 ) - throw SALOME_Exception(LOCALIZED("numberOfLayers must be positive")); + throw SALOME_Exception(LOCALIZED("numberOfLayers must be more than zero")); _nbLayers = numberOfLayers; NotifySubMeshesHypothesisModification(); diff --git a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx index ea722142c..a9b778282 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx @@ -30,7 +30,6 @@ #include #include #include - #include #include @@ -47,8 +46,9 @@ #include // SALOME GUI includes -#include #include +#include +#include // IDL includes #include @@ -1383,6 +1383,14 @@ void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int) sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" ); } } + else if ( SalomeApp_IntSpinBox* sb = qobject_cast< SalomeApp_IntSpinBox* >( w )) + { + if ( hypType().startsWith( "NumberOfLayers" ) || + hypType().startsWith( "ViscousLayers" )) + { + sb->setMinimum( 1 ); + } + } } //================================================================================ From 7807a4244d9f114bca7123b743cebe837ffbf7bd Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 12 Feb 2016 19:16:28 +0300 Subject: [PATCH 08/48] 23236: EDF 12346 - Problem with Local Size --- src/PluginUtils/GeomSelectionTools.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/PluginUtils/GeomSelectionTools.cxx b/src/PluginUtils/GeomSelectionTools.cxx index 03151a640..9faf99ec3 100644 --- a/src/PluginUtils/GeomSelectionTools.cxx +++ b/src/PluginUtils/GeomSelectionTools.cxx @@ -28,17 +28,15 @@ #include #include -#include -#include -#include -#include #include +#include #include +#include +#include -#include -#include -#include #include +#include +#include #include "utilities.h" @@ -237,6 +235,12 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){ // MESSAGE("GEOM client is OK and GEOM engine is not null"); S = aClient->GetShape( _geomEngine, aShape ); ShapeType=S.ShapeType(); + if ( ShapeType == TopAbs_COMPOUND ) + { + TopoDS_Iterator it( S ); + if ( it.More() ) + ShapeType = it.Value().ShapeType(); + } } } } @@ -275,7 +279,6 @@ GeomAbs_SurfaceType GeomSelectionTools::getFaceInformation(TopoDS_Shape S) GeomAbs_SurfaceType surf_type=GeomAbs_OtherSurface ; if (!S.IsNull() && S.ShapeType()==TopAbs_FACE){ TopoDS_Face f=TopoDS::Face(S); - Handle(Geom_Surface) surf = BRep_Tool::Surface(f); BRepAdaptor_Surface surf_adap(f); /* Global Information */ From 330463b25243ae3f9339edb4d4009d403931bde1 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 12 Feb 2016 23:21:05 +0100 Subject: [PATCH 09/48] plugin dialog blocFissure general --- src/Tools/blocFissure/ihm/CMakeLists.txt | 1 + src/Tools/blocFissure/ihm/fissureGenerale.ui | 190 ++++++++--- .../blocFissure/ihm/fissureGenerale_plugin.py | 297 ++++++++++++++++++ src/Tools/smesh_plugins.py | 8 + 4 files changed, 451 insertions(+), 45 deletions(-) create mode 100644 src/Tools/blocFissure/ihm/fissureGenerale_plugin.py diff --git a/src/Tools/blocFissure/ihm/CMakeLists.txt b/src/Tools/blocFissure/ihm/CMakeLists.txt index 0ee274979..24e80f8ea 100644 --- a/src/Tools/blocFissure/ihm/CMakeLists.txt +++ b/src/Tools/blocFissure/ihm/CMakeLists.txt @@ -26,6 +26,7 @@ SET(plugin_SCRIPTS __init__.py fissureCoude_ihm.py fissureCoude_plugin.py + fissureGenerale_plugin.py dialogFissureCoude.dic ) diff --git a/src/Tools/blocFissure/ihm/fissureGenerale.ui b/src/Tools/blocFissure/ihm/fissureGenerale.ui index 3f1528ff0..3f2cf9c3d 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale.ui +++ b/src/Tools/blocFissure/ihm/fissureGenerale.ui @@ -7,7 +7,7 @@ 0 0 631 - 490 + 560 @@ -16,51 +16,13 @@ <html><head/><body><p>Insertion d'un maillage de fissure dans un maillage hexaédrique sain.</p><p>Le maillage sain est fourni sous forme de fichier Med.</p><p>La face de fissure est décrite par une géométrie dans un fichier brep.</p><p>La ou les arêtes de fond de fissure sont données par leurs index dans la face de fissure.</p><p>La procédure identfie des mailles saines à enlever et remailler, construit un maillage régulier rayonnant autour de la ligne de fond de fissure, reconstitue les faces externes en triangles, complète la zone à remailler en tétraèdres.</p></body></html> - - + + maillage sain et géometries de fissure - - - - - - <html><head/><body><p>sélection du fichier med du maillage sain (hexaèdres)</p></body></html> - - - maillage sain - - - - - - - <html><head/><body><p>fichier med du maillage sain (hexaèdres)</p></body></html> - - - - - - - <html><head/><body><p>sélection du fichier brep (géométrie) décrivant la face de fissure.</p></body></html> - - - face fissure - - - - - - - <html><head/><body><p>fichier brep (géométrie) décrivant la face de fissure.</p></body></html> - - - - - @@ -92,12 +54,50 @@ + + + + + + <html><head/><body><p>fichier med du maillage sain (hexaèdres)</p></body></html> + + + + + + + <html><head/><body><p>sélection du fichier brep (géométrie) décrivant la face de fissure.</p></body></html> + + + face fissure + + + + + + + <html><head/><body><p>fichier brep (géométrie) décrivant la face de fissure.</p></body></html> + + + + + + + <html><head/><body><p>sélection du fichier med du maillage sain (hexaèdres)</p></body></html> + + + maillage sain + + + + + - + @@ -119,6 +119,9 @@ <html><head/><body><p>La zone remaillée contiendra toutes les mailles du maillage sain à une distance de la face de fissure inférieure à cette valeur.</p></body></html> + + 5 + @@ -156,6 +159,9 @@ <html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html> + + 5 + 1000000.000000000000000 @@ -173,6 +179,9 @@ <html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html> + + 5 + 1000000.000000000000000 @@ -225,6 +234,9 @@ <html><head/><body><p>Pipe rayonnant construit sur le fond de fissure :</p><p>Rayon du pipe.</p></body></html> + + 5 + 1000000.000000000000000 @@ -242,6 +254,9 @@ <html><head/><body><p>Pipe rayonnant construit sur le fond de fissure :</p><p>Longueur des mailles le long de la ligne de fond de fissure.</p></body></html> + + 5 + 1000000.000000000000000 @@ -329,6 +344,9 @@ <html><head/><body><p>Faces externes de la zone à remailler.</p><p>Mailage en triangles : valeur cible des arêtes.</p></body></html> + + 5 + 1000000.000000000000000 @@ -368,7 +386,7 @@ - + Qt::Vertical @@ -381,8 +399,90 @@ - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 24 + + + + --- Calcul en cours --- + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + réinitialisation de tous les paramètres à leur valeur par défaut + + + Reset + + + + + + + réinitialisation de tous les paramètres à leur valeur de la précédente éxécution + + + Précédent + + + + + + + réinitialisation des paramètres à partir d'un fichier préalablement sauvegardé + + + Recharger + + + + + + + sauvegarde des paramètres dans un fichier à choisir + + + Sauver + + + diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py new file mode 100644 index 000000000..c0a208059 --- /dev/null +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -0,0 +1,297 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2006-2015 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# if you already have plugins defined in a salome_plugins.py file, add this file at the end. +# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py + +import sys, traceback +import math +from blocFissure import gmu +from blocFissure.gmu import initLog +#initLog.setDebug() +initLog.setVerbose() + +from blocFissure.gmu import geomsmesh +from blocFissure.gmu.casStandard import casStandard + +def fissureGeneraleDlg(context): + # get context study, studyId, salomeGui + study = context.study + studyId = context.studyId + sg = context.sg + + import os + #import subprocess + #import tempfile + from PyQt4 import QtCore + from PyQt4 import QtGui + from PyQt4.QtGui import QFileDialog + from PyQt4.QtGui import QMessageBox + from PyQt4.QtGui import QPalette + from PyQt4.QtGui import QColor + from fissureGenerale_ui import Ui_Dialog + + class fissureGeneraleDialog(QtGui.QDialog): + + def __init__(self): + QtGui.QDialog.__init__(self) + # Set up the user interface from Designer. + self.ui = Ui_Dialog() + self.ui.setupUi(self) + + self.blackPalette = self.ui.dsb_influence.palette() + self.redPalette = QPalette() + self.redPalette.setColor(QPalette.Text, QColor(255,0,0)) + self.NOK = False + + self.initDefaut() + self.initDialog(self.defaut) + self.ui.lb_calcul.hide() + + # Connect up the buttons. + self.connect(self.ui.pb_valPrec, QtCore.SIGNAL("clicked()"), + self.readValPrec) + self.connect(self.ui.pb_reset, QtCore.SIGNAL("clicked()"), + self.resetVal) + self.connect(self.ui.pb_recharger, QtCore.SIGNAL("clicked()"), + self.recharger) + self.connect(self.ui.pb_sauver, QtCore.SIGNAL("clicked()"), + self.sauver) + self.connect(self.ui.pb_maillage, QtCore.SIGNAL("clicked()"), + self.selectMaillage) + self.connect(self.ui.pb_facefiss, QtCore.SIGNAL("clicked()"), + self.selectFacefiss) + self.disconnect(self.ui.bb_OkCancel, QtCore.SIGNAL("accepted()"), self.accept) + self.connect(self.ui.bb_OkCancel, QtCore.SIGNAL("accepted()"), + self.execute) + + def initDefaut(self): + self.defaut = dict( + nomCas = 'angleCube', + maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med'), + brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), + edgeFissIds = [4], + lgInfluence = 20, + meshBrep = (5,10), + rayonPipe = 5, + lenSegPipe = 2.5, + nbSegRad = 5, + nbSegCercle = 32, + areteFaceFissure = 10) + + + def initDialog(self, dico): + self.ui.le_maillage.setText(dico['maillageSain']) + self.ui.le_facefiss.setText(dico['brepFaceFissure']) + self.ui.le_fondfiss.setText(str(dico['edgeFissIds'])) + self.ui.dsb_influence.setValue(dico['lgInfluence']) + self.ui.dsb_meshBrepMin.setValue(dico['meshBrep'][0]) + self.ui.dsb_meshBrepMax.setValue(dico['meshBrep'][1]) + self.ui.dsb_rayonPipe.setValue(dico['rayonPipe']) + self.ui.dsb_lenSegPipe.setValue(dico['lenSegPipe']) + self.ui.sb_couronnes.setValue(dico['nbSegRad']) + self.ui.sb_secteurs.setValue(dico['nbSegCercle']) + self.ui.dsb_areteFaceFissure.setValue(dico['areteFaceFissure']) + incomplet = self.testval(dico) + pass + + def testval(self, dico): + incomplet = False + if not os.path.lexists(dico['maillageSain']): + self.ui.le_maillage.setPalette(self.redPalette) + incomplet = True + else: + self.ui.le_maillage.setPalette(self.blackPalette) + if not os.path.lexists(dico['brepFaceFissure']): + self.ui.le_facefiss.setPalette(self.redPalette) + incomplet = True + else: + self.ui.le_facefiss.setPalette(self.blackPalette) + edgeFissIdsOK=True + try: + l = dico['edgeFissIds'] + for i in l: + if not isinstance(i, int): + print"not isinstance(i, int)" + incomplet = True + edgeFissIdsOK=False + break + except: + print "except eval" + incomplet = True + edgeFissIdsOK=False + if edgeFissIdsOK: + self.ui.le_fondfiss.setPalette(self.blackPalette) + else: + self.ui.le_fondfiss.setPalette(self.redPalette) + if dico['meshBrep'][0] == 0: + self.ui.dsb_meshBrepMin.setPalette(self.redPalette) + incomplet = True + else: + self.ui.dsb_meshBrepMin.setPalette(self.blackPalette) + if dico['meshBrep'][1] == 0: + self.ui.dsb_meshBrepMax.setPalette(self.redPalette) + incomplet = True + else: + self.ui.dsb_meshBrepMax.setPalette(self.blackPalette) + if dico['rayonPipe'] == 0: + self.ui.dsb_rayonPipe.setPalette(self.redPalette) + incomplet = True + else: + self.ui.dsb_rayonPipe.setPalette(self.blackPalette) + if dico['lenSegPipe'] == 0: + self.ui.dsb_lenSegPipe.setPalette(self.redPalette) + incomplet = True + else: + self.ui.dsb_lenSegPipe.setPalette(self.blackPalette) + if dico['areteFaceFissure'] == 0: + self.ui.dsb_areteFaceFissure.setPalette(self.redPalette) + incomplet = True + else: + self.ui.dsb_areteFaceFissure.setPalette(self.blackPalette) + + print "incomplet: ", incomplet + return incomplet + + def fileDefault(self): + filedef = os.path.expanduser("~/.config/salome/dialogFissureGenerale.dic") + print filedef + return filedef + + def writeDefault(self, dico): + filedef = self.fileDefault() + f = open(filedef, 'w') + f.write(str(dico)) + f.close() + + def readValPrec(self): + filedef = self.fileDefault() + if os.path.exists(filedef): + f = open(filedef, 'r') + txt = f.read() + dico = eval(txt) + print dico + self.initDialog(dico) + + def resetVal(self): + #self.initDefaut() + self.initDialog(self.defaut) + + def sauver(self): + print "sauver" + fileDiag = QFileDialog(self) + fileDiag.setFileMode(QFileDialog.AnyFile) + fileDiag.setNameFilter("Parametres *.dic (*.dic)") + fileDiag.setViewMode(QFileDialog.List) + if fileDiag.exec_() : + fileNames = fileDiag.selectedFiles() + filedef = fileNames[0] + dico = self.creeDico() + f = open(filedef, 'w') + f.write(str(dico)) + f.close() + + def recharger(self): + print "recharger" + fileDiag = QFileDialog(self) + fileDiag.setFileMode(QFileDialog.ExistingFile) + fileDiag.setNameFilter("Parametres *.dic (*.dic)") + fileDiag.setViewMode(QFileDialog.Detail) + if fileDiag.exec_() : + fileNames = fileDiag.selectedFiles() + filedef = fileNames[0] + print filedef + if os.path.exists(filedef): + f = open(filedef, 'r') + txt = f.read() + dico = eval(txt) + print dico + self.initDialog(dico) + + def selectMaillage(self): + fileDiag = QFileDialog(self) + fileDiag.setFileMode(QFileDialog.ExistingFile) + fileDiag.setNameFilter("Maillage *.med (*.med)") + fileDiag.setViewMode(QFileDialog.Detail) + if fileDiag.exec_() : + fileNames = fileDiag.selectedFiles() + filedef = fileNames[0] + print filedef + self.ui.le_maillage.setText(filedef) + + def selectFacefiss(self): + fileDiag = QFileDialog(self) + fileDiag.setFileMode(QFileDialog.ExistingFile) + fileDiag.setNameFilter("Face fissure *.brep (*.brep)") + fileDiag.setViewMode(QFileDialog.Detail) + if fileDiag.exec_() : + fileNames = fileDiag.selectedFiles() + filedef = fileNames[0] + print filedef + self.ui.le_facefiss.setText(filedef) + + def creeDico(self): + dico = dict( + maillageSain = str(self.ui.le_maillage.text()), + brepFaceFissure = str(self.ui.le_facefiss.text()), + edgeFissIds = eval(str(self.ui.le_fondfiss.text())), + lgInfluence = self.ui.dsb_influence.value(), + meshBrep = [self.ui.dsb_meshBrepMin.value(),self.ui.dsb_meshBrepMax.value()], + rayonPipe = self.ui.dsb_rayonPipe.value(), + lenSegPipe = self.ui.dsb_lenSegPipe.value(), + nbSegRad = self.ui.sb_couronnes.value(), + nbSegCercle = self.ui.sb_secteurs.value(), + areteFaceFissure = self.ui.dsb_areteFaceFissure.value() + ) + print dico + return dico + + def checkValues(self): + return self.NOK + + def execute(self): + dico = self.creeDico() + NOK = self.testval(dico) + if not(NOK): + self.writeDefault(dico) + self.ui.lb_calcul.show() + execInstance = casStandard(dico) + self.NOK = NOK + self.accept() + + pass + +# ---------------------------------------------------------------------------- + + window = fissureGeneraleDialog() + retry = True + while(retry): + retry = False + window.exec_() + result = window.result() + if result: + # dialog accepted + print "dialog accepted, check" + retry = window.checkValues() + else: + print "dialog rejected, exit" + pass + diff --git a/src/Tools/smesh_plugins.py b/src/Tools/smesh_plugins.py index c82bb172d..330f4482d 100644 --- a/src/Tools/smesh_plugins.py +++ b/src/Tools/smesh_plugins.py @@ -66,6 +66,14 @@ try: except: salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable') pass +try: + from blocFissure.ihm.fissureGenerale_plugin import fissureGeneraleDlg + salome_pluginsmanager.AddFunction('Add a crack in a mesh', + 'Insert a crack in an hexahedral mesh with blocFissure tool', + fissureGeneraleDlg) +except: + salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable') + pass # ZCracks plugin requires the module EFICAS to be installed # thus it is first tested if this module is available before From 20248b6e76a67595f7f449a71ebbf18c13429389 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 15 Feb 2016 15:08:20 +0300 Subject: [PATCH 10/48] 23237: EDF 12367 - SIGSEGV with Remove group (SMESH_Gen_i_1.cxx) IPAL53059: Not all solids are highlighted by magenta (SMESHGUI_ComputeDlg.cxx) + remove "using namespace std" from headers --- src/Controls/SMESH_Controls.cxx | 56 +++++---- src/DriverGMF/DriverGMF_Write.cxx | 8 +- src/DriverMED/DriverMED_W_Field.cxx | 10 +- src/SMDS/SMDS_Mesh.hxx | 2 +- src/SMDS/SMDS_MeshInfo.hxx | 1 - src/SMDS/SMDS_VtkVolume.cxx | 4 +- src/SMESH/SMESH_Algo.hxx | 2 +- src/SMESH/SMESH_MeshEditor.hxx | 8 +- src/SMESH/SMESH_ProxyMesh.cxx | 26 ++-- src/SMESHClient/SMESH_Client.cxx | 3 +- .../SMESHGUI_AddQuadraticElementDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 115 +++++++++++------- src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx | 2 +- src/SMESHUtils/SMESH_Comment.hxx | 18 ++- src/SMESHUtils/SMESH_FreeBorders.cxx | 8 +- src/SMESH_I/SMESH_DumpPython.cxx | 2 +- src/SMESH_I/SMESH_Filter_i.cxx | 2 +- src/SMESH_I/SMESH_Gen_i.hxx | 32 ++--- src/SMESH_I/SMESH_Gen_i_1.cxx | 27 ++-- src/SMESH_I/SMESH_Group_i.cxx | 12 +- src/SMESH_I/SMESH_Measurements_i.cxx | 12 +- src/SMESH_I/SMESH_MeshEditor_i.cxx | 18 +-- src/SMESH_I/SMESH_MeshEditor_i.hxx | 3 +- src/SMESH_I/SMESH_Pattern_i.cxx | 2 + src/SMESH_I/SMESH_PreMeshInfo.cxx | 55 +++++---- .../StdMeshers_CompositeHexa_3D.cxx | 1 + .../StdMeshers_CompositeHexa_3D.hxx | 18 +-- src/StdMeshers/StdMeshers_FaceSide.cxx | 22 ++-- src/StdMeshers/StdMeshers_Geometric1D.cxx | 2 +- src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx | 2 + src/StdMeshers/StdMeshers_Prism_3D.hxx | 2 +- src/StdMeshers/StdMeshers_Projection_3D.cxx | 1 + .../StdMeshers_QuadFromMedialAxis_1D2D.cxx | 2 + src/StdMeshers/StdMeshers_Quadrangle_2D.hxx | 2 +- .../StdMeshers_SegmentAroundVertex_0D.cxx | 17 +-- .../StdMeshers_CartesianParameters3D_i.cxx | 12 +- src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx | 2 +- .../StdMeshers_Reversible1D_i.cxx | 2 +- 38 files changed, 282 insertions(+), 235 deletions(-) diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 0623399e9..bc79e1fc7 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -175,7 +175,7 @@ namespace { n += q2 ^ q3; } double len = n.Modulus(); - bool zeroLen = ( len <= numeric_limits::min()); + bool zeroLen = ( len <= std::numeric_limits::min()); if ( !zeroLen ) n /= len; @@ -312,12 +312,12 @@ double NumericalFunctor::Round( const double & aVal ) */ //================================================================================ -void NumericalFunctor::GetHistogram(int nbIntervals, - std::vector& nbEvents, - std::vector& funValues, - const vector& elements, - const double* minmax, - const bool isLogarithmic) +void NumericalFunctor::GetHistogram(int nbIntervals, + std::vector& nbEvents, + std::vector& funValues, + const std::vector& elements, + const double* minmax, + const bool isLogarithmic) { if ( nbIntervals < 1 || !myMesh || @@ -336,7 +336,7 @@ void NumericalFunctor::GetHistogram(int nbIntervals, } else { - vector::const_iterator id = elements.begin(); + std::vector::const_iterator id = elements.begin(); for ( ; id != elements.end(); ++id ) values.insert( GetValue( *id )); } @@ -2163,7 +2163,7 @@ bool BareBorderVolume::IsSatisfy(long theElementId ) if ( myTool.IsFreeFace( iF )) { const SMDS_MeshNode** n = myTool.GetFaceNodes(iF); - vector< const SMDS_MeshNode*> nodes( n, n+myTool.NbFaceNodes(iF)); + std::vector< const SMDS_MeshNode*> nodes( n, n+myTool.NbFaceNodes(iF)); if ( !myMesh->FindElement( nodes, SMDSAbs_Face, /*Nomedium=*/false)) return true; } @@ -2302,15 +2302,15 @@ void CoincidentNodes::SetMesh( const SMDS_Mesh* theMesh ) while ( nIt->more() ) nodesToCheck.insert( nodesToCheck.end(), nIt->next() ); - list< list< const SMDS_MeshNode*> > nodeGroups; + std::list< std::list< const SMDS_MeshNode*> > nodeGroups; SMESH_OctreeNode::FindCoincidentNodes ( nodesToCheck, &nodeGroups, myToler ); myCoincidentIDs.Clear(); - list< list< const SMDS_MeshNode*> >::iterator groupIt = nodeGroups.begin(); + std::list< std::list< const SMDS_MeshNode*> >::iterator groupIt = nodeGroups.begin(); for ( ; groupIt != nodeGroups.end(); ++groupIt ) { - list< const SMDS_MeshNode*>& coincNodes = *groupIt; - list< const SMDS_MeshNode*>::iterator n = coincNodes.begin(); + std::list< const SMDS_MeshNode*>& coincNodes = *groupIt; + std::list< const SMDS_MeshNode*>::iterator n = coincNodes.begin(); for ( ; n != coincNodes.end(); ++n ) myCoincidentIDs.Add( (*n)->GetID() ); } @@ -2342,7 +2342,7 @@ bool CoincidentElements::IsSatisfy( long theElementId ) if ( const SMDS_MeshElement* e = myMesh->FindElement( theElementId )) { if ( e->GetType() != GetType() ) return false; - set< const SMDS_MeshNode* > elemNodes( e->begin_nodes(), e->end_nodes() ); + std::set< const SMDS_MeshNode* > elemNodes( e->begin_nodes(), e->end_nodes() ); const int nbNodes = e->NbNodes(); SMDS_ElemIteratorPtr invIt = (*elemNodes.begin())->GetInverseElementIterator( GetType() ); while ( invIt->more() ) @@ -2589,18 +2589,20 @@ bool FreeFaces::IsSatisfy( long theId ) int nbNode = aFace->NbNodes(); // collect volumes to check that number of volumes with count equal nbNode not less than 2 - typedef map< SMDS_MeshElement*, int > TMapOfVolume; // map of volume counters - typedef map< SMDS_MeshElement*, int >::iterator TItrMapOfVolume; // iterator + typedef std::map< SMDS_MeshElement*, int > TMapOfVolume; // map of volume counters + typedef std::map< SMDS_MeshElement*, int >::iterator TItrMapOfVolume; // iterator TMapOfVolume mapOfVol; SMDS_ElemIteratorPtr nodeItr = aFace->nodesIterator(); - while ( nodeItr->more() ) { + while ( nodeItr->more() ) + { const SMDS_MeshNode* aNode = static_cast(nodeItr->next()); if ( !aNode ) continue; SMDS_ElemIteratorPtr volItr = aNode->GetInverseElementIterator(SMDSAbs_Volume); - while ( volItr->more() ) { + while ( volItr->more() ) + { SMDS_MeshElement* aVol = (SMDS_MeshElement*)volItr->next(); - TItrMapOfVolume itr = mapOfVol.insert(make_pair(aVol, 0)).first; + TItrMapOfVolume itr = mapOfVol.insert( std::make_pair( aVol, 0 )).first; (*itr).second++; } } @@ -2704,8 +2706,8 @@ void GroupColor::SetMesh( const SMDS_Mesh* theMesh ) return; // iterates on groups and find necessary elements ids - const std::set& aGroups = aMesh->GetGroups(); - set::const_iterator GrIt = aGroups.begin(); + const std::set& aGroups = aMesh->GetGroups(); + std::set::const_iterator GrIt = aGroups.begin(); for (; GrIt != aGroups.end(); GrIt++) { SMESHDS_GroupBase* aGrp = (*GrIt); @@ -2932,10 +2934,10 @@ void ConnectedElements::SetPoint( double x, double y, double z ) // find myNodeID by myXYZ if possible if ( myMeshModifTracer.GetMesh() ) { - auto_ptr searcher + SMESHUtils::Deleter searcher ( SMESH_MeshAlgos::GetElementSearcher( (SMDS_Mesh&) *myMeshModifTracer.GetMesh() )); - vector< const SMDS_MeshElement* > foundElems; + std::vector< const SMDS_MeshElement* > foundElems; searcher->FindElementsByPoint( gp_Pnt(x,y,z), SMDSAbs_All, foundElems ); if ( !foundElems.empty() ) @@ -2961,7 +2963,7 @@ bool ConnectedElements::IsSatisfy( long theElementId ) if ( !node0 ) return false; - list< const SMDS_MeshNode* > nodeQueue( 1, node0 ); + std::list< const SMDS_MeshNode* > nodeQueue( 1, node0 ); std::set< int > checkedNodeIDs; // algo: // foreach node in nodeQueue: @@ -3050,8 +3052,8 @@ void CoplanarFaces::SetMesh( const SMDS_Mesh* theMesh ) const double cosTol = Cos( myToler * M_PI / 180. ); NCollection_Map< SMESH_TLink, SMESH_TLink > checkedLinks; - std::list< pair< const SMDS_MeshElement*, gp_Vec > > faceQueue; - faceQueue.push_back( make_pair( face, myNorm )); + std::list< std::pair< const SMDS_MeshElement*, gp_Vec > > faceQueue; + faceQueue.push_back( std::make_pair( face, myNorm )); while ( !faceQueue.empty() ) { face = faceQueue.front().first; @@ -3074,7 +3076,7 @@ void CoplanarFaces::SetMesh( const SMDS_Mesh* theMesh ) if (!normOK || isLessAngle( myNorm, norm, cosTol)) { myCoplanarIDs.Add( f->GetID() ); - faceQueue.push_back( make_pair( f, norm )); + faceQueue.push_back( std::make_pair( f, norm )); } } } diff --git a/src/DriverGMF/DriverGMF_Write.cxx b/src/DriverGMF/DriverGMF_Write.cxx index 963f1bc17..5beadcd17 100644 --- a/src/DriverGMF/DriverGMF_Write.cxx +++ b/src/DriverGMF/DriverGMF_Write.cxx @@ -70,9 +70,9 @@ extern "C" elem->getshapeId() ); \ }} -#define END_ELEM_WRITE_ADD_TO_MAP( elem, e2id ) \ - elem->getshapeId() ); \ - e2id.insert( e2id.end(), make_pair( elem, gmfID )); \ +#define END_ELEM_WRITE_ADD_TO_MAP( elem, e2id ) \ + elem->getshapeId() ); \ + e2id.insert( e2id.end(), std::make_pair( elem, gmfID )); \ }} #define END_EXTRA_VERTICES_WRITE() \ @@ -145,7 +145,7 @@ Driver_Mesh::Status DriverGMF_Write::Perform() const SMDS_MeshNode* n = nodeIt->next(); n->GetXYZ( xyz ); GmfSetLin( meshID, GmfVertices, xyz[0], xyz[1], xyz[2], n->getshapeId() ); - node2IdMap.insert( node2IdMap.end(), make_pair( n, ++iN )); + node2IdMap.insert( node2IdMap.end(), std::make_pair( n, ++iN )); } if ( iN != nbNodes ) return addMessage("Wrong nb of nodes returned by nodesIterator", /*fatal=*/true); diff --git a/src/DriverMED/DriverMED_W_Field.cxx b/src/DriverMED/DriverMED_W_Field.cxx index e40aac434..5fa6a6317 100644 --- a/src/DriverMED/DriverMED_W_Field.cxx +++ b/src/DriverMED/DriverMED_W_Field.cxx @@ -95,7 +95,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh, if ( _nbElemsByGeom.empty() || _elemType != type ) { _elemType = type; - _nbElemsByGeom.resize( 1, make_pair( SMDSEntity_Last, 0 )); + _nbElemsByGeom.resize( 1, std::make_pair( SMDSEntity_Last, 0 )); // count nb of elems of each geometry for ( int iG = 0; iG < SMDSEntity_Last; ++iG ) @@ -107,7 +107,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh, nbElems = mesh->GetMeshInfo().NbElements( geom ); if ( nbElems < 1 ) continue; - _nbElemsByGeom.push_back( make_pair( geom, nbElems + _nbElemsByGeom.back().second )); + _nbElemsByGeom.push_back( std::make_pair( geom, nbElems + _nbElemsByGeom.back().second )); } // add nodes of missing 0D elements on VERTEXes if ( _addODOnVertices && _elemType == SMDSAbs_0DElement ) @@ -118,8 +118,8 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh, if ( !nodes.empty() ) { if ( _nbElemsByGeom.size() == 1 ) - _nbElemsByGeom.push_back( make_pair( SMDSEntity_0D, 0)); - _nbElemsByGeom.push_back( make_pair( SMDSEntity_Node, + _nbElemsByGeom.push_back( std::make_pair( SMDSEntity_0D, 0)); + _nbElemsByGeom.push_back( std::make_pair( SMDSEntity_Node, nodes.size() + _nbElemsByGeom.back().second )); } } @@ -314,7 +314,7 @@ Driver_Mesh::Status DriverMED_W_Field::Perform() SMDSAbs_EntityType smdsType = _nbElemsByGeom[iG].first; MED::EGeometrieElement medType = (MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType ); int nbElems = _nbElemsByGeom[iG].second - _nbElemsByGeom[iG-1].second; - type2nb.insert( make_pair( medType, nbElems )); + type2nb.insert( std::make_pair( medType, nbElems )); } MED::EEntiteMaillage entity = ( _elemType == SMDSAbs_Node ? MED::eNOEUD : MED::eMAILLE ); diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index b561d7571..d233a00a3 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -747,7 +747,7 @@ public: void incrementNodesCapacity(int nbNodes); void incrementCellsCapacity(int nbCells); void adjustStructure(); - void dumpGrid(string ficdump="dumpGrid"); + void dumpGrid(std::string ficdump="dumpGrid"); static int chunkSize; //! low level modification: add, change or remove node or element diff --git a/src/SMDS/SMDS_MeshInfo.hxx b/src/SMDS/SMDS_MeshInfo.hxx index 4c6dba726..b0ccc82fa 100644 --- a/src/SMDS/SMDS_MeshInfo.hxx +++ b/src/SMDS/SMDS_MeshInfo.hxx @@ -25,7 +25,6 @@ #define SMDS_MeshInfo_HeaderFile #include -using namespace std; #include "SMESH_SMDS.hxx" diff --git a/src/SMDS/SMDS_VtkVolume.cxx b/src/SMDS/SMDS_VtkVolume.cxx index d6da43579..efc0f786c 100644 --- a/src/SMDS/SMDS_VtkVolume.cxx +++ b/src/SMDS/SMDS_VtkVolume.cxx @@ -95,7 +95,7 @@ void SMDS_VtkVolume::initPoly(const std::vector& nodeIds, SMDS_UnstructuredGrid* grid = mesh->getGrid(); //double center[3]; //this->gravityCenter(grid, &nodeIds[0], nodeIds.size(), ¢er[0]); - vector ptIds; + std::vector ptIds; vtkIdType nbFaces = nbNodesPerFace.size(); int k = 0; for (int i = 0; i < nbFaces; i++) @@ -365,7 +365,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n */ std::vector SMDS_VtkVolume::GetQuantities() const { - vector quantities; + std::vector quantities; SMDS_Mesh *mesh = SMDS_Mesh::_meshList[myMeshId]; vtkUnstructuredGrid* grid = mesh->getGrid(); vtkIdType aVtkType = grid->GetCellType(this->myVtkID); diff --git a/src/SMESH/SMESH_Algo.hxx b/src/SMESH/SMESH_Algo.hxx index 6363dc469..a362ed290 100644 --- a/src/SMESH/SMESH_Algo.hxx +++ b/src/SMESH/SMESH_Algo.hxx @@ -215,7 +215,7 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis * have a name (type) listed in the algorithm. Hypothesis associated to * father shape -are not- taken into account (see GetUsedHypothesis) */ - const list & + const std::list & GetAppliedHypothesis(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, const bool ignoreAuxiliary=true) const; diff --git a/src/SMESH/SMESH_MeshEditor.hxx b/src/SMESH/SMESH_MeshEditor.hxx index a2039ac8a..f9695c9a1 100644 --- a/src/SMESH/SMESH_MeshEditor.hxx +++ b/src/SMESH/SMESH_MeshEditor.hxx @@ -93,11 +93,11 @@ public: SMESH_EXPORT ElemFeatures& Init( double diameter ) { myType = SMDSAbs_Ball; myBallDiameter = diameter; return *this; } - SMESH_EXPORT ElemFeatures& Init( vector& quanities, bool isQuad=false ) + SMESH_EXPORT ElemFeatures& Init( std::vector& quanities, bool isQuad=false ) { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; myPolyhedQuantities.swap( quanities ); return *this; } - SMESH_EXPORT ElemFeatures& Init( const vector& quanities, bool isQuad=false ) + SMESH_EXPORT ElemFeatures& Init( const std::vector& quanities, bool isQuad=false ) { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; myPolyhedQuantities = quanities; return *this; } @@ -777,8 +777,8 @@ public: const bool theHasRefPoint, const gp_Pnt& theRefPoint, const bool theMakeGroups); - void LinearAngleVariation(const int NbSteps, - list& theAngles); + void LinearAngleVariation(const int NbSteps, + std::list& theAngles); bool doubleNodes( SMESHDS_Mesh* theMeshDS, const TIDSortedElemSet& theElems, diff --git a/src/SMESH/SMESH_ProxyMesh.cxx b/src/SMESH/SMESH_ProxyMesh.cxx index 962ba92a5..5271a6c17 100644 --- a/src/SMESH/SMESH_ProxyMesh.cxx +++ b/src/SMESH/SMESH_ProxyMesh.cxx @@ -45,7 +45,7 @@ SMESH_ProxyMesh::SMESH_ProxyMesh():_mesh(0) */ //================================================================================ -SMESH_ProxyMesh::SMESH_ProxyMesh(vector& components): +SMESH_ProxyMesh::SMESH_ProxyMesh(std::vector& components): _mesh(0) { if ( components.empty() ) return; @@ -68,8 +68,8 @@ SMESH_ProxyMesh::SMESH_ProxyMesh(vector& components): if ( _subMeshes[j] ) { // unite 2 sub-meshes - set< const SMDS_MeshElement * > elems( _subMeshes[j]->_elements.begin(), - _subMeshes[j]->_elements.end()); + std::set< const SMDS_MeshElement * > elems( _subMeshes[j]->_elements.begin(), + _subMeshes[j]->_elements.end()); elems.insert( m->_subMeshes[j]->_elements.begin(), m->_subMeshes[j]->_elements.end()); _subMeshes[j]->_elements.assign( elems.begin(), elems.end() ); @@ -103,7 +103,7 @@ SMESH_ProxyMesh::~SMESH_ProxyMesh() delete _subMeshes[i]; _subMeshes.clear(); - set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.begin(); + std::set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.begin(); for ( ; i != _elemsInMesh.end(); ++i ) GetMeshDS()->RemoveFreeElement( *i, 0 ); _elemsInMesh.clear(); @@ -203,12 +203,12 @@ namespace class TFilteringIterator : public SMDS_ElemIterator { - SMDS_ElemIteratorPtr _iter; - const SMDS_MeshElement * _curElem; - vector< SMDSAbs_EntityType> _okTypes; + SMDS_ElemIteratorPtr _iter; + const SMDS_MeshElement * _curElem; + std::vector< SMDSAbs_EntityType> _okTypes; public: - TFilteringIterator( const vector< SMDSAbs_EntityType>& okTypes, - const SMDS_ElemIteratorPtr& elemIterator) + TFilteringIterator( const std::vector< SMDSAbs_EntityType>& okTypes, + const SMDS_ElemIteratorPtr& elemIterator) :_iter(elemIterator), _curElem(0), _okTypes(okTypes) { next(); @@ -282,11 +282,11 @@ SMDS_ElemIteratorPtr SMESH_ProxyMesh::GetFaces() const // ... else elements filtered using allowedTypes are additionally returned SMDS_ElemIteratorPtr facesIter = GetMeshDS()->elementsIterator(SMDSAbs_Face); SMDS_ElemIteratorPtr filterIter( new TFilteringIterator( _allowedTypes, facesIter )); - vector< SMDS_ElemIteratorPtr > iters(2); + std::vector< SMDS_ElemIteratorPtr > iters(2); iters[0] = proxyIter; iters[1] = filterIter; - typedef vector< SMDS_ElemIteratorPtr > TElemIterVector; + typedef std::vector< SMDS_ElemIteratorPtr > TElemIterVector; typedef SMDS_IteratorOnIterators TItersIter; return SMDS_ElemIteratorPtr( new TItersIter( iters )); } @@ -431,7 +431,7 @@ void SMESH_ProxyMesh::removeTmpElement( const SMDS_MeshElement* elem ) { if ( elem && elem->GetID() > 0 ) { - set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.find( elem ); + std::set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.find( elem ); if ( i != _elemsInMesh.end() ) { GetMeshDS()->RemoveFreeElement( elem, 0 ); @@ -468,7 +468,7 @@ void SMESH_ProxyMesh::setNode2Node(const SMDS_MeshNode* srcNode, SubMesh* sm = const_cast( subMesh ); if ( !subMesh->_n2n ) sm->_n2n = new TN2NMap; - sm->_n2n->insert( make_pair( srcNode, proxyNode )); + sm->_n2n->insert( std::make_pair( srcNode, proxyNode )); } //================================================================================ diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index 4c9cac353..a1cee8e4e 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -61,6 +61,7 @@ static int MYDEBUG = 0; namespace { + using std::runtime_error; //======================================================================= //function : FindNode @@ -972,7 +973,7 @@ SMESH_Client::Update(bool theIsClear) int nbNodes = anIndexes[i++]; // nodes //ASSERT( nbNodes < 9 ); - vector aNodes( nbNodes ); + std::vector aNodes( nbNodes ); for ( int iNode = 0; iNode < nbNodes; iNode++ ) aNodes[ iNode ] = FindNode( mySMDSMesh, anIndexes[i++] ); // change diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index deacb22f0..f28b8c95c 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -118,8 +118,8 @@ namespace static int FirstHexahedronIds[] = {0,1,2,3,4,5,6,7,0,1,2,3}; static int LastHexahedronIds[] = {1,2,3,0,5,6,7,4,4,5,6,7}; - static vector FirstPolygonIds; - static vector LastPolygonIds; + static std::vector FirstPolygonIds; + static std::vector LastPolygonIds; void ReverseConnectivity( std::vector & ids, SMDSAbs_EntityType type, bool toReverse, // inverse element diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 001416791..4cf85c89f 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -108,6 +108,7 @@ #define MARGIN 11 #define COLONIZE(str) (QString(str).contains(":") > 0 ? QString(str) : QString(str) + " :" ) +#define __SHAPE_RGB__ 250, 0, 250 enum TCol { COL_ALGO = 0, COL_SHAPE, COL_ERROR, COL_SHAPEID, COL_PUBLISHED, COL_BAD_MESH, NB_COLUMNS @@ -147,10 +148,10 @@ namespace SMESH { myProperty = vtkProperty::New(); myProperty->SetRepresentationToWireframe(); - myProperty->SetColor( 250, 0, 250 ); - myProperty->SetAmbientColor( 250, 0, 250 ); - myProperty->SetDiffuseColor( 250, 0, 250 ); - //myProperty->SetSpecularColor( 250, 0, 250 ); + myProperty->SetColor( __SHAPE_RGB__ ); + myProperty->SetAmbientColor( __SHAPE_RGB__ ); + myProperty->SetDiffuseColor( __SHAPE_RGB__ ); + //myProperty->SetSpecularColor( __SHAPE_RGB__ ); myProperty->SetLineWidth( 5 ); } // ----------------------------------------------------------------------- @@ -278,13 +279,18 @@ namespace SMESH actor = GEOM_Actor::New(); if ( actor ) { actor->SetShape(shape,0,0); - actor->SetProperty(myProperty); - actor->SetShadingProperty(myProperty); - actor->SetWireframeProperty(myProperty); - actor->SetPreviewProperty(myProperty); + // actor->SetProperty(myProperty); + // actor->SetShadingProperty(myProperty); + // actor->SetWireframeProperty(myProperty); + // actor->SetPreviewProperty(myProperty); actor->PickableOff(); - // if ( shape.ShapeType() == TopAbs_EDGE ) - // actor->SubShapeOn(); + // + actor->SetWidth( myProperty->GetLineWidth() ); + actor->SetIsosWidth( myProperty->GetLineWidth() ); + actor->SetIsosColor( __SHAPE_RGB__ ); + actor->SetColor( __SHAPE_RGB__ ); + // if ( shape.ShapeType() == TopAbs_EDGE ) + // actor->SubShapeOn(); myViewWindow->AddActor( actor ); } } @@ -732,10 +738,11 @@ void SMESHGUI_ComputeDlg_QThread::cancel() //================================================================================ //================================================================================ -SMESHGUI_ComputeDlg_QThreadQDialog::SMESHGUI_ComputeDlg_QThreadQDialog(QWidget * parent, - SMESH::SMESH_Gen_var gen, - SMESH::SMESH_Mesh_var mesh, - GEOM::GEOM_Object_var mainShape) +SMESHGUI_ComputeDlg_QThreadQDialog:: +SMESHGUI_ComputeDlg_QThreadQDialog(QWidget * parent, + SMESH::SMESH_Gen_var gen, + SMESH::SMESH_Mesh_var mesh, + GEOM::GEOM_Object_var mainShape) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint | @@ -916,23 +923,28 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( !memoryLack ) { // List of objects that will be updated automatically - QList< QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) > > aListToUpdate; - SMESH::SMESH_IDSource_var aMeshObj = SMESH::SObjectToInterface( aMeshSObj ); + typedef QList< QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) > > TListOf_IDSrc_SObj; + TListOf_IDSrc_SObj aListToUpdate; + SMESH::SMESH_IDSource_var aMeshObj = + SMESH::SObjectToInterface( aMeshSObj ); // put Mesh into list - aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aMeshObj, aMeshSObj) ); + aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aMeshObj, aMeshSObj )); SMESH::submesh_array_var aSubMeshes = myMesh->GetSubMeshes(); // put SubMeshes into list - for ( CORBA::ULong i = 0; i < aSubMeshes->length(); i++ ) { + for ( CORBA::ULong i = 0; i < aSubMeshes->length(); i++ ) + { SMESH::SMESH_subMesh_var sm = aSubMeshes[i]; if ( CORBA::is_nil( sm ) ) continue; _PTR(SObject) smSObj = SMESH::ObjectToSObject( sm ); if ( !smSObj ) continue; - SMESH::SMESH_IDSource_var aSubMeshObj = SMESH::SObjectToInterface( smSObj ); - aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aSubMeshObj, smSObj) ); + SMESH::SMESH_IDSource_var aSubMeshObj = + SMESH::SObjectToInterface( smSObj ); + aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aSubMeshObj, smSObj )); } // put Groups into list - SMESH::ListOfGroups_var aGroups = myMesh->GetGroups(); - for ( size_t i = 0; i < aGroups->length(); ++i ) { + SMESH::ListOfGroups_var aGroups = myMesh->GetGroups(); + for ( size_t i = 0; i < aGroups->length(); ++i ) + { SMESH::SMESH_GroupBase_var aGrp = aGroups[i]; if ( CORBA::is_nil( aGrp ) ) continue; SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp ); @@ -941,26 +953,31 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( !aStdGroup->_is_nil() ) continue; // don't update the standalone groups _PTR(SObject) aGroupSO = SMESH::FindSObject( aGrp ); if ( !aGroupSO ) continue; - SMESH::SMESH_IDSource_var aGroupObj = SMESH::SObjectToInterface( aGroupSO ); - aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aGroupObj, aGroupSO) ); + SMESH::SMESH_IDSource_var aGroupObj = + SMESH::SObjectToInterface( aGroupSO ); + aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aGroupObj, aGroupSO )); } // update mesh, sub-mesh and groups, if it's possible - QList< QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) > >::iterator anIter; - for( anIter = aListToUpdate.begin(); anIter != aListToUpdate.end(); anIter++ ) { - SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( (*anIter).second )); - if ( getSMESHGUI()->automaticUpdate( (*anIter).first, &entities, &limitExceeded, &hidden, &nbElements ) ) + TListOf_IDSrc_SObj::iterator anIter; + for ( anIter = aListToUpdate.begin(); anIter != aListToUpdate.end(); anIter++ ) + { + SMESH::SMESH_Mesh_var aMesh = + SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( (*anIter).second )); + + if ( getSMESHGUI()->automaticUpdate( (*anIter).first, &entities, &limitExceeded, + &hidden, &nbElements ) ) { try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif bool toDisplay = false; - - if ( !aMesh->_is_nil() ) { // display a mesh only + if ( !aMesh->_is_nil() ) // display only a mesh + { toDisplay = true; SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh ); - if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetStudy(), (*anIter).second->GetID().c_str(), true ); + if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetStudy(), + (*anIter).second->GetID().c_str(), + /*clearLog =*/ true ); if ( anActor ) // actor is not created for an empty mesh { anActor->SetEntityMode( entities ); @@ -981,7 +998,10 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( hidden & SMESH_Actor::eBallElem ) hiddenMsg << tr( "SMESH_BALLS" ); SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), - tr( "SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED" ).arg( nbElements ).arg( limitSize ).arg( hiddenMsg.join(", ") ) ); + tr( "SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED" ). + arg( nbElements ). + arg( limitSize ). + arg( hiddenMsg.join(", "))); } } catch (...) { @@ -1000,12 +1020,12 @@ void SMESHGUI_BaseComputeOp::computeMesh() { SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), - tr( "SMESH_WRN_SIZE_LIMIT_EXCEEDED" ).arg( nbElements ).arg( limitSize ) ); + tr( "SMESH_WRN_SIZE_LIMIT_EXCEEDED" ). + arg( nbElements ).arg( limitSize ) ); } } } - LightApp_SelectionMgr *Sel = selectionMgr(); - if ( Sel ) + if ( LightApp_SelectionMgr *Sel = selectionMgr() ) { SALOME_ListIO selected; selected.Append( myIObject ); @@ -1017,10 +1037,11 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( memoryLack ) aMemoryReserve.release(); - myCompDlg->setWindowTitle(tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED")); + myCompDlg->setWindowTitle + ( tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED" )); // SHOW ERRORS - + bool noCompError = ( !aCompErrors.operator->() || aCompErrors->length() == 0 ); bool noHypoError = ( aHypErrors.isEmpty() ); @@ -1234,8 +1255,9 @@ void SMESHGUI_BaseComputeOp::onPublishShape() if ( !SMESH::getSubShapeSO( 1, myMainShape )) // the main shape not published { QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" )); - SALOMEDS::SObject_wrap so = - geomGen->AddInStudy( study, myMainShape, name.toLatin1().data(), GEOM::GEOM_Object::_nil()); + SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, myMainShape, + name.toLatin1().data(), + GEOM::GEOM_Object::_nil()); // look for myMainShape in the table for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) { if ( table()->item( r, COL_SHAPEID )->text() == "1" ) { @@ -1252,7 +1274,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape() if ( curSub == 1 ) continue; } QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" )); - SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, shape, name.toLatin1().data(), myMainShape); + SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, shape, + name.toLatin1().data(), myMainShape); if ( !so->_is_nil() ) { CORBA::String_var name = so->GetName(); CORBA::String_var entry = so->GetID(); @@ -1995,7 +2018,8 @@ void SMESHGUI_PrecomputeOp::onPreview() if ( isShowError ) { myDlg->hide(); - aCompDlg->setWindowTitle(tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED")); + aCompDlg->setWindowTitle + ( tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED" )); showComputeResult( memoryLack, noCompError, aCompErrors, noHypoError, aHypErrors ); } } @@ -2198,10 +2222,11 @@ void SMESHGUI_BaseComputeOp::evaluateMesh() aMemoryReserve.release(); evaluateFailed = ( aCompErrors->length() > 0 ); - myCompDlg->setWindowTitle(tr( evaluateFailed ? "SMESH_WRN_EVALUATE_FAILED" : "SMESH_EVALUATE_SUCCEED")); + myCompDlg->setWindowTitle + ( tr( evaluateFailed ? "SMESH_WRN_EVALUATE_FAILED" : "SMESH_EVALUATE_SUCCEED" )); // SHOW ERRORS - + bool noCompError = ( !aCompErrors.operator->() || aCompErrors->length() == 0 ); bool noHypoError = ( aHypErrors.isEmpty() ); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index d598d95e9..ffae8359b 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -1852,7 +1852,7 @@ void SMESHGUI_SplitVolumesDlg::showFacetByElement( int elemID ) gp_XYZ bc( 0,0,0 ); Bnd_B3d bbox; SMDS_NodeIteratorPtr nIt = elem->nodeIterator(); - vector< const SMDS_MeshNode* > nodes; + std::vector< const SMDS_MeshNode* > nodes; nodes.reserve( elem->NbNodes() ); while ( nIt->more() ) { diff --git a/src/SMESHUtils/SMESH_Comment.hxx b/src/SMESHUtils/SMESH_Comment.hxx index 5e6420fda..bb4c9b487 100644 --- a/src/SMESHUtils/SMESH_Comment.hxx +++ b/src/SMESHUtils/SMESH_Comment.hxx @@ -30,40 +30,38 @@ # include # include -using namespace std; - /*! * \brief Class to generate string from any type */ -class SMESH_Comment : public string +class SMESH_Comment : public std::string { - ostringstream _s ; + std::ostringstream _s ; public : - SMESH_Comment():string("") {} + SMESH_Comment():std::string("") {} - SMESH_Comment(const SMESH_Comment& c):string() { + SMESH_Comment(const SMESH_Comment& c):std::string() { _s << c.c_str() ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); } SMESH_Comment & operator=(const SMESH_Comment& c) { _s << c.c_str() ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); return *this; } template SMESH_Comment( const T &anything ) { _s << anything ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); } template SMESH_Comment & operator<<( const T &anything ) { _s << anything ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); return *this ; } diff --git a/src/SMESHUtils/SMESH_FreeBorders.cxx b/src/SMESHUtils/SMESH_FreeBorders.cxx index 52018179e..87951012c 100644 --- a/src/SMESHUtils/SMESH_FreeBorders.cxx +++ b/src/SMESHUtils/SMESH_FreeBorders.cxx @@ -290,7 +290,7 @@ namespace void BNode::AddClose ( const BEdge* e, double u ) const { if ( ! e->Contains( this )) - myCloseEdges.push_back( make_pair( const_cast< BEdge* >( e ), u )); + myCloseEdges.push_back( std::make_pair( const_cast< BEdge* >( e ), u )); } BEdge* BNode::GetCloseEdgeOfBorder( int borderID, double * uPtr ) const { @@ -569,9 +569,9 @@ void SMESH_MeshAlgos::FindCoincidentFreeBorders(SMDS_Mesh& mesh, // form groups of coincident parts of free borders - TFreeBorderPart part; - TCoincidentGroup group; - vector< BEdge* > ranges; // couples of edges delimiting parts + TFreeBorderPart part; + TCoincidentGroup group; + std::vector< BEdge* > ranges; // couples of edges delimiting parts BEdge* be = 0; // a current edge int skipGroup = bEdges.size(); // a group ID used to avoid repeating treatment of edges diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 187055df5..8b589ce00 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -1297,7 +1297,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl TCollection_AsciiString aLongString, aFunctionType; int where = 1; - set< string > functionNameSet; + std::set< std::string > functionNameSet; while ( SMESH::TPythonDump::CutoutLongString( anUpdatedScript, where, aLongString, aFunctionType )) { // make a python string literal diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 36808eed4..42db79ef4 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -1628,7 +1628,7 @@ void ConnectedElements_i::SetThreshold ( const char* { case SMESH::ConnectedElements::POINT: // read 3 node coordinates /////////////////// { - vector< double > xyz; + std::vector< double > xyz; char* endptr; do { diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index e2be6042d..b60ef8d24 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -71,16 +71,16 @@ public: mapIdToId.clear(); } // register object in the internal map and return its id - int addObject( string theIOR ) + int addObject( std::string theIOR ) { int nextId = getNextId(); mapIdToIOR[ nextId ] = theIOR; return nextId; } // find the object id in the internal map by the IOR - int findId( string theIOR ) + int findId( std::string theIOR ) { - map::iterator imap; + std::map::iterator imap; for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) { if ( imap->second == theIOR ) return imap->first; @@ -88,18 +88,18 @@ public: return 0; } // get object's IOR by id - string getIORbyId( const int theId ) + std::string getIORbyId( const int theId ) { if ( mapIdToIOR.find( theId ) != mapIdToIOR.end() ) return mapIdToIOR[ theId ]; - return string( "" ); + return std::string( "" ); } // get object's IOR by old id - string getIORbyOldId( const int theOldId ) + std::string getIORbyOldId( const int theOldId ) { if ( mapIdToId.find( theOldId ) != mapIdToId.end() ) return getIORbyId( mapIdToId[ theOldId ] ); - return string( "" ); + return std::string( "" ); } // maps old object id to the new one (used when restoring data) void mapOldToNew( const int oldId, const int newId ) { @@ -107,7 +107,7 @@ public: } // get old id by a new one int getOldId( const int newId ) { - map::iterator imap; + std::map::iterator imap; for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) { if ( imap->second == newId ) return imap->first; @@ -125,8 +125,8 @@ private: return id; } - map mapIdToIOR; // persistent-to-transient map - map mapIdToId; // used to translate object from persistent to transient form + std::map mapIdToIOR; // persistent-to-transient map + std::map mapIdToId; // to translate object from persistent to transient form }; // =========================================================== @@ -568,7 +568,7 @@ public: typename TInterface::_var_type GetObjectByOldId( const int oldID ) { if ( StudyContext* myStudyContext = GetCurrentStudyContext() ) { - string ior = myStudyContext->getIORbyOldId( oldID ); + std::string ior = myStudyContext->getIORbyOldId( oldID ); if ( !ior.empty() ) return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() )); } @@ -671,13 +671,13 @@ private: ::SMESH_Gen myGen; // SMESH_Gen local implementation // hypotheses managing - map myHypCreatorMap; + std::map myHypCreatorMap; - map myStudyContextMap; // Map of study context objects + std::map myStudyContextMap; // Map of study context objects - GEOM_Client* myShapeReader; // Shape reader - SALOMEDS::Study_var myCurrentStudy; // Current study - CORBA::Boolean myIsEmbeddedMode; // Current mode + GEOM_Client* myShapeReader; // Shape reader + SALOMEDS::Study_var myCurrentStudy; // Current study + CORBA::Boolean myIsEmbeddedMode; // Current mode // Default color of groups std::string myDefaultGroupColor; diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index 66422047d..322b13d58 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -47,12 +47,12 @@ #ifdef _DEBUG_ static int MYDEBUG = 0; -//static int VARIABLE_DEBUG = 0; #else static int MYDEBUG = 0; -//static int VARIABLE_DEBUG = 0; #endif +using namespace std; + //============================================================================= /*! * Get...Tag [ static ] @@ -281,7 +281,8 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_wrap curObj; if ( theFatherObject->GetLastChildTag() > theTag ) { - SALOMEDS::UseCaseIterator_wrap anUseCaseIter = useCaseBuilder->GetUseCaseIterator(theFatherObject); + SALOMEDS::UseCaseIterator_wrap + anUseCaseIter = useCaseBuilder->GetUseCaseIterator(theFatherObject); for ( ; anUseCaseIter->More(); anUseCaseIter->Next() ) { curObj = anUseCaseIter->Value(); if ( curObj->Tag() > theTag ) { @@ -294,21 +295,29 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, } SALOMEDS::GenericAttribute_wrap anAttr; - if ( !CORBA::is_nil( theIOR )) { + if ( !CORBA::is_nil( theIOR )) + { anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeIOR" ); CORBA::String_var objStr = SMESH_Gen_i::GetORB()->object_to_string( theIOR ); SALOMEDS::AttributeIOR_wrap iorAttr = anAttr; - iorAttr->SetValue( objStr.in() ); - // UnRegister() !!! - SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR ); - if ( !genObj->_is_nil() ) - genObj->UnRegister(); + CORBA::String_var objStrCur = iorAttr->Value(); + bool sameIOR = ( objStrCur.in() && strcmp( objStr.in(), objStrCur.in() ) == 0 ); + if ( !sameIOR ) + { + iorAttr->SetValue( objStr.in() ); + // UnRegister() !!! + SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR ); + if ( !genObj->_is_nil() ) + genObj->UnRegister(); + } } + if ( thePixMap ) { anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributePixMap" ); SALOMEDS::AttributePixMap_wrap pm = anAttr; pm->SetPixMap( thePixMap ); } + if ( !theSelectable ) { anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeSelectable" ); SALOMEDS::AttributeSelectable_wrap selAttr = anAttr; diff --git a/src/SMESH_I/SMESH_Group_i.cxx b/src/SMESH_I/SMESH_Group_i.cxx index 9d3b3ee02..8bae7fb5b 100644 --- a/src/SMESH_I/SMESH_Group_i.cxx +++ b/src/SMESH_I/SMESH_Group_i.cxx @@ -502,8 +502,8 @@ namespace */ //================================================================================ - void getNodesOfElements(SMDS_ElemIteratorPtr elemIt, - set& nodes) + void getNodesOfElements(SMDS_ElemIteratorPtr elemIt, + std::set& nodes) { while ( elemIt->more() ) { @@ -531,7 +531,7 @@ CORBA::Long SMESH_GroupBase_i::GetNumberOfNodes() { if ( myNbNodes < 0 || g->GetTic() != myGroupDSTic ) { - set nodes; + std::set nodes; getNodesOfElements( g->GetElements(), nodes ); myNbNodes = nodes.size(); myGroupDSTic = g->GetTic(); @@ -574,10 +574,10 @@ SMESH::long_array* SMESH_GroupBase_i::GetNodeIDs() SMESH::long_array_var aRes = new SMESH::long_array(); if ( SMESHDS_GroupBase* g = GetGroupDS()) { - set nodes; + std::set nodes; getNodesOfElements( g->GetElements(), nodes ); aRes->length( nodes.size() ); - set::iterator nIt = nodes.begin(), nEnd = nodes.end(); + std::set::iterator nIt = nodes.begin(), nEnd = nodes.end(); for ( int i = 0; nIt != nEnd; ++nIt, ++i ) aRes[i] = (*nIt)->GetID(); } @@ -918,7 +918,7 @@ SMESH::long_array* SMESH_GroupOnFilter_i::GetMeshInfo() if ( g->GetType() != SMDSAbs_Node ) { - vector< int > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo(); + std::vector< int > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo(); for ( size_t i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) if ( i < nbElems.size() ) aRes[i] = nbElems[ i ]; diff --git a/src/SMESH_I/SMESH_Measurements_i.cxx b/src/SMESH_I/SMESH_Measurements_i.cxx index b17fc6c4a..8da1cd7cf 100644 --- a/src/SMESH_I/SMESH_Measurements_i.cxx +++ b/src/SMESH_I/SMESH_Measurements_i.cxx @@ -221,12 +221,12 @@ static void enlargeBoundingBox(const SMDS_MeshNode* theNode, theMeasure.node1 = theNode->GetID(); } else { - theMeasure.minX = min( theMeasure.minX, theNode->X() ); - theMeasure.maxX = max( theMeasure.maxX, theNode->X() ); - theMeasure.minY = min( theMeasure.minY, theNode->Y() ); - theMeasure.maxY = max( theMeasure.maxY, theNode->Y() ); - theMeasure.minZ = min( theMeasure.minZ, theNode->Z() ); - theMeasure.maxZ = max( theMeasure.maxZ, theNode->Z() ); + theMeasure.minX = std::min( theMeasure.minX, theNode->X() ); + theMeasure.maxX = std::max( theMeasure.maxX, theNode->X() ); + theMeasure.minY = std::min( theMeasure.minY, theNode->Y() ); + theMeasure.maxY = std::max( theMeasure.maxY, theNode->Y() ); + theMeasure.minZ = std::min( theMeasure.minZ, theNode->Z() ); + theMeasure.maxZ = std::max( theMeasure.maxZ, theNode->Z() ); } } diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index bd08f9d67..76a5d6d16 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -5249,10 +5249,10 @@ void SMESH_MeshEditor_i::dumpGroupsList(TPythonDump & theDumpPytho */ //================================================================================ -string SMESH_MeshEditor_i::generateGroupName(const string& thePrefix) +std::string SMESH_MeshEditor_i::generateGroupName(const std::string& thePrefix) { SMESH::ListOfGroups_var groups = myMesh_i->GetGroups(); - set groupNames; + set groupNames; // Get existing group names for (int i = 0, nbGroups = groups->length(); i < nbGroups; i++ ) { @@ -5265,7 +5265,7 @@ string SMESH_MeshEditor_i::generateGroupName(const string& thePrefix) } // Find new name - string name = thePrefix; + std::string name = thePrefix; int index = 0; while (!groupNames.insert(name).second) @@ -5573,8 +5573,8 @@ SMESH_MeshEditor_i::DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes, // Create group with newly created nodes SMESH::long_array_var anIds = GetLastCreatedNodes(); if (anIds->length() > 0) { - string anUnindexedName (theNodes->GetName()); - string aNewName = generateGroupName(anUnindexedName + "_double"); + std::string anUnindexedName (theNodes->GetName()); + std::string aNewName = generateGroupName(anUnindexedName + "_double"); aNewGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str()); aNewGroup->Add(anIds); pyDump << aNewGroup << " = "; @@ -5672,8 +5672,8 @@ SMESH_MeshEditor_i::DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes, // Create group with newly created nodes SMESH::long_array_var anIds = GetLastCreatedNodes(); if (anIds->length() > 0) { - string anUnindexedName (theNodes[0]->GetName()); - string aNewName = generateGroupName(anUnindexedName + "_double"); + std::string anUnindexedName (theNodes[0]->GetName()); + std::string aNewName = generateGroupName(anUnindexedName + "_double"); aNewGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str()); aNewGroup->Add(anIds); pyDump << aNewGroup << " = "; @@ -5897,7 +5897,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems, { // Create group with newly created elements CORBA::String_var elemGroupName = theElems->GetName(); - string aNewName = generateGroupName( string(elemGroupName.in()) + "_double"); + std::string aNewName = generateGroupName( std::string(elemGroupName.in()) + "_double"); if ( !getEditor().GetLastCreatedElems().IsEmpty() && theElemGroupNeeded ) { SMESH::long_array_var anIds = GetLastCreatedElems(); @@ -6129,7 +6129,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems { // Create group with newly created elements CORBA::String_var elemGroupName = theElems[0]->GetName(); - string aNewName = generateGroupName( string(elemGroupName.in()) + "_double"); + std::string aNewName = generateGroupName( std::string(elemGroupName.in()) + "_double"); if ( !getEditor().GetLastCreatedElems().IsEmpty() && theElemGroupNeeded ) { SMESH::long_array_var anIds = GetLastCreatedElems(); diff --git a/src/SMESH_I/SMESH_MeshEditor_i.hxx b/src/SMESH_I/SMESH_MeshEditor_i.hxx index 3c36508b8..e657c5f61 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.hxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.hxx @@ -37,6 +37,7 @@ #include "SMESH_PythonDump.hxx" #include "SMESH_MeshEditor.hxx" #include +#include class SMESH_Mesh_i; @@ -897,7 +898,7 @@ private: //!< private methods void dumpGroupsList(SMESH::TPythonDump & theDumpPython, const SMESH::ListOfGroups * theGroupList); - string generateGroupName(const string& thePrefix); + std::string generateGroupName(const std::string& thePrefix); void prepareIdSource(SMESH::SMESH_IDSource_ptr theObject); diff --git a/src/SMESH_I/SMESH_Pattern_i.cxx b/src/SMESH_I/SMESH_Pattern_i.cxx index 511433f6f..40d68e5b9 100644 --- a/src/SMESH_I/SMESH_Pattern_i.cxx +++ b/src/SMESH_I/SMESH_Pattern_i.cxx @@ -45,6 +45,8 @@ #include #include +using namespace std; + using SMESH::TPythonDump; using SMESH::TVar; diff --git a/src/SMESH_I/SMESH_PreMeshInfo.cxx b/src/SMESH_I/SMESH_PreMeshInfo.cxx index 21fe1513e..0621ed9f1 100644 --- a/src/SMESH_I/SMESH_PreMeshInfo.cxx +++ b/src/SMESH_I/SMESH_PreMeshInfo.cxx @@ -54,6 +54,7 @@ #include CORBA_SERVER_HEADER(SALOME_Session) +using namespace std; #define MYDEBUGOUT(msg) //std::cout << msg << std::endl; @@ -62,7 +63,7 @@ namespace enum { GroupOnFilter_OutOfDate = -1 }; // a map to count not yet loaded meshes - static map< int, int > theStudyIDToMeshCounter; + static std::map< int, int > theStudyIDToMeshCounter; //================================================================================ /*! @@ -72,8 +73,8 @@ namespace void meshInfoLoaded( SMESH_Mesh_i* mesh ) { - map< int, int >::iterator id2counter = - theStudyIDToMeshCounter.insert( make_pair( (int) mesh->GetStudyId(), 0 )).first; + std::map< int, int >::iterator id2counter = + theStudyIDToMeshCounter.insert( std::make_pair( (int) mesh->GetStudyId(), 0 )).first; id2counter->second++; } //================================================================================ @@ -88,7 +89,7 @@ namespace { if ( --theStudyIDToMeshCounter[ (int) mesh->GetStudyId() ] == 0 ) { - string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile ); + std::string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile ); SALOMEDS::ListOfFileNames_var aFiles = new SALOMEDS::ListOfFileNames; aFiles->length(2); @@ -109,7 +110,7 @@ namespace class SignalToGUI { - string _messagePrefix; + std::string _messagePrefix; SALOME::Session_var _session; public: SignalToGUI( SMESH_Mesh_i* mesh ) @@ -127,7 +128,7 @@ namespace _messagePrefix = "SMESH/mesh_loading/"; _messagePrefix += meshEntry.in(); - string msgToGUI = _messagePrefix + "/"; + std::string msgToGUI = _messagePrefix + "/"; msgToGUI += SMESH_Comment( mesh->NbNodes() ); msgToGUI += "/"; msgToGUI += SMESH_Comment( mesh->NbElements() ); @@ -140,7 +141,7 @@ namespace { if ( !_messagePrefix.empty() ) { - string msgToGUI = _messagePrefix + "/stop"; + std::string msgToGUI = _messagePrefix + "/stop"; _session->emitMessageOneWay( msgToGUI.c_str()); _messagePrefix.clear(); } @@ -173,7 +174,7 @@ namespace SMDS_PositionPtr vertexPosition() const { return SMDS_PositionPtr( new SMDS_VertexPosition); } SMDS_PositionPtr defaultPosition() const { return SMDS_SpacePosition::originSpacePosition(); } typedef SMDS_PositionPtr (PositionCreator:: * FmakePos)() const; - vector myFuncTable; + std::vector myFuncTable; }; //================================================================================ @@ -182,12 +183,12 @@ namespace */ //================================================================================ - vector getSimpleSubMeshIds( SMESHDS_Mesh* meshDS, int shapeId ) + std::vector getSimpleSubMeshIds( SMESHDS_Mesh* meshDS, int shapeId ) { - vector ids; + std::vector ids; - list shapeQueue( 1, meshDS->IndexToShape( shapeId )); - list::iterator shape = shapeQueue.begin(); + std::list shapeQueue( 1, meshDS->IndexToShape( shapeId )); + std::list::iterator shape = shapeQueue.begin(); for ( ; shape != shapeQueue.end(); ++shape ) { if ( shape->IsNull() ) continue; @@ -222,10 +223,10 @@ namespace */ //================================================================================ - typedef map< MED::EGeometrieElement, SMDSAbs_EntityType > Tmed2smeshElemTypeMap; + typedef std::map< MED::EGeometrieElement, SMDSAbs_EntityType > Tmed2smeshElemTypeMap; const Tmed2smeshElemTypeMap& med2smeshElemTypeMap() { - static map< MED::EGeometrieElement, SMDSAbs_EntityType> med2smeshTypes; + static Tmed2smeshElemTypeMap med2smeshTypes; if ( med2smeshTypes.empty() ) { for ( int iG = 0; iG < SMDSEntity_Last; ++iG ) @@ -233,7 +234,7 @@ namespace SMDSAbs_EntityType smdsType = (SMDSAbs_EntityType) iG; MED::EGeometrieElement medType = (MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType ); - med2smeshTypes.insert( make_pair( medType, smdsType )); + med2smeshTypes.insert( std::make_pair( medType, smdsType )); } } return med2smeshTypes; @@ -254,7 +255,7 @@ namespace // change at insertion of new items in the middle. //const vector& medTypes = mesh2medElemType(); - vector data; + std::vector data; for ( size_t i = 0; i < meshInfo->length(); ++i ) if ( meshInfo[i] > 0 ) @@ -298,7 +299,7 @@ void SMESH_PreMeshInfo::hdf2meshInfo( const std::string& name, // // array->GetDim( datasetSize ); // int size = dataset->GetSize(); - vector info( SMDSEntity_Last * 2, 0 ); + std::vector info( SMDSEntity_Last * 2, 0 ); dataset->ReadFromDisk( &info[0] ); dataset->CloseOnDisk(); @@ -429,7 +430,7 @@ bool SMESH_PreMeshInfo::readPreInfoFromHDF() group_i->changePreMeshInfo() = newInstance(); if ( SMESHDS_GroupBase* group = group_i->GetGroupDS() ) { - const string name = group->GetStoreName(); + const std::string name = group->GetStoreName(); group_i->changePreMeshInfo()->hdf2meshInfo( name, infoHdfGroup ); } } @@ -499,7 +500,7 @@ void SMESH_PreMeshInfo::readGroupInfo() if ( _mesh->_mapGroups.empty() ) return; // make SMESH_PreMeshInfo of groups - map< string, SMESH_PreMeshInfo* > name2GroupInfo; + map< std::string, SMESH_PreMeshInfo* > name2GroupInfo; map::const_iterator i2group = _mesh->_mapGroups.begin(); for ( ; i2group != _mesh->_mapGroups.end(); ++i2group ) { @@ -510,8 +511,8 @@ void SMESH_PreMeshInfo::readGroupInfo() group_i->changePreMeshInfo() = info; if ( SMESHDS_Group* group = dynamic_cast< SMESHDS_Group* >( group_i->GetGroupDS() )) { - string name = group->GetStoreName(); - name2GroupInfo.insert( make_pair( name, info )); + std::string name = group->GetStoreName(); + name2GroupInfo.insert( std::make_pair( name, info )); info->_isInfoOk = true; } } @@ -534,8 +535,8 @@ void SMESH_PreMeshInfo::readGroupInfo() vector< SMESH_PreMeshInfo* >& grInfoVec = famId2grInfo[ medFamInfo->GetId() ]; for ( int iG = 0; iG < nbGroups; ++iG ) { - const string grName = medFamInfo->GetGroupName( iG ); - map< string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.find( grName ); + const std::string grName = medFamInfo->GetGroupName( iG ); + map< std::string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.find( grName ); if ( n2i != name2GroupInfo.end() ) grInfoVec.push_back( n2i->second ); } @@ -560,14 +561,14 @@ void SMESH_PreMeshInfo::readGroupInfo() f2infos = famId2grInfo.find( famNums[i] ); if ( f2infos == famId2grInfo.end() ) f2infos = famId2grInfo.insert - ( make_pair( famNums[i], vector< SMESH_PreMeshInfo*>())).first; + ( std::make_pair( famNums[i], vector< SMESH_PreMeshInfo*>())).first; } vector< SMESH_PreMeshInfo* >& infoVec = f2infos->second ; for ( size_t j = 0; j < infoVec.size(); ++j ) infoVec[j]->_elemCounter++; } // pass _elemCounter to a real elem type - map< string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.begin(); + map< std::string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.begin(); for ( ; n2i != name2GroupInfo.end(); ++n2i ) { SMESH_PreMeshInfo* info = n2i->second; @@ -618,7 +619,7 @@ void SMESH_PreMeshInfo::readSubMeshInfo() for ( int isNode = 0; isNode < 2; ++isNode ) { - string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); + std::string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() )) { // read sub-mesh id of all nodes or elems @@ -893,7 +894,7 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const SMDS_ElemIteratorPtr eIt = meshDS->elementsIterator(); for ( int isNode = 0; isNode < 2; ++isNode ) { - string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); + std::string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() )) { HDFdataset* aDataset = new HDFdataset( (char*) aDSName.c_str(), aGroup ); diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx index 20e7048b9..e59c60886 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx @@ -58,6 +58,7 @@ #include #include +using namespace std; #ifdef _DEBUG_ // #define DEB_FACES diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx index 5545f781a..ac251c03d 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx @@ -57,15 +57,15 @@ public: private: - bool findBoxFaces( const TopoDS_Shape& shape, - list< _QuadFaceGrid >& boxFaceContainer, - SMESH_Mesh& mesh, - _QuadFaceGrid * & fBottom, - _QuadFaceGrid * & fTop, - _QuadFaceGrid * & fFront, - _QuadFaceGrid * & fBack, - _QuadFaceGrid * & fLeft, - _QuadFaceGrid * & fRight); + bool findBoxFaces( const TopoDS_Shape& shape, + std::list< _QuadFaceGrid >& boxFaceContainer, + SMESH_Mesh& mesh, + _QuadFaceGrid * & fBottom, + _QuadFaceGrid * & fTop, + _QuadFaceGrid * & fFront, + _QuadFaceGrid * & fBack, + _QuadFaceGrid * & fLeft, + _QuadFaceGrid * & fRight); }; #endif diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index 3849040e9..d0c258936 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -56,6 +56,8 @@ #include "utilities.h" +using namespace std; + //================================================================================ /*! * \brief Constructor of a side of one edge @@ -71,7 +73,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, const bool theIgnoreMediumNodes, SMESH_ProxyMesh::Ptr theProxyMesh) { - list edges(1,theEdge); + std::list edges(1,theEdge); *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward, theIgnoreMediumNodes, theProxyMesh ); } @@ -82,12 +84,12 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, */ //================================================================================ -StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, - list& theEdges, - SMESH_Mesh* theMesh, - const bool theIsForward, - const bool theIgnoreMediumNodes, - SMESH_ProxyMesh::Ptr theProxyMesh) +StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, + std::list& theEdges, + SMESH_Mesh* theMesh, + const bool theIsForward, + const bool theIgnoreMediumNodes, + SMESH_ProxyMesh::Ptr theProxyMesh) { int nbEdges = theEdges.size(); myEdge.resize ( nbEdges ); @@ -112,7 +114,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS(); int nbDegen = 0; - list::iterator edge = theEdges.begin(); + std::list::iterator edge = theEdges.begin(); for ( int index = 0; edge != theEdges.end(); ++index, ++edge ) { int i = theIsForward ? index : nbEdges-index-1; @@ -302,8 +304,8 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(UVPtStructVec& theSideNodes, */ //================================================================================ -const vector& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst, - double constValue) const +const std::vector& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst, + double constValue) const { if ( myPoints.empty() ) { diff --git a/src/StdMeshers/StdMeshers_Geometric1D.cxx b/src/StdMeshers/StdMeshers_Geometric1D.cxx index dd77350f7..031fd7ea1 100644 --- a/src/StdMeshers/StdMeshers_Geometric1D.cxx +++ b/src/StdMeshers/StdMeshers_Geometric1D.cxx @@ -166,7 +166,7 @@ bool StdMeshers_Geometric1D::SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Edge& edge = TopoDS::Edge( edgeMap( i )); BRepAdaptor_Curve C( edge ); - vector< double > params; + std::vector< double > params; if ( SMESH_Algo::GetNodeParamOnEdge( theMesh->GetMeshDS(), edge, params )) { nbEdges++; diff --git a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx index 6f87ebf4a..5cd779b75 100644 --- a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx +++ b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx @@ -33,6 +33,8 @@ #include +using namespace std; + // Define error message and _MYDEBUG_ if needed #ifdef _DEBUG_ #define BAD_MESH_ERR \ diff --git a/src/StdMeshers/StdMeshers_Prism_3D.hxx b/src/StdMeshers/StdMeshers_Prism_3D.hxx index 0a2428401..9788b64a1 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.hxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.hxx @@ -270,7 +270,7 @@ private: TParam2ColumnMap* myParamToColumnMap; PSurface mySurface; TopoDS_Edge myBaseEdge; - map< int, PSurface > myShapeID2Surf; + std::map< int, PSurface > myShapeID2Surf; // first and last normalized params and orientaion for each component or it-self std::vector< std::pair< double, double> > myParams; // select my columns in myParamToColumnMap bool myIsForward; diff --git a/src/StdMeshers/StdMeshers_Projection_3D.cxx b/src/StdMeshers/StdMeshers_Projection_3D.cxx index d8bce83cd..f260a2d6f 100644 --- a/src/StdMeshers/StdMeshers_Projection_3D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_3D.cxx @@ -57,6 +57,7 @@ namespace TAssocTool = StdMeshers_ProjectionUtils; +using namespace std; //======================================================================= //function : StdMeshers_Projection_3D diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx index 55e0d19ab..acd202846 100644 --- a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx @@ -61,6 +61,8 @@ #include #include +using namespace std; + //================================================================================ /*! * \brief 1D algo diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx index 460a5e4ab..936a5e1c2 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx @@ -82,7 +82,7 @@ struct FaceQuadStruct return GetUVPtStruct()[ to-nbNodeOut-(IsReversed() ? -1 : +1)]; } // some sortcuts - const vector& GetUVPtStruct(bool isXConst=0, double constValue=0) const + const std::vector& GetUVPtStruct(bool isXConst=0, double constValue=0) const { return nbNodeOut ? grid->SimulateUVPtStruct( NbPoints()-nbNodeOut-1, isXConst, constValue ) : grid->GetUVPtStruct( isXConst, constValue ); diff --git a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx index 9036dc18b..decbc2a62 100644 --- a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx +++ b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx @@ -38,7 +38,7 @@ StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D :SMESH_0D_Algo(hypId, studyId, gen) { _name = "SegmentAroundVertex_0D"; - // it is assigned to vertices but influence a state of EDGE submeshes + // it is assigned to vertices but influence a state of EDGE submeshes _shapeType = (1 << TopAbs_VERTEX); // 1 bit per shape type _compatibleHypothesis.push_back("SegmentLengthAroundVertex"); @@ -55,16 +55,17 @@ StdMeshers_SegmentAroundVertex_0D::~StdMeshers_SegmentAroundVertex_0D() //======================================================================= //function : CheckHypothesis -//purpose : +//purpose : //======================================================================= -bool StdMeshers_SegmentAroundVertex_0D::CheckHypothesis(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - SMESH_Hypothesis::Hypothesis_Status& aStatus) +bool StdMeshers_SegmentAroundVertex_0D:: +CheckHypothesis(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + SMESH_Hypothesis::Hypothesis_Status& aStatus) { - list ::const_iterator itl; + std::list ::const_iterator itl; - const list &hyps = GetUsedHypothesis(aMesh, aShape); + const std::list &hyps = GetUsedHypothesis(aMesh, aShape); if ( hyps.size() == 0 ) { aStatus = SMESH_Hypothesis::HYP_MISSING; @@ -84,7 +85,7 @@ bool StdMeshers_SegmentAroundVertex_0D::CheckHypothesis(SMESH_Mesh& //======================================================================= //function : Compute -//purpose : +//purpose : //======================================================================= bool StdMeshers_SegmentAroundVertex_0D::Compute(SMESH_Mesh&, const TopoDS_Shape&) diff --git a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx index 9ca0a8ee8..0ea622706 100644 --- a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx @@ -178,8 +178,8 @@ void StdMeshers_CartesianParameters3D_i::SetGridSpacing(const SMESH::string_arra CORBA::Short axis) throw (SALOME::SALOME_Exception) { - vector funVec; - vector pointVec; + std::vector funVec; + std::vector pointVec; _array2vec( spaceFunctions, funVec, (const char*) ); _array2vec( internalPoints, pointVec, ); @@ -209,8 +209,8 @@ void StdMeshers_CartesianParameters3D_i::GetGridSpacing(SMESH::string_array_out { ASSERT( myBaseImpl ); try { - vector funVec; - vector pointVec; + std::vector funVec; + std::vector pointVec; this->GetImpl()->GetGridSpacing( funVec, pointVec, axis ); xSpaceFunctions = new SMESH::string_array(); @@ -394,8 +394,8 @@ StdMeshers_CartesianParameters3D_i::ComputeCoordinates(CORBA::Double const char* axisName ) throw (SALOME::SALOME_Exception) { - vector xFuns; - vector xPoints, coords; + std::vector xFuns; + std::vector xPoints, coords; _array2vec( spaceFuns, xFuns, (const char*) ); _array2vec( points, xPoints, ); diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx index ed0ce004c..8120ca384 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx @@ -111,7 +111,7 @@ public: std::string str; if (stream >> str) { if ( StudyContext* myStudyContext = gen->GetCurrentStudyContext() ) { - string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() )); + std::string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() )); if ( !ior.empty() ) return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() )); } diff --git a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx index 13e86c06a..a059ff39e 100644 --- a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx @@ -79,7 +79,7 @@ void StdMeshers_Reversible1D_i::SetReversedEdges( const SMESH::long_array& theId void StdMeshers_Reversible1D_i::SetObjectEntry( const char* theEntry ) { - string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping + std::string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping try { this->GetImpl()->SetObjectEntry( entry.c_str() ); // Update Python script From e1b9f3df7a331d038ee378607a2b0e01d9481801 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 15 Feb 2016 15:49:45 +0300 Subject: [PATCH 11/48] CMake: simplifying Python detection mechanism. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03e0f5357..33efb9f10 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,8 @@ MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB) # Various # Python -FIND_PACKAGE(SalomePython REQUIRED) +FIND_PACKAGE(SalomePythonInterp REQUIRED) +FIND_PACKAGE(SalomePythonLibs REQUIRED) # PThread FIND_PACKAGE(SalomePThread REQUIRED) # SWIG From 971a1433b37f071c05729600d2d64bbb44616734 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 12 Feb 2016 09:32:57 +0300 Subject: [PATCH 12/48] Merge relevant changes from V8_0_0_BR branch --- SalomeSMESHConfig.cmake.in | 48 ++++++++++--------- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx | 8 ++-- src/SMESHGUI/SMESHGUI_MergeDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshInfo.cxx | 4 +- src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx | 8 ++-- .../StdMeshersGUI_CartesianParamCreator.cxx | 8 ++-- .../StdMeshersGUI_NbSegmentsCreator.cxx | 20 ++++---- 9 files changed, 53 insertions(+), 51 deletions(-) diff --git a/SalomeSMESHConfig.cmake.in b/SalomeSMESHConfig.cmake.in index 8a8827406..3ec182cbe 100644 --- a/SalomeSMESHConfig.cmake.in +++ b/SalomeSMESHConfig.cmake.in @@ -75,32 +75,34 @@ IF(SALOME_SMESH_USE_TBB) SET_AND_CHECK(TBB_ROOT_DIR_EXP "@PACKAGE_TBB_ROOT_DIR@") ENDIF() -# For all prerequisites, load the corresponding targets if the package was used +# For all prerequisites, load the corresponding targets if the package was used # in CONFIG mode. This ensures dependent projects link correctly # without having to set LD_LIBRARY_PATH: -SET(_PREREQ @_PREREQ_LIST@) -SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@) -SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@") -LIST(LENGTH _PREREQ_CONFIG_DIR _list_len) -IF(NOT _list_len EQUAL 0) +SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@) +SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@) +SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@") +LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@) +IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0) # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ... - MATH(EXPR _range "${_list_len}-1") - FOREACH(_p RANGE ${_range}) - LIST(GET _PREREQ ${_p} _pkg ) - LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir) - LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo) - MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...") - IF(NOT _pkg_compo) - FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - PATHS "${_pkg_dir}" - NO_DEFAULT_PATH) - ELSE() - STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}") - MESSAGE(STATUS "===> (components: ${_pkg_compo})") - FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - COMPONENTS ${_compo_lst} - PATHS "${_pkg_dir}" - NO_DEFAULT_PATH) + MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1") + FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@}) + LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ ) + LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@) + LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@) + IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@}) + MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...") + IF(NOT _pkg_compo_@PROJECT_NAME@) + FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE + PATHS "${_pkg_dir_@PROJECT_NAME@}" + NO_DEFAULT_PATH) + ELSE() + STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}") + MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})") + FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE + COMPONENTS ${_compo_lst_@PROJECT_NAME@} + PATHS "${_pkg_dir_@PROJECT_NAME@}" + NO_DEFAULT_PATH) + ENDIF() ENDIF() ENDFOREACH() ENDIF() diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 4cf85c89f..ad1a5c5cd 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -1733,7 +1733,7 @@ void SMESHGUI_PrecomputeOp::initDialog() myOrderMgr = new SMESHGUI_MeshOrderMgr( myDlg->getMeshOrderBox() ); myOrderMgr->SetMesh( myMesh ); bool isOrder = myOrderMgr->GetMeshOrder(myPrevOrder); - myDlg->getMeshOrderBox()->setShown(isOrder); + myDlg->getMeshOrderBox()->setVisible(isOrder); if ( !isOrder ) { delete myOrderMgr; myOrderMgr = 0; diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx index 47c2f8eec..da805271a 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx @@ -378,7 +378,7 @@ void SMESHGUI_CreatePatternDlg::onSave() SUIT_FileDlg* aDlg = new SUIT_FileDlg( this, false ); aDlg->setWindowTitle( tr( "SAVE_PATTERN" ) ); aDlg->setFileMode( QFileDialog::AnyFile ); - aDlg->setFilter( tr( "PATTERN_FILT" ) ); + aDlg->setNameFilter( tr( "PATTERN_FILT" ) ); if ( myName->text() != "" ) aDlg->selectFile( myName->text() ); @@ -392,7 +392,7 @@ void SMESHGUI_CreatePatternDlg::onSave() if ( QFileInfo( fName ).suffix().isEmpty() ) fName = autoExtension( fName ); - fName = QDir::convertSeparators( fName ); + fName = QDir::toNativeSeparators( fName ); QString aData( myPattern->GetString() ); long aLen = aData.length(); diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index c4b0465de..e7a519e03 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -611,7 +611,7 @@ void SMESHGUI_FilterLibraryDlg::onBrowse() //aDlg->setMode(myMode == COPY_FROM ? QFileDialogP::ExistingFile : QFileDialogP::AnyFile); aDlg->setFileMode(myMode == COPY_FROM ? QFileDialog::ExistingFile : QFileDialog::AnyFile); - aDlg->setFilters(prepareFilters()); + aDlg->setNameFilters(prepareFilters()); aDlg->selectFile(getFileName()); QPushButton* anOkBtn = (QPushButton*)aDlg->findChild("OK"); @@ -629,8 +629,8 @@ void SMESHGUI_FilterLibraryDlg::onBrowse() if (QFileInfo(fName).suffix().isEmpty()) fName = autoExtension(fName); - fName = QDir::convertSeparators(fName); - QString prev = QDir::convertSeparators(getFileName()); + fName = QDir::toNativeSeparators(fName); + QString prev = QDir::toNativeSeparators(getFileName()); if (prev == fName) return; @@ -756,7 +756,7 @@ bool SMESHGUI_FilterLibraryDlg::isPermissionValid(const bool theIsExistingOnly) if (QFileInfo(fName).suffix().isEmpty()) fName = autoExtension(fName); - fName = QDir::convertSeparators(fName); + fName = QDir::toNativeSeparators(fName); if (QFileInfo(fName).exists()) { isWritable = QFileInfo(fName).isWritable(); diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index 46e68d346..e1df393fa 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -102,7 +102,7 @@ QPixmap SMESHGUI_MergeDlg::IconFirst() " .. ... ... ", " .. .. .. ", " . . "}; - return iconFirst; + return QPixmap( iconFirst ); } //================================================================================= diff --git a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx index 7957b4fdd..f16d08d87 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx @@ -3147,7 +3147,7 @@ void SMESHGUI_MeshInfoDlg::dump() DumpFileDlg fd( this ); fd.setWindowTitle( tr( "SAVE_INFO" ) ); - fd.setFilters( aFilters ); + fd.setNameFilters( aFilters ); fd.myBaseChk->setChecked( anIsBase ); fd.myElemChk->setChecked( anIsElem ); fd.myAddChk ->setChecked( anIsAdd ); @@ -3858,7 +3858,7 @@ void SMESHGUI_CtrlInfoDlg::dump() DumpFileDlg fd( this ); fd.setWindowTitle( tr( "SAVE_INFO" ) ); - fd.setFilters( aFilters ); + fd.setNameFilters( aFilters ); fd.myBaseChk->hide(); fd.myElemChk->hide(); fd.myAddChk ->hide(); diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index dd4d75337..654e6d6ce 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -809,10 +809,10 @@ void SMESHGUI_MeshPatternDlg::onOpen() SUIT_FileDlg* aDlg = new SUIT_FileDlg (this, true); aDlg->setWindowTitle(tr("LOAD_PATTERN")); aDlg->setFileMode(QFileDialog::ExistingFile); - aDlg->setFilters(prepareFilters()); + aDlg->setNameFilters(prepareFilters()); if (!myName->text().isEmpty()) aDlg->selectFile(myName->text() + ".smp"); - QPushButton* anOkBtn = qFindChild( aDlg, "OK" ); + QPushButton* anOkBtn = aDlg->findChild( "OK" ); if (anOkBtn != 0) anOkBtn->setText(tr("SMESH_BUT_OK")); @@ -826,9 +826,9 @@ void SMESHGUI_MeshPatternDlg::onOpen() if (QFileInfo(fName).suffix().isEmpty()) fName = autoExtension(fName); - fName = QDir::convertSeparators(fName); + fName = QDir::toNativeSeparators(fName); - QString prev = QDir::convertSeparators(myName->text()); + QString prev = QDir::toNativeSeparators(myName->text()); if (prev == fName) return; diff --git a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx index 762bccdec..21f64ed4f 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx @@ -319,10 +319,10 @@ namespace StdMeshersGUI void GridAxisTab::onMode(int isSpacing) { - mySpacingTreeWdg->setShown( isSpacing ); - myCoordList->setShown( !isSpacing ); - myStepSpin->setShown( !isSpacing ); - myStepLabel->setShown( !isSpacing ); + mySpacingTreeWdg->setVisible( isSpacing ); + myCoordList->setVisible( !isSpacing ); + myStepSpin->setVisible( !isSpacing ); + myStepLabel->setVisible( !isSpacing ); if ( isSpacing ) { if ( mySpacingTreeWdg->topLevelItemCount() == 0 ) diff --git a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx index 9a9f2756b..e7f35d1f3 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx @@ -447,25 +447,25 @@ void StdMeshersGUI_NbSegmentsCreator::onValueChanged() myTable->setData( arr ); //update data in table } - myScale->setShown( distr==1 ); - myLScale->setShown( distr==1 ); - myReversedEdgesBox->setShown( distr!=0 ); + myScale->setVisible( distr==1 ); + myLScale->setVisible( distr==1 ); + myReversedEdgesBox->setVisible( distr!=0 ); if ( myReversedEdgesHelper ) { myReversedEdgesHelper->Clear(); - myReversedEdgesHelper->setShown( distr!=0 ); + myReversedEdgesHelper->setVisible( distr!=0 ); } myDirectionWidget->ShowPreview( distr!=0 ); bool isFunc = distr==2 || distr==3; #ifndef DISABLE_PLOT2DVIEWER - myPreview->setShown( isFunc ); + myPreview->setVisible( isFunc ); #endif - myConvBox->setShown( isFunc ); + myConvBox->setVisible( isFunc ); - myTable->setShown( distr==2 ); - myExpr->setShown( distr==3 ); - myLExpr->setShown( distr==3 ); - myInfo->setShown( distr==3); + myTable->setVisible( distr==2 ); + myExpr->setVisible( distr==3 ); + myLExpr->setVisible( distr==3 ); + myInfo->setVisible( distr==3); #ifndef DISABLE_PLOT2DVIEWER //change of preview From 3da8fefe9c957f4538e9eacf013ce678df4d6c91 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 17 Feb 2016 20:36:53 +0300 Subject: [PATCH 13/48] 23239: [CEA 1739] Regression : crash trying to create mesh (StdMesher_Prism_3D.cxx) + minor changes --- .../gui/SMESH/images/quad_from_ma_mesh.png | Bin 10961 -> 6101 bytes src/SMESH/SMESH_Mesh.hxx | 2 +- src/SMESHUtils/SMESH_MAT2d.cxx | 10 +++++--- src/SMESHUtils/SMESH_MAT2d.hxx | 6 ++--- src/StdMeshers/StdMeshers_Prism_3D.cxx | 23 +++++++++++------- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/doc/salome/gui/SMESH/images/quad_from_ma_mesh.png b/doc/salome/gui/SMESH/images/quad_from_ma_mesh.png index f233cc640783dea9f48b8889bf27a8d5e9920fc7..3e3c63b23bd8d64dddc806f68f5bb70b7a974ffc 100644 GIT binary patch literal 6101 zcmV;`7b@t9P)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01m_e01m_fl`9S#00007bV*G`2j2<^ z5(o?65fF+102ftBL_t(|+U=cfa_hFTMIpzPDcnDqmM0m{F?v6gr%*t5qXB{-KGv>V zw;UfI9f>9vHZ~fKM?k&wd_Et);ra9Le?ETy|NB4T_5Ig(-e3It_2a>%Lugxla|ya) z`X@&73)aW)M?d_0KEX6XFdAL1$K&yQK2s1!n0|Zhl-dZP-SovJ=#A+^*74$U#Nx

      LgUG@>#U>YG9je29+pFXpGh!BiMz4bQE zk$rws`&g5Q5Q5RDpOrp>ICaetwg3G|tTaM9iMozEF`e4yccsUh+EEfhnFm69fr3kL zqoT#bsOs*+K7Ve0i4czvT2*8nH(TlB2Jv*mVVZaZLJx#sH0qD(*kb?4d&HyA156{d zI3l7C{ia!v@Jn?Z|o9*rG)oDY)a+MRE^x0hG0< z%}C+o<2n=8bGyRm`7r%{B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ks0sQwJ0CH$?58rFcE_7dqn$mGwqs zkiWUjvz1HHQsn)s?Md(>WIIM%_RDOu_^MN4kTbVvopPSpK$|2$P4VrsZn3DzX5R+> z!p*6Y@4sW0RFz(?l zC*v!z+&;#V;n_sXx@cZSV?~MGmFw};`IGx}=LKj$3tI-xY71AknY~yMlJpTBfc3xE zEw@+*ER4d|qeK<-0F8O?md_i%&G;&yfaLrM&G5GadZUp-mv8`x<{ll^uF4Q+uM%LA zyy6VQ2fD0g-ba`}l_@qZjTxq0ZI1FmrMPY5usd{?uHXK7XL2#zzc5nrU;QEgL@B4K zrNMif=o0Q>A3`ec(ouyA06%MOeG0|F;lBg#QCeeiG$6V-Gu28~K-I`riP%9Gvltzi zQc6}MV{gb7Xsz{qwapW&iw1;Q$%=p@3XOC(!exq&M4hT5-?9T;YZ?(cnuStzj9J(V zVLo_yDAv#UL~|`0_Qm_$l`K)HRC&IjgOGczQkG55FHrcHNpBIVh6{KN)+|K2^~UvB zwG*L01kP^gmYyyz3KoePg)0ST;sgGwSKBv-)&t&u^Qy0xBiK-;`-7=3BlzETDtHKD z|3UeRvK*&y|4XM|#%_Lr`lk}~gmJ@fshVUcW(Ck=RKlUv_2Wst3vVzcu=v?CJHPqa zRjrqlkG%!19LJ8=jpH#j<}$x)#4XI{T;6p;D_I_?H<~lnSVVwUjDf HSOoqb3W$dn diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index 5221ab7d2..fc00be6a7 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -344,7 +344,7 @@ class SMESH_EXPORT SMESH_Mesh bool IsOrderOK( const SMESH_subMesh* smBefore, const SMESH_subMesh* smAfter ) const; - ostream& Dump(ostream & save); + std::ostream& Dump(ostream & save); private: diff --git a/src/SMESHUtils/SMESH_MAT2d.cxx b/src/SMESHUtils/SMESH_MAT2d.cxx index c9fcd8501..7b9eac3c2 100644 --- a/src/SMESHUtils/SMESH_MAT2d.cxx +++ b/src/SMESHUtils/SMESH_MAT2d.cxx @@ -47,7 +47,7 @@ #include #ifdef _DEBUG_ -#define _MYDEBUG_ +//#define _MYDEBUG_ #include "SMESH_File.hxx" #include "SMESH_Comment.hxx" #endif @@ -162,6 +162,8 @@ namespace if ( inSegments.size() > 1000 ) return; const char* fileName = "/misc/dn25/salome/eap/salome/misc/Code/C++/MAdebug.txt"; + const char* user = getenv("USER"); + if ( !user || strcmp( user, "eap" )) return; SMESH_File file(fileName, false ); file.remove(); file.openForWriting(); @@ -1518,9 +1520,9 @@ Adaptor3d_Curve* SMESH_MAT2d::MedialAxis::make3DCurve(const Branch& branch) cons */ //================================================================================ -void SMESH_MAT2d::Branch::init( vector& maEdges, - const Boundary* boundary, - map< const TVDVertex*, BranchEndType > endType ) +void SMESH_MAT2d::Branch::init( vector& maEdges, + const Boundary* boundary, + map< const TVDVertex*, BranchEndType >& endType ) { if ( maEdges.empty() ) return; diff --git a/src/SMESHUtils/SMESH_MAT2d.hxx b/src/SMESHUtils/SMESH_MAT2d.hxx index 618608e07..328366cce 100644 --- a/src/SMESHUtils/SMESH_MAT2d.hxx +++ b/src/SMESHUtils/SMESH_MAT2d.hxx @@ -120,9 +120,9 @@ namespace SMESH_MAT2d public: // internal: construction - void init( std::vector& maEdges, - const Boundary* boundary, - std::map< const TVDVertex*, BranchEndType > endType); + void init( std::vector& maEdges, + const Boundary* boundary, + std::map< const TVDVertex*, BranchEndType >& endType); void setBranchesToEnds( const std::vector< Branch >& branches); BranchPoint getPoint( const TVDVertex* vertex ) const; void setRemoved( const BranchPoint& proxyPoint ); diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 645bad1e2..8b7347d7b 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -2512,16 +2512,17 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() } EdgeWithNeighbors() {} }; - struct PrismSide + // PrismSide contains all FACEs linking a bottom EDGE with a top one. + struct PrismSide { - TopoDS_Face _face; - TopTools_IndexedMapOfShape *_faces; // pointer because its copy constructor is private - TopoDS_Edge _topEdge; - vector< EdgeWithNeighbors >*_edges; - int _iBotEdge; - vector< bool > _isCheckedEdge; + TopoDS_Face _face; // a currently treated upper FACE + TopTools_IndexedMapOfShape *_faces; // all FACEs (pointer because of a private copy constructor) + TopoDS_Edge _topEdge; // a current top EDGE + vector< EdgeWithNeighbors >*_edges; // all EDGEs of _face + int _iBotEdge; // index of _topEdge within _edges + vector< bool > _isCheckedEdge; // mark EDGEs whose two owner FACEs found int _nbCheckedEdges; // nb of EDGEs whose location is defined - PrismSide *_leftSide; + PrismSide *_leftSide; // neighbor sides PrismSide *_rightSide; void SetExcluded() { _leftSide = _rightSide = NULL; } bool IsExcluded() const { return !_leftSide; } @@ -2679,7 +2680,7 @@ bool StdMeshers_Prism_3D::IsApplicable(const TopoDS_Shape & shape, bool toCheckA typedef vector< EdgeWithNeighbors > TEdgeWithNeighborsVec; vector< TEdgeWithNeighborsVec > faceEdgesVec( allFaces.Extent() + 1 ); - const size_t nbEdgesMax = facesOfEdge.Extent() * 2; // there can be seam EDGES + const size_t nbEdgesMax = facesOfEdge.Extent() * 2; // there can be seam EDGEs TopTools_IndexedMapOfShape* facesOfSide = new TopTools_IndexedMapOfShape[ nbEdgesMax ]; SMESHUtils::ArrayDeleter delFacesOfSide( facesOfSide ); @@ -2815,6 +2816,10 @@ bool StdMeshers_Prism_3D::IsApplicable(const TopoDS_Shape & shape, bool toCheckA side._isCheckedEdge[ side._iBotEdge ] = true; side._nbCheckedEdges = 1; // bottom EDGE is known } + else // probably a triangular top face found + { + side._face.Nullify(); + } side._topEdge.Nullify(); isOK = ( !side._edges->empty() || side._faces->Extent() > 1 ); From 5218291db413b71dd88a5590a40a961703ceb826 Mon Sep 17 00:00:00 2001 From: imn Date: Fri, 19 Feb 2016 15:40:34 +0300 Subject: [PATCH 14/48] INT PAL 0053058: '2D Quadratic' item is shown in VTK context menu for non-quadratic mesh --- src/SMESHGUI/SMESHGUI.cxx | 4 ++-- src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx | 2 +- src/SMESHGUI/SMESHGUI_ConvToQuadOp.h | 4 ++-- src/SMESHGUI/SMESHGUI_Selection.cxx | 20 ++++++++++++++++++++ src/SMESHGUI/SMESHGUI_Selection.h | 1 + 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index d72312ddb..2b367eb97 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -4487,11 +4487,11 @@ void SMESHGUI::initialize( CAM_Application* app ) //------------------------------------------------- anId = popupMgr()->insert( tr( "MEN_QUADRATIC_REPRESENT" ), -1, -1 ); popupMgr()->insert( action( SMESHOp::OpRepresentationLines ), anId, -1 ); - popupMgr()->setRule( action( SMESHOp::OpRepresentationLines ), aMeshInVTK + "and isVisible",QtxPopupMgr::VisibleRule ); + popupMgr()->setRule( action( SMESHOp::OpRepresentationLines ), aMeshInVTK + "&& isVisible && isQuadratic",QtxPopupMgr::VisibleRule ); popupMgr()->setRule( action( SMESHOp::OpRepresentationLines ), "quadratic2DMode = 'eLines'", QtxPopupMgr::ToggleRule ); popupMgr()->insert( action( SMESHOp::OpRepresentationArcs ), anId, -1 ); - popupMgr()->setRule( action( SMESHOp::OpRepresentationArcs ), aMeshInVTK + "and isVisible", QtxPopupMgr::VisibleRule ); + popupMgr()->setRule( action( SMESHOp::OpRepresentationArcs ), aMeshInVTK + "&& isVisible && isQuadratic", QtxPopupMgr::VisibleRule ); popupMgr()->setRule( action( SMESHOp::OpRepresentationArcs ), "quadratic2DMode = 'eArcs'", QtxPopupMgr::ToggleRule ); //------------------------------------------------- diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx index cc60fc471..b79102f05 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx @@ -326,7 +326,7 @@ void SMESHGUI_ConvToQuadOp::onWarningWinFinished() SMESHGUI_ConvToQuadOp::MeshDestinationType SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSource, - bool* isMixOrder) const + bool* isMixOrder) { SMESH::long_array_var nbElemOfType = idSource->GetMeshInfo(); diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h index e700c8f09..305ded865 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h @@ -52,12 +52,12 @@ public: virtual LightApp_Dialog* dlg() const; + static MeshDestinationType DestinationMesh( const SMESH::SMESH_IDSource_var& , + bool* isMixOrder = 0); protected: virtual void startOperation(); virtual void selectionDone(); virtual SUIT_SelectionFilter* createFilter( const int ) const; - MeshDestinationType DestinationMesh( const SMESH::SMESH_IDSource_var& , - bool* isMixOrder = 0) const; protected slots: virtual bool onApply(); diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 3d446d96d..8c12c817b 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -32,6 +32,7 @@ #include "SMESHGUI_VTKUtils.h" #include "SMESHGUI_GEOMGenUtils.h" #include "SMESHGUI_ComputeDlg.h" +#include "SMESHGUI_ConvToQuadOp.h" #include #include @@ -133,6 +134,7 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const else if ( p=="isImported" ) val = QVariant( isImported( ind ) ); else if ( p=="facesOrientationMode" ) val = QVariant( facesOrientationMode( ind ) ); else if ( p=="groupType" ) val = QVariant( groupType( ind ) ); + else if ( p=="isQuadratic" ) val = QVariant( isQuadratic( ind ) ); else if ( p=="quadratic2DMode") val = QVariant( quadratic2DMode( ind ) ); else if ( p=="isDistributionVisible") val = QVariant( isDistributionVisible( ind ) ); else if ( p=="isScalarBarVisible") val = QVariant( isScalarBarVisible( ind ) ); @@ -231,6 +233,24 @@ QString SMESHGUI_Selection::displayMode( int ind ) const return "Unknown"; } +//======================================================================= +//function : isQuadratic +//purpose : return true if the mesh has quadratic/bi-quadratic type +//======================================================================= + +bool SMESHGUI_Selection::isQuadratic( int ind ) const +{ + _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + if ( !so ) + return false; + SMESH::SMESH_IDSource_var idSource = SMESH::SObjectToInterface( so ); + if ( idSource->_is_nil() ) + return false; + SMESHGUI_ConvToQuadOp::MeshDestinationType meshTgtType = SMESHGUI_ConvToQuadOp::DestinationMesh( idSource ); + if ( meshTgtType & SMESHGUI_ConvToQuadOp::MeshDestinationType::Linear ) + return true; + return false; +} //======================================================================= //function : quadratic2DMode diff --git a/src/SMESHGUI/SMESHGUI_Selection.h b/src/SMESHGUI/SMESHGUI_Selection.h index e3146cad3..c62f14a5d 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -62,6 +62,7 @@ public: virtual bool isEditableHyp( int ) const; virtual bool isVisible( int ) const; + virtual bool isQuadratic( int ) const; virtual QString quadratic2DMode( int ) const; virtual bool isDistributionVisible( int ) const; From c31ad1186e5aa32ebb853f01bf4b1ff6c2af06a5 Mon Sep 17 00:00:00 2001 From: vsr Date: Sat, 20 Feb 2016 10:20:57 +0300 Subject: [PATCH 15/48] C++98 compatibility (remove C++11 staff) --- src/SMESHGUI/SMESHGUI_Selection.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 8c12c817b..9895612c3 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -247,7 +247,7 @@ bool SMESHGUI_Selection::isQuadratic( int ind ) const if ( idSource->_is_nil() ) return false; SMESHGUI_ConvToQuadOp::MeshDestinationType meshTgtType = SMESHGUI_ConvToQuadOp::DestinationMesh( idSource ); - if ( meshTgtType & SMESHGUI_ConvToQuadOp::MeshDestinationType::Linear ) + if ( meshTgtType & SMESHGUI_ConvToQuadOp::Linear ) return true; return false; } From 27d9294f19e0a124d6d4c1949e1e3cdc749578ad Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 24 Feb 2016 12:51:57 +0300 Subject: [PATCH 16/48] Windows compatibility. --- src/SMESH_I/SMESH_Measurements_i.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SMESH_I/SMESH_Measurements_i.cxx b/src/SMESH_I/SMESH_Measurements_i.cxx index 8da1cd7cf..b3e832b45 100644 --- a/src/SMESH_I/SMESH_Measurements_i.cxx +++ b/src/SMESH_I/SMESH_Measurements_i.cxx @@ -22,6 +22,10 @@ // File : SMESH_Measurements_i.cxx // Author : Pavel TELKOV, Open CASCADE S.A.S. (pavel.telkov@opencascade.com) +#ifdef WIN32 +#define NOMINMAX +#endif + #include "SMESH_Measurements_i.hxx" #include "SMESH_Gen_i.hxx" From 15a305400b400768e8de3632ae2623d9280d2e76 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Thu, 25 Feb 2016 11:27:34 +0100 Subject: [PATCH 17/48] set log verbosity, general crack dialog --- src/Tools/blocFissure/gmu/geomsmesh.py | 4 +- .../blocFissure/ihm/fissureCoude_plugin.py | 15 +- src/Tools/blocFissure/ihm/fissureGenerale.ui | 287 +++++++++++------- .../blocFissure/ihm/fissureGenerale_plugin.py | 27 +- 4 files changed, 210 insertions(+), 123 deletions(-) diff --git a/src/Tools/blocFissure/gmu/geomsmesh.py b/src/Tools/blocFissure/gmu/geomsmesh.py index aa8f02c93..4c61d1b92 100644 --- a/src/Tools/blocFissure/gmu/geomsmesh.py +++ b/src/Tools/blocFissure/gmu/geomsmesh.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -logging.info('start') +#logging.info('start') import initLog import salome @@ -13,7 +13,7 @@ geompy = geomBuilder.New(salome.myStudy) from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) -logging.debug("initialisation de geompy et smesh OK") +# logging.debug("initialisation de geompy et smesh OK") def geomPublish(level,aShape, aName): if initLog.getLogLevel() <= level: diff --git a/src/Tools/blocFissure/ihm/fissureCoude_plugin.py b/src/Tools/blocFissure/ihm/fissureCoude_plugin.py index d88841900..b50905f82 100644 --- a/src/Tools/blocFissure/ihm/fissureCoude_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureCoude_plugin.py @@ -25,14 +25,6 @@ import sys, traceback import math from blocFissure import gmu -from blocFissure.gmu import initLog -#initLog.setDebug() -initLog.setVerbose() - -from blocFissure.gmu import geomsmesh -from blocFissure.gmu.casStandard import casStandard - -from blocFissure.ihm.fissureCoude_ihm import fissureCoude_ihm def fissureCoudeDlg(context): # get context study, studyId, salomeGui @@ -363,6 +355,13 @@ def fissureCoudeDlg(context): return self.NOK def execute(self): + from blocFissure.gmu import initLog + #initLog.setDebug() + initLog.setVerbose() # don't set the level too early, to be able to modify it + from blocFissure.gmu import geomsmesh + from blocFissure.gmu.casStandard import casStandard + from blocFissure.ihm.fissureCoude_ihm import fissureCoude_ihm + dico = self.creeDico() NOK = self.testval(dico) if not(NOK): diff --git a/src/Tools/blocFissure/ihm/fissureGenerale.ui b/src/Tools/blocFissure/ihm/fissureGenerale.ui index 3f2cf9c3d..503b56e6c 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale.ui +++ b/src/Tools/blocFissure/ihm/fissureGenerale.ui @@ -6,8 +6,8 @@ 0 0 - 631 - 560 + 629 + 536 @@ -16,7 +16,7 @@ <html><head/><body><p>Insertion d'un maillage de fissure dans un maillage hexaédrique sain.</p><p>Le maillage sain est fourni sous forme de fichier Med.</p><p>La face de fissure est décrite par une géométrie dans un fichier brep.</p><p>La ou les arêtes de fond de fissure sont données par leurs index dans la face de fissure.</p><p>La procédure identfie des mailles saines à enlever et remailler, construit un maillage régulier rayonnant autour de la ligne de fond de fissure, reconstitue les faces externes en triangles, complète la zone à remailler en tétraèdres.</p></body></html> - + @@ -35,7 +35,7 @@ - <html><head/><body><p>Index des edges décrivant le fond de fissure, dans la face de fissure.</p><p>Sous forme d'une liste Python.</p><p>Exemples :<span style=" color:#00ffff;"/><span style=" font-style:italic; color:#00ffff;">[5,9]</span> ou <span style=" font-style:italic; color:#00ffff;">[3]</span></p><p>(on peut récupérer ces valeurs à l'aide du dialogue de création de groupes d'edges, dans GEOM)</p></body></html> + <html><head/><body><p>Index des edges décrivant le fond de fissure, dans la face de fissure.</p><p>Sous forme d'une liste Python.</p><p>Exemples :<span style=" color:#00ffff;"/><span style=" font-style:italic; color:#000080;">[5,9]</span> ou <span style=" font-style:italic; color:#000080;">[3]</span></p><p>(on peut récupérer ces valeurs à l'aide du dialogue de création de groupes d'edges, dans GEOM)</p></body></html> @@ -98,23 +98,23 @@ - - + + identification zone à remailler - - - - + + + + distance influence - + <html><head/><body><p>La zone remaillée contiendra toutes les mailles du maillage sain à une distance de la face de fissure inférieure à cette valeur.</p></body></html> @@ -126,101 +126,189 @@ - - + + + + + + prémaillage face fissure + + + + + + + + min + + + + + + + <html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html> + + + 5 + + + 1000000.000000000000000 + + + + + + + max + + + + + + + <html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html> + + + 5 + + + 1000000.000000000000000 + + + + + + + + + + + + Qt::Horizontal + + + + 13 + 17 + + + + + + + + + + + + messages + + + + + + + + mode + + + + + + + <html><head/><body><p>L'affichage de messages pendant le calcul peut aider à la mise au point du maillage.</p><p>- Le mode <span style=" font-weight:600;">silencieux</span> donne très peu d'information,</p><p>- Le mode <span style=" font-weight:600;">verbeux</span> liste les principales étapes du calcul,</p><p>- Le mode <span style=" font-weight:600;">debug</span> donne un maximum de détail, et publie des objets intermédiaires dans l'étude.</p><p><br/></p></body></html> + + + + silencieux + + + + + verbeux + + + + + debug + + + + + + + + + + + + + Qt::Horizontal + + + + 18 + 20 + + + + + + + + - Qt::Horizontal + Qt::Vertical - 0 - 20 + 20 + 17 - - - - prémaillage face fissure - - - - - - - - min - - - - - - - <html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html> - - - 5 - - - 1000000.000000000000000 - - - - - - - max - - - - - - - <html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html> - - - 5 - - - 1000000.000000000000000 - - - - - - - - - Qt::Horizontal - - - - 34 - 20 - - - - - - - + groupBox_3 + groupBox_7 + horizontalSpacer_3 + verticalSpacer + horizontalSpacer_3 + horizontalSpacer_9 - + + + + Qt::Horizontal + + + + 17 + 20 + + + + + + + + 0 + 0 + + maillage zone de fissure - - + + pipe rayonnant - - + + @@ -310,7 +398,7 @@ - + Qt::Horizontal @@ -326,20 +414,20 @@ - + faces externes - - + + aretes face fissure - + <html><head/><body><p>Faces externes de la zone à remailler.</p><p>Mailage en triangles : valeur cible des arêtes.</p></body></html> @@ -352,7 +440,7 @@ - + Qt::Horizontal @@ -371,19 +459,6 @@ - - - - Qt::Vertical - - - - 20 - 112 - - - - diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py index c0a208059..e7c0ef357 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -25,12 +25,6 @@ import sys, traceback import math from blocFissure import gmu -from blocFissure.gmu import initLog -#initLog.setDebug() -initLog.setVerbose() - -from blocFissure.gmu import geomsmesh -from blocFissure.gmu.casStandard import casStandard def fissureGeneraleDlg(context): # get context study, studyId, salomeGui @@ -52,6 +46,7 @@ def fissureGeneraleDlg(context): class fissureGeneraleDialog(QtGui.QDialog): def __init__(self): + print "__init__" QtGui.QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_Dialog() @@ -195,6 +190,19 @@ def fissureGeneraleDlg(context): #self.initDefaut() self.initDialog(self.defaut) + def setLogVerbosity(self): + from blocFissure.gmu import initLog # le mode de log s'initialise une seule fois + print "setLogVerbosity" + index = self.ui.cb_log.currentIndex() + print index + if index == 0: + initLog.setRelease() + elif index == 1: + initLog.setVerbose() + elif index == 2: + initLog.setDebug() + + def sauver(self): print "sauver" fileDiag = QFileDialog(self) @@ -268,11 +276,15 @@ def fissureGeneraleDlg(context): return self.NOK def execute(self): + print "execute" dico = self.creeDico() NOK = self.testval(dico) if not(NOK): self.writeDefault(dico) self.ui.lb_calcul.show() + self.setLogVerbosity() + from blocFissure.gmu import geomsmesh # après intialisation log dans setLogVerbosity + from blocFissure.gmu.casStandard import casStandard # après intialisation log dans setLogVerbosity execInstance = casStandard(dico) self.NOK = NOK self.accept() @@ -280,7 +292,8 @@ def fissureGeneraleDlg(context): pass # ---------------------------------------------------------------------------- - + + print "main" window = fissureGeneraleDialog() retry = True while(retry): From a7e3aa2650e5bb26454aa314fa11e658fd49e6e1 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Thu, 25 Feb 2016 17:57:05 +0100 Subject: [PATCH 18/48] general crack dialog, working dir and result file --- src/Tools/blocFissure/ihm/fissureGenerale.ui | 41 +++++++++++++++--- .../blocFissure/ihm/fissureGenerale_plugin.py | 43 ++++++++++++++++++- 2 files changed, 75 insertions(+), 9 deletions(-) diff --git a/src/Tools/blocFissure/ihm/fissureGenerale.ui b/src/Tools/blocFissure/ihm/fissureGenerale.ui index 503b56e6c..cbe389c62 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale.ui +++ b/src/Tools/blocFissure/ihm/fissureGenerale.ui @@ -6,8 +6,8 @@ 0 0 - 629 - 536 + 666 + 589 @@ -269,12 +269,7 @@ - groupBox_3 - groupBox_7 - horizontalSpacer_3 verticalSpacer - horizontalSpacer_3 - horizontalSpacer_9 @@ -461,6 +456,38 @@ + + + + + + répertoire de travail + + + + + + + <html><head/><body><p>Répertoire dans lequel seront rangés le maillage final, les objets intermédiaires, la log d'exécution.</p></body></html> + + + + + + + nom résultat + + + + + + + <html><head/><body><p>nom du fichier maillage résultat</p></body></html> + + + + + diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py index e7c0ef357..c8c495abe 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -74,6 +74,10 @@ def fissureGeneraleDlg(context): self.selectMaillage) self.connect(self.ui.pb_facefiss, QtCore.SIGNAL("clicked()"), self.selectFacefiss) + self.connect(self.ui.pb_reptrav, QtCore.SIGNAL("clicked()"), + self.selectReptrav) + self.connect(self.ui.pb_nomres, QtCore.SIGNAL("clicked()"), + self.selectNomres) self.disconnect(self.ui.bb_OkCancel, QtCore.SIGNAL("accepted()"), self.accept) self.connect(self.ui.bb_OkCancel, QtCore.SIGNAL("accepted()"), self.execute) @@ -90,7 +94,9 @@ def fissureGeneraleDlg(context): lenSegPipe = 2.5, nbSegRad = 5, nbSegCercle = 32, - areteFaceFissure = 10) + areteFaceFissure = 10, + reptrav = '.', + nomres = 'casStandard_fissure.med') def initDialog(self, dico): @@ -105,6 +111,8 @@ def fissureGeneraleDlg(context): self.ui.sb_couronnes.setValue(dico['nbSegRad']) self.ui.sb_secteurs.setValue(dico['nbSegCercle']) self.ui.dsb_areteFaceFissure.setValue(dico['areteFaceFissure']) + self.ui.le_reptrav.setText(os.path.abspath(dico['reptrav'])) + self.ui.le_nomres.setText(os.path.split(dico['nomres'])[1]) incomplet = self.testval(dico) pass @@ -256,6 +264,35 @@ def fissureGeneraleDlg(context): print filedef self.ui.le_facefiss.setText(filedef) + def selectReptrav(self): + fileDiag = QFileDialog(self) + fileDiag.setFileMode(QFileDialog.Directory) + fileDiag.setViewMode(QFileDialog.Detail) + fileDiag.setDirectory(self.ui.le_reptrav.text()) + if fileDiag.exec_() : + fileNames = fileDiag.selectedFiles() + reptrav = str(fileNames[0]) + print "reptrav ", reptrav + self.ui.le_reptrav.setText(os.path.abspath(reptrav)) + + + def selectNomres(self): + fileDiag = QFileDialog(self) + fileDiag.setFileMode(QFileDialog.AnyFile) + fileDiag.setViewMode(QFileDialog.Detail) + nomres=str(os.path.split(str(self.ui.le_nomres.text()))[1]) + fileDiag.setDirectory(self.ui.le_reptrav.text()) + fileDiag.selectFile(nomres) + fileDiag.setNameFilter("Maillage *.med (*.med)") + self.ui.le_nomres.setText(nomres) + if fileDiag.exec_() : + fileNames = fileDiag.selectedFiles() + tempnom = os.path.split(str(fileNames[0]))[1] + print "nomres ", tempnom + self.ui.le_nomres.setText(tempnom) + else: + self.ui.le_nomres.setText(nomres) + def creeDico(self): dico = dict( maillageSain = str(self.ui.le_maillage.text()), @@ -267,7 +304,9 @@ def fissureGeneraleDlg(context): lenSegPipe = self.ui.dsb_lenSegPipe.value(), nbSegRad = self.ui.sb_couronnes.value(), nbSegCercle = self.ui.sb_secteurs.value(), - areteFaceFissure = self.ui.dsb_areteFaceFissure.value() + areteFaceFissure = self.ui.dsb_areteFaceFissure.value(), + reptrav = str(self.ui.le_reptrav.text()), + nomres = str(self.ui.le_nomres.text()), ) print dico return dico From e144839c8819a7671d4e4a7d0bd8a044a4526862 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 26 Feb 2016 09:15:52 +0100 Subject: [PATCH 19/48] general crack dialog, use working dir and result file name --- src/Tools/blocFissure/gmu/casStandard.py | 10 ++++++++-- src/Tools/blocFissure/ihm/fissureGenerale.ui | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Tools/blocFissure/gmu/casStandard.py b/src/Tools/blocFissure/gmu/casStandard.py index b0bca4ec1..e03027fea 100644 --- a/src/Tools/blocFissure/gmu/casStandard.py +++ b/src/Tools/blocFissure/gmu/casStandard.py @@ -41,8 +41,14 @@ class casStandard(fissureGenerique): self.dicoParams = dicoParams if self.dicoParams.has_key('nomCas'): self.nomCas = self.dicoParams['nomCas'] + elif self.dicoParams.has_key('nomres'): + self.nomCas = os.path.splitext(os.path.split(self.dicoParams['nomres'])[1])[0] else: - self.nomCas = 'casStandard' + self.nomCas = 'casStandard' + if self.dicoParams.has_key('reptrav'): + self.reptrav = self.dicoParams['reptrav'] + else: + reptrav = '.' self.numeroCas = numeroCas if self.numeroCas != 0: self.nomCas = self.nomProbleme +"_%d"%(self.numeroCas) @@ -110,7 +116,7 @@ class casStandard(fissureGenerique): # --------------------------------------------------------------------------- def setParamMaillageFissure(self): - self.maillageFissureParams = dict(nomRep = '.', + self.maillageFissureParams = dict(nomRep = self.reptrav, nomFicSain = self.nomCas, nomFicFissure = 'fissure_' + self.nomCas, nbsegRad = self.dicoParams['nbSegRad'], diff --git a/src/Tools/blocFissure/ihm/fissureGenerale.ui b/src/Tools/blocFissure/ihm/fissureGenerale.ui index cbe389c62..32deb75fa 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale.ui +++ b/src/Tools/blocFissure/ihm/fissureGenerale.ui @@ -35,7 +35,7 @@ - <html><head/><body><p>Index des edges décrivant le fond de fissure, dans la face de fissure.</p><p>Sous forme d'une liste Python.</p><p>Exemples :<span style=" color:#00ffff;"/><span style=" font-style:italic; color:#000080;">[5,9]</span> ou <span style=" font-style:italic; color:#000080;">[3]</span></p><p>(on peut récupérer ces valeurs à l'aide du dialogue de création de groupes d'edges, dans GEOM)</p></body></html> + <html><head/><body><p>Index des edges décrivant le fond de fissure, dans la face de fissure.</p><p>Sous forme d'une liste Python.</p><p>Exemples : <span style=" font-weight:600; font-style:italic; color:#000080;">[5,9]</span> ou<span style=" font-weight:600;"/><span style=" font-weight:600; font-style:italic; color:#000080;">[3]</span></p><p>(on peut récupérer ces valeurs à l'aide du dialogue de création de groupes d'edges, dans GEOM)</p></body></html> @@ -216,7 +216,7 @@ - <html><head/><body><p>L'affichage de messages pendant le calcul peut aider à la mise au point du maillage.</p><p>- Le mode <span style=" font-weight:600;">silencieux</span> donne très peu d'information,</p><p>- Le mode <span style=" font-weight:600;">verbeux</span> liste les principales étapes du calcul,</p><p>- Le mode <span style=" font-weight:600;">debug</span> donne un maximum de détail, et publie des objets intermédiaires dans l'étude.</p><p><br/></p></body></html> + <html><head/><body><p>L'affichage de messages pendant le calcul peut aider à la mise au point du maillage. Les messages sont écrits dans un fichier de log, dans le répertoire d'exécution.</p><p>- Le mode <span style=" font-weight:600;">silencieux</span> donne très peu d'information,</p><p>- Le mode <span style=" font-weight:600;">verbeux</span> liste les principales étapes du calcul,</p><p>- Le mode <span style=" font-weight:600;">debug</span> donne un maximum de détail, et publie des objets intermédiaires dans l'étude.</p><p><br/></p></body></html> @@ -482,7 +482,7 @@ - <html><head/><body><p>nom du fichier maillage résultat</p></body></html> + <html><head/><body><p>Nom des résultats.</p><p>Le fichier maillage résultat sera rangé dans le répertoire de travail, sous le nom fissure_<span style=" font-weight:600; font-style:italic; color:#0055ff;">Nom</span>.med</p><p><br/></p></body></html> From 4370e1798b3d94dde48a7b878ea73f29d9782c49 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 26 Feb 2016 21:05:40 +0100 Subject: [PATCH 20/48] general crack dialog, save log in file --- src/Tools/blocFissure/gmu/initLog.py | 55 ++++++++++++++----- .../blocFissure/ihm/fissureGenerale_plugin.py | 11 ++-- 2 files changed, 46 insertions(+), 20 deletions(-) diff --git a/src/Tools/blocFissure/gmu/initLog.py b/src/Tools/blocFissure/gmu/initLog.py index 07c0c3640..c9c78b30c 100644 --- a/src/Tools/blocFissure/gmu/initLog.py +++ b/src/Tools/blocFissure/gmu/initLog.py @@ -10,38 +10,63 @@ critical = 50 loglevel = warning -def setDebug(): +def setDebug(logfile=None): global loglevel - logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', - level=logging.DEBUG) + if logfile: + logging.basicConfig(filename=logfile, + format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', + level=logging.DEBUG) + else: + logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', + level=logging.DEBUG) loglevel = debug logging.info('start Debug %s', loglevel) -def setVerbose(): +def setVerbose(logfile=None): global loglevel - logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', - level=logging.INFO) + if logfile: + logging.basicConfig(filename=logfile, + format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', + level=logging.INFO) + else: + logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', + level=logging.INFO) loglevel = info logging.info('start Verbose %s', loglevel) -def setRelease(): +def setRelease(logfile=None): global loglevel - logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s', - level=logging.WARNING) + if logfile: + logging.basicConfig(filename=logfile, + format='%(funcName)s[%(lineno)d] %(message)s', + level=logging.WARNING) + else: + logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s', + level=logging.WARNING) loglevel = warning logging.warning('start Release %s', loglevel) -def setUnitTests(): +def setUnitTests(logfile=None): global loglevel - logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s', - level=logging.CRITICAL) + if logfile: + logging.basicConfig(filename=logfile, + format='%(funcName)s[%(lineno)d] %(message)s', + level=logging.CRITICAL) + else: + logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s', + level=logging.CRITICAL) loglevel = critical logging.critical('start UnitTests %s', loglevel) -def setPerfTests(): +def setPerfTests(logfile=None): global loglevel - logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', - level=logging.CRITICAL) + if logfile: + logging.basicConfig(filename=logfile, + format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', + level=logging.CRITICAL) + else: + logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s', + level=logging.CRITICAL) loglevel = critical logging.info('start PerfTests %s', loglevel) diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py index c8c495abe..9e602ed68 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -198,17 +198,17 @@ def fissureGeneraleDlg(context): #self.initDefaut() self.initDialog(self.defaut) - def setLogVerbosity(self): + def setLogVerbosity(self, logfile): from blocFissure.gmu import initLog # le mode de log s'initialise une seule fois print "setLogVerbosity" index = self.ui.cb_log.currentIndex() print index if index == 0: - initLog.setRelease() + initLog.setRelease(logfile) elif index == 1: - initLog.setVerbose() + initLog.setVerbose(logfile) elif index == 2: - initLog.setDebug() + initLog.setDebug(logfile) def sauver(self): @@ -321,7 +321,8 @@ def fissureGeneraleDlg(context): if not(NOK): self.writeDefault(dico) self.ui.lb_calcul.show() - self.setLogVerbosity() + logfile=os.path.join(dico['reptrav'], dico['nomres']+".log") + self.setLogVerbosity(logfile) from blocFissure.gmu import geomsmesh # après intialisation log dans setLogVerbosity from blocFissure.gmu.casStandard import casStandard # après intialisation log dans setLogVerbosity execInstance = casStandard(dico) From fe678b8dc0f994b3bfc0dc7ee681edcec466dbb0 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 29 Feb 2016 15:12:14 +0100 Subject: [PATCH 21/48] general crack dialog, user message mecanism for some errors --- src/Tools/blocFissure/gmu/CMakeLists.txt | 1 + src/Tools/blocFissure/gmu/fissError.py | 17 +++++++++++++ .../gmu/partitionneFissureParPipe.py | 9 ++++++- .../blocFissure/ihm/fissureGenerale_plugin.py | 25 ++++++++++++++++++- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 src/Tools/blocFissure/gmu/fissError.py diff --git a/src/Tools/blocFissure/gmu/CMakeLists.txt b/src/Tools/blocFissure/gmu/CMakeLists.txt index c0afb86be..64c18760a 100644 --- a/src/Tools/blocFissure/gmu/CMakeLists.txt +++ b/src/Tools/blocFissure/gmu/CMakeLists.txt @@ -51,6 +51,7 @@ SET(plugin_SCRIPTS facesVolumesToriques.py findWireEndVertices.py findWireIntermediateVertices.py + fissError.py fissureCoude.py fissureGenerique.py fusionMaillageAttributionDefaut.py diff --git a/src/Tools/blocFissure/gmu/fissError.py b/src/Tools/blocFissure/gmu/fissError.py new file mode 100644 index 000000000..74b058740 --- /dev/null +++ b/src/Tools/blocFissure/gmu/fissError.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +class fissError(Exception): + """ + usage: + try: + instructions() + except: + raise fissError(traceback.extract_stack(),"mon message") + """ + def __init__(self, pile, msg): + self.pile = pile + self.msg = msg + + def __str__(self): + return 'msg=%s\npile=%s\n'%(self.msg, repr(self.pile)) + diff --git a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py index 7d6289797..9ad26b854 100644 --- a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py +++ b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py @@ -6,8 +6,10 @@ from geomsmesh import geompy from geomsmesh import geomPublish from geomsmesh import geomPublishInFather import initLog +import traceback from findWireEndVertices import findWireEndVertices from prolongeWire import prolongeWire +from fissError import fissError def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe): """ @@ -33,7 +35,12 @@ def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe): cercle = geompy.MakeRotation(cercle, norms[0], math.pi/3.0 ) # éviter d'avoir l'arête de couture du pipe presque confondue avec la face fissure geomPublish(initLog.debug, cercle, 'cercle') fondFissProlonge = prolongeWire(fondFiss, extrem, norms, 2*rayonPipe) - pipeFiss = geompy.MakePipe(cercle, fondFissProlonge) + try: + pipeFiss = geompy.MakePipe(cercle, fondFissProlonge) + except: + texte = "génération du pipe le long de la ligne de fond de fissure prolongée impossible. " + texte += "Cause éventuelle : la ligne s'autointersecte lorsqu'on la prolonge." + raise fissError(traceback.extract_stack(),texte) geomPublish(initLog.debug, pipeFiss, 'pipeFiss') partFissPipe = geompy.MakePartition([shapeDefaut, pipeFiss], [], [], [], geompy.ShapeType["FACE"], 0, [], 1) geomPublish(initLog.debug, partFissPipe, 'partFissPipe') diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py index 9e602ed68..e2d5d9dc1 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -41,6 +41,7 @@ def fissureGeneraleDlg(context): from PyQt4.QtGui import QMessageBox from PyQt4.QtGui import QPalette from PyQt4.QtGui import QColor + from PyQt4.QtCore import QString from fissureGenerale_ui import Ui_Dialog class fissureGeneraleDialog(QtGui.QDialog): @@ -307,6 +308,7 @@ def fissureGeneraleDlg(context): areteFaceFissure = self.ui.dsb_areteFaceFissure.value(), reptrav = str(self.ui.le_reptrav.text()), nomres = str(self.ui.le_nomres.text()), + verbosite = self.ui.cb_log.currentIndex() ) print dico return dico @@ -325,7 +327,28 @@ def fissureGeneraleDlg(context): self.setLogVerbosity(logfile) from blocFissure.gmu import geomsmesh # après intialisation log dans setLogVerbosity from blocFissure.gmu.casStandard import casStandard # après intialisation log dans setLogVerbosity - execInstance = casStandard(dico) + from blocFissure.gmu.fissError import fissError + try: + execInstance = casStandard(dico) + except fissError as erreur: + print '-'*60 + print type(erreur) + print '-'*60 + print erreur.msg + print '-'*60 + for ligne in erreur.pile: + print repr(ligne) + print '-'*60 + texte = erreur.msg +# texte += +"
      " +'-'*60 +"
      " +# for ligne in erreur.pile: +# texte += repr(ligne) +"
      " + mbox = QMessageBox(self) + mbox.setWindowTitle("erreur blocFissure") + mbox.setText(QString.fromUtf8(texte)) + mbox.exec_() +# except Exception as erreur: +# print "exception non répertoriée" self.NOK = NOK self.accept() From 049440912bd213f954a50d4b20e9a468dec33635 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 29 Feb 2016 16:56:48 +0100 Subject: [PATCH 22/48] general crack dilalog, completion of save parameters --- src/Tools/blocFissure/ihm/fissureGenerale_plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py index e2d5d9dc1..a5001d361 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -97,7 +97,8 @@ def fissureGeneraleDlg(context): nbSegCercle = 32, areteFaceFissure = 10, reptrav = '.', - nomres = 'casStandard_fissure.med') + nomres = 'casStandard_fissure.med', + verbosite = 0) def initDialog(self, dico): @@ -114,6 +115,7 @@ def fissureGeneraleDlg(context): self.ui.dsb_areteFaceFissure.setValue(dico['areteFaceFissure']) self.ui.le_reptrav.setText(os.path.abspath(dico['reptrav'])) self.ui.le_nomres.setText(os.path.split(dico['nomres'])[1]) + self.ui.cb_log.setCurrentIndex(dico['verbosite']) incomplet = self.testval(dico) pass From c754537e9f78cd30b7dba7fd9a5d41c4b0d4d87a Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 29 Feb 2016 17:34:41 +0100 Subject: [PATCH 23/48] general crack dialog, an error detection --- .../blocFissure/gmu/identifieElementsDebouchants.py | 10 +++++++++- src/Tools/blocFissure/gmu/partitionneFissureParPipe.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py b/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py index af485444e..20c38e937 100644 --- a/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py +++ b/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py @@ -7,6 +7,8 @@ from geomsmesh import geompy from geomsmesh import geomPublish from geomsmesh import geomPublishInFather import initLog +import traceback +from fissError import fissError from produitMixte import produitMixte from whichSide import whichSide @@ -94,7 +96,13 @@ def identifieElementsDebouchants(ifil, facesDefaut, partitionPeauFissFond, edgesLoc = geompy.ExtractShapes(locEdgePart, geompy.ShapeType["EDGE"], False) edgesLocSorted =[(geompy.MinDistance(edge, locPt0), kk, edge) for kk, edge in enumerate(edgesLoc)] edgesLocSorted.sort() - ofp = geompy.BasicProperties(edgesLocSorted[0][2])[0] # distance curviligne centre locPt0 + try: + ofp = geompy.BasicProperties(edgesLocSorted[0][2])[0] # distance curviligne centre locPt0 + except: + texte = "Identification des éléments au débouché du pipe sur la face externe impossible. " + texte += "Cause éventuelle : la ligne de fond de fissure comprend un point géométrique coincidant avec la face externe. " + texte += "La ligne de fond de fissure doit déboucher franchement de la face externe, et ne doit pas être coupée au niveau de la face" + raise fissError(traceback.extract_stack(),texte) logging.debug("distance curviligne centre extremite0: %s", ofp) p1 = geompy.MakeVertexOnCurveByLength(localEdgeInFondFiss, ofp +lgp, locPt0) p2 = geompy.MakeVertexOnCurveByLength(localEdgeInFondFiss, ofp -lgp, locPt0) diff --git a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py index 9ad26b854..ca6829f3d 100644 --- a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py +++ b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py @@ -6,9 +6,9 @@ from geomsmesh import geompy from geomsmesh import geomPublish from geomsmesh import geomPublishInFather import initLog -import traceback from findWireEndVertices import findWireEndVertices from prolongeWire import prolongeWire +import traceback from fissError import fissError def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe): From cc583a4ffa28ca9ae502d862fa29b8343b727aa9 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 29 Feb 2016 18:09:50 +0100 Subject: [PATCH 24/48] general crack dialog, another error detection --- .../blocFissure/gmu/identifieElementsDebouchants.py | 4 ++-- src/Tools/blocFissure/gmu/partitionneFissureParPipe.py | 2 +- src/Tools/blocFissure/gmu/restreintFaceFissure.py | 10 +++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py b/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py index 20c38e937..fb03f94b7 100644 --- a/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py +++ b/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py @@ -100,8 +100,8 @@ def identifieElementsDebouchants(ifil, facesDefaut, partitionPeauFissFond, ofp = geompy.BasicProperties(edgesLocSorted[0][2])[0] # distance curviligne centre locPt0 except: texte = "Identification des éléments au débouché du pipe sur la face externe impossible. " - texte += "Cause éventuelle : la ligne de fond de fissure comprend un point géométrique coincidant avec la face externe. " - texte += "La ligne de fond de fissure doit déboucher franchement de la face externe, et ne doit pas être coupée au niveau de la face" + texte += "Cause possible : la ligne de fond de fissure comprend un point géométrique coincidant avec la face externe. " + texte += "La ligne de fond de fissure doit déboucher franchement de la face externe, et ne doit pas être coupée au niveau de la face." raise fissError(traceback.extract_stack(),texte) logging.debug("distance curviligne centre extremite0: %s", ofp) p1 = geompy.MakeVertexOnCurveByLength(localEdgeInFondFiss, ofp +lgp, locPt0) diff --git a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py index ca6829f3d..32ae8b3f0 100644 --- a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py +++ b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py @@ -39,7 +39,7 @@ def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe): pipeFiss = geompy.MakePipe(cercle, fondFissProlonge) except: texte = "génération du pipe le long de la ligne de fond de fissure prolongée impossible. " - texte += "Cause éventuelle : la ligne s'autointersecte lorsqu'on la prolonge." + texte += "Cause possible : la ligne s'autointersecte lorsqu'on la prolonge." raise fissError(traceback.extract_stack(),texte) geomPublish(initLog.debug, pipeFiss, 'pipeFiss') partFissPipe = geompy.MakePartition([shapeDefaut, pipeFiss], [], [], [], geompy.ShapeType["FACE"], 0, [], 1) diff --git a/src/Tools/blocFissure/gmu/restreintFaceFissure.py b/src/Tools/blocFissure/gmu/restreintFaceFissure.py index 50e867e0c..c2a055f8f 100644 --- a/src/Tools/blocFissure/gmu/restreintFaceFissure.py +++ b/src/Tools/blocFissure/gmu/restreintFaceFissure.py @@ -6,6 +6,8 @@ from geomsmesh import geomPublish from geomsmesh import geomPublishInFather import initLog from sortFaces import sortFaces +import traceback +from fissError import fissError def restreintFaceFissure(shapeDefaut, facesDefaut, pointInterne): """ @@ -22,7 +24,13 @@ def restreintFaceFissure(shapeDefaut, facesDefaut, pointInterne): logging.debug("selection de la face la plus proche du point interne, distance=%s",distfaces[0][0]) facesPortFissure = distfaces[0][2] else: - facesPartShapeDefautSorted, minSurf, maxSurf = sortFaces(facesPartShapeDefaut) # la face de fissure dans le volume doit être la plus grande + try: + facesPartShapeDefautSorted, minSurf, maxSurf = sortFaces(facesPartShapeDefaut) # la face de fissure dans le volume doit être la plus grande + except: + texte = "Restriction de la face de fissure au domaine solide impossible. " + texte += "Cause possible : la face de fissure est tangente à la paroi solide. " + texte += "Elle doit déboucher franchement, sans que la surface dehors ne devienne plus grande que la surface dans le solide. " + raise fissError(traceback.extract_stack(),texte) logging.debug("surfaces faces fissure étendue, min %s, max %s", minSurf, maxSurf) facesPortFissure = facesPartShapeDefautSorted[-1] From 43f41f0c11ce8e843ca6b0abac6f6f36c11d72b3 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 3 Mar 2016 15:42:23 +0300 Subject: [PATCH 25/48] 23250: [CEA 1766] 3D tab is empty when editing mesh + minor changes in docs + fix other problems with Mesh Dialog: 1) at mesh edition, old hypothesis remain assigned after playing with Mesh Type and Hypo Sets (change is in isSelectedHyp()) 2) When a 3D algo is unset due to change of Mesh Type, its hypotheses remain assigned and a new hyp can be created --- doc/salome/examples/filters_ex01.py | 1 + doc/salome/examples/filters_ex09.py | 10 +- doc/salome/examples/filters_ex10.py | 10 +- doc/salome/examples/filters_ex13.py | 2 +- doc/salome/examples/filters_ex17.py | 10 +- doc/salome/examples/filters_ex18.py | 27 +++++- .../SMESH/images/bare_border_volumes_smpl.png | Bin 7555 -> 8103 bytes doc/salome/gui/SMESH/input/about_filters.doc | 10 +- doc/salome/gui/SMESH/input/about_meshes.doc | 3 +- .../SMESH/input/selection_filter_library.doc | 8 +- doc/salome/gui/SMESH/input/tui_filters.doc | 91 +++++++++--------- src/SMESHGUI/SMESHGUI_MeshDlg.cxx | 21 ++-- src/SMESHGUI/SMESHGUI_MeshOp.cxx | 32 ++++-- src/SMESHGUI/SMESHGUI_MeshOp.h | 2 +- src/SMESH_PY/smeshstudytools.py | 4 +- src/SMESH_SWIG/smeshBuilder.py | 2 +- 16 files changed, 138 insertions(+), 95 deletions(-) diff --git a/doc/salome/examples/filters_ex01.py b/doc/salome/examples/filters_ex01.py index 88305c97f..8af735e71 100644 --- a/doc/salome/examples/filters_ex01.py +++ b/doc/salome/examples/filters_ex01.py @@ -1,4 +1,5 @@ # Aspect ratio +# This script demonstrates various usages of filters # create mesh from SMESH_mechanic import * diff --git a/doc/salome/examples/filters_ex09.py b/doc/salome/examples/filters_ex09.py index 9efa00871..dd6415930 100644 --- a/doc/salome/examples/filters_ex09.py +++ b/doc/salome/examples/filters_ex09.py @@ -1,23 +1,21 @@ # Free borders -# create mesh - -import salome +# initialize SALOME and modules +import salome, SMESH salome.salome_init() -import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) - -import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) +# create mesh face = geompy.MakeFaceHW(100, 100, 1) geompy.addToStudy( face, "quadrangle" ) mesh = smesh.Mesh(face) mesh.Segment().NumberOfSegments(10) mesh.Triangle().MaxElementArea(25) mesh.Compute() + # get all free borders filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_FreeBorders) ids = mesh.GetIdsFromFilter(filter) diff --git a/doc/salome/examples/filters_ex10.py b/doc/salome/examples/filters_ex10.py index 423b91029..bf6f7419b 100644 --- a/doc/salome/examples/filters_ex10.py +++ b/doc/salome/examples/filters_ex10.py @@ -1,23 +1,21 @@ # Free edges -# create mesh - -import salome +# initialize SALOME and modules +import salome, SMESH salome.salome_init() -import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) - -import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) +# create mesh face = geompy.MakeFaceHW(100, 100, 1) geompy.addToStudy( face, "quadrangle" ) mesh = smesh.Mesh(face) mesh.Segment().NumberOfSegments(10) mesh.Triangle().MaxElementArea(25) mesh.Compute() + # get all faces with free edges filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_FreeEdges) ids = mesh.GetIdsFromFilter(filter) diff --git a/doc/salome/examples/filters_ex13.py b/doc/salome/examples/filters_ex13.py index f56d39f84..8d8077083 100644 --- a/doc/salome/examples/filters_ex13.py +++ b/doc/salome/examples/filters_ex13.py @@ -4,7 +4,7 @@ from SMESH_mechanic import * # remove some faces to have faces with bare borders mesh.RemoveElements( mesh.GetElementsByType(SMESH.FACE)[0:5] ) -# get all faces bare borders +# get all faces with bare borders filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_BareBorderFace) ids = mesh.GetIdsFromFilter(filter) print "Faces with bare borders:", ids diff --git a/doc/salome/examples/filters_ex17.py b/doc/salome/examples/filters_ex17.py index c3f80d65a..9dc01b49c 100644 --- a/doc/salome/examples/filters_ex17.py +++ b/doc/salome/examples/filters_ex17.py @@ -1,16 +1,12 @@ # Double nodes - import salome salome.salome_init() -import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) - -import SMESH, SALOMEDS +import SMESH from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) -import salome_notebook # make a mesh on a box box = geompy.MakeBoxDXDYDZ(100,100,100) @@ -20,8 +16,8 @@ mesh.Quadrangle() mesh.Hexahedron() mesh.Compute() # copy all elements with translation -mesh.TranslateObject( mesh, smesh.MakeDirStruct( 10,0,0), Copy=True ) -# create filters to find nodes equal within tolerance of 1e-5 +mesh.TranslateObject( mesh, [10,0,0], Copy=True ) +# create a filter to find nodes equal within tolerance of 1e-5 filter = smesh.GetFilter(SMESH.NODE, SMESH.FT_EqualNodes, Tolerance=1e-5) # get equal nodes print "Number of equal nodes:", len( mesh.GetIdsFromFilter( filter )) diff --git a/doc/salome/examples/filters_ex18.py b/doc/salome/examples/filters_ex18.py index 805f54e06..32950cc50 100644 --- a/doc/salome/examples/filters_ex18.py +++ b/doc/salome/examples/filters_ex18.py @@ -1,8 +1,25 @@ # Borders at multi-connection -# create mesh -from SMESH_mechanic import * -# get border edges with number of connected faces = 5 -filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_MultiConnection, 5) +import salome +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) +import SMESH +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + +# make a mesh on a box +box = geompy.MakeBoxDXDYDZ(100,100,100) +mesh = smesh.Mesh( box, "Box" ) +mesh.Segment().NumberOfSegments(10) +mesh.Quadrangle() +mesh.Hexahedron() +mesh.Compute() +# copy all elements with translation and merge nodes +mesh.TranslateObject( mesh, [10,0,0], Copy=True ) +mesh.MergeNodes( mesh.FindCoincidentNodes( 1e-5 )) + +# get mesh edges with number of connected elements (faces and volumes) == 3 +filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_MultiConnection, 3) ids = mesh.GetIdsFromFilter(filter) -print "Number of border edges with 5 faces connected:", len(ids) +print "Number of border edges with 3 faces connected:", len(ids) diff --git a/doc/salome/gui/SMESH/images/bare_border_volumes_smpl.png b/doc/salome/gui/SMESH/images/bare_border_volumes_smpl.png index a1e799aa24f7f6356cafff6064981c648eb1c6a8..3508518fd1d8db83f741a7d3defd952539cbe4ff 100644 GIT binary patch literal 8103 zcmXAudpy(MAIFoV6wBA8CYe-{Tw*RWOd*%tm3t|~hU7NMWg#)SP2}1}nkESe2}#JM zWST8WF3qJixtrUB-_h@nJ@(l7>~qfNT;8wO^ZowZx3)AE6p#?uv15mzsfnTOjvYKq z@X_0|6SQnfPVEL?djm|If_Ll?`mp`s$viD|c*hQyld0jkOSg&BLwZ4yAHVLJ`zHMI z`VEtK%SzvmEWSO#!t+c~j@$m^7@jCA9*@gYe3*|9&gbh3+ul>MF0g^ewVQ91%!J!z zR>((*pD#C2x`lj@F+|suoY)$#ij5F?z+#?DKQiQf`?lp4Zjk*u>hVHtVj%XUa2PD# ze(Phz$|Pvdq{z5yJV>s`AoIviS7ujO}0FF8P|VpzFtJnE9^6D5ML18$6;KsH8RBSm?!0tpIL9 zAc-awq~)F+<2nCt0bV#hbFe^H<8O7&W18`Qhj1eHG3hyseOao`XDARU#a}tw^Y&qK zRJ>1+8=WT-jy?9q%(iA#3P@iod>7&{WfcyU8uS0stVEAyGQZbpny${wY!T{|pL>YC z4}8~?7u-_xPOdWKvXh+gqx$58!3GB@#no%Y5PP2MMAX~w$cL0l zG&{8lSi)38an;Z&^DSj=_(rBbkhijz7edaB6Kz{V8GuRuZ{x|Rtyk(! zC_gqA;o8!(nv-P|N?@;tBwIE0Tlf@EN8&3sqc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9-`_h#)rF2+GlG5hJ$ z_M3xOUr9KUV!raLSq9!ww$*|zSiA4MXw}{MGOtO+dv%WJO%nv=%-B@FUiGK#-Ns!% z7tc<8_`a&S9f4cZDSG8ulsD5fQhnV>5je#!z1=@0s80alwpl zgXn8XeVFUkmR(nWHU7Gk*dzaGu~ijXpXj!J!cq3O|7gg!+3fH4Y@%>bzx>9_>9I?v ze$C!WU0m-iN8~poO}72=8_l83x^qAkyw)4;=~5m}`^6dk#ryAk{?C)&tq}j6lOvAb z&Zob!4w>=d{F;34fA@Q_S2zywem{{ZFU#u@9}S`BH$u$L8&jf6NJJ-|nYS=};8H z>5ew)NgESY{AoEJg8H0f(2wTbE=k}IFi~`=hsZtHNtDy<1{nprl`qo7)ETEF=xH#! zoCN+VQ>|aHN<;|u5v>R&h}?qxet+){4iM$%9YSzR$FTVk59dOr=J!Z0hBiwYmiIyB zdh6#09gBvz@;SKrTTk@^-`b(lpM24Rj=b$cMz*%2IXxhleI|nt7X}ZYx??V*beo4& zb|oKN{sLYBEq3Thi`EZs7{x%=x8k&VvbyzecTekn8NzB!?oLK+YSw9yl{|HUY*-Ct nAf5$FN=YJmaIT>C*B_h4i`TH?_2R+5s*pF!&*QY4Aoc$M1H!$y diff --git a/doc/salome/gui/SMESH/input/about_filters.doc b/doc/salome/gui/SMESH/input/about_filters.doc index f331fa4be..7468931a1 100644 --- a/doc/salome/gui/SMESH/input/about_filters.doc +++ b/doc/salome/gui/SMESH/input/about_filters.doc @@ -4,11 +4,11 @@ \b Filters allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create -or edit mesh groups, remove elements from the mesh object, control +or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. Several criteria can be combined together by using logical operators \a -AND and \a OR. In addition, applied filter criterion can be reverted +AND and \a OR. In addition, a filter criterion can be reverted using logical operator \a NOT. Some filtering criteria use the functionality of \ref quality_page "mesh quality controls" @@ -27,6 +27,8 @@ about selection filters and their usage in GUI. entities (nodes or elements) for the operations, which require the list of entities as input parameter (create/modify group, remove nodes/elements, etc) and for the operations, which accept objects - as input parameter. The page \ref tui_filters_page provides - examples of the filters usage in Python scripts. + (groups, sub-meshes) as input parameter. The page \ref + tui_filters_page provides examples of the filters usage in Python + scripts. + */ diff --git a/doc/salome/gui/SMESH/input/about_meshes.doc b/doc/salome/gui/SMESH/input/about_meshes.doc index 621a47e99..1490bce12 100644 --- a/doc/salome/gui/SMESH/input/about_meshes.doc +++ b/doc/salome/gui/SMESH/input/about_meshes.doc @@ -100,7 +100,8 @@ The mesh can include the following entities: Every mesh entity has an attribute associating it to a sub-shape it is generated on (if any). The node generated on the geometrical edge or surface in addition stores its position in parametric space of the -associated geometrical entity. +associated geometrical entity. This attribute is set up by meshing +algorithms generating elements and nodes. Mesh entities are identified by integer IDs starting from 1. Nodes and elements are counted separately, i.e. there can be a node diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.doc b/doc/salome/gui/SMESH/input/selection_filter_library.doc index c87d928e8..145c48fec 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.doc +++ b/doc/salome/gui/SMESH/input/selection_filter_library.doc @@ -73,7 +73,9 @@ the filtering algorithm works faster because node-to-shape association is used instead of measuring distance between nodes and the shape, and \b Tolerance is not used. If the threshold shape is any other shape, the algorithm works slower because distance between nodes and the -shape is measured and is compared with \b Tolerance. +shape is measured and is compared with \b Tolerance. The latter +approach (distance measurement) is also used if an element is not +associated to any shape.

    • Lying on Geom selects entities whose at least one node lies on the shape defined by the Threshold Value. @@ -82,7 +84,9 @@ the filtering algorithm works faster because node-to-shape association is used instead of measuring distance between nodes and the shape, and \b Tolerance is not used. If the threshold shape is any other shape, the algorithm works slower because distance between nodes and the -shape is measured and is compared with \b Tolerance. +shape is measured and is compared with \b Tolerance. The latter +approach (distance measurement) is also used if an element is not +associated to any shape.
    • Belong to Mesh Group selects entities included into the mesh group defined by the Threshold Value. diff --git a/doc/salome/gui/SMESH/input/tui_filters.doc b/doc/salome/gui/SMESH/input/tui_filters.doc index cfe65fff5..7356103dc 100755 --- a/doc/salome/gui/SMESH/input/tui_filters.doc +++ b/doc/salome/gui/SMESH/input/tui_filters.doc @@ -6,7 +6,7 @@ Filters allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create -or edit mesh groups, remove elements from the mesh object, control +or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. Several filtering criteria can be combined together by using logical @@ -24,7 +24,7 @@ Python scripts. \section filter_aspect_ratio Aspect ratio -Filter 2D mesh elements (faces) according to the aspect ratio value: +filters 2D mesh elements (faces) according to the aspect ratio value: - element type should be \a SMESH.FACE - functor type should be \a SMESH.FT_AspectRatio - threshold is floating point value (aspect ratio) @@ -35,7 +35,7 @@ Filter 2D mesh elements (faces) according to the aspect ratio value: \section filter_aspect_ratio_3d Aspect ratio 3D -Filter 3D mesh elements (volumes) according to the aspect ratio value: +filters 3D mesh elements (volumes) according to the aspect ratio value: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_AspectRatio3D - threshold is floating point value (aspect ratio) @@ -46,7 +46,7 @@ Filter 3D mesh elements (volumes) according to the aspect ratio value: \section filter_warping_angle Warping angle -Filter 2D mesh elements (faces) according to the warping angle value: +filters 2D mesh elements (faces) according to the warping angle value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Warping - threshold is floating point value (warping angle) @@ -57,7 +57,7 @@ Filter 2D mesh elements (faces) according to the warping angle value: \section filter_minimum_angle Minimum angle -Filter 2D mesh elements (faces) according to the minimum angle value: +filters 2D mesh elements (faces) according to the minimum angle value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_MinimumAngle - threshold is floating point value (minimum angle) @@ -68,7 +68,7 @@ Filter 2D mesh elements (faces) according to the minimum angle value: \section filter_taper Taper -Filter 2D mesh elements (faces) according to the taper value: +filters 2D mesh elements (faces) according to the taper value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Taper - threshold is floating point value (taper) @@ -79,7 +79,7 @@ Filter 2D mesh elements (faces) according to the taper value: \section filter_skew Skew -Filter 2D mesh elements (faces) according to the skew value: +filters 2D mesh elements (faces) according to the skew value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Skew - threshold is floating point value (skew) @@ -90,7 +90,7 @@ Filter 2D mesh elements (faces) according to the skew value: \section filter_area Area -Filter 2D mesh elements (faces) according to the area value: +filters 2D mesh elements (faces) according to the area value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Area - threshold is floating point value (area) @@ -101,7 +101,7 @@ Filter 2D mesh elements (faces) according to the area value: \section filter_volume Volume -Filter 3D mesh elements (volumes) according to the volume value: +filters 3D mesh elements (volumes) according to the volume value: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_Volume3D - threshold is floating point value (volume) @@ -112,7 +112,7 @@ Filter 3D mesh elements (volumes) according to the volume value: \section filter_free_borders Free borders -Filter 1D mesh elements (edges) which represent free borders of a mesh: +filters 1D mesh elements (edges) which represent free borders of a mesh: - element type is \a SMESH.EDGE - functor type is \a SMESH.FT_FreeBorders - threshold value is not required @@ -123,8 +123,8 @@ Filter 1D mesh elements (edges) which represent free borders of a mesh: \section filter_free_edges Free edges -Filter 2D mesh elements (faces) consisting of edges belonging to one -element of mesh only: +filters 2D mesh elements (faces) having edges (i.e. links between +nodes, not mesh segments) belonging to one face of mesh only: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_FreeEdges - threshold value is not required @@ -135,7 +135,7 @@ element of mesh only: \section filter_free_nodes Free nodes -Filter free nodes: +filters free nodes: - element type is \a SMESH.NODE - functor type is \a SMESH.FT_FreeNodes - threshold value is not required @@ -146,7 +146,7 @@ Filter free nodes: \section filter_free_faces Free faces -Filter free faces: +filters free faces: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_FreeFaces - threshold value is not required @@ -157,7 +157,7 @@ Filter free faces: \section filter_bare_border_faces Bare border faces -Filter faces with bare borders: +filters faces with bare borders: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_BareBorderFace - threshold value is not required @@ -168,7 +168,7 @@ Filter faces with bare borders: \section filter_coplanar_faces Coplanar faces -Filter faces with bare borders: +filters coplanar faces: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_CoplanarFaces - threshold value is the face ID @@ -178,7 +178,7 @@ Filter faces with bare borders: \section filter_over_constrained_faces Over-constrained faces -Filter over-constrained faces: +filters over-constrained faces: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_OverConstrainedFace - threshold value is not required @@ -189,7 +189,7 @@ Filter over-constrained faces: \section filter_double_elements Double edges, Double faces, Double volumes -filter mesh elements basing on the same set of nodes: +filters mesh elements basing on the same set of nodes: - element type is either \a SMESH.EGDE, \a SMESH.FACE or \a SMESH.VOLUME - functor type is either \a SMESH.FT_EqualEdges, \a SMESH.FT_EqualFaces or \a SMESH.FT_EqualVolumes, @@ -211,8 +211,8 @@ filters mesh nodes which are coincident with other nodes (within a given toleran \section filter_borders_multiconnection Borders at multi-connection -Filter border 1D mesh elements (edges) according to the specified number of -connections (faces belonging the border edges) +filters 1D mesh elements (segments) according to the specified number of +connections (faces and volumes on whose border the segment lies): - element type is \a SMESH.EDGE - functor type is \a SMESH.FT_MultiConnection - threshold is integer value (number of connections) @@ -223,8 +223,8 @@ connections (faces belonging the border edges) \section filter_borders_multiconnection_2d Borders at multi-connection 2D -Filter 2D mesh elements (faces) which consist of edges belonging -to the specified number of mesh elements +filters 2D mesh elements (faces) with the specified maximal number of +faces connected to a border (link between nodes, not mesh segment): - element type is \a SMESH.FACE - functor type is \a SMESH.FT_MultiConnection2D - threshold is integer value (number of connections) @@ -235,7 +235,7 @@ to the specified number of mesh elements \section filter_length Length -Filter 1D mesh elements (edges) according to the edge length value: +filters 1D mesh elements (edges) according to the edge length value: - element type should be \a SMESH.EDGE - functor type should be \a SMESH.FT_Length - threshold is floating point value (length) @@ -246,8 +246,8 @@ Filter 1D mesh elements (edges) according to the edge length value: \section filter_length_2d Length 2D -Filter 2D mesh elements (faces) corresponding to the maximum length. -value of its edges: +filters 2D mesh elements (faces) according to the maximum length of its +edges (links between nodes): - element type should be \a SMESH.FACE - functor type should be \a SMESH.FT_Length2D - threshold is floating point value (edge length) @@ -258,11 +258,11 @@ value of its edges: \section filter_max_element_length_2d Element Diameter 2D -Filter 2D mesh elements (faces) corresponding to the maximum length -value of its edges and diagonals: +filters 2D mesh elements (faces) according to the maximum length +of its edges and diagonals: - element type should be \a SMESH.FACE - functor type should be \a SMESH.FT_MaxElementLength2D -- threshold is floating point value (edge/diagonal length) +- threshold is floating point value (length) \tui_script{filters_ex22.py} @@ -270,8 +270,8 @@ value of its edges and diagonals: \section filter_max_element_length_3d Element Diameter 3D -Filter 3D mesh elements (volumes) corresponding to the maximum length -value of its edges and diagonals: +filters 3D mesh elements (volumes) according to the maximum length +of its edges and diagonals: - element type should be \a SMESH.VOLUME - functor type should be \a SMESH.FT_MaxElementLength3D - threshold is floating point value (edge/diagonal length) @@ -282,7 +282,8 @@ value of its edges and diagonals: \section filter_bare_border_volumes Bare border volumes -Filter 3D mesh elements with bare borders: +filters 3D mesh elements with bare borders, i.e. having a facet not +shared with other volumes and without a face on it: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_BareBorderVolume - threshold value is not required @@ -293,7 +294,7 @@ Filter 3D mesh elements with bare borders: \section filter_over_constrained_volumes Over-constrained volumes -Filter over-constrained volumes: +filters over-constrained volumes, whose all nodes are on the mesh boundary: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_OverConstrainedVolume - threshold value is not required @@ -304,7 +305,7 @@ Filter over-constrained volumes: \section filter_belong_to_group Belong to Mesh Group -Filter mesh entities (nodes or elements) included in a mesh group +filters mesh entities (nodes or elements) included in a mesh group defined by threshold value: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type should be \a SMESH.FT_BelongToMeshGroup @@ -314,27 +315,31 @@ defined by threshold value: \section filter_belong_to_geom Belong to Geom -Filter mesh entities (nodes or elements) which all nodes lie on the +filters mesh entities (nodes or elements) which all nodes lie on the shape defined by threshold value: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type should be \a SMESH.FT_BelongToGeom - threshold is geometrical object +- tolerance is a distance between a node and the geometrical object; +it is used if an node is not associated to any geometry. \tui_script{filters_ex26.py} \section filter_lying_on_geom Lying on Geom -Filter mesh entities (nodes or elements) at least one node of which lies on the +filters mesh entities (nodes or elements) at least one node of which lies on the shape defined by threshold value: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type should be \a SMESH.FT_LyingOnGeom - threshold is geometrical object +- tolerance is a distance between a node and the geometrical object; +it is used if an node is not associated to any geometry. \tui_script{filters_ex27.py} \section filter_belong_to_plane Belong to Plane -Filter mesh entities (nodes or elements) which all nodes belong to the +filters mesh entities (nodes or elements) which all nodes belong to the plane defined by threshold value with the given tolerance: - element type can be: \a SMESH.NODE, \a SMESH.EDGE, \a SMESH.FACE - functor type should be \a SMESH.FT_BelongToPlane @@ -345,7 +350,7 @@ plane defined by threshold value with the given tolerance: \section filter_belong_to_cylinder Belong to Cylinder -Filter mesh entities (nodes or elements) which all nodes belong to the +filters mesh entities (nodes or elements) which all nodes belong to the cylindrical face defined by threshold value with the given tolerance: - element type can be: \a , \a SMESH.EDGE, \a SMESH.FACE - functor type should be \a SMESH.FT_BelongToCylinder @@ -356,7 +361,7 @@ cylindrical face defined by threshold value with the given tolerance: \section filter_belong_to_surface Belong to Surface -Filter mesh entities (nodes or elements) which all nodes belong to the +filters mesh entities (nodes or elements) which all nodes belong to the arbitrary surface defined by threshold value with the given tolerance: - element type can be: \a SMESH.NODE, \a SMESH.EDGE, \a SMESH.FACE - functor type should be \a SMESH.FT_BelongToGenSurface @@ -367,7 +372,7 @@ arbitrary surface defined by threshold value with the given tolerance: \section filter_range_of_ids Range of IDs -Filter mesh entities elements (nodes or elements) according to the +filters mesh entities elements (nodes or elements) according to the specified identifiers range: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type is \a SMESH.FT_RangeOfIds @@ -377,7 +382,7 @@ specified identifiers range: \section filter_bad_oriented_volume Badly oriented volume -Filter 3D mesh elements (volumes), which are incorrectly oriented from +filters 3D mesh elements (volumes), which are incorrectly oriented from the point of view of MED convention. - element type should be \a SMESH.VOLUME - functor type is \a SMESH.FT_BadOrientedVolume @@ -387,7 +392,7 @@ the point of view of MED convention. \section filter_linear_or_quadratic Linear / quadratic -Filter linear / quadratic mesh elements: +filters linear / quadratic mesh elements: - element type should be any element type, e.g.: \a SMESH.EDGE, \a SMESH.FACE, \a SMESH.VOLUME - functor type is \a SMESH.FT_LinearOrQuadratic - threshold is not required @@ -398,7 +403,7 @@ elements are selected, otherwise (by default) linear elements are selected \section filter_group_color Group color -Filter mesh entities, belonging to the group with the color defined by the threshold value. +filters mesh entities, belonging to the group with the color defined by the threshold value. - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type is \a SMESH.FT_GroupColor - threshold should be of SALOMEDS.Color type @@ -407,7 +412,7 @@ Filter mesh entities, belonging to the group with the color defined by the thres \section filter_geom_type Geometry type -Filter mesh elements by the geometric type defined with the threshold +filters mesh elements by the geometric type defined with the threshold value. The list of available geometric types depends on the element entity type. - element type should be any element type, e.g.: \a SMESH.EDGE, \a SMESH.FACE, \a SMESH.VOLUME diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index 4973a5d1e..253ef61b3 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -338,17 +338,24 @@ void SMESHGUI_MeshTab::setCurrentHyp( const int theId, const int theIndex ) } else // more than one additional hyp assigned { - // move a hyp from myHypCombo[ AddHyp ] to myAddHypList - for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i ) + if ( theIndex > 0 ) { - int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt(); - if ( theIndex == curIndex ) + // move a hyp from myHypCombo[ AddHyp ] to myAddHypList + for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i ) { - addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex ); - myHypCombo[ AddHyp ]->removeItem( i ); - break; + int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt(); + if ( theIndex == curIndex ) + { + addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex ); + myHypCombo[ AddHyp ]->removeItem( i ); + break; + } } } + else + { + myAddHypList->clear(); + } } } diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 69053214a..cc873f15b 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -2010,6 +2010,9 @@ int SMESHGUI_MeshOp::currentHyp( const int theDim, const int theHypType ) const bool SMESHGUI_MeshOp::isSelectedHyp( int theDim, int theHypType, int theIndex) const { + if ( theIndex < 0 ) + return false; + if ( theHypType < AddHyp ) // only one hyp can be selected return currentHyp( theDim, theHypType ) == theIndex; @@ -2050,17 +2053,28 @@ bool SMESHGUI_MeshOp::isAccessibleDim( const int theDim ) const * \param theDim - dimension of hypothesis or algorithm * \param theHypType - Type of hypothesis (Algo, MainHyp, AddHyp) * \param theIndex - Index of hypothesis + * \param updateHypsOnAlgoDeselection - to clear and disable hyps if algo deselected * * Gets current hypothesis or algorithms */ //================================================================================ -void SMESHGUI_MeshOp::setCurrentHyp( const int theDim, - const int theHypType, - const int theIndex ) +void SMESHGUI_MeshOp::setCurrentHyp( const int theDim, + const int theHypType, + const int theIndex, + const bool updateHypsOnAlgoDeselection) { myIgnoreAlgoSelection = true; myDlg->tab( theDim )->setCurrentHyp( theHypType, theIndex + 1 ); myIgnoreAlgoSelection = false; + + if ( updateHypsOnAlgoDeselection && theHypType == Algo && theIndex < 0 ) + { + const QStringList noHyps; + myDlg->tab( theDim )->setAvailableHyps( MainHyp, noHyps ); + myDlg->tab( theDim )->setExistingHyps ( MainHyp, noHyps ); + myDlg->tab( theDim )->setAvailableHyps( AddHyp, noHyps ); + myDlg->tab( theDim )->setExistingHyps ( AddHyp, noHyps ); + } } //================================================================================ @@ -2645,7 +2659,7 @@ void SMESHGUI_MeshOp::setAvailableMeshType( const QStringList& theTypeMesh ) * \param theIndex - Index of current type of mesh */ //================================================================================ -void SMESHGUI_MeshOp::onAlgoSetByMeshType( const int theTabIndex, const int theIndex) +void SMESHGUI_MeshOp::onAlgoSetByMeshType( const int theTabIndex, const int theIndex ) { setFilteredAlgoData( theTabIndex, theIndex); } @@ -2705,8 +2719,8 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI } else for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) { - if ( i > myMaxShapeDim || ( isReqDisBound && i != aReqDim ) ) myDlg->disableTab( i ); - else myDlg->enableTab( i ); + if ( i > myMaxShapeDim || ( isReqDisBound && i < aReqDim ) ) myDlg->disableTab( i ); + else myDlg->enableTab( i ); } myDlg->setCurrentTab( theTabIndex ); } @@ -2740,7 +2754,7 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI //set new algorithm list and select the current algorithm myDlg->tab( dim )->setAvailableHyps( Algo, anAvailableAlgs ); anCurrentCompareType = ( anCompareType == "HEXA" || anCompareType == "QUAD" ) ? "QUAD" : "TRIA"; - setCurrentHyp( dim, Algo, anCurrentAvailableAlgo ); + setCurrentHyp( dim, Algo, anCurrentAvailableAlgo, /*updateHyps=*/true ); } for ( int i = myMaxShapeDim; i >= SMESH::DIM_0D; i-- ) { @@ -2753,7 +2767,7 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI for (int j = myMaxShapeDim; j >= SMESH::DIM_0D; j--) { if ( currentHyp( j, Algo ) < 0 ) { myDlg->disableTab( j ); - setCurrentHyp( j , Algo, -1 ); + setCurrentHyp( j , Algo, -1, /*updateHyps=*/true ); } } break; @@ -2763,8 +2777,8 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI } } if ( aDim == SMESH::DIM_2D) { + setCurrentHyp( SMESH::DIM_3D, Algo, -1, /*updateHyps=*/true ); myDlg->disableTab( SMESH::DIM_3D ); - setCurrentHyp( SMESH::DIM_3D, Algo, -1); } int currentTab = ( theTabIndex <= aDim ) ? theTabIndex : aDim; diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.h b/src/SMESHGUI/SMESHGUI_MeshOp.h index 35bd50672..6d26686b4 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.h +++ b/src/SMESHGUI/SMESHGUI_MeshOp.h @@ -128,7 +128,7 @@ private: bool isSelectedHyp( int, int, int ) const; int nbDlgHypTypes( const int ) const; bool isAccessibleDim( const int ) const; - void setCurrentHyp( const int, const int, const int ); + void setCurrentHyp( const int, const int, const int, const bool=false); void setDefaultName( const QString& prefix="" ) const; SMESH::SMESH_Hypothesis_var getAlgo( const int ); void readMesh(); diff --git a/src/SMESH_PY/smeshstudytools.py b/src/SMESH_PY/smeshstudytools.py index 51bcc3567..7d4277211 100644 --- a/src/SMESH_PY/smeshstudytools.py +++ b/src/SMESH_PY/smeshstudytools.py @@ -127,8 +127,8 @@ class SMeshStudyTools: from salome.smesh import smeshBuilder smesh = smeshBuilder.New(self.editor.study) - meshObject=smesh.IDToObject(entry) - return meshObject + meshObject=salome.IDToObject(entry) + return smesh.Mesh( meshObject ) ## Returns the SMESH object associated to the specified \em SObject, # (the SObject is an item in the objects browser). diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 2c98e1653..67e3c71b3 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1970,7 +1970,7 @@ class Mesh: # @param groupName the name of the mesh group # @param elementType the type of elements in the group; either of # (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - # @param elemIDs the list of ids + # @param elemIDs either the list of ids, group, sub-mesh, or filter # @return SMESH_Group # @ingroup l2_grps_create def MakeGroupByIds(self, groupName, elementType, elemIDs): From 39ef405afeff484d4a77e1d3604646b05d80eabf Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 4 Mar 2016 15:09:50 +0100 Subject: [PATCH 26/48] general crack dialog, another error detection --- src/Tools/blocFissure/gmu/peauInterne.py | 20 +++++++++++++++++++ .../blocFissure/gmu/restreintFaceFissure.py | 7 +++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Tools/blocFissure/gmu/peauInterne.py b/src/Tools/blocFissure/gmu/peauInterne.py index b1915042e..8d6643a5c 100644 --- a/src/Tools/blocFissure/gmu/peauInterne.py +++ b/src/Tools/blocFissure/gmu/peauInterne.py @@ -3,6 +3,8 @@ import logging from geomsmesh import smesh import SMESH +import traceback +from fissError import fissError from listOfExtraFunctions import lookForCorner from fusionMaillageAttributionDefaut import fusionMaillageDefaut @@ -40,6 +42,24 @@ def peauInterne(fichierMaillage, shapeDefaut, nomZones): if grp.GetName() == nomZones + "_internalEdges": zoneDefaut_internalEdges = grp break + + # --- Le groupe ZoneDefaut ne doit contenir que des Hexaèdres" + + info=maillageSain.GetMeshInfo(zoneDefaut) + keys = info.keys(); keys.sort() + nbelem=0 + nbhexa=0 + for i in keys: + #print " %s : %d" % ( i, info[i] ) + nbelem+=info[i] + if i == "Entity_Hexa": + nbhexa+=info[i] + if (nbelem == 0) or (nbhexa < nbelem) : + texte = "La zone a remailler est incorrecte : " + texte += "Causes possibles :
        " + texte += "
      • Les mailles à enlever dans le maillage sain n'ont pas été détectées.
      • " + texte += "
      • Il n'y a pas que des Hexaèdres linéaires dans la zone à remailler (mailles quadratiques, tetraèdres non traités)
      " + raise fissError(traceback.extract_stack(),texte) nbAdded, maillageSain, DefautBoundary = maillageSain.MakeBoundaryElements( SMESH.BND_2DFROM3D, 'DefBound', '', 0, [ zoneDefaut ]) internal = maillageSain.GetMesh().CutListOfGroups( [ DefautBoundary ], [ zoneDefaut_skin ], 'internal' ) diff --git a/src/Tools/blocFissure/gmu/restreintFaceFissure.py b/src/Tools/blocFissure/gmu/restreintFaceFissure.py index c2a055f8f..7e1d1e0e4 100644 --- a/src/Tools/blocFissure/gmu/restreintFaceFissure.py +++ b/src/Tools/blocFissure/gmu/restreintFaceFissure.py @@ -28,8 +28,11 @@ def restreintFaceFissure(shapeDefaut, facesDefaut, pointInterne): facesPartShapeDefautSorted, minSurf, maxSurf = sortFaces(facesPartShapeDefaut) # la face de fissure dans le volume doit être la plus grande except: texte = "Restriction de la face de fissure au domaine solide impossible. " - texte += "Cause possible : la face de fissure est tangente à la paroi solide. " - texte += "Elle doit déboucher franchement, sans que la surface dehors ne devienne plus grande que la surface dans le solide. " + texte += "Causes possibles :
        " + texte += "
      • La face de fissure est tangente à la paroi solide." + texte += "Elle doit déboucher franchement, sans que la surface dehors ne devienne plus grande que la surface dans le solide.
      • " + texte += "
      • le prémaillage de la face de fissure est trop grossier, les mailles à enlever dans le maillage sain " + texte += "n'ont pas toutes été détectées.
      " raise fissError(traceback.extract_stack(),texte) logging.debug("surfaces faces fissure étendue, min %s, max %s", minSurf, maxSurf) facesPortFissure = facesPartShapeDefautSorted[-1] From d54b8e1c78f746d202422ee1ee50ce7a35405c8a Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 4 Mar 2016 16:29:26 +0100 Subject: [PATCH 27/48] general crack dialog, another error detection --- src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py | 9 +++++++++ src/Tools/blocFissure/gmu/peauInterne.py | 5 +++-- src/Tools/blocFissure/gmu/restreintFaceFissure.py | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py b/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py index dee9bf84f..5225d9834 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py @@ -4,6 +4,8 @@ import logging from geomsmesh import geompy import math from distance2 import distance2 +import traceback +from fissError import fissError # ----------------------------------------------------------------------------- # --- zone de defaut extraite du maillage @@ -60,5 +62,12 @@ def creeZoneDefautMaillage(maillagesSains, shapeDefaut, tailleDefaut, verticesShapes.append(vertices) pass + if (nb == 0) : + texte = "La zone à remailler n'est pas détectée correctement.
      " + texte += "Cause possible :
        " + texte += "
      • La distance d'influence est trop petite. " + texte += "L'ordre de grandeur minimal correspond à la taille des mailles du maillage sain dans la zone à remailler.
      " + raise fissError(traceback.extract_stack(),texte) + dmoyen = math.sqrt(cumul/nb) # ~ taille de l'arête moyenne du maillage global return origShapes, verticesShapes, dmoyen diff --git a/src/Tools/blocFissure/gmu/peauInterne.py b/src/Tools/blocFissure/gmu/peauInterne.py index 8d6643a5c..ae6870c88 100644 --- a/src/Tools/blocFissure/gmu/peauInterne.py +++ b/src/Tools/blocFissure/gmu/peauInterne.py @@ -55,10 +55,11 @@ def peauInterne(fichierMaillage, shapeDefaut, nomZones): if i == "Entity_Hexa": nbhexa+=info[i] if (nbelem == 0) or (nbhexa < nbelem) : - texte = "La zone a remailler est incorrecte : " + texte = "La zone a remailler est incorrecte.
      " texte += "Causes possibles :
        " texte += "
      • Les mailles à enlever dans le maillage sain n'ont pas été détectées.
      • " - texte += "
      • Il n'y a pas que des Hexaèdres linéaires dans la zone à remailler (mailles quadratiques, tetraèdres non traités)
      " + texte += "
    • Certaines faces du maillage sain sont à l'envers : les normales aux faces en paroi de volume doivent être sortantes.
    • " + texte += "
    • Il n'y a pas que des Hexaèdres réglés linéaires dans la zone à remailler (notamment mailles quadratiques, tetraèdres non traités)
    " raise fissError(traceback.extract_stack(),texte) nbAdded, maillageSain, DefautBoundary = maillageSain.MakeBoundaryElements( SMESH.BND_2DFROM3D, 'DefBound', '', 0, [ zoneDefaut ]) diff --git a/src/Tools/blocFissure/gmu/restreintFaceFissure.py b/src/Tools/blocFissure/gmu/restreintFaceFissure.py index 7e1d1e0e4..b300ae19f 100644 --- a/src/Tools/blocFissure/gmu/restreintFaceFissure.py +++ b/src/Tools/blocFissure/gmu/restreintFaceFissure.py @@ -27,7 +27,7 @@ def restreintFaceFissure(shapeDefaut, facesDefaut, pointInterne): try: facesPartShapeDefautSorted, minSurf, maxSurf = sortFaces(facesPartShapeDefaut) # la face de fissure dans le volume doit être la plus grande except: - texte = "Restriction de la face de fissure au domaine solide impossible. " + texte = "Restriction de la face de fissure au domaine solide impossible.
    " texte += "Causes possibles :
      " texte += "
    • La face de fissure est tangente à la paroi solide." texte += "Elle doit déboucher franchement, sans que la surface dehors ne devienne plus grande que la surface dans le solide.
    • " From 5b62e4db7cca70738f4487b2788cc2bae2c2df8f Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 4 Mar 2016 20:54:10 +0300 Subject: [PATCH 28/48] 53099: 3D Extrusion algo refuses to work on an extruded solid with internal faces --- src/SMESH_SWIG/smeshBuilder.py | 2 +- src/StdMeshers/StdMeshers_Prism_3D.cxx | 94 ++++++++++++++++++-------- 2 files changed, 67 insertions(+), 29 deletions(-) diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 67e3c71b3..cfd4117f1 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -252,7 +252,7 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo, mesh): if mesh: meshName = GetName( mesh ) if meshName and meshName != NO_NAME: - where = '"%s" in "%s"' % ( geomName, meshName ) + where = '"%s" shape in "%s" mesh ' % ( geomName, meshName ) if status < HYP_UNKNOWN_FATAL and where: print '"%s" was assigned to %s but %s' %( hypName, where, reason ) elif where: diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 8b7347d7b..225da4650 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -2509,8 +2509,10 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() _iL( SMESH_MesherHelper::WrapIndex( iE-1, nbE ) + shift ), _iR( SMESH_MesherHelper::WrapIndex( iE+1, nbE ) + shift ) { + //_edge.Orientation( TopAbs_FORWARD ); // for operator==() to work } EdgeWithNeighbors() {} + bool IsInternal() const { return !_edge.IsNull() && _edge.Orientation() == TopAbs_INTERNAL; } }; // PrismSide contains all FACEs linking a bottom EDGE with a top one. struct PrismSide @@ -2524,6 +2526,7 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() int _nbCheckedEdges; // nb of EDGEs whose location is defined PrismSide *_leftSide; // neighbor sides PrismSide *_rightSide; + bool _isInternal; // whether this side raises from an INTERNAL EDGE void SetExcluded() { _leftSide = _rightSide = NULL; } bool IsExcluded() const { return !_leftSide; } const TopoDS_Edge& Edge( int i ) const @@ -2536,10 +2539,15 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() if ( E.IsSame( Edge( i ))) return i; return -1; } - bool IsSideFace( const TopoDS_Shape& face ) const + bool IsSideFace( const TopoDS_Shape& face, const bool checkNeighbors ) const { if ( _faces->Contains( face )) // avoid returning true for a prism top FACE return ( !_face.IsNull() || !( face.IsSame( _faces->FindKey( _faces->Extent() )))); + + if ( checkNeighbors ) + return (( _leftSide && _leftSide->IsSideFace ( face, false )) || + ( _rightSide && _rightSide->IsSideFace( face, false ))); + return false; } }; @@ -2551,15 +2559,19 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() vector< EdgeWithNeighbors > & edges, const bool noHolesAllowed) { + TopoDS_Face f = face; + if ( f.Orientation() != TopAbs_FORWARD && + f.Orientation() != TopAbs_REVERSED ) + f.Orientation( TopAbs_FORWARD ); list< TopoDS_Edge > ee; list< int > nbEdgesInWires; - int nbW = SMESH_Block::GetOrderedEdges( face, ee, nbEdgesInWires ); + int nbW = SMESH_Block::GetOrderedEdges( f, ee, nbEdgesInWires ); if ( nbW > 1 && noHolesAllowed ) return false; int iE, nbTot = 0; - list< TopoDS_Edge >::iterator e = ee.begin(); - list< int >::iterator nbE = nbEdgesInWires.begin(); + list< TopoDS_Edge >::iterator e = ee.begin(); + list< int >::iterator nbE = nbEdgesInWires.begin(); for ( ; nbE != nbEdgesInWires.end(); ++nbE ) for ( iE = 0; iE < *nbE; ++e, ++iE ) if ( SMESH_Algo::isDegenerated( *e )) @@ -2568,10 +2580,6 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() --(*nbE); --iE; } - else - { - e->Orientation( TopAbs_FORWARD ); // for operator==() to work - } edges.clear(); e = ee.begin(); @@ -2581,6 +2589,35 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() edges.push_back( EdgeWithNeighbors( *e, iE, *nbE, nbTot )); nbTot += *nbE; } + + // IPAL53099. Set correct neighbors to INTERNAL EDGEs, which can be connected to + // EDGEs of the outer WIRE but this fact can't be detected by their order. + if ( nbW > 1 ) + { + int iFirst = 0, iLast; + for ( nbE = nbEdgesInWires.begin(); nbE != nbEdgesInWires.end(); ++nbE ) + { + iLast = iFirst + *nbE - 1; + TopoDS_Vertex vv[2] = { SMESH_MesherHelper::IthVertex( 0, edges[ iFirst ]._edge ), + SMESH_MesherHelper::IthVertex( 1, edges[ iLast ]._edge ) }; + bool isConnectOk = ( vv[0].IsSame( vv[1] )); + if ( !isConnectOk ) + { + // look for an EDGE of the outer WIRE connected to vv + TopoDS_Vertex v0, v1; + for ( iE = 0; iE < nbEdgesInWires.front(); ++iE ) + { + v0 = SMESH_MesherHelper::IthVertex( 0, edges[ iE ]._edge ); + v1 = SMESH_MesherHelper::IthVertex( 1, edges[ iE ]._edge ); + if ( vv[0].IsSame( v0 ) || vv[0].IsSame( v1 )) + edges[ iFirst ]._iL = iE; + if ( vv[1].IsSame( v0 ) || vv[1].IsSame( v1 )) + edges[ iLast ]._iR = iE; + } + } + iFirst += *nbE; + } + } return edges.size(); } //-------------------------------------------------------------------------------- @@ -2703,11 +2740,12 @@ bool StdMeshers_Prism_3D::IsApplicable(const TopoDS_Shape & shape, bool toCheckA sides.resize( botEdges.size() ); for ( size_t iS = 0; iS < botEdges.size(); ++iS ) { - sides[ iS ]._topEdge = botEdges[ iS ]._edge; - sides[ iS ]._face = botF; - sides[ iS ]._leftSide = & sides[ botEdges[ iS ]._iR ]; - sides[ iS ]._rightSide = & sides[ botEdges[ iS ]._iL ]; - sides[ iS ]._faces = & facesOfSide[ iS ]; + sides[ iS ]._topEdge = botEdges[ iS ]._edge; + sides[ iS ]._face = botF; + sides[ iS ]._leftSide = & sides[ botEdges[ iS ]._iR ]; + sides[ iS ]._rightSide = & sides[ botEdges[ iS ]._iL ]; + sides[ iS ]._isInternal = botEdges[ iS ].IsInternal(); + sides[ iS ]._faces = & facesOfSide[ iS ]; sides[ iS ]._faces->Clear(); } @@ -2736,8 +2774,9 @@ bool StdMeshers_Prism_3D::IsApplicable(const TopoDS_Shape & shape, bool toCheckA if ( side._isCheckedEdge[ iE ] ) continue; const TopoDS_Edge& vertE = side.Edge( iE ); const TopoDS_Shape& neighborF = getAnotherFace( side._face, vertE, facesOfEdge ); - bool isEdgeShared = adjSide->IsSideFace( neighborF ); - if ( isEdgeShared ) // vertE is shared with adjSide + bool isEdgeShared = (( adjSide->IsSideFace( neighborF, side._isInternal )) || + ( adjSide == &side && neighborF.IsSame( side._face )) ); + if ( isEdgeShared ) // vertE is shared with adjSide { isAdvanced = true; side._isCheckedEdge[ iE ] = true; @@ -2778,20 +2817,19 @@ bool StdMeshers_Prism_3D::IsApplicable(const TopoDS_Shape & shape, bool toCheckA { stop = true; } - else if ( side._leftSide != & side ) // not closed side face + else if ( side._leftSide != & side && // not closed side face + side._leftSide->_faces->Contains( f )) { - if ( side._leftSide->_faces->Contains( f )) - { - stop = true; // probably f is the prism top face - side._leftSide->_face.Nullify(); - side._leftSide->_topEdge.Nullify(); - } - if ( side._rightSide->_faces->Contains( f )) - { - stop = true; // probably f is the prism top face - side._rightSide->_face.Nullify(); - side._rightSide->_topEdge.Nullify(); - } + stop = true; // probably f is the prism top face + side._leftSide->_face.Nullify(); + side._leftSide->_topEdge.Nullify(); + } + else if ( side._rightSide != & side && + side._rightSide->_faces->Contains( f )) + { + stop = true; // probably f is the prism top face + side._rightSide->_face.Nullify(); + side._rightSide->_topEdge.Nullify(); } if ( stop ) { From 8eda0c3c6d688da2f74167c046d880e930f0f4b2 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 7 Mar 2016 18:32:29 +0100 Subject: [PATCH 29/48] amorce doc Sphinx blocFissure --- resources/SalomeApp.xml.in | 1 + src/Tools/blocFissure/CMakeLists.txt | 1 + src/Tools/blocFissure/doc/CMakeLists.txt | 63 ++++++++ src/Tools/blocFissure/doc/conf.py.in | 179 +++++++++++++++++++++++ src/Tools/blocFissure/doc/index.rst | 39 +++++ 5 files changed, 283 insertions(+) create mode 100755 src/Tools/blocFissure/doc/CMakeLists.txt create mode 100644 src/Tools/blocFissure/doc/conf.py.in create mode 100644 src/Tools/blocFissure/doc/index.rst diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index 94c0d894e..260e2b51c 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -122,6 +122,7 @@ +
      diff --git a/src/Tools/blocFissure/CMakeLists.txt b/src/Tools/blocFissure/CMakeLists.txt index 3b69e0f83..092977b32 100644 --- a/src/Tools/blocFissure/CMakeLists.txt +++ b/src/Tools/blocFissure/CMakeLists.txt @@ -20,6 +20,7 @@ ADD_SUBDIRECTORY(CasTests) ADD_SUBDIRECTORY(gmu) ADD_SUBDIRECTORY(materielCasTests) +ADD_SUBDIRECTORY(doc) IF(SALOME_BUILD_GUI) ADD_SUBDIRECTORY(ihm) diff --git a/src/Tools/blocFissure/doc/CMakeLists.txt b/src/Tools/blocFissure/doc/CMakeLists.txt new file mode 100755 index 000000000..c1b0efe46 --- /dev/null +++ b/src/Tools/blocFissure/doc/CMakeLists.txt @@ -0,0 +1,63 @@ +# Copyright (C) 2012-2015 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(RSTFILES + index.rst +) + +SET(SPHINXOPTS ) +SET(SOURCEDIR ${CMAKE_CURRENT_SOURCE_DIR}) +SET(PAPEROPT_a4 -D latex_paper_size=a4) +SET(ALLSPHINXOPTS -d doctrees ${PAPEROPT_a4} ${SPHINXOPTS} ${SOURCEDIR}) + +SALOME_CONFIGURE_FILE(conf.py.in conf.py) + +ADD_CUSTOM_TARGET(BUILD_HTML ALL + COMMAND ${CMAKE_COMMAND} -E make_directory html + COMMAND ${CMAKE_COMMAND} -E make_directory doctrees + COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} -b html ${ALLSPHINXOPTS} html + DEPENDS ${RSTFILES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + +ADD_CUSTOM_TARGET(BUILD_PDF ALL + COMMAND ${CMAKE_COMMAND} -E make_directory latex + COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} -b latex ${ALLSPHINXOPTS} latex + COMMAND make -C latex all-pdf + DEPENDS ${RSTFILES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ + DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/blocFissure + PATTERN ".buildinfo" EXCLUDE +) + +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/blocFissure.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/blocFissure) + +#SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) +#SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") + +#ADD_CUSTOM_TARGET(html_docs_ZCracksPlug COMMAND ${_cmd}) + +#INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target html_docs_ZCracksPlug)") +#INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docutils/ DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/zcracks) + +#SET(make_clean_files docutils doctrees) +#SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}") diff --git a/src/Tools/blocFissure/doc/conf.py.in b/src/Tools/blocFissure/doc/conf.py.in new file mode 100644 index 000000000..47bfec558 --- /dev/null +++ b/src/Tools/blocFissure/doc/conf.py.in @@ -0,0 +1,179 @@ +# -*- coding: utf-8 -*- +# +# Yams PlugIn documentation build configuration file, created by +# sphinx-quickstart on Wed Sep 14 11:40:32 2011. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# The contents of this file are pickled, so don't put values in the namespace +# that aren't pickleable (module imports are okay, they're removed automatically). +# +# All configuration values have a default value; values that are commented out +# serve to show the default value. + +import sys, os + +# If your extensions are in another directory, add it here. If the directory +# is relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +#sys.path.append(os.path.abspath('some/directory')) + +# General configuration +# --------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc'] + +# Add any paths that contain templates here, relative to this directory. +#templates_path = ['.templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General substitutions. +project = 'Plug-in blocFissure' +copyright = '2010-2016 EDF R&D' + +# The default replacements for |version| and |release|, also used in various +# other places throughout the built documents. +# +# The short X.Y version. +version = '@SALOMESMESH_VERSION@' +# The full version, including alpha/beta/rc tags. +release = '@SALOMESMESH_VERSION@' + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directories, that shouldn't be searched +# for source files. +#exclude_dirs = [] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + + +# Options for HTML output +# ----------------------- + +# The style sheet to use for HTML and HTML Help pages. A file of that name +# must exist either in Sphinx' static/ path, or in one of the custom paths +# given in html_static_path. +html_style = 'default' + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (within the static path) to place at the top of +# the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_use_modindex = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, the reST sources are included in the HTML build as _sources/. +#html_copy_source = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'blocFissure_doc' + + +# Options for LaTeX output +# ------------------------ + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, document class [howto/manual]). +latex_documents = [ + ('index', 'blocFissure.tex', 'Documentation Plug-in blocFissure', + 'EDF', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_use_modindex = True diff --git a/src/Tools/blocFissure/doc/index.rst b/src/Tools/blocFissure/doc/index.rst new file mode 100644 index 000000000..4005e6b10 --- /dev/null +++ b/src/Tools/blocFissure/doc/index.rst @@ -0,0 +1,39 @@ +.. + Copyright (C) 2015-2016 EDF + + This file is part of SALOME HYDRO module. + + SALOME HYDRO module is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SALOME HYDRO module is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with SALOME HYDRO module. If not, see . + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Documentation du plugin blocFissure +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +Le plugin blocFissure traite l'insertion de fissure dans un maillage sain. + +################### +Outil métier coudes +################### + +Cet outil génère des maillages de tuyaux coudés, avec des fissures de différents types, au niveau du coude. +Cet outil traite un cas particulier de l'outil général d'insertion de fissure dans un maillage sain. + +########################################## +Insertion de fissure dans un maillage sain +########################################## + +Partant d'un maillage sain et d'une face de fissure décrite en CAO, l'outil modifie le maillage sain, +en introduisant un maillage de la fissure, sous la forme d'un tore rayonnant le long de la ligne de fond de fissure. From 635cfb4d85f0a2a39d809381ebfe3fc88f0b10b2 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Tue, 8 Mar 2016 11:41:15 +0100 Subject: [PATCH 30/48] general crack dialog, error in hexa detection --- src/Tools/blocFissure/gmu/peauInterne.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tools/blocFissure/gmu/peauInterne.py b/src/Tools/blocFissure/gmu/peauInterne.py index ae6870c88..6e6915966 100644 --- a/src/Tools/blocFissure/gmu/peauInterne.py +++ b/src/Tools/blocFissure/gmu/peauInterne.py @@ -52,7 +52,7 @@ def peauInterne(fichierMaillage, shapeDefaut, nomZones): for i in keys: #print " %s : %d" % ( i, info[i] ) nbelem+=info[i] - if i == "Entity_Hexa": + if "Entity_Hexa" in str(i): nbhexa+=info[i] if (nbelem == 0) or (nbhexa < nbelem) : texte = "La zone a remailler est incorrecte.
      " From 4ae19232e4bac8cec51b008f9f893c50c2cf1117 Mon Sep 17 00:00:00 2001 From: mnt Date: Thu, 10 Mar 2016 11:28:48 +0300 Subject: [PATCH 31/48] Do not generate PDF documentation with latex --- src/Tools/blocFissure/doc/CMakeLists.txt | 45 +++++------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/src/Tools/blocFissure/doc/CMakeLists.txt b/src/Tools/blocFissure/doc/CMakeLists.txt index c1b0efe46..8605eda97 100755 --- a/src/Tools/blocFissure/doc/CMakeLists.txt +++ b/src/Tools/blocFissure/doc/CMakeLists.txt @@ -17,47 +17,18 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(RSTFILES - index.rst -) - -SET(SPHINXOPTS ) -SET(SOURCEDIR ${CMAKE_CURRENT_SOURCE_DIR}) -SET(PAPEROPT_a4 -D latex_paper_size=a4) -SET(ALLSPHINXOPTS -d doctrees ${PAPEROPT_a4} ${SPHINXOPTS} ${SOURCEDIR}) - SALOME_CONFIGURE_FILE(conf.py.in conf.py) -ADD_CUSTOM_TARGET(BUILD_HTML ALL - COMMAND ${CMAKE_COMMAND} -E make_directory html - COMMAND ${CMAKE_COMMAND} -E make_directory doctrees - COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} -b html ${ALLSPHINXOPTS} html - DEPENDS ${RSTFILES} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) - -ADD_CUSTOM_TARGET(BUILD_PDF ALL - COMMAND ${CMAKE_COMMAND} -E make_directory latex - COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} -b latex ${ALLSPHINXOPTS} latex - COMMAND make -C latex all-pdf - DEPENDS ${RSTFILES} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) +SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ +ADD_CUSTOM_TARGET(html_docs_blocFissure COMMAND ${_cmd}) + +INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target html_docs_blocFissure)") +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docutils/ DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/blocFissure PATTERN ".buildinfo" EXCLUDE ) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/blocFissure.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/blocFissure) - -#SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) -#SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") - -#ADD_CUSTOM_TARGET(html_docs_ZCracksPlug COMMAND ${_cmd}) - -#INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target html_docs_ZCracksPlug)") -#INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docutils/ DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/zcracks) - -#SET(make_clean_files docutils doctrees) -#SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}") +SET(make_clean_files docutils doctrees) +SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}") From 0224364ee28a7d92b0d28376df5649f6036be4c0 Mon Sep 17 00:00:00 2001 From: akl Date: Thu, 10 Mar 2016 17:55:36 +0300 Subject: [PATCH 32/48] Taking into account SALOME_BUILD_DOC option. --- src/Tools/blocFissure/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Tools/blocFissure/CMakeLists.txt b/src/Tools/blocFissure/CMakeLists.txt index 092977b32..0f0beaf32 100644 --- a/src/Tools/blocFissure/CMakeLists.txt +++ b/src/Tools/blocFissure/CMakeLists.txt @@ -20,7 +20,10 @@ ADD_SUBDIRECTORY(CasTests) ADD_SUBDIRECTORY(gmu) ADD_SUBDIRECTORY(materielCasTests) -ADD_SUBDIRECTORY(doc) + +IF(SALOME_BUILD_DOC) + ADD_SUBDIRECTORY(doc) +ENDIF(SALOME_BUILD_DOC) IF(SALOME_BUILD_GUI) ADD_SUBDIRECTORY(ihm) From a1a6d5ddc111fa237d1164fda37ff823a3fac764 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 11 Mar 2016 16:32:07 +0300 Subject: [PATCH 33/48] 53103: Mesh visualization performance problem Optimize visualization and mesh loading. + fix docs --- doc/salome/examples/3dmesh.py | 23 +++-- doc/salome/examples/grouping_elements_ex01.py | 58 ++++++++++++ doc/salome/examples/prism_3d_algo.py | 4 +- doc/salome/gui/SMESH/CMakeLists.txt | 4 +- .../gui/SMESH/input/smeshpy_interface.doc | 93 +++++++++++-------- .../gui/SMESH/input/tui_creating_meshes.doc | 30 +++--- .../gui/SMESH/input/tui_grouping_elements.doc | 27 ++---- .../gui/SMESH/input/tui_modifying_meshes.doc | 50 ++++------ .../gui/SMESH/input/tui_quality_controls.doc | 2 + .../SMESH/input/tui_transforming_meshes.doc | 43 +++------ .../input/tui_work_on_objects_from_gui.doc | 2 +- idl/SMESH_Group.idl | 2 +- src/DriverMED/DriverMED_Family.cxx | 4 +- src/DriverMED/DriverMED_Family.h | 8 +- src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx | 19 ++-- src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx | 10 +- src/OBJECT/SMESH_Object.cxx | 84 ++++++++--------- src/SMESHDS/SMESHDS_Mesh.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshInfo.cxx | 1 + src/SMESH_I/SMESH_PreMeshInfo.cxx | 2 +- src/SMESH_SWIG/StdMeshersBuilder.py | 2 +- src/SMESH_SWIG/smeshBuilder.py | 26 +++--- 22 files changed, 265 insertions(+), 231 deletions(-) diff --git a/doc/salome/examples/3dmesh.py b/doc/salome/examples/3dmesh.py index 67a707533..57a1440e0 100644 --- a/doc/salome/examples/3dmesh.py +++ b/doc/salome/examples/3dmesh.py @@ -2,17 +2,16 @@ import salome salome.salome_init() -import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) -import SMESH, SALOMEDS +import SMESH from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) ### # Geometry: an assembly of a box, a cylinder and a truncated cone -# meshed with tetrahedral +# to be meshed with tetrahedra ### # Define values @@ -44,14 +43,14 @@ piece = geompy.MakeFuse(box_cyl, cone) geompy.addToStudy(piece, name) # Create a group of faces -group = geompy.CreateGroup(piece, geompy.ShapeType["FACE"]) +faces_group = geompy.CreateGroup(piece, geompy.ShapeType["FACE"]) group_name = name + "_grp" -geompy.addToStudy(group, group_name) -group.SetName(group_name) +geompy.addToStudy(faces_group, group_name) +faces_group.SetName(group_name) # Add faces to the group faces = geompy.SubShapeAllIDs(piece, geompy.ShapeType["FACE"]) -geompy.UnionIDs(group, faces) +geompy.UnionIDs(faces_group, faces) ### # Create a mesh @@ -60,20 +59,20 @@ geompy.UnionIDs(group, faces) # Define a mesh on a geometry tetra = smesh.Mesh(piece, name) -# Define 1D hypothesis +# Define 1D algorithm and hypothesis algo1d = tetra.Segment() algo1d.LocalLength(10) -# Define 2D hypothesis +# Define 2D algorithm and hypothesis algo2d = tetra.Triangle() algo2d.LengthFromEdges() -# Define 3D hypothesis +# Define 3D algorithm and hypothesis algo3d = tetra.Tetrahedron() algo3d.MaxElementVolume(100) # Compute the mesh tetra.Compute() -# Create a groupe of faces -tetra.Group(group) +# Create a mesh group of all triangles generated on geom faces present in faces_group +group = tetra.Group(faces_group) diff --git a/doc/salome/examples/grouping_elements_ex01.py b/doc/salome/examples/grouping_elements_ex01.py index 013332766..9181e43df 100644 --- a/doc/salome/examples/grouping_elements_ex01.py +++ b/doc/salome/examples/grouping_elements_ex01.py @@ -19,4 +19,62 @@ aGroup1 = mesh.MakeGroupByIds("Area > 100", SMESH.FACE, anIds) aGroup2 = mesh.CreateEmptyGroup(SMESH.NODE, "all nodes") aGroup2.AddFrom(mesh.mesh) + +# ==================================== +# Various methods of the Group object +# ==================================== + +aGroup = mesh.CreateEmptyGroup(SMESH.NODE, "aGroup") + +# set/get group name +aGroup.SetName( "new name" ) +print "name", aGroup.GetName() + +# get group type (type of entities in the group, SMESH.NODE in our case) +print "type", aGroup.GetType() + +# get number of entities (nodes in our case) in the group +print "size", aGroup.Size() + +# check of emptiness +print "is empty", aGroup.IsEmpty() + +# check of presence of an entity in the group +aGroup.Add([1,2]) # method specific to the standalone group +print "contains node 2", aGroup.Contains(2) + +# get an entity by index +print "1st node", aGroup.GetID(1) + +# get all entities +print "all", aGroup.GetIDs() + +# get number of nodes (actual for groups of elements) +print "nb nodes", aGroup.GetNumberOfNodes() + +# get underlying nodes (actual for groups of elements) +print "nodes", aGroup.GetNodeIDs() + +# set/get color +import SALOMEDS +aGroup.SetColor( SALOMEDS.Color(1.,1.,0.)); +print "color", aGroup.GetColor() + +# ---------------------------------------------------------------------------- +# methods specific to the standalone group and not present in GroupOnGeometry +# and GroupOnFilter +# ---------------------------------------------------------------------------- + +# clear the group's contents +aGroup.Clear() + +# add contents of other object (group, sub-mesh, filter) +aGroup.AddFrom( aGroup2 ) + +# removes entities +aGroup.Remove( [2,3,4] ) + + + + salome.sg.updateObjBrowser(1) diff --git a/doc/salome/examples/prism_3d_algo.py b/doc/salome/examples/prism_3d_algo.py index 7be0a29d3..e51822561 100644 --- a/doc/salome/examples/prism_3d_algo.py +++ b/doc/salome/examples/prism_3d_algo.py @@ -1,4 +1,4 @@ -# Use 3D extrusion meshing algorithm +# Usage of 3D Extrusion meshing algorithm import salome salome.salome_init() @@ -58,7 +58,7 @@ mesh = smesh.Mesh( prisms ) # assign Global hypotheses -# 1D algorithm and hypothesis for vertical division +# 1D algorithm and hypothesis for division along the pipe mesh.Segment().NumberOfSegments(15) # Extrusion 3D algo diff --git a/doc/salome/gui/SMESH/CMakeLists.txt b/doc/salome/gui/SMESH/CMakeLists.txt index 47c517cff..a221bbfe8 100644 --- a/doc/salome/gui/SMESH/CMakeLists.txt +++ b/doc/salome/gui/SMESH/CMakeLists.txt @@ -30,8 +30,8 @@ SET(kernel_file "${KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py") SALOME_ACCUMULATE_ENVIRONMENT(SMESH_MeshersList NOCHECK ${DOC_SMESH_MeshersList}) -SET(_cmd_options ${smesh_file} -d -o tmp1/smeshBuilder.py StdMeshers) -SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${PYTHON_EXECUTABLE}" "${_cmd_options}") +SET(_cmd_options ${smesh_file} -o tmp1/smeshBuilder.py StdMeshers) +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${PYTHON_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp1 COMMAND ${CMAKE_COMMAND} -E make_directory tmp2 diff --git a/doc/salome/gui/SMESH/input/smeshpy_interface.doc b/doc/salome/gui/SMESH/input/smeshpy_interface.doc index df7e15967..92bd2f41d 100644 --- a/doc/salome/gui/SMESH/input/smeshpy_interface.doc +++ b/doc/salome/gui/SMESH/input/smeshpy_interface.doc @@ -7,49 +7,66 @@ be used for easy mesh creation and edition. Documentation for SALOME %Mesh module Python API is available in two forms: - Structured documentation, where all methods and -classes are grouped by their functionality, like it is done in the GUI documentation +classes are grouped by their functionality. - Linear documentation grouped only by classes, declared in the \ref smeshBuilder and \ref StdMeshersBuilder Python packages. -\n With SALOME 7.2, the Python interface for %Mesh has been slightly modified to offer new functionality, +\n With SALOME 7.2, the Python interface for %Mesh has been slightly modified to offer new functionality. \n You may have to modify your scripts generated with SALOME 6 or older versions. -\n Please see \ref smesh_migration_page - -The SMESH python package contains helper functions to manipulate mesh elements and -interact with these elements. - -Note that these functions either encapsulate the python programming interface of SMESH core -(the CORBA or SWIG interface for example) or extend existing utilities as the smesh.py module. - -The functions are distributed in the python package \b salome.smesh. - -\note -The main package \b salome contains other sub-packages that are distributed with the other -SALOME modules. For example, the KERNEL module provides the python package \b salome.kernel -and GEOM the package \b salome.geom. +\n Please see \ref smesh_migration_page. Class \ref smeshBuilder.smeshBuilder "smeshBuilder" provides an interface to create and handle meshes. It can be used to create an empty mesh or to import mesh from the data file. -Class \ref smeshstudytools.SMeshStudyTools "SMeshStudyTools" provides several methods to manipulate mesh objects in Salome study. - As soon as mesh is created, it is possible to manage it via its own methods, described in class \ref smeshBuilder.Mesh "Mesh" documentation. -Class \ref smeshBuilder.Mesh "Mesh" allows assigning algorithms to a mesh. -Please note that some algorithms, included in the standard SALOME -distribution are always available. Python package \ref StdMeshersBuilder "StdMeshersBuilder" -provides an interface for standard meshing algorithms included into -the SALOME %Mesh module distribution, like: -- REGULAR (1D) -- COMPOSITE (1D) -- MEFISTO (2D) -- Quadrangle (2D) -- Hexa(3D) -- etc ... +Class \ref smeshstudytools.SMeshStudyTools "SMeshStudyTools" provides several methods to manipulate mesh objects in Salome study. -To add meshing hypotheses, it is possible to use the functions provided by the -algorithms interfaces. +A usual workflow to generate a mesh on geometry is following: +
        +
      1. Create an instance of \ref smeshBuilder.smeshBuilder "smeshBuilder": +
        +      from salome.smesh import smeshBuilder
        +      smesh = smeshBuilder.New( salome.myStudy )
        +    
      2. +
      3. Create a \ref smeshBuilder.Mesh "mesh" object: +
        +      mesh = \ref smeshBuilder.smeshBuilder.Mesh "smesh.Mesh( geometry )" 
        +    
      4. +
      5. Create and assign \ref basic_meshing_algos_page "algorithms" by + calling corresponding methods of the mesh. If a sub-shape is + provided as an argument, a \ref constructing_submeshes_page "sub-mesh" + is implicitly created on this sub-shape: +
        +      regular1D = \ref smeshBuilder.Mesh.Segment "mesh.Segment"()
        +      mefisto   = \ref smeshBuilder.Mesh.Triangle "mesh.Triangle"( smeshBuilder.MEFISTO )
        +      # use other triangle algorithm on a face -- a sub-mesh appears in the mesh
        +      netgen    = \ref smeshBuilder.Mesh.Triangle "mesh.Triangle"( smeshBuilder.NETGEN_1D2D, face )
        +    
      6. +
      7. Create and assign \ref about_hypo_page "hypotheses" by calling + corresponding methods of algorithms: +
        +      segLen10 = \ref StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength "regular1D.LocalLength"( 10. )
        +      maxArea  = \ref StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength "mefisto.MaxElementArea"( 100. )
        +      netgen.SetMaxSize( 20. )
        +      netgen.SetFineness( smeshBuilder.VeryCoarse )
        +    
        +
      8. +
      9. \ref compute_anchor "Compute" the mesh (generate mesh nodes and elements): +
        +      \ref Mesh.Compute "mesh.Compute"()
        +    
        +
      10. +
      + +An easiest way to start with Python scripting is to do something in +GUI and then to get a corresponding Python script via + File > Dump Study menu item. Don't forget that you can get +all methods of any object in hand (e.g. a mesh group or a hypothesis) +by calling \a dir() Python built-in function. + +All methods of the Mesh Group can be found in \ref tui_create_standalone_group sample script. An example below demonstrates usage of the Python API for 3d mesh generation. @@ -61,19 +78,19 @@ Examples of Python scripts for Mesh operations are available by the following links: - \subpage tui_creating_meshes_page -- \subpage tui_cartesian_algo -- \subpage tui_use_existing_faces -- \subpage tui_viewing_meshes_page - \subpage tui_defining_hypotheses_page -- \subpage tui_quality_controls_page -- \subpage tui_filters_page - \subpage tui_grouping_elements_page +- \subpage tui_filters_page - \subpage tui_modifying_meshes_page - \subpage tui_transforming_meshes_page -- \subpage tui_notebook_smesh_page +- \subpage tui_viewing_meshes_page +- \subpage tui_quality_controls_page - \subpage tui_measurements_page -- \subpage tui_generate_flat_elements_page - \subpage tui_work_on_objects_from_gui +- \subpage tui_notebook_smesh_page +- \subpage tui_cartesian_algo +- \subpage tui_use_existing_faces - \subpage tui_prism_3d_algo +- \subpage tui_generate_flat_elements_page */ diff --git a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc index 984616457..79b98b49d 100644 --- a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc @@ -2,54 +2,50 @@ \page tui_creating_meshes_page Creating Meshes +\tableofcontents + \n First of all see \ref example_3d_mesh "Example of 3d mesh generation", which is an example of good python script style for Mesh module.
      -

      Construction of a Mesh

      +\section construction_of_a_mesh Construction of a mesh \tui_script{creating_meshes_ex01.py}
      -\anchor tui_construction_submesh -

      Construction of a Submesh

      +\section tui_construction_submesh Construction of a sub-mesh \tui_script{creating_meshes_ex02.py}
      -

      Change priority of submeshes in Mesh

      +\section change_priority_of_submeshes_in_mesh Change priority of sub-meshes in mesh \tui_script{creating_meshes_ex03.py}
      -\anchor tui_editing_while_meshing -

      Intermediate edition while meshing

      +\section tui_editing_while_meshing Intermediate edition while meshing \tui_script{a3DmeshOnModified2Dmesh.py}
      -\anchor tui_editing_mesh -

      Editing a mesh

      +\section tui_editing_mesh Editing a mesh \tui_script{creating_meshes_ex04.py}
      -\anchor tui_export_mesh -

      Export of a Mesh

      +\section tui_export_mesh Export of a Mesh \tui_script{creating_meshes_ex05.py}
      -

      How to mesh a cylinder with hexahedrons?

      +\section how_to_mesh_a_cylinder_with_hexahedrons How to mesh a cylinder with hexahedrons? Here you can see an example of python script, creating a hexahedral -mesh on a cylinder. And a picture below the source code of the script, -demonstrating the resulting mesh. +mesh on a cylinder. A picture below the source code of the script +demonstrates the resulting mesh. \tui_script{creating_meshes_ex06.py} \image html mesh_cylinder_hexa.png
      -\anchor tui_building_compound -

      Building a compound of meshes

      +\section tui_building_compound Building a compound of meshes \tui_script{creating_meshes_ex07.py}
      -\anchor tui_copy_mesh -

      Mesh Copying

      +\section tui_copy_mesh Mesh Copying \tui_script{creating_meshes_ex08.py} */ diff --git a/doc/salome/gui/SMESH/input/tui_grouping_elements.doc b/doc/salome/gui/SMESH/input/tui_grouping_elements.doc index a264f2542..535c47640 100644 --- a/doc/salome/gui/SMESH/input/tui_grouping_elements.doc +++ b/doc/salome/gui/SMESH/input/tui_grouping_elements.doc @@ -2,27 +2,24 @@ \page tui_grouping_elements_page Grouping Elements +\tableofcontents +
      -\anchor tui_create_standalone_group -

      Create a Standalone Group

      +\section tui_create_standalone_group Create a Standalone Group \tui_script{grouping_elements_ex01.py} \image html create_group.png
      -\anchor tui_create_group_on_geometry -

      Create a Group on Geometry

      +\section tui_create_group_on_geometry Create a Group on Geometry \tui_script{grouping_elements_ex02.py}
      -\anchor tui_create_group_on_filter - -

      Create a Group on Filter

      +\section tui_create_group_on_filter Create a Group on Filter \tui_script{grouping_elements_ex03.py}
      -\anchor tui_edit_group -

      Edit a Group

      +\section tui_edit_group Edit a Group \tui_script{grouping_elements_ex04.py} \image html editing_groups1.png @@ -30,8 +27,7 @@ \image html editing_groups2.png
      -\anchor tui_union_of_groups -

      Union of groups

      +\section tui_union_of_groups Union of groups \tui_script{grouping_elements_ex05.py} \image html union_groups1.png @@ -41,8 +37,7 @@ \image html union_groups3.png
      -\anchor tui_intersection_of_groups -

      Intersection of groups

      +\section tui_intersection_of_groups Intersection of groups \tui_script{grouping_elements_ex06.py} \image html intersect_groups1.png @@ -52,8 +47,7 @@ \image html intersect_groups3.png
      -\anchor tui_cut_of_groups -

      Cut of groups

      +\section tui_cut_of_groups Cut of groups \tui_script{grouping_elements_ex07.py} \image html cut_groups1.png @@ -63,8 +57,7 @@ \image html cut_groups3.png
      -\anchor tui_create_dim_group -

      Creating groups of entities from existing groups of superior dimensions

      +\section tui_create_dim_group Creating groups of entities from existing groups of superior dimensions \tui_script{grouping_elements_ex08.py} \image html dimgroup_tui1.png diff --git a/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc b/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc index 107306547..7d0352286 100644 --- a/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc @@ -2,9 +2,10 @@ \page tui_modifying_meshes_page Modifying Meshes +\tableofcontents +
      -\anchor tui_adding_nodes_and_elements -

      Adding Nodes and Elements

      +\section tui_adding_nodes_and_elements Adding Nodes and Elements
      \anchor tui_add_node @@ -57,8 +58,7 @@ \tui_script{modifying_meshes_ex10.py}
      -\anchor tui_removing_nodes_and_elements -

      Removing Nodes and Elements

      +\section tui_removing_nodes_and_elements Removing Nodes and Elements
      \anchor tui_removing_nodes @@ -76,73 +76,59 @@ \tui_script{modifying_meshes_ex13.py}
      -\anchor tui_renumbering_nodes_and_elements -

      Renumbering Nodes and Elements

      +\section tui_renumbering_nodes_and_elements Renumbering Nodes and Elements \tui_script{modifying_meshes_ex14.py}
      -\anchor tui_moving_nodes -

      Moving Nodes

      +\section tui_moving_nodes Moving Nodes \tui_script{modifying_meshes_ex15.py}
      -\anchor tui_diagonal_inversion -

      Diagonal Inversion

      +\section tui_diagonal_inversion Diagonal Inversion \tui_script{modifying_meshes_ex16.py}
      -\anchor tui_uniting_two_triangles -

      Uniting two Triangles

      +\section tui_uniting_two_triangles Uniting two Triangles \tui_script{modifying_meshes_ex17.py}
      -\anchor tui_uniting_set_of_triangles -

      Uniting a Set of Triangles

      +\section tui_uniting_set_of_triangles Uniting a Set of Triangles \tui_script{modifying_meshes_ex18.py}
      -\anchor tui_orientation -

      Orientation

      +\section tui_orientation Orientation \tui_script{modifying_meshes_ex19.py}
      -\anchor tui_cutting_quadrangles -

      Cutting Quadrangles

      +\section tui_cutting_quadrangles Cutting Quadrangles \tui_script{modifying_meshes_ex20.py}
      -\anchor tui_smoothing -

      Smoothing

      +\section tui_smoothing Smoothing \tui_script{modifying_meshes_ex21.py}
      -\anchor tui_extrusion -

      Extrusion

      +\section tui_extrusion Extrusion \tui_script{modifying_meshes_ex22.py}
      -\anchor tui_extrusion_along_path -

      Extrusion along a Path

      +\section tui_extrusion_along_path Extrusion along a Path \tui_script{modifying_meshes_ex23.py}
      -\anchor tui_revolution -

      Revolution

      +\section tui_revolution Revolution \tui_script{modifying_meshes_ex24.py}
      -\anchor tui_pattern_mapping -

      Pattern Mapping

      +\section tui_pattern_mapping Pattern Mapping \tui_script{modifying_meshes_ex25.py}
      -\anchor tui_quadratic -

      Convert mesh to/from quadratic

      +\section tui_quadratic Convert mesh to/from quadratic \tui_script{modifying_meshes_ex26.py}
      -\anchor tui_split_biquad -

      Split bi-quadratic into linear

      +\section tui_split_biquad Split bi-quadratic into linear \tui_script{split_biquad.py} */ diff --git a/doc/salome/gui/SMESH/input/tui_quality_controls.doc b/doc/salome/gui/SMESH/input/tui_quality_controls.doc index be849962c..1434c9b07 100644 --- a/doc/salome/gui/SMESH/input/tui_quality_controls.doc +++ b/doc/salome/gui/SMESH/input/tui_quality_controls.doc @@ -2,6 +2,8 @@ \page tui_quality_controls_page Quality Controls +\tableofcontents + \section tui_free_borders Free Borders \tui_script{quality_controls_ex01.py} diff --git a/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc b/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc index 86ce3dca0..9837176b6 100644 --- a/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc @@ -2,73 +2,58 @@ \page tui_transforming_meshes_page Transforming Meshes -

      Transforming Meshes

      +\tableofcontents
      -\anchor tui_translation -

      Translation

      +\section tui_translation Translation \tui_script{transforming_meshes_ex01.py}
      -\anchor tui_rotation -

      Rotation

      +\section tui_rotation Rotation \tui_script{transforming_meshes_ex02.py}
      -\anchor tui_scale -

      Scale

      +\section tui_scale Scale \tui_script{transforming_meshes_ex03.py}
      -\anchor tui_symmetry -

      Symmetry

      +\section tui_symmetry Symmetry \tui_script{transforming_meshes_ex04.py}
      -\anchor tui_merging_nodes -

      Merging Nodes

      +\section tui_merging_nodes Merging Nodes \tui_script{transforming_meshes_ex05.py}
      -\anchor tui_merging_elements -

      Merging Elements

      +\section tui_merging_elements Merging Elements \tui_script{transforming_meshes_ex06.py} -

      Sewing Meshes

      -
      -\anchor tui_sew_meshes_border_to_side -

      Sew Meshes Border to Side

      +\section tui_sew_meshes_border_to_side Sew Meshes Border to Side \tui_script{transforming_meshes_ex07.py}
      -\anchor tui_sew_conform_free_borders -

      Sew Conform Free Borders

      +\section tui_sew_conform_free_borders Sew Conform Free Borders \tui_script{transforming_meshes_ex08.py}
      -\anchor tui_sew_free_borders -

      Sew Free Borders

      +\section tui_sew_free_borders Sew Free Borders \tui_script{transforming_meshes_ex09.py}
      -\anchor tui_sew_side_elements -

      Sew Side Elements

      +\section tui_sew_side_elements Sew Side Elements \tui_script{transforming_meshes_ex10.py}
      -\anchor tui_duplicate_nodes -

      Duplicate nodes or/and elements

      +\section tui_duplicate_nodes Duplicate nodes or/and elements \tui_script{transforming_meshes_ex11.py}
      -\anchor tui_make_2dmesh_from_3d -

      Create boundary elements

      +\section tui_make_2dmesh_from_3d Create boundary elements \tui_script{transforming_meshes_ex12.py}
      -\anchor tui_reorient_faces -

      Reorient faces

      +\section tui_reorient_faces Reorient faces \tui_script{transforming_meshes_ex13.py} */ diff --git a/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.doc b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.doc index abc51d95b..569d821a9 100644 --- a/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.doc +++ b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.doc @@ -6,7 +6,7 @@ It is sometimes useful to work alternatively in the GUI of SALOME and in the Pyt \code myMesh_ref = salome.IDToObject("ID") -// were ID is the number that appears in the object browser in the Entry column +// were ID is the string looking like "0:1:2:3" that appears in the object browser in the Entry column // ( If hidden show it by right clicking and checking the checkbox Entry) myMesh = smesh.Mesh(myMesh_ref) \endcode diff --git a/idl/SMESH_Group.idl b/idl/SMESH_Group.idl index 4941f14df..bdc3d6312 100644 --- a/idl/SMESH_Group.idl +++ b/idl/SMESH_Group.idl @@ -74,7 +74,7 @@ module SMESH boolean Contains( in long elem_id ); /*! - * Returns ID of an element at position + * Returns ID of an element at position counted from 1 */ long GetID( in long elem_index ); diff --git a/src/DriverMED/DriverMED_Family.cxx b/src/DriverMED/DriverMED_Family.cxx index d682304fe..4b7ac91c4 100644 --- a/src/DriverMED/DriverMED_Family.cxx +++ b/src/DriverMED/DriverMED_Family.cxx @@ -69,7 +69,7 @@ void DriverMED_Family ::AddElement(const SMDS_MeshElement* theElement) { - myElements.insert(theElement); + myElements.insert( myElements.end(), theElement ); } void @@ -414,7 +414,7 @@ void DriverMED_Family::Init (SMESHDS_GroupBase* theGroup) SMDS_ElemIteratorPtr elemIt = theGroup->GetElements(); while (elemIt->more()) { - myElements.insert(elemIt->next()); + myElements.insert( myElements.end(), elemIt->next() ); } // Type diff --git a/src/DriverMED/DriverMED_Family.h b/src/DriverMED/DriverMED_Family.h index c83534cf9..28d05a568 100644 --- a/src/DriverMED/DriverMED_Family.h +++ b/src/DriverMED/DriverMED_Family.h @@ -49,10 +49,10 @@ #define REST_BALL_FAMILY -5 #define FIRST_ELEM_FAMILY -6 -typedef std::list DriverMED_FamilyPtrList; -typedef std::map SMESHDS_SubMeshPtrMap; -typedef std::list SMESHDS_GroupBasePtrList; -typedef std::set ElementsSet; +typedef std::list DriverMED_FamilyPtrList; +typedef std::map SMESHDS_SubMeshPtrMap; +typedef std::list SMESHDS_GroupBasePtrList; +typedef std::set ElementsSet; class MESHDRIVERMED_EXPORT DriverMED_Family { diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index 58f9c0ca0..c773d9925 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -976,8 +976,8 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() } if ( DriverMED::checkFamilyID ( aFamily, aFamNum, myFamilies )) { // Save reference to this element from its family - myFamilies[aFamNum]->AddElement(anElement); - myFamilies[aFamNum]->SetType(anElement->GetType()); + aFamily->AddElement(anElement); + aFamily->SetType(anElement->GetType()); } } } // loop on aNbElems @@ -1081,8 +1081,8 @@ void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup) DriverMED_FamilyPtr aFamily = (*aFamsIter).second; if (aFamily->GetTypes().count( theGroup->GetType() ) && aFamily->MemberOf(aGroupName)) { - const set& anElements = aFamily->GetElements(); - set::const_iterator anElemsIter = anElements.begin(); + const ElementsSet& anElements = aFamily->GetElements(); + ElementsSet::const_iterator anElemsIter = anElements.begin(); for (; anElemsIter != anElements.end(); anElemsIter++) { const SMDS_MeshElement * element = *anElemsIter; @@ -1110,8 +1110,8 @@ void DriverMED_R_SMESHDS_Mesh::GetSubMesh (SMESHDS_SubMesh* theSubMesh, DriverMED_FamilyPtr aFamily = (*aFamsIter).second; if (aFamily->MemberOf(aName)) { - const set& anElements = aFamily->GetElements(); - set::const_iterator anElemsIter = anElements.begin(); + const ElementsSet& anElements = aFamily->GetElements(); + ElementsSet::const_iterator anElemsIter = anElements.begin(); if (aFamily->GetType() == SMDSAbs_Node) { for (; anElemsIter != anElements.end(); anElemsIter++) @@ -1146,14 +1146,13 @@ void DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes () if (aName.substr(0, 7) == string("SubMesh")) { int Id = atoi(string(aName).substr(7).c_str()); - set anElements = aFamily->GetElements(); - set::iterator anElemsIter = anElements.begin(); + const ElementsSet& anElements = aFamily->GetElements(); + ElementsSet::const_iterator anElemsIter = anElements.begin(); if (aFamily->GetType() == SMDSAbs_Node) { for (; anElemsIter != anElements.end(); anElemsIter++) { - SMDS_MeshNode* node = const_cast - ( static_cast( *anElemsIter )); + const SMDS_MeshNode* node = static_cast( *anElemsIter ); // find out a shape type TopoDS_Shape aShape = myMesh->IndexToShape( Id ); int aShapeType = ( aShape.IsNull() ? -1 : aShape.ShapeType() ); diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx index cee3e1b09..638f4ad5c 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx @@ -254,7 +254,6 @@ namespace const SMDSAbs_ElementType anElemType) { anElemFamMap.Clear(); - //anElemFamMap.clear(); list::iterator aFamsIter = aFamilies.begin(); while ( aFamsIter != aFamilies.end() ) { @@ -263,12 +262,11 @@ namespace } else { int aFamId = (*aFamsIter)->GetId(); - const set& anElems = (*aFamsIter)->GetElements(); - set::const_iterator anElemsIter = anElems.begin(); + const ElementsSet& anElems = (*aFamsIter)->GetElements(); + ElementsSet::const_iterator anElemsIter = anElems.begin(); for (; anElemsIter != anElems.end(); anElemsIter++) { anElemFamMap.Bind( (Standard_Address)*anElemsIter, aFamId ); - //anElemFamMap[*anElemsIter] = aFamId; } // remove a family from the list aFamilies.erase( aFamsIter++ ); @@ -288,9 +286,7 @@ namespace { if ( anElemFamMap.IsBound( (Standard_Address) anElement )) return anElemFamMap( (Standard_Address) anElement ); -// TElemFamilyMap::iterator elem_famNum = anElemFamMap.find( anElement ); -// if ( elem_famNum != anElemFamMap.end() ) -// return elem_famNum->second; + return aDefaultFamilyId; } diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 44d70da65..cbb913fe1 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -232,8 +232,8 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints ) { thePoints->SetPoint( nbPoints, aNode->X(), aNode->Y(), aNode->Z() ); int anId = aNode->GetID(); - mySMDS2VTKNodes.insert( TMapOfIds::value_type( anId, nbPoints ) ); - myVTK2SMDSNodes.insert( TMapOfIds::value_type( nbPoints, anId ) ); + mySMDS2VTKNodes.insert( mySMDS2VTKNodes.end(), std::make_pair( anId, nbPoints )); + myVTK2SMDSNodes.insert( myVTK2SMDSNodes.end(), std::make_pair( nbPoints, anId )); nbPoints++; } } @@ -251,48 +251,48 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid) MESSAGE("----------------------------------------------------------SMESH_VisualObjDef::buildPrs " << buildGrid); if (buildGrid) { - myLocalGrid = true; - try - { - mySMDS2VTKNodes.clear(); - myVTK2SMDSNodes.clear(); - mySMDS2VTKElems.clear(); - myVTK2SMDSElems.clear(); + myLocalGrid = true; + try + { + mySMDS2VTKNodes.clear(); + myVTK2SMDSNodes.clear(); + mySMDS2VTKElems.clear(); + myVTK2SMDSElems.clear(); - if ( IsNodePrs() ) - buildNodePrs(); - else - buildElemPrs(); - } - catch(...) - { - mySMDS2VTKNodes.clear(); - myVTK2SMDSNodes.clear(); - mySMDS2VTKElems.clear(); - myVTK2SMDSElems.clear(); + if ( IsNodePrs() ) + buildNodePrs(); + else + buildElemPrs(); + } + catch(...) + { + mySMDS2VTKNodes.clear(); + myVTK2SMDSNodes.clear(); + mySMDS2VTKElems.clear(); + myVTK2SMDSElems.clear(); - myGrid->SetPoints( 0 ); - myGrid->SetCells( 0, 0, 0, 0, 0 ); - throw; - } + myGrid->SetPoints( 0 ); + myGrid->SetCells( 0, 0, 0, 0, 0 ); + throw; + } } else { - myLocalGrid = false; - if (!GetMesh()->isCompacted()) - { - MESSAGE("*** buildPrs ==> compactMesh!"); - GetMesh()->compactMesh(); - } - vtkUnstructuredGrid *theGrid = GetMesh()->getGrid(); - updateEntitiesFlags(); - myGrid->ShallowCopy(theGrid); - //MESSAGE(myGrid->GetReferenceCount()); - //MESSAGE( "Update - myGrid->GetNumberOfCells() = "<GetNumberOfCells() ); - //MESSAGE( "Update - myGrid->GetNumberOfPoints() = "<GetNumberOfPoints() ); - if( MYDEBUGWITHFILES ) { - SMESH::WriteUnstructuredGrid( myGrid,"myPrs.vtu" ); - } + myLocalGrid = false; + if (!GetMesh()->isCompacted()) + { + MESSAGE("*** buildPrs ==> compactMesh!"); + GetMesh()->compactMesh(); + } + vtkUnstructuredGrid *theGrid = GetMesh()->getGrid(); + updateEntitiesFlags(); + myGrid->ShallowCopy(theGrid); + //MESSAGE(myGrid->GetReferenceCount()); + //MESSAGE( "Update - myGrid->GetNumberOfCells() = "<GetNumberOfCells() ); + //MESSAGE( "Update - myGrid->GetNumberOfPoints() = "<GetNumberOfPoints() ); + if( MYDEBUGWITHFILES ) { + SMESH::WriteUnstructuredGrid( myGrid,"myPrs.vtu" ); + } } } @@ -454,8 +454,8 @@ void SMESH_VisualObjDef::buildElemPrs() int anId = anElem->GetID(); - mySMDS2VTKElems.insert( TMapOfIds::value_type( anId, iElem ) ); - myVTK2SMDSElems.insert( TMapOfIds::value_type( iElem, anId ) ); + mySMDS2VTKElems.insert( mySMDS2VTKElems.end(), std::make_pair( anId, iElem )); + myVTK2SMDSElems.insert( myVTK2SMDSElems.end(), std::make_pair( iElem, anId )); SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator(); { @@ -986,7 +986,7 @@ static int getNodesFromElems( SMESH::long_array_var& theElemIds, // function : getPointers // purpose : Get std::list from list of IDs //================================================================================= -static int getPointers( const SMDSAbs_ElementType theRequestType, +static int getPointers( const SMDSAbs_ElementType theRequestType, SMESH::long_array_var& theElemIds, const SMDS_Mesh* theMesh, std::list& theResList ) diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index 072fcdac7..ba7d59f37 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -2275,7 +2275,7 @@ void SMESHDS_Mesh::compactMesh() int newSmdsId = 0; for (int i = 0; i < myCellsSize; i++) { - if (myCells[i]) + if ( myCells[i] ) { newSmdsId++; // SMDS id start to 1 assert(newSmdsId <= newCellSize); diff --git a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx index f16d08d87..f71de0320 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx @@ -2320,6 +2320,7 @@ GrpComputor::GrpComputor( SMESH::SMESH_GroupBase_ptr grp, void GrpComputor::compute() { if ( !CORBA::is_nil( myGroup ) && myItem ) { + SUIT_OverrideCursor wc; QTreeWidgetItem* item = myItem; myItem = 0; int nb = myToComputeSize ? myGroup->Size() : myGroup->GetNumberOfNodes(); diff --git a/src/SMESH_I/SMESH_PreMeshInfo.cxx b/src/SMESH_I/SMESH_PreMeshInfo.cxx index 0621ed9f1..eb4181170 100644 --- a/src/SMESH_I/SMESH_PreMeshInfo.cxx +++ b/src/SMESH_I/SMESH_PreMeshInfo.cxx @@ -920,7 +920,7 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const #endif nbElems = elemSet.size(); } - // add elements to submeshes + // add elements to sub-meshes TIDSortedElemSet::iterator iE = elemSet.begin(); for ( size_t i = 0; i < nbElems; ++i, ++iE ) { diff --git a/src/SMESH_SWIG/StdMeshersBuilder.py b/src/SMESH_SWIG/StdMeshersBuilder.py index 6dd91e288..204e461b1 100644 --- a/src/SMESH_SWIG/StdMeshersBuilder.py +++ b/src/SMESH_SWIG/StdMeshersBuilder.py @@ -1100,7 +1100,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): pass # end of StdMeshersBuilder_Prism3D class -## Defines a Prism 3D algorithm +## Defines Radial Prism 3D algorithm # # It is created by calling smeshBuilder.Mesh.Prism(geom=0) # diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index cfd4117f1..6e39264b1 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -32,7 +32,6 @@ ## @{ ## @defgroup l3_algos_basic Basic meshing algorithms ## @defgroup l3_algos_proj Projection Algorithms -## @defgroup l3_algos_radialp Radial Prism ## @defgroup l3_algos_segmarv Segments around Vertex ## @defgroup l3_algos_3dextr 3D extrusion meshing algorithm @@ -70,10 +69,9 @@ ## @defgroup l2_modif_trsf Transforming meshes (Translation, Rotation, Symmetry, Sewing, Merging) ## @defgroup l2_modif_movenode Moving nodes ## @defgroup l2_modif_throughp Mesh through point -## @defgroup l2_modif_invdiag Diagonal inversion of elements ## @defgroup l2_modif_unitetri Uniting triangles -## @defgroup l2_modif_changori Changing orientation of elements ## @defgroup l2_modif_cutquadr Cutting elements +## @defgroup l2_modif_changori Changing orientation of elements ## @defgroup l2_modif_smooth Smoothing ## @defgroup l2_modif_extrurev Extrusion and Revolution ## @defgroup l2_modif_patterns Pattern mapping @@ -310,9 +308,9 @@ engine = None doLcc = False created = False -## This class allows to create, load or manipulate meshes -# It has a set of methods to create load or copy meshes, to combine several meshes. -# It also has methods to get infos on meshes. +## This class allows to create, load or manipulate meshes. +# It has a set of methods to create, load or copy meshes, to combine several meshes, etc. +# It also has methods to get infos and measure meshes. class smeshBuilder(object, SMESH._objref_SMESH_Gen): # MirrorType enumeration @@ -614,6 +612,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): # @param allGroups forces creation of groups corresponding to every input mesh # @param name name of a new mesh # @return an instance of Mesh class + # @ingroup l2_compounds def Concatenate( self, meshes, uniteIdenticalGroups, mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False, name = ""): @@ -1162,7 +1161,7 @@ omniORB.registerObjref(SMESH._objref_SMESH_Gen._NP_RepositoryId, smeshBuilder) # import salome # salome.salome_init() # from salome.smesh import smeshBuilder -# smesh = smeshBuilder.New(theStudy) +# smesh = smeshBuilder.New(salome.myStudy) # \endcode # @param study SALOME study, generally obtained by salome.myStudy. # @param instance CORBA proxy of SMESH Engine. If None, the default Engine is used. @@ -1177,7 +1176,7 @@ def New( study, instance=None): import salome salome.salome_init() from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New(salome.myStudy) Parameters: study SALOME study, generally obtained by salome.myStudy. @@ -2153,7 +2152,7 @@ class Mesh: ## # Create a standalone group of entities basing on nodes of other groups. - # \param groups - list of groups, sub-meshes or filters, of any type. + # \param groups - list of reference groups, sub-meshes or filters, of any type. # \param elemType - a type of elements to include to the new group; either of # (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). # \param name - a name of the new group. @@ -2165,7 +2164,10 @@ class Mesh: # - SMESH.AT_LEAST_ONE - include if one or more node is common, # - SMEHS.MAJORITY - include if half of nodes or more are common. # \param underlyingOnly - if \c True (default), an element is included to the - # new group provided that it is based on nodes of one element of \a groups. + # new group provided that it is based on nodes of an element of \a groups; + # in this case the reference \a groups are supposed to be of higher dimension + # than \a elemType, which can be useful for example to get all faces lying on + # volumes of the reference \a groups. # @return an instance of SMESH_Group # @ingroup l2_grps_operon def CreateDimGroup(self, groups, elemType, name, @@ -2176,7 +2178,7 @@ class Mesh: ## Convert group on geom into standalone group - # @ingroup l2_grps_delete + # @ingroup l2_grps_edit def ConvertToStandalone(self, group): return self.mesh.ConvertToStandalone(group) @@ -3073,7 +3075,7 @@ class Mesh: # @param NodeID1 the ID of the first node # @param NodeID2 the ID of the second node # @return false if proper faces were not found - # @ingroup l2_modif_invdiag + # @ingroup l2_modif_cutquadr def InverseDiag(self, NodeID1, NodeID2): return self.editor.InverseDiag(NodeID1, NodeID2) From 77ab84920942791849f9fdbd567da6701acfca7f Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 11 Mar 2016 18:17:39 +0300 Subject: [PATCH 34/48] IPAL53097: At med export "Automatically define space dimension" does not work --- src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx | 58 +++++++++++++--------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx index 638f4ad5c..1b3c26bac 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx @@ -37,6 +37,10 @@ #include "SMDS_SetIterator.hxx" #include "SMESHDS_Mesh.hxx" +#include +#include +#include + #include @@ -350,17 +354,34 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() aBounds[2] = min(aBounds[2],aNode->Y()); aBounds[3] = max(aBounds[3],aNode->Y()); - + aBounds[4] = min(aBounds[4],aNode->Z()); aBounds[5] = max(aBounds[5],aNode->Z()); } double EPS = 1.0E-7; + TopoDS_Shape mainShape = myMesh->ShapeToMesh(); + bool hasShapeToMesh = ( myMesh->SubMeshIndices().size() > 1 ); + if ( !mainShape.IsNull() && hasShapeToMesh ) + { + // define EPS by max tolerance of the mainShape (IPAL53097) + TopExp_Explorer subShape; + for ( subShape.Init( mainShape, TopAbs_FACE ); subShape.More(); subShape.Next() ) { + EPS = Max( EPS, BRep_Tool::Tolerance( TopoDS::Face( subShape.Current() ))); + } + for ( subShape.Init( mainShape, TopAbs_EDGE ); subShape.More(); subShape.Next() ) { + EPS = Max( EPS, BRep_Tool::Tolerance( TopoDS::Edge( subShape.Current() ))); + } + for ( subShape.Init( mainShape, TopAbs_VERTEX ); subShape.More(); subShape.Next() ) { + EPS = Max( EPS, BRep_Tool::Tolerance( TopoDS::Vertex( subShape.Current() ))); + } + EPS *= 2.; + } anIsXDimension = (aBounds[1] - aBounds[0]) + abs(aBounds[1]) + abs(aBounds[0]) > EPS; anIsYDimension = (aBounds[3] - aBounds[2]) + abs(aBounds[3]) + abs(aBounds[2]) > EPS; anIsZDimension = (aBounds[5] - aBounds[4]) + abs(aBounds[5]) + abs(aBounds[4]) > EPS; aSpaceDimension = anIsXDimension + anIsYDimension + anIsZDimension; - if(!aSpaceDimension) + if ( !aSpaceDimension ) aSpaceDimension = 3; // PAL16857(SMESH not conform to the MED convention): if ( aSpaceDimension == 2 && anIsZDimension ) // 2D only if mesh is in XOY plane @@ -377,7 +398,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() } SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator(/*idInceasingOrder=*/true); - switch(aSpaceDimension){ + switch ( aSpaceDimension ) { case 3: aCoordHelperPtr.reset(new TCoordHelper(aNodesIter,aXYZGetCoord,aXYZName)); break; @@ -444,7 +465,8 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() myDoGroupOfVolumes && nbVolumes, myDoGroupOf0DElems && nb0DElements, myDoGroupOfBalls && nbBalls); - } else { + } + else { aFamilies = DriverMED_Family::MakeFamilies (getIterator( mySubMeshes ), myGroups, myDoGroupOfNodes && nbNodes, @@ -477,7 +499,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() PNodeInfo aNodeInfo = myMed->CrNodeInfo(aMeshInfo, aNbNodes, theMode, theSystem, theIsElemNum, theIsElemNames); - //cout << " fillElemFamilyMap( SMDSAbs_Node )" << endl; // find family numbers for nodes TElemFamilyMap anElemFamMap; fillElemFamilyMap( anElemFamMap, aFamilies, SMDSAbs_Node ); @@ -687,21 +708,11 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() int defaultFamilyId = 0; switch ( aElemTypeData->_smdsType ) { - case SMDSAbs_0DElement: - defaultFamilyId = my0DElementsDefaultFamilyId; - break; - case SMDSAbs_Ball: - defaultFamilyId = myBallsDefaultFamilyId; - break; - case SMDSAbs_Edge: - defaultFamilyId = myEdgesDefaultFamilyId; - break; - case SMDSAbs_Face: - defaultFamilyId = myFacesDefaultFamilyId; - break; - case SMDSAbs_Volume: - defaultFamilyId = myVolumesDefaultFamilyId; - break; + case SMDSAbs_0DElement: defaultFamilyId = my0DElementsDefaultFamilyId; break; + case SMDSAbs_Ball: defaultFamilyId = myBallsDefaultFamilyId; break; + case SMDSAbs_Edge: defaultFamilyId = myEdgesDefaultFamilyId; break; + case SMDSAbs_Face: defaultFamilyId = myFacesDefaultFamilyId; break; + case SMDSAbs_Volume: defaultFamilyId = myVolumesDefaultFamilyId; break; default: continue; } @@ -783,7 +794,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() if ( nbPolyhedronNodes == 0 ) { // Count nb of nodes while ( elemIterator->more() ) { - const SMDS_MeshElement* anElem = elemIterator->next(); + const SMDS_MeshElement* anElem = elemIterator->next(); const SMDS_VtkVolume *aPolyedre = dynamic_cast(anElem); if ( !aPolyedre ) continue; nbPolyhedronNodes += aPolyedre->NbNodes(); @@ -812,7 +823,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() TInt iFace = 0, iNode = 0; while ( elemIterator->more() ) { - const SMDS_MeshElement* anElem = elemIterator->next(); + const SMDS_MeshElement* anElem = elemIterator->next(); const SMDS_VtkVolume *aPolyedre = dynamic_cast(anElem); if ( !aPolyedre ) continue; // index @@ -854,8 +865,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() else if (aElemTypeData->_geomType == eBALL ) { // allocate data arrays - PBallInfo aBallInfo = myMed->CrBallInfo( aMeshInfo, - aElemTypeData->_nbElems ); + PBallInfo aBallInfo = myMed->CrBallInfo( aMeshInfo, aElemTypeData->_nbElems ); // build map of family numbers for this type if ( !isElemFamMapBuilt[ aElemTypeData->_smdsType ]) From d45cd9ae88f00b0d4cc3e6746c32a8c16f2fcc71 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 15 Mar 2016 15:59:11 +0300 Subject: [PATCH 35/48] 53057: NETGEN-1D2D3D issues "Ignored" warning for faces of a sub-mesh This case also reveals the following bugs: 1) SMESH_MesherHelper::IsReversedSubMesh() incorrectly works on a coarsely meshed disk 2) Addition of NETGEN-1D2D3D removes already computed faces of a sub-mesh on a group of FACEs (SMESH_subMesh::cleanDependsOn()) 3) Volumes are shown, instead of faces, when displaying a sub-mesh on a SOLID with only a 2D algo assigned to the sub-mesh (SMESH_subMesh_i.cxx) --- src/SMESH/SMESH_MesherHelper.cxx | 4 ++++ src/SMESH/SMESH_subMesh.cxx | 17 +++++++-------- src/SMESH_I/SMESH_subMesh_i.cxx | 37 +++++++++++++++++++++----------- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 3703a7215..40016a488 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -2904,6 +2904,10 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace) bool ok = true; double u0 = GetNodeU( TopoDS::Edge( E ), nn[0], nn[1], &ok ); double u1 = GetNodeU( TopoDS::Edge( E ), nn[1], nn[0], &ok ); + // check that the 2 nodes are connected with a segment (IPAL53055) + // if ( SMESHDS_SubMesh* sm = GetMeshDS()->MeshElements( E )) + // if ( sm->NbElements() > 0 && !GetMeshDS()->FindEdge( nn[0], nn[1] )) + // ok = false; if ( ok ) { isReversed = ( u0 > u1 ); diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 38a445708..f395b7986 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1217,8 +1217,6 @@ void SMESH_subMesh::cleanDependsOn( SMESH_Algo* algoRequiringCleaning/*=0*/ ) } else if ( algoRequiringCleaning && algoRequiringCleaning->SupportSubmeshes() ) { - SMESHDS_Mesh* meshDS = _father->GetMeshDS(); - // find sub-meshes to keep elements on set< SMESH_subMesh* > smToKeep; TopAbs_ShapeEnum prevShapeType = TopAbs_SHAPE; @@ -1242,13 +1240,14 @@ void SMESH_subMesh::cleanDependsOn( SMESH_Algo* algoRequiringCleaning/*=0*/ ) } if ( !keepSubMeshes ) { - // look for an algo assigned to sm - bool algoFound = false; - const list& hyps = meshDS->GetHypothesis( sm->_subShape ); - list::const_iterator h = hyps.begin(); - for ( ; ( !algoFound && h != hyps.end() ); ++h ) - algoFound = ((*h)->GetType() != SMESHDS_Hypothesis::PARAM_ALGO ); - keepSubMeshes = algoFound; + // look for a local algo used to mesh sm + TopoDS_Shape algoShape = SMESH_MesherHelper::GetShapeOfHypothesis + ( algoRequiringCleaning, _subShape, _father ); + SMESH_HypoFilter moreLocalAlgo; + moreLocalAlgo.Init( SMESH_HypoFilter::IsMoreLocalThan( algoShape, *_father )); + moreLocalAlgo.And ( SMESH_HypoFilter::IsAlgo() ); + bool localAlgoFound = _father->GetHypothesis( sm->_subShape, moreLocalAlgo, true ); + keepSubMeshes = localAlgoFound; } // remember all sub-meshes of sm if ( keepSubMeshes ) diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index ee9117e2c..bc0fa18c8 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -107,9 +107,10 @@ bool getSubMeshes(::SMESH_subMesh* theSubMesh, TopAbs_ShapeEnum aShapeType = aShape.ShapeType(); // IPAL18558: Wrong information of the created sub-mesh is shown. (Sub-mesh on a FACE - // with only 1D algo assigned + // with only 1D algo assigned) // Find dimension of sub-meshes to return as highest dimension of the assigned algorithm - if ( theSubMesh->IsEmpty() && !theSubMesh->GetAlgo() ) + if (( theSubMesh->IsEmpty() || ( aSubMeshDS && aSubMeshDS->IsComplexSubmesh() )) && + ( !theSubMesh->GetAlgo() )) { // on father sub-meshes, check presence of an algo which will mesh this sub-mesh // even if no algo is assigned to this sub-mesh @@ -121,20 +122,22 @@ bool getSubMeshes(::SMESH_subMesh* theSubMesh, if ( !topAlgoPresent ) { - // look for a sub-mesh with an algo - SMESH_subMeshIteratorPtr smIt = - theSubMesh->getDependsOnIterator(/*includeSelf=*/false, /*complexShapeFirst=*/true); + // find max dimension of an assigned algo TopAbs_ShapeEnum algoShape = TopAbs_SHAPE; - while ( smIt->more() && algoShape == TopAbs_SHAPE ) - { - sm = smIt->next(); - if ( sm->GetAlgo() ) - algoShape = sm->GetSubShape().ShapeType(); - } + const std::list & hyps = aMesh->GetHypothesisList( aShape ); + std::list ::const_iterator hypIt = hyps.begin(); + for ( ; hypIt != hyps.end(); ++hypIt ) + if ( const SMESH_Algo* algo = dynamic_cast< const SMESH_Algo* >( *hypIt )) + switch ( algo->GetDim() ) { + case 1: algoShape = TopAbs_EDGE; break; + case 2: algoShape = TopAbs_FACE; break; + case 3: algoShape = TopAbs_SOLID; break; + case 0: algoShape = TopAbs_VERTEX; break; + } if ( algoShape != TopAbs_SHAPE ) { - // return all sub-meshes on this shape type - smIt = theSubMesh->getDependsOnIterator(/*includeSelf=*/false, /*complexShapeFirst=*/true); + // return all sub-meshes on this dimension + SMESH_subMeshIteratorPtr smIt = theSubMesh->getDependsOnIterator(/*includeSelf=*/false); while ( smIt->more() ) { sm = smIt->next(); @@ -209,6 +212,8 @@ CORBA::Long SMESH_subMesh_i::GetNumberOfElements() ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; SMESHDS_SubMesh* aSubMeshDS = aSubMesh->GetSubMeshDS(); + if ( aSubMeshDS && aSubMeshDS->IsComplexSubmesh() ) + aSubMeshDS = 0; int nbElems = aSubMeshDS ? aSubMeshDS->NbElements() : 0; @@ -244,6 +249,8 @@ CORBA::Long SMESH_subMesh_i::GetNumberOfNodes(CORBA::Boolean all) } ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; SMESHDS_SubMesh* aSubMeshDS = aSubMesh->GetSubMeshDS(); + if ( aSubMeshDS && aSubMeshDS->IsComplexSubmesh() ) + aSubMeshDS = 0; if ( aSubMeshDS && aSubMeshDS->IsComplexSubmesh() ) { @@ -292,6 +299,8 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsId() ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; SMESHDS_SubMesh* aSubMeshDS = aSubMesh->GetSubMeshDS(); + if ( aSubMeshDS && aSubMeshDS->IsComplexSubmesh() ) + aSubMeshDS = 0; int nbElems = aSubMeshDS ? aSubMeshDS->NbElements() : 0; TListOfSubMeshes smList; @@ -342,6 +351,8 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; SMESHDS_SubMesh* aSubMeshDS = aSubMesh->GetSubMeshDS(); + if ( aSubMeshDS && aSubMeshDS->IsComplexSubmesh() ) + aSubMeshDS = 0; // PAL5440, return all nodes belonging to elements of submesh set nodeIds; From 14497e96c0a3538b6b4cc706dc303b3234f2e822 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 15 Mar 2016 17:14:26 +0300 Subject: [PATCH 36/48] IPAL0053055: Import-1D2D algorithm fails --- src/SMESH/SMESH_MesherHelper.cxx | 6 +++--- src/StdMeshers/StdMeshers_Import_1D2D.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 40016a488..043c0b71b 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -2905,9 +2905,9 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace) double u0 = GetNodeU( TopoDS::Edge( E ), nn[0], nn[1], &ok ); double u1 = GetNodeU( TopoDS::Edge( E ), nn[1], nn[0], &ok ); // check that the 2 nodes are connected with a segment (IPAL53055) - // if ( SMESHDS_SubMesh* sm = GetMeshDS()->MeshElements( E )) - // if ( sm->NbElements() > 0 && !GetMeshDS()->FindEdge( nn[0], nn[1] )) - // ok = false; + if ( SMESHDS_SubMesh* sm = GetMeshDS()->MeshElements( E )) + if ( sm->NbElements() > 0 && !GetMeshDS()->FindEdge( nn[0], nn[1] )) + ok = false; if ( ok ) { isReversed = ( u0 > u1 ); diff --git a/src/StdMeshers/StdMeshers_Import_1D2D.cxx b/src/StdMeshers/StdMeshers_Import_1D2D.cxx index df7f8c065..8b0318391 100644 --- a/src/StdMeshers/StdMeshers_Import_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D2D.cxx @@ -219,7 +219,7 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & bndBox2d.Enlarge( 1e-2 * Sqrt( bndBox2d.SquareExtent() )); BRepBndLib::Add( geomFace, bndBox3d ); - bndBox3d.Enlarge( 1e-5 * sqrt( bndBox3d.SquareExtent() )); + bndBox3d.Enlarge( 1e-2 * sqrt( bndBox3d.SquareExtent() )); } set subShapeIDs; From 14534b55573063b254a2c3a6108bb2e0ca85b9fd Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 15 Mar 2016 18:52:11 +0300 Subject: [PATCH 37/48] IPAL53053: Mesh compute with 3D Extrusion algo crashes SALOME --- src/StdMeshers/StdMeshers_Prism_3D.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 225da4650..d2413b564 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -3298,6 +3298,9 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper, if ( !myHelper->LoadNodeColumns( faceColumns, (*quad)->face, quadBot, meshDS )) return error(COMPERR_BAD_INPUT_MESH, TCom("Can't find regular quadrangle mesh ") << "on a side face #" << MeshDS()->ShapeToIndex( (*quad)->face )); + + if ( !faceColumns.empty() && (int)faceColumns.begin()->second.size() != VerticalSize() ) + return error(COMPERR_BAD_INPUT_MESH, "Different 'vertical' discretization"); } // edge columns int id = MeshDS()->ShapeToIndex( *edgeIt ); From a695ce3aeecb27a023e248ccb9433d62916308cd Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 16 Mar 2016 19:59:08 +0300 Subject: [PATCH 38/48] IPAL53051: 3D Extrusion fails + minor doc modifs --- doc/salome/examples/creating_meshes_ex02.py | 26 +++++++++------- doc/salome/examples/creating_meshes_ex03.py | 29 ++++++++---------- .../gui/SMESH/images/prism_needs_hyps.png | Bin 19373 -> 33626 bytes doc/salome/gui/SMESH/input/prism_3d_algo.doc | 9 +++--- doc/salome/gui/SMESH/input/quad_ijk_algo.doc | 4 +-- src/StdMeshers/StdMeshers_Prism_3D.cxx | 2 +- src/StdMeshers/StdMeshers_ProjectionUtils.cxx | 4 +-- src/StdMeshers/StdMeshers_Projection_2D.cxx | 19 +++++++++--- 8 files changed, 52 insertions(+), 41 deletions(-) diff --git a/doc/salome/examples/creating_meshes_ex02.py b/doc/salome/examples/creating_meshes_ex02.py index fe9f72f08..3980d4d74 100644 --- a/doc/salome/examples/creating_meshes_ex02.py +++ b/doc/salome/examples/creating_meshes_ex02.py @@ -1,4 +1,4 @@ -# Construction of a Submesh +# Construction of a Sub-mesh import salome salome.salome_init() @@ -20,27 +20,31 @@ EdgeX = geompy.GetEdgeNearPoint(box, p5) geompy.addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]") # create a hexahedral mesh on the box -quadra = smesh.Mesh(box, "Box : quadrangle 2D mesh") +mesh = smesh.Mesh(box, "Box : hexahedral 3D mesh") -# create a regular 1D algorithm for the faces -algo1D = quadra.Segment() +# create a Regular_1D algorithm for discretization of edges +algo1D = mesh.Segment() # define "NumberOfSegments" hypothesis to cut # all the edges in a fixed number of segments algo1D.NumberOfSegments(4) # create a quadrangle 2D algorithm for the faces -quadra.Quadrangle() +mesh.Quadrangle() -# construct a submesh on the edge with a local hypothesis -algo_local = quadra.Segment(EdgeX) +# construct a sub-mesh on the edge with a local Regular_1D algorithm +algo_local = mesh.Segment(EdgeX) -# define "Arithmetic1D" hypothesis to cut the edge in several segments with increasing arithmetic length +# define "Arithmetic1D" hypothesis to cut EdgeX in several segments with length arithmetically +# increasing from 1.0 to 4.0 algo_local.Arithmetic1D(1, 4) -# define "Propagation" hypothesis that propagates all other hypotheses -# on all edges of the opposite side in case of quadrangular faces +# define "Propagation" hypothesis that propagates algo_local and "Arithmetic1D" hypothesis +# on all parallel edges of the box algo_local.Propagation() +# assign a hexahedral algorithm +mesh.Hexahedron() + # compute the mesh -quadra.Compute() +mesh.Compute() diff --git a/doc/salome/examples/creating_meshes_ex03.py b/doc/salome/examples/creating_meshes_ex03.py index 7cf85b786..8687b8971 100644 --- a/doc/salome/examples/creating_meshes_ex03.py +++ b/doc/salome/examples/creating_meshes_ex03.py @@ -1,4 +1,4 @@ -# Change priority of submeshes in Mesh +# Change priority of sub-meshes in Mesh import salome salome.salome_init() @@ -16,47 +16,44 @@ Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) # create Mesh object on Box shape Mesh_1 = smesh.Mesh(Box_1) -# assign mesh algorithms +# assign mesh algorithms and hypotheses Regular_1D = Mesh_1.Segment() Nb_Segments_1 = Regular_1D.NumberOfSegments(20) -Nb_Segments_1.SetDistrType( 0 ) MEFISTO_2D = Mesh_1.Triangle() Max_Element_Area_1 = MEFISTO_2D.MaxElementArea(1200) Tetrahedron = Mesh_1.Tetrahedron() Max_Element_Volume_1 = Tetrahedron.MaxElementVolume(40000) -# create submesh and assign algorithms on Face_1 +# create sub-mesh and assign algorithms on Face_1 Regular_1D_1 = Mesh_1.Segment(geom=Face_1) Nb_Segments_2 = Regular_1D_1.NumberOfSegments(4) -Nb_Segments_2.SetDistrType( 0 ) MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1) -Length_From_Edges_2D = MEFISTO_2D_1.LengthFromEdges() SubMesh_1 = MEFISTO_2D_1.GetSubMesh() -# create submesh and assign algorithms on Face_2 +# create sub-mesh and assign algorithms on Face_2 Regular_1D_2 = Mesh_1.Segment(geom=Face_2) Nb_Segments_3 = Regular_1D_2.NumberOfSegments(8) -Nb_Segments_3.SetDistrType( 0 ) MEFISTO_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_2) -Length_From_Edges_2D_1 = MEFISTO_2D_2.LengthFromEdges() SubMesh_2 = MEFISTO_2D_2.GetSubMesh() -# create submesh and assign algorithms on Face_3 +# create sub-mesh and assign algorithms on Face_3 Regular_1D_3 = Mesh_1.Segment(geom=Face_3) Nb_Segments_4 = Regular_1D_3.NumberOfSegments(12) -Nb_Segments_4.SetDistrType( 0 ) MEFISTO_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_3) -Length_From_Edges_2D_2 = MEFISTO_2D_3.LengthFromEdges() SubMesh_3 = MEFISTO_2D_3.GetSubMesh() -# check exisiting submesh priority order +# check exisiting sub-mesh priority order [ [ SubMesh_1, SubMesh_3, SubMesh_2 ] ] = Mesh_1.GetMeshOrder() -# set new submesh order +isDone = Mesh_1.Compute() +print "Nb elements at initial order of sub-meshes:", Mesh_1.NbElements() + +# set new sub-mesh order isDone = Mesh_1.SetMeshOrder( [ [ SubMesh_1, SubMesh_2, SubMesh_3 ] ]) # compute mesh isDone = Mesh_1.Compute() +print "Nb elements at new order of sub-meshes:", Mesh_1.NbElements() -# clear mesh result and compute with other submesh order -Mesh_1.Clear() +# compute with other sub-mesh order isDone = Mesh_1.SetMeshOrder( [ [ SubMesh_2, SubMesh_1, SubMesh_3 ] ]) isDone = Mesh_1.Compute() +print "Nb elements at another order of sub-meshes:", Mesh_1.NbElements() diff --git a/doc/salome/gui/SMESH/images/prism_needs_hyps.png b/doc/salome/gui/SMESH/images/prism_needs_hyps.png index 8c567809df180b98afe8c1ebf95f78bfffd5b275..d56d4309994ece8cc91152d868f6b85e47898f55 100644 GIT binary patch literal 33626 zcmZsD1yq&Wx9n z|NHJ8Z@h88arB5B_TJyO)|~TK>wHpCdWwrhfrUUIaAluKsUZ+3E$~Yp6BYjEQ4i`2 z{OgwEGhHVH0ReYg*Wp5;NwG=2U%D&rLY8;HOM~LyV8YQQhITQMYcwlq?g{Z4r>~NxEGsV` z8XRnnwNbb$S)5{2{f5=lT;k1}it=(76_wtZ`~GN_bSr%|t>2e=9(Y!Ktaf+a^2Ouf z>uP3V@)P6XT1u^6JxX$6?pe=%q zgoK2enp#x);%jd1Ed(wuZX*9nkyqzZ&z~>QUP;3um6VsD`E-XRqaY?bZ{&q1B#bAG zIaOR#;UkDH0)T7Hy@9C3?=H>_7+O&2MnsreTQ6^IUHOmPrp@cxd+g>( z#8K*l+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Ua0AFeSaYle3~~-#OrXvfY1Q zLp%A5Eo{BrM<+~XE-U-+fbm>%w0O<>9o%)#re_co+(E?Lgp&;IhIfWU 1D algorithm and hypothesis that will be applied for meshing (logically) vertical edges of the prism (which connect the top and the base faces of the prism). In the sample picture above these are - "Regular_1D" algorithm and "Nb. Segments_1" hypothesis. + "Regular_1D" algorithm and "Nb. Segments" hypothesis named "Vertical + Nb. Segments".
    The \b Local algorithms and hypotheses to be chosen at @@ -51,9 +52,9 @@ The \b Local algorithms and hypotheses to be chosen at meshing the top and the base prism faces. These faces can be meshed with any type of 2D elements: quadrangles, triangles, polygons or their mix. It is enough to define a sub-mesh on either the top or the base - face. In the sample picture above, "BLSURF" algorithm meshes - "Face_1" base surface with triangles. (1D algorithm is not - assigned as "BLSURF" does not require divided edges to create a 2D mesh.) + face. In the sample picture above, "NETGEN_1D2D" algorithm meshes + "bottom disk" face with triangles. (1D algorithm is not + assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.)
  • Optionally you can define a 1D sub-mesh on some vertical edges of stacked prisms, which will override the global 1D hypothesis mentioned diff --git a/doc/salome/gui/SMESH/input/quad_ijk_algo.doc b/doc/salome/gui/SMESH/input/quad_ijk_algo.doc index 1ba49dd83..90e7eea94 100644 --- a/doc/salome/gui/SMESH/input/quad_ijk_algo.doc +++ b/doc/salome/gui/SMESH/input/quad_ijk_algo.doc @@ -20,8 +20,8 @@ The algorithm treats any face as quadrangle. If a face is bound by more than four edges, four most sharp vertices are considered as corners of the quadrangle and all edges between these vertices are treated as quadrangle sides. In the case of three edges, the vertex -specified by the user is considered as a degenerated side of the -quadrangle. +specified by the user is considered as a fourth degenerated side of the +quadrangle. \image html quad_meshes.png "Algorithm generates a structured mesh on complex faces provided that edges are properly discretized" diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index d2413b564..5c0a5af0f 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -1330,7 +1330,7 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism) // update state of sub-meshes (mostly in order to erase improper errors) SMESH_subMesh* sm = myHelper->GetMesh()->GetSubMesh( thePrism.myShape3D ); - SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/false); + SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/true); while ( smIt->more() ) { sm = smIt->next(); diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index 51a639869..06aa33a57 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -1868,7 +1868,7 @@ StdMeshers_ProjectionUtils::GetPropagationEdge( SMESH_Mesh* aMes int prevChainSize = aChain.Extent(); if ( aChain.Add(anOppE) > prevChainSize ) { // ... anOppE is not in aChain // Add found edge to the chain oriented so that to - // have it co-directed with a forward MainEdge + // have it co-directed with a fromEdge TopAbs_Orientation ori = anE.Orientation(); if ( anOppE.Orientation() == fourEdges[found].Orientation() ) ori = TopAbs::Reverse( ori ); @@ -1931,7 +1931,7 @@ FindMatchingNodesOnFaces( const TopoDS_Face& face1, helper1.SetSubShape( face1 ); helper2.SetSubShape( face2 ); - if ( helper1.HasSeam() != helper2.HasSeam() ) + if ( helper1.HasRealSeam() != helper2.HasRealSeam() ) RETURN_BAD_RESULT("Different faces' geometry"); // Data to call SMESH_MeshEditor::FindMatchingNodes(): diff --git a/src/StdMeshers/StdMeshers_Projection_2D.cxx b/src/StdMeshers/StdMeshers_Projection_2D.cxx index 66c893628..648510c94 100644 --- a/src/StdMeshers/StdMeshers_Projection_2D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_2D.cxx @@ -821,8 +821,8 @@ namespace { // find trsf const int totNbSeg = 50; vector< gp_XY > srcPnts, tgtPnts; - srcPnts.resize( totNbSeg ); - tgtPnts.resize( totNbSeg ); + srcPnts.reserve( totNbSeg ); + tgtPnts.reserve( totNbSeg ); for ( size_t iW = 0; iW < srcWires.size(); ++iW ) { const double minSegLen = srcWires[iW]->Length() / totNbSeg; @@ -1392,10 +1392,19 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& } } } - else if ( nbEdgesInWires.front() == 1 ) + else if ( nbEdgesInWires.front() == 1 ) // a sole edge in a wire { - // TODO::Compare orientation of curves in a sole edge - //RETURN_BAD_RESULT("Not implemented case"); + TopoDS_Edge srcE1 = srcEdges.front(), tgtE1 = tgtEdges.front(); + for ( size_t iW = 0; iW < srcWires.size(); ++iW ) + { + StdMeshers_FaceSidePtr srcWire = srcWires[iW]; + for ( int iE = 0; iE < srcWire->NbEdges(); ++iE ) + if ( srcE1.IsSame( srcWire->Edge( iE ))) + { + reverse = ( tgtE1.Orientation() != tgtWires[iW]->Edge( iE ).Orientation() ); + break; + } + } } else { From a6bce4dabaa3e22cf4417358e150755e4dbb4d2a Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 17 Mar 2016 15:30:10 +0300 Subject: [PATCH 39/48] Fix regression of SALOME_TESTS/Grids/smesh/3D_submesh_00/A6 Fix SMESH_subMesh::cleanDependsOn() + minor improvements in SMESH_submesh and sample scripts --- doc/salome/examples/creating_meshes_ex04.py | 3 +-- doc/salome/examples/creating_meshes_ex06.py | 5 ++++- src/SMESH/SMESH_Mesh.cxx | 8 ++++---- src/SMESH/SMESH_subMesh.cxx | 16 +++++++++------- src/SMESH/SMESH_subMesh.hxx | 8 ++++---- src/SMESHDS/SMESHDS_Mesh.cxx | 2 +- .../StdMeshers_QuadFromMedialAxis_1D2D.cxx | 2 +- 7 files changed, 24 insertions(+), 20 deletions(-) diff --git a/doc/salome/examples/creating_meshes_ex04.py b/doc/salome/examples/creating_meshes_ex04.py index f2cdfdb87..82408d5a3 100644 --- a/doc/salome/examples/creating_meshes_ex04.py +++ b/doc/salome/examples/creating_meshes_ex04.py @@ -46,8 +46,7 @@ tria.Compute() PrintMeshInfo(tria) # remove a local hypothesis -mesh = tria.GetMesh() -mesh.RemoveHypothesis(edge, hyp4) +tria.RemoveHypothesis(hyp4, edge) # compute the mesh tria.Compute() diff --git a/doc/salome/examples/creating_meshes_ex06.py b/doc/salome/examples/creating_meshes_ex06.py index d16e067d3..8e52da6be 100644 --- a/doc/salome/examples/creating_meshes_ex06.py +++ b/doc/salome/examples/creating_meshes_ex06.py @@ -1,5 +1,8 @@ # Creating a hexahedral mesh on a cylinder. -# Note: it is a copy of 'ex24_cylinder.py' from SMESH_SWIG +# +# This example uses Partition to divide the cylinder into blocks, which is +# a general approach. But for the case of cylinder there is a dedicated +# command creating a blocked cylinder: geompy.MakeDividedCylinder() import salome salome.salome_init() diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index ecc7888e7..467fdd6a3 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -679,8 +679,8 @@ SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape, // shape - bool isAlgo = ( anHyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO ); - int event = isAlgo ? SMESH_subMesh::ADD_ALGO : SMESH_subMesh::ADD_HYP; + bool isAlgo = ( anHyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO ); + SMESH_subMesh::algo_event event = isAlgo ? SMESH_subMesh::ADD_ALGO : SMESH_subMesh::ADD_HYP; SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp); @@ -755,8 +755,8 @@ SMESH_Hypothesis::Hypothesis_Status // shape - bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ); - int event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP; + bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ); + SMESH_subMesh::algo_event event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP; SMESH_subMesh *subMesh = GetSubMesh(aSubShape); diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index f395b7986..ed0826782 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -609,7 +609,7 @@ bool SMESH_subMesh::IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis, //================================================================================ SMESH_Hypothesis::Hypothesis_Status - SMESH_subMesh::AlgoStateEngine(int event, SMESH_Hypothesis * anHyp) + SMESH_subMesh::AlgoStateEngine(algo_event event, SMESH_Hypothesis * anHyp) { // **** les retour des evenement shape sont significatifs // (add ou remove fait ou non) @@ -1167,7 +1167,7 @@ void SMESH_subMesh::setAlgoState(algo_state state) //================================================================================ SMESH_Hypothesis::Hypothesis_Status - SMESH_subMesh::SubMeshesAlgoStateEngine(int event, + SMESH_subMesh::SubMeshesAlgoStateEngine(algo_event event, SMESH_Hypothesis * anHyp, bool exitOnFatal) { @@ -1232,9 +1232,11 @@ void SMESH_subMesh::cleanDependsOn( SMESH_Algo* algoRequiringCleaning/*=0*/ ) if ( !sameShapeType ) { // check if the algo allows presence of global algos of dimension the algo - // can generate it-self + // can generate it-self; + // always keep a node on VERTEX, as this node can be shared by segments + // lying on EDGEs not shared by the VERTEX of sm, due to MergeNodes (PAL23068) int shapeDim = SMESH_Gen::GetShapeDim( sm->GetSubShape() ); - keepSubMeshes = algoRequiringCleaning->NeedLowerHyps( shapeDim ); + keepSubMeshes = ( algoRequiringCleaning->NeedLowerHyps( shapeDim ) || shapeDim == 0 ); prevShapeType = sm->GetSubShape().ShapeType(); toKeepPrevShapeType = keepSubMeshes; } @@ -1345,7 +1347,7 @@ static void cleanSubMesh( SMESH_subMesh * subMesh ) */ //============================================================================= -bool SMESH_subMesh::ComputeStateEngine(int event) +bool SMESH_subMesh::ComputeStateEngine(compute_event event) { switch ( event ) { case MODIF_ALGO_STATE: @@ -1982,7 +1984,7 @@ void SMESH_subMesh::updateSubMeshState(const compute_state theState) //purpose : //======================================================================= -void SMESH_subMesh::ComputeSubMeshStateEngine(int event, const bool includeSelf) +void SMESH_subMesh::ComputeSubMeshStateEngine(compute_event event, const bool includeSelf) { SMESH_subMeshIteratorPtr smIt = getDependsOnIterator(includeSelf,false); while ( smIt->more() ) @@ -2453,7 +2455,7 @@ void SMESH_subMeshEventListener::ProcessEvent(const int event, switch ( event ) { case SMESH_subMesh::CLEAN: for ( ; smIt != smEnd; ++ smIt) - (*smIt)->ComputeStateEngine( event ); + (*smIt)->ComputeStateEngine( SMESH_subMesh::compute_event( event )); break; case SMESH_subMesh::COMPUTE: case SMESH_subMesh::COMPUTE_SUBMESH: diff --git a/src/SMESH/SMESH_subMesh.hxx b/src/SMESH/SMESH_subMesh.hxx index 8f9f83c2c..f00841373 100644 --- a/src/SMESH/SMESH_subMesh.hxx +++ b/src/SMESH/SMESH_subMesh.hxx @@ -216,10 +216,10 @@ protected: public: SMESH_Hypothesis::Hypothesis_Status - AlgoStateEngine(int event, SMESH_Hypothesis * anHyp); + AlgoStateEngine(algo_event event, SMESH_Hypothesis * anHyp); SMESH_Hypothesis::Hypothesis_Status - SubMeshesAlgoStateEngine(int event, SMESH_Hypothesis * anHyp, bool exitOnFatal=false); + SubMeshesAlgoStateEngine(algo_event event, SMESH_Hypothesis * anHyp, bool exitOnFatal=false); algo_state GetAlgoState() const { return _algoState; } compute_state GetComputeState() const { return _computeState; } @@ -227,8 +227,8 @@ public: void DumpAlgoState(bool isMain); - bool ComputeStateEngine(int event); - void ComputeSubMeshStateEngine(int event, const bool includeSelf=false); + bool ComputeStateEngine(compute_event event); + void ComputeSubMeshStateEngine(compute_event event, const bool includeSelf=false); bool Evaluate(MapShapeNbElems& aResMap); diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index ba7d59f37..0283b6b74 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -980,7 +980,7 @@ void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt, { //MESSAGE(" --------------------------------> SMESHDS_Mesh::RemoveFreeElement " << subMesh << " " << fromGroups); if (elt->GetType() == SMDSAbs_Node) { - RemoveFreeNode( static_cast(elt), subMesh); + RemoveFreeNode( static_cast(elt), subMesh, fromGroups); return; } diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx index acd202846..58d179c55 100644 --- a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx @@ -554,7 +554,7 @@ namespace return false; for ( size_t iS = 0; iS < theShortEdges[ nbBranchPoints > 0 ].size(); ++iS ) - shortMap.Add( theShortEdges[ nbBranchPoints ][ iS ]); + shortMap.Add( theShortEdges[ nbBranchPoints > 0 ][ iS ]); ++nbBranchPoints; } From 1a82677a356073e12ab45362dcc473b4ddcdc278 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 17 Mar 2016 19:21:24 +0300 Subject: [PATCH 40/48] 52977: Find Element by Point does not find supporting node of Ball element at group of balls selection + minor changes in sample scripts --- doc/salome/examples/creating_meshes_ex06.py | 27 ++++++++++----------- doc/salome/examples/creating_meshes_ex08.py | 4 +-- src/SMESH_I/SMESH_MeshEditor_i.cxx | 17 +++++++------ 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/doc/salome/examples/creating_meshes_ex06.py b/doc/salome/examples/creating_meshes_ex06.py index 8e52da6be..90fe2765e 100644 --- a/doc/salome/examples/creating_meshes_ex06.py +++ b/doc/salome/examples/creating_meshes_ex06.py @@ -25,7 +25,7 @@ height = 200 # Build a cylinder # ---------------- -base = geompy.MakeVertex(0, 0, 0) +base = geompy.MakeVertex(0, 0, 0) direction = geompy.MakeVectorDXDYDZ(0, 0, 1) cylinder = geompy.MakeCylinder(base, direction, radius, height) @@ -37,9 +37,9 @@ geompy.addToStudy(cylinder, "cylinder") size = radius/2.0 -box_rot = geompy.MakeBox(-size, -size, 0, +size, +size, height) +box_rot = geompy.MakeBox(-size, -size, 0, +size, +size, height) box_axis = geompy.MakeLine(base, direction) -box = geompy.MakeRotation(box_rot, box_axis, math.pi/4) +box = geompy.MakeRotation(box_rot, box_axis, math.pi/4) hole = geompy.MakeCut(cylinder, box) @@ -50,8 +50,8 @@ plane_b = geompy.MakePlane(base, geompy.MakeVectorDXDYDZ(0, 1, 0), plane_trim) blocks_part = geompy.MakePartition([hole], [plane_a, plane_b], [], [], geompy.ShapeType["SOLID"]) blocks_list = [box] + geompy.SubShapeAll(blocks_part, geompy.ShapeType["SOLID"]) -blocks_all = geompy.MakeCompound(blocks_list) -blocks = geompy.MakeGlueFaces(blocks_all, 0.0001) +blocks_all = geompy.MakeCompound(blocks_list) +blocks = geompy.MakeGlueFaces(blocks_all, 0.0001) geompy.addToStudy(blocks, "cylinder:blocks") @@ -62,8 +62,7 @@ def group(name, shape, type, base=None, direction=None): t = geompy.ShapeType[type] g = geompy.CreateGroup(shape, t) - geompy.addToStudy(g, name) - g.SetName(name) + geompy.addToStudyInFather(shape, g, name) if base!=None: l = geompy.GetShapesOnPlaneWithLocationIDs(shape, t, direction, base, GEOM.ST_ON) @@ -76,7 +75,7 @@ group_a = group("baseA", blocks, "FACE", base, direction) base_b = geompy.MakeVertex(0, 0, height) group_b = group("baseB", blocks, "FACE", base_b, direction) -group_1 = group("limit", blocks, "SOLID") +group_1 = group("limit", blocks, "SOLID") group_1_all = geompy.SubShapeAllIDs(blocks, geompy.ShapeType["SOLID"]) geompy.UnionIDs(group_1, group_1_all) group_1_box = geompy.GetBlockNearPoint(blocks, base) @@ -87,12 +86,12 @@ geompy.DifferenceList(group_1, [group_1_box]) smesh.SetCurrentStudy(salome.myStudy) -def discretize(x, y, z, n, s=blocks): - p = geompy.MakeVertex(x, y, z) - e = geompy.GetEdgeNearPoint(s, p) - a = hexa.Segment(e) - a.NumberOfSegments(n) - a.Propagation() +def discretize(x, y, z, nbSeg, shape=blocks): + vert = geompy.MakeVertex( x, y, z ) + edge = geompy.GetEdgeNearPoint( shape, vert ) + algo = hexa.Segment( edge ) + algo.NumberOfSegments( nbSeg ) + algo.Propagation() hexa = smesh.Mesh(blocks) diff --git a/doc/salome/examples/creating_meshes_ex08.py b/doc/salome/examples/creating_meshes_ex08.py index e8f43eee6..0cb4b229f 100644 --- a/doc/salome/examples/creating_meshes_ex08.py +++ b/doc/salome/examples/creating_meshes_ex08.py @@ -14,7 +14,7 @@ smesh = smeshBuilder.New(salome.myStudy) box = geompy.MakeBoxDXDYDZ(100,100,100) face = geompy.SubShapeAllSorted(box, geompy.ShapeType["FACE"])[0] -# generate 3D mesh +# generate a prismatic 3D mesh mesh = smesh.Mesh(box) localAlgo = mesh.Triangle(face) mesh.AutomaticHexahedralization() @@ -44,4 +44,4 @@ nodeIds = nGroup.GetIDs()[-10:] newMesh = smesh.CopyMesh( mesh.GetIDSource( nodeIds, SMESH.NODE), "some nodes copy") # 6. copy a sub-mesh -newMesh = smesh.CopyMesh( subMesh, "submesh copy" ) +newMesh = smesh.CopyMesh( subMesh, "sub-mesh copy" ) diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 76a5d6d16..52cb45765 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -4480,13 +4480,15 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID { SMESH_TRY; SMESH::long_array_var res = new SMESH::long_array; - - SMESH::array_of_ElementType_var types = elementIDs->GetTypes(); - if ( types->length() == 1 && // a part contains only nodes or 0D elements - ( types[0] == SMESH::NODE || types[0] == SMESH::ELEM0D || types[0] == SMESH::BALL) && - type != types[0] ) // but search of elements of dim > 0 - return res._retn(); + if ( type != SMESH::NODE ) + { + SMESH::array_of_ElementType_var types = elementIDs->GetTypes(); + if ( types->length() == 1 && // a part contains only nodes or 0D elements + ( types[0] == SMESH::NODE || types[0] == SMESH::ELEM0D || types[0] == SMESH::BALL) && + type != types[0] ) // but search of elements of dim > 0 + return res._retn(); + } if ( SMESH::DownCast( elementIDs )) // elementIDs is the whole mesh return FindElementsByPoint( x,y,z, type ); @@ -4500,7 +4502,8 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID SMESHDS_Mesh* meshDS = SMESH::DownCast( mesh )->GetImpl().GetMeshDS(); if ( !idSourceToSet( elementIDs, meshDS, elements, - SMDSAbs_ElementType(type), /*emptyIfIsMesh=*/true)) + ( type == SMESH::NODE ? SMDSAbs_All : (SMDSAbs_ElementType) type ), + /*emptyIfIsMesh=*/true)) return res._retn(); typedef SMDS_SetIterator TIter; From 4ed74ad3da0e1ddd1d6ac5891a8202e0831abcb5 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 17 Mar 2016 21:47:21 +0300 Subject: [PATCH 41/48] 52976: Find Elements by Point - All does not find Ball element + minor changes in sample scripts --- doc/salome/examples/defining_hypotheses_ex05.py | 2 +- doc/salome/examples/defining_hypotheses_ex07.py | 5 +++-- src/SMESHUtils/SMESH_MeshAlgos.cxx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/salome/examples/defining_hypotheses_ex05.py b/doc/salome/examples/defining_hypotheses_ex05.py index d2b98f1cc..204496ce0 100644 --- a/doc/salome/examples/defining_hypotheses_ex05.py +++ b/doc/salome/examples/defining_hypotheses_ex05.py @@ -37,7 +37,7 @@ algo.NumberOfSegments(20) # assign triangulation algorithm algo = tria_mesh.Triangle() -# apply "Max Element Area" hypothesis to each triangle +# assign "Max Element Area" hypothesis algo.MaxElementArea(100) # compute the mesh diff --git a/doc/salome/examples/defining_hypotheses_ex07.py b/doc/salome/examples/defining_hypotheses_ex07.py index c2dc2cfb0..1630a9047 100644 --- a/doc/salome/examples/defining_hypotheses_ex07.py +++ b/doc/salome/examples/defining_hypotheses_ex07.py @@ -24,12 +24,13 @@ tria = smesh.Mesh(face1, "Face : triangle 2D mesh") # Define 1D meshing algo1D = tria.Segment() -algo1D.NumberOfSegments(2) +algo1D.LocalLength(3.) # create and assign the algorithm for 2D meshing with triangles algo2D = tria.Triangle() -# create and assign "LengthFromEdges" hypothesis to build triangles based on the length of the edges taken from the wire +# create and assign "LengthFromEdges" hypothesis to build triangles with +# linear size close to the length of the segments generated on the face wires (3.) algo2D.LengthFromEdges() # compute the mesh diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index a897decd6..985e4a7ae 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -1259,7 +1259,7 @@ bool SMESH_MeshAlgos::IsOut( const SMDS_MeshElement* element, const gp_Pnt& poin // Node or 0D element ------------------------------------------------------------------------- { gp_Vec n2p ( xyz[0], point ); - return n2p.SquareMagnitude() <= tol * tol; + return n2p.SquareMagnitude() > tol * tol; } return true; } From 3ae5846f2427f15ff0472576c2af89d8978a14ca Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 18 Mar 2016 15:42:33 +0300 Subject: [PATCH 42/48] IPAL52974: Find Element by Point shows nodes that do not belong to current group --- src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx | 11 +++++++++ src/SMESHGUI/SMESHGUI_MeshEditPreview.h | 1 + src/SMESHUtils/SMESH_MeshAlgos.cxx | 30 ++++++++++++++++++++--- src/SMESHUtils/SMESH_MeshAlgos.hxx | 3 +++ 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx index 50fe4e592..73377c3b1 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx @@ -404,3 +404,14 @@ vtkUnstructuredGrid* SMESHGUI_MeshEditPreview::GetGrid() const { return myGrid; } + +//================================================================================ +/*! + * \brief Returns myViewWindow + */ +//================================================================================ + +SVTK_ViewWindow* SMESHGUI_MeshEditPreview::GetViewWindow() const +{ + return myViewWindow; +} diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.h b/src/SMESHGUI/SMESHGUI_MeshEditPreview.h index a506a3718..e88355819 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.h +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.h @@ -74,6 +74,7 @@ public: SALOME_Actor* GetActor() const; vtkUnstructuredGrid* GetGrid() const; + SVTK_ViewWindow* GetViewWindow() const; }; #endif // SMESHGUI_MESHEDITPREVIEW_H diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index 985e4a7ae..a5f7701c2 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -60,7 +60,8 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher /*! * \brief Constructor */ - SMESH_NodeSearcherImpl( const SMDS_Mesh* theMesh ) + SMESH_NodeSearcherImpl( const SMDS_Mesh* theMesh = 0, + SMDS_ElemIteratorPtr theElemIt = SMDS_ElemIteratorPtr() ) { myMesh = ( SMDS_Mesh* ) theMesh; @@ -70,6 +71,14 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher while ( nIt->more() ) nodes.insert( nodes.end(), nIt->next() ); } + else if ( theElemIt ) + { + while ( theElemIt->more() ) + { + const SMDS_MeshElement* e = theElemIt->next(); + nodes.insert( e->begin_nodes(), e->end_nodes() ); + } + } myOctreeNode = new SMESH_OctreeNode(nodes) ; // get max size of a leaf box @@ -714,8 +723,12 @@ FindElementsByPoint(const gp_Pnt& point, if ( type == SMDSAbs_Node || type == SMDSAbs_0DElement || type == SMDSAbs_Ball) { if ( !_nodeSearcher ) - _nodeSearcher = new SMESH_NodeSearcherImpl( _mesh ); - + { + if ( _meshPartIt ) + _nodeSearcher = new SMESH_NodeSearcherImpl( 0, _meshPartIt ); + else + _nodeSearcher = new SMESH_NodeSearcherImpl( _mesh ); + } std::vector< const SMDS_MeshNode* > foundNodes; _nodeSearcher->FindNearPoint( point, tolerance, foundNodes ); @@ -1695,6 +1708,17 @@ SMESH_NodeSearcher* SMESH_MeshAlgos::GetNodeSearcher(SMDS_Mesh& mesh) return new SMESH_NodeSearcherImpl( &mesh ); } +//======================================================================= +/*! + * \brief Return SMESH_NodeSearcher + */ +//======================================================================= + +SMESH_NodeSearcher* SMESH_MeshAlgos::GetNodeSearcher(SMDS_ElemIteratorPtr elemIt) +{ + return new SMESH_NodeSearcherImpl( 0, elemIt ); +} + //======================================================================= /*! * \brief Return SMESH_ElementSearcher diff --git a/src/SMESHUtils/SMESH_MeshAlgos.hxx b/src/SMESHUtils/SMESH_MeshAlgos.hxx index f8ea69a6b..6420bf966 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.hxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.hxx @@ -159,6 +159,9 @@ namespace SMESH_MeshAlgos SMESHUtils_EXPORT SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh ); + SMESHUtils_EXPORT + SMESH_NodeSearcher* GetNodeSearcher( SMDS_ElemIteratorPtr elemIt ); + /*! * \brief Return SMESH_ElementSearcher. The caller is responsible for deleting it */ From 7eda9ca931ed2a11cb5e4637e4ffe19f5c061115 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 18 Mar 2016 20:10:20 +0300 Subject: [PATCH 43/48] Copyright update: 2016 --- AUTHORS | 0 CMakeLists.txt | 2 +- INSTALL | 1 - LICENCE | 504 ------------------ NEWS | 0 README | 119 +++++ SMESH_version.h.in | 2 +- SalomeSMESHConfig.cmake.in | 2 +- adm_local/CMakeLists.txt | 2 +- adm_local/cmake_files/CMakeLists.txt | 2 +- adm_local/cmake_files/FindCGNS.cmake | 2 +- adm_local/cmake_files/FindSMESH.cmake | 2 +- adm_local/cmake_files/FindSalomeCGNS.cmake | 2 +- adm_local/cmake_files/FindSalomeSMESH.cmake | 2 +- adm_local/cmake_files/FindSalomeTBB.cmake | 2 +- adm_local/cmake_files/FindSalomef2c.cmake | 2 +- adm_local/cmake_files/FindTBB.cmake | 2 +- adm_local/cmake_files/Findf2c.cmake | 2 +- adm_local/unix/CMakeLists.txt | 2 +- adm_local/unix/config_files/CMakeLists.txt | 2 +- adm_local/unix/config_files/check_Platform.m4 | 2 +- adm_local/unix/config_files/check_SMESH.m4 | 2 +- adm_local/unix/config_files/check_cgal.m4 | 2 +- adm_local/unix/config_files/check_cgns.m4 | 2 +- adm_local/unix/config_files/check_f77.m4 | 2 +- adm_local/unix/config_files/check_padder.m4 | 2 +- adm_local/unix/config_files/check_qwt.m4 | 2 +- bin/CMakeLists.txt | 2 +- bin/smesh_setenv.py | 2 +- cvs-tags | 35 -- doc/CMakeLists.txt | 2 +- doc/salome/CMakeLists.txt | 2 +- doc/salome/examples/CMakeLists.txt | 2 +- .../examples/CTestTestfileInstall.cmake | 2 +- doc/salome/examples/testme.py | 2 +- doc/salome/gui/CMakeLists.txt | 2 +- doc/salome/gui/SMESH/CMakeLists.txt | 2 +- doc/salome/gui/SMESH/collect_mesh_methods.py | 2 +- doc/salome/gui/SMESH/doxyfile.in | 2 +- doc/salome/gui/SMESH/doxyfile_py.in | 2 +- doc/salome/gui/SMESH/static/footer.html | 2 +- doc/salome/tui/CMakeLists.txt | 2 +- doc/salome/tui/doxyfile.in | 2 +- doc/salome/tui/static/footer.html | 2 +- idl/CMakeLists.txt | 2 +- idl/SMESH_BasicHypothesis.idl | 2 +- idl/SMESH_Filter.idl | 2 +- idl/SMESH_Gen.idl | 2 +- idl/SMESH_Group.idl | 2 +- idl/SMESH_Hypothesis.idl | 2 +- idl/SMESH_Measurements.idl | 2 +- idl/SMESH_Mesh.idl | 2 +- idl/SMESH_MeshEditor.idl | 2 +- idl/SMESH_Pattern.idl | 2 +- resources/CMakeLists.txt | 2 +- resources/SMESHCatalog.xml.in | 2 +- resources/SalomeApp.xml.in | 2 +- resources/StdMeshers.xml.in | 2 +- src/CMakeLists.txt | 2 +- src/Controls/CMakeLists.txt | 2 +- src/Controls/SMESH_Controls.cxx | 2 +- src/Controls/SMESH_ControlsDef.hxx | 2 +- src/Driver/CMakeLists.txt | 2 +- src/Driver/Driver_Document.cxx | 2 +- src/Driver/Driver_Document.h | 2 +- src/Driver/Driver_Mesh.cxx | 2 +- src/Driver/Driver_Mesh.h | 2 +- src/Driver/Driver_SMDS_Mesh.cxx | 2 +- src/Driver/Driver_SMDS_Mesh.h | 2 +- src/Driver/Driver_SMESHDS_Mesh.cxx | 2 +- src/Driver/Driver_SMESHDS_Mesh.h | 2 +- src/DriverCGNS/CMakeLists.txt | 2 +- src/DriverCGNS/DriverCGNS_Read.cxx | 2 +- src/DriverCGNS/DriverCGNS_Read.hxx | 2 +- src/DriverCGNS/DriverCGNS_Write.cxx | 2 +- src/DriverCGNS/DriverCGNS_Write.hxx | 2 +- src/DriverCGNS/SMESH_DriverCGNS.hxx | 2 +- src/DriverDAT/CMakeLists.txt | 2 +- src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx | 2 +- src/DriverDAT/DriverDAT_R_SMDS_Mesh.h | 2 +- src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx | 2 +- src/DriverDAT/DriverDAT_W_SMDS_Mesh.h | 2 +- src/DriverDAT/SMESH_DriverDAT.hxx | 2 +- src/DriverGMF/CMakeLists.txt | 2 +- src/DriverGMF/DriverGMF.cxx | 2 +- src/DriverGMF/DriverGMF.hxx | 2 +- src/DriverGMF/DriverGMF_Read.cxx | 2 +- src/DriverGMF/DriverGMF_Read.hxx | 2 +- src/DriverGMF/DriverGMF_Write.cxx | 2 +- src/DriverGMF/DriverGMF_Write.hxx | 2 +- src/DriverGMF/SMESH_DriverGMF.hxx | 2 +- src/DriverMED/CMakeLists.txt | 2 +- src/DriverMED/DriverMED.hxx | 2 +- src/DriverMED/DriverMED_Family.cxx | 2 +- src/DriverMED/DriverMED_Family.h | 2 +- src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx | 2 +- src/DriverMED/DriverMED_R_SMESHDS_Mesh.h | 2 +- src/DriverMED/DriverMED_W_Field.cxx | 2 +- src/DriverMED/DriverMED_W_Field.h | 2 +- src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx | 2 +- src/DriverMED/DriverMED_W_SMESHDS_Mesh.h | 2 +- src/DriverMED/SMESH_DriverMED.hxx | 2 +- src/DriverSTL/CMakeLists.txt | 2 +- src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx | 2 +- src/DriverSTL/DriverSTL_R_SMDS_Mesh.h | 2 +- src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx | 2 +- src/DriverSTL/DriverSTL_W_SMDS_Mesh.h | 2 +- src/DriverSTL/SMESH_DriverSTL.hxx | 2 +- src/DriverUNV/CMakeLists.txt | 2 +- src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx | 2 +- src/DriverUNV/DriverUNV_R_SMDS_Mesh.h | 2 +- src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx | 2 +- src/DriverUNV/DriverUNV_W_SMDS_Mesh.h | 2 +- src/DriverUNV/SMESH_DriverUNV.hxx | 2 +- src/DriverUNV/UNV164_Structure.cxx | 2 +- src/DriverUNV/UNV164_Structure.hxx | 2 +- src/DriverUNV/UNV2411_Structure.cxx | 2 +- src/DriverUNV/UNV2411_Structure.hxx | 2 +- src/DriverUNV/UNV2412_Structure.cxx | 2 +- src/DriverUNV/UNV2412_Structure.hxx | 2 +- src/DriverUNV/UNV2417_Structure.cxx | 2 +- src/DriverUNV/UNV2417_Structure.hxx | 2 +- src/DriverUNV/UNV2420_Structure.cxx | 2 +- src/DriverUNV/UNV2420_Structure.hxx | 2 +- src/DriverUNV/UNV_Utilities.cxx | 2 +- src/DriverUNV/UNV_Utilities.hxx | 2 +- src/MEDWrapper/Base/CMakeLists.txt | 2 +- src/MEDWrapper/Base/MED_Algorithm.cxx | 2 +- src/MEDWrapper/Base/MED_Algorithm.hxx | 2 +- src/MEDWrapper/Base/MED_Common.hxx | 2 +- src/MEDWrapper/Base/MED_CoordUtils.cxx | 2 +- src/MEDWrapper/Base/MED_CoordUtils.hxx | 2 +- src/MEDWrapper/Base/MED_GaussDef.cxx | 2 +- src/MEDWrapper/Base/MED_GaussDef.hxx | 2 +- src/MEDWrapper/Base/MED_GaussUtils.cxx | 2 +- src/MEDWrapper/Base/MED_GaussUtils.hxx | 2 +- src/MEDWrapper/Base/MED_SharedPtr.hxx | 2 +- src/MEDWrapper/Base/MED_SliceArray.hxx | 2 +- src/MEDWrapper/Base/MED_Structures.cxx | 2 +- src/MEDWrapper/Base/MED_Structures.hxx | 2 +- src/MEDWrapper/Base/MED_TStructures.hxx | 2 +- src/MEDWrapper/Base/MED_TWrapper.hxx | 2 +- src/MEDWrapper/Base/MED_Utilities.cxx | 2 +- src/MEDWrapper/Base/MED_Utilities.hxx | 2 +- src/MEDWrapper/Base/MED_Vector.hxx | 2 +- src/MEDWrapper/Base/MED_Wrapper.cxx | 2 +- src/MEDWrapper/Base/MED_Wrapper.hxx | 2 +- src/MEDWrapper/Base/MED_WrapperBase.hxx | 2 +- src/MEDWrapper/CMakeLists.txt | 2 +- src/MEDWrapper/Factory/CMakeLists.txt | 2 +- src/MEDWrapper/Factory/MED_Factory.cxx | 2 +- src/MEDWrapper/Factory/MED_Factory.hxx | 2 +- src/MEDWrapper/Factory/MED_Test.cxx | 2 +- src/MEDWrapper/Factory/MED_WrapperFactory.hxx | 2 +- src/MEDWrapper/Factory/mprint_version.cxx | 2 +- src/MEDWrapper/V2_2/CMakeLists.txt | 2 +- src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx | 2 +- src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx | 2 +- src/MEFISTO2/CMakeLists.txt | 2 +- src/MEFISTO2/Rn.h | 2 +- src/MEFISTO2/aptrte.cxx | 2 +- src/MEFISTO2/aptrte.h | 2 +- src/MEFISTO2/areteideale.f | 2 +- src/MEFISTO2/trte.f | 2 +- src/OBJECT/CMakeLists.txt | 2 +- src/OBJECT/SMESH_Actor.cxx | 2 +- src/OBJECT/SMESH_Actor.h | 2 +- src/OBJECT/SMESH_ActorDef.h | 2 +- src/OBJECT/SMESH_ActorUtils.cxx | 2 +- src/OBJECT/SMESH_ActorUtils.h | 2 +- src/OBJECT/SMESH_CellLabelActor.cxx | 2 +- src/OBJECT/SMESH_CellLabelActor.h | 2 +- src/OBJECT/SMESH_DeviceActor.cxx | 2 +- src/OBJECT/SMESH_DeviceActor.h | 2 +- src/OBJECT/SMESH_ExtractGeometry.cxx | 2 +- src/OBJECT/SMESH_ExtractGeometry.h | 2 +- src/OBJECT/SMESH_FaceOrientationFilter.cxx | 2 +- src/OBJECT/SMESH_FaceOrientationFilter.h | 2 +- src/OBJECT/SMESH_NodeLabelActor.cxx | 2 +- src/OBJECT/SMESH_NodeLabelActor.h | 2 +- src/OBJECT/SMESH_Object.cxx | 2 +- src/OBJECT/SMESH_Object.h | 2 +- src/OBJECT/SMESH_ObjectDef.h | 2 +- src/OBJECT/SMESH_PreviewActorsCollection.cxx | 2 +- src/OBJECT/SMESH_PreviewActorsCollection.h | 2 +- src/OBJECT/SMESH_SVTKActor.cxx | 2 +- src/OBJECT/SMESH_SVTKActor.h | 2 +- src/OBJECT/SMESH_ScalarBarActor.cxx | 2 +- src/OBJECT/SMESH_ScalarBarActor.h | 2 +- src/PluginUtils/CMakeLists.txt | 2 +- src/PluginUtils/GeomSelectionTools.cxx | 2 +- src/PluginUtils/GeomSelectionTools.h | 2 +- src/SMDS/CMakeLists.txt | 2 +- src/SMDS/ObjectPool.hxx | 2 +- src/SMDS/SMDSAbs_ElementType.hxx | 2 +- src/SMDS/SMDS_BallElement.cxx | 2 +- src/SMDS/SMDS_BallElement.hxx | 2 +- src/SMDS/SMDS_Downward.cxx | 2 +- src/SMDS/SMDS_Downward.hxx | 2 +- src/SMDS/SMDS_EdgePosition.cxx | 2 +- src/SMDS/SMDS_EdgePosition.hxx | 2 +- src/SMDS/SMDS_ElemIterator.hxx | 2 +- src/SMDS/SMDS_FaceOfEdges.cxx | 2 +- src/SMDS/SMDS_FaceOfEdges.hxx | 2 +- src/SMDS/SMDS_FaceOfNodes.cxx | 2 +- src/SMDS/SMDS_FaceOfNodes.hxx | 2 +- src/SMDS/SMDS_FacePosition.cxx | 2 +- src/SMDS/SMDS_FacePosition.hxx | 2 +- src/SMDS/SMDS_Iterator.hxx | 2 +- src/SMDS/SMDS_IteratorOfElements.cxx | 2 +- src/SMDS/SMDS_IteratorOfElements.hxx | 2 +- src/SMDS/SMDS_IteratorOnIterators.hxx | 2 +- src/SMDS/SMDS_LinearEdge.cxx | 2 +- src/SMDS/SMDS_LinearEdge.hxx | 2 +- src/SMDS/SMDS_MemoryLimit.cxx | 2 +- src/SMDS/SMDS_Mesh.cxx | 2 +- src/SMDS/SMDS_Mesh.hxx | 2 +- src/SMDS/SMDS_Mesh0DElement.cxx | 2 +- src/SMDS/SMDS_Mesh0DElement.hxx | 2 +- src/SMDS/SMDS_MeshCell.cxx | 2 +- src/SMDS/SMDS_MeshCell.hxx | 2 +- src/SMDS/SMDS_MeshEdge.cxx | 2 +- src/SMDS/SMDS_MeshEdge.hxx | 2 +- src/SMDS/SMDS_MeshElement.cxx | 2 +- src/SMDS/SMDS_MeshElement.hxx | 2 +- src/SMDS/SMDS_MeshElementIDFactory.cxx | 2 +- src/SMDS/SMDS_MeshElementIDFactory.hxx | 2 +- src/SMDS/SMDS_MeshFace.cxx | 2 +- src/SMDS/SMDS_MeshFace.hxx | 2 +- src/SMDS/SMDS_MeshGroup.cxx | 2 +- src/SMDS/SMDS_MeshGroup.hxx | 2 +- src/SMDS/SMDS_MeshIDFactory.cxx | 2 +- src/SMDS/SMDS_MeshIDFactory.hxx | 2 +- src/SMDS/SMDS_MeshInfo.hxx | 2 +- src/SMDS/SMDS_MeshNode.cxx | 2 +- src/SMDS/SMDS_MeshNode.hxx | 2 +- src/SMDS/SMDS_MeshNodeIDFactory.cxx | 2 +- src/SMDS/SMDS_MeshNodeIDFactory.hxx | 2 +- src/SMDS/SMDS_MeshObject.cxx | 2 +- src/SMDS/SMDS_MeshObject.hxx | 2 +- src/SMDS/SMDS_MeshVolume.cxx | 2 +- src/SMDS/SMDS_MeshVolume.hxx | 2 +- src/SMDS/SMDS_PolygonalFaceOfNodes.cxx | 2 +- src/SMDS/SMDS_PolygonalFaceOfNodes.hxx | 2 +- src/SMDS/SMDS_PolyhedralVolumeOfNodes.cxx | 2 +- src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx | 2 +- src/SMDS/SMDS_Position.cxx | 2 +- src/SMDS/SMDS_Position.hxx | 2 +- src/SMDS/SMDS_QuadraticEdge.cxx | 2 +- src/SMDS/SMDS_QuadraticEdge.hxx | 2 +- src/SMDS/SMDS_QuadraticFaceOfNodes.cxx | 2 +- src/SMDS/SMDS_QuadraticFaceOfNodes.hxx | 2 +- src/SMDS/SMDS_QuadraticVolumeOfNodes.cxx | 2 +- src/SMDS/SMDS_QuadraticVolumeOfNodes.hxx | 2 +- src/SMDS/SMDS_SetIterator.hxx | 2 +- src/SMDS/SMDS_SpacePosition.cxx | 2 +- src/SMDS/SMDS_SpacePosition.hxx | 2 +- src/SMDS/SMDS_StdIterator.hxx | 2 +- src/SMDS/SMDS_TypeOfPosition.hxx | 2 +- src/SMDS/SMDS_UnstructuredGrid.cxx | 2 +- src/SMDS/SMDS_UnstructuredGrid.hxx | 2 +- src/SMDS/SMDS_VertexPosition.cxx | 2 +- src/SMDS/SMDS_VertexPosition.hxx | 2 +- src/SMDS/SMDS_VolumeOfFaces.cxx | 2 +- src/SMDS/SMDS_VolumeOfFaces.hxx | 2 +- src/SMDS/SMDS_VolumeOfNodes.cxx | 2 +- src/SMDS/SMDS_VolumeOfNodes.hxx | 2 +- src/SMDS/SMDS_VolumeTool.cxx | 2 +- src/SMDS/SMDS_VolumeTool.hxx | 2 +- src/SMDS/SMDS_VtkCellIterator.cxx | 2 +- src/SMDS/SMDS_VtkCellIterator.hxx | 2 +- src/SMDS/SMDS_VtkEdge.cxx | 2 +- src/SMDS/SMDS_VtkEdge.hxx | 2 +- src/SMDS/SMDS_VtkFace.cxx | 2 +- src/SMDS/SMDS_VtkFace.hxx | 2 +- src/SMDS/SMDS_VtkVolume.cxx | 2 +- src/SMDS/SMDS_VtkVolume.hxx | 2 +- src/SMDS/SMESH_SMDS.hxx | 2 +- src/SMDS/chrono.cxx | 2 +- src/SMDS/chrono.hxx | 2 +- src/SMESH/CMakeLists.txt | 2 +- src/SMESH/SMESH_Algo.cxx | 2 +- src/SMESH/SMESH_Algo.hxx | 2 +- src/SMESH/SMESH_Gen.cxx | 2 +- src/SMESH/SMESH_Gen.hxx | 2 +- src/SMESH/SMESH_Group.cxx | 2 +- src/SMESH/SMESH_Group.hxx | 2 +- src/SMESH/SMESH_HypoFilter.cxx | 2 +- src/SMESH/SMESH_HypoFilter.hxx | 2 +- src/SMESH/SMESH_Hypothesis.cxx | 2 +- src/SMESH/SMESH_Hypothesis.hxx | 2 +- src/SMESH/SMESH_Mesh.cxx | 2 +- src/SMESH/SMESH_Mesh.hxx | 2 +- src/SMESH/SMESH_MeshEditor.cxx | 2 +- src/SMESH/SMESH_MeshEditor.hxx | 2 +- src/SMESH/SMESH_MesherHelper.cxx | 2 +- src/SMESH/SMESH_MesherHelper.hxx | 2 +- src/SMESH/SMESH_Pattern.cxx | 2 +- src/SMESH/SMESH_Pattern.hxx | 2 +- src/SMESH/SMESH_ProxyMesh.cxx | 2 +- src/SMESH/SMESH_ProxyMesh.hxx | 2 +- src/SMESH/SMESH_SMESH.hxx | 2 +- src/SMESH/SMESH_subMesh.cxx | 2 +- src/SMESH/SMESH_subMesh.hxx | 2 +- src/SMESH/SMESH_subMeshEventListener.hxx | 2 +- src/SMESH/memoire.h | 2 +- src/SMESHClient/CMakeLists.txt | 2 +- src/SMESHClient/SMESHClientBin.cxx | 2 +- src/SMESHClient/SMESH_Client.cxx | 2 +- src/SMESHClient/SMESH_Client.hxx | 2 +- src/SMESHDS/CMakeLists.txt | 2 +- src/SMESHDS/SMESHDS_Command.cxx | 2 +- src/SMESHDS/SMESHDS_Command.hxx | 2 +- src/SMESHDS/SMESHDS_CommandType.hxx | 2 +- src/SMESHDS/SMESHDS_DataMapOfShape.hxx | 2 +- src/SMESHDS/SMESHDS_Document.cxx | 2 +- src/SMESHDS/SMESHDS_Document.hxx | 2 +- src/SMESHDS/SMESHDS_Group.cxx | 2 +- src/SMESHDS/SMESHDS_Group.hxx | 2 +- src/SMESHDS/SMESHDS_GroupBase.cxx | 2 +- src/SMESHDS/SMESHDS_GroupBase.hxx | 2 +- src/SMESHDS/SMESHDS_GroupOnFilter.cxx | 2 +- src/SMESHDS/SMESHDS_GroupOnFilter.hxx | 2 +- src/SMESHDS/SMESHDS_GroupOnGeom.cxx | 2 +- src/SMESHDS/SMESHDS_GroupOnGeom.hxx | 2 +- src/SMESHDS/SMESHDS_Hypothesis.cxx | 2 +- src/SMESHDS/SMESHDS_Hypothesis.hxx | 2 +- src/SMESHDS/SMESHDS_Mesh.cxx | 2 +- src/SMESHDS/SMESHDS_Mesh.hxx | 2 +- src/SMESHDS/SMESHDS_Script.cxx | 2 +- src/SMESHDS/SMESHDS_Script.hxx | 2 +- src/SMESHDS/SMESHDS_SubMesh.cxx | 2 +- src/SMESHDS/SMESHDS_SubMesh.hxx | 2 +- src/SMESHDS/SMESHDS_TSubMeshHolder.hxx | 2 +- src/SMESHDS/SMESH_Controls.hxx | 2 +- src/SMESHDS/SMESH_SMESHDS.hxx | 2 +- src/SMESHFiltersSelection/CMakeLists.txt | 2 +- .../SMESH_LogicalFilter.cxx | 2 +- .../SMESH_LogicalFilter.hxx | 2 +- .../SMESH_NumberFilter.cxx | 2 +- .../SMESH_NumberFilter.hxx | 2 +- src/SMESHFiltersSelection/SMESH_Type.h | 2 +- .../SMESH_TypeFilter.cxx | 2 +- .../SMESH_TypeFilter.hxx | 2 +- src/SMESHGUI/CMakeLists.txt | 2 +- src/SMESHGUI/SMESHGUI.cxx | 2 +- src/SMESHGUI/SMESHGUI.h | 2 +- .../SMESHGUI_Add0DElemsOnAllNodesDlg.cxx | 2 +- .../SMESHGUI_Add0DElemsOnAllNodesDlg.h | 2 +- src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h | 2 +- .../SMESHGUI_AddQuadraticElementDlg.cxx | 2 +- .../SMESHGUI_AddQuadraticElementDlg.h | 2 +- src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ClippingDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ClippingDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ComputeDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx | 2 +- src/SMESHGUI/SMESHGUI_ConvToQuadOp.h | 2 +- src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_CopyMeshDlg.h | 2 +- src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_CreatePatternDlg.h | 2 +- .../SMESHGUI_CreatePolyhedralVolumeDlg.cxx | 2 +- .../SMESHGUI_CreatePolyhedralVolumeDlg.h | 2 +- src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h | 2 +- src/SMESHGUI/SMESHGUI_Dialog.cxx | 2 +- src/SMESHGUI/SMESHGUI_Dialog.h | 2 +- src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.h | 2 +- src/SMESHGUI/SMESHGUI_Displayer.cxx | 2 +- src/SMESHGUI/SMESHGUI_Displayer.h | 2 +- src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.h | 2 +- .../SMESHGUI_ExtrusionAlongPathDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ExtrusionDlg.h | 2 +- src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx | 2 +- src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h | 2 +- src/SMESHGUI/SMESHGUI_FileInfoDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_FileInfoDlg.h | 2 +- src/SMESHGUI/SMESHGUI_FileValidator.cxx | 2 +- src/SMESHGUI/SMESHGUI_FileValidator.h | 2 +- src/SMESHGUI/SMESHGUI_Filter.cxx | 2 +- src/SMESHGUI/SMESHGUI_Filter.h | 2 +- src/SMESHGUI/SMESHGUI_FilterDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_FilterDlg.h | 2 +- src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h | 2 +- src/SMESHGUI/SMESHGUI_FilterUtils.cxx | 2 +- src/SMESHGUI/SMESHGUI_FilterUtils.h | 2 +- src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h | 2 +- src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx | 2 +- src/SMESHGUI/SMESHGUI_GEOMGenUtils.h | 2 +- src/SMESHGUI/SMESHGUI_GroupDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_GroupDlg.h | 2 +- src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h | 2 +- src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_GroupOpDlg.h | 2 +- src/SMESHGUI/SMESHGUI_GroupUtils.cxx | 2 +- src/SMESHGUI/SMESHGUI_GroupUtils.h | 2 +- src/SMESHGUI/SMESHGUI_Hypotheses.cxx | 2 +- src/SMESHGUI/SMESHGUI_Hypotheses.h | 2 +- src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx | 2 +- src/SMESHGUI/SMESHGUI_HypothesesUtils.h | 2 +- src/SMESHGUI/SMESHGUI_IdPreview.cxx | 2 +- src/SMESHGUI/SMESHGUI_IdPreview.h | 2 +- src/SMESHGUI/SMESHGUI_IdValidator.h | 2 +- src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx | 2 +- src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.h | 2 +- src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.h | 2 +- src/SMESHGUI/SMESHGUI_Measurements.cxx | 2 +- src/SMESHGUI/SMESHGUI_Measurements.h | 2 +- src/SMESHGUI/SMESHGUI_MergeDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MergeDlg.h | 2 +- src/SMESHGUI/SMESHGUI_MeshDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshDlg.h | 2 +- src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshEditPreview.h | 2 +- src/SMESHGUI/SMESHGUI_MeshInfo.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshInfo.h | 2 +- src/SMESHGUI/SMESHGUI_MeshInfosBox.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshInfosBox.h | 2 +- src/SMESHGUI/SMESHGUI_MeshOp.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshOp.h | 2 +- src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshOrderDlg.h | 2 +- src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshOrderOp.h | 2 +- src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshPatternDlg.h | 2 +- src/SMESHGUI/SMESHGUI_MeshUtils.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshUtils.h | 2 +- src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MultiEditDlg.h | 2 +- src/SMESHGUI/SMESHGUI_NodesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_NodesDlg.h | 2 +- src/SMESHGUI/SMESHGUI_Operation.cxx | 2 +- src/SMESHGUI/SMESHGUI_Operation.h | 2 +- src/SMESHGUI/SMESHGUI_Operations.h | 2 +- src/SMESHGUI/SMESHGUI_PatternUtils.cxx | 2 +- src/SMESHGUI/SMESHGUI_PatternUtils.h | 2 +- src/SMESHGUI/SMESHGUI_PatternWidget.cxx | 2 +- src/SMESHGUI/SMESHGUI_PatternWidget.h | 2 +- src/SMESHGUI/SMESHGUI_PreVisualObj.cxx | 2 +- src/SMESHGUI/SMESHGUI_PreVisualObj.h | 2 +- .../SMESHGUI_Preferences_ScalarBarDlg.cxx | 2 +- .../SMESHGUI_Preferences_ScalarBarDlg.h | 2 +- src/SMESHGUI/SMESHGUI_PreviewDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_PreviewDlg.h | 2 +- src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_PropertiesDlg.h | 2 +- src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h | 2 +- src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h | 2 +- src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_RenumberingDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h | 2 +- src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_RevolutionDlg.h | 2 +- src/SMESHGUI/SMESHGUI_RotationDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_RotationDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ScaleDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ScaleDlg.h | 2 +- src/SMESHGUI/SMESHGUI_Selection.cxx | 2 +- src/SMESHGUI/SMESHGUI_Selection.h | 2 +- src/SMESHGUI/SMESHGUI_SelectionOp.cxx | 2 +- src/SMESHGUI/SMESHGUI_SelectionOp.h | 2 +- src/SMESHGUI/SMESHGUI_SewingDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_SewingDlg.h | 2 +- src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h | 2 +- src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_SingleEditDlg.h | 2 +- src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_SmoothingDlg.h | 2 +- src/SMESHGUI/SMESHGUI_SpinBox.cxx | 2 +- src/SMESHGUI/SMESHGUI_SpinBox.h | 2 +- src/SMESHGUI/SMESHGUI_SplitBiQuad.cxx | 2 +- src/SMESHGUI/SMESHGUI_SplitBiQuad.h | 2 +- src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_SymmetryDlg.h | 2 +- src/SMESHGUI/SMESHGUI_TranslationDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_TranslationDlg.h | 2 +- src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_TransparencyDlg.h | 2 +- src/SMESHGUI/SMESHGUI_Utils.cxx | 2 +- src/SMESHGUI/SMESHGUI_Utils.h | 2 +- src/SMESHGUI/SMESHGUI_VTKUtils.cxx | 2 +- src/SMESHGUI/SMESHGUI_VTKUtils.h | 2 +- src/SMESHGUI/SMESHGUI_XmlHandler.cxx | 2 +- src/SMESHGUI/SMESHGUI_XmlHandler.h | 2 +- src/SMESHGUI/SMESH_SMESHGUI.hxx | 2 +- src/SMESHUtils/CMakeLists.txt | 2 +- src/SMESHUtils/SMESH_Block.cxx | 2 +- src/SMESHUtils/SMESH_Block.hxx | 2 +- src/SMESHUtils/SMESH_Comment.hxx | 2 +- src/SMESHUtils/SMESH_ComputeError.hxx | 2 +- src/SMESHUtils/SMESH_File.cxx | 2 +- src/SMESHUtils/SMESH_File.hxx | 2 +- src/SMESHUtils/SMESH_FreeBorders.cxx | 2 +- src/SMESHUtils/SMESH_MAT2d.cxx | 2 +- src/SMESHUtils/SMESH_MAT2d.hxx | 2 +- src/SMESHUtils/SMESH_MeshAlgos.cxx | 2 +- src/SMESHUtils/SMESH_MeshAlgos.hxx | 2 +- src/SMESHUtils/SMESH_Octree.cxx | 2 +- src/SMESHUtils/SMESH_Octree.hxx | 2 +- src/SMESHUtils/SMESH_OctreeNode.cxx | 2 +- src/SMESHUtils/SMESH_OctreeNode.hxx | 2 +- src/SMESHUtils/SMESH_Quadtree.cxx | 2 +- src/SMESHUtils/SMESH_Quadtree.hxx | 2 +- src/SMESHUtils/SMESH_Tree.hxx | 2 +- src/SMESHUtils/SMESH_TryCatch.cxx | 2 +- src/SMESHUtils/SMESH_TryCatch.hxx | 2 +- src/SMESHUtils/SMESH_TypeDefs.hxx | 2 +- src/SMESHUtils/SMESH_Utils.hxx | 2 +- src/SMESH_I/CMakeLists.txt | 2 +- src/SMESH_I/SMESH.hxx | 2 +- src/SMESH_I/SMESH_0D_Algo_i.cxx | 2 +- src/SMESH_I/SMESH_0D_Algo_i.hxx | 2 +- src/SMESH_I/SMESH_1D_Algo_i.cxx | 2 +- src/SMESH_I/SMESH_1D_Algo_i.hxx | 2 +- src/SMESH_I/SMESH_2D_Algo_i.cxx | 2 +- src/SMESH_I/SMESH_2D_Algo_i.hxx | 2 +- src/SMESH_I/SMESH_2smeshpy.cxx | 2 +- src/SMESH_I/SMESH_2smeshpy.hxx | 2 +- src/SMESH_I/SMESH_3D_Algo_i.cxx | 2 +- src/SMESH_I/SMESH_3D_Algo_i.hxx | 2 +- src/SMESH_I/SMESH_Algo_i.cxx | 2 +- src/SMESH_I/SMESH_Algo_i.hxx | 2 +- src/SMESH_I/SMESH_DumpPython.cxx | 2 +- src/SMESH_I/SMESH_Filter_i.cxx | 2 +- src/SMESH_I/SMESH_Filter_i.hxx | 2 +- src/SMESH_I/SMESH_Gen_i.cxx | 2 +- src/SMESH_I/SMESH_Gen_i.hxx | 2 +- src/SMESH_I/SMESH_Gen_i_1.cxx | 2 +- src/SMESH_I/SMESH_Group_i.cxx | 2 +- src/SMESH_I/SMESH_Group_i.hxx | 2 +- src/SMESH_I/SMESH_Hypothesis_i.cxx | 2 +- src/SMESH_I/SMESH_Hypothesis_i.hxx | 2 +- src/SMESH_I/SMESH_Measurements_i.cxx | 2 +- src/SMESH_I/SMESH_Measurements_i.hxx | 2 +- src/SMESH_I/SMESH_MeshEditor_i.cxx | 2 +- src/SMESH_I/SMESH_MeshEditor_i.hxx | 2 +- src/SMESH_I/SMESH_MeshPartDS.hxx | 2 +- src/SMESH_I/SMESH_Mesh_i.cxx | 2 +- src/SMESH_I/SMESH_Mesh_i.hxx | 2 +- src/SMESH_I/SMESH_NoteBook.cxx | 2 +- src/SMESH_I/SMESH_NoteBook.hxx | 2 +- src/SMESH_I/SMESH_Pattern_i.cxx | 2 +- src/SMESH_I/SMESH_Pattern_i.hxx | 2 +- src/SMESH_I/SMESH_PreMeshInfo.cxx | 2 +- src/SMESH_I/SMESH_PreMeshInfo.hxx | 2 +- src/SMESH_I/SMESH_PythonDump.hxx | 2 +- src/SMESH_I/SMESH_subMesh_i.cxx | 2 +- src/SMESH_I/SMESH_subMesh_i.hxx | 2 +- src/SMESH_PY/CMakeLists.txt | 2 +- src/SMESH_PY/__init__.py | 2 +- src/SMESH_PY/smeshstudytools.py | 2 +- src/SMESH_SWIG/CMakeLists.txt | 2 +- src/SMESH_SWIG/PAL_MESH_041_mesh.py | 2 +- src/SMESH_SWIG/PAL_MESH_043_2D.py | 2 +- src/SMESH_SWIG/PAL_MESH_043_3D.py | 2 +- src/SMESH_SWIG/SMESH_AdvancedEditor.py | 2 +- src/SMESH_SWIG/SMESH_BelongToGeom.py | 2 +- src/SMESH_SWIG/SMESH_BuildCompound.py | 2 +- src/SMESH_SWIG/SMESH_GroupFromGeom.py | 2 +- src/SMESH_SWIG/SMESH_GroupFromGeom2.py | 2 +- src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py | 2 +- src/SMESH_SWIG/SMESH_Nut.py | 2 +- src/SMESH_SWIG/SMESH_Partition1_tetra.py | 2 +- src/SMESH_SWIG/SMESH_Sphere.py | 2 +- src/SMESH_SWIG/SMESH_blocks.py | 2 +- src/SMESH_SWIG/SMESH_box.py | 2 +- src/SMESH_SWIG/SMESH_box2_tetra.py | 2 +- src/SMESH_SWIG/SMESH_box3_tetra.py | 2 +- src/SMESH_SWIG/SMESH_box_tetra.py | 2 +- src/SMESH_SWIG/SMESH_controls.py | 2 +- src/SMESH_SWIG/SMESH_demo_hexa2_upd.py | 2 +- src/SMESH_SWIG/SMESH_fixation.py | 2 +- src/SMESH_SWIG/SMESH_fixation_hexa.py | 2 +- src/SMESH_SWIG/SMESH_fixation_netgen.py | 2 +- src/SMESH_SWIG/SMESH_fixation_tetra.py | 2 +- src/SMESH_SWIG/SMESH_flight_skin.py | 2 +- src/SMESH_SWIG/SMESH_freebord.py | 2 +- src/SMESH_SWIG/SMESH_hexaedre.py | 2 +- src/SMESH_SWIG/SMESH_mechanic.py | 2 +- src/SMESH_SWIG/SMESH_mechanic_editor.py | 2 +- src/SMESH_SWIG/SMESH_mechanic_netgen.py | 2 +- src/SMESH_SWIG/SMESH_mechanic_tetra.py | 2 +- src/SMESH_SWIG/SMESH_reg.py | 2 +- src/SMESH_SWIG/SMESH_shared_modules.py | 2 +- src/SMESH_SWIG/SMESH_test.py | 2 +- src/SMESH_SWIG/SMESH_test0.py | 2 +- src/SMESH_SWIG/SMESH_test1.py | 2 +- src/SMESH_SWIG/SMESH_test1_AndDisplay.py | 2 +- src/SMESH_SWIG/SMESH_test2.py | 2 +- src/SMESH_SWIG/SMESH_test3.py | 2 +- src/SMESH_SWIG/SMESH_test4.py | 2 +- src/SMESH_SWIG/SMESH_test5.py | 2 +- src/SMESH_SWIG/StdMeshersBuilder.py | 2 +- src/SMESH_SWIG/__init__.py | 2 +- src/SMESH_SWIG/batchmode_mefisto.py | 2 +- src/SMESH_SWIG/batchmode_smesh.py | 2 +- src/SMESH_SWIG/ex00_all.py | 2 +- src/SMESH_SWIG/ex01_cube2build.py | 2 +- src/SMESH_SWIG/ex02_cube2primitive.py | 2 +- src/SMESH_SWIG/ex03_cube2partition.py | 2 +- src/SMESH_SWIG/ex04_cube5tetraHexa.py | 2 +- src/SMESH_SWIG/ex05_hole1build.py | 2 +- src/SMESH_SWIG/ex06_hole1boolean.py | 2 +- src/SMESH_SWIG/ex07_hole1partition.py | 2 +- src/SMESH_SWIG/ex08_hole2build.py | 2 +- src/SMESH_SWIG/ex09_grid4build.py | 2 +- src/SMESH_SWIG/ex10_grid4geometry.py | 2 +- src/SMESH_SWIG/ex11_grid3partition.py | 2 +- src/SMESH_SWIG/ex12_grid17partition.py | 2 +- src/SMESH_SWIG/ex13_hole1partial.py | 2 +- src/SMESH_SWIG/ex14_cyl1holed.py | 2 +- src/SMESH_SWIG/ex15_cyl2geometry.py | 2 +- src/SMESH_SWIG/ex16_cyl2complementary.py | 2 +- src/SMESH_SWIG/ex17_dome1.py | 2 +- src/SMESH_SWIG/ex18_dome2.py | 2 +- src/SMESH_SWIG/ex19_sphereINcube.py | 2 +- src/SMESH_SWIG/ex21_lamp.py | 2 +- src/SMESH_SWIG/ex24_cylinder.py | 2 +- src/SMESH_SWIG/ex29_refine.py | 2 +- src/SMESH_SWIG/ex30_groupsOp.py | 2 +- src/SMESH_SWIG/ex30_tepal.py | 2 +- src/SMESH_SWIG/ex31_dimGroup.py | 2 +- src/SMESH_SWIG/smesh.py | 2 +- src/SMESH_SWIG/smeshBuilder.py | 2 +- src/SMESH_SWIG/smesh_algorithm.py | 2 +- src/SMESH_SWIG/smesh_selection.py | 2 +- src/SMESH_SWIG_WITHIHM/CMakeLists.txt | 2 +- src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx | 2 +- src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h | 2 +- src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i | 2 +- src/StdMeshers/CMakeLists.txt | 2 +- src/StdMeshers/SMESH_StdMeshers.hxx | 2 +- src/StdMeshers/StdMeshers_Adaptive1D.cxx | 2 +- src/StdMeshers/StdMeshers_Adaptive1D.hxx | 2 +- src/StdMeshers/StdMeshers_Arithmetic1D.cxx | 2 +- src/StdMeshers/StdMeshers_Arithmetic1D.hxx | 2 +- src/StdMeshers/StdMeshers_AutomaticLength.cxx | 2 +- src/StdMeshers/StdMeshers_AutomaticLength.hxx | 2 +- .../StdMeshers_CartesianParameters3D.cxx | 2 +- .../StdMeshers_CartesianParameters3D.hxx | 2 +- src/StdMeshers/StdMeshers_Cartesian_3D.cxx | 2 +- src/StdMeshers/StdMeshers_Cartesian_3D.hxx | 2 +- .../StdMeshers_CompositeHexa_3D.cxx | 2 +- .../StdMeshers_CompositeHexa_3D.hxx | 2 +- .../StdMeshers_CompositeSegment_1D.cxx | 2 +- .../StdMeshers_CompositeSegment_1D.hxx | 2 +- src/StdMeshers/StdMeshers_Deflection1D.cxx | 2 +- src/StdMeshers/StdMeshers_Deflection1D.hxx | 2 +- src/StdMeshers/StdMeshers_Distribution.cxx | 2 +- src/StdMeshers/StdMeshers_Distribution.hxx | 2 +- src/StdMeshers/StdMeshers_FaceSide.cxx | 2 +- src/StdMeshers/StdMeshers_FaceSide.hxx | 2 +- src/StdMeshers/StdMeshers_FixedPoints1D.cxx | 2 +- src/StdMeshers/StdMeshers_FixedPoints1D.hxx | 2 +- src/StdMeshers/StdMeshers_Geometric1D.cxx | 2 +- src/StdMeshers/StdMeshers_Geometric1D.hxx | 2 +- src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx | 2 +- src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx | 2 +- src/StdMeshers/StdMeshers_Hexa_3D.cxx | 2 +- src/StdMeshers/StdMeshers_Hexa_3D.hxx | 2 +- src/StdMeshers/StdMeshers_ImportSource.cxx | 2 +- src/StdMeshers/StdMeshers_ImportSource.hxx | 2 +- src/StdMeshers/StdMeshers_Import_1D.cxx | 2 +- src/StdMeshers/StdMeshers_Import_1D.hxx | 2 +- src/StdMeshers/StdMeshers_Import_1D2D.cxx | 2 +- src/StdMeshers/StdMeshers_Import_1D2D.hxx | 2 +- .../StdMeshers_LayerDistribution.cxx | 2 +- .../StdMeshers_LayerDistribution.hxx | 2 +- .../StdMeshers_LayerDistribution2D.cxx | 2 +- .../StdMeshers_LayerDistribution2D.hxx | 2 +- src/StdMeshers/StdMeshers_LengthFromEdges.cxx | 2 +- src/StdMeshers/StdMeshers_LengthFromEdges.hxx | 2 +- src/StdMeshers/StdMeshers_LocalLength.cxx | 2 +- src/StdMeshers/StdMeshers_LocalLength.hxx | 2 +- src/StdMeshers/StdMeshers_MEFISTO_2D.cxx | 2 +- src/StdMeshers/StdMeshers_MEFISTO_2D.hxx | 2 +- src/StdMeshers/StdMeshers_MaxElementArea.cxx | 2 +- src/StdMeshers/StdMeshers_MaxElementArea.hxx | 2 +- .../StdMeshers_MaxElementVolume.cxx | 2 +- .../StdMeshers_MaxElementVolume.hxx | 2 +- src/StdMeshers/StdMeshers_MaxLength.cxx | 2 +- src/StdMeshers/StdMeshers_MaxLength.hxx | 2 +- .../StdMeshers_NotConformAllowed.cxx | 2 +- .../StdMeshers_NotConformAllowed.hxx | 2 +- src/StdMeshers/StdMeshers_NumberOfLayers.cxx | 2 +- src/StdMeshers/StdMeshers_NumberOfLayers.hxx | 2 +- .../StdMeshers_NumberOfLayers2D.cxx | 2 +- .../StdMeshers_NumberOfLayers2D.hxx | 2 +- .../StdMeshers_NumberOfSegments.cxx | 2 +- .../StdMeshers_NumberOfSegments.hxx | 2 +- src/StdMeshers/StdMeshers_Penta_3D.cxx | 2 +- src/StdMeshers/StdMeshers_Penta_3D.hxx | 2 +- .../StdMeshers_PolygonPerFace_2D.cxx | 2 +- .../StdMeshers_PolygonPerFace_2D.hxx | 2 +- src/StdMeshers/StdMeshers_Prism_3D.cxx | 2 +- src/StdMeshers/StdMeshers_Prism_3D.hxx | 2 +- .../StdMeshers_ProjectionSource1D.cxx | 2 +- .../StdMeshers_ProjectionSource1D.hxx | 2 +- .../StdMeshers_ProjectionSource2D.cxx | 2 +- .../StdMeshers_ProjectionSource2D.hxx | 2 +- .../StdMeshers_ProjectionSource3D.cxx | 2 +- .../StdMeshers_ProjectionSource3D.hxx | 2 +- src/StdMeshers/StdMeshers_ProjectionUtils.cxx | 2 +- src/StdMeshers/StdMeshers_ProjectionUtils.hxx | 2 +- src/StdMeshers/StdMeshers_Projection_1D.cxx | 2 +- src/StdMeshers/StdMeshers_Projection_1D.hxx | 2 +- src/StdMeshers/StdMeshers_Projection_1D2D.cxx | 2 +- src/StdMeshers/StdMeshers_Projection_1D2D.hxx | 2 +- src/StdMeshers/StdMeshers_Projection_2D.cxx | 2 +- src/StdMeshers/StdMeshers_Projection_2D.hxx | 2 +- src/StdMeshers/StdMeshers_Projection_3D.cxx | 2 +- src/StdMeshers/StdMeshers_Projection_3D.hxx | 2 +- src/StdMeshers/StdMeshers_Propagation.cxx | 2 +- src/StdMeshers/StdMeshers_Propagation.hxx | 2 +- .../StdMeshers_QuadFromMedialAxis_1D2D.cxx | 2 +- .../StdMeshers_QuadFromMedialAxis_1D2D.hxx | 2 +- .../StdMeshers_QuadToTriaAdaptor.cxx | 2 +- .../StdMeshers_QuadToTriaAdaptor.hxx | 2 +- .../StdMeshers_QuadrangleParams.cxx | 2 +- .../StdMeshers_QuadrangleParams.hxx | 2 +- .../StdMeshers_QuadranglePreference.cxx | 2 +- .../StdMeshers_QuadranglePreference.hxx | 2 +- src/StdMeshers/StdMeshers_Quadrangle_2D.cxx | 2 +- src/StdMeshers/StdMeshers_Quadrangle_2D.hxx | 2 +- src/StdMeshers/StdMeshers_QuadraticMesh.cxx | 2 +- src/StdMeshers/StdMeshers_QuadraticMesh.hxx | 2 +- src/StdMeshers/StdMeshers_RadialPrism_3D.cxx | 2 +- src/StdMeshers/StdMeshers_RadialPrism_3D.hxx | 2 +- .../StdMeshers_RadialQuadrangle_1D2D.cxx | 2 +- .../StdMeshers_RadialQuadrangle_1D2D.hxx | 2 +- src/StdMeshers/StdMeshers_Regular_1D.cxx | 2 +- src/StdMeshers/StdMeshers_Regular_1D.hxx | 2 +- src/StdMeshers/StdMeshers_Reversible1D.cxx | 2 +- src/StdMeshers/StdMeshers_Reversible1D.hxx | 2 +- .../StdMeshers_SegmentAroundVertex_0D.cxx | 2 +- .../StdMeshers_SegmentAroundVertex_0D.hxx | 2 +- .../StdMeshers_SegmentLengthAroundVertex.cxx | 2 +- .../StdMeshers_SegmentLengthAroundVertex.hxx | 2 +- src/StdMeshers/StdMeshers_StartEndLength.cxx | 2 +- src/StdMeshers/StdMeshers_StartEndLength.hxx | 2 +- .../StdMeshers_UseExisting_1D2D.cxx | 2 +- .../StdMeshers_UseExisting_1D2D.hxx | 2 +- src/StdMeshers/StdMeshers_ViscousLayers.cxx | 2 +- src/StdMeshers/StdMeshers_ViscousLayers.hxx | 2 +- src/StdMeshers/StdMeshers_ViscousLayers2D.cxx | 2 +- src/StdMeshers/StdMeshers_ViscousLayers2D.hxx | 2 +- src/StdMeshersGUI/CMakeLists.txt | 2 +- src/StdMeshersGUI/SMESH_StdMeshersGUI.hxx | 2 +- src/StdMeshersGUI/StdMeshersGUI.cxx | 2 +- .../StdMeshersGUI_CartesianParamCreator.cxx | 2 +- .../StdMeshersGUI_CartesianParamCreator.h | 2 +- .../StdMeshersGUI_DistrPreview.cxx | 2 +- .../StdMeshersGUI_DistrPreview.h | 2 +- .../StdMeshersGUI_DistrTable.cxx | 2 +- src/StdMeshersGUI/StdMeshersGUI_DistrTable.h | 2 +- .../StdMeshersGUI_FixedPointsParamWdg.cxx | 2 +- .../StdMeshersGUI_FixedPointsParamWdg.h | 2 +- ...tdMeshersGUI_LayerDistributionParamWdg.cxx | 2 +- .../StdMeshersGUI_LayerDistributionParamWdg.h | 2 +- .../StdMeshersGUI_NbSegmentsCreator.cxx | 2 +- .../StdMeshersGUI_NbSegmentsCreator.h | 2 +- .../StdMeshersGUI_ObjectReferenceParamWdg.cxx | 2 +- .../StdMeshersGUI_ObjectReferenceParamWdg.h | 2 +- .../StdMeshersGUI_PropagationHelperWdg.cxx | 2 +- .../StdMeshersGUI_PropagationHelperWdg.h | 3 +- .../StdMeshersGUI_QuadrangleParamWdg.cxx | 2 +- .../StdMeshersGUI_QuadrangleParamWdg.h | 2 +- .../StdMeshersGUI_RadioButtonsGrpWdg.cxx | 2 +- .../StdMeshersGUI_RadioButtonsGrpWdg.h | 2 +- .../StdMeshersGUI_StdHypothesisCreator.cxx | 2 +- .../StdMeshersGUI_StdHypothesisCreator.h | 2 +- .../StdMeshersGUI_SubShapeSelectorWdg.cxx | 2 +- .../StdMeshersGUI_SubShapeSelectorWdg.h | 2 +- src/StdMeshers_I/CMakeLists.txt | 2 +- src/StdMeshers_I/SMESH_StdMeshers_I.hxx | 2 +- src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx | 2 +- .../StdMeshers_Arithmetic1D_i.cxx | 2 +- .../StdMeshers_Arithmetic1D_i.hxx | 2 +- .../StdMeshers_AutomaticLength_i.cxx | 2 +- .../StdMeshers_AutomaticLength_i.hxx | 2 +- .../StdMeshers_CartesianParameters3D_i.cxx | 2 +- .../StdMeshers_CartesianParameters3D_i.hxx | 2 +- .../StdMeshers_Cartesian_3D_i.cxx | 2 +- .../StdMeshers_Cartesian_3D_i.hxx | 2 +- .../StdMeshers_CompositeSegment_1D_i.cxx | 2 +- .../StdMeshers_CompositeSegment_1D_i.hxx | 2 +- .../StdMeshers_Deflection1D_i.cxx | 2 +- .../StdMeshers_Deflection1D_i.hxx | 2 +- .../StdMeshers_FixedPoints1D_i.cxx | 2 +- .../StdMeshers_FixedPoints1D_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx | 2 +- .../StdMeshers_ImportSource1D_i.cxx | 2 +- .../StdMeshers_ImportSource1D_i.hxx | 2 +- .../StdMeshers_ImportSource2D_i.cxx | 2 +- .../StdMeshers_ImportSource2D_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Import_1D2D_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_Import_1D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Import_1D_i.hxx | 2 +- .../StdMeshers_LayerDistribution2D_i.cxx | 2 +- .../StdMeshers_LayerDistribution2D_i.hxx | 2 +- .../StdMeshers_LayerDistribution_i.cxx | 2 +- .../StdMeshers_LayerDistribution_i.hxx | 2 +- .../StdMeshers_LengthFromEdges_i.cxx | 2 +- .../StdMeshers_LengthFromEdges_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_LocalLength_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_LocalLength_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.hxx | 2 +- .../StdMeshers_MaxElementArea_i.cxx | 2 +- .../StdMeshers_MaxElementArea_i.hxx | 2 +- .../StdMeshers_MaxElementVolume_i.cxx | 2 +- .../StdMeshers_MaxElementVolume_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_MaxLength_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_MaxLength_i.hxx | 2 +- .../StdMeshers_NotConformAllowed_i.cxx | 2 +- .../StdMeshers_NotConformAllowed_i.hxx | 2 +- .../StdMeshers_NumberOfLayers2D_i.cxx | 2 +- .../StdMeshers_NumberOfLayers2D_i.hxx | 2 +- .../StdMeshers_NumberOfLayers_i.cxx | 2 +- .../StdMeshers_NumberOfLayers_i.hxx | 2 +- .../StdMeshers_NumberOfSegments_i.cxx | 2 +- .../StdMeshers_NumberOfSegments_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx | 2 +- src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx | 2 +- .../StdMeshers_PolygonPerFace_2D_i.cxx | 2 +- .../StdMeshers_PolygonPerFace_2D_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Prism_3D_i.hxx | 2 +- .../StdMeshers_ProjectionSource1D_i.cxx | 2 +- .../StdMeshers_ProjectionSource1D_i.hxx | 2 +- .../StdMeshers_ProjectionSource2D_i.cxx | 2 +- .../StdMeshers_ProjectionSource2D_i.hxx | 2 +- .../StdMeshers_ProjectionSource3D_i.cxx | 2 +- .../StdMeshers_ProjectionSource3D_i.hxx | 2 +- .../StdMeshers_Projection_1D_2D_3D_i.cxx | 2 +- .../StdMeshers_Projection_1D_2D_3D_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_Propagation_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Propagation_i.hxx | 2 +- .../StdMeshers_QuadrangleParams_i.cxx | 2 +- .../StdMeshers_QuadrangleParams_i.hxx | 2 +- .../StdMeshers_QuadranglePreference_i.cxx | 2 +- .../StdMeshers_QuadranglePreference_i.hxx | 2 +- .../StdMeshers_Quadrangle_2D_i.cxx | 2 +- .../StdMeshers_Quadrangle_2D_i.hxx | 2 +- .../StdMeshers_QuadraticMesh_i.cxx | 2 +- .../StdMeshers_QuadraticMesh_i.hxx | 2 +- .../StdMeshers_RadialQuadrangle_1D2D_i.cxx | 2 +- .../StdMeshers_RadialQuadrangle_1D2D_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_Regular_1D_i.cxx | 2 +- src/StdMeshers_I/StdMeshers_Regular_1D_i.hxx | 2 +- .../StdMeshers_Reversible1D_i.cxx | 2 +- .../StdMeshers_Reversible1D_i.hxx | 2 +- .../StdMeshers_SegmentAroundVertex_0D_i.cxx | 2 +- .../StdMeshers_SegmentAroundVertex_0D_i.hxx | 2 +- ...StdMeshers_SegmentLengthAroundVertex_i.cxx | 2 +- ...StdMeshers_SegmentLengthAroundVertex_i.hxx | 2 +- .../StdMeshers_StartEndLength_i.cxx | 2 +- .../StdMeshers_StartEndLength_i.hxx | 2 +- .../StdMeshers_UseExisting_1D2D_i.cxx | 2 +- .../StdMeshers_UseExisting_1D2D_i.hxx | 2 +- .../StdMeshers_ViscousLayers2D_i.cxx | 2 +- .../StdMeshers_ViscousLayers2D_i.hxx | 2 +- .../StdMeshers_ViscousLayers_i.cxx | 2 +- .../StdMeshers_ViscousLayers_i.hxx | 2 +- src/StdMeshers_I/StdMeshers_i.cxx | 2 +- src/Tools/CMakeLists.txt | 2 +- src/Tools/MGCleanerPlug/CMakeLists.txt | 2 +- .../MGCleanerPlug/MGCleanerMonPlugDialog.py | 2 +- .../MGCleanerPlug/MGCleanerMonViewText.py | 2 +- .../MGCleanerPlug/MGCleanerplug_plugin.py | 2 +- src/Tools/MGCleanerPlug/doc/CMakeLists.txt | 2 +- src/Tools/MGCleanerPlug/doc/conf.py.in | 2 +- src/Tools/MacMesh/CMakeLists.txt | 2 +- src/Tools/MacMesh/Example/PressureValve.py.in | 2 +- src/Tools/MacMesh/MacMesh/Alarms.py | 2 +- src/Tools/MacMesh/MacMesh/CentralUnrefine.py | 2 +- src/Tools/MacMesh/MacMesh/CompositeBox.py | 2 +- src/Tools/MacMesh/MacMesh/CompositeBoxF.py | 2 +- src/Tools/MacMesh/MacMesh/Config.py | 2 +- src/Tools/MacMesh/MacMesh/CutnGroup.py | 2 +- src/Tools/MacMesh/MacMesh/Cylinder.py | 2 +- src/Tools/MacMesh/MacMesh/GenFunctions.py | 2 +- src/Tools/MacMesh/MacMesh/MacObject.py | 2 +- src/Tools/MacMesh/MacMesh/PublishGroups.py | 2 +- src/Tools/MacMesh/MacMesh/SharpAngle.py | 2 +- src/Tools/MeshCut/AUTHORS | 2 +- src/Tools/MeshCut/CMakeLists.txt | 2 +- src/Tools/MeshCut/MeshCut_Carre.cxx | 2 +- src/Tools/MeshCut/MeshCut_Carre.hxx | 2 +- src/Tools/MeshCut/MeshCut_Cas.cxx | 2 +- src/Tools/MeshCut/MeshCut_Cas.hxx | 2 +- src/Tools/MeshCut/MeshCut_Cube.cxx | 2 +- src/Tools/MeshCut/MeshCut_Cube.hxx | 2 +- src/Tools/MeshCut/MeshCut_DC.cxx | 2 +- src/Tools/MeshCut/MeshCut_Fonctions.cxx | 2 +- src/Tools/MeshCut/MeshCut_Fonctions.hxx | 2 +- src/Tools/MeshCut/MeshCut_Globals.hxx | 2 +- src/Tools/MeshCut/MeshCut_Maillage.cxx | 2 +- src/Tools/MeshCut/MeshCut_Maillage.hxx | 2 +- src/Tools/MeshCut/MeshCut_Utils.cxx | 2 +- src/Tools/MeshCut/MeshCut_Utils.hxx | 2 +- src/Tools/MeshCut/meshcut_plugin.py | 2 +- src/Tools/Verima/Base/CMakeLists.txt | 2 +- src/Tools/Verima/Base/__init__.py | 2 +- src/Tools/Verima/CMakeLists.txt | 2 +- src/Tools/Verima/CreeDocuments/CMakeLists.txt | 2 +- src/Tools/Verima/CreeDocuments/__init__.py | 2 +- .../templatesHtml/CMakeLists.txt | 2 +- src/Tools/Verima/Doc/CMakeLists.txt | 2 +- src/Tools/Verima/Doc/conf.py | 179 ------- src/Tools/Verima/Doc/conf.py.in | 2 +- src/Tools/Verima/Doc/makefile | 2 +- src/Tools/Verima/Gui/CMakeLists.txt | 2 +- src/Tools/Verima/Gui/__init__.py | 2 +- src/Tools/Verima/Stats/CMakeLists.txt | 2 +- src/Tools/Verima/Stats/__init__.py | 2 +- src/Tools/Verima/__init__.py | 2 +- src/Tools/YamsPlug/CMakeLists.txt | 2 +- src/Tools/YamsPlug/doc/CMakeLists.txt | 2 +- src/Tools/YamsPlug/doc/conf.py.in | 2 +- src/Tools/YamsPlug/monViewText.py | 2 +- src/Tools/YamsPlug/monYamsPlugDialog.py | 2 +- src/Tools/YamsPlug/yamsplug_plugin.py | 2 +- src/Tools/ZCracksPlug/CMakeLists.txt | 2 +- src/Tools/ZCracksPlug/doc/CMakeLists.txt | 2 +- src/Tools/ZCracksPlug/doc/conf.py.in | 2 +- src/Tools/ZCracksPlug/zcracks_plugin.py | 2 +- src/Tools/blocFissure/CMakeLists.txt | 2 +- src/Tools/blocFissure/CasTests/CMakeLists.txt | 2 +- src/Tools/blocFissure/doc/CMakeLists.txt | 2 +- src/Tools/blocFissure/gmu/CMakeLists.txt | 2 +- src/Tools/blocFissure/ihm/CMakeLists.txt | 2 +- .../blocFissure/ihm/fissureCoude_plugin.py | 4 +- .../blocFissure/ihm/fissureGenerale_plugin.py | 4 +- .../materielCasTests/CMakeLists.txt | 2 +- src/Tools/padder/CMakeLists.txt | 2 +- src/Tools/padder/doc/CMakeLists.txt | 2 +- src/Tools/padder/doc/doxyfile.in | 2 +- src/Tools/padder/meshjob/CMakeLists.txt | 2 +- src/Tools/padder/meshjob/idl/CMakeLists.txt | 2 +- src/Tools/padder/meshjob/idl/MESHJOB.idl | 2 +- .../padder/meshjob/idl/SPADDERPluginTest.idl | 2 +- src/Tools/padder/meshjob/impl/CMakeLists.txt | 2 +- .../padder/meshjob/impl/MeshJobManager_i.cxx | 2 +- .../padder/meshjob/impl/MeshJobManager_i.hxx | 2 +- .../meshjob/impl/SPADDERPluginTester_i.cxx | 2 +- .../meshjob/impl/SPADDERPluginTester_i.hxx | 2 +- src/Tools/padder/meshjob/impl/testhelper.hxx | 2 +- src/Tools/padder/resources/CMakeLists.txt | 2 +- .../resources/testdata/buildparticules.py | 2 +- src/Tools/padder/spadderpy/CMakeLists.txt | 2 +- src/Tools/padder/spadderpy/__init__.py | 2 +- src/Tools/padder/spadderpy/configreader.py | 2 +- src/Tools/padder/spadderpy/gui/CMakeLists.txt | 2 +- src/Tools/padder/spadderpy/gui/inputdata.py | 2 +- src/Tools/padder/spadderpy/gui/inputdialog.py | 2 +- .../padder/spadderpy/gui/plugindialog.py | 2 +- .../padder/spadderpy/plugin/CMakeLists.txt | 2 +- .../padder/spadderpy/plugin/envPlugins.sh.in | 2 +- .../padder/spadderpy/plugin/spadderPlugin.py | 2 +- src/Tools/padder/unittests/CMakeLists.txt | 2 +- src/Tools/padder/unittests/__init__.py | 2 +- src/Tools/padder/unittests/autotest.sh.in | 2 +- .../unittests/usecase_meshJobManager.py | 2 +- .../unittests/usecase_spadderPluginTester.py | 2 +- src/Tools/smesh_plugins.py | 2 +- 990 files changed, 1104 insertions(+), 1705 deletions(-) delete mode 100644 AUTHORS delete mode 100644 INSTALL delete mode 100644 LICENCE delete mode 100644 NEWS delete mode 100644 cvs-tags delete mode 100644 src/Tools/Verima/Doc/conf.py diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index e69de29bb..000000000 diff --git a/CMakeLists.txt b/CMakeLists.txt index 312c48e84..89369d158 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 0ea0b81cb..000000000 --- a/INSTALL +++ /dev/null @@ -1 +0,0 @@ -SALOME2 : SMESH module diff --git a/LICENCE b/LICENCE deleted file mode 100644 index b1e3f5a26..000000000 --- a/LICENCE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/NEWS b/NEWS deleted file mode 100644 index e69de29bb..000000000 diff --git a/README b/README index e69de29bb..78f5c9b6f 100644 --- a/README +++ b/README @@ -0,0 +1,119 @@ +***************** +About SALOME Mesh +***************** + +SALOME Mesh module implements the functionalities for: +- Creating meshes in different ways: + * By meshing geometrical models previously created or imported by the Geometry + component; + * Bottom-up, using mesh edition operations, especially extrusion and revolution; + * By generation of the 3D mesh from the 2D mesh (the latter can be either imported + or manually created). +- Importing and exporting meshes in various formats. +- Modifying meshes with a vast array of dedicated operations. +- Creating groups of mesh elements. +- Filtering mesh entities (nodes or elements) using Filters functionality for + creating groups and applying mesh modifications. +- Viewing meshes in the VTK viewer and getting info on mesh and its sub-objects. +- Applying to meshes Quality Controls, allowing to highlight important elements. +- Taking various measurements of the mesh objects. + +For more information please visit the SALOME platform web site: + + + +======= +License +======= + +SALOME platform is distributed under the GNU Lesser General Public License. +See COPYING file for more details. + +Also, additional information can be found at SALOME platform web site: + + + +============ +Installation +============ + +-------------- +Pre-requisites +-------------- + +SALOME platform relies on a set of third-party softwares; some of them are needed +at build time only, while other ones are needed in runtime also. + +For more information about the pre-requisites please visit SALOME platform web +site: + +* Check Release Notes and Software Requirements of the latest SALOME release at + + + +* Pre-requisites page at SALOME web site: + + + +Note: SALOME Mesh module needs SALOME KERNEL, SALOME GUI and SALOME Geometry as +pre-requisites. + +------------------ +Basic Installation +------------------ + +The build procedure of the SALOME platform is implemented with CMake. +In order to build the module you have to do the following actions: + +1. Set up environment for pre-requisites (see "Pre-requisites" section above). + +2. Create a build directory: + + % mkdir SMESH_BUILD + +3. Configure the build procedure: + + % cd SMESH_BUILD + % cmake -DCMAKE_BUILD_TYPE= -DCMAKE_INSTALL_PREFIX= + + where + - is either Release or Debug (default: Release); + - is a destination folder to install SALOME Mesh + module (default: /usr); + - is a path to the SALOME Mesh sources directory. + + Note: by default (if CMAKE_INSTALL_PREFIX option is not given), SALOME Mesh + module will be configured for installation to the /usr directory that requires + root permissions to complete the installation. + +4. Build and install: + + % make + % make install + + This will install SALOME Mesh module to the + specified to cmake command on the previous step. + +------------------- +Custom installation +------------------- + +SALOME Mesh module supports a set of advanced configuration options; +for more details learn CMakeLists.txt file in the root source directory. + +You can also use other options of cmake command to customize your installation. +Learn more about available options by typing + + % cmake --help + +============= +Documentation +============= + +The directory doc contains additional documentation file of SALOME Mesh module. + +=============== +Troubleshooting +=============== + +Please, send a mail to webmaster.salome@opencascade.com. diff --git a/SMESH_version.h.in b/SMESH_version.h.in index 79e9367d3..b12be09f3 100644 --- a/SMESH_version.h.in +++ b/SMESH_version.h.in @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/SalomeSMESHConfig.cmake.in b/SalomeSMESHConfig.cmake.in index 3ec182cbe..5b4233425 100644 --- a/SalomeSMESHConfig.cmake.in +++ b/SalomeSMESHConfig.cmake.in @@ -5,7 +5,7 @@ # ############################################################### -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/CMakeLists.txt b/adm_local/CMakeLists.txt index 3f181513f..4150922ef 100755 --- a/adm_local/CMakeLists.txt +++ b/adm_local/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index 9be31435b..e38f32ae0 100755 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/cmake_files/FindCGNS.cmake b/adm_local/cmake_files/FindCGNS.cmake index 94535f27e..a60b77637 100644 --- a/adm_local/cmake_files/FindCGNS.cmake +++ b/adm_local/cmake_files/FindCGNS.cmake @@ -5,7 +5,7 @@ # ######################################################################### -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/cmake_files/FindSMESH.cmake b/adm_local/cmake_files/FindSMESH.cmake index e05012824..9a4ba3c87 100644 --- a/adm_local/cmake_files/FindSMESH.cmake +++ b/adm_local/cmake_files/FindSMESH.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/cmake_files/FindSalomeCGNS.cmake b/adm_local/cmake_files/FindSalomeCGNS.cmake index a49239168..c3cf74565 100644 --- a/adm_local/cmake_files/FindSalomeCGNS.cmake +++ b/adm_local/cmake_files/FindSalomeCGNS.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/cmake_files/FindSalomeSMESH.cmake b/adm_local/cmake_files/FindSalomeSMESH.cmake index dc63bd2fa..da6fbd6ee 100644 --- a/adm_local/cmake_files/FindSalomeSMESH.cmake +++ b/adm_local/cmake_files/FindSalomeSMESH.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/cmake_files/FindSalomeTBB.cmake b/adm_local/cmake_files/FindSalomeTBB.cmake index 0fc8270ee..5934aa531 100644 --- a/adm_local/cmake_files/FindSalomeTBB.cmake +++ b/adm_local/cmake_files/FindSalomeTBB.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/cmake_files/FindSalomef2c.cmake b/adm_local/cmake_files/FindSalomef2c.cmake index 4deefa22e..08f824b1c 100755 --- a/adm_local/cmake_files/FindSalomef2c.cmake +++ b/adm_local/cmake_files/FindSalomef2c.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/cmake_files/FindTBB.cmake b/adm_local/cmake_files/FindTBB.cmake index a1592539f..0f4077fa7 100644 --- a/adm_local/cmake_files/FindTBB.cmake +++ b/adm_local/cmake_files/FindTBB.cmake @@ -5,7 +5,7 @@ # ######################################################################### -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/cmake_files/Findf2c.cmake b/adm_local/cmake_files/Findf2c.cmake index 8510af1c7..08a131cda 100755 --- a/adm_local/cmake_files/Findf2c.cmake +++ b/adm_local/cmake_files/Findf2c.cmake @@ -6,7 +6,7 @@ # ######################################################################### -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/CMakeLists.txt b/adm_local/unix/CMakeLists.txt index 0e7521931..b27faef5b 100755 --- a/adm_local/unix/CMakeLists.txt +++ b/adm_local/unix/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/unix/config_files/CMakeLists.txt b/adm_local/unix/config_files/CMakeLists.txt index 28926ce57..8d31a490e 100755 --- a/adm_local/unix/config_files/CMakeLists.txt +++ b/adm_local/unix/config_files/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/check_Platform.m4 b/adm_local/unix/config_files/check_Platform.m4 index 37cb27288..6a6fd4ca8 100755 --- a/adm_local/unix/config_files/check_Platform.m4 +++ b/adm_local/unix/config_files/check_Platform.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE dnl dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/check_SMESH.m4 b/adm_local/unix/config_files/check_SMESH.m4 index 189e12c85..bd2cb2208 100644 --- a/adm_local/unix/config_files/check_SMESH.m4 +++ b/adm_local/unix/config_files/check_SMESH.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE dnl dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/check_cgal.m4 b/adm_local/unix/config_files/check_cgal.m4 index 3f5d6b0eb..780f24bc2 100644 --- a/adm_local/unix/config_files/check_cgal.m4 +++ b/adm_local/unix/config_files/check_cgal.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE dnl dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/check_cgns.m4 b/adm_local/unix/config_files/check_cgns.m4 index 27d5741bc..3dfd6cf53 100644 --- a/adm_local/unix/config_files/check_cgns.m4 +++ b/adm_local/unix/config_files/check_cgns.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE dnl dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/check_f77.m4 b/adm_local/unix/config_files/check_f77.m4 index 9c74dee19..7c0906ead 100644 --- a/adm_local/unix/config_files/check_f77.m4 +++ b/adm_local/unix/config_files/check_f77.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE dnl dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/check_padder.m4 b/adm_local/unix/config_files/check_padder.m4 index 5c65463f2..f4a9fdc78 100644 --- a/adm_local/unix/config_files/check_padder.m4 +++ b/adm_local/unix/config_files/check_padder.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE dnl dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/check_qwt.m4 b/adm_local/unix/config_files/check_qwt.m4 index 43595035b..8c0fe5f73 100644 --- a/adm_local/unix/config_files/check_qwt.m4 +++ b/adm_local/unix/config_files/check_qwt.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE dnl dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index 1b651f73d..a60ce61e1 100755 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/bin/smesh_setenv.py b/bin/smesh_setenv.py index bdb3afd23..8c888cb9e 100644 --- a/bin/smesh_setenv.py +++ b/bin/smesh_setenv.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/cvs-tags b/cvs-tags deleted file mode 100644 index 6991d061f..000000000 --- a/cvs-tags +++ /dev/null @@ -1,35 +0,0 @@ -Start-v1_1a: ? - ? - -V1_2_1: ? - ? - -V1_2_2: 2003-09-26 17:00 - New data structure in SMDS. - -nadir_1_2_2: 2003-10-06 12:50 - Branch after V1_2_2. Developpement branch for user nadir - -merge_1_2_c__1_2_2: 2003-10-17 14:35 - Branch after V1_2_2. Branch to merge Salome 1.2c. Initiated by Paul Rascle. - -MergeV1_2c-1: 2003-10-19 13:49 - End of merge_1_2_c__1_2_2 branch. This branch is ready to be merge with the head. - -V1_3_0b1: 2003-11-12 - First pre-release of 1.3.0. Include the merge of 1.2c branch. - -nadir_update_MED_v1_3_0: 2003-11-17 10:22 - New branch for user nadir. Synchronization of API with MED 1.3. - -V1_3_0b2: 2003-11-18 - Second pre-release of 1.3.0. Synchronization of API with MED 1.3. - -V1_3_0: 2003-11-25 08:52 - Release 1.3.0. - -V1_3_1: 2004-01-05 14:28 - Release 1.3.1. Added Netgen. - -merge_1_2_d: 2003-01-20 11:25 - Branch to merge Release 1.2d of Salome Pro. diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 8bfe7cab7..beddf10e4 100755 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/doc/salome/CMakeLists.txt b/doc/salome/CMakeLists.txt index 1ccad11e2..88fb17859 100755 --- a/doc/salome/CMakeLists.txt +++ b/doc/salome/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 65d8e52e2..942c3b023 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/doc/salome/examples/CTestTestfileInstall.cmake b/doc/salome/examples/CTestTestfileInstall.cmake index ef512ff06..d56f42065 100644 --- a/doc/salome/examples/CTestTestfileInstall.cmake +++ b/doc/salome/examples/CTestTestfileInstall.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2015 CEA/DEN, EDF R&D +# Copyright (C) 2015-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/doc/salome/examples/testme.py b/doc/salome/examples/testme.py index cd74c4495..6a502d00d 100755 --- a/doc/salome/examples/testme.py +++ b/doc/salome/examples/testme.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt index 1a8d6cf4d..07de864c8 100755 --- a/doc/salome/gui/CMakeLists.txt +++ b/doc/salome/gui/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/doc/salome/gui/SMESH/CMakeLists.txt b/doc/salome/gui/SMESH/CMakeLists.txt index a221bbfe8..1dfd05b52 100644 --- a/doc/salome/gui/SMESH/CMakeLists.txt +++ b/doc/salome/gui/SMESH/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/doc/salome/gui/SMESH/collect_mesh_methods.py b/doc/salome/gui/SMESH/collect_mesh_methods.py index 0d55a3c74..7aa83b084 100755 --- a/doc/salome/gui/SMESH/collect_mesh_methods.py +++ b/doc/salome/gui/SMESH/collect_mesh_methods.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: iso-8859-1 -*- -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/doc/salome/gui/SMESH/doxyfile.in b/doc/salome/gui/SMESH/doxyfile.in index 03d6398e0..6374b61b9 100755 --- a/doc/salome/gui/SMESH/doxyfile.in +++ b/doc/salome/gui/SMESH/doxyfile.in @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/doc/salome/gui/SMESH/doxyfile_py.in b/doc/salome/gui/SMESH/doxyfile_py.in index 6cb04289b..d48007ab2 100755 --- a/doc/salome/gui/SMESH/doxyfile_py.in +++ b/doc/salome/gui/SMESH/doxyfile_py.in @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/doc/salome/gui/SMESH/static/footer.html b/doc/salome/gui/SMESH/static/footer.html index affd43d84..91afd6cc8 100755 --- a/doc/salome/gui/SMESH/static/footer.html +++ b/doc/salome/gui/SMESH/static/footer.html @@ -4,7 +4,7 @@
      $navpath
    diff --git a/doc/salome/tui/CMakeLists.txt b/doc/salome/tui/CMakeLists.txt index 6112e4024..c24a1eaeb 100755 --- a/doc/salome/tui/CMakeLists.txt +++ b/doc/salome/tui/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/doc/salome/tui/doxyfile.in b/doc/salome/tui/doxyfile.in index 3b002f990..654668715 100755 --- a/doc/salome/tui/doxyfile.in +++ b/doc/salome/tui/doxyfile.in @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/doc/salome/tui/static/footer.html b/doc/salome/tui/static/footer.html index affd43d84..91afd6cc8 100755 --- a/doc/salome/tui/static/footer.html +++ b/doc/salome/tui/static/footer.html @@ -4,7 +4,7 @@
      $navpath
    diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 92bfcc47e..4122cf306 100755 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/idl/SMESH_BasicHypothesis.idl b/idl/SMESH_BasicHypothesis.idl index 62e4ed488..a6a0fef9f 100644 --- a/idl/SMESH_BasicHypothesis.idl +++ b/idl/SMESH_BasicHypothesis.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_Filter.idl b/idl/SMESH_Filter.idl index 738aa325e..7625bba24 100644 --- a/idl/SMESH_Filter.idl +++ b/idl/SMESH_Filter.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl index ec43ae714..75fbe0894 100644 --- a/idl/SMESH_Gen.idl +++ b/idl/SMESH_Gen.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_Group.idl b/idl/SMESH_Group.idl index bdc3d6312..e5e533d18 100644 --- a/idl/SMESH_Group.idl +++ b/idl/SMESH_Group.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_Hypothesis.idl b/idl/SMESH_Hypothesis.idl index ab6e7dd43..397079a96 100644 --- a/idl/SMESH_Hypothesis.idl +++ b/idl/SMESH_Hypothesis.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_Measurements.idl b/idl/SMESH_Measurements.idl index 2da555d91..cb6d68acf 100644 --- a/idl/SMESH_Measurements.idl +++ b/idl/SMESH_Measurements.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index 9ede0252f..51c98282c 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_MeshEditor.idl b/idl/SMESH_MeshEditor.idl index b28fb1432..28bc6f912 100644 --- a/idl/SMESH_MeshEditor.idl +++ b/idl/SMESH_MeshEditor.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/idl/SMESH_Pattern.idl b/idl/SMESH_Pattern.idl index 8799f2739..4e3b37f40 100644 --- a/idl/SMESH_Pattern.idl +++ b/idl/SMESH_Pattern.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 66f426f00..9975b95b2 100755 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/resources/SMESHCatalog.xml.in b/resources/SMESHCatalog.xml.in index 429d96009..a1d573d7f 100644 --- a/resources/SMESHCatalog.xml.in +++ b/resources/SMESHCatalog.xml.in @@ -1,6 +1,6 @@ tetrahedron - if (nbRepl == 3 && - iRepl[ 0 ] > 2 && iRepl[ 1 ] > 2 && iRepl[ 2 ] > 2 ) { - // all top nodes stick: reverse a bottom - uniqueNodes[ 0 ] = curNodes [ 1 ]; - uniqueNodes[ 1 ] = curNodes [ 0 ]; + if ( curNodes[3] == curNodes[4] && + curNodes[3] == curNodes[5] ) { + // top nodes stick + isOk = true; } - else if (nbRepl == 3 && - iRepl[ 0 ] < 3 && iRepl[ 1 ] < 3 && iRepl[ 2 ] < 3 ) { - // all bottom nodes stick: set a top before + else if ( curNodes[0] == curNodes[1] && + curNodes[0] == curNodes[2] ) { + // bottom nodes stick: set a top before uniqueNodes[ 3 ] = uniqueNodes [ 0 ]; - uniqueNodes[ 0 ] = curNodes [ 3 ]; + uniqueNodes[ 0 ] = curNodes [ 5 ]; uniqueNodes[ 1 ] = curNodes [ 4 ]; - uniqueNodes[ 2 ] = curNodes [ 5 ]; + uniqueNodes[ 2 ] = curNodes [ 3 ]; + isOk = true; } - else if (nbRepl == 4 && - iRepl[ 2 ] - iRepl [ 0 ] == 3 && iRepl[ 3 ] - iRepl [ 1 ] == 3 ) { - // a lateral face turns into a line: reverse a bottom - uniqueNodes[ 0 ] = curNodes [ 1 ]; - uniqueNodes[ 1 ] = curNodes [ 0 ]; + else if (( curNodes[0] == curNodes[3] ) + + ( curNodes[1] == curNodes[4] ) + + ( curNodes[2] == curNodes[5] ) == 2 ) { + // a lateral face turns into a line + isOk = true; } - else - isOk = false; } else if ( nbUniqueNodes == 5 ) { - // PENTAHEDRON --------------------> 2 tetrahedrons - if ( nbRepl == 2 && iRepl[ 1 ] - iRepl [ 0 ] == 3 ) { - // a bottom node sticks with a linked top one - // 1. - SMDS_MeshElement* newElem = - aMesh->AddVolume(curNodes[ 3 ], - curNodes[ 4 ], - curNodes[ 5 ], - curNodes[ iRepl[ 0 ] == 2 ? 1 : 2 ]); - myLastCreatedElems.Append(newElem); - if ( aShapeId ) - aMesh->SetMeshElementOnShape( newElem, aShapeId ); - // 2. : reverse a bottom - uniqueNodes[ 0 ] = curNodes [ 1 ]; - uniqueNodes[ 1 ] = curNodes [ 0 ]; - nbUniqueNodes = 4; + // PENTAHEDRON --------------------> pyramid + if ( curNodes[0] == curNodes[3] ) + { + uniqueNodes[ 0 ] = curNodes[ 1 ]; + uniqueNodes[ 1 ] = curNodes[ 4 ]; + uniqueNodes[ 2 ] = curNodes[ 5 ]; + uniqueNodes[ 3 ] = curNodes[ 2 ]; + uniqueNodes[ 4 ] = curNodes[ 0 ]; + isOk = true; + } + if ( curNodes[1] == curNodes[4] ) + { + uniqueNodes[ 0 ] = curNodes[ 0 ]; + uniqueNodes[ 1 ] = curNodes[ 2 ]; + uniqueNodes[ 2 ] = curNodes[ 5 ]; + uniqueNodes[ 3 ] = curNodes[ 3 ]; + uniqueNodes[ 4 ] = curNodes[ 1 ]; + isOk = true; + } + if ( curNodes[2] == curNodes[5] ) + { + uniqueNodes[ 0 ] = curNodes[ 0 ]; + uniqueNodes[ 1 ] = curNodes[ 3 ]; + uniqueNodes[ 2 ] = curNodes[ 4 ]; + uniqueNodes[ 3 ] = curNodes[ 1 ]; + uniqueNodes[ 4 ] = curNodes[ 2 ]; + isOk = true; } - else - isOk = false; } - else - isOk = false; break; - case 8: { - if(elem->IsQuadratic()) { // Quadratic quadrangle - // 1 5 2 - // +---+---+ - // | | - // | | - // 4+ +6 - // | | - // | | - // +---+---+ - // 0 7 3 - isOk = false; - if(nbRepl==2) { - MESSAGE("nbRepl=2: " << iRepl[0] << " " << iRepl[1]); - } - if(nbRepl==3) { - MESSAGE("nbRepl=3: " << iRepl[0] << " " << iRepl[1] << " " << iRepl[2]); - nbUniqueNodes = 6; - if( iRepl[0]==0 && iRepl[1]==1 && iRepl[2]==4 ) { - uniqueNodes[0] = curNodes[0]; - uniqueNodes[1] = curNodes[2]; - uniqueNodes[2] = curNodes[3]; - uniqueNodes[3] = curNodes[5]; - uniqueNodes[4] = curNodes[6]; - uniqueNodes[5] = curNodes[7]; - isOk = true; - } - if( iRepl[0]==0 && iRepl[1]==3 && iRepl[2]==7 ) { - uniqueNodes[0] = curNodes[0]; - uniqueNodes[1] = curNodes[1]; - uniqueNodes[2] = curNodes[2]; - uniqueNodes[3] = curNodes[4]; - uniqueNodes[4] = curNodes[5]; - uniqueNodes[5] = curNodes[6]; - isOk = true; - } - if( iRepl[0]==0 && iRepl[1]==4 && iRepl[2]==7 ) { - uniqueNodes[0] = curNodes[1]; - uniqueNodes[1] = curNodes[2]; - uniqueNodes[2] = curNodes[3]; - uniqueNodes[3] = curNodes[5]; - uniqueNodes[4] = curNodes[6]; - uniqueNodes[5] = curNodes[0]; - isOk = true; - } - if( iRepl[0]==1 && iRepl[1]==2 && iRepl[2]==5 ) { - uniqueNodes[0] = curNodes[0]; - uniqueNodes[1] = curNodes[1]; - uniqueNodes[2] = curNodes[3]; - uniqueNodes[3] = curNodes[4]; - uniqueNodes[4] = curNodes[6]; - uniqueNodes[5] = curNodes[7]; - isOk = true; - } - if( iRepl[0]==1 && iRepl[1]==4 && iRepl[2]==5 ) { - uniqueNodes[0] = curNodes[0]; - uniqueNodes[1] = curNodes[2]; - uniqueNodes[2] = curNodes[3]; - uniqueNodes[3] = curNodes[1]; - uniqueNodes[4] = curNodes[6]; - uniqueNodes[5] = curNodes[7]; - isOk = true; - } - if( iRepl[0]==2 && iRepl[1]==3 && iRepl[2]==6 ) { - uniqueNodes[0] = curNodes[0]; - uniqueNodes[1] = curNodes[1]; - uniqueNodes[2] = curNodes[2]; - uniqueNodes[3] = curNodes[4]; - uniqueNodes[4] = curNodes[5]; - uniqueNodes[5] = curNodes[7]; - isOk = true; - } - if( iRepl[0]==2 && iRepl[1]==5 && iRepl[2]==6 ) { - uniqueNodes[0] = curNodes[0]; - uniqueNodes[1] = curNodes[1]; - uniqueNodes[2] = curNodes[3]; - uniqueNodes[3] = curNodes[4]; - uniqueNodes[4] = curNodes[2]; - uniqueNodes[5] = curNodes[7]; - isOk = true; - } - if( iRepl[0]==3 && iRepl[1]==6 && iRepl[2]==7 ) { - uniqueNodes[0] = curNodes[0]; - uniqueNodes[1] = curNodes[1]; - uniqueNodes[2] = curNodes[2]; - uniqueNodes[3] = curNodes[4]; - uniqueNodes[4] = curNodes[5]; - uniqueNodes[5] = curNodes[3]; - isOk = true; - } - } - if(nbRepl==4) { - MESSAGE("nbRepl=4: " << iRepl[0] << " " << iRepl[1] << " " << iRepl[2] << " " << iRepl[3]); - } - if(nbRepl==5) { - MESSAGE("nbRepl=5: " << iRepl[0] << " " << iRepl[1] << " " << iRepl[2] << " " << iRepl[3] << " " << iRepl[4]); - } - break; - } + } + case SMDSEntity_Hexa: + { //////////////////////////////////// HEXAHEDRON isOk = false; SMDS_VolumeTool hexa (elem); hexa.SetExternalNormal(); if ( nbUniqueNodes == 4 && nbRepl == 4 ) { - //////////////////////// HEX ---> 1 tetrahedron + //////////////////////// HEX ---> tetrahedron for ( int iFace = 0; iFace < 6; iFace++ ) { const int *ind = hexa.GetFaceNodesIndices( iFace ); // indices of face nodes if (curNodes[ind[ 0 ]] == curNodes[ind[ 1 ]] && curNodes[ind[ 0 ]] == curNodes[ind[ 2 ]] && curNodes[ind[ 0 ]] == curNodes[ind[ 3 ]] ) { // one face turns into a point ... + int pickInd = ind[ 0 ]; int iOppFace = hexa.GetOppFaceIndex( iFace ); ind = hexa.GetFaceNodesIndices( iOppFace ); int nbStick = 0; + uniqueNodes.clear(); for ( iCur = 0; iCur < 4 && nbStick < 2; iCur++ ) { if ( curNodes[ind[ iCur ]] == curNodes[ind[ iCur + 1 ]] ) nbStick++; + else + uniqueNodes.push_back( curNodes[ind[ iCur ]]); } if ( nbStick == 1 ) { // ... and the opposite one - into a triangle. // set a top node - ind = hexa.GetFaceNodesIndices( iFace ); - uniqueNodes[ 3 ] = curNodes[ind[ 0 ]]; + uniqueNodes.push_back( curNodes[ pickInd ]); isOk = true; } break; @@ -7697,7 +7633,7 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) } } else if ( nbUniqueNodes == 6 && nbRepl == 2 ) { - //////////////////////// HEX ---> 1 prism + //////////////////////// HEX ---> prism int nbTria = 0, iTria[3]; const int *ind; // indices of face nodes // look for triangular faces @@ -7712,7 +7648,6 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) // check if triangles are opposite if ( nbTria == 2 && iTria[0] == hexa.GetOppFaceIndex( iTria[1] )) { - isOk = true; // set nodes of the bottom triangle ind = hexa.GetFaceNodesIndices( iTria[ 0 ]); vector indB; @@ -7732,11 +7667,12 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) uniqueNodes[ iCur + 3 ] = curNodes[ indT[ j ]]; break; } + isOk = true; + break; } - break; } - else if (nbUniqueNodes == 5 && nbRepl == 4 ) { - //////////////////// HEXAHEDRON ---> 2 tetrahedrons + else if (nbUniqueNodes == 5 && nbRepl == 3 ) { + //////////////////// HEXAHEDRON ---> pyramid for ( int iFace = 0; iFace < 6; iFace++ ) { const int *ind = hexa.GetFaceNodesIndices( iFace ); // indices of face nodes if (curNodes[ind[ 0 ]] == curNodes[ind[ 1 ]] && @@ -7745,139 +7681,61 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) // one face turns into a point ... int iOppFace = hexa.GetOppFaceIndex( iFace ); ind = hexa.GetFaceNodesIndices( iOppFace ); - int nbStick = 0; - iUnique = 2; // reverse a tetrahedron 1 bottom - for ( iCur = 0; iCur < 4 && nbStick == 0; iCur++ ) { + uniqueNodes.clear(); + for ( iCur = 0; iCur < 4; iCur++ ) { if ( curNodes[ind[ iCur ]] == curNodes[ind[ iCur + 1 ]] ) - nbStick++; - else if ( iUnique >= 0 ) - uniqueNodes[ iUnique-- ] = curNodes[ind[ iCur ]]; + break; + else + uniqueNodes.push_back( curNodes[ind[ iCur ]]); } - if ( nbStick == 0 ) { + if ( uniqueNodes.size() == 4 ) { // ... and the opposite one is a quadrangle // set a top node const int* indTop = hexa.GetFaceNodesIndices( iFace ); - uniqueNodes[ 3 ] = curNodes[indTop[ 0 ]]; - nbUniqueNodes = 4; - // tetrahedron 2 - SMDS_MeshElement* newElem = - aMesh->AddVolume(curNodes[ind[ 0 ]], - curNodes[ind[ 3 ]], - curNodes[ind[ 2 ]], - curNodes[indTop[ 0 ]]); - myLastCreatedElems.Append(newElem); - if ( aShapeId ) - aMesh->SetMeshElementOnShape( newElem, aShapeId ); + uniqueNodes.push_back( curNodes[indTop[ 0 ]]); isOk = true; } break; } } } - else if ( nbUniqueNodes == 6 && nbRepl == 4 ) { - ////////////////// HEXAHEDRON ---> 2 tetrahedrons or 1 prism - // find indices of quad and tri faces - int iQuadFace[ 6 ], iTriFace[ 6 ], nbQuad = 0, nbTri = 0, iFace; - for ( iFace = 0; iFace < 6; iFace++ ) { + + if ( !isOk && nbUniqueNodes > 4 ) { + ////////////////// HEXAHEDRON ---> polyhedron + hexa.SetExternalNormal(); + vector poly_nodes; poly_nodes.reserve( 6 * 4 ); + vector quantities; quantities.reserve( 6 ); + for ( int iFace = 0; iFace < 6; iFace++ ) + { const int *ind = hexa.GetFaceNodesIndices( iFace ); // indices of face nodes + if ( curNodes[ind[0]] == curNodes[ind[2]] || + curNodes[ind[1]] == curNodes[ind[3]] ) + { + quantities.clear(); + break; // opposite nodes stick + } nodeSet.clear(); for ( iCur = 0; iCur < 4; iCur++ ) - nodeSet.insert( curNodes[ind[ iCur ]] ); - nbUniqueNodes = nodeSet.size(); - if ( nbUniqueNodes == 3 ) - iTriFace[ nbTri++ ] = iFace; - else if ( nbUniqueNodes == 4 ) - iQuadFace[ nbQuad++ ] = iFace; + { + if ( nodeSet.insert( curNodes[ind[ iCur ]] ).second ) + poly_nodes.push_back( curNodes[ind[ iCur ]]); + } + if ( nodeSet.size() < 3 ) + poly_nodes.resize( poly_nodes.size() - nodeSet.size() ); + else + quantities.push_back( nodeSet.size() ); } - if (nbQuad == 2 && nbTri == 4 && - hexa.GetOppFaceIndex( iQuadFace[ 0 ] ) == iQuadFace[ 1 ]) { - // 2 opposite quadrangles stuck with a diagonal; - // sample groups of merged indices: (0-4)(2-6) - // --------------------------------------------> 2 tetrahedrons - const int *ind1 = hexa.GetFaceNodesIndices( iQuadFace[ 0 ]); // indices of quad1 nodes - const int *ind2 = hexa.GetFaceNodesIndices( iQuadFace[ 1 ]); - int i0, i1d, i2, i3d, i0t, i2t; // d-daigonal, t-top - if (curNodes[ind1[ 0 ]] == curNodes[ind2[ 0 ]] && - curNodes[ind1[ 2 ]] == curNodes[ind2[ 2 ]]) { - // stuck with 0-2 diagonal - i0 = ind1[ 3 ]; - i1d = ind1[ 0 ]; - i2 = ind1[ 1 ]; - i3d = ind1[ 2 ]; - i0t = ind2[ 1 ]; - i2t = ind2[ 3 ]; - } - else if (curNodes[ind1[ 1 ]] == curNodes[ind2[ 3 ]] && - curNodes[ind1[ 3 ]] == curNodes[ind2[ 1 ]]) { - // stuck with 1-3 diagonal - i0 = ind1[ 0 ]; - i1d = ind1[ 1 ]; - i2 = ind1[ 2 ]; - i3d = ind1[ 3 ]; - i0t = ind2[ 0 ]; - i2t = ind2[ 1 ]; - } - else { - ASSERT(0); - } - // tetrahedron 1 - uniqueNodes[ 0 ] = curNodes [ i0 ]; - uniqueNodes[ 1 ] = curNodes [ i1d ]; - uniqueNodes[ 2 ] = curNodes [ i3d ]; - uniqueNodes[ 3 ] = curNodes [ i0t ]; - nbUniqueNodes = 4; - // tetrahedron 2 - SMDS_MeshElement* newElem = aMesh->AddVolume(curNodes[ i1d ], - curNodes[ i2 ], - curNodes[ i3d ], - curNodes[ i2t ]); - myLastCreatedElems.Append(newElem); - if ( aShapeId ) + if ( quantities.size() >= 4 ) + { + const SMDS_MeshElement* newElem = aMesh->AddPolyhedralVolume( poly_nodes, quantities ); + myLastCreatedElems.Append( newElem ); + if ( aShapeId && newElem ) aMesh->SetMeshElementOnShape( newElem, aShapeId ); - isOk = true; + rmElemIds.push_back( elem->GetID() ); } - else if (( nbTri == 2 && nbQuad == 3 ) || // merged (0-4)(1-5) - ( nbTri == 4 && nbQuad == 2 )) { // merged (7-4)(1-5) - // --------------------------------------------> prism - // find 2 opposite triangles - nbUniqueNodes = 6; - for ( iFace = 0; iFace + 1 < nbTri; iFace++ ) { - if ( hexa.GetOppFaceIndex( iTriFace[ iFace ] ) == iTriFace[ iFace + 1 ]) { - // find indices of kept and replaced nodes - // and fill unique nodes of 2 opposite triangles - const int *ind1 = hexa.GetFaceNodesIndices( iTriFace[ iFace ]); - const int *ind2 = hexa.GetFaceNodesIndices( iTriFace[ iFace + 1 ]); - const SMDS_MeshNode** hexanodes = hexa.GetNodes(); - // fill unique nodes - iUnique = 0; - isOk = true; - for ( iCur = 0; iCur < 4 && isOk; iCur++ ) { - const SMDS_MeshNode* n = curNodes[ind1[ iCur ]]; - const SMDS_MeshNode* nInit = hexanodes[ind1[ iCur ]]; - if ( n == nInit ) { - // iCur of a linked node of the opposite face (make normals co-directed): - int iCurOpp = ( iCur == 1 || iCur == 3 ) ? 4 - iCur : iCur; - // check that correspondent corners of triangles are linked - if ( !hexa.IsLinked( ind1[ iCur ], ind2[ iCurOpp ] )) - isOk = false; - else { - uniqueNodes[ iUnique ] = n; - uniqueNodes[ iUnique + 3 ] = curNodes[ind2[ iCurOpp ]]; - iUnique++; - } - } - } - break; - } - } - } - } // if ( nbUniqueNodes == 6 && nbRepl == 4 ) - else - { - MESSAGE("MergeNodes() removes hexahedron "<< elem); } break; - } // HEXAHEDRON + } // case HEXAHEDRON default: isOk = false; @@ -7885,7 +7743,7 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) } // if ( nbNodes != nbUniqueNodes ) // some nodes stick - if ( isOk ) // the non-poly elem remains valid after sticking nodes + if ( isOk ) // a non-poly elem remains valid after sticking nodes { if ( nbNodes != nbUniqueNodes || !aMesh->ChangeElementNodes( elem, & curNodes[0], nbNodes ))