Skip to content

B Spline3D Service

Class full path: NemAll_Python_Geometry.BSpline3DService

3D BSpline service

Functions

AddControlPoint(pointIdx, coords)

add control point to B-Spline

Parameters:

Name Type Description Default
pointIdx int

index, where new point will be stored

required
coords Point3D

coordinates of point

required

AddControlPointOnSegment(ray, coords)

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

Parameters:

Name Type Description Default
ray Vector3D

view vector

required
coords Point3D

coordinates of point

required

Returns:

Type Description
int

segment index

GetControlPointIndex(param)

calculate control point index from parameter on B-Spline

Parameters:

Name Type Description Default
param float

parameter on BSpline

required

Returns:

Type Description
int

control point index

InsertKnot(param, numInsertionsMultiplicity)

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

Parameters:

Name Type Description Default
param float

param to insert

required
numInsertionsMultiplicity int

multiplicity of new knot

required

IsValid()

Check validity of service data

Returns:

Type Description
bool

bool valid = true

MoveStartPeriodic(startParam)

Move start point in periodic BSpline

Parameters:

Name Type Description Default
startParam float

start value for knot interval

required

PointModification(pointsIdx, moveVector, isInterpolated, hSet)

move interpolated or control point of B-Spline

Parameters:

Name Type Description Default
pointsIdx VecSizeTList

point indexes

required
moveVector Vector3D

move vector

required
isInterpolated bool

true if wanted to handle interpolated points

required
hSet object

healing settings

required

RefineKnots(knotvalues, knotMultiplicities)

Refine knots (insert knots if necessary)

Parameters:

Name Type Description Default
knotvalues VecDoubleList

knot values to refine

required
knotMultiplicities VecSizeTList

knot multiplicities

required

RemoveControlPoint(pointIdx)

remove control point from B-Spline

Parameters:

Name Type Description Default
pointIdx int

point index to remove

required

SetControlPoint(pointIdx, newCoords)

set coordinates of control point of B-Spline

Parameters:

Name Type Description Default
pointIdx int

point index

required
newCoords Point3D

new coordinates of point

required

SetDegree(degree)

set degree of B-Spline

Parameters:

Name Type Description Default
degree int

new degree for B-Spline

required

SetInterpolatedPoint(pointIdx, newCoords)

set coordinates of interpolated point of B-Spline

Parameters:

Name Type Description Default
pointIdx int

point index

required
newCoords Point3D

new coordinates of point

required

SetPeriodic(periodic)

set/unset periodic property of B-Spline

Parameters:

Name Type Description Default
periodic bool

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

required

__init__(bSpline)

Constructor

Parameters:

Name Type Description Default
bSpline BSpline3D

BSpline for the services

required