NurbsSurface

verb.geom.NurbsSurface

CLASS

Source code

A NURBS surface - this class represents the base class of many of verb's surface types and provides many tools for analysis and evaluation. This object is deliberately constrained to be immutable. The methods to inspect the properties of this class deliberately return copies. asNurbs can be used to obtain a simplified NurbsCurveData object that can be used with verb.core or for serialization purposes.

Under the hood, this type takes advantage of verb's asynchronous runtime using the _Async methods. Calling one of these methods returns a Promise that respect the You can find further documentation for this type at https://github.com/jdonaldson/promhx.

Extends: SerializableBase

Implements: ISurface

constructor

METHOD

Source code

new NurbsSurface(data : NurbsSurfaceData)

Construct a NurbsSurface by a NurbsSurfaceData object

params

returns

byKnotsControlPointsWeights

STATIC METHOD

Source code

byKnotsControlPointsWeights(degreeU : Int, degreeV : Int, knotsU : KnotArray, knotsV : KnotArray, controlPoints : Array<Array<Point>>, weights : Array<Array<Float>>) : NurbsSurface

Construct a NurbsSurface by degree, knots, control points, weights

params

returns

byCorners

STATIC METHOD

Source code

byCorners(point0 : Point, point1 : Point, point2 : Point, point3 : Point) : NurbsSurface

Construct a NurbsSurface from four perimeter points in counter-clockwise order

params

returns

byLoftingCurves

STATIC METHOD

Source code

byLoftingCurves(curves : Array<ICurve>, degreeV : Int) : NurbsSurface

Construct a NurbsSurface by lofting between a collection of curves

params

returns

degreeU

METHOD

Source code

degreeU() : Int

The degree in the U direction

degreeV

METHOD

Source code

degreeV() : Int

The degree in the V direction

knotsU

METHOD

Source code

knotsU() : Array<Float>

The knot array in the U direction

knotsV

METHOD

Source code

knotsV() : Array<Float>

The knot array in the V direction

controlPoints

METHOD

Source code

controlPoints() : Array<Array<Point>>

Two dimensional array of points

weights

METHOD

Source code

weights() : Array<Point>

Two dimensional array of weight values

asNurbs

METHOD

Source code

asNurbs() : NurbsSurfaceData

Obtain a copy of the underlying data structure for the Surface. Used with verb.core.

returns

clone

METHOD

Source code

clone() : NurbsSurface

Obtain a copy of the Surface

returns

domainU

METHOD

Source code

domainU() : Interval<Float>

The parametric domain in the U direction

returns

domainV

METHOD

Source code

domainV() : Interval<Float>

The parametric domain in the V direction

returns

point

METHOD

Source code

point(u : Float, v : Float) : Point

Obtain a point on the surface at the given parameter

params

returns

pointAsync

METHOD

Source code

pointAsync(u : Float, v : Float) : Promise<Point>

The async version of point

normal

METHOD

Source code

normal(u : Float, v : Float) : Point

Obtain the normal to the surface at the given parameter

params

returns

normalAsync

METHOD

Source code

normalAsync(u : Float, v : Float) : Promise<Array<Array<Vector>>>

The async version of normal

derivatives

METHOD

Source code

derivatives(u : Float, v : Float, numDerivs : Int) : Array<Array<Vector>>

Obtain the derivatives of the NurbsSurface. Returns a two dimensional array containing the derivative vectors. Increasing U partial derivatives are increasing row-wise. Increasing V partial derivatives are increasing column-wise. Therefore, the [0][0] position is a point on the surface, [n][0] is the nth V partial derivative, the [1][1] position is twist vector or mixed partial derivative Puv.

params

returns

derivativesAsync

METHOD

Source code

derivativesAsync(u : Float, v : Float, numDerivs : Int) : Promise<Array<Array<Vector>>>

The async version of derivatives

closestParam

METHOD

Source code

closestParam(pt : Point) : UV

Get the closest parameter on the surface to a point

params

returns

closestParamAsync

METHOD

Source code

closestParamAsync(pt : Point) : Promise<UV>

The async version of closestParam

closestPoint

METHOD

Source code

closestPoint(pt : Point) : Point

Get the closest point on the surface to a point

params

returns

closestPointAsync

METHOD

Source code

closestPointAsync(pt : Point) : Promise<Point>

The async version of closestParam

split

METHOD

Source code

split(u : Float, useV : Bool) : Array<NurbsSurface>

Split a surface

params

returns

splitAsync

METHOD

Source code

splitAsync(u : Float, useV : Bool) : Promise<Array<NurbsSurface>>

The async version of split

reverse

METHOD

Source code

reverse(useV : Bool) : NurbsSurface

Reverse the parameterization of the curve

params

returns

reverseAsync

METHOD

Source code

reverseAsync(useV : Bool) : Promise<NurbsSurface>

The async version of reverse

isocurve

METHOD

Source code

isocurve(u : Float, useV : Bool) : NurbsCurve

Extract an isocurve from a surface

params

returns

isocurveAsync

METHOD

Source code

isocurveAsync(u : Float, useV : Bool) : Promise<NurbsCurve>

The async version of isocurve

boundaries

METHOD

Source code

boundaries(options : AdaptiveRefinementOptions) : Array<NurbsCurve>

Extract the boundary curves from a surface

returns

boundariesAsync

METHOD

Source code

boundariesAsync(options : AdaptiveRefinementOptions) : Promise<Array<NurbsCurve>>

The async version of boundaries

tessellate

METHOD

Source code

tessellate(options : AdaptiveRefinementOptions) : MeshData

Tessellate the surface

params

returns

tessellateAsync

METHOD

Source code

tessellateAsync(options : AdaptiveRefinementOptions) : Promise<MeshData>

The async version of boundaries

transform

METHOD

Source code

transform(mat : Matrix) : NurbsSurface

Transform a Surface with the given matrix.

params

returns

transformAsync

METHOD

Source code

transformAsync(mat : Matrix) : Promise<NurbsSurface>

The async version of transform