Class GisModelCurveCalculator
- java.lang.Object
-
- org.hortonmachine.gears.io.dxfdwg.libs.dwg.utils.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 Summary
Constructors Constructor Description GisModelCurveCalculator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Point2D[]calculateGisModelArc(Point2D c, double r, double sa, double ea)This method calculates an array of Point2D that represents an arc.static Point2D[]calculateGisModelBulge(Point2D[] newPts, double[] bulges)This method applies an array of bulges to an array of Point2D that defines a polyline.static Point2D[]calculateGisModelCircle(Point2D c, double r)This method calculates an array of Point2D that represents a circle.static Point2D[]calculateGisModelEllipse(Point2D center, Point2D majorAxisVector, double axisRatio, double initAngle, double endAngle)This method calculates an array of Point2D that represents a ellipse.
-
-
-
Method Detail
-
calculateGisModelCircle
public static Point2D[] 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 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 Point2D[] 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
public static Point2D[] calculateGisModelArc(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 arcr- 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 arc- Returns:
- Point2D[] An array of Point2D that represents the shape of the arc
-
calculateGisModelBulge
public static Point2D[] calculateGisModelBulge(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 polylinebulges- Array of bulge parameters- Returns:
- Polyline with a new set of arcs added and defined by the bulge parameters
-
-