Skip to content

OCCsurface ¤

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

Class representing a general surface object.

Parameters:

  • native_surface

    The native OCC surface handle wrapper.

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

    The name of the surface.

Attributes:

  • continuity

    The degree of continuity of the surface.

  • degree_u

    The degree of the surface in the U direction.

  • degree_v

    The degree of the surface in the V direction.

  • domain_u (tuple[float, float]) –

    The parameter domain of the surface in the U direction.

  • domain_v (tuple[float, float]) –

    The parameter domain of the surface in the V direction.

  • is_periodic_u (bool) –

    Flag indicating if the surface is periodic in the U direction.

  • is_periodic_v (bool) –

    Flag indicating if the surface is periodic in the V direction.

Methods:¤

aabb ¤

aabb(precision: float = 0.0, optimal: bool = False) -> Box

Compute the axis aligned bounding box of the surface.

boundary ¤

boundary() -> list[OCCCurve]

Compute the boundary curves of the surface.

closest_point ¤

closest_point(point: Point, return_parameters: bool = False) -> Point | tuple[Point, tuple[float, float]]

Compute the closest point on the surface to a given point.

copy ¤

copy() -> OCCSurface

Make an independent copy of the current surface.

curvature_at ¤

curvature_at(u: float, v: float) -> Vector

Compute the curvature at a point on the surface.

frame_at ¤

frame_at(u: float, v: float) -> Frame

Compute the local frame at a point on the surface.

from_face classmethod ¤

from_face(face) -> OCCSurface

Construct a surface from an existing OCC TopoDS_Face (Shape).

from_native classmethod ¤

from_native(native_surface) -> OCCSurface

Construct a surface from an existing OCC surface handle.

from_occ classmethod ¤

from_occ(native_surface) -> OCCSurface

Construct a surface from an existing OCC surface handle.

.. deprecated:: 1.3 Use from_native instead

gaussian_curvature_at ¤

gaussian_curvature_at(u: float, v: float) -> float

Compute the Gaussian curvature at a point on the surface.

intersections_with_curve ¤

intersections_with_curve(curve: OCCCurve) -> list[Point]

Compute the intersections with a curve.

intersections_with_line ¤

intersections_with_line(line: Line) -> list[Point]

Compute the intersections with a line.

isocurve_u ¤

isocurve_u(u: float) -> OCCCurve

Compute the isoparametric curve at parameter u.

isocurve_v ¤

isocurve_v(v: float) -> OCCCurve

Compute the isoparametric curve at parameter v.

mean_curvature_at ¤

mean_curvature_at(u: float, v: float) -> float

Compute the mean curvature at a point on the surface.

obb ¤

obb(precision: float = 0.0) -> Box

Compute the oriented bounding box of the surface.

point_at ¤

point_at(u: float, v: float) -> Point

Compute a point on the surface.

to_step ¤

to_step(filepath: str, schema: str = 'AP203') -> None

Write the surface geometry to a STP file.

to_tesselation ¤

to_tesselation() -> Mesh

Convert the surface to a triangle mesh.

transform ¤

transform(T: Transformation) -> None

Transform this surface.