Skip to content
Snippets Groups Projects
Commit abf76c82 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

more opencc stuff (more surface and curve types are recognized by gmsh)

parent 89e9ef06
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,7 @@ class GEntity {
Torus,
RuledSurface,
ParametricSurface,
BSplineSurface,
DiscreteSurface,
Volume,
DiscreteVolume
......@@ -106,6 +107,7 @@ class GEntity {
"Torus",
"Ruled surface",
"Parametric surface",
"BSpline surface",
"Discrete surface",
"Volume",
"Discrete volume"
......
// $Id: OCCFace.cpp,v 1.11 2006-11-22 13:57:25 remacle Exp $
// $Id: OCCFace.cpp,v 1.12 2006-11-23 16:23:13 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -30,6 +30,8 @@
#if defined(HAVE_OCC)
#include "Geom_CylindricalSurface.hxx"
#include "Geom_ConicalSurface.hxx"
#include "Geom_BSplineSurface.hxx"
#include "Geom_SphericalSurface.hxx"
#include "Geom_Plane.hxx"
#include "gp_Pln.hxx"
......@@ -176,8 +178,10 @@ GEntity::GeomType OCCFace::geomType() const
return Cylinder;
else if (occface->DynamicType() == STANDARD_TYPE(Geom_ConicalSurface))
return Cone;
// else if (occface->DynamicType() == STANDARD_TYPE(Geom_ConicalSurface))
// return Cone;
else if (occface->DynamicType() == STANDARD_TYPE(Geom_SphericalSurface))
return Sphere;
else if (occface->DynamicType() == STANDARD_TYPE(Geom_BSplineSurface))
return BSplineSurface;
return Unknown;
}
......@@ -190,7 +194,8 @@ double OCCFace::curvature (const SPoint2 &param) const
if (!prop.IsCurvatureDefined())
{
return GFace::curvature (param);
Msg(GERROR,"Curvature not defined for face %d",tag());
return -1;
}
return std::max(fabs(prop.MinCurvature()), fabs(prop.MaxCurvature()));
}
......
// $Id: OCCVertex.cpp,v 1.6 2006-11-22 13:57:25 remacle Exp $
// $Id: OCCVertex.cpp,v 1.7 2006-11-23 16:23:13 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -30,12 +30,12 @@ double max_surf_curvature ( const GVertex *gv, double x, double y, double z , co
{
std::list<GFace *> faces = _myGEdge->faces();
std::list<GFace *>::iterator it = faces.begin();
double curv = 0;
double curv = 1.e-22;
while (it != faces.end())
{
SPoint2 par = gv->reparamOnFace((*it),1);
double cc = (*it)->curvature ( par );
if (cc < 1.e2)curv = std::max(curv, cc );
if (cc > 0)curv = std::max(curv, cc );
++it;
}
return curv;
......@@ -99,10 +99,10 @@ SPoint2 OCCVertex::reparamOnFace ( GFace *gf , int dir) const
double OCCVertex::prescribedMeshSizeAtVertex() const {
SBoundingBox3d b = model()->bounds();
double lc = 0.1 * norm( SVector3 ( b.max() , b.min() ) ) * CTX.mesh.lc_factor;
// double lc_min = 0.004 * norm(SVector3 ( b.max() , b.min() ) ) * CTX.mesh.lc_factor;
// double maxc = max_curvature_of_surfaces();
// if (maxc !=0)
// lc = std::max(lc_min,std::min (lc,6.28/(CTX.mesh.min_circ_points*maxc)));
double lc_min = 0.004 * norm(SVector3 ( b.max() , b.min() ) ) * CTX.mesh.lc_factor;
double maxc = max_curvature_of_surfaces();
if (maxc !=0)
lc = std::max(lc_min,std::min (lc,6.28/(CTX.mesh.min_circ_points*maxc)));
return lc;
}
......
// $Id: meshGFace.cpp,v 1.22 2006-11-22 13:57:25 remacle Exp $
// $Id: meshGFace.cpp,v 1.23 2006-11-23 16:23:13 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -1536,7 +1536,7 @@ void meshGFace :: operator() (GFace *gf)
if(gf->geomType() == GEntity::DiscreteSurface) return;
// Send a messsage to the GMSH environment
Msg(STATUS2, "Meshing surface %d", gf->tag());
Msg(STATUS2, "Meshing surface %d (%s)", gf->tag(),gf->getTypeString().c_str());
// TEST TEST
// if (gf->surfPeriodic(2)) return;
......
......@@ -442,7 +442,7 @@ void meshGRegion :: operator() (GRegion *gr)
// Send a messsage to the GMSH environment
Msg(STATUS2, "Meshing volume %d", gr->tag());
if(CTX.mesh.algo3d == DELAUNAY_TETGEN)
if(CTX.mesh.algo3d == DELAUNAY_TETGEN || CTX.mesh.algo3d == DELAUNAY_ISO)
{
#if !defined(HAVE_TETGEN)
Msg(GERROR, "Tetgen is not compiled in this version of Gmsh");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment