Package org.gvsig.dwg.lib.util
Class GisModelCurveCalculator
java.lang.Object
org.gvsig.dwg.lib.util.GisModelCurveCalculator
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ListcalculateGisModelArc(double[] center, double r, double sa, double ea) This method calculates an array of Point2D that represents an arc.static ListcalculateGisModelBulge(List newPts, double[] bulges) This method applies an array of bulges to an array of Point2D that defines a polyline.static ListcalculateGisModelCircle(Point2D c, double r) This method calculates an array of Point2D that represents a circle.static ListcalculateGisModelEllipse(Point2D center, Point2D majorAxisVector, double axisRatio, double initAngle, double endAngle) This method calculates an array of Point2D that represents a ellipse.
-
Constructor Details
-
GisModelCurveCalculator
public GisModelCurveCalculator()
-
-
Method Details
-
calculateGisModelCircle
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 circler- 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 ellipsemajorAxisVector- Point2D that represents the vector for the major axisaxisRatio- double value that represents the axis ratioinitAngle- double value that represents the start angle of the ellipse arcendAngle- 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
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 arcsa- double value that represents the start angle of the arcea- double value that represents the end angle of the arcc- Point2D that represents the center of the arc- Returns:
- Point2D[] An array of Point2D that represents the shape of the arc
-
calculateGisModelBulge
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 polylinebulges- Array of bulge parameters- Returns:
- Polyline with a new set of arcs added and defined by the bulge parameters
-