From 18e7b9c7521fc13f643973ea953b08bdbf6dfbda Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 4 Sep 2015 16:55:55 +0300 Subject: [PATCH] IPAL52860: Free Edges control mis-location and mis-visibility IPAL19098: Confusing "Precision" of "Average Length" implemented for NPAL17873 --- doc/salome/gui/SMESH/images/free_borders1.png | Bin 5648 -> 1830 bytes .../gui/SMESH/input/1d_meshing_hypo.doc | 17 +++++++++------ .../SMESH/input/about_quality_controls.doc | 2 +- doc/salome/gui/SMESH/input/free_borders.doc | 10 +++++---- doc/salome/gui/SMESH/input/free_edges.doc | 2 +- .../SMESH/input/selection_filter_library.doc | 20 ++++++++++-------- src/Controls/SMESH_Controls.cxx | 19 ++++------------- src/SMESHGUI/SMESHGUI.cxx | 15 +++++++------ src/StdMeshers/StdMeshers_Adaptive1D.cxx | 5 +++-- src/StdMeshers/StdMeshers_Penta_3D.cxx | 2 +- src/StdMeshers/StdMeshers_Quadrangle_2D.cxx | 6 ++++-- .../StdMeshers_RadialQuadrangle_1D2D.cxx | 3 +-- 12 files changed, 51 insertions(+), 50 deletions(-) mode change 100755 => 100644 doc/salome/gui/SMESH/images/free_borders1.png diff --git a/doc/salome/gui/SMESH/images/free_borders1.png b/doc/salome/gui/SMESH/images/free_borders1.png old mode 100755 new mode 100644 index 6e73c93291d6775cc2cb50940c55311723a46230..871beba86c569a21274533a7be32a08b11f848ef GIT binary patch literal 1830 zcmZ{ldr;Ep8pkp7l1pkD9W?WTA=uB{6!U~=qN1r4k!vVvSqeXI-Mkc*dC90%)YcL* zQg-o@bvDG*TGUF%3vME6ikX^e)@H6Z)}uv$xaZfLKhKzD;+LiycGu19|`Kd>vxOsypSlXd?M-v}{bk!DE z`&&5)^8G(c!2eUbF*WA?o2*hr=H!o7_8^1YZIiAUEVkPY_MD^D$#Eh>I(-$(OVDv^h$2K24;`5E(h5GgyMXo%PnCB)nQj@Elb%U$?spod})r~Um z{;L!L$MTw$e2V0oduO?VmB8>H&u%|08Js&&M%f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fc!D^R>O7$Q? z<9Ob&k4QOqX`}tm@i%4;aBf1>zqKZ+z7qkjrkX1*wgnFt;9lemI5wSxB&HN%^WC*l zfD2iSnfBvfW2SGPXd6_<*~0P-obuembJd;H%RN37A@T%EfDnuwV>}GX_!NK8qUPkZ zyU=0H%E{N{UN*mr;@7@~F`xP`{ORO^$QY=>wABdQBLZ^kLzl0PW^?%%XF_E}k=SZi z2Z5|Q;&6j3v-?7Iy6(`Gq+W3h+6WA`qS_JTN(vo6h>c;`kBpu8rO0qBN)haHM z_C{v_r!MJ3e@jA9cWb;2Z0~otW@OLj8tlec-GY1^(a+1Ym8~x4PzbJk*aJetO7%Rf zXcsdNL^%b|H))+u+d2k#UkCzR^l=(!hn~3OD|qI9O-c;Rp!DgR0hAQAlmBqGlh}w3!b~bT9+ZQzSB8%;6Kp#As1w=W zh>pOJe$~%$U&Aug)n8L~$DK7remK^|5x@FKr-2I2Z3WZYBkNZJO4qOQYORoKQpVs$ zLpZ1hZGMwMS!$1T9L}{WUrv5Q5}?AlH}_DCXOorEZVHz=K3B;fr^Wl`jBC6ch9*Pz!5IOhzuZnI<;EddQ#EjrwW43E>D zC*JO@*{9c)ECXNnP%}r9fFVR^(o?OT?!q^Lwc9x`*(1?nmTf*I61N9PK|mk#8`?(O4Xo?e8IZt zy`-=J9|WZx+&>N-A-diK!-#TJtG%{ZmL&8$EwvdG!Mg&aiL6(mJo@zGPJG1$Evr=Q zfi8iYs9*o+`5|?fwl!|%p+m&~sdfI=}F z)ZcWnUWt~O-?Mt%!GkwaHnN5{Kp&f*=d9C&0JhP$TnCd|KCkf-BsMWS97So%n}j8! z1M5Iui*)@3%`X<;3~bS4uGIY$$u_a9Mc7S=B4F90L2=ft+#4m=iI5+H_$^y9Akd9w z&sW4}gR)%0jA&yQcZU~fUAk{w!}}cdw*`U^`!lEegU;;>UobG>h`(Lffnumber of segments, +calculated by dividing the edge length by the specified \b length of +segment, to the higher integer if the \a remainder exceeds the \b precision +and to the lower integer otherwise.
+Use value 0.5 to provide rounding to the nearest integer, 1.0 for the lower integer, 0.0 for the higher integer. Default value is 1e-07. + +For example: if edge length is 10.0 and the segment \b length +is 3.0 then their division gives 10./3. = 3.33(3) and the \a remainder is 0.33(3). +If \b precision is less than 0.33(3) then the edge is divided into 3 segments. +If \b precision is more than 0.33(3) then the edge is divided into 4 segments. + \image html image41.gif diff --git a/doc/salome/gui/SMESH/input/about_quality_controls.doc b/doc/salome/gui/SMESH/input/about_quality_controls.doc index 1e170e440..9dbb5c992 100644 --- a/doc/salome/gui/SMESH/input/about_quality_controls.doc +++ b/doc/salome/gui/SMESH/input/about_quality_controls.doc @@ -24,7 +24,6 @@ Node quality controls: Edge quality controls:
    -
  • \subpage free_edges_page "Free edges"
  • \subpage free_borders_page "Free borders"
  • \subpage length_page "Length"
  • \subpage borders_at_multi_connection_page "Borders at multi-connection"
  • @@ -33,6 +32,7 @@ Edge quality controls: Face quality controls:
      +
    • \subpage free_edges_page "Free edges"
    • \subpage free_faces_page "Free faces"
    • \subpage bare_border_faces_page "Bare border faces"
    • \subpage over_constrained_faces_page "Over-constrained faces"
    • diff --git a/doc/salome/gui/SMESH/input/free_borders.doc b/doc/salome/gui/SMESH/input/free_borders.doc index 86e5e2a37..3a8497c30 100644 --- a/doc/salome/gui/SMESH/input/free_borders.doc +++ b/doc/salome/gui/SMESH/input/free_borders.doc @@ -2,14 +2,16 @@ \page free_borders_page Free borders -\n This mesh quality control highlights borders of faces consisting of -1D elements (segments) belonging to one face only. +\n This mesh quality control highlights 1D elements (segments) +belonging to one element (face or volume) only. \image html free_borders1.png -In this picture the free borders are displayed in white. +In this picture the free borders are displayed in red. (Faces are +explicitly shown via Display Entity menu as all elements but +segments are hidden upon this control activation).
      See Also a sample TUI Script of a \ref tui_free_borders "Free Borders quality control" operation. -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/SMESH/input/free_edges.doc b/doc/salome/gui/SMESH/input/free_edges.doc index 1a5720ee2..2e9d4a6ec 100644 --- a/doc/salome/gui/SMESH/input/free_edges.doc +++ b/doc/salome/gui/SMESH/input/free_edges.doc @@ -3,7 +3,7 @@ \page free_edges_page Free edges \n This mesh quality control highlights borders of faces -consisting of node links belonging to one face only. +(links between nodes, not mesh segments) belonging to one face only. \image html free_edges.png
      In this picture some elements of mesh have been deleted and diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.doc b/doc/salome/gui/SMESH/input/selection_filter_library.doc index ed93878cb..6acd7e751 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.doc +++ b/doc/salome/gui/SMESH/input/selection_filter_library.doc @@ -2,9 +2,11 @@ \page selection_filter_library_page Selection filter library -\n Selection filter library is a powerful tool enabling to create -filters to be used on meshes. You can access to it from the Main Menu -via Tools / Selection filter library. +\n Selection filter library allows creating and storing in files +filters that can be later reused for operations on meshes. You can +access to 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. \image html selectionfilterlibrary.png @@ -20,7 +22,9 @@ filter. By default it is prefixed with the corresponding entity type. When we use filters during a group creation or another operation (by clicking Set Filter button in the corresponding dialog), the -menu for setting filters looks as shown below. +dialog for setting filters looks as shown below. + +\image html a-filteronfaces.png The \b Add button creates a new criterion at the end of the list of criteria. The \b Insert button creates a new criterion before the @@ -56,8 +60,6 @@ in the Library. is no selected mesh in the Object Browser and the filter can not be created. You have to select the mesh and the button will be enabled. -\image html a-filteronfaces.png - Some criteria are applicable to all Entity types:
      • Belong to Geom selects entities whose all nodes lie on the @@ -133,7 +135,7 @@ See also \ref tui_double_nodes_control "Double Nodes quality control". The following criteria allow selecting mesh Edges:
        • Free Borders selects free 1D mesh elements, i.e. edges belonging to -one face only. See also a +one element (face or volume) only. See also a \ref free_borders_page "Free Borders quality control".
        • Double edges selects 1D mesh elements basing on the same set of nodes. @@ -177,8 +179,8 @@ The following criteria allow selecting mesh Faces: \ref area_page "Area quality control"), which is more, less or equal (within a given Tolerance) to the predefined Threshold Value.
        • -Free edges selects 2D mesh elements consisting of edges belonging to -one element of mesh only. See also a +Free edges selects 2D mesh elements having at least one of its +edges not shared with other faces. See also a \ref free_edges_page "Free Edges quality control".
        • Free faces selects 2D mesh elements, which belong to less than two volumes. diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index c70528f27..65ff05b9b 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -135,8 +135,8 @@ namespace { int aResult0 = 0, aResult1 = 0; // last node, it is a medium one in a quadratic edge const SMDS_MeshNode* aLastNode = anEdge->GetNode( anEdge->NbNodes() - 1 ); - const SMDS_MeshNode* aNode0 = anEdge->GetNode( 0 ); - const SMDS_MeshNode* aNode1 = anEdge->GetNode( 1 ); + const SMDS_MeshNode* aNode0 = anEdge->GetNode( 0 ); + const SMDS_MeshNode* aNode1 = anEdge->GetNode( 1 ); if ( aNode1 == aLastNode ) aNode1 = 0; SMDS_ElemIteratorPtr anElemIter = aLastNode->GetInverseElementIterator(); @@ -2429,26 +2429,15 @@ bool FreeEdges::IsSatisfy( long theId ) if ( aFace == 0 || aFace->GetType() != SMDSAbs_Face || aFace->NbNodes() < 3 ) return false; - SMDS_ElemIteratorPtr anIter; - if ( aFace->IsQuadratic() ) { - anIter = dynamic_cast - (aFace)->interlacedNodesElemIterator(); - } - else { - anIter = aFace->nodesIterator(); - } + SMDS_NodeIteratorPtr anIter = aFace->interlacedNodesIterator(); if ( !anIter ) return false; int i = 0, nbNodes = aFace->NbNodes(); std::vector aNodes( nbNodes+1 ); while( anIter->more() ) - { - const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next(); - if ( aNode == 0 ) + if ( ! ( aNodes[ i++ ] = anIter->next() )) return false; - aNodes[ i++ ] = aNode; - } aNodes[ nbNodes ] = aNodes[ 0 ]; for ( i = 0; i < nbNodes; i++ ) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 6271fe857..4b0c895ed 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1677,7 +1677,7 @@ namespace if(!anIO.IsNull()){ _PTR(SObject) SO = aStudy->FindObjectID( It.Value()->getEntry() ); if ( SO ) { - CORBA::Object_var aObject = SMESH::SObjectToObject( SO ); + CORBA::Object_var aObject = SMESH::SObjectToObject( SO ); SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( aObject ); SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( aObject ); SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aObject ); @@ -4366,7 +4366,8 @@ void SMESHGUI::initialize( CAM_Application* app ) hasElems0d("({'Elem0d'} in elemTypes)"), hasEdges("({'Edge'} in elemTypes)"), hasFaces("({'Face'} in elemTypes)"), - hasVolumes("({'Volume'} in elemTypes)"); + hasVolumes("({'Volume'} in elemTypes)"), + hasFacesOrVolumes("(({'Face'} in elemTypes) || ({'Volume'} in elemTypes)) "); createPopupItem( SMESHOp::OpFileInformation, OB, mesh, "&& selcount=1 && isImported" ); createPopupItem( SMESHOp::OpCreateSubMesh, OB, mesh, "&& isComputable"); @@ -4577,12 +4578,8 @@ void SMESHGUI::initialize( CAM_Application* app ) aSubId = popupMgr()->insert( tr( "MEN_EDGE_CTRL" ), anId, -1 ); // EDGE CONTROLS - popupMgr()->insert( action( SMESHOp::OpFreeEdge ), aSubId, -1 ); - popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), aMeshInVtkHasEdges, QtxPopupMgr::VisibleRule ); - popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), "controlMode = 'eFreeEdges'", QtxPopupMgr::ToggleRule ); - popupMgr()->insert( action( SMESHOp::OpFreeBorder ), aSubId, -1 ); - popupMgr()->setRule( action( SMESHOp::OpFreeBorder ), aMeshInVtkHasEdges, QtxPopupMgr::VisibleRule ); + popupMgr()->setRule( action( SMESHOp::OpFreeBorder ), aMeshInVTK + "&&" + hasEdges + "&&" + hasFacesOrVolumes, QtxPopupMgr::VisibleRule ); popupMgr()->setRule( action( SMESHOp::OpFreeBorder ), "controlMode = 'eFreeBorders'", QtxPopupMgr::ToggleRule ); popupMgr()->insert( action( SMESHOp::OpLength ), aSubId, -1 ); @@ -4598,6 +4595,10 @@ void SMESHGUI::initialize( CAM_Application* app ) aSubId = popupMgr()->insert( tr( "MEN_FACE_CTRL" ), anId, -1 ); // FACE CONTROLS + popupMgr()->insert( action( SMESHOp::OpFreeEdge ), aSubId, -1 ); + popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), aMeshInVtkHasFaces, QtxPopupMgr::VisibleRule ); + popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), "controlMode = 'eFreeEdges'", QtxPopupMgr::ToggleRule ); + popupMgr()->insert ( action( SMESHOp::OpFreeFace ), aSubId, -1 ); popupMgr()->setRule( action( SMESHOp::OpFreeFace ), aMeshInVtkHasFaces /*aMeshInVtkHasVolumes*/, QtxPopupMgr::VisibleRule ); diff --git a/src/StdMeshers/StdMeshers_Adaptive1D.cxx b/src/StdMeshers/StdMeshers_Adaptive1D.cxx index 45e22ebb3..946c200df 100644 --- a/src/StdMeshers/StdMeshers_Adaptive1D.cxx +++ b/src/StdMeshers/StdMeshers_Adaptive1D.cxx @@ -1260,7 +1260,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh, double maxSegSize = 0; // get points to check distance to the face - EdgeData::TPntIter pIt2 = eData.myPoints.begin(), pIt1 = pIt2++; + EdgeData::TPntIter pIt2 = eData.myPoints.begin(), pIt1 = pIt2++, pItLast; maxSegSize = pIt1->mySegSize = Min( pIt1->mySegSize, sizeTree.GetSize( pIt1->myP )); for ( ; pIt2 != eData.myPoints.end(); ) { @@ -1290,6 +1290,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh, //cout << "E " << theMesh.GetMeshDS()->ShapeToIndex( eData.Edge() ) << endl; sizeDecreased = false; const gp_Pnt* avoidPnt = & eData.First().myP; + pItLast = --eData.myPoints.end(); for ( pIt1 = eData.myPoints.begin(); pIt1 != eData.myPoints.end(); ) { double distToFace = @@ -1316,7 +1317,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh, pIt1->mySegSize = allowedSize; } ++pIt1; - if ( & (*pIt1) == & eData.Last() ) + if ( pIt1 == pItLast ) avoidPnt = & eData.Last().myP; else avoidPnt = NULL; diff --git a/src/StdMeshers/StdMeshers_Penta_3D.cxx b/src/StdMeshers/StdMeshers_Penta_3D.cxx index 20f1ff59d..6d99a44de 100644 --- a/src/StdMeshers/StdMeshers_Penta_3D.cxx +++ b/src/StdMeshers/StdMeshers_Penta_3D.cxx @@ -657,7 +657,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh() } // // 2. Make pentahedrons - int aID0, k , aJ[3]; + int aID0, k , aJ[4]; vector aN; // SMDS_ElemIteratorPtr itf, aItNodes; diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index 4cd7ccf9a..1e35cb60b 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -5072,8 +5072,10 @@ int StdMeshers_Quadrangle_2D::splitQuad(FaceQuadStruct::Ptr quad, int I, int J) // << " L " << &quad->side[ QUAD_LEFT_SIDE ] << " "<< quad->side[ QUAD_LEFT_SIDE].NbPoints() // << " R " << &quad->side[ QUAD_RIGHT_SIDE ] << " "<< quad->side[ QUAD_RIGHT_SIDE].NbPoints()<< endl; - newQuad->side[ QUAD_RIGHT_SIDE ].to = iRgt+1; - newQuad->side[ QUAD_LEFT_SIDE ].to = iLft+1; + bool rRev = newQuad->side[ QUAD_RIGHT_SIDE ].IsReversed(); + bool lRev = newQuad->side[ QUAD_LEFT_SIDE ].IsReversed(); + newQuad->side[ QUAD_RIGHT_SIDE ].to = iRgt + ( rRev ? -1 : +1 ); + newQuad->side[ QUAD_LEFT_SIDE ].to = iLft + ( lRev ? -1 : +1 ); newQuad->name = ( TComm("Below J=") << J ); quad->side[ QUAD_RIGHT_SIDE ].from = iRgt; diff --git a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx index 204682ea9..03395bd10 100644 --- a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx @@ -930,8 +930,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh, //cout<<"Angles.Length() = "<