SPSolid

Hi,

To create a Spline Surface object in init: base = SPSolid.

class SplineSurface(): """ A surface for co dim 2 integrals on the splines """ def AddPoint(self, x: float, y: float, z: float, hpref: bool = False) -> int: ... @typing.overload def AddSegment(self, pnt1: int, pnt2: int, bcname: str = 'default', maxh: float = -1.0) -> None: ... @typing.overload def AddSegment(self, pnt1: int, pnt2: int, pnt3: int, bcname: str = 'default', maxh: float = -1.0) -> None: ... def __init__(self, base: SPSolid, cuts: list = []) -> None: ... pass
I cannot find this object SPSolid in the netgen library.

Version:
NETGEN-6.2.2007-107-g2763285b
NGSolve-6.2.2008

Hi LilBeng,

in the NETGEN folder netgen/libsrc/csg/ you can find the definition/implementation of the SplineSurface class in splinesurface.hpp and splinesurface.cpp. In netgen/libsrc/csg/python_csg.cpp the class is exported to Python.

Best,
Michael

Thanks!

There is one more question. If I create a set of planes and add them to geometry, is there a way to combine them into a solid?

geometry = CSGeometry()
...
for surface in [SplineSurfaces_1, ... , SplineSurfaces_n]:
      geometry.AddSplineSurface(surface) 
...

I want to create a Solid of arbitrary shape from a set of surfaces. I hope for a quick answer.

Hi,
I think the SplineSurface is not what you look for. It is a quite special application tool to get line segments in the csg 3d geometries.
If you want to create 2d spline surfaces and solids from it I would suggest you have a look at Opencascade. There you can create such surfaces and solids from it and you can use netgen to mesh them.

Best
Christopher