mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
f808a2bb64
Allows resetting maxh to larger values again: ``` from netgen.occ import * from ngsolve import * b1 = Box((-1,-1,-1), (1,1,1)) b1.faces.Max(X).maxh = 0.1 b1.faces.Max(X).maxh = 0.2 geo = OCCGeometry(b1) mesh = Mesh(geo.GenerateMesh(maxh=0.5)) Draw(mesh) ``` Needed for example in meshing app. Before it was not possible to set maxh to larger value again.
24 lines
441 B
C++
24 lines
441 B
C++
#ifndef FILE_OCC_SOLID_INCLUDED
|
|
#define FILE_OCC_SOLID_INCLUDED
|
|
|
|
#include <TopoDS.hxx>
|
|
#include <TopoDS_Solid.hxx>
|
|
|
|
#include "meshing.hpp"
|
|
|
|
namespace netgen
|
|
{
|
|
class OCCSolid : public GeometrySolid
|
|
{
|
|
TopoDS_Solid solid;
|
|
|
|
public:
|
|
OCCSolid(TopoDS_Shape dshape)
|
|
: solid(TopoDS::Solid(dshape))
|
|
{ }
|
|
TopoDS_Solid& GetShape() { return solid; }
|
|
};
|
|
}
|
|
|
|
#endif // FILE_OCC_SOLID_INCLUDED
|