Skip to content

OCCNurbsSurface ¤

OCCNurbsSurface(native_surface, name: str | None = None)

Class representing a NURBS surface based on the BSplineSurface of the OCC geometry kernel.

Parameters:

  • name (str | None, default: None ) –

    The name of the curve

Attributes:

  • points (ControlPoints) –

    The control points of the surface.

  • weights (list[list[float]]) –

    The weights of the control points of the surface.

  • knots_u (list[float]) –

    The knots of the surface in the U direction, without multiplicities.

  • knots_v (list[float]) –

    The knots of the surface in the V direction, without multiplicities.

  • mults_u (list[int]) –

    The multiplicities of the knots of the surface in the U direction.

  • mults_v (list[int]) –

    The multiplicities of the knots of the surface in the V direction.

Methods:¤

copy ¤

copy() -> OCCNurbsSurface

Make an independent copy of the current surface.

from_extrusion classmethod ¤

from_extrusion(curve: Curve, vector: Vector) -> OCCNurbsSurface

Construct a NURBS surface from an extrusion of a basis curve.

Note that the extrusion surface is constructed by generating an infill between the basis curve and a translated copy with :meth:from_fill.

from_fill classmethod ¤

from_fill(curve1: OCCNurbsCurve, curve2: OCCNurbsCurve, curve3: OCCNurbsCurve | None = None, curve4: OCCNurbsCurve | None = None, style: Literal['stretch', 'coons', 'curved'] = 'stretch') -> OCCNurbsSurface

Construct a NURBS surface from the infill between two, three or four contiguous NURBS curves.

Parameters:

  • curve1 (OCCNurbsCurve) –

    The boundary curves.

  • curve2 (OCCNurbsCurve) –

    The boundary curves.

  • curve3 (OCCNurbsCurve) –

    The boundary curves.

  • curve4 (OCCNurbsCurve) –

    The boundary curves.

  • style (Literal['stretch', 'coons', 'curved'], default: 'stretch' ) –

    The fill style: 'stretch' (flattest), 'curved' (rounded), or 'coons' (between).

Raises:

  • ValueError

    If the fill style is not supported.

from_interpolation classmethod ¤

from_interpolation(points: list[list[Point]], precision: float = 0.001) -> OCCNurbsSurface

Construct a NURBS surface by approximating or interpolating a 2D collection of points.

from_native classmethod ¤

from_native(native_surface) -> OCCNurbsSurface

Construct a NURBS surface from an existing OCC surface handle.

from_parameters classmethod ¤

from_parameters(points: list[list[Point]], weights: list[list[float]], knots_u: list[float], knots_v: list[float], mults_u: list[int], mults_v: list[int], degree_u: int, degree_v: int, is_periodic_u: bool = False, is_periodic_v: bool = False) -> OCCNurbsSurface

Construct a NURBS surface from explicit parameters.

from_plane classmethod ¤

from_plane(plane: Plane) -> OCCNurbsSurface

Construct a NURBS surface from a plane.

from_points classmethod ¤

from_points(points: list[list[Point]], degree_u: int = 3, degree_v: int = 3) -> OCCNurbsSurface

Construct a NURBS surface from control points.