com.iver.cit.javacad.util
Class GisModelCurveCalculator

java.lang.Object
  extended bycom.iver.cit.javacad.util.GisModelCurveCalculator

public class GisModelCurveCalculator
extends java.lang.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 Summary
GisModelCurveCalculator()
           
 
Method Summary
static java.awt.geom.Point2D[] calculateGisModelArc(java.awt.geom.Point2D c, double r, double sa, double ea)
          This method calculates an array of Point2D that represents an arc.
static java.awt.geom.Point2D[] calculateGisModelBulge(java.awt.geom.Point2D[] newPts, double[] bulges)
          This method applies an array of bulges to an array of Point2D that defines a polyline.
static java.awt.geom.Point2D[] calculateGisModelCircle(java.awt.geom.Point2D c, double r)
          This method calculates an array of Point2D that represents a circle.
static java.awt.geom.Point2D[] calculateGisModelEllipse(java.awt.geom.Point2D center, java.awt.geom.Point2D majorAxisVector, double axisRatio, double initAngle, double endAngle)
          This method calculates an array of Point2D that represents a ellipse.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GisModelCurveCalculator

public GisModelCurveCalculator()
Method Detail

calculateGisModelCircle

public static java.awt.geom.Point2D[] calculateGisModelCircle(java.awt.geom.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 java.awt.geom.Point2D[] calculateGisModelEllipse(java.awt.geom.Point2D center,
                                                               java.awt.geom.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 java.awt.geom.Point2D[] calculateGisModelArc(java.awt.geom.Point2D c,
                                                           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:
c - Point2D that represents the center of the arc
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
Returns:
Point2D[] An array of Point2D that represents the shape of the arc

calculateGisModelBulge

public static java.awt.geom.Point2D[] calculateGisModelBulge(java.awt.geom.Point2D[] 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