Patent ID: 8127700

Claim:
A sewing machine comprising: a needle bar having a lower end to which a needle is attached; a feed clog which feeds a workpiece in a feeding direction; a stitching motor which vertically moves the needle bar and moves the feed dog to carry out a feeding operation; a needle swinging motor which swings the needle in a direction orthogonal to the feeding direction; storing means for storing stitching data for a buttonhole stitching and coordinate data of inner and outer stitch points in left and right side stitching sections of buttonhole stitches having a basic overall stitching width; control means for controlling the stitching motor and the needle swinging motor to form buttonhole stitches, based on the stitching data stored in the storing means; stitching width input means for inputting an overall stitching width of buttonhole stitches; ratio calculating means for calculating a ratio of the overall stitching width, which is input from the stitching width input means, with respect to the basic overall stitching width; first position calculating means for multiplying the coordinate data of the outer stitch points in one of the side stitching sections of the buttonhole stitches having the basic overall stitching width by the ratio which is calculated by the ratio calculating means, thereby calculating coordinate data of outer stitch points in said one of the side stitching sections; side stitching width calculating means for calculating a side stitching width of said one of the side stitching sections from a difference in an overall stitching width direction component between the coordinate data of the outer stitch points in said one of the side stitching sections, which are calculated by the first position calculating means, and the coordinate data of the inner stitch points in said one of the side stitching sections of the buttonhole stitches having the basic overall stitching width; and second position calculating means for adding the coordinate data of the overall stitching width direction component corresponding to the side stitching width, which is calculated by the side stitching width calculating means, to the coordinate data of the inner stitch points in the other side stitching section of the buttonhole stitches having the basic overall stitching width, thereby calculating coordinate data of outer stitch points in said other side stitching section, wherein the control means controls the stitching motor and the needle swinging motor, based on the coordinate data of the inner stitch points in both of the side stitching sections which are stored in the storing means, the coordinate data of the outer stitch points in said one of the side stitching sections which are calculated by the first position calculating means, and the coordinate data of the outer stitch points in the other side stitching section which are calculated by the second position calculating means.