X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshCell.cxx;h=60f2a6fa9faf50cd827267a99940b26845bfece2;hb=1fb3ff621ac19da15742a5e8b9253b594977d14a;hp=5407af69df663eb455842c90700725feedeb29ba;hpb=7f47e06b6cf4cd41902a43d5af10873325be774b;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MeshCell.cxx b/src/SMDS/SMDS_MeshCell.cxx index 5407af69d..60f2a6fa9 100644 --- a/src/SMDS/SMDS_MeshCell.cxx +++ b/src/SMDS/SMDS_MeshCell.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -143,7 +143,7 @@ namespace /*isPoly=*/0,/*nbCN=*/6,/*nbN=*/15,/*nbE=*/9,/*nbF=*/5 ); p[ VTK_BIQUADRATIC_QUADRATIC_WEDGE ]. Set( SMDSEntity_BiQuad_Penta, SMDSAbs_Volume, SMDSGeom_PENTA, - /*isPoly=*/0,/*nbCN=*/6,/*nbN=*/21,/*nbE=*/9,/*nbF=*/5 ); + /*isPoly=*/0,/*nbCN=*/6,/*nbN=*/18,/*nbE=*/9,/*nbF=*/5 ); p[ VTK_HEXAGONAL_PRISM]. Set( SMDSEntity_Hexagonal_Prism, SMDSAbs_Volume, SMDSGeom_HEXAGONAL_PRISM, /*isPoly=*/0,/*nbCN=*/12,/*nbN=*/12,/*nbE=*/18,/*nbF=*/8 ); @@ -422,12 +422,15 @@ namespace void SMDS_MeshCell::InitStaticMembers() { - initCellProps(); - initVtkTypes(); - initToVtkInterlaces(); - initReverseInterlaces(); - initQuadInterlace(); - initFromVtkInterlaces(); + if ( theCellProps.empty() ) + { + initCellProps(); + initVtkTypes(); + initToVtkInterlaces(); + initReverseInterlaces(); + initQuadInterlace(); + initFromVtkInterlaces(); + } } void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, int theNbNodes, ... ) @@ -636,6 +639,9 @@ const SMDS_MeshNode* SMDS_MeshCell::GetNode(const int ind) const int SMDS_MeshCell::GetNodeIndex( const SMDS_MeshNode* node ) const { + if ( !node || node->IsNull() ) + return -1; + if ( GetVtkType() == VTK_POLYHEDRON ) return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::GetNodeIndex( node );