netgen/libsrc/occ/occ_solid.hpp
Christopher Lackner f808a2bb64 Propagate maxh to children only in occgeom constructor
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.
2024-04-26 09:55:53 +02:00

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