mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
maxh for 2D geometries, draw mesh douring mesh generation
This commit is contained in:
parent
cd4659c1c2
commit
2ea47dc455
@ -455,6 +455,7 @@ DLL_HEADER void ExportCSG()
|
|||||||
([](shared_ptr<CSGeometry> geo, MeshingParameters & param)
|
([](shared_ptr<CSGeometry> geo, MeshingParameters & param)
|
||||||
{
|
{
|
||||||
auto dummy = make_shared<Mesh>();
|
auto dummy = make_shared<Mesh>();
|
||||||
|
SetGlobalMesh (dummy);
|
||||||
dummy->SetGeometry(geo);
|
dummy->SetGeometry(geo);
|
||||||
ng_geometry = geo;
|
ng_geometry = geo;
|
||||||
geo->FindIdenticSurfaces(1e-8 * geo->MaxSize());
|
geo->FindIdenticSurfaces(1e-8 * geo->MaxSize());
|
||||||
|
@ -33,14 +33,18 @@ DLL_HEADER void ExportGeom2d()
|
|||||||
})))
|
})))
|
||||||
|
|
||||||
.def("Load",&SplineGeometry2d::Load)
|
.def("Load",&SplineGeometry2d::Load)
|
||||||
.def("AppendPoint", FunctionPointer([](SplineGeometry2d &self, double px, double py)
|
.def("AppendPoint", FunctionPointer
|
||||||
{
|
([](SplineGeometry2d &self, double px, double py, double maxh)
|
||||||
Point<2> p;
|
{
|
||||||
p(0) = px;
|
Point<2> p;
|
||||||
p(1) = py;
|
p(0) = px;
|
||||||
self.geompoints.Append(GeomPoint<2>(p,1));
|
p(1) = py;
|
||||||
return self.geompoints.Size()-1;
|
GeomPoint<2> gp(p);
|
||||||
}))
|
gp.hmax = maxh;
|
||||||
|
self.geompoints.Append(gp);
|
||||||
|
return self.geompoints.Size()-1;
|
||||||
|
}),
|
||||||
|
(bp::arg("self"), bp::arg("x"), bp::arg("y"), bp::arg("maxh") = 1e99))
|
||||||
.def("Append", FunctionPointer([](SplineGeometry2d &self, bp::list segment, int leftdomain, int rightdomain, int bc)
|
.def("Append", FunctionPointer([](SplineGeometry2d &self, bp::list segment, int leftdomain, int rightdomain, int bc)
|
||||||
{
|
{
|
||||||
bp::extract<std::string> segtype(segment[0]);
|
bp::extract<std::string> segtype(segment[0]);
|
||||||
@ -227,6 +231,7 @@ DLL_HEADER void ExportGeom2d()
|
|||||||
{
|
{
|
||||||
shared_ptr<Mesh> mesh = make_shared<Mesh> ();
|
shared_ptr<Mesh> mesh = make_shared<Mesh> ();
|
||||||
mesh->SetGeometry(self);
|
mesh->SetGeometry(self);
|
||||||
|
SetGlobalMesh (mesh);
|
||||||
ng_geometry = self;
|
ng_geometry = self;
|
||||||
self->GenerateMesh(mesh, mparam, 0, 0);
|
self->GenerateMesh(mesh, mparam, 0, 0);
|
||||||
return mesh;
|
return mesh;
|
||||||
|
Loading…
Reference in New Issue
Block a user