The application belongs to the field of industrial manufacturing, and discloses a path
planning method of a 5-axis 3D printer, which comprises a representation method of a random shape entity, a
nozzle direction constraint method on a contour, an entity filling path
planning method and a sampling interpolation method. The representation method of the random shape entity extracts shape data of a CAD model of the random shape entity, decomposes the model into constituent surfaces and edges, and determines the order and parameter direction of each constituent surface. The
nozzle direction constraint method on the contour adopts a side tangent direction and a transition surface normal direction, a gradually deformed
transition layer and adaptive material
extrusion. The entity filling path
planning method selects the last deposition layer to coincide with the top surface, designs a filling layer, fuses the base and the top surface by using a surface transition concept, and generates an internal filling path. The sampling interpolation method samples and interpolates a path according to position, and converts the path into G-code to obtain a printing path. The application can eliminate step effects and internal voids, reduce non-feeding movements, and support complex structures without the need for support.