From 2904086dbdef80bc21462bb2334f2d67744ec777 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 1 Feb 2013 13:53:09 +0000 Subject: [PATCH] 0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm In SetParameters(), use size of the shape to mesh by BLSURF instead of the whole shape to mesh when defining default element size --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 7 +++---- src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index dd80d2b..fa3e87f 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -697,7 +697,7 @@ void BLSURFPlugin_BLSURF::SetParameters( const BLSURFPlugin_Hypothesis* hyp, cadsurf_session_t * css, precad_session_t * pcs, - SMESH_Mesh& mesh, + const TopoDS_Shape& GeomShape, bool * use_precad ) { @@ -705,7 +705,7 @@ void BLSURFPlugin_BLSURF::SetParameters( // Clear map so that it is not stored in the algorithm with old enforced vertices in it EnfVertexCoords2EnfVertexList.clear(); - double diagonal = mesh.GetShapeDiagonalSize(); + double diagonal = SMESH_Mesh::GetShapeDiagonalSize( GeomShape ); double bbSegmentation = _gen->GetBoundaryBoxSegmentation(); int _physicalMesh = BLSURFPlugin_Hypothesis::GetDefaultPhysicalMesh(); int _geometricMesh = BLSURFPlugin_Hypothesis::GetDefaultGeometricMesh(); @@ -1138,7 +1138,6 @@ void BLSURFPlugin_BLSURF::SetParameters( if (useInternalVertexAllFaces) { std::string grpName = BLSURFPlugin_Hypothesis::GetInternalEnforcedVertexAllFacesGroup(hyp); MESSAGE("Setting Internal Enforced Vertices"); - GeomShape = mesh.GetShapeToMesh(); gp_Pnt aPnt; TopExp_Explorer exp (GeomShape, TopAbs_FACE); for (; exp.More(); exp.Next()){ @@ -1702,7 +1701,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, // #if BLSURF_VERSION_LONG >= "3.1.1" // c, // #endif - _hypothesis, css, pcs, aMesh, &use_precad); + _hypothesis, css, pcs, aShape, &use_precad); MESSAGE("END SetParameters"); haveQuadraticSubMesh = haveQuadraticSubMesh || (_hypothesis != NULL && _hypothesis->GetQuadraticMesh()); diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx index 11eb94b..fd27670 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx @@ -84,7 +84,7 @@ class BLSURFPlugin_BLSURF: public SMESH_2D_Algo { const TopoDS_Shape& aShape, SMESH_Hypothesis::Hypothesis_Status& aStatus); - void SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsurf_session_t *bls, precad_session_t *pcs, SMESH_Mesh& aMesh, bool *use_precad); + void SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsurf_session_t *bls, precad_session_t *pcs, const TopoDS_Shape& shape, bool *use_precad); virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape); -- 2.39.2