fix SetMaxH in python

This commit is contained in:
Joachim Schoeberl 2014-12-05 15:58:49 +00:00
parent b611150ed3
commit 46aa785828
5 changed files with 22 additions and 10 deletions

View File

@ -95,6 +95,12 @@ namespace netgen
return new Plane (p, n);
}
void Plane :: Print (ostream & ost) const
{
ost << "plane(" << p << "; " << n << ")";
}
void Plane :: Transform (Transformation<3> & trans)
{
Point<3> hp;
@ -828,6 +834,10 @@ namespace netgen
return new Cylinder (a, b, r);
}
void Cylinder :: Print (ostream & ost) const
{
ost << "cylinder(" << a << "; " << b << "; " << r << ")";
}
int Cylinder :: IsIdentic (const Surface & s2, int & inv, double eps) const
{

View File

@ -44,7 +44,7 @@ namespace netgen
virtual Point<3> GetSurfacePoint () const;
virtual void Print (ostream & ist) const;
virtual void Print (ostream & str) const;
virtual void Read (istream & ist);
void PrintCoeff (ostream & ost) const;
};
@ -70,6 +70,8 @@ namespace netgen
static Primitive * CreateDefault ();
virtual Primitive * Copy () const;
virtual void Print (ostream & str) const;
virtual void Transform (Transformation<3> & trans);
@ -190,6 +192,8 @@ namespace netgen
static Primitive * CreateDefault ();
virtual Primitive * Copy () const;
virtual void Print (ostream & str) const;
virtual void Transform (Transformation<3> & trans);
///

View File

@ -511,7 +511,7 @@ namespace netgen
void CSGeometry :: AddSurface (char * name, Surface * surf)
{
(*testout) << "Adding surface " << name << endl;
(*testout) << "Adding surface " << name << ": " << (*surf) << endl;
surfaces.Set (name, surf);
surf->SetName (name);
changeval++;

View File

@ -41,9 +41,8 @@ namespace netgen
PrintMessage (1, "Find edges");
PushStatus ("Find edges");
for (int i = 1; i <= mesh.GetNP(); i++)
meshpoint_tree->Insert (mesh.Point(i), i);
for (PointIndex pi : mesh.Points().Range())
meshpoint_tree->Insert (mesh[pi], pi);
// add all special points before edge points (important for periodic identification)
// JS, Jan 2007
@ -63,6 +62,7 @@ namespace netgen
meshpoint_tree -> Insert (p, pi);
}
}
/*
// slow version
@ -856,11 +856,9 @@ namespace netgen
if (uselocalh)
{
double lh = mesh.GetH(np);
if (lh < loch)
loch = lh;
if (lh < loch) loch = lh;
}
len += Dist (p, np) / loch;
edgepoints.Append (np);
curvelength.Append (len);

View File

@ -93,7 +93,7 @@ public:
}
}
void SetMaxH(int amaxh)
void SetMaxH(double amaxh)
{
if (maxh == -1)
{