2009-01-13 04:40:13 +05:00
|
|
|
#include <mystdlib.h>
|
|
|
|
|
|
|
|
#include <csg.hpp>
|
|
|
|
#include <meshing.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace netgen
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
Meshing2Surfaces :: Meshing2Surfaces (const Surface & asurface)
|
|
|
|
: surface(asurface)
|
|
|
|
{
|
|
|
|
;
|
|
|
|
}
|
|
|
|
*/
|
2019-10-28 17:44:51 +05:00
|
|
|
Meshing2Surfaces :: Meshing2Surfaces (const CSGeometry& geo,
|
|
|
|
const Surface & asurf,
|
|
|
|
const MeshingParameters & mp,
|
|
|
|
const Box<3> & abb)
|
|
|
|
: Meshing2(geo, mp, abb), surface(asurf), mparam (mp)
|
|
|
|
{
|
|
|
|
;
|
|
|
|
}
|
2009-01-13 04:40:13 +05:00
|
|
|
|
|
|
|
|
2019-09-29 17:54:24 +05:00
|
|
|
void Meshing2Surfaces :: DefineTransformation (const Point<3> & p1, const Point<3> & p2,
|
2009-01-13 04:40:13 +05:00
|
|
|
const PointGeomInfo * geominfo1,
|
|
|
|
const PointGeomInfo * geominfo2)
|
|
|
|
{
|
|
|
|
((Surface&)surface).DefineTangentialPlane (p1, p2);
|
|
|
|
}
|
|
|
|
|
2019-09-29 17:54:24 +05:00
|
|
|
void Meshing2Surfaces :: TransformToPlain (const Point<3> & locpoint,
|
2009-01-13 04:40:13 +05:00
|
|
|
const MultiPointGeomInfo & geominfo,
|
2019-09-29 17:54:24 +05:00
|
|
|
Point<2> & planepoint,
|
2009-01-13 04:40:13 +05:00
|
|
|
double h, int & zone)
|
|
|
|
{
|
2019-09-29 17:54:24 +05:00
|
|
|
surface.ToPlane (locpoint, planepoint, h, zone);
|
2009-01-13 04:40:13 +05:00
|
|
|
}
|
|
|
|
|
2019-09-29 17:54:24 +05:00
|
|
|
int Meshing2Surfaces :: TransformFromPlain (const Point<2> & planepoint,
|
|
|
|
Point<3> & locpoint,
|
|
|
|
PointGeomInfo & gi,
|
|
|
|
double h)
|
2009-01-13 04:40:13 +05:00
|
|
|
{
|
2019-09-29 17:54:24 +05:00
|
|
|
surface.FromPlane (planepoint, locpoint, h);
|
2009-01-13 04:40:13 +05:00
|
|
|
gi.trignum = 1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-01 14:59:17 +05:00
|
|
|
double Meshing2Surfaces :: CalcLocalH (const Point<3> & p, double gh) const
|
2009-01-13 04:40:13 +05:00
|
|
|
{
|
2014-08-30 06:15:59 +06:00
|
|
|
return surface.LocH (p, 3, 1, mparam, gh);
|
2009-01-13 04:40:13 +05:00
|
|
|
/*
|
|
|
|
double loch = mesh.lochfunc->GetH(p);
|
|
|
|
if (gh < loch) loch = gh;
|
|
|
|
return loch;
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|