From 35a739dc93461b230780d77142b4da32885d6341 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 11 Apr 2012 13:10:03 +0000 Subject: [PATCH] 0021530: EDF 2176 SMESH: Projection 1D-2D with compounds Fix for the case of no vertex association --- .../StdMeshers_ProjectionSource1D_i.cxx | 7 ++----- .../StdMeshers_ProjectionSource2D_i.cxx | 13 ++++--------- .../StdMeshers_ProjectionSource3D_i.cxx | 13 ++++--------- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx index 4797ff587..b8acaa11b 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx @@ -110,11 +110,8 @@ void StdMeshers_ProjectionSource1D_i::SetVertexAssociation(GEOM::GEOM_Object_ptr TopoDS_Shape v2 = StdMeshers_ObjRefUlils::GeomObjectToShape( targetVertex ); this->GetImpl()->SetVertexAssociation( v1, v2 ); - CORBA::String_var entry; - entry = sourceVertex->GetStudyEntry(); - myShapeEntries[ SRC_VERTEX ] = entry.in(); - entry = targetVertex->GetStudyEntry(); - myShapeEntries[ TGT_VERTEX ] = entry.in(); + myShapeEntries[ SRC_VERTEX ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( sourceVertex ); + myShapeEntries[ TGT_VERTEX ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( targetVertex ); } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM ); diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx index d71640179..5bdfb2087 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx @@ -161,15 +161,10 @@ void StdMeshers_ProjectionSource2D_i::SetVertexAssociation(GEOM::GEOM_Object_ptr TopoDS_Shape v4 = StdMeshers_ObjRefUlils::GeomObjectToShape( targetVertex2 ); this->GetImpl()->SetVertexAssociation( v1, v2, v3, v4 ); - CORBA::String_var entry; - entry = sourceVertex1->GetStudyEntry(); - myShapeEntries[ SRC_VERTEX1 ] = entry.in(); - entry = sourceVertex2->GetStudyEntry(); - myShapeEntries[ SRC_VERTEX2 ] = entry.in(); - entry = targetVertex1->GetStudyEntry(); - myShapeEntries[ TGT_VERTEX1 ] = entry.in(); - entry = targetVertex2->GetStudyEntry(); - myShapeEntries[ TGT_VERTEX2 ] = entry.in(); + myShapeEntries[ SRC_VERTEX1 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( sourceVertex1 ); + myShapeEntries[ SRC_VERTEX2 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( sourceVertex2 ); + myShapeEntries[ TGT_VERTEX1 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( targetVertex1 ); + myShapeEntries[ TGT_VERTEX2 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( targetVertex2 ); } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM ); diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx index 4d90c3e0f..f57e06e3b 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx @@ -162,15 +162,10 @@ void StdMeshers_ProjectionSource3D_i::SetVertexAssociation(GEOM::GEOM_Object_ptr TopoDS_Shape v4 = StdMeshers_ObjRefUlils::GeomObjectToShape( targetVertex2 ); this->GetImpl()->SetVertexAssociation( v1, v2, v3, v4 ); - CORBA::String_var entry; - entry = sourceVertex1->GetStudyEntry(); - myShapeEntries[ SRC_VERTEX1 ] = entry.in(); - entry = sourceVertex2->GetStudyEntry(); - myShapeEntries[ SRC_VERTEX2 ] = entry.in(); - entry = targetVertex1->GetStudyEntry(); - myShapeEntries[ TGT_VERTEX1 ] = entry.in(); - entry = targetVertex2->GetStudyEntry(); - myShapeEntries[ TGT_VERTEX2 ] = entry.in(); + myShapeEntries[ SRC_VERTEX1 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( sourceVertex1 ); + myShapeEntries[ SRC_VERTEX2 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( sourceVertex2 ); + myShapeEntries[ TGT_VERTEX1 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( targetVertex1 ); + myShapeEntries[ TGT_VERTEX2 ] = StdMeshers_ObjRefUlils::GeomObjectToEntry( targetVertex2 ); } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM ); -- 2.39.2