From da13b7ebd3dc1816183f010099effa91221fc742 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 4 Aug 2010 12:02:49 +0000 Subject: [PATCH] 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. --- src/SMESH_I/SMESH_Gen_i.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.2