* Bugfix: The feature for OCC Geometry to specify the maximum meshsize for each face had a bug which clamped the

mesh size for faces which were not selected by the user to the global maximum mesh size when first invoked.
  ..... This bug has now been fixed
This commit is contained in:
Philippose Rajan 2010-01-14 14:02:59 +00:00
parent 37e537a67c
commit e3117cf206
4 changed files with 6865 additions and 108 deletions

6934
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -815,6 +815,12 @@ namespace netgen
face_maxh.SetSize (fmap.Extent());
face_maxh = mparam.maxh;
// Philippose - 15/01/2010
face_maxh_modified.DeleteAll();
face_maxh_modified.SetSize(fmap.Extent());
face_maxh_modified = 0;
// Philippose - 17/01/2009
face_sel_status.DeleteAll();
face_sel_status.SetSize (fmap.Extent());

View File

@ -210,6 +210,11 @@ namespace netgen
// Maximum mesh size for a given face
// (Used to explicitly define mesh size limits on individual faces)
Array<double> face_maxh;
// Philippose - 14/01/2010
// Boolean array to detect whether a face has been explicitly modified
// by the user or not
Array<bool> face_maxh_modified;
// Philippose - 15/01/2009
// Indicates which faces have been selected by the user in geometry mode
@ -293,6 +298,19 @@ namespace netgen
if((facenr> 0) && (facenr <= fmap.Extent()))
{
face_maxh[facenr-1] = min(mparam.maxh,faceh);
// Philippose - 14/01/2010
// If the face maxh is greater than or equal to the
// current global maximum, then identify the face as
// not explicitly controlled by the user any more
if(faceh >= mparam.maxh)
{
face_maxh_modified[facenr-1] = 0;
}
else
{
face_maxh_modified[facenr-1] = 1;
}
}
}
@ -309,7 +327,15 @@ namespace netgen
return 0.0;
}
}
// Philippose - 14/01/2010
// Returns the flag whether the given face
// has a mesh size controlled by the user or not
bool GetFaceMaxhModified(int facenr)
{
return face_maxh_modified[facenr-1];
}
// Philippose - 17/01/2009
// Returns the index of the currently selected face
int SelectedFace()

View File

@ -1477,7 +1477,10 @@ namespace netgen
// Update the face mesh sizes to reflect the global maximum mesh size
for(int i = 1; i <= occgeometry->NrFaces(); i++)
{
occgeometry->SetFaceMaxH(i, min(mparam.maxh,occgeometry->GetFaceMaxH(i)));
if(!occgeometry->GetFaceMaxhModified(i))
{
occgeometry->SetFaceMaxH(i, mparam.maxh);
}
}
if (strcmp (argv[1], "setsurfms") == 0)