Skip to content

BSpline3DService

Canonical path: NemAll_Python_Geometry.BSpline3DService

3D BSpline service

Methods:

AddControlPoint

AddControlPoint(pointIdx: int, coords: Point3D)

add control point to B-Spline

Parameters:

  • pointIdx (int) –

    index, where new point will be stored

  • coords (Point3D) –

    coordinates of point

AddControlPointOnSegment

AddControlPointOnSegment(ray: Vector3D, coords: Point3D) -> tuple

add control point to B-Spline's segment given by point

Parameters:

Returns:

  • tuple

    segment index

GetControlPointIndex

GetControlPointIndex(param: float) -> int

calculate control point index from parameter on B-Spline

Parameters:

  • param (float) –

    parameter on BSpline

InsertKnot

InsertKnot(param: float, numInsertionsMultiplicity: int)

Insert knot into bspline knot vector (compute new control points, preserve geometry)

Parameters:

  • param (float) –

    param to insert

  • numInsertionsMultiplicity (int) –

    multiplicity of new knot

IsValid

IsValid() -> bool

Check validity of service data

Returns:

  • bool

    bool valid = true

MoveStartPeriodic

MoveStartPeriodic(startParam: float)

Move start point in periodic BSpline

Parameters:

  • startParam (float) –

    start value for knot interval

PointModification

PointModification(
    pointsIdx: VecSizeTList,
    moveVector: Vector3D,
    isInterpolated: bool,
    hSet: HealingSettings,
)

move interpolated or control point of B-Spline

Parameters:

  • pointsIdx (VecSizeTList) –

    point indexes

  • moveVector (Vector3D) –

    move vector

  • isInterpolated (bool) –

    true if wanted to handle interpolated points

  • hSet (HealingSettings) –

    healing settings

RefineKnots

RefineKnots(knotvalues: VecDoubleList, knotMultiplicities: VecSizeTList)

Refine knots (insert knots if necessary)

Parameters:

RemoveControlPoint

RemoveControlPoint(pointIdx: int)

remove control point from B-Spline

Parameters:

  • pointIdx (int) –

    point index to remove

SetControlPoint

SetControlPoint(pointIdx: int, newCoords: Point3D)

set coordinates of control point of B-Spline

Parameters:

  • pointIdx (int) –

    point index

  • newCoords (Point3D) –

    new coordinates of point

SetDegree

SetDegree(degree: int)

set degree of B-Spline

Parameters:

  • degree (int) –

    new degree for B-Spline

SetInterpolatedPoint

SetInterpolatedPoint(pointIdx: int, newCoords: Point3D)

set coordinates of interpolated point of B-Spline

Parameters:

  • pointIdx (int) –

    point index

  • newCoords (Point3D) –

    new coordinates of point

SetPeriodic

SetPeriodic(periodic: bool)

set/unset periodic property of B-Spline

Parameters:

  • periodic (bool) –

    it true, B-Spline will be periodic, otherwise B-Spline will be open

__init__

__init__(bSpline: BSpline3D)

Constructor

Parameters:

  • bSpline (BSpline3D) –

    BSpline for the services