SFCurve

Objective-C

@interface SFCurve : SFGeometry

Swift

class SFCurve : SFGeometry

The base type for all 1-dimensional geometry types. A 1-dimensional geometry is a geometry that has a length, but no area. A curve is considered simple if it does not intersect itself (except at the start and end point). A curve is considered closed its start and end point are coincident. A simple, closed curve is called a ring.

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithType:(enum SFGeometryType)geometryType
                         andHasZ:(BOOL)hasZ
                         andHasM:(BOOL)hasM;

    Swift

    init!(type geometryType: SFGeometryType, andHasZ hasZ: Bool, andHasM hasM: Bool)

    Parameters

    geometryType

    geometry type

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new curve

  • Get the start Point of this Curve

    Declaration

    Objective-C

    - (SFPoint *)startPoint;

    Swift

    func startPoint() -> SFPoint!

    Return Value

    start point

  • Get the end Point of this Curve

    Declaration

    Objective-C

    - (SFPoint *)endPoint;

    Swift

    func endPoint() -> SFPoint!

    Return Value

    end point

  • Determine if this Curve is closed (start point = end point)

    Declaration

    Objective-C

    - (BOOL)isClosed;

    Swift

    func isClosed() -> Bool

    Return Value

    true if closed

  • Determine if this Curve is a ring (closed and simple)

    Declaration

    Objective-C

    - (BOOL)isRing;

    Swift

    func isRing() -> Bool

    Return Value

    true if a ring