From 06abe76e03c8a2796c09673c70a33b3a3e0ce756 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 19 Jul 2012 13:18:07 +0000 Subject: [PATCH] + * Creates LINEAR!!!!!!!!! octahedron --- src/SMESH/SMESH_MesherHelper.cxx | 31 +++++++++++++++++++++++++++++++ src/SMESH/SMESH_MesherHelper.hxx | 18 ++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 8a1682b8e..b05dfbc56 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -1573,6 +1573,37 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1, return elem; } +//======================================================================= +//function : AddVolume +//purpose : Creates LINEAR!!!!!!!!! octahedron +//======================================================================= + +SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const SMDS_MeshNode* n5, + const SMDS_MeshNode* n6, + const SMDS_MeshNode* n7, + const SMDS_MeshNode* n8, + const SMDS_MeshNode* n9, + const SMDS_MeshNode* n10, + const SMDS_MeshNode* n11, + const SMDS_MeshNode* n12, + const int id, + bool force3d) +{ + SMESHDS_Mesh * meshDS = GetMeshDS(); + SMDS_MeshVolume* elem = 0; + if(id) + elem = meshDS->AddVolumeWithID(n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,id); + else + elem = meshDS->AddVolume(n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12); + if ( mySetElemOnShape && myShapeID > 0 ) + meshDS->SetMeshElementOnShape( elem, myShapeID ); + return elem; +} + //======================================================================= //function : AddPolyhedralVolume //purpose : Creates polyhedron. In quadratic mesh, adds medium nodes diff --git a/src/SMESH/SMESH_MesherHelper.hxx b/src/SMESH/SMESH_MesherHelper.hxx index b6c9c461f..9147a1415 100644 --- a/src/SMESH/SMESH_MesherHelper.hxx +++ b/src/SMESH/SMESH_MesherHelper.hxx @@ -297,6 +297,24 @@ public: const int id = 0, bool force3d = true); + /*! + * Creates LINEAR!!!!!!!!! octahedron + */ + SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const SMDS_MeshNode* n5, + const SMDS_MeshNode* n6, + const SMDS_MeshNode* n7, + const SMDS_MeshNode* n8, + const SMDS_MeshNode* n9, + const SMDS_MeshNode* n10, + const SMDS_MeshNode* n11, + const SMDS_MeshNode* n12, + const int id = 0, + bool force3d = true); + /*! * Creates polyhedron. In quadratic mesh, adds medium nodes */