]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0052461: Viscous layers 2D on Cone
authoreap <eap@opencascade.com>
Mon, 28 Jul 2014 14:59:52 +0000 (18:59 +0400)
committereap <eap@opencascade.com>
Mon, 28 Jul 2014 14:59:52 +0000 (18:59 +0400)
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx

index da85567a93dbb69534f8036d213ddeb61303c06f..e73f7bb11295cf5738a90cf02c78e7f374aceb02 100644 (file)
@@ -275,7 +275,7 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh&         aMesh,
                "two opposite sides should have same number of segments, "
                "but actual number of segments is different on all sides. "
                "'Standard' transion has been used.");
-      else
+      else if ( ! ( n1 == n3 && n2 == n4 ))
         error( COMPERR_WARNING,
                "To use 'Reduced' transition, "
                "two opposite sides should have an even difference in number of segments. "
index 7e51343806582b8efe075c49f1ae779e1d08eeee..04e895e7e7e20424ee200a53c7731f6057563978 100644 (file)
@@ -1571,9 +1571,46 @@ bool _ViscousBuilder2D::shrink()
           myEdgeSM->SetUVPtStructVec( nodeDataVec );
 
           existingNodesFound = true;
+          break;
         }
       } // loop on FACEs sharing E
 
+    // Commented as a case with a seam EDGE (issue 0052461) is hard to support
+    // because SMESH_ProxyMesh can't hold different sub-meshes for two
+    // 2D representations of the seam. But such a case is not a real practice one.
+    // Check if L is an already shrinked seam
+    // if ( adjFace.IsNull() && _helper.IsRealSeam( edgeID ))
+    // {
+    //   for ( int iL2 = iL1-1; iL2 > -1; --iL2 )
+    //   {
+    //     _PolyLine& L2 = _polyLineVec[ iL2 ];
+    //     if ( edgeID == L2._wire->EdgeID( L2._edgeInd ))
+    //     {
+    //       // copy layer nodes
+    //       const int seamPar = _helper.GetPeriodicIndex();
+    //       vector<gp_XY>& uvVec = L._lEdges.front()._uvRefined;
+    //       if ( isShrinkableL )
+    //       {
+    //         L._leftNodes = L2._rightNodes;
+    //         uvVec = L2._lEdges.back()._uvRefined;
+    //       }
+    //       if ( isShrinkableR )
+    //       {
+    //         L._rightNodes = L2._leftNodes;
+    //         uvVec = L2._lEdges.front()._uvRefined;
+    //       }
+    //       for ( size_t i = 0; i < uvVec.size(); ++i )
+    //       {
+    //         gp_XY & uv = uvVec[i];
+    //         uv.SetCoord( seamPar, _helper.GetOtherParam( uv.Coord( seamPar )));
+    //       }
+
+    //       existingNodesFound = true;
+    //       break;
+    //     }
+    //   }
+    // }
+
     if ( existingNodesFound )
       continue; // nothing more to do in this case
 
@@ -1912,7 +1949,7 @@ bool _ViscousBuilder2D::toShrinkForAdjacent( const TopoDS_Face&   adjFace,
                                              const TopoDS_Edge&   E,
                                              const TopoDS_Vertex& V)
 {
-  if ( _noShrinkVert.count( getMeshDS()->ShapeToIndex( V )))
+  if ( _noShrinkVert.count( getMeshDS()->ShapeToIndex( V )) || adjFace.IsNull() )
     return false;
 
   TopoDS_Shape hypAssignedTo;