I tried to intersect two RRay objects, but the result is "not as expected". Given to already existing lines, I created two RRays thereof and intersect them:
this.rayAlign = new RRay(this.lineAlign.getStartPoint(), this.lineAlign.getEndPoint()); this.rayDest = new RRay(this.lineDest.getStartPoint(), this.lineDest.getEndPoint()); var inters = this.rayAlign.getIntersectionPoints(this.rayDest);The code above does not give the valid intersection points (if startet with script debugger on, there are several unexpected debug-messages). Using RLines instead of RRays like the following variant delivers the correct intersection points, if scaling is big enough to have lines intersected:
this.rayAlign = new RLine(this.lineAlign.getStartPoint(), this.lineAlign.getEndPoint()); this.rayDest = new RLine(this.lineDest.getStartPoint(), this.lineDest.getEndPoint()); this.rayAlign.scale(this.scaling, this.lineAlign.getMiddlePoints()[0]); this.rayDest.scale(this.scaling, this.lineDest.getMiddlePoints()[0]); var inters = this.rayAlign.getIntersectionPoints(this.rayDest);I don't know wheter if this is a bug or if I missed something using RRays - aren't those just RLines with infinitive length?