private void addFillet(Coordinate p,double startAngle,double endAngle,int direction,double radius){
  int directionFactor=direction == CGAlgorithms.CLOCKWISE ? -1 : 1;
  double totalAngle=Math.abs(startAngle - endAngle);
  int nSegs=(int)(totalAngle / filletAngleQuantum + 0.5);
  if (nSegs < 1)   return;
  double initAngle, currAngleInc;
  initAngle=0.0;
  currAngleInc=totalAngle / nSegs;
  double currAngle=initAngle;
  Coordinate pt=new Coordinate();
  while (currAngle < totalAngle) {
    double angle=startAngle + directionFactor * currAngle;
    pt.x=p.x + radius * Math.cos(angle);
    pt.y=p.y + radius * Math.sin(angle);
    segList.addPt(pt);
    currAngle+=currAngleInc;
  }
}

private void addFillet ( Coordinate p , double startAngle , double endAngle , int direction , double radius ) { int directionFactor = direction == CGAlgorithms . CLOCKWISE ? - 1 : 1 ; double totalAngle = Math . abs ( startAngle - endAngle ) ; int nSegs = ( int ) ( totalAngle / filletAngleQuantum + 0.5 ) ; if ( nSegs < 1 ) return ; double initAngle , currAngleInc ; initAngle = 0.0 ; currAngleInc = totalAngle / nSegs ; double currAngle = initAngle ; Coordinate pt = new Coordinate ( ) ; while ( currAngle < totalAngle ) { double angle = startAngle + directionFactor * currAngle ; pt . x = p . x + radius * Math . cos ( angle ) ; pt . y = p . y + radius * Math . sin ( angle ) ; segList . addPt ( pt ) ; currAngle += currAngleInc ; } }
adds points for a circular fillet arc between two specified angles . the start and end point for the fillet are not added - the caller must add them if required .
