Class GisModelCurveCalculator

java.lang.Object
org.gvsig.dwg.lib.util.GisModelCurveCalculator

public class GisModelCurveCalculator extends Object
This class allows to obtain arcs and circles given by the most usual parameters, in a Gis geometry model. In this model, an arc or a circle is given by a set of points that defines it shape
Author:
jmorell
  • Constructor Details

    • GisModelCurveCalculator

      public GisModelCurveCalculator()
  • Method Details

    • calculateGisModelCircle

      public static List calculateGisModelCircle(Point2D c, double r)
      This method calculates an array of Point2D that represents a circle. The distance between it points is 1 angular unit
      Parameters:
      c - Point2D that represents the center of the circle
      r - double value that represents the radius of the circle
      Returns:
      Point2D[] An array of Point2D that represents the shape of the circle
    • calculateGisModelEllipse

      public static List calculateGisModelEllipse(Point2D center, Point2D majorAxisVector, double axisRatio, double initAngle, double endAngle)
      This method calculates an array of Point2D that represents a ellipse. The distance between it points is 1 angular unit
      Parameters:
      center - Point2D that represents the center of the ellipse
      majorAxisVector - Point2D that represents the vector for the major axis
      axisRatio - double value that represents the axis ratio
      initAngle - double value that represents the start angle of the ellipse arc
      endAngle - double value that represents the end angle of the ellipse arc
      Returns:
      Point2D[] An array of Point2D that represents the shape of the ellipse
    • calculateGisModelArc

      public static List calculateGisModelArc(double[] center, double r, double sa, double ea)
      This method calculates an array of Point2D that represents an arc. The distance between it points is 1 angular unit
      Parameters:
      r - double value that represents the radius of the arc
      sa - double value that represents the start angle of the arc
      ea - double value that represents the end angle of the arc
      c - Point2D that represents the center of the arc
      Returns:
      Point2D[] An array of Point2D that represents the shape of the arc
    • calculateGisModelBulge

      public static List calculateGisModelBulge(List newPts, double[] bulges)
      This method applies an array of bulges to an array of Point2D that defines a polyline. The result is a polyline with the input points with the addition of the points that define the new arcs added to the polyline
      Parameters:
      newPts - Base points of the polyline
      bulges - Array of bulge parameters
      Returns:
      Polyline with a new set of arcs added and defined by the bulge parameters