SPSolid

More
4 years 2 months ago #3200 by LilBeng
SPSolid was created by LilBeng
Hi,

To create a Spline Surface object in __init__: base = SPSolid.
Code:
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
More
4 years 2 months ago #3202 by mneunteufel
Replied by mneunteufel on topic SPSolid
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
More
4 years 2 months ago #3203 by LilBeng
Replied by LilBeng on topic SPSolid
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?
Code:
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.
More
4 years 2 months ago #3214 by christopher
Replied by christopher on topic SPSolid
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
Time to create page: 0.152 seconds