org.kabeja.dxf.helpers
Class PolylineSegment

java.lang.Object
  extended by org.kabeja.dxf.helpers.PolylineSegment

public class PolylineSegment
extends java.lang.Object

Author:
Field Summary
static double DELTA
           
 
Constructor Summary
PolylineSegment(DXFVertex start, DXFVertex end, DXFPolyline p)
           
 
Method Summary
 void connect(PolylineSegment next)
           
protected  void createCurvedTrapezium(DXFVertex start, DXFVertex end, double radius, double length)
           
protected  void createTrapezium(DXFVertex start, DXFVertex end)
           
 double getBulge()
           
 double getBulgeHeight()
           
 double getInnerRadius()
           
 double getOuterRadius()
           
 Point getPoint1()
           
 Point getPoint2()
           
 Point getPoint3()
           
 Point getPoint4()
           
 double getRadius()
           
protected  double getRadius(double bulge, double length)
          Caculate the radius of a cut circle segment between 2 DXFVertex
 boolean isBulged()
           
 void setBulged(boolean bulged)
           
 void setPoint1(Point point1)
           
 void setPoint2(Point point2)
           
 void setPoint3(Point point3)
           
 void setPoint4(Point point4)
           
 void setRadius(double radius)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELTA

public static double DELTA
Constructor Detail

PolylineSegment

public PolylineSegment(DXFVertex start,
                       DXFVertex end,
                       DXFPolyline p)
Method Detail

getBulge

public double getBulge()
Returns:
Returns the bulge.

isBulged

public boolean isBulged()
Returns:
Returns the bulged.

setBulged

public void setBulged(boolean bulged)
Parameters:
bulged - The bulged to set.

getPoint1

public Point getPoint1()
Returns:
Returns the point1.

setPoint1

public void setPoint1(Point point1)
Parameters:
point1 - The point1 to set.

getPoint2

public Point getPoint2()
Returns:
Returns the point2.

setPoint2

public void setPoint2(Point point2)
Parameters:
point2 - The point2 to set.

getPoint3

public Point getPoint3()
Returns:
Returns the point3.

setPoint3

public void setPoint3(Point point3)
Parameters:
point3 - The point3 to set.

getPoint4

public Point getPoint4()
Returns:
Returns the point4.

setPoint4

public void setPoint4(Point point4)
Parameters:
point4 - The point4 to set.

getRadius

public double getRadius()
Returns:
Returns the radius.

setRadius

public void setRadius(double radius)
Parameters:
radius - The radius to set.

createCurvedTrapezium

protected void createCurvedTrapezium(DXFVertex start,
                                     DXFVertex end,
                                     double radius,
                                     double length)

createTrapezium

protected void createTrapezium(DXFVertex start,
                               DXFVertex end)

getRadius

protected double getRadius(double bulge,
                           double length)
Caculate the radius of a cut circle segment between 2 DXFVertex

Parameters:
bulge - the vertex bulge
length - the length of the circle cut

getBulgeHeight

public double getBulgeHeight()
Returns:
Returns the bulgeHeight.

connect

public void connect(PolylineSegment next)

getInnerRadius

public double getInnerRadius()

getOuterRadius

public double getOuterRadius()