protected void transformLimitedPath(GeoElement a, GeoElement b) {

    if (a instanceof GeoRay) {
      setTransformedObject(((GeoRay) a).getStartPoint(), ((GeoRay) b).getStartPoint());
      compute();
      setTransformedObject(a, b);
    } else if (a instanceof GeoSegment) {
      setTransformedObject(((GeoSegment) a).getStartPoint(), ((GeoSegment) b).getStartPoint());
      compute();
      setTransformedObject(((GeoSegment) a).getEndPoint(), ((GeoSegment) b).getEndPoint());
      compute();
      setTransformedObject(a, b);
    }
    if (a instanceof GeoConicPartND) {
      double p = ((GeoConicPartND) a).getParameterStart();
      double q = ((GeoConicPartND) a).getParameterEnd();
      // Application.debug(p+","+q);
      ((GeoConicPartND) b).setParameters(p, q, swapOrientation((GeoConicPartND) a));
    }
  }
 public boolean swapOrientation(GeoConicPartND p) {
   // Application.debug(positiveOrientation);
   return p == null || p.positiveOrientation();
 }