Class NurbsSurface
Represents a NURBS surface. Contains properties and methods for operating with NURBS surfaces.
Inheritance
Implements
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class NurbsSurface : object, ISurface
Constructors
| Improve this Doc View SourceNurbsSurface(Matrix<Point4d>, Int32, Int32)
Initializes a new instance of NurbsSurface by it's control points and degrees.
Declaration
public NurbsSurface(Matrix<Point4d> controlPoints, int degreeU, int degreeV)
Parameters
Type | Name | Description |
---|---|---|
Matrix<Point4d> | controlPoints | Grid of control points for the surface. |
System.Int32 | degreeU | Degree of the surface in the U direction. |
System.Int32 | degreeV | Degree of the surface in the V direction. |
Fields
| Improve this Doc View SourceControlPoints
The surface's grid of control points.
Declaration
public readonly Matrix<Point4d> ControlPoints
Field Value
Type | Description |
---|---|
Matrix<Point4d> |
DegreeU
Surface's degree in the U direction
Declaration
public readonly int DegreeU
Field Value
Type | Description |
---|---|
System.Int32 |
DegreeV
Surface's degree in the V direction
Declaration
public readonly int DegreeV
Field Value
Type | Description |
---|---|
System.Int32 |
KnotsU
Knot vector in the U direction.
Declaration
public readonly List<double> KnotsU
Field Value
Type | Description |
---|---|
List<System.Double> |
KnotsV
Knot vector in the V direction.
Declaration
public readonly List<double> KnotsV
Field Value
Type | Description |
---|---|
List<System.Double> |
Properties
| Improve this Doc View SourceDomainU
Gets the domain in the U direction.
Declaration
public Interval DomainU { get; }
Property Value
Type | Description |
---|---|
Interval |
DomainV
Gets the domain in the V direction.
Declaration
public Interval DomainV { get; }
Property Value
Type | Description |
---|---|
Interval |
Methods
| Improve this Doc View SourceClosestPointTo(Point3d)
Compute the projection of a point on this surface.
Declaration
public Point3d ClosestPointTo(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to compute distance to. |
Returns
Type | Description |
---|---|
Point3d | Projected 3d point on the surface. |
CreateFlatSurface(Interval, Interval, Int32, Int32)
Creates a square flat surface on the XY Plane.
Declaration
public static NurbsSurface CreateFlatSurface(Interval xDimension, Interval yDimension, int xCount, int yCount)
Parameters
Type | Name | Description |
---|---|---|
Interval | xDimension | Dimension interval on the X direction. |
Interval | yDimension | Dimension interval on the Y direction. |
System.Int32 | xCount | Number of points on the X direction. |
System.Int32 | yCount | Number of points on the Y direction. |
Returns
Type | Description |
---|---|
NurbsSurface | Flat nurbs surface. |
DerivativesAt(Double, Double, Int32)
Computes the derivatives at at S(u,v).
Declaration
public Matrix<Vector3d> DerivativesAt(double u, double v, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U parameter to compute at. |
System.Double | v | V parameter to compute at. |
System.Int32 | count | Number of derivatives to compute. |
Returns
Type | Description |
---|---|
Matrix<Vector3d> | Computed derivatives. |
DistanceTo(Point3d)
Compute the distance between this surface and a point.
Declaration
public double DistanceTo(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to compute distance to. |
Returns
Type | Description |
---|---|
System.Double | Number representing the distance. |
FrameAt(Double, Double)
Compute the tangent plane at the specified surface coordinates.
Declaration
public Plane FrameAt(double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U coordinate. |
System.Double | v | V coordinate. |
Returns
Type | Description |
---|---|
Plane | Tangent plane. |
NormalAt(Double, Double)
Compute the normal at the specified surface coordinates.
Declaration
public Vector3d NormalAt(double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U coordinate. |
System.Double | v | V coordinate. |
Returns
Type | Description |
---|---|
Vector3d | Normal vector. |
PointAt(Double, Double)
Compute a point at the specified surface coordinates.
Declaration
public Point3d PointAt(double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U coordinate. |
System.Double | v | V coordinate. |
Returns
Type | Description |
---|---|
Point3d |