mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
0019292: EDF 672 SMESH : extend Composite side discretisation to 2D
StdMeshers_CompositeHexa_3D.* added
This commit is contained in:
parent
04a0c33ea9
commit
ab27b4d6ac
@ -66,7 +66,8 @@ salomeinclude_HEADERS = \
|
|||||||
StdMeshers_UseExisting_1D2D.hxx \
|
StdMeshers_UseExisting_1D2D.hxx \
|
||||||
StdMeshers_QuadToTriaAdaptor.hxx \
|
StdMeshers_QuadToTriaAdaptor.hxx \
|
||||||
SMESH_StdMeshers.hxx \
|
SMESH_StdMeshers.hxx \
|
||||||
StdMeshers_TrianglePreference.hxx
|
StdMeshers_TrianglePreference.hxx \
|
||||||
|
StdMeshers_CompositeHexa_3D.hxx
|
||||||
|
|
||||||
# Libraries targets
|
# Libraries targets
|
||||||
|
|
||||||
@ -109,7 +110,8 @@ dist_libStdMeshers_la_SOURCES = \
|
|||||||
StdMeshers_CompositeSegment_1D.cxx \
|
StdMeshers_CompositeSegment_1D.cxx \
|
||||||
StdMeshers_UseExisting_1D2D.cxx \
|
StdMeshers_UseExisting_1D2D.cxx \
|
||||||
StdMeshers_QuadToTriaAdaptor.cxx \
|
StdMeshers_QuadToTriaAdaptor.cxx \
|
||||||
StdMeshers_TrianglePreference.cxx
|
StdMeshers_TrianglePreference.cxx \
|
||||||
|
StdMeshers_CompositeHexa_3D.cxx
|
||||||
|
|
||||||
|
|
||||||
# additionnal information to compil and link file
|
# additionnal information to compil and link file
|
||||||
|
1526
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
Normal file
1526
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
Normal file
File diff suppressed because it is too large
Load Diff
61
src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx
Normal file
61
src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : StdMeshers_CompositeBlock_3D.hxx
|
||||||
|
// Module : SMESH
|
||||||
|
|
||||||
|
#ifndef _SMESH_CompositeSegment_1D_HXX_
|
||||||
|
#define _SMESH_CompositeSegment_1D_HXX_
|
||||||
|
|
||||||
|
#include "SMESH_StdMeshers.hxx"
|
||||||
|
#include "SMESH_3D_Algo.hxx"
|
||||||
|
|
||||||
|
class SMESH_Mesh;
|
||||||
|
class StdMeshers_FaceSide;
|
||||||
|
class TopoDS_Edge;
|
||||||
|
class TopoDS_Face;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Computes hexahedral mesh on a box with composite sides
|
||||||
|
*
|
||||||
|
* The algorithm expects faces of a box to be meshed with quadrangles so that
|
||||||
|
* opposite box sides have equal number of quadrangles.
|
||||||
|
*/
|
||||||
|
class STDMESHERS_EXPORT StdMeshers_CompositeHexa_3D: public SMESH_3D_Algo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
StdMeshers_CompositeHexa_3D(int hypId, int studyId, SMESH_Gen* gen);
|
||||||
|
//virtual ~StdMeshers_CompositeHexa_3D();
|
||||||
|
|
||||||
|
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||||
|
const TopoDS_Shape& aShape);
|
||||||
|
|
||||||
|
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||||
|
const TopoDS_Shape& aShape,
|
||||||
|
Hypothesis_Status& aStatus);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private fields
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -28,10 +28,11 @@
|
|||||||
// $Header$
|
// $Header$
|
||||||
|
|
||||||
#include "StdMeshers_Hexa_3D.hxx"
|
#include "StdMeshers_Hexa_3D.hxx"
|
||||||
#include "StdMeshers_Quadrangle_2D.hxx"
|
#include "StdMeshers_CompositeHexa_3D.hxx"
|
||||||
#include "StdMeshers_FaceSide.hxx"
|
#include "StdMeshers_FaceSide.hxx"
|
||||||
#include "StdMeshers_Penta_3D.hxx"
|
#include "StdMeshers_Penta_3D.hxx"
|
||||||
#include "StdMeshers_Prism_3D.hxx"
|
#include "StdMeshers_Prism_3D.hxx"
|
||||||
|
#include "StdMeshers_Quadrangle_2D.hxx"
|
||||||
|
|
||||||
#include "SMESH_Gen.hxx"
|
#include "SMESH_Gen.hxx"
|
||||||
#include "SMESH_Mesh.hxx"
|
#include "SMESH_Mesh.hxx"
|
||||||
@ -215,7 +216,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
|
|||||||
//Unexpect aCatch(SalomeException);
|
//Unexpect aCatch(SalomeException);
|
||||||
MESSAGE("StdMeshers_Hexa_3D::Compute");
|
MESSAGE("StdMeshers_Hexa_3D::Compute");
|
||||||
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||||
|
|
||||||
// 0. - shape and face mesh verification
|
// 0. - shape and face mesh verification
|
||||||
// 0.1 - shape must be a solid (or a shell) with 6 faces
|
// 0.1 - shape must be a solid (or a shell) with 6 faces
|
||||||
|
|
||||||
@ -225,8 +226,13 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
|
|||||||
ASSERT(aSubMesh);
|
ASSERT(aSubMesh);
|
||||||
meshFaces.push_back(aSubMesh);
|
meshFaces.push_back(aSubMesh);
|
||||||
}
|
}
|
||||||
if (meshFaces.size() != 6)
|
if (meshFaces.size() != 6) {
|
||||||
return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block");
|
//return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block");
|
||||||
|
static StdMeshers_CompositeHexa_3D compositeHexa(-10, 0, aMesh.GetGen());
|
||||||
|
if ( !compositeHexa.Compute( aMesh, aShape ))
|
||||||
|
return error( compositeHexa.GetComputeError() );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// 0.2 - is each face meshed with Quadrangle_2D? (so, with a wire of 4 edges)
|
// 0.2 - is each face meshed with Quadrangle_2D? (so, with a wire of 4 edges)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user