A 3D printer, comprising: a resin tank; a first linear driving mechanism and a first output end of the first linear driving mechanism is able to move upwards or downwards along a vertical direction; a second linear driving mechanism and a second output end of the second linear driving mechanism is able to move upwards or downwards along the vertical direction; a printing platform fixedly connected with the first output end and moves upwards or downwards along with the first output end; an optical machine assembly located above the printing platform, wherein the optical machine assembly comprises: an optical machine mechanism comprising an optical machine and an optical machine mounting seat which are fixedly connected to each other, and the optical machine mounting seat is fixedly connected with the second output end and moves upwards or downwards along with the second output end; and a scraper mechanism comprising a scraper motor, a scraper shaft and a scraper, characterized by a main table top comprising a horizontal table top and a vertical table top which are perpendicular to each other, and the horizontal table top is provided with the resin tank; wherein the first linear driving mechanism is mounted at one end, close to the horizontal table top, of the vertical table top; wherein the second linear driving mechanism is mounted at another end, far away from the horizontal table top, of the vertical table top; wherein the optical machine assembly is an optical machine scraper assembly; and wherein the scraper motor is fixedly connected with the optical machine mounting seat, one end of the scraper shaft is fixedly connected with the output end of the optical machine mounting seat, another end of the scraper shaft is fixedly connected with the scraper, a distance measuring sensor is provided on the scraper, and the scraper motor is able to drive the scraper to make a fan-shaped movement. a resin tank; a first linear driving mechanism and a first output end of the first linear driving mechanism is able to move upwards or downwards along a vertical direction; a second linear driving mechanism and a second output end of the second linear driving mechanism is able to move upwards or downwards along the vertical direction; a printing platform fixedly connected with the first output end and moves upwards or downwards along with the first output end; an optical machine assembly located above the printing platform, wherein the optical machine assembly comprises: an optical machine mechanism comprising an optical machine and an optical machine mounting seat which are fixedly connected to each other, and the optical machine mounting seat is fixedly connected with the second output end and moves upwards or downwards along with the second output end; and a scraper mechanism comprising a scraper motor, a scraper shaft and a scraper, characterized by a main table top comprising a horizontal table top and a vertical table top which are perpendicular to each other, and the horizontal table top is provided with the resin tank; wherein the first linear driving mechanism is mounted at one end, close to the horizontal table top, of the vertical table top; wherein the second linear driving mechanism is mounted at another end, far away from the horizontal table top, of the vertical table top; wherein the optical machine assembly is an optical machine scraper assembly; and wherein the scraper motor is fixedly connected with the optical machine mounting seat, one end of the scraper shaft is fixedly connected with the output end of the optical machine mounting seat, another end of the scraper shaft is fixedly connected with the scraper, a distance measuring sensor is provided on the scraper, and the scraper motor is able to drive the scraper to make a fan-shaped movement. an optical machine mechanism comprising an optical machine and an optical machine mounting seat which are fixedly connected to each other, and the optical machine mounting seat is fixedly connected with the second output end and moves upwards or downwards along with the second output end; and a scraper mechanism comprising a scraper motor, a scraper shaft and a scraper, characterized by a main table top comprising a horizontal table top and a vertical table top which are perpendicular to each other, and the horizontal table top is provided with the resin tank; wherein the first linear driving mechanism is mounted at one end, close to the horizontal table top, of the vertical table top; wherein the second linear driving mechanism is mounted at another end, far away from the horizontal table top, of the vertical table top; wherein the optical machine assembly is an optical machine scraper assembly; and wherein the scraper motor is fixedly connected with the optical machine mounting seat, one end of the scraper shaft is fixedly connected with the output end of the optical machine mounting seat, another end of the scraper shaft is fixedly connected with the scraper, a distance measuring sensor is provided on the scraper, and the scraper motor is able to drive the scraper to make a fan-shaped movement.