]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm
authoreap <eap@opencascade.com>
Fri, 1 Feb 2013 13:53:09 +0000 (13:53 +0000)
committereap <eap@opencascade.com>
Fri, 1 Feb 2013 13:53:09 +0000 (13:53 +0000)
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
src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx

index dd80d2b764d1aa3cc6202573e843014ce012b90c..fa3e87fa5c0e8778b08659f0c81e10fc29d17c91 100644 (file)
@@ -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());
index 11eb94b38a6ea05abc7caea99461c47cd567b021..fd276706227b9cfa5b52cac9759b2a26175a43e8 100644 (file)
@@ -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);