Package com.jsevy.jdxf
Class DXFSpline
- java.lang.Object
-
- com.jsevy.jdxf.DXFDatabaseObject
-
- com.jsevy.jdxf.DXFEntity
-
- com.jsevy.jdxf.DXFGraphicalEntity
-
- com.jsevy.jdxf.DXFSpline
-
- All Implemented Interfaces:
DXFObject
public class DXFSpline extends DXFGraphicalEntity
Class representing a general B-spline- Author:
- jsevy
-
-
Field Summary
-
Fields inherited from class com.jsevy.jdxf.DXFDatabaseObject
LINEWEIGHT_BYBLOCK, LINEWEIGHT_BYLAYER
-
-
Constructor Summary
Constructors Constructor Description DXFSpline(int degree, double[] controlPoints, double[] knots, DXFGraphics graphics)
Create a spline of specified degree for the specified control points, using supplied knot vector.DXFSpline(int degree, java.util.Vector<SplineControlPoint> controlPoints, boolean throughEndpoints, DXFGraphics graphics)
Create a spline of specified degree for the specified control points, using uniform knot vector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDXFHatchInfo()
java.lang.String
toDXFString()
Implementation of DXFObject interface method; creates DXF text representing the spline.-
Methods inherited from class com.jsevy.jdxf.DXFEntity
setPrecisionDigits
-
Methods inherited from class com.jsevy.jdxf.DXFDatabaseObject
getDXFLineWeight, getHandle, getHandleCount
-
-
-
-
Constructor Detail
-
DXFSpline
public DXFSpline(int degree, java.util.Vector<SplineControlPoint> controlPoints, boolean throughEndpoints, DXFGraphics graphics)
Create a spline of specified degree for the specified control points, using uniform knot vector.- Parameters:
degree
- Degree of the piecewise-polynomial spline segmentscontrolPoints
- Locations and weights of the control points for the splinethroughEndpoints
- If true, the spline will be forced to pass through the endpoints by setting the end control point multiplicities to degree + 1graphics
- The graphics object specifying parameters for this entity (color, thickness)
-
DXFSpline
public DXFSpline(int degree, double[] controlPoints, double[] knots, DXFGraphics graphics)
Create a spline of specified degree for the specified control points, using supplied knot vector.- Parameters:
degree
- Degree of the piecewise-polynomial spline segmentscontrolPoints
- Locations of the control points for the splineknots
- The knot sequence; length must be controlPoints.size() + degree + 1graphics
- The graphics object specifying parameters for this entity (color, thickness)
-
-
Method Detail
-
toDXFString
public java.lang.String toDXFString()
Implementation of DXFObject interface method; creates DXF text representing the spline.- Specified by:
toDXFString
in interfaceDXFObject
- Overrides:
toDXFString
in classDXFGraphicalEntity
-
getDXFHatchInfo
public java.lang.String getDXFHatchInfo()
- Overrides:
getDXFHatchInfo
in classDXFGraphicalEntity
-
-