Class Curve

All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
BezierCurve, CircularArcBy3Points, CircularArcByBulge, CircularArcByCenterPoint, CompositeCurve, EllipticalArc, Line, Ring

public class Curve extends Geometry implements AutoCloseable
1-dimensional geometric primitive, representing the continuous image of a line.

One-dimensional geometries may be composed of simple curve segments where for adjacent curve segments the end and start point fall together to form a continuous geometry. A curve may be composed of curve segments that each have a different interpolation type. The most common use for curves is to have curve segments with the same interpolation type (e.g. polyline).

You can read more about the available geometries here.

  • Method Details Link icon

    • finalize Link icon

      protected void finalize()
      Overrides:
      finalize in class Geometry
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class Geometry
    • computePoint Link icon

      @NotNull public Coordinate computePoint(double parameter) throws IllegalArgumentException
      Computes a point of the curve, defined by the given parameter.

      1. At parameter 0, the point is the start point of the curve.
      2. At parameter 1, the point is the end point of the curve.
      Parameters:
      parameter - the parameter value, within [0,1], to compute the point location for.
      Returns:
      the computed point location.
      Throws:
      IllegalArgumentException - if parameter is not within [0,1], or if the point could not be computed. For example, when the curve is defined by invalid points.
    • getLength2D Link icon

      public double getLength2D() throws IllegalArgumentException
      Returns the length of the curve.
      Returns:
      the length of the curve.
      Throws:
      IllegalArgumentException - if the length could not be computed. For example, when the curve is defined by invalid points.