The extrusion-based additive manufacturing is a popular fabrication method, which has attracted the attention of various industries due to its simplicity, cheapness, ability to produce complex geometric shapes, and high production speed. One of the effective parameters in this process is the feed of filament that is presented in the production G-code. The feed of filament is calculated according to the layer height, the extrusion width and the length of printing path. All the required motion paths and filling patterns created by commercial software are a set of straight lines or circular arcs that are placed next to each other at a fixed distance. In special curved paths, the distance of adjacent ones is not equal at different points, and due to the weakness of common commercial software, it is not possible to create curved paths for proper printing. Therefore, making a special computer code that can be used to create various functions of curved paths is investigated in this research, and also the feed of filament parameter is studied in detail. Next, by introducing a correction technique, the feed of filament is changed during the curved path to distribute the polymer material uniformly. Finally, composite samples (which have variable stiffness) consisting of curved fibers are produced with the proposed method, and the high quality of printed samples confirm the suggested code and technique.