netgen/libsrc/csg/meshsurf.cpp

64 lines
1.5 KiB
C++
Raw Normal View History

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)
{
;
}
*/
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
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);
}
void Meshing2Surfaces :: TransformToPlain (const Point<3> & locpoint,
2009-01-13 04:40:13 +05:00
const MultiPointGeomInfo & geominfo,
Point<2> & planepoint,
2009-01-13 04:40:13 +05:00
double h, int & zone)
{
surface.ToPlane (locpoint, planepoint, h, zone);
2009-01-13 04:40:13 +05:00
}
int Meshing2Surfaces :: TransformFromPlain (const Point<2> & planepoint,
Point<3> & locpoint,
PointGeomInfo & gi,
double h)
2009-01-13 04:40:13 +05:00
{
surface.FromPlane (planepoint, locpoint, h);
2009-01-13 04:40:13 +05:00
gi.trignum = 1;
return 0;
}
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;
*/
}
}