Search Results for

    Show / Hide Table of Contents

    Class CubicBezierCurve

    Creates a curved geometry by replacing the segments of the input with Cubic Bezier Curves.

    Inheritance
    object
    CubicBezierCurve
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Shape
    Assembly: NetTopologySuite.dll
    Syntax
    public class CubicBezierCurve
    Remarks

    The Bezier control points are determined from the segments of the geometry and the alpha control parameter controlling curvedness, and the optional skew parameter controlling the shape of the curve at vertices. The Bezier Curves are created to be C2-continuous (smooth) at each input vertex.

    Alternatively, the Bezier control points can be supplied explicitly.

    The result is not guaranteed to be valid, since large alpha values may cause self-intersections.

    Methods

    | Edit this page View Source

    Create(Geometry, Geometry)

    Creates a geometry of linearized Cubic Bezier Curves defined by the segments of the input and a list (or lists) of control points.

    Declaration
    public static Geometry Create(Geometry geom, Geometry controlPoints)
    Parameters
    Type Name Description
    Geometry geom

    The geometry defining the curve

    Geometry controlPoints

    A geometry containing the control point elements.

    Returns
    Type Description
    Geometry

    The linearized curved geometry

    Remarks

    Typically the control point geometry is a LineString or MultiLineString containing an element for each line or ring in the input geometry. The list of control points for each linear element must contain two vertices for each segment (and thus

    2 * npts - 2
    ).
    | Edit this page View Source

    Create(Geometry, double)

    Creates a geometry of linearized Cubic Bezier Curves defined by the segments of the input and a parameter controlling how curved the result should be.

    Declaration
    public static Geometry Create(Geometry geom, double alpha)
    Parameters
    Type Name Description
    Geometry geom

    The geometry defining the curve

    double alpha

    A curvedness parameter (0 is linear, 1 is round, >1 is increasingly curved)

    Returns
    Type Description
    Geometry

    The linearized curved geometry

    | Edit this page View Source

    Create(Geometry, double, double)

    Creates a geometry of linearized Cubic Bezier Curves defined by the segments of the inputand a parameter controlling how curved the result should be, with a skew factor affecting the curve shape at each vertex.

    Declaration
    public static Geometry Create(Geometry geom, double alpha, double skew)
    Parameters
    Type Name Description
    Geometry geom

    The geometry defining the curve

    double alpha

    The curvedness parameter (0 is linear, 1 is round, >1 is increasingly curved)

    double skew

    The skew parameter (0 is none, positive skews towards longer side, negative towards shorter

    Returns
    Type Description
    Geometry

    The linearized curved geometry

    | Edit this page View Source

    GetResult()

    Gets the computed Bezier curve geometry

    Declaration
    public Geometry GetResult()
    Returns
    Type Description
    Geometry

    The curved geometry

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX