Beispiel #1
0
        // Part Orientation = orientation if tape is perfectly oriented the way it is oriented
        // deltaOrientation = how far offf the tape is from it's stated orientation
        public PartLocation GetPartLocation(int componentNumber)
        {
            PartLocation part;

            if (FirstPart != null)
            {
                part = GetPartBasedLocation(componentNumber);
            }
            else
            {
                var offset = new PartLocation(componentNumber * PartPitch + HoleToPartSpacingX, HoleToPartSpacingY);
                // add the vector to the part rotated by the tape orientation
                part = new PartLocation(FirstHole) + offset.Rotate(TapeOrientation.ToRadians());
            }
            // add deviation from expected orientation to part orientation
            var deltaOrientation = tapeOrientation.ToRadians() - OriginalTapeOrientationVector.ToRadians();

            part.A = (OriginalPartOrientationVector.ToRadians() + deltaOrientation) * 180d / Math.PI;

            return(part);
        }
Beispiel #2
0
 public PartLocation GetPartBasedLocation(int partNumber)
 {
     return(new PartLocation(FirstPart) + new PartLocation(partNumber * PartPitch, 0).Rotate(TapeOrientation.ToRadians()));
 }
Beispiel #3
0
 // HOLES //
 public PartLocation GetHoleLocation(int holeNumber)
 {
     return(new PartLocation(FirstHole) + new PartLocation(holeNumber * HolePitch, 0).Rotate(TapeOrientation.ToRadians()));
 }