From: eap Date: Wed, 4 Aug 2010 12:02:49 +0000 (+0000) Subject: 0020951: EDF 1501 SMESH: Conversion linear/quadratic with medium nodes on geometry... X-Git-Tag: end_translate_resources_09Jul10~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da13b7ebd3dc1816183f010099effa91221fc742;p=modules%2Fsmesh.git 0020951: EDF 1501 SMESH: Conversion linear/quadratic with medium nodes on geometry fails with GHS3D * Fix for usecase: open the atached study, convert Mesh_1 from quadratic, unassign GHS3D algo -> SIGSEGV. Reason is that the same SMDS_SpacePosition is shared by all nodes in different solids. --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index bf958aee5..4bd6147c5 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -3247,13 +3247,15 @@ public: } PositionCreator() { myFuncTable.resize( (size_t) TopAbs_SHAPE, & PositionCreator::defaultPosition ); - myFuncTable[ TopAbs_FACE ] = & PositionCreator::facePosition; - myFuncTable[ TopAbs_EDGE ] = & PositionCreator::edgePosition; + myFuncTable[ TopAbs_SOLID ] = & PositionCreator::volumePosition; + myFuncTable[ TopAbs_FACE ] = & PositionCreator::facePosition; + myFuncTable[ TopAbs_EDGE ] = & PositionCreator::edgePosition; myFuncTable[ TopAbs_VERTEX ] = & PositionCreator::vertexPosition; } private: SMDS_PositionPtr edgePosition() const { return SMDS_PositionPtr( new SMDS_EdgePosition ); } SMDS_PositionPtr facePosition() const { return SMDS_PositionPtr( new SMDS_FacePosition ); } + SMDS_PositionPtr volumePosition() const { return SMDS_PositionPtr( new SMDS_SpacePosition ); } SMDS_PositionPtr vertexPosition() const { return SMDS_PositionPtr( new SMDS_VertexPosition); } SMDS_PositionPtr defaultPosition() const { return SMDS_SpacePosition::originSpacePosition(); } typedef SMDS_PositionPtr (PositionCreator:: * FmakePos)() const;