Convert path to line?

I have a vector shape. I want to take one side of the shape and take those points to make a new line. Thanks

I should also mention that the Knife tool can be used to open a closed path. I think the easiest way to do this is to drag with the Knife tool across a segment you'd like to delete. This creates a new point, and if you delete that point, the path will become an open one. (It's a bit mysterious how that works...)
You can also click the Knife tool on a point, but this typically creates two points in place of one, which I find a bit confusing. (Does it create just one new point? Or does it create two new points surrounding the original?)
You can also drag the Knife tool across the entire object. Come to think of it, this may be the best way to use this tool, as it seems to immediately split the closed path into two open paths. From there, you can select and delete the portion of the original object you don't need, and then continue to delete any unneeded points from the remaining open path with the Subselection tool.

Similar Messages

  • Convert photos to line drawings

    Would like to convert photos to line drawings to use as coloring books. Any help for a lightweight user would be appreciated.
    Thanks in advance

    Try the following:
    Duplicate your image (Control J, or Command J)
    Set your foreground and background colors to black and white (press D) for default
    Then go to:
    Filter
    Filter Gallery
    Sketch Folder
    Photocopy
    Slide the detail slider to 1 and the darkness slider to 50
    Depending on your photo you may wish to adjust these sliders for
    different results.
    Because you duplicated your original photo you also have the option of lowering the opacity of the sketch layer to reveal the partial color photo below.
    Anothering interesting twist is if you add a normal WHITE mask to the sketch layer then paint with a BLACK over parts of the sketch to reveil the colored photo below (half sketch and half photo).
    Attached is a link to a free plugin for Photoshop called THREDGEHOLDER, it does pretty much the same thing but even quicker.
    http://www.littleinkpot.co.uk/FreePlugins.htm
    Hope it works and have lots of fun in the process!

  • Only available option is convert path to extrusion?

    When I right click on a part of my image with the direct selection tool, only the option "convert path to extrusion" is available. How do I make the free transform option available again?

    Hi!
    Have you tried getting the move tool, and selecting "show transform controls" in its option bar? that way, you can scale them anytime.

  • Converting a multi-line text to one-line

    Hi
    I have a problem with a multi-line text, to be converted to one line, which I take from a JEditorPane.
    I tried several things but it is still multi line
    // the text is taken from JEditorPane
    String str = jeditorPane.getText();
    // replace "\n" with " "
    str.replaceAll("\\n", " ");or
    // the text is taken from JEditorPane
    String str = jeditorPane.getText();
    Scanner s = new Scanner(str);
    String line;
    String completeText="";
    while( ( line = str.nextLine() ) != null  ){
          completeText += line + " ";
    }In the fist code, it replaces all the "\n"'s with a space but it is still multi-line
    in the second one, it doesn't change anything
    So, what is wrong with these codes?
    p.s. In the second code there (may) be a little mistake causing compile time error, please ignore that, my problem is with the logic of the code
    thanks

    How do you know that the string is still multi-line after you have executed replaceAll? Have you tried to also remove all \r in the text?
    Kaj

  • Convert path line to polyline?

    Hello,
    anyone here know it's it's possible to convert a path into a polyline?
    I need to save SVG (but polyline, not path)
    Many thanks!
    r.

    Hi
    this is not the best way to do that, but all you need to do it better is inside this stuff (i hope).
    have a look at the examples at the bottom.
    cheers chris
    //11:28 12.03.2010
    //      www.ogebab.de
    //Extension for Illustrator javascript (CS+)
    ------OBJ---- overview----------
         Point()
              x, y
              many functions...
         Line()
              many functions...
         Bezier()
              A, B, C, D
              isLine()
              more functions...
         XpPoint()
              lDir, an, rDir | type: Point
              isCurvePoint()
         Xpath()
              pPoints |type: XpPoint
              beziers
              SetPath()
         Xitem()
              center
              setToCenter()
    //---------- little HELPERS----------------------
    var fmm = 72 / 25.4;
    function NumSort(a, b) {
         return a - b;
    fibonacci = function(n) {
         return Math.round(Math.pow((Math.sqrt(5) + 1) / 2, Math.abs(n))
                   / Math.sqrt(5))
                   * (n < 0 && n % 2 ? -1 : 1);
    function InVal(tx) {
         var inp, pt, t, num, d;
         inp = prompt(tx, "5");
         if (inp != "" && inp != null) {
              t = inp.search(",");
              if (t >= 0) {
                   inp = inp.replace(",", ".");
              t = inp.search("pt");
              if (t >= 0) {
                   pt = 1;
                   num = inp.slice(0, t);
              } else {
                   t = inp.search("mm");
                   if (t >= 0) {
                        pt = 0;
                        num = inp.slice(0, t);
                   } else {
                        t = inp.search("in");
                        if (t >= 0) {
                             pt = 2;
                             num = inp.slice(0, t);
                        } else {
                             pt = 0;
                             num = inp;
                   d = eval(num);
                   if (pt == 0) {
                        d = d * 72.0 / 25.4
                   } else {
                        if (pt == 2) {
                             d = d * 72.0
                   return (d);
              return (null);
    function InNum(tx, n) {
         var inp = prompt(tx, n), t = inp.search(",");
         if (t >= 0) {
              inp = inp.replace(",", ".");
         return eval(inp);
    function GetSelPaths() {
         var pf = app.activeDocument.pathItems, p = new Array();
         for ( var i68 = 0; i68 < pf.length; i68++) {
              if (pf[i68].selected == true) {
                   p.push(pf[i68]);
         return p;
    equate = function(a, b) {
         if (b >= 0)
              return a - b;
         return a + Math.abs(b)
    Array.prototype.turn1 = function() {
         var a = this.shift();
         return this.push(a);
    Array.prototype.insert = function(wert, stelle) {
         var a = this.slice(0, stelle), b = this.slice(stelle);
         b.unshift(wert);
         return (a.concat(b));
    //-----------------------OBJECTS---------------------------------------------------------------------------------------------------
    ////----------intersection section-----
    //--------ignore it until you understand the rest
    //--usage:       Var = new Intersection();
    //--               Var.IfIntersect(bezier,bezier); > if bezier is a line(and you know that), use Line.intersect() instead
    //--               returns Status and (if) Points/Vector2Ds
    //--- a tangent is not a intersection! similar points are SOMETIMES a intersection! ?
    //--------KevLinDev.com--------*  copyright 2002-2003, Kevin Lindsey-----
    Array.prototype.foreach=function(func){for(var i=0;i<this.length;i++)func(this[i]);};
    Array.prototype.map=function(func){var result=new Array();for(var i=0;i<this.length;i++)result.push(func(this[i]));return result;};
    Array.prototype.min=function(){var min=this[0];for(var i=0;i<this.length;i++)if(this[i]<min)min=this[i];return min;}
    Array.prototype.max=function(){var max=this[0];for(var i=0;i<this.length;i++)if(this[i]>max)max=this[i];return max;}
    Polynomial.TOLERANCE=1e-6;
    Polynomial.ACCURACY=6;
    function Polynomial(){this.init(arguments);}
    Polynomial.prototype.init=function(coefs){this.coefs=new Array();for(var i=coefs.length-1;i>=0;i--)this.coefs.push(coefs[i]);};
    Polynomial.prototype.eval=function(x){var result=0;for(var i=this.coefs.length-1;i>=0;i--)result=result*x+this.coefs[i];return result;};
    Polynomial.prototype.multiply=function(that){var result=new Polynomial();for(var i=0;i<=this.getDegree()+that.getDegree();i++)result.coefs.push(0);for(var i=0;i<=this.getDegree();i++)for(var j=0;j<=that.getDegree();j++)result.coefs[i+j]+=this.coefs[i]*that.coefs[j];return result;};
    Polynomial.prototype.divide_scalar=function(scalar){for(var i=0;i<this.coefs.length;i++)this.coefs[i]/=scalar;};
    Polynomial.prototype.simplify=function(){for(var i=this.getDegree();i>=0;i--){if(Math.abs(this.coefs[i])<=Polynomial.TOLERANCE)this.coefs.pop();else break;}};
    Polynomial.prototype.bisection=function(min,max){var minValue=this.eval(min);var maxValue=this.eval(max);var result;if(Math.abs(minValue)<=Polynomial.TOLERANCE)result=min;else if(Math.abs(maxValue)<=Polynomial.TOLERANCE)result=max;else if(minValue*maxValue<=0){var tmp1=Math.log(max-min);var tmp2=Math.log(10)*Polynomial.ACCURACY;var iters=Math.ceil((tmp1+tmp2)/Math.log(2));for(var i=0;i<iters;i++){result=0.5*(min+max);var value=this.eval(result);if(Math.abs(value)<=Polynomial.TOLERANCE){break;}if(value*minValue<0){max=result;maxValue=value;}else{min=result;minValue=value;}}}return result;};
    Polynomial.prototype.toString=function(){var coefs=new Array();var signs=new Array();for(var i=this.coefs.length-1;i>=0;i--){var value=this.coefs[i];if(value!=0){var sign=(value<0)?" - ":" + ";value=Math.abs(value);if(i>0)if(value==1)value="x";else value+="x";if(i>1)value+="^"+i;signs.push(sign);coefs.push(value);}}signs[0]=(signs[0]==" + ")?"":"-";var result="";for(var i=0;i<coefs.length;i++)result+=signs[i]+coefs[i];return result;};
    Polynomial.prototype.getDegree=function(){return this.coefs.length-1;};
    Polynomial.prototype.getDerivative=function(){var derivative=new Polynomial();for(var i=1;i<this.coefs.length;i++){derivative.coefs.push(i*this.coefs[i]);}return derivative;};
    Polynomial.prototype.getRoots=function(){var result;this.simplify();switch(this.getDegree()){case 0:result=new Array();break;case 1:result=this.getLinearRoot();break;case 2:result=this.getQuadraticRoots();break;case 3:result=this.getCubicRoots();break;case 4:result=this.getQuarticRoots();break;default:result=new Array();}return result;};
    Polynomial.prototype.getRootsInInterval=function(min,max){var roots=new Array();var root;if(this.getDegree()==1){root=this.bisection(min,max);if(root!=null)roots.push(root);}else{var deriv=this.getDerivative();var droots=deriv.getRootsInInterval(min,max);if(droots.length>0){root=this.bisection(min,droots[0]);if(root!=null)roots.push(root);for(var i=0;i<=droots.length-2;i++){root=this.bisection(droots[i],droots[i+1]);if(root!=null)roots.push(root);}root=this.bisection(droots[droots.length-1],max);if(root!=null)roots.push(root);}else{root=this.bisection(min,max);if(root!=null)roots.push(root);}}return roots;};
    Polynomial.prototype.getLinearRoot=function(){var result=new Array();var a=this.coefs[1];if(a!=0)result.push(-this.coefs[0]/a);return result;};
    Polynomial.prototype.getQuadraticRoots=function(){var results=new Array();if(this.getDegree()==2){var a=this.coefs[2];var b=this.coefs[1]/a;var c=this.coefs[0]/a;var d=b*b-4*c;if(d>0){var e=Math.sqrt(d);results.push(0.5*(-b+e));results.push(0.5*(-b-e));}else if(d==0){results.push(0.5*-b);}}return results;};
    Polynomial.prototype.getCubicRoots=function(){var results=new Array();if(this.getDegree()==3){var c3=this.coefs[3];var c2=this.coefs[2]/c3;var c1=this.coefs[1]/c3;var c0=this.coefs[0]/c3;var a=(3*c1-c2*c2)/3;var b=(2*c2*c2*c2-9*c1*c2+27*c0)/27;var offset=c2/3;var discrim=b*b/4 + a*a*a/27;var halfB=b/2;if(Math.abs(discrim)<=Polynomial.TOLERANCE)disrim=0;if(discrim>0){var e=Math.sqrt(discrim);var tmp;var root;tmp=-halfB+e;if(tmp>=0)root=Math.pow(tmp,1/3);else root=-Math.pow(-tmp,1/3);tmp=-halfB-e;if(tmp>=0)root+=Math.pow(tmp,1/3);else root-=Math.pow(-tmp,1/3);results.push(root-offset);}else if(discrim<0){var distance=Math.sqrt(-a/3);var angle=Math.atan2(Math.sqrt(-discrim),-halfB)/3;var cos=Math.cos(angle);var sin=Math.sin(angle);var sqrt3=Math.sqrt(3);results.push(2*distance*cos-offset);results.push(-distance*(cos+sqrt3*sin)-offset);results.push(-distance*(cos-sqrt3*sin)-offset);}else{var tmp;if(halfB>=0)tmp=-Math.pow(halfB,1/3);else tmp=Math.pow(-halfB,1/3);results.push(2*tmp-offset);results.push(-tmp-offset);}}return results;};
    Polynomial.prototype.getQuarticRoots=function(){var results=new Array();if(this.getDegree()==4){var c4=this.coefs[4];var c3=this.coefs[3]/c4;var c2=this.coefs[2]/c4;var c1=this.coefs[1]/c4;var c0=this.coefs[0]/c4;var resolveRoots=new Polynomial(1,-c2,c3*c1-4*c0,-c3*c3*c0+4*c2*c0-c1*c1).getCubicRoots();var y=resolveRoots[0];var discrim=c3*c3/4-c2+y;if(Math.abs(discrim)<=Polynomial.TOLERANCE)discrim=0;if(discrim>0){var e=Math.sqrt(discrim);var t1=3*c3*c3/4-e*e-2*c2;var t2=(4*c3*c2-8*c1-c3*c3*c3)/(4*e);var plus=t1+t2;var minus=t1-t2;if(Math.abs(plus)<=Polynomial.TOLERANCE)plus=0;if(Math.abs(minus)<=Polynomial.TOLERANCE)minus=0;if(plus>=0){var f=Math.sqrt(plus);results.push(-c3/4 + (e+f)/2);results.push(-c3/4 + (e-f)/2);}if(minus>=0){var f=Math.sqrt(minus);results.push(-c3/4 + (f-e)/2);results.push(-c3/4 - (f+e)/2);}}else if(discrim<0){}else{var t2=y*y-4*c0;if(t2>=-Polynomial.TOLERANCE){if(t2<0)t2=0;t2=2*Math.sqrt(t2);t1=3*c3*c3/4-2*c2;if(t1+t2>=Polynomial.TOLERANCE){var d=Math.sqrt(t1+t2);results.push(-c3/4 + d/2);results.push(-c3/4 - d/2);}if(t1-t2>=Polynomial.TOLERANCE){var d=Math.sqrt(t1-t2);results.push(-c3/4 + d/2);results.push(-c3/4 - d/2);}}}}return results;};
    function Vector2D(x,y){if(arguments.length>0){this.init(x,y);}}
    Vector2D.prototype.init=function(x,y){this.x=x;this.y=y;};
    Vector2D.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y);};
    Vector2D.prototype.dot=function(that){return this.x*that.x+this.y*that.y;};
    Vector2D.prototype.cross=function(that){return this.x*that.y-this.y*that.x;}
    Vector2D.prototype.unit=function(){return this.divide(this.length());};
    Vector2D.prototype.unitEquals=function(){this.divideEquals(this.length());return this;};
    Vector2D.prototype.add=function(that){return new Vector2D(this.x+that.x,this.y+that.y);};
    Vector2D.prototype.addEquals=function(that){this.x+=that.x;this.y+=that.y;return this;};
    Vector2D.prototype.subtract=function(that){return new Vector2D(this.x-that.x,this.y-that.y);};
    Vector2D.prototype.subtractEquals=function(that){this.x-=that.x;this.y-=that.y;return this;};
    Vector2D.prototype.multiply=function(scalar){return new Vector2D(this.x*scalar,this.y*scalar);};
    Vector2D.prototype.multiplyEquals=function(scalar){this.x*=scalar;this.y*=scalar;return this;};
    Vector2D.prototype.divide=function(scalar){return new Vector2D(this.x/ scalar, this.y /scalar);};
    Vector2D.prototype.divideEquals=function(scalar){this.x/=scalar;this.y/=scalar;return this;};
    Vector2D.prototype.perp=function(){return new Vector2D(-this.y,this.x);};
    Vector2D.fromPoints=function(p1,p2){return new Vector2D(p2.x-p1.x,p2.y-p1.y);};
    Vector2D.prototype.Dot=function (d){
         var ell=app.activeDocument.pathItems.ellipse(this.y + d/2 , this.x - d/2 ,d,d);
         ell.selected=false; return ell
    function Intersection(status){if(arguments.length>0){this.init(status);}}
    Intersection.prototype.init=function(status){this.status=status;this.points=new Array();};
    Intersection.prototype.appendPoint=function(point){this.points.push(point);};
    Intersection.prototype.appendPoints=function(points){this.points=this.points.concat(points);};
    //-by ogebab---Gibt zurück: IntersectionObjekt (Obj.status / Obj.points / Obj.points.t1 / Obj.points.t2)
    Intersection.prototype.IfInterSect=function(seg1,seg2){
         var result;
         if(seg1.type=="bez"){
              if(seg2.type=="line"){
                   result=Intersection.intersectBezier3Line(seg1,seg2);
              }else{
                   result=Intersection.intersectBezier3Bezier3(seg1,seg2);
         }else{
              if(seg2.type=="bez"){
                   result=Intersection.intersectBezier3Line(seg2,seg1);
              }else{
                   result=Intersection.intersectLineLine(seg2,seg1);
         if(result.status=="Intersection"){
              for(var i=0;i<result.points.length ;i++){
                   if(seg1.type=="line"){
                        result.points[i].t1=getTOfPointOnLine(result.points[i], seg1);
                   }else{
                        result.points[i].t1=getTOfPointOnCubicCurve(result.points[i], seg1);
                   if(seg2.type=="line"){
                        result.points[i].t2=getTOfPointOnLine(result.points[i], seg2);
                   }else{
                        result.points[i].t2=getTOfPointOnCubicCurve(result.points[i], seg2);
         return result
    //--(bez, bez)
    Intersection.intersectBezier3Bezier3=function(seg1,seg2){var a,b,c,d;var c13,c12,c11,c10;var c23,c22,c21,c20;var result=new Intersection("No Intersection");a=seg1.A.multiply(-1);b=seg1.B.multiply(3);c=seg1.C.multiply(-3);d=a.add(b.add(c.add(seg1.D)));c13=new Vector2D(d.x,d.y);a=seg1.A.multiply(3);b=seg1.B.multiply(-6);c=seg1.C.multiply(3);d=a.add(b.add(c));c12=new Vector2D(d.x,d.y);a=seg1.A.multiply(-3);b=seg1.B.multiply(3);c=a.add(b);c11=new Vector2D(c.x,c.y);c10=new Vector2D(seg1.A.x,seg1.A.y);a=seg2.A.multiply(-1);b=seg2.B.multiply(3);c=seg2.C.multiply(-3);d=a.add(b.add(c.add(seg2.D)));c23=new Vector2D(d.x,d.y);a=seg2.A.multiply(3);b=seg2.B.multiply(-6);c=seg2.C.multiply(3);d=a.add(b.add(c));c22=new Vector2D(d.x,d.y);a=seg2.A.multiply(-3);b=seg2.B.multiply(3);c=a.add(b);c21=new Vector2D(c.x,c.y);c20=new Vector2D(seg2.A.x,seg2.A.y);var c10x2=c10.x*c10.x;var c10x3=c10.x*c10.x*c10.x;var c10y2=c10.y*c10.y;var c10y3=c10.y*c10.y*c10.y;var c11x2=c11.x*c11.x;var c11x3=c11.x*c11.x*c11.x;var c11y2=c11.y*c11.y;var c11y3=c11.y*c11.y*c11.y;var c12x2=c12.x*c12.x;var c12x3=c12.x*c12.x*c12.x;var c12y2=c12.y*c12.y;var c12y3=c12.y*c12.y*c12.y;var c13x2=c13.x*c13.x;var c13x3=c13.x*c13.x*c13.x;var c13y2=c13.y*c13.y;var c13y3=c13.y*c13.y*c13.y;var c20x2=c20.x*c20.x;var c20x3=c20.x*c20.x*c20.x;var c20y2=c20.y*c20.y;var c20y3=c20.y*c20.y*c20.y;var c21x2=c21.x*c21.x;var c21x3=c21.x*c21.x*c21.x;var c21y2=c21.y*c21.y;var c22x2=c22.x*c22.x;var c22x3=c22.x*c22.x*c22.x;var c22y2=c22.y*c22.y;var c23x2=c23.x*c23.x;var c23x3=c23.x*c23.x*c23.x;var c23y2=c23.y*c23.y;var c23y3=c23.y*c23.y*c23.y;var poly=new Polynomial(-c13x3*c23y3+c13y3*c23x3-3*c13.x*c13y2*c23x2*c23.y+3*c13x2*c13.y*c23.x*c23y2,-6*c13.x*c22.x*c13y2*c23.x*c23.y+6*c13x2*c13.y*c22.y*c23.x*c23.y+3*c22.x*c13y3*c23x2-3*c13x3*c22.y*c23y2-3*c13.x*c13y2*c22.y*c23x2+3*c13x2*c22.x*c13.y*c23y2,-6*c21.x*c13.x*c13y2*c23.x*c23.y-6*c13.x*c22.x*c13y2*c22.y*c23.x+6*c13x2*c22.x*c13.y*c22.y*c23.y+3*c21.x*c13y3*c23x2+3*c22x2*c13y3*c23.x+3*c21.x*c13x2*c13.y*c23y2-3*c13.x*c21.y*c13y2*c23x2-3*c13.x*c22x2*c13y2*c23.y+c13x2*c13.y*c23.x*(6*c21.y*c23.y+3*c22y2)+c13x3*(-c21.y*c23y2-2*c22y2*c23.y-c23.y*(2*c21.y*c23.y+c22y2)),c11.x*c12.y*c13.x*c13.y*c23.x*c23.y-c11.y*c12.x*c13.x*c13.y*c23.x*c23.y+6*c21.x*c22.x*c13y3*c23.x+3*c11.x*c12.x*c13.x*c13.y*c23y2+6*c10.x*c13.x*c13y2*c23.x*c23.y-3*c11.x*c12.x*c13y2*c23.x*c23.y-3*c11.y*c12.y*c13.x*c13.y*c23x2-6*c10.y*c13x2*c13.y*c23.x*c23.y-6*c20.x*c13.x*c13y2*c23.x*c23.y+3*c11.y*c12.y*c13x2*c23.x*c23.y-2*c12.x*c12y2*c13.x*c23.x*c23.y-6*c21.x*c13.x*c22.x*c13y2*c23.y-6*c21.x*c13.x*c13y2*c22.y*c23.x-6*c13.x*c21.y*c22.x*c13y2*c23.x+6*c21.x*c13x2*c13.y*c22.y*c23.y+2*c12x2*c12.y*c13.y*c23.x*c23.y+c22x3*c13y3-3*c10.x*c13y3*c23x2+3*c10.y*c13x3*c23y2+3*c20.x*c13y3*c23x2+c12y3*c13.x*c23x2-c12x3*c13.y*c23y2-3*c10.x*c13x2*c13.y*c23y2+3*c10.y*c13.x*c13y2*c23x2-2*c11.x*c12.y*c13x2*c23y2+c11.x*c12.y*c13y2*c23x2-c11.y*c12.x*c13x2*c23y2+2*c11.y*c12.x*c13y2*c23x2+3*c20.x*c13x2*c13.y*c23y2-c12.x*c12y2*c13.y*c23x2-3*c20.y*c13.x*c13y2*c23x2+c12x2*c12.y*c13.x*c23y2-3*c13.x*c22x2*c13y2*c22.y+c13x2*c13.y*c23.x*(6*c20.y*c23.y+6*c21.y*c22.y)+c13x2*c22.x*c13.y*(6*c21.y*c23.y+3*c22y2)+c13x3*(-2*c21.y*c22.y*c23.y-c20.y*c23y2-c22.y*(2*c21.y*c23.y+c22y2)-c23.y*(2*c20.y*c23.y+2*c21.y*c22.y)),6*c11.x*c12.x*c13.x*c13.y*c22.y*c23.y+c11.x*c12.y*c13.x*c22.x*c13.y*c23.y+c11.x*c12.y*c13.x*c13.y*c22.y*c23.x-c11.y*c12.x*c13.x*c22.x*c13.y*c23.y-c11.y*c12.x*c13.x*c13.y*c22.y*c23.x-6*c11.y*c12.y*c13.x*c22.x*c13.y*c23.x-6*c10.x*c22.x*c13y3*c23.x+6*c20.x*c22.x*c13y3*c23.x+6*c10.y*c13x3*c22.y*c23.y+2*c12y3*c13.x*c22.x*c23.x-2*c12x3*c13.y*c22.y*c23.y+6*c10.x*c13.x*c22.x*c13y2*c23.y+6*c10.x*c13.x*c13y2*c22.y*c23.x+6*c10.y*c13.x*c22.x*c13y2*c23.x-3*c11.x*c12.x*c22.x*c13y2*c23.y-3*c11.x*c12.x*c13y2*c22.y*c23.x+2*c11.x*c12.y*c22.x*c13y2*c23.x+4*c11.y*c12.x*c22.x*c13y2*c23.x-6*c10.x*c13x2*c13.y*c22.y*c23.y-6*c10.y*c13x2*c22.x*c13.y*c23.y-6*c10.y*c13x2*c13.y*c22.y*c23.x-4*c11.x*c12.y*c13x2*c22.y*c23.y-6*c20.x*c13.x*c22.x*c13y2*c23.y-6*c20.x*c13.x*c13y2*c22.y*c23.x-2*c11.y*c12.x*c13x2*c22.y*c23.y+3*c11.y*c12.y*c13x2*c22.x*c23.y+3*c11.y*c12.y*c13x2*c22.y*c23.x-2*c12.x*c12y2*c13.x*c22.x*c23.y-2*c12.x*c12y2*c13.x*c22.y*c23.x-2*c12.x*c12y2*c22.x*c13.y*c23.x-6*c20.y*c13.x*c22.x*c13y2*c23.x-6*c21.x*c13.x*c21.y*c13y2*c23.x-6*c21.x*c13.x*c22.x*c13y2*c22.y+6*c20.x*c13x2*c13.y*c22.y*c23.y+2*c12x2*c12.y*c13.x*c22.y*c23.y+2*c12x2*c12.y*c22.x*c13.y*c23.y+2*c12x2*c12.y*c13.y*c22.y*c23.x+3*c21.x*c22x2*c13y3+3*c21x2*c13y3*c23.x-3*c13.x*c21.y*c22x2*c13y2-3*c21x2*c13.x*c13y2*c23.y+c13x2*c22.x*c13.y*(6*c20.y*c23.y+6*c21.y*c22.y)+c13x2*c13.y*c23.x*(6*c20.y*c22.y+3*c21y2)+c21.x*c13x2*c13.y*(6*c21.y*c23.y+3*c22y2)+c13x3*(-2*c20.y*c22.y*c23.y-c23.y*(2*c20.y*c22.y+c21y2)-c21.y*(2*c21.y*c23.y+c22y2)-c22.y*(2*c20.y*c23.y+2*c21.y*c22.y)),c11.x*c21.x*c12.y*c13.x*c13.y*c23.y+c11.x*c12.y*c13.x*c21.y*c13.y*c23.x+c11.x*c12.y*c13.x*c22.x*c13.y*c22.y-c11.y*c12.x*c21.x*c13.x*c13.y*c23.y-c11.y*c12.x*c13.x*c21.y*c13.y*c23.x-c11.y*c12.x*c13.x*c22.x*c13.y*c22.y-6*c11.y*c21.x*c12.y*c13.x*c13.y*c23.x-6*c10.x*c21.x*c13y3*c23.x+6*c20.x*c21.x*c13y3*c23.x+2*c21.x*c12y3*c13.x*c23.x+6*c10.x*c21.x*c13.x*c13y2*c23.y+6*c10.x*c13.x*c21.y*c13y2*c23.x+6*c10.x*c13.x*c22.x*c13y2*c22.y+6*c10.y*c21.x*c13.x*c13y2*c23.x-3*c11.x*c12.x*c21.x*c13y2*c23.y-3*c11.x*c12.x*c21.y*c13y2*c23.x-3*c11.x*c12.x*c22.x*c13y2*c22.y+2*c11.x*c21.x*c12.y*c13y2*c23.x+4*c11.y*c12.x*c21.x*c13y2*c23.x-6*c10.y*c21.x*c13x2*c13.y*c23.y-6*c10.y*c13x2*c21.y*c13.y*c23.x-6*c10.y*c13x2*c22.x*c13.y*c22.y-6*c20.x*c21.x*c13.x*c13y2*c23.y-6*c20.x*c13.x*c21.y*c13y2*c23.x-6*c20.x*c13.x*c22.x*c13y2*c22.y+3*c11.y*c21.x*c12.y*c13x2*c23.y-3*c11.y*c12.y*c13.x*c22x2*c13.y+3*c11.y*c12.y*c13x2*c21.y*c23.x+3*c11.y*c12.y*c13x2*c22.x*c22.y-2*c12.x*c21.x*c12y2*c13.x*c23.y-2*c12.x*c21.x*c12y2*c13.y*c23.x-2*c12.x*c12y2*c13.x*c21.y*c23.x-2*c12.x*c12y2*c13.x*c22.x*c22.y-6*c20.y*c21.x*c13.x*c13y2*c23.x-6*c21.x*c13.x*c21.y*c22.x*c13y2+6*c20.y*c13x2*c21.y*c13.y*c23.x+2*c12x2*c21.x*c12.y*c13.y*c23.y+2*c12x2*c12.y*c21.y*c13.y*c23.x+2*c12x2*c12.y*c22.x*c13.y*c22.y-3*c10.x*c22x2*c13y3+3*c20.x*c22x2*c13y3+3*c21x2*c22.x*c13y3+c12y3*c13.x*c22x2+3*c10.y*c13.x*c22x2*c13y2+c11.x*c12.y*c22x2*c13y2+2*c11.y*c12.x*c22x2*c13y2-c12.x*c12y2*c22x2*c13.y-3*c20.y*c13.x*c22x2*c13y2-3*c21x2*c13.x*c13y2*c22.y+c12x2*c12.y*c13.x*(2*c21.y*c23.y+c22y2)+c11.x*c12.x*c13.x*c13.y*(6*c21.y*c23.y+3*c22y2)+c21.x*c13x2*c13.y*(6*c20.y*c23.y+6*c21.y*c22.y)+c12x3*c13.y*(-2*c21.y*c23.y-c22y2)+c10.y*c13x3*(6*c21.y*c23.y+3*c22y2)+c11.y*c12.x*c13x2*(-2*c21.y*c23.y-c22y2)+c11.x*c12.y*c13x2*(-4*c21.y*c23.y-2*c22y2)+c10.x*c13x2*c13.y*(-6*c21.y*c23.y-3*c22y2)+c13x2*c22.x*c13.y*(6*c20.y*c22.y+3*c21y2)+c20.x*c13x2*c13.y*(6*c21.y*c23.y+3*c22y2)+c13x3*(-2*c20.y*c21.y*c23.y-c22.y*(2*c20.y*c22.y+c21y2)-c20.y*(2*c21.y*c23.y+c22y2)-c21.y*(2*c20.y*c23.y+2*c21.y*c22.y)),-c10.x*c11.x*c12.y*c13.x*c13.y*c23.y+c10.x*c11.y*c12.x*c13.x*c13.y*c23.y+6*c10.x*c11.y*c12.y*c13.x*c13.y*c23.x-6*c10.y*c11.x*c12.x*c13.x*c13.y*c23.y-c10.y*c11.x*c12.y*c13.x*c13.y*c23.x+c10.y*c11.y*c12.x*c13.x*c13.y*c23.x+c11.x*c11.y*c12.x*c12.y*c13.x*c23.y-c11.x*c11.y*c12.x*c12.y*c13.y*c23.x+c11.x*c20.x*c12.y*c13.x*c13.y*c23.y+c11.x*c20.y*c12.y*c13.x*c13.y*c23.x+c11.x*c21.x*c12.y*c13.x*c13.y*c22.y+c11.x*c12.y*c13.x*c21.y*c22.x*c13.y-c20.x*c11.y*c12.x*c13.x*c13.y*c23.y-6*c20.x*c11.y*c12.y*c13.x*c13.y*c23.x-c11.y*c12.x*c20.y*c13.x*c13.y*c23.x-c11.y*c12.x*c21.x*c13.x*c13.y*c22.y-c11.y*c12.x*c13.x*c21.y*c22.x*c13.y-6*c11.y*c21.x*c12.y*c13.x*c22.x*c13.y-6*c10.x*c20.x*c13y3*c23.x-6*c10.x*c21.x*c22.x*c13y3-2*c10.x*c12y3*c13.x*c23.x+6*c20.x*c21.x*c22.x*c13y3+2*c20.x*c12y3*c13.x*c23.x+2*c21.x*c12y3*c13.x*c22.x+2*c10.y*c12x3*c13.y*c23.y-6*c10.x*c10.y*c13.x*c13y2*c23.x+3*c10.x*c11.x*c12.x*c13y2*c23.y-2*c10.x*c11.x*c12.y*c13y2*c23.x-4*c10.x*c11.y*c12.x*c13y2*c23.x+3*c10.y*c11.x*c12.x*c13y2*c23.x+6*c10.x*c10.y*c13x2*c13.y*c23.y+6*c10.x*c20.x*c13.x*c13y2*c23.y-3*c10.x*c11.y*c12.y*c13x2*c23.y+2*c10.x*c12.x*c12y2*c13.x*c23.y+2*c10.x*c12.x*c12y2*c13.y*c23.x+6*c10.x*c20.y*c13.x*c13y2*c23.x+6*c10.x*c21.x*c13.x*c13y2*c22.y+6*c10.x*c13.x*c21.y*c22.x*c13y2+4*c10.y*c11.x*c12.y*c13x2*c23.y+6*c10.y*c20.x*c13.x*c13y2*c23.x+2*c10.y*c11.y*c12.x*c13x2*c23.y-3*c10.y*c11.y*c12.y*c13x2*c23.x+2*c10.y*c12.x*c12y2*c13.x*c23.x+6*c10.y*c21.x*c13.x*c22.x*c13y2-3*c11.x*c20.x*c12.x*c13y2*c23.y+2*c11.x*c20.x*c12.y*c13y2*c23.x+c11.x*c11.y*c12y2*c13.x*c23.x-3*c11.x*c12.x*c20.y*c13y2*c23.x-3*c11.x*c12.x*c21.x*c13y2*c22.y-3*c11.x*c12.x*c21.y*c22.x*c13y2+2*c11.x*c21.x*c12.y*c22.x*c13y2+4*c20.x*c11.y*c12.x*c13y2*c23.x+4*c11.y*c12.x*c21.x*c22.x*c13y2-2*c10.x*c12x2*c12.y*c13.y*c23.y-6*c10.y*c20.x*c13x2*c13.y*c23.y-6*c10.y*c20.y*c13x2*c13.y*c23.x-6*c10.y*c21.x*c13x2*c13.y*c22.y-2*c10.y*c12x2*c12.y*c13.x*c23.y-2*c10.y*c12x2*c12.y*c13.y*c23.x-6*c10.y*c13x2*c21.y*c22.x*c13.y-c11.x*c11.y*c12x2*c13.y*c23.y-2*c11.x*c11y2*c13.x*c13.y*c23.x+3*c20.x*c11.y*c12.y*c13x2*c23.y-2*c20.x*c12.x*c12y2*c13.x*c23.y-2*c20.x*c12.x*c12y2*c13.y*c23.x-6*c20.x*c20.y*c13.x*c13y2*c23.x-6*c20.x*c21.x*c13.x*c13y2*c22.y-6*c20.x*c13.x*c21.y*c22.x*c13y2+3*c11.y*c20.y*c12.y*c13x2*c23.x+3*c11.y*c21.x*c12.y*c13x2*c22.y+3*c11.y*c12.y*c13x2*c21.y*c22.x-2*c12.x*c20.y*c12y2*c13.x*c23.x-2*c12.x*c21.x*c12y2*c13.x*c22.y-2*c12.x*c21.x*c12y2*c22.x*c13.y-2*c12.x*c12y2*c13.x*c21.y*c22.x-6*c20.y*c21.x*c13.x*c22.x*c13y2-c11y2*c12.x*c12.y*c13.x*c23.x+2*c20.x*c12x2*c12.y*c13.y*c23.y+6*c20.y*c13x2*c21.y*c22.x*c13.y+2*c11x2*c11.y*c13.x*c13.y*c23.y+c11x2*c12.x*c12.y*c13.y*c23.y+2*c12x2*c20.y*c12.y*c13.y*c23.x+2*c12x2*c21.x*c12.y*c13.y*c22.y+2*c12x2*c12.y*c21.y*c22.x*c13.y+c21x3*c13y3+3*c10x2*c13y3*c23.x-3*c10y2*c13x3*c23.y+3*c20x2*c13y3*c23.x+c11y3*c13x2*c23.x-c11x3*c13y2*c23.y-c11.x*c11y2*c13x2*c23.y+c11x2*c11.y*c13y2*c23.x-3*c10x2*c13.x*c13y2*c23.y+3*c10y2*c13x2*c13.y*c23.x-c11x2*c12y2*c13.x*c23.y+c11y2*c12x2*c13.y*c23.x-3*c21x2*c13.x*c21.y*c13y2-3*c20x2*c13.x*c13y2*c23.y+3*c20y2*c13x2*c13.y*c23.x+c11.x*c12.x*c13.x*c13.y*(6*c20.y*c23.y+6*c21.y*c22.y)+c12x3*c13.y*(-2*c20.y*c23.y-2*c21.y*c22.y)+c10.y*c13x3*(6*c20.y*c23.y+6*c21.y*c22.y)+c11.y*c12.x*c13x2*(-2*c20.y*c23.y-2*c21.y*c22.y)+c12x2*c12.y*c13.x*(2*c20.y*c23.y+2*c21.y*c22.y)+c11.x*c12.y*c13x2*(-4*c20.y*c23.y-4*c21.y*c22.y)+c10.x*c13x2*c13.y*(-6*c20.y*c23.y-6*c21.y*c22.y)+c20.x*c13x2*c13.y*(6*c20.y*c23.y+6*c21.y*c22.y)+c21.x*c13x2*c13.y*(6*c20.y*c22.y+3*c21y2)+c13x3*(-2*c20.y*c21.y*c22.y-c20y2*c23.y-c21.y*(2*c20.y*c22.y+c21y2)-c20.y*(2*c20.y*c23.y+2*c21.y*c22.y)),-c10.x*c11.x*c12.y*c13.x*c13.y*c22.y+c10.x*c11.y*c12.x*c13.x*c13.y*c22.y+6*c10.x*c11.y*c12.y*c13.x*c22.x*c13.y-6*c10.y*c11.x*c12.x*c13.x*c13.y*c22.y-c10.y*c11.x*c12.y*c13.x*c22.x*c13.y+c10.y*c11.y*c12.x*c13.x*c22.x*c13.y+c11.x*c11.y*c12.x*c12.y*c13.x*c22.y-c11.x*c11.y*c12.x*c12.y*c22.x*c13.y+c11.x*c20.x*c12.y*c13.x*c13.y*c22.y+c11.x*c20.y*c12.y*c13.x*c22.x*c13.y+c11.x*c21.x*c12.y*c13.x*c21.y*c13.y-c20.x*c11.y*c12.x*c13.x*c13.y*c22.y-6*c20.x*c11.y*c12.y*c13.x*c22.x*c13.y-c11.y*c12.x*c20.y*c13.x*c22.x*c13.y-c11.y*c12.x*c21.x*c13.x*c21.y*c13.y-6*c10.x*c20.x*c22.x*c13y3-2*c10.x*c12y3*c13.x*c22.x+2*c20.x*c12y3*c13.x*c22.x+2*c10.y*c12x3*c13.y*c22.y-6*c10.x*c10.y*c13.x*c22.x*c13y2+3*c10.x*c11.x*c12.x*c13y2*c22.y-2*c10.x*c11.x*c12.y*c22.x*c13y2-4*c10.x*c11.y*c12.x*c22.x*c13y2+3*c10.y*c11.x*c12.x*c22.x*c13y2+6*c10.x*c10.y*c13x2*c13.y*c22.y+6*c10.x*c20.x*c13.x*c13y2*c22.y-3*c10.x*c11.y*c12.y*c13x2*c22.y+2*c10.x*c12.x*c12y2*c13.x*c22.y+2*c10.x*c12.x*c12y2*c22.x*c13.y+6*c10.x*c20.y*c13.x*c22.x*c13y2+6*c10.x*c21.x*c13.x*c21.y*c13y2+4*c10.y*c11.x*c12.y*c13x2*c22.y+6*c10.y*c20.x*c13.x*c22.x*c13y2+2*c10.y*c11.y*c12.x*c13x2*c22.y-3*c10.y*c11.y*c12.y*c13x2*c22.x+2*c10.y*c12.x*c12y2*c13.x*c22.x-3*c11.x*c20.x*c12.x*c13y2*c22.y+2*c11.x*c20.x*c12.y*c22.x*c13y2+c11.x*c11.y*c12y2*c13.x*c22.x-3*c11.x*c12.x*c20.y*c22.x*c13y2-3*c11.x*c12.x*c21.x*c21.y*c13y2+4*c20.x*c11.y*c12.x*c22.x*c13y2-2*c10.x*c12x2*c12.y*c13.y*c22.y-6*c10.y*c20.x*c13x2*c13.y*c22.y-6*c10.y*c20.y*c13x2*c22.x*c13.y-6*c10.y*c21.x*c13x2*c21.y*c13.y-2*c10.y*c12x2*c12.y*c13.x*c22.y-2*c10.y*c12x2*c12.y*c22.x*c13.y-c11.x*c11.y*c12x2*c13.y*c22.y-2*c11.x*c11y2*c13.x*c22.x*c13.y+3*c20.x*c11.y*c12.y*c13x2*c22.y-2*c20.x*c12.x*c12y2*c13.x*c22.y-2*c20.x*c12.x*c12y2*c22.x*c13.y-6*c20.x*c20.y*c13.x*c22.x*c13y2-6*c20.x*c21.x*c13.x*c21.y*c13y2+3*c11.y*c20.y*c12.y*c13x2*c22.x+3*c11.y*c21.x*c12.y*c13x2*c21.y-2*c12.x*c20.y*c12y2*c13.x*c22.x-2*c12.x*c21.x*c12y2*c13.x*c21.y-c11y2*c12.x*c12.y*c13.x*c22.x+2*c20.x*c12x2*c12.y*c13.y*c22.y-3*c11.y*c21x2*c12.y*c13.x*c13.y+6*c20.y*c21.x*c13x2*c21.y*c13.y+2*c11x2*c11.y*c13.x*c13.y*c22.y+c11x2*c12.x*c12.y*c13.y*c22.y+2*c12x2*c20.y*c12.y*c22.x*c13.y+2*c12x2*c21.x*c12.y*c21.y*c13.y-3*c10.x*c21x2*c13y3+3*c20.x*c21x2*c13y3+3*c10x2*c22.x*c13y3-3*c10y2*c13x3*c22.y+3*c20x2*c22.x*c13y3+c21x2*c12y3*c13.x+c11y3*c13x2*c22.x-c11x3*c13y2*c22.y+3*c10.y*c21x2*c13.x*c13y2-c11.x*c11y2*c13x2*c22.y+c11.x*c21x2*c12.y*c13y2+2*c11.y*c12.x*c21x2*c13y2+c11x2*c11.y*c22.x*c13y2-c12.x*c21x2*c12y2*c13.y-3*c20.y*c21x2*c13.x*c13y2-3*c10x2*c13.x*c13y2*c22.y+3*c10y2*c13x2*c22.x*c13.y-c11x2*c12y2*c13.x*c22.y+c11y2*c12x2*c22.x*c13.y-3*c20x2*c13.x*c13y2*c22.y+3*c20y2*c13x2*c22.x*c13.y+c12x2*c12.y*c13.x*(2*c20.y*c22.y+c21y2)+c11.x*c12.x*c13.x*c13.y*(6*c20.y*c22.y+3*c21y2)+c12x3*c13.y*(-2*c20.y*c22.y-c21y2)+c10.y*c13x3*(6*c20.y*c22.y+3*c21y2)+c11.y*c12.x*c13x2*(-2*c20.y*c22.y-c21y2)+c11.x*c12.y*c13x2*(-4*c20.y*c22.y-2*c21y2)+c10.x*c13x2*c13.y*(-6*c20.y*c22.y-3*c21y2)+c20.x*c13x2*c13.y*(6*c20.y*c22.y+3*c21y2)+c13x3*(-2*c20.y*c21y2-c20y2*c22.y-c20.y*(2*c20.y*c22.y+c21y2)),-c10.x*c11.x*c12.y*c13.x*c21.y*c13.y+c10.x*c11.y*c12.x*c13.x*c21.y*c13.y+6*c10.x*c11.y*c21.x*c12.y*c13.x*c13.y-6*c10.y*c11.x*c12.x*c13.x*c21.y*c13.y-c10.y*c11.x*c21.x*c12.y*c13.x*c13.y+c10.y*c11.y*c12.x*c21.x*c13.x*c13.y-c11.x*c11.y*c12.x*c21.x*c12.y*c13.y+c11.x*c11.y*c12.x*c12.y*c13.x*c21.y+c11.x*c20.x*c12.y*c13.x*c21.y*c13.y+6*c11.x*c12.x*c20.y*c13.x*c21.y*c13.y+c11.x*c20.y*c21.x*c12.y*c13.x*c13.y-c20.x*c11.y*c12.x*c13.x*c21.y*c13.y-6*c20.x*c11.y*c21.x*c12.y*c13.x*c13.y-c11.y*c12.x*c20.y*c21.x*c13.x*c13.y-6*c10.x*c20.x*c21.x*c13y3-2*c10.x*c21.x*c12y3*c13.x+6*c10.y*c20.y*c13x3*c21.y+2*c20.x*c21.x*c12y3*c13.x+2*c10.y*c12x3*c21.y*c13.y-2*c12x3*c20.y*c21.y*c13.y-6*c10.x*c10.y*c21.x*c13.x*c13y2+3*c10.x*c11.x*c12.x*c21.y*c13y2-2*c10.x*c11.x*c21.x*c12.y*c13y2-4*c10.x*c11.y*c12.x*c21.x*c13y2+3*c10.y*c11.x*c12.x*c21.x*c13y2+6*c10.x*c10.y*c13x2*c21.y*c13.y+6*c10.x*c20.x*c13.x*c21.y*c13y2-3*c10.x*c11.y*c12.y*c13x2*c21.y+2*c10.x*c12.x*c21.x*c12y2*c13.y+2*c10.x*c12.x*c12y2*c13.x*c21.y+6*c10.x*c20.y*c21.x*c13.x*c13y2+4*c10.y*c11.x*c12.y*c13x2*c21.y+6*c10.y*c20.x*c21.x*c13.x*c13y2+2*c10.y*c11.y*c12.x*c13x2*c21.y-3*c10.y*c11.y*c21.x*c12.y*c13x2+2*c10.y*c12.x*c21.x*c12y2*c13.x-3*c11.x*c20.x*c12.x*c21.y*c13y2+2*c11.x*c20.x*c21.x*c12.y*c13y2+c11.x*c11.y*c21.x*c12y2*c13.x-3*c11.x*c12.x*c20.y*c21.x*c13y2+4*c20.x*c11.y*c12.x*c21.x*c13y2-6*c10.x*c20.y*c13x2*c21.y*c13.y-2*c10.x*c12x2*c12.y*c21.y*c13.y-6*c10.y*c20.x*c13x2*c21.y*c13.y-6*c10.y*c20.y*c21.x*c13x2*c13.y-2*c10.y*c12x2*c21.x*c12.y*c13.y-2*c10.y*c12x2*c12.y*c13.x*c21.y-c11.x*c11.y*c12x2*c21.y*c13.y-4*c11.x*c20.y*c12.y*c13x2*c21.y-2*c11.x*c11y2*c21.x*c13.x*c13.y+3*c20.x*c11.y*c12.y*c13x2*c21.y-2*c20.x*c12.x*c21.x*c12y2*c13.y-2*c20.x*c12.x*c12y2*c13.x*c21.y-6*c20.x*c20.y*c21.x*c13.x*c13y2-2*c11.y*c12.x*c20.y*c13x2*c21.y+3*c11.y*c20.y*c21.x*c12.y*c13x2-2*c12.x*c20.y*c21.x*c12y2*c13.x-c11y2*c12.x*c21.x*c12.y*c13.x+6*c20.x*c20.y*c13x2*c21.y*c13.y+2*c20.x*c12x2*c12.y*c21.y*c13.y+2*c11x2*c11.y*c13.x*c21.y*c13.y+c11x2*c12.x*c12.y*c21.y*c13.y+2*c12x2*c20.y*c21.x*c12.y*c13.y+2*c12x2*c20.y*c12.y*c13.x*c21.y+3*c10x2*c21.x*c13y3-3*c10y2*c13x3*c21.y+3*c20x2*c21.x*c13y3+c11y3*c21.x*c13x2-c11x3*c21.y*c13y2-3*c20y2*c13x3*c21.y-c11.x*c11y2*c13x2*c21.y+c11x2*c11.y*c21.x*c13y2-3*c10x2*c13.x*c21.y*c13y2+3*c10y2*c21.x*c13x2*c13.y-c11x2*c12y2*c13.x*c21.y+c11y2*c12x2*c21.x*c13.y-3*c20x2*c13.x*c21.y*c13y2+3*c20y2*c21.x*c13x2*c13.y,c10.x*c10.y*c11.x*c12.y*c13.x*c13.y-c10.x*c10.y*c11.y*c12.x*c13.x*c13.y+c10.x*c11.x*c11.y*c12.x*c12.y*c13.y-c10.y*c11.x*c11.y*c12.x*c12.y*c13.x-c10.x*c11.x*c20.y*c12.y*c13.x*c13.y+6*c10.x*c20.x*c11.y*c12.y*c13.x*c13.y+c10.x*c11.y*c12.x*c20.y*c13.x*c13.y-c10.y*c11.x*c20.x*c12.y*c13.x*c13.y-6*c10.y*c11.x*c12.x*c20.y*c13.x*c13.y+c10.y*c20.x*c11.y*c12.x*c13.x*c13.y-c11.x*c20.x*c11.y*c12.x*c12.y*c13.y+c11.x*c11.y*c12.x*c20.y*c12.y*c13.x+c11.x*c20.x*c20.y*c12.y*c13.x*c13.y-c20.x*c11.y*c12.x*c20.y*c13.x*c13.y-2*c10.x*c20.x*c12y3*c13.x+2*c10.y*c12x3*c20.y*c13.y-3*c10.x*c10.y*c11.x*c12.x*c13y2-6*c10.x*c10.y*c20.x*c13.x*c13y2+3*c10.x*c10.y*c11.y*c12.y*c13x2-2*c10.x*c10.y*c12.x*c12y2*c13.x-2*c10.x*c11.x*c20.x*c12.y*c13y2-c10.x*c11.x*c11.y*c12y2*c13.x+3*c10.x*c11.x*c12.x*c20.y*c13y2-4*c10.x*c20.x*c11.y*c12.x*c13y2+3*c10.y*c11.x*c20.x*c12.x*c13y2+6*c10.x*c10.y*c20.y*c13x2*c13.y+2*c10.x*c10.y*c12x2*c12.y*c13.y+2*c10.x*c11.x*c11y2*c13.x*c13.y+2*c10.x*c20.x*c12.x*c12y2*c13.y+6*c10.x*c20.x*c20.y*c13.x*c13y2-3*c10.x*c11.y*c20.y*c12.y*c13x2+2*c10.x*c12.x*c20.y*c12y2*c13.x+c10.x*c11y2*c12.x*c12.y*c13.x+c10.y*c11.x*c11.y*c12x2*c13.y+4*c10.y*c11.x*c20.y*c12.y*c13x2-3*c10.y*c20.x*c11.y*c12.y*c13x2+2*c10.y*c20.x*c12.x*c12y2*c13.x+2*c10.y*c11.y*c12.x*c20.y*c13x2+c11.x*c20.x*c11.y*c12y2*c13.x-3*c11.x*c20.x*c12.x*c20.y*c13y2-2*c10.x*c12x2*c20.y*c12.y*c13.y-6*c10.y*c20.x*c20.y*c13x2*c13.y-2*c10.y*c20.x*c12x2*c12.y*c13.y-2*c10.y*c11x2*c11.y*c13.x*c13.y-c10.y*c11x2*c12.x*c12.y*c13.y-2*c10.y*c12x2*c20.y*c12.y*c13.x-2*c11.x*c20.x*c11y2*c13.x*c13.y-c11.x*c11.y*c12x2*c20.y*c13.y+3*c20.x*c11.y*c20.y*c12.y*c13x2-2*c20.x*c12.x*c20.y*c12y2*c13.x-c20.x*c11y2*c12.x*c12.y*c13.x+3*c10y2*c11.x*c12.x*c13.x*c13.y+3*c11.x*c12.x*c20y2*c13.x*c13.y+2*c20.x*c12x2*c20.y*c12.y*c13.y-3*c10x2*c11.y*c12.y*c13.x*c13.y+2*c11x2*c11.y*c20.y*c13.x*c13.y+c11x2*c12.x*c20.y*c12.y*c13.y-3*c20x2*c11.y*c12.y*c13.x*c13.y-c10x3*c13y3+c10y3*c13x3+c20x3*c13y3-c20y3*c13x3-3*c10.x*c20x2*c13y3-c10.x*c11y3*c13x2+3*c10x2*c20.x*c13y3+c10.y*c11x3*c13y2+3*c10.y*c20y2*c13x3+c20.x*c11y3*c13x2+c10x2*c12y3*c13.x-3*c10y2*c20.y*c13x3-c10y2*c12x3*c13.y+c20x2*c12y3*c13.x-c11x3*c20.y*c13y2-c12x3*c20y2*c13.y-c10.x*c11x2*c11.y*c13y2+c10.y*c11.x*c11y2*c13x2-3*c10.x*c10y2*c13x2*c13.y-c10.x*c11y2*c12x2*c13.y+c10.y*c11x2*c12y2*c13.x-c11.x*c11y2*c20.y*c13x2+3*c10x2*c10.y*c13.x*c13y2+c10x2*c11.x*c12.y*c13y2+2*c10x2*c11.y*c12.x*c13y2-2*c10y2*c11.x*c12.y*c13x2-c10y2*c11.y*c12.x*c13x2+c11x2*c20.x*c11.y*c13y2-3*c10.x*c20y2*c13x2*c13.y+3*c10.y*c20x2*c13.x*c13y2+c11.x*c20x2*c12.y*c13y2-2*c11.x*c20y2*c12.y*c13x2+c20.x*c11y2*c12x2*c13.y-c11.y*c12.x*c20y2*c13x2-c10x2*c12.x*c12y2*c13.y-3*c10x2*c20.y*c13.x*c13y2+3*c10y2*c20.x*c13x2*c13.y+c10y2*c12x2*c12.y*c13.x-c11x2*c20.y*c12y2*c13.x+2*c20x2*c11.y*c12.x*c13y2+3*c20.x*c20y2*c13x2*c13.y-c20x2*c12.x*c12y2*c13.y-3*c20x2*c20.y*c13.x*c13y2+c12x2*c20y2*c12.y*c13.x);var roots=poly.getRootsInInterval(0,1);for(var i=0;i<roots.length;i++){var s=roots[i];var xRoots=new Polynomial(c13.x,c12.x,c11.x,c10.x-c20.x-s*c21.x-s*s*c22.x-s*s*s*c23.x).getRoots();var yRoots=new Polynomial(c13.y,c12.y,c11.y,c10.y-c20.y-s*c21.y-s*s*c22.y-s*s*s*c23.y).getRoots();if(xRoots.length>0&&yRoots.length>0){var TOLERANCE=1e-3;checkRoots:for(var j=0;j<xRoots.length;j++){var xRoot=xRoots[j];if(0<=xRoot&&xRoot<=1){for(var k=0;k<yRoots.length;k++){if(Math.abs(xRoot-yRoots[k])<TOLERANCE){result.points.push(c23.multiply(s*s*s).add(c22.multiply(s*s).add(c21.multiply(s).add(c20))));break checkRoots;}}}}}}if(result.points.length>0)result.status="Intersection";return result;};
    //--(bez, line) erwartet trotzdem segment
    Intersection.intersectBezier3Line=function(seg1,seg2){var a,b,c,d;var c3,c2,c1,c0;var cl;var n;var min=seg2.A.min(seg2.D);var max=seg2.A.max(seg2.D);var result=new Intersection("No Intersection");a=seg1.A.multiply(-1);b=seg1.B.multiply(3);c=seg1.C.multiply(-3);d=a.add(b.add(c.add(seg1.D)));c3=new Vector2D(d.x,d.y);a=seg1.A.multiply(3);b=seg1.B.multiply(-6);c=seg1.C.multiply(3);d=a.add(b.add(c));c2=new Vector2D(d.x,d.y);a=seg1.A.multiply(-3);b=seg1.B.multiply(3);c=a.add(b);c1=new Vector2D(c.x,c.y);c0=new Vector2D(seg1.A.x,seg1.A.y);n=new Vector2D(seg2.A.y-seg2.D.y,seg2.D.x-seg2.A.x);cl=seg2.A.x*seg2.D.y-seg2.D.x*seg2.A.y;roots=new Polynomial(n.dot(c3),n.dot(c2),n.dot(c1),n.dot(c0)+cl).getRoots();for(var i=0;i<roots.length;i++){var t=roots[i];if(0<=t&&t<=1){var p5=seg1.A.lerp(seg1.B,t);var p6=seg1.B.lerp(seg1.C,t);var p7=seg1.C.lerp(seg1.D,t);var p8=p5.lerp(p6,t);var p9=p6.lerp(p7,t);var pt10=p8.lerp(p9,t);if(seg2.A.x==seg2.D.x){if(min.y<=pt10.y&&pt10.y<=max.y){result.status="Intersection";result.appendPoint(pt10);}}else if(seg2.A.y==seg2.D.y){if(min.x<=pt10.x&&pt10.x<=max.x){result.status="Intersection";result.appendPoint(pt10);}}else if(pt10.gte(min)&&pt10.lte(max)){result.status="Intersection";result.appendPoint(pt10);}}}return result;};
    //--(line, line) erwartet trotzdem segment
    Intersection.intersectLineLine=function (seg1,seg2){var result;var ua_t=(seg2.D.x-seg2.A.x)*(seg1.A.y-seg2.A.y)-(seg2.D.y-seg2.A.y)*(seg1.A.x-seg2.A.x);var ub_t=(seg1.D.x-seg1.A.x)*(seg1.A.y-seg2.A.y)-(seg1.D.y-seg1.A.y)*(seg1.A.x-seg2.A.x);var u_b=(seg2.D.y-seg2.A.y)*(seg1.D.x-seg1.A.x)-(seg2.D.x-seg2.A.x)*(seg1.D.y-seg1.A.y);if(u_b!=0){var ua=ua_t/u_b;var ub=ub_t/u_b;if(0<=ua&&ua<=1&&0<=ub&&ub<=1){result=new Intersection("Intersection");result.points.push(new Point(seg1.A.x+ua*(seg1.D.x-seg1.A.x),seg1.A.y+ua*(seg1.D.y-seg1.A.y)));}else{result=new Intersection("No Intersection");}}else{if(ua_t==0||ub_t==0){result=new Intersection("Coincident");}else{result=new Intersection("Parallel");}}return result;};
    Intersection.intersectBezier3Circle=function(p1,p2,p3,p4,c,r){return Intersection.intersectBezier3Ellipse(p1,p2,p3,p4,c,r,r);};
    Intersection.intersectBezier3Ellipse=function(p1,p2,p3,p4,ec,rx,ry){var a,b,c,d;var c3,c2,c1,c0;var result=new Intersection("No Intersection");a=p1.multiply(-1);b=p2.multiply(3);c=p3.multiply(-3);d=a.add(b.add(c.add(p4)));c3=new Vector2D(d.x,d.y);a=p1.multiply(3);b=p2.multiply(-6);c=p3.multiply(3);d=a.add(b.add(c));c2=new Vector2D(d.x,d.y);a=p1.multiply(-3);b=p2.multiply(3);c=a.add(b);c1=new Vector2D(c.x,c.y);c0=new Vector2D(p1.x,p1.y);var rxrx=rx*rx;var ryry=ry*ry;var poly=new Polynomial(c3.x*c3.x*ryry+c3.y*c3.y*rxrx,2*(c3.x*c2.x*ryry+c3.y*c2.y*rxrx),2*(c3.x*c1.x*ryry+c3.y*c1.y*rxrx)+c2.x*c2.x*ryry+c2.y*c2.y*rxrx,2*c3.x*ryry*(c0.x-ec.x)+2*c3.y*rxrx*(c0.y-ec.y)+2*(c2.x*c1.x*ryry+c2.y*c1.y*rxrx),2*c2.x*ryry*(c0.x-ec.x)+2*c2.y*rxrx*(c0.y-ec.y)+c1.x*c1.x*ryry+c1.y*c1.y*rxrx,2*c1.x*ryry*(c0.x-ec.x)+2*c1.y*rxrx*(c0.y-ec.y),c0.x*c0.x*ryry-2*c0.y*ec.y*rxrx-2*c0.x*ec.x*ryry+c0.y*c0.y*rxrx+ec.x*ec.x*ryry+ec.y*ec.y*rxrx-rxrx*ryry);
    var roots1=poly.getRootsInInterval(0,1);for(var i=0;i<roots1.length;i++){var t=roots1[i];result.points.push(c3.multiply(t*t*t).add(c2.multiply(t*t).add(c1.multiply(t).add(c0))));}if(result.points.length>0)result.status="Intersection";return result;};
    Intersection.intersectLinePolygon=function(a1,a2,points){var result=new Intersection("No Intersection");var length=points.length;for(var i=0;i<length;i++){var b1=points[i];var b2=points[(i+1)%length];var inter=Intersection.intersectLineLine(a1,a2,b1,b2);result.appendPoints(inter.points);}if(result.points.length>0)result.status="Intersection";return result;};
    Intersection.intersectPolygonPolygon=function(points1,points2){var result=new Intersection("No Intersection");var length=points1.length;for(var i=0;i<length;i++){var a1=points1[i];var a2=points1[(i+1)%length];var inter=Intersection.intersectLinePolygon(a1,a2,points2);result.appendPoints(inter.points);}if(result.points.length>0)result.status="Intersection";return result;};
    //--------------by Andreas Weber-----------------------
    function getTOfPointOnCubicCurve(p0, seg){return getTOfPoint.apply(this, arguments);}
    function getTOfPoint(p0,seg){var p1=seg.A,p2=seg.B,p3=seg.C,p4=seg.D;var ax,bx,cx,dx,ay,by,cy,dy,xl,yl,i,j,k,len1,len2,len3,min,r,round,v;var p0x=p0.x,p0y=p0.y,p1x=p1.x,p1y=p1.y,p2x=p2.x,p2y=p2.y,p3x=p3.x,p3y=p3.y;round=10000;var p4x=p4.x,p4y=p4.y;ax=p4x-3*p3x+3*p2x-p1x;bx=3*p3x-6*p2x+3*p1x;cx=3*p2x-3*p1x;dx=p1x-p0x;ay=p4y-3*p3y+3*p2y-p1y;by=3*p3y-6*p2y+3*p1y;cy=3*p2y-3*p1y;dy=p1y-p0y;min=1/round;if(ax<min&&ax>0-min){ax=0} if(bx<min&&bx>0-min){bx=0} if(cx<min&&cx>0-min){cx=0} if(dx<min&&dx>0-min){dx=0} if(ay<min&&ay>0-min){ay=0} if(by<min&&by>0-min){by=0} if(cy<min&&cy>0-min){cy=0} if(dy<min&&dy>0-min){dy=0} xl=solveCubicPolynomial(ax,bx,cx,dx);yl=solveCubicPolynomial(ay,by,cy,dy);for(i=0,len1=xl.length;i<len1;i++){v=xl[i];if(v!='NAN'){xl[i]=Math.round(v*round)/round;}v=xl[i];if(v<0||v>1){xl.splice(i,1);len1--;i--;}}for(i=0,len1=yl.length;i<len1;i++){v=yl[i];if(v!='NAN'){yl[i]=Math.round(v*round)/round;}v=yl[i];if(v<0||v>1){yl.splice(i,1);len1--;i--;}}if(xl[0]=='NAN'){return yl;}else if(yl[0]=='NAN'){return xl;}else{r=new Array();len1=xl.length;len2=yl.length;for(i=0;i<len1;i++){for(j=0;j<len2;j++){if(xl[i]==yl[j]){for(k=0,len3;k<r.length;k++){if(r[k]==xl[i]){break;}}r.push(xl[i]);yl.splice(j,1);len2--;}}}if(r.length>0){return r;} return[-1];}}
    /*by Aless Lasaruk, adapted by Andreas Weber*/
    function solveCubicPolynomial(a, b, c, d) { var p, q, di, pi; if(a==0){ if(b==0){ if(c==0 && d==0){ return ['NAN']; }else if(c != 0){ return [-d/c]; } }else{ di = c*c-4*b*d; if (di < 0){ return []; }else if(di==0) { return [-c/(2*b)]; }else{ return [(-c + Math.sqrt(di))/(2*b), (-c - Math.sqrt(di))/(2*b)]; } } } p = (3*a*c - b*b)/(3*a*a); q = (2*b*b*b-9*a*b*c+27*a*a*d)/(27*a*a*a); di = q*q/4+p*p*p/27; if(di > 0){ return [crt(-q/2+Math.sqrt(di))+crt(-q/2-Math.sqrt(di))-b/(3*a)]; }else if(di==0) { return [crt(q/2)-b/(3*a), -crt(4*q)-b/(3*a)]; }else{ pi = Math.PI; return [2*Math.sqrt(-p/3)*Math.cos(1/3*Math.acos(-q/2*Math.sqrt(-27/(p*p*p))))- b/(3*a), -2*Math.sqrt(-p/3)*Math.cos(1/3*Math.acos(-q/2*Math.sqrt(-27/(p*p*p)))+ pi/3) - b/(3*a), -2*Math.sqrt(-p/3)*Math.cos(1/3*Math.acos(-q/2*Math.sqrt(-27/(p*p*p)))- pi/3) - b/(3*a) ]; } }
    function crt(x){return x<0 ? -Math.pow(-x,1/3) : Math.pow(x,1/3);}
    function getTOfPointOnLine(pt, seg){return seg.A.distanceFrom(pt)/seg.A.distanceFrom(seg.D);}
    ////----------end of intersection
    // POINT OBJ
    // point und line: basiert auf code: written by Kevin Lindsey
    // ([email protected])
    function Point(x, y) {
         this.name = "_point";
         if (arguments.length == 1) {
              this.x = x[0];
              this.y = x[1]
         if (arguments.length == 2) {
              this.x = x;
              this.y = y
         this.arr = [ this.x, this.y ];
    Point.prototype.lerp = function(that, t) {
         return new Point(this.x + (that.x - this.x) * t, this.y + (that.y - this.y)
                   * t);
    Point.prototype.distanceFrom = function(that) {
         var dx = this.x - that.x;
         var dy = this.y - that.y;
         return Math.sqrt(dx * dx + dy * dy);
    Point.prototype.angle = function(p2) {
         var w = Math.atan2(p2.y - this.y, p2.x - this.x) * 180 / Math.PI;
         if (w < 0) {
              w = w + 360
         return w;
    Point.prototype.plumb = function(lp1, lp2) {
         var x = this.x, y = this.y, x0 = lp1.x, y0 = lp1.y, x1 = lp2.x, y1 = lp2.y;
         if (!(x1 - x0))
              return new Point(x0, y);
         else if (!(y1 - y0))
              return new Point(x, y0);
         var left, tg = -1 / ((y1 - y0) / (x1 - x0));
         var o = {
              x : left = (x1 * (x * tg - y + y0) + x0 * (x * -tg + y - y1))
                        / (tg * (x1 - x0) + y0 - y1),
              y : tg * left - tg * x + y
         return new Point(o.x, o.y);
    Point.prototype.isInHull = function(hull) {// hull? handlungsbedarf
         // wenn hull=bezier
         if (hull.A) {
              hull.pPoints.push(hull.A);
              hull.pPoints.push(hull.B);
              hull.pPoints.push(hull.C);
              hull.pPoints.push(hull.D);
         var w = new Array();
         for ( var i1 = 0; i1 < hull.pPoints.length; i1++) {
              w[i1] = this.angle(hull.pPoints[i1])
         w.sort(NumSort);
         for ( var i = 0; i < w.length; i++) {
              if (i == 0) {
                   if (w[0] + 360 - w[w.length - 1] > 180) {
                        return false
              } else {
                   if (w[i] - w[i - 1] > 180) {
                        return false
         return true
    Point.prototype.Dot = function(d) {
         var ell = app.activeDocument.pathItems.ellipse(this.y + d / 2, this.x - d
                   / 2, d, d);
         ell.selected = false;
         return ell
    Point.prototype.Line = function(pt) {
         var list = [ [ this.x, this.y ], [ pt.x, pt.y ] ], line = app.activeDocument.pathItems
                   .add();
         line.setEntirePath(list);
         return line
    Point.prototype.add = function(that) {
         return new Point(this.x + that.x, this.y + that.y);
    Point.prototype.addEquals = function(that) {
         this.x += that.x;
         this.y += that.y;
         return this;
    Point.prototype.scalarAdd = function(scalar) {
         return new Point(this.x + scalar, this.y + scalar);
    Point.prototype.scalarAddEquals = function(scalar) {
         this.x += scalar;
         this.y += scalar;
         return this;
    Point.prototype.subtract = function(that) {
         return new Point(this.x - that.x, this.y - that.y);
    Point.prototype.subtractEquals = function(that) {
         this.x -= that.x;
         this.y -= that.y;
         return this;
    Point.prototype.scalarSubtract = function(scalar) {
         return new Point(this.x - scalar, this.y - scalar);
    Point.prototype.scalarSubtractEquals = function(scalar) {
         this.x -= scalar;
         this.y -= scalar;
         return this;
    Point.prototype.multiply = function(scalar) {
         return new Point(this.x * scalar, this.y * scalar);
    Point.prototype.multiplyEquals = function(scalar) {
         this.x *= scalar;
         this.y *= scalar;
         return this;
    Point.prototype.divide = function(scalar) {
         return new Point(this.x / scalar, this.y / scalar);
    Point.prototype.divideEquals = function(scalar) {
         this.x /= scalar;
         this.y /= scalar;
         return this;
    Point.prototype.eq = function(that) {
         return (this.x == that.x && this.y == that.y);
    Point.prototype.lt = function(that) {
         return (this.x < that.x && this.y < that.y);
    Point.prototype.lte = function(that) {
         return (this.x <= that.x && this.y <= that.y);
    Point.prototype.gt = function(that) {
         return (this.x > that.x && this.y > that.y);
    Point.prototype.gte = function(that) {
         return (this.x >= that.x && this.y >= that.y);
    Point.prototype.min = function(that) {
         return new Point(Math.min(this.x, that.x), Math.min(this.y, that.y));
    Point.prototype.max = function(that) {
         return new Point(Math.max(this.x, that.x), Math.max(this.y, that.y));
    Point.prototype.toString = function() {
         return this.x + "," + this.y;
    Point.prototype.setXY = function(x, y) {
         this.x = x;
         this.y = y;
    Point.prototype.setFromPoint = function(that) {
         this.x = that.x;
         this.y = that.y;
    Point.prototype.swap = function(that) {
         var x = this.x;
         var y = this.y;
         this.x = that.x;
         this.y = that.y;
         that.x = x;
         that.y = y;
    // LINE OBJ
    function Line(p1, p2) {
         this.p1 = p1;
         this.p2 = p2;
         this.type = this.type()
    Line.prototype.type = function() {
         if (this.p1.x == this.p2.x) {
              return "vert"
         if (this.p1.y == this.p2.y) {
              return "hori"
         return "diag"
    // Steigung
    Line.prototype.slope = function() {
         var p = this.p2.subtract(this.p1);
         return p.y / p.x
    Line.prototype.YatX0 = function() {
         return this.p1.y - this.slope() * this.p1.x
    Line.prototype.isParallel = function(that) {
         if (this.type == "diag" && that.type == "diag") {
              if (this.slope() == that.slope()) {
                   return true
              return false
         if (this.type == that.type)
              return true;
         return false
    Line.prototype.intersect = function(that) {
         var a = this.type, b = that.type, x, y;
         if (this.isParallel(that) == false) {
              if (a == "hori") {
                   y = this.p1.y;
                   if (b == "vert")
                        return new Point(that.p1.x, y);
                   if (b == "diag")
                        return new Point(equate(that.YatX0(), y)
                                  / equate(this.slope(), that.slope()), y)
              if (a == "vert") {
                   x = this.p1.x;
                   if (b == "hori")
                        return new Point(x, that.p1.y);
                   if (b == "diag")
                        return new Point(x, that.slope() * x + that.YatX0())
              if (a == "diag") {
                   if (b == "hori") {
                        y = that.p1.y;
                        x = equate(y, this.YatX0())
                                  / equate(this.slope(), that.slope());
                        return new Point(x, y)
                   if (b == "vert") {
                        x = that.p1.x;
                        y = this.slope() * x + this.YatX0();
                        return new Point(x, y)
                   if (b == "diag") {
                        x = equate(that.YatX0(), this.YatX0())
                                  / equate(this.slope(), that.slope());
                        y = this.slope() * x + this.YatX0();
                        return new Point(x, y)
         return "parallel"
    Line.prototype.plumb = function(pt) { // lotrecht
         var x = pt.x, y = pt.y, x0 = this.p1.x, y0 = this.p1.y, x1 = this.p2.x, y1 = this.p2.y;
         if (!(x1 - x0))
              return new Point(x0, y);
         else if (!(y1 - y0))
              return new Point(x, y0);
         var left, tg = -1 / ((y1 - y0) / (x1 - x0));
         var o = {
              x : left = (x1 * (x * tg - y + y0) + x0 * (x * -tg + y - y1))
                        / (tg * (x1 - x0) + y0 - y1),
              y : tg * left - tg * x + y
         return new Point(o.x, o.y);
    Line.prototype.getT = function(pt) {
         return this.p1.distanceFrom(pt) / this.p1.distanceFrom(this.p2);
    Line.prototype.hasPoint = function(pt) {
         var t = this.getT(pt);
         if (t < 0 || t > 1)
              return t;
         return t
    // BEZIER OBJ
    function Bezier(p1, p2) {
         this.name = "_bezier";
         this.A = p1.an;
         this.B = p1.rDir;
         this.C = p2.lDir;
         this.D = p2.an;
         this.type = this.isLine()
    Bezier.prototype.isLine = function() {
         var self = this;
         if (self.A.x == self.B.x && self.A.y == self.B.y && self.D.x == self.C.x
                   && self.D.y == self.C.y) {
              return "line"
         return "bez"
    Bezier.prototype.PointsForT = function(ti) {
         if (this.type == "bez") {
              this.BT = this.A.lerp(this.B, ti); // new B
              this.tt = this.B.lerp(this.C, ti); // ???
              this.CT = this.C.lerp(this.D, ti); // new C
              this.T1 = this.BT.lerp(this.tt, ti);// new point lDir
              this.T2 = this.tt.lerp(this.CT, ti);// new point rDir
              this.PP = this.T1.lerp(this.T2, ti);// new point an
              this.t = ti;
              this.normale = function() {
                   var n = this.PP.subtract(this.T1), n2 = new Point(-n.y, n.x);
                   return n2.add(this.PP);
              // tangent is T1 or T2
              if (ti <= 0.001) {
                   this.tang = this.T2.angle(this.PP)
              if (ti >= 0.999) {
                   this.tang = this.PP.angle(this.T1)
              if (ti > 0.001 && ti < 0.999) {
                   this.tang = this.T2.angle(this.T1)
         if (this.type == "line") {
              this.PP = this.A.lerp(this.D, ti);
              // return this
         return this
    Bezier.prototype.BezLength = function(tolerance) {
         var seelf = this, len1 = this.A.distanceFrom(this.D), len2 = 0, result = new Array(
                   [ this.A, 0 ]);
         result.push( [ this.D, 1 ]);
         var ri = 1, s = 2, z = 0;
         romberg();
         function romberg() {
              z += 1;
              for (ri; ri < s; ri += 2) {
                   var temp = seelf.PointsForT(ri / s);
                   result = result.insert( [ temp.PP, temp.t ], ri);//
              s = s * 2;
              ri = 1;
              for ( var j = 0; j < result.length; j++) {
                   result[0][2] = len2;
                   if (result[0][1] < 1) {
                        len2 += result[0][0].distanceFrom(result[1][0]);
                   result.turn1();
         while (len2 - len1 > tolerance || z < 5) { //
              len1 = len2;
              len2 = 0;
              romberg();
         return {
              bezLength : len2,
              list : result
         // return len2;
    Bezier.prototype.getTonLength = function(le, tolerance) {
         try {
              var dat = this.BezLength(tolerance)
         } catch (e) {
              return "getLengthFail"
         var lDiff; // var t;
         if (dat.bezLength < le) {
              le -= 0.0001
         if (dat.bezLength < le) {
              alert("getTonLength_toShort \n  " + le + " " + dat.bezLength);
              return "toShort"
         if (dat.bezLength == le)
              return 1;
         if (le == 0)
              return 0
              // if(dat.bezLength>le){alert("getTonLength_toLong \n "+le+"
              // "+dat.bezLength);return "toLong"}
              // if(dat.bezLength==le){le=le-0.1}
         for ( var i = 0; i < dat.list.length; i++) {
              if (dat.list[i][2] > le) {
                   lDiff = (dat.list[i][2] - dat.list[i - 1][2])
                             / (le - dat.list[i - 1][2]);
                   // alert();
                   return dat.list[i - 1][1] + dat.list[1][1] / lDiff;
    // EXTENDED PATHPOINT OBJ
    function XpPoint(ld, an, rd) {
         if (arguments.length < 1)
              return null;
         this.name = "_pPoint";
         if (ld.anchor) { // illustrator pathPoint
              this.lDir = new Point(ld.leftDirection);
              this.an = new Point(ld.anchor);
              this.rDir = new Point(ld.rightDirection);
              this.type = ld.pointType;
         } else if (ld.an) { // pPoint
              this.lDir = ld.lDir;
              this.an = ld.an;
              this.rDir = ld.rDir;
              this.type = ld.type;
         } else if (ld.x) { // point('s)
              if (an)
                   this.an = an
              else
                   this.an = ld;
              this.lDir = ld;
              if (rd)
                   this.rDir = rd
              else
                   this.rDir = ld;
              // this.ai.type=
    // only useful for pathPoints on Beziers, not on rect or line or ....
    XpPoint.prototype.isCurvePoint = function() {
         if ((Math.round((this.rDir.y - this.an.y) / (this.rDir.x - this.an.x)
                   * 1000) == Math.round((this.lDir.y - this.an.y)
                   / (this.lDir.x - this.an.x) * 1000))
                   || (this.rDir.y == this.an.y && this.lDir.y == this.an.y)
                   || (this.rDir.x == this.an.x && this.lDir.x == this.an.x)) {
              return true
         return false
    // EXTENDED PATH OBJ
    Xpath.prototype = new Xitem();
    Xpath.prototype.constructor = Xpath ;
    function Xpath(pfad) {
         Xitem.call(this, pfad);
         this.name = "_Xpath";
         this.ai = pfad;
         if (pfad.pathPoints) {
              this.pPoints = new Array();
              this.pPoints.name = "_pPoints";
              for ( var i = 0; i < pfad.pathPoints.length; i++) {
                   this.pPoints.push(new XpPoint(pfad.pathPoints[i]))
         if (this.pPoints) {
              this.beziers = new Array();
              this.beziers.name = "_beziers";
              var i73 = 0, pts = this.pPoints;
              if (pfad.closed == false)
                   i73++;
              for (i73; i73 < pts.length; i73++) {
                   this.beziers.push(new Bezier(pts[0], pts[1]));
                   pts.turn1()
              pts.turn1()
    Xpath.prototype.SetPath = function() {
         var ancor = new Array(), p = this.pPoints;
         for ( var i1 = 0; i1 < p.length; i1++) {
              ancor.push( [ p[i1].an.x, p[i1].an.y ]);
         var P;
         if (this.ai.pathPoints) {
              P = this.ai.pathPoints.parent
         } else {
              P = app.activeDocument.pathItems.add()
         P.setEntirePath(ancor);
         for ( var i = 0; i < p.length; i++) {
              P.pathPoints[i].rightDirection = [ p[i].rDir.x, p[i].rDir.y ];
              P.pathPoints[i].leftDirection = [ p[i].lDir.x, p[i].lDir.y ];
              if (p[i].type) {
                   P.pathPoints[i].pointType = p[i].type
    // EXTENDED ITEM OBJ
    function Xitem(obj) {
         if (obj) {
              this.name = "_Xitem";
              this.ai = obj;
              Xitem.prototype.center = new Point(this.ai.position[0] + this.ai.width
                        / 2, this.ai.position[1] - this.ai.height / 2);
              Xitem.prototype.bottomLeft = new Point(this.ai.position[0],
                        this.ai.position[1] - this.ai.height);
              Xitem.prototype.topRight = new Point(this.ai.position[0]
                        + this.ai.width, this.ai.position[1]);
    Xitem.prototype.SetToCenter = function(point) {
         this.ai.position = [ point.x - this.ai.width / 2,
                   point.y + this.ai.height / 2 ]
    Xitem.prototype.SetToBottom = function(point) {
         this.ai.position = [ point.x - this.ai.width / 2, point.y + this.ai.height ]
    Xitem.prototype.SetToTop = function(point) {
         this.ai.position = [ point.x - this.ai.width / 2, point.y ]
    Xitem.prototype.inside = function(pt) {
         if (pt.x < this.topRight.x && pt.y < this.topRight.y) {
              if (pt.x > this.bottomLeft.x && pt.y > this.bottomLeft.y) {
                   return true
         return false
    // Xitem.prototype.duplicate=function (){return new Xitem(this.ai.duplicate())};
    // ----------END OF
    // XTENDAIJS----------------------------------------------------------
    function Demo(h) {
         alert("we will take its first 4 pathpoints as points for a beziersegment");
         var pfad = new Xpath(h);
         sel[0].remove();
         var a = pfad.pPoints[1].an;
         var b = pfad.pPoints[2].an;
         var c = pfad.pPoints[3].an;
         var d = pfad.pPoints[0].an;
         var bez = new Bezier( {
              an : a,
              rDir : b
              lDir : c,
              an : d
         }) // ------ (pPoint1 , pPoint2)
         // ------{A,B,C,D} are Points ( with properties x,y)
         var p1 = bez.A.Dot(15), p2 = bez.D.Dot(15);
         redraw()
         alert("These are the anchors");
         // ---------Bezier.Point.function(size)
         var p3 = bez.B.Dot(10), p4 = bez.C.Dot(10);
         // ---------Bezier.Point.function(Point)
         var l1 = bez.A.Line(bez.B), l2 = bez.C.Line(bez.D);
         redraw()
         alert("These are the handles");
         var t03 = bez.PointsForT(0.3);
         t03.PP.Dot(10);
         redraw()
         alert("This is the Point on the Path at T=0.3...");
         bez.B.Line(bez.C);
         t03.BT.Line(t03.tt);
         t03.CT.Line(t03.tt);
         t03.T1.Line(t03.T2);
         redraw()
         alert("... and this is how it was calculated");
         bez.PointsForT(0.1).PP.Dot(10);
         bez.PointsForT(0.2).PP.Dot(10);
         bez.PointsForT(0.5).PP.Dot(10);
         bez.PointsForT(0.4).PP.Dot(10);
         bez.PointsForT(0.6).PP.Dot(10);
         bez.PointsForT(0.7).PP.Dot(10);
         bez.PointsForT(0.8).PP.Dot(10);
         bez.PointsForT(0.9).PP.Dot(10);
         redraw()
         alert("Points from T=0.1 to 0.9");
         var pa1 = new Xpath(pa.add()); //-------- normally created from existing PathItem...
         // -------...then this step is  not necessary:
         pa1.pPoints = [ new XpPoint(a, a, b), new XpPoint(c, d, d) ];
         pa1.SetPath();
         redraw()
         alert("This is the resulting Path \n try to set a point manually at pos t 0.3\n and observe how the handles change");
    function Demo3(PagEitem) {
         var p = new Xpath(PagEitem);
         var pZero = new Point(0, 0);
         alert(p.center);
         p.SetToCenter(pZero);
         redraw();
         alert(p.name);
         alert(p.ai.typename);
         p.SetToCenter( {
              x : 20,
              y : 20
    function Demo2() {
         var pa1 = new Xpath(sel[0]), pa2 = new Xpath(sel[1]);
         for ( var i_1 = 0; i_1 < pa1.beziers.length; i_1++) {
              for ( var i_2 = 0; i_2 < pa2.beziers.length; i_2++) {
                   var inters = new Intersection().IfInterSect(pa1.beziers[i_1],
                             pa2.beziers[i_2]);
                   if (inters.status == "Intersection") {
                        for ( var i_3 = 0; i_3 < inters.points.length; i_3++) {
                             // if you want to know the point...
                             inters.points[i_3].Dot(7);
                             // ...to manipulate path 1...
                             pa1.beziers[i_1].PointsForT(inters.points[i_3].t1).PP
                                       .Dot(15);
                             // ...path 2
                             pa2.beziers[i_2].PointsForT(inters.points[i_3].t2).PP
                                       .Dot(20);
    function polyline(){
         for(var i =0;i<pa.length;i++){
              var polypoints=[];
              var pfad= new Xpath(pa[i]);
              for(var j =0

  • Converted Path to Button Border Allways hidden

    A bunch of paths are imported from Illustrator to Flash and converted to Button Symbols. The Stroke is set to Hairline (0.10) Light Gray and the Fill to solid White for all of the paths. When the file loads the Fill colors are provided from an XML file and can be Red/Blue etc. My problem is that the Solid Fill covers/hides the Stroke/borders.
    As workaround I copied all paths to another layer placed on top of the symbols layer. So all symbols are behind and the top layer simulates the borders.
    Is any way to make the Symbols border to be displayed without having that extra layer? I tried using very Heavy/Thick border setting but still the fill is hiding it.

    Ned,
    Thank you immensely for looking into this. It took me a couple of extra days to try few things. Here are my latest findings:
    I have no problem at all running the file. Everything is as intended except the buttons borders.
    If I preview the output/movie into Flash or Browser I can see the buttons borders. It doesn’t matter if the color is the original White fill or any other color.
    If I include the file in the ASP page I also can see the borders when the XML file is empty (each button is a room on a floor plan and when the SQL query returns no room then no button is re-painted) and all rooms stay (again) the original White fill.
    If any room is found and the button is repainted then the borders disappear. This made me think that the buttons are not re-painted the correct way. Here are the few lines of code involved in the process:
    for each (var Zone:XML in myXML.zone)
                var ColorUp:ColorTransform = new ColorTransform();
                ColorUp.color = Zone.@up;
                var ColorOver:ColorTransform = new ColorTransform();
                ColorOver.color = Zone.@over;
                for each (var btn:XML in Zone.room)
                            myButton = getChildByName("btn_" + btn.@number);                                
                            if (myButton != null)
                                        myButton.upState.transform.colorTransform = ColorUp;
                                        myButton.downState.transform.colorTransform = ColorUp;
                                        myButton.overState.transform.colorTransform = ColorOver;
    Thank you again!
    Tin

  • Problem running DNG Converter from command line in Windows XP

    I'm a frustrated user trying to run Adobe DNG converter from the Windows command line - more specifically from a batch file.
    - Am reasonably conversant with writing batch files
    - Have read the PDF file provided by Adobe
    I just can't figure the correct syntax for adding the command line parameters and, unfortunately, the Adobe PDF file doesn't have verbose examples for idiots like me. Nor can I find any such examples on the Net, or any discussion of this problem in the forums.
    The Adobe PDF instructions state...
    "The parameter list includes the conversion options you want to use, followed by the names of the files to convert."
    As there is no switch to prefix 'the names of the files to convert' I assume I just leave a space and include the path to the source files at the end of the parameter list?
    Here is the batch file line I am trying to use...
    "C:\Program Files\Adobe\Adobe DNG Converter.exe [parameter list]"
    Where I want to specify in the [parameter list] that...
    (a) The destination directory (-d <directory> parameter) is c:\DNG_files
    (b) And the source files are in directory c:\RAW_files
    Here is the batch line with the parameters entered...
    "C:\Program Files\Adobe\Adobe DNG Converter.exe -dC:\RAW_files c:\DNG_files"
    I've tried variations of this with space between -d and C:\RAW_files and C:\DNG_files\*.* for the source files parameter.
    I just keep getting DOS erros like "The filename, directory name or volume label syntax is incorrect"
    Can anybody help me. I'm clueless how to solve the problem. :-(
    I'm running DNG COnverter version 4.2
    Thanks in anticipation.
    Rob

    Thanks for responding G Sch.
    LOL. Well this lemming doesn't habitually rename .exe files (e.g. Adobe DNG Converter.exe) to a non-spaced alternative either! (Adobe_DNG_Converter.exe)
    Still no luck...
    *** Here is my batch file...
    REM Copy and DNG-convert files from CF
    CD c:\RAW_files
    dir c:\RAW_files
    "C:\Program Files\Adobe\Adobe DNG Converter.exe" -d C:\DNG_files
    dir c:\DNG_files
    pause
    ***Here's the DOS shell output...
    <<BEGINS>>
    C:\RAW_files>dir c:\RAW_files
    Volume in drive C is Local Disk
    Volume Serial Number is D084-58ED
    Directory of c:\RAW_files
    12/03/2008 10:29 AM <DIR> .
    12/03/2008 10:29 AM <DIR> ..
    11/03/2008 07:00 AM 10,661,632 _3110455.ORF
    11/03/2008 07:01 AM 10,661,632 _3110457.ORF
    11/03/2008 07:01 AM 10,661,632 _3110458.ORF
    11/03/2008 07:02 AM 10,661,632 _3110460.ORF
    11/03/2008 07:02 AM 10,661,632 _3110461.ORF
    11/03/2008 07:03 AM 10,661,632 _3110462.ORF
    11/03/2008 07:03 AM 10,661,632 _3110463.ORF
    11/03/2008 07:04 AM 10,661,632 _3110464.ORF
    11/03/2008 07:04 AM 10,661,632 _3110465.ORF
    9 File(s) 95,954,688 bytes
    2 Dir(s) 2,619,731,968 bytes free
    C:\RAW_files>"C:\Program Files\Adobe\Adobe DNG Converter.exe" -d C:\DNG_files
    C:\RAW_files>dir c:\DNG_files
    Volume in drive C is Local Disk
    Volume Serial Number is D084-58ED
    Directory of c:\DNG_files
    12/03/2008 02:46 PM <DIR> .
    12/03/2008 02:46 PM <DIR> ..
    0 File(s) 0 bytes
    2 Dir(s) 2,619,731,968 bytes free
    C:\RAW_files>pause
    Press any key to continue . . .
    <<ENDS>>
    As you can see (a) Source files exist(b) DNG command line runs without generating an error (c) no output files in destination.
    DNG Converter did not run.
    If I remove everything after the command (i.e. the parameter list stuff) it fires up DNG Converter in interactive mode. Not what I'm after.
    Any other thoughts on what the problem is?
    Thank you.
    Rob

  • Can We Create Motion Paths From Lines Drawn In Illustrator?

    Is there any way to convert lines drawn in Adobe Illustrator into Motion Paths within Adobe Edge Animate? In other words, if I were to create something like a spiral in Illustrator to use as a path to animate an object on in Edge. Or perhaps if I wanted an object to move around the shape of another object as though it were on a path.

    An easier way would be to change the origin of a circle and it would move around it.
    Sample: https://app.box.com/s/k1lxscpit527vm0vguna

  • When using a path, jagged lines, not smooth lines, uneven lines

    I am using a Mac, photoshop CS5
    I created a path with Curves with the pen tool.
    filled it in with a color light blue.
    than I use the paint bucket to change it to dark blue.
    This is when the curved lines become jagged, not smooth, uneven.
    also I would like to use this as a mask, but with bg color changing from time to time.
    any solutions?
    GC

    Enable the retain transparency option when applying fills or use alternate colorization methods like using adjustment layers or creating the layer as a shape layer in the first place. Not sure what you mean by your mask thingy. You simply load the selection by Ctrl+clicking on teh layer thumbnail. this works no different than with any other layer.
    Mylenium

  • Convert photo to line art?

    Dear Forum,
    I am trialing Elements and Illustrator but cannot find a solution in help or the forums, or any book at Borders, so I hope someone can help.  I am looking for a way to convert photos (JPEGS) of flowers to black line art......like a coloring book, not just black and white or grayscale or sylhouette. I will then print out the line art (1-2 pixel black line art) to clear acetate for use as a positive original for creating a silkscreen via photo emulsion exposure (and then silkscreen printing the line art to fabric for hand painting). I am doing this by hand now.....place a sheet of acetate over the photo and outlining "edges" by eye with a fine Sharpie, then using that as the positive original. See attached file for an example. The line art needs to be relatively detailed ( e.g. petals, stamen, leaves) but not absolutely perfect as I only need to print guide lines on fabric for subsequent hand painting. It seems easy to do by "eye", tracing edges of color or tone change, but I have not figured out how to make that happen in Elements or Illustrator. Of course I have only had the trial for a couple days, and have used live trace, posterization, etc, but have not been lucky. Please point me in the right direction. If I can make this happen with an Adobe product, then I will buy it.....I have hundreds of photos to convert. Thanks.....Bob

    If you use Threshold, you can add some gaussian blur to the image to make the edges smoother. You can also add a brightness/contrast adjustment layer between the blurred image and the threshold layer to fine tune the edges.
    If you have Windows, you might want to look at Medhi's Fine Threshold filter (freeware) found here:
    http://www.mehdiplugins.com/english/finethreshold.htm
    Edit: You could also use Find Edges on the image first; desaturate it; then use a threshold adjustment layer. Go back to the Find Edges layer and add gaussian blur to taste. To further fine tune, slip a brightness/contrast layer between the blurred image and the threshold to control line thickness/detail. (FWIW, I would make a copy of the Find Edges layer and blur the duplicate so if you change your mind you don't have to start the project from scratch.)

  • Converting photo to line art?

    I have Photoshop Elements 5.0 and want to know if there is a way to take a photograph and convert it into a line art image. I have tried a combination of a few different filters and have not been able to get the results I am looking for. Any thoughts?

    It is not easy, and works best if image does not have a great deal of texture. Try this:
    Open image
    Duplicate background layer
    Filter>other>High pass. Want small radius
    Filter>sketch>Notepaper. Try image balance=25, Grain=0, Relief=0
    Filter>adjustments>threshold. Work slider to get black & white image
    Use pencil tool to get rid of stray pixels

  • Is there a PORTABLE wireless router that I could travel with to convert hotel LAN lines into wireless signals for my iPad?

    I travel regularly to Asia and I have been trying to compile everything I need into my iPad.  Unfortunately, most of my hotels do not have wireless in the rooms just an LAN line.  Does anyone know of a router (as small as possible) that I can plug an LAN line into that will convert it to a wireless signal I can access with the iPad.  What I don’t want is to have to plug the router into a computer and program it forevery different LAN line I encounter.  Thoughts???

    As the others have said, Airport Express is one option.  The catch as Allan said is that the configuration utility doesn't run on the iPad.  It is rumored that iOS5 may have the utlity, but that doesn't help you now.  If you can wait, then the Airport Express would arguably be the best for the iPad.
    If you can't wait, you could get the D-Link DAP-1350.  You configure it through a webpage, similar to how you would other home routers.
    http://www.dlink.com/products/?pid=DAP-1350
    I use the older DWL-G730AP 802.11g version and it's been very good to me for use by my Macbook Pro and iPad1.

  • Convert path to hyperlink from SQL Server 2000 to JSP

    Hello,
              I have the following fields in my database table:
              report_key           (not shown on JSP)     
              report_name           (on JSP)
              path                (not shown on JSP)
              user role/right      (not shown on JSP)
              The "path" field contains a URL to a specific report
              (http://www.home.com/reports/1033.cr). The "report_name" field has a
              numeric name for the report (1033). What I need to do is be able to
              display the html output of the table records (which I have already
              done), but convert the report_name to a hyperlink that the user can
              click on to directly open the report. A hyperlink data type isn't
              available in SQL Server, so I'm not sure how to do this in the JSP.
              Basically, what needs to happen is the table data on the JSP page
              displays the "report_name" (in this case 1033) as a hyperlink, which
              is picked up by the URL path in the "path" field (or appended to that
              path I suppose). So, everytime our reports admin enters a report in
              the table, this new report with its new path will be added to the html
              output on the JSP page. And would look like this:
              report_name
              1033 (appears as underlined hypertext)
              1066
              1099
              1245
              1478
              Any help or suggestions would be greatly appreciated.
              TIA,
              Bruce Johnson
              Programmer/Analyst
              

    Hi Peter,
    As you are having issue with SDK's.
    I would suggest you to post your question in
    Business Objects SDK Application Development » [Legacy Application Development SDKs|;
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all  SDK queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Shweta

  • Converting Mac/Unix line breaks to DOS

    I have a text file I regularly have to import into a web application, and the line breaks need to be DOS for it to work. I've been opening/saving as with TextWrangler, which can convert the line breaks.
    Is there a way to create a folder action or automator workflow that would automatically convert the line breaks every time that file (it's always the same file name and in the same folder) is placed in the folder?

    I found this:
    http://forums.macosxhints.com/showthread.php?t=125
    gives a few options, including a shell script.

  • Problem: Multiple jar files in Class-Path [ IOException: line too long]

    Hello Folks,
    I am trying to create a jar file using the following command:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    My MANIFEST.MF file is as following:
    Manifest-Version: 1.0
    Main-Class: com.gridftp.INSPgridFTP
    Class-Path: lib/activation.jar lib/ant.jar lib/antlr.jar lib/axis.jar lib/castor-0.9.3.jar lib/cog-abstraction-common-2.0.jar lib/cog-abstraction-examples-2.1.jar lib/cog-certmanagement-1.0.jar lib/cog-certrequest-1.0.jar lib/cog-grapheditor-0.46.jar lib/cog-gridfaces-1.0.jar lib/cog-gridshell-1.0.jar lib/cog-jglobus-1.2-050621.jar lib/cog-karajan-0.31.jar lib/cog-provider-clref-gt3_0_2.jar lib/cog-provider-clref-gt3_2_0.jar lib/cog-provider-clref-gt3_2_1.jar lib/cog-provider-clref-gt4_0_0.jar lib/cog-provider-condor-2.0.jar lib/cog-provider-gt2-2.0.jar lib/cog-provider-gt2ft-1.0.jar lib/cog-provider-gt3_0_2-2.0.jar lib/cog-provider-gt3_2_0-2.0.jar lib/cog-provider-gt3_2_1-2.0.jar lib/cog-provider-gt4_0_0-2.2.jar lib/cog-provider-local-2.0.jar lib/cog-provider-ssh-2.0.jar lib/cog-provider-webdav-1.0.jar lib/cog-resources-1.0.jar lib/cog-setup-0.91.jar lib/cog-util-0.91.jar lib/commons-discovery.jar lib/commons-httpclient.jar lib/commons-logging.jar lib/concurrent.jar lib/cryptix32.jar lib/cryptix-asn1.jar lib/cryptix.jar lib/j2ssh-common-0.2.2.jar lib/j2ssh-core-0.2.2.jar lib/jaas.jar lib/jakarta-regexp-1.2.jar lib/jakarta-slide-webdavlib-2.0.jar lib/jaxrpc.jar lib/jce-jdk13-125.jar lib/jgss.jar lib/jug-1.0.1.jar lib/junit.jar lib/log4j-1.2.8.jar lib/mail.jar lib/puretls.jar lib/saaj.jar lib/wsdl4j.jar lib/xercesImpl.jar lib/xml4j.jar lib/xml-apis-1.1.jar lib/xmlsec.jar lib/xpp3-1.1.3.4d_b4_min.jar lib/xstream-1.1.1-patched.jar .
    The grid-jar directory structure is:
    | - com -- all classes are under this dir.
    | - lib -- all the required jar files are in this dir.
    There are 59 jar files in the lib directory. When I try to create the jar file, I get the following exception:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    java.io.IOException: line too long
    at java.util.jar.Attributes.read(Attributes.java:356)
    at java.util.jar.Manifest.read(Manifest.java:167)
    at java.util.jar.Manifest.<init>(Manifest.java:52)
    at sun.tools.jar.Main.run(Main.java:124)
    at sun.tools.jar.Main.main(Main.java:904)
    Any idea, why do I get this exception? Is there any restriction as to how many jar files (or characters) can be there in the Class-Path value in the MANIFEST.MF file?
    Please help.
    Thanks,
    Ana

    use as the following way to resolve the problem:
    (1) use separate lines, to avoid too long a line for java package name lists
    (2) type a preceding space before each folloing lines, for example:
    Class-Path: ...jar ...jar ...jar
    ...jar ..jar
    ...jar ...jar
    ...jar ...jar
    Hello Folks,
    I am trying to create a jar file using the following
    command:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    My MANIFEST.MF file is as following:
    Manifest-Version: 1.0
    Main-Class: com.gridftp.INSPgridFTP
    Class-Path: lib/activation.jar lib/ant.jar
    lib/antlr.jar lib/axis.jar lib/castor-0.9.3.jar
    lib/cog-abstraction-common-2.0.jar
    lib/cog-abstraction-examples-2.1.jar
    lib/cog-certmanagement-1.0.jar
    lib/cog-certrequest-1.0.jar
    lib/cog-grapheditor-0.46.jar
    lib/cog-gridfaces-1.0.jar lib/cog-gridshell-1.0.jar
    lib/cog-jglobus-1.2-050621.jar
    lib/cog-karajan-0.31.jar
    lib/cog-provider-clref-gt3_0_2.jar
    lib/cog-provider-clref-gt3_2_0.jar
    lib/cog-provider-clref-gt3_2_1.jar
    lib/cog-provider-clref-gt4_0_0.jar
    lib/cog-provider-condor-2.0.jar
    lib/cog-provider-gt2-2.0.jar
    lib/cog-provider-gt2ft-1.0.jar
    lib/cog-provider-gt3_0_2-2.0.jar
    lib/cog-provider-gt3_2_0-2.0.jar
    lib/cog-provider-gt3_2_1-2.0.jar
    lib/cog-provider-gt4_0_0-2.2.jar
    lib/cog-provider-local-2.0.jar
    lib/cog-provider-ssh-2.0.jar
    lib/cog-provider-webdav-1.0.jar
    lib/cog-resources-1.0.jar lib/cog-setup-0.91.jar
    lib/cog-util-0.91.jar lib/commons-discovery.jar
    lib/commons-httpclient.jar lib/commons-logging.jar
    lib/concurrent.jar lib/cryptix32.jar
    lib/cryptix-asn1.jar lib/cryptix.jar
    lib/j2ssh-common-0.2.2.jar lib/j2ssh-core-0.2.2.jar
    lib/jaas.jar lib/jakarta-regexp-1.2.jar
    lib/jakarta-slide-webdavlib-2.0.jar lib/jaxrpc.jar
    lib/jce-jdk13-125.jar lib/jgss.jar lib/jug-1.0.1.jar
    lib/junit.jar lib/log4j-1.2.8.jar lib/mail.jar
    lib/puretls.jar lib/saaj.jar lib/wsdl4j.jar
    lib/xercesImpl.jar lib/xml4j.jar lib/xml-apis-1.1.jar
    lib/xmlsec.jar lib/xpp3-1.1.3.4d_b4_min.jar
    lib/xstream-1.1.1-patched.jar .
    The grid-jar directory structure is:
    | - com -- all classes are under this dir.
    | - lib -- all the required jar files are in
    e in this dir.
    There are 59 jar files in the lib directory. When I
    try to create the jar file, I get the following
    exception:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    java.io.IOException: line too long
    at
    at
    at
    at
    java.util.jar.Attributes.read(Attributes.java:356)
    at
    at
    at java.util.jar.Manifest.read(Manifest.java:167)
    at
    at
    at java.util.jar.Manifest.<init>(Manifest.java:52)
    at sun.tools.jar.Main.run(Main.java:124)
    at sun.tools.jar.Main.main(Main.java:904)
    Any idea, why do I get this exception? Is there any
    restriction as to how many jar files (or characters)
    can be there in the Class-Path value in the
    MANIFEST.MF file?
    Please help.
    Thanks,
    Anajust

Maybe you are looking for

  • Can we use the value of a variable in an alert message

    I have a variable in forms6i. I want to use the value of this variable in an alert message. How is this possible?

  • Issue with Refiners in Sharepoint 2013

    hi everyone, I have created a few new columns in my sp site in post list. i created single line text type column,peoples and groups type column and date type columns. after crawling and assigning a managed property to all the crawled properties when

  • ODI Variables in Mutliple Sessions

    Hi All, I would like to know if I set a variable as "Latest Value" and I have multiple users running multiple packages setting the same variable with different values, Can ODI handle it properly? Will those packages running in sequence by submitting

  • Importing packages and classes

    Hi, I wanted to know if anyone could tell me how to import a packages under the following circumstances: Say the class i'm importing TO is called SourceClass1, and is in a folder SourceFolder1, and SourceFolder1 is in the folder Root. Let's say I wan

  • Latest version of JRE

    hello gurus,    I need to know what version of the JRE is compatible with the Portal.  There should be OSS notes about this, or in  any Portal installation guides.  here i want to know what is the latest version of JRE. could you please suggest me. p