A 3D printing method, device and medium based on Vue3

CN120780254BActive Publication Date: 2026-10-20浪潮智慧科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510886124.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2026-10-20
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

[0003]相关技术中,基于3D打印前端界面,用户调整打印参数后,无法直观实时看到对3D模型的影响

Benefits of technology

本申请提供的基于Vue3的3D打印方法通过HTTP/WS与Vue3前端建立连接,再基于RESTful API与Spring Boot后端交互,支持多类型用户终端接入,提升系统兼容性与通用性。在Vue3前端利用响应式数据绑定实现打印参数与3D模型预览组件的关联,用户能实时看到参数调整对模型的影响,提升用户体验,提高代码可维护性与界面响应速度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780254B_ABST
    Figure CN120780254B_ABST
Patent Text Reader

Abstract

The application provides a 3D printing method, device and medium based on Vue3, belongs to the technical field of 3D printing, and specifically relates to that a user terminal is connected with a front end, the front end acquires a file, printing parameters are associated with a 3D model preview component, and real-time linkage update of 3D model preview during parameter adjustment is realized; the front end initiates a slicing request to a back end, the back end calls a slicing service through gRPC; the front end sends a printing instruction to the back end; a printer reports state data to the back end, the back end synchronizes the state to the front end, and the printer state is displayed in real time; printing logs and state data are monitored, the slicing service Pod is expanded according to the backlog of the slicing task queue, load balancing of the slicing service request is realized through a Service, and the application realizes cross-platform management and real-time interaction of the whole process of 3D printing through a front-end framework, rendering technology, a real-time communication protocol and a micro-service architecture, and improves overall production efficiency and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of 3D printing technology, specifically relating to a 3D printing method, device and medium based on Vue3. Background Technology

[0002] 3D printing, also known as additive manufacturing, is a process of creating objects by adding materials layer by layer. It has evolved from a rapid prototyping tool into a manufacturing technology that can support actual production and has been widely used in many fields such as aerospace, automotive, medical, and construction.

[0003] In related technologies, based on the 3D printing front-end interface, users cannot intuitively see the real-time impact on the 3D model after adjusting printing parameters. Users can only rely on experience to estimate, making it difficult to detect unreasonable parameter settings before printing, increasing the risk of printing failure. For complex 3D models, the slicing service in related technologies has long slicing times, failing to meet users' needs for quickly obtaining slicing results. At the same time, the slicing parameters do not take into account the model complexity, resulting in wasted resources for slicing simple models, while complex models suffer from poor printing quality due to inadequate parameters, making it impossible to find a balance between efficiency and quality. When the slicing task queue is backlogged, additional slicing service resources cannot be added, causing the system response to slow down or even crash. In addition, the lack of load balancing in request allocation leads to excessive pressure on some service nodes, affecting the overall stability and availability of the system. Summary of the Invention

[0004] This invention provides a 3D printing method based on Vue3. From user interaction, model processing, task scheduling, printing monitoring to system maintenance, this invention provides users with a convenient and reliable 3D printing process, improving overall production efficiency and user experience.

[0005] The methods include: Step S101: The user terminal establishes a connection with the Vue3 frontend via HTTP / WS. The Vue3 frontend completes the interaction preparation with the Spring Boot backend based on the RESTful API, and builds the basic interaction link for 3D printing operations. Step S102: The Vue3 frontend obtains the STL file and uses reactive data binding to associate the printing parameters with the 3D model preview component, so as to realize the real-time linkage update of the 3D model preview when the parameters are adjusted. Step S103: The Vue3 frontend sends a slice request to the Spring Boot backend, and the Spring Boot backend calls the slice service via gRPC; Step S104: The Vue3 frontend sends a print command to the Spring Boot backend, and issues a print job to the specified printer based on the printer cluster status, while subscribing to the printer status. Step S105: The printer reports status data to the Spring Boot backend, and the Spring Boot backend synchronizes the status to the Vue3 frontend and displays the printer status in real time. Step S106: Monitor the printed logs and status data, expand the slice service Pod according to the backlog of slice task queue, and realize load balancing of slice service requests through Service.

[0006] It should be further explained that step S101 specifically includes: After the user terminal starts the 3D printing interactive application, it sends a connection request to the Vue3 front-end server via the HTTP protocol. After receiving a successful connection response, the Vue3 frontend sends an initialization request to the backend Spring Boot service based on the RESTful API specification. After verifying user permissions, the backend service returns initial configuration data containing API interface documentation, authentication token, and service status. Based on the received initialization configuration data, the Vue3 frontend loads the 3D model preview component and parameter control component, calls the browser's graphics interface to initialize the 3D rendering engine, sets the rendering canvas size, lighting parameters and interactive event listeners, and completes the construction of the visualization environment for the frontend interactive interface. After the Spring Boot backend completes the frontend initialization configuration and returns, it synchronously starts the communication module with the printer cluster and subscribes to the printer status topic.

[0007] It should be further explained that step S102 specifically includes: Users select an STL file and submit it through the file upload component in the Vue3 frontend. The Vue3 frontend calls the browser's FileAPI to read the file's binary data, parses the file header to obtain the number of model vertices and triangles, checks the file format for illegal characters and whether the triangle index is out of bounds. After the checks pass, the file data is temporarily stored in the memory cache and the preview component initialization process is triggered. After receiving the parameter update event, the preview component calls the WebGL rendering engine to recalculate the model projection matrix, lighting intensity, and layered display range. Based on the layer height parameter, it adjusts the layer height value of the layered rendering, the number of layers, and the fill rate parameter to adjust the shading depth of the internal fill area, thus completing the real-time redraw of the preview screen.

[0008] It should be further explained that step S103 specifically includes: After the user completes the printing parameter adjustment in the Vue3 frontend, the STL file binary data, printing parameters and user identifier are encapsulated into an HTTP request message and sent to the Spring Boot backend via the POST method; After receiving the request, the Spring Boot backend verifies the integrity of the STL file and the validity of the parameters. If the verification is successful, it calls the gRPC client to send a slice task request containing file data and parameters to the slice service cluster. After receiving the task, the slice service cluster starts the multi-threaded task scheduler and divides the model into multiple sub-models according to the spatial region based on the number of available threads. Each thread adjusts the slicing parameters according to the model complexity. After completing the slicing calculation for its respective region, the sub-results are merged into complete GCode data and returned to the Spring Boot backend via gRPC. The backend encapsulates the GCode data into a response message and forwards it to the Vue3 frontend.

[0009] It should be further explained that step S104 specifically includes: Step S1041: After receiving the print command, the Spring Boot backend matches the printer based on the idle time of the printer cluster, the length of the task queue, the size of the print task model, and the type of consumables, and prioritizes the allocation of tasks to devices with low resource utilization and high compatibility. Step S1042: If the task involves collaboration among multiple printers, the Spring Boot backend will split the task into sub-task units, and the shared subscription mechanism will broadcast the sub-tasks to the specified printers and record the dependencies between the sub-tasks to ensure sequential execution.

[0010] Step S1043: When the Spring Boot backend sends out GCode data, it performs secondary verification of the slicing parameters in conjunction with the printer's maximum feed speed and the heated bed temperature range, and adjusts the non-critical instructions in the GCode.

[0011] It should be further explained that step S1042 specifically includes: After the Spring Boot backend recognizes that a print job requires collaboration among multiple printers, it determines the splitting dimensions based on the spatial distribution characteristics of the print job and generates a list of sub-tasks.

[0012] The Spring Boot backend broadcasts the subtask list to all online printers via the shared subscription feature of the MQTT client; The Spring Boot backend creates a subtask dependency table in the database for each collaborative task, records the execution order between subtasks, and marks the expected start and end times of each subtask with timestamps; If a printer malfunctions during collaborative execution, the backend dynamically adjusts dependencies, reassigning the unfinished subtasks of the malfunctioning printer to other online and compatible printers, and urgently pushing the adjusted subtasks to the newly assigned printers via MQTT.

[0013] It should be further explained that step S1043 specifically includes: After generating complete GCode data, the backend calls the printer configuration database to query the hardware characteristic parameters of the target printer; The raw GCode data generated from the slices is compared and verified item by item with the printer capability configuration list, and a verification report is generated. For non-critical instructions marked in the verification report, Huffman coding is used for optimization, and the comment content is compressed into short identifiers, and redundant layer-swapping marks are merged into a single instruction. The optimized GCode data is sent to the target printer. Before sending, the data volume is compressed using Base64 encoding, and the transmission frequency is adjusted according to the printer's current communication load.

[0014] It should be further explained that step S105 specifically includes: The printer sends status messages to the Spring Boot backend; After receiving the status message, the Spring Boot backend queries the model ID and task priority of the current task based on the printer ID, and stores the status data as associated with the task in the printer status table of the database. The Spring Boot backend pushes status update notifications to the Vue3 frontend via WebSocket service. The notifications include the task ID and status summary. After receiving the notification, the front end matches the printing task currently being followed by the user based on the task ID, and calls the responsive component to update the visual elements in the interface to achieve real-time display. When multiple users are involved in collaborative editing, the Spring Boot backend receives operation instructions from different users via WebSocket, calls the detection service to compare the timestamps and priorities of the operations, retains the latest layer height settings, overwrites the old settings, and synchronizes the merged state to the frontends of all participating users.

[0015] According to another embodiment of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the Vue3-based 3D printing method.

[0016] According to another embodiment of this application, a storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the Vue3-based 3D printing method.

[0017] As can be seen from the above technical solutions, the present invention has the following advantages: The Vue3-based 3D printing method provided in this application establishes a connection with the Vue3 frontend via HTTP / WS, and then interacts with the Spring Boot backend based on a RESTful API. It supports access from multiple user terminals, improving system compatibility and versatility. Responsive data binding is used in the Vue3 frontend to associate printing parameters with the 3D model preview component, allowing users to see the impact of parameter adjustments on the model in real time, enhancing user experience, code maintainability, and interface responsiveness. The slicing service employs multi-task parallel processing, dynamically optimizing slicing parameters based on model complexity. For complex models, it automatically adjusts parameters to improve slicing efficiency, balancing print quality and efficiency. The backend optimizes printer resource utilization based on printer cluster status and task attributes, reducing printer idle time and improving overall productivity. Printers report their status via the MQTT protocol, which is synchronized from the backend to the frontend for real-time display. In multi-user collaboration scenarios, WebSocket is used for operation synchronization and status merging. Users can monitor printing progress in real time, handle exceptions promptly, and the multi-user collaboration feature supports teamwork, avoiding repetitive work caused by data inconsistencies and improving work efficiency. ELKStack is used to monitor system logs and status data, and Kubernetes HPA automatically scales up slicing service Pods, with load balancing achieved through Services, further enhancing overall productivity and user experience. Attached Figure Description

[0018] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a system framework diagram for a 3D printing method based on Vue3. Figure 2 This is a flowchart of a 3D printing method based on Vue3. Figure 3 A flowchart illustrating the interaction process of 3D printing based on Vue 3; Figure 4 This is a flowchart illustrating an example of a 3D printing method based on Vue3. Figure 5 This is a flowchart of another embodiment of the 3D printing method based on Vue3; Figure 6 This is a flowchart of another embodiment of the 3D printing method based on Vue3; Figure 7 This is a schematic diagram of an electronic device. Detailed Implementation

[0020] like Figure 1 As shown, the Vue3-based 3D printing method provided in this application can be implemented based on a system framework. The system adopts a B / S architecture and realizes cross-platform management and real-time interaction of the entire 3D printing process through the Vue3 front-end framework, WebGL rendering technology, WebSocket real-time communication protocol and microservice architecture.

[0021] The system can include: a Vue3 front-end module that utilizes Proxy reactive data binding and Composition API reuse logic, combined with Three.js to achieve real-time preview and dynamic parameter adjustment of 3D models; a real-time collaboration module that supports multiple users to synchronously edit models and print parameters at millisecond levels based on WebSocket and Operational Transformation (OT) algorithms; an intelligent slicing module that integrates the Slic3r open-source algorithm and self-developed dynamic optimization strategies, improving slicing efficiency by 30% through WebWorker multi-threaded processing; and a cloud service module that adopts a Spring Boot microservice architecture, calling slicing services via gRPC, managing printer clusters via MQTT protocol, and achieving elastic scaling based on Kubernetes.

[0022] This invention supports cross-platform access via Windows, macOS, Linux, and mobile browsers through a front-end / back-end separation design and a lightweight communication protocol, achieving a 3D model rendering frame rate of 60FPS. The system provides an open API interface, which can be extended with third-party plugins such as AI model repair and blockchain notarization to build an intelligent 3D printing ecosystem.

[0023] It should be noted that when referring to Vue3 frontend and Spring Boot backend in this application, both "frontend" and "backend" can be used. Here, "frontend" refers to the Vue3 frontend, and "backend" refers to the Spring Boot backend.

[0024] The key terms of this invention are explained in the table below:

[0025] Key terms:

[0026] The Vue3-based 3D printing method described in this application will be described in detail below. Specific details, such as particular system architectures and technologies, are presented for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details.

[0027] It should be understood that, when used in this specification, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0028] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] Please see Figure 2 and Figure 3 The diagram shows a flowchart of a 3D printing method based on Vue3 in a specific embodiment. The method includes: Step S101: The user terminal establishes a connection with the Vue3 frontend via HTTP / WS. The Vue3 frontend completes the interaction preparation with the Spring Boot backend based on the RESTful API, and builds the basic interaction link for 3D printing operations.

[0031] In some embodiments, the user terminal establishes a communication connection with the Vue3 frontend via HTTP. The Vue3 frontend uses a RESTful API to interact with the Spring Boot backend, transmitting user authentication information, session identifiers, and other data to complete the interaction preparation.

[0032] Step S102: The Vue3 frontend obtains the STL file and uses reactive data binding to associate the printing parameters with the 3D model preview component, so as to achieve real-time linkage and updates of the 3D model preview when the parameters are adjusted.

[0033] In some embodiments, users select an STL file to upload in the Vue3 front-end interface. Leveraging Vue3's reactive data binding features, printing parameters such as layer height and fill rate are tightly linked to the 3D model preview component. When the user adjusts the parameters, the front-end captures the changes in real time and triggers an update operation in the 3D model preview component.

[0034] As can be seen, Vue 3's reactive system monitors changes in the print parameter object. Once a change is detected, it executes a pre-defined update function, re-renders the 3D model preview component, and adjusts the model's display effect according to the new parameter values, such as changing the layer height to display the model in layers, and changing the fill rate to present the internal structure.

[0035] Step S103: The Vue3 frontend sends a slice request to the Spring Boot backend, and the Spring Boot backend calls the slice service via gRPC.

[0036] In some embodiments, the Vue3 frontend sends a slice request, carrying the STL file path and printing parameter information. After receiving the request, the Spring Boot backend uses the efficient and low-latency features of gRPC to call the slice service. The slice service internally uses a multi-threaded pool to achieve parallel processing of multiple tasks, and evaluates the model complexity based on indicators such as the number of triangles in the model, adjusts the slice parameters, completes the slice operation, and returns the result.

[0037] Step S104: The Vue3 frontend sends a print command to the Spring Boot backend, and issues a print job to the specified printer based on the printer cluster status, while subscribing to the printer status.

[0038] In some embodiments, the Vue3 frontend sends a print command containing the task ID, model name, etc., to the Spring Boot backend.

[0039] The backend comprehensively considers factors such as the idle status, busy status, fault status, and task queue length of each printer in the printer cluster, selects a suitable printer, and sends a print task containing sliced ​​GCode data to it via the MQTT protocol. At the same time, it subscribes to the status topic of the printer from the MQTT broker.

[0040] As can be seen, after receiving the print command, the backend matches the optimal printer according to the established scheduling strategy and publishes the task message to the topic subscribed to by the specified printer via the MQTT protocol. The printer then receives the task and begins execution. Simultaneously, the backend, as a subscriber, receives status messages published by the printer, enabling real-time tracking of the printer's status.

[0041] Step S105: The printer reports status data to the Spring Boot backend, and the Spring Boot backend synchronizes the status to the Vue3 frontend and displays the printer status in real time.

[0042] In some embodiments, during the execution of a printing task, the printer periodically reports status data, including detailed information such as temperature, progress, and errors, to the Spring Boot backend via the MQTT protocol. Upon receiving the data, the backend synchronizes it to the Vue3 frontend, which then displays the printer's real-time status on the interface. In multi-user collaborative scenarios, WebSocket is used to achieve operation synchronization and status merging. When multiple users operate on the same printing task, the frontend records information such as operation timestamps and handles conflicts according to rules to ensure data consistency.

[0043] Step S106: Monitor the printed logs and status data, expand the slice service Pod according to the backlog of slice task queue, and realize load balancing of slice service requests through Service.

[0044] In some embodiments, ELKStack is used to collect and analyze system logs and status data, including component runtime logs and printer status reports. The Kubernetes-based HPA component monitors the slice task queue length in real time. When the queue backlog exceeds a preset threshold, it automatically triggers the scaling up of the slice service Pod, adding new service instances. Slice service requests are then rationally distributed to each instance using Kubernetes Service resources to achieve load balancing.

[0045] As can be seen, ELKStack collects, parses, stores, and visualizes log data, facilitating system monitoring by operations personnel. The Service resource acts as a load balancer, distributing incoming slice requests to various service instances according to round-robin, least connections, and other criteria to ensure balanced load across instances. Load balancing ensures efficient processing of slice service requests, improving overall system performance and stability, and enhancing user experience.

[0046] In one embodiment of the present invention, based on step S101, a possible embodiment will be given below, and its specific implementation will be described in a non-limiting manner.

[0047] Step S101 specifically includes: Step S1011: After the user terminal starts the 3D printing interactive application, it sends a connection request to the Vue3 front-end server via the HTTP protocol. The request includes the terminal device identifier, communication version number, and adjustment parameters. A response message containing a connection token and available interface addresses is returned, completing the establishment of the basic network link.

[0048] Step S1012: After receiving the successful connection response, the Vue3 frontend sends an initialization request to the backend Spring Boot service based on the RESTful API specification. The request includes the user login credentials, a 3D model preview component, and a print parameter panel.

[0049] After verifying user permissions, the backend service returns initialization configuration data containing API interface documentation, authentication token, and service status.

[0050] Step S1013: Based on the received initialization configuration data, the Vue3 frontend loads the 3D model preview component and parameter control component, calls the browser's graphics interface to initialize the 3D rendering engine, sets the rendering canvas size, lighting parameters and interactive event listeners, and completes the construction of the visualization environment for the frontend interactive interface.

[0051] Step S1014: After the Spring Boot backend completes the frontend initialization configuration and returns, it synchronously starts the communication module with the printer cluster and subscribes to the printer status topic.

[0052] Simultaneously, the slice service task queue is initialized, a connection to the database is established to store user-uploaded models and printing parameters, and preparations are made for the full-link operation of the backend service.

[0053] As can be seen, when the user terminal starts the 3D printing interactive application, it sends a connection request to the Vue3 front-end server. The request includes key information such as the terminal device identifier, communication version number, and adjustment parameters. After receiving the successful connection response, the Vue3 front-end sends an initialization request to the back-end Spring Boot service according to the RESTful API specification. This request includes the user login credentials and information related to the 3D model preview component and the printing parameter panel.

[0054] After the backend service verifies the user's permissions, it returns initialization configuration data containing API interface documentation, authentication tokens, and service status information. Using this initialization configuration data, the Vue3 frontend successfully loads the 3D model preview component and parameter control component, calls the browser's graphics interface to initialize the 3D rendering engine, and sets the rendering canvas size, lighting parameters, and interactive event listeners, thus establishing the visual environment for the frontend interactive interface. This embodiment ensures the efficiency and accuracy of connection establishment and data interaction between the user terminal, frontend, and backend. The effective establishment of the visual environment for the frontend interactive interface provides users with more intuitive and convenient 3D model preview and printing parameter adjustment functions, thereby improving the user experience.

[0055] In one embodiment of the present invention, based on step S102, the following will provide a possible embodiment and its specific implementation will be described in a non-limiting manner. For example... Figure 4 As shown, step S102 specifically includes: Step S1021: The user selects an STL file and submits it through the file upload component of the Vue3 frontend. The frontend calls the browser's FileAPI to read the file's binary data, parses the file header to obtain the number of model vertices and triangles, checks whether the file format contains illegal characters and whether the triangle index is out of bounds. After the verification is passed, the file data is temporarily stored in the memory cache and the preview component initialization process is triggered.

[0056] Step S1022: The front-end reactive data binding module establishes the printing layer height, fill rate, etc., and establishes a two-way association with the properties of the 3D model preview component. When parameter values ​​change, an event object containing the new parameters is automatically generated, and the preview component is notified to update its internal rendering configuration through Vue 3's reactive system.

[0057] Step S1023: After receiving the parameter update event, the preview component calls the WebGL rendering engine to recalculate the model projection matrix, lighting intensity, and layered display range. According to the layer height parameter, the smaller the layer height value of the layered rendering, the more layers there are. According to the fill rate parameter, the shading depth of the internal fill area is adjusted to complete the real-time redraw of the preview screen.

[0058] Step S1024: The front end synchronously updates the numerical display in the parameter panel and writes the current valid parameter values ​​to local storage. When the user switches pages or refreshes the browser, the most recently saved parameter values ​​are read from local storage to restore the rendering state of the preview component and ensure the continuity of the user interaction process.

[0059] As can be seen, this embodiment achieves real-time linkage between parameter adjustment and 3D model preview after STL file upload through the synergistic effect of file parsing, responsive binding, and dynamic rendering. It realizes closed-loop management of the entire process from STL file upload to 3D model preview. The file format verification mechanism effectively intercepts illegal files, avoiding system crashes caused by file errors and ensuring stable system operation; responsive data binding and real-time rendering technology allow users to instantly see the impact of parameter adjustments on the model, reducing trial-and-error costs before printing and improving operational accuracy.

[0060] In one embodiment of the present invention, based on step S103, the following will provide a possible embodiment and its specific implementation will be described in a non-limiting manner. For example... Figure 5 As shown, step S103 specifically includes: Step S1031: After the user completes the printing parameter adjustment in the Vue3 frontend, the STL file binary data, printing parameters and user identifier are encapsulated into an HTTP request message and sent to the Spring Boot backend via the POST method.

[0061] Step S1032: After receiving the request, the Spring Boot backend verifies the integrity of the STL file and the validity of the parameters. If the verification is successful, it calls the gRPC client to send a slice task request containing file data and parameters to the slice service cluster.

[0062] Step S1033: After receiving the task, the slicing service cluster starts the multi-threaded task scheduler. Based on the number of available threads, it divides the model into multiple sub-models according to spatial regions. Each sub-model contains local geometric data of the original model, and an independent thread is assigned to each sub-model for slicing calculation. At the same time, the model analysis tool is called to count the total number of triangles in the STL file to evaluate the model complexity. The complexity is mainly determined by the number of triangles > 100,000, which is considered high complexity.

[0063] Step S1034: Each thread dynamically adjusts the slicing parameters based on the model complexity. Here, high-complexity sub-models use a smaller layer height, such as 0.15mm; low-complexity sub-models use the default layer height of 0.2mm. After completing the slicing calculation for their respective regions, the sub-results are merged into complete GCode data and returned to the Spring Boot backend via gRPC. The backend encapsulates the GCode data into a response message and forwards it to the Vue3 frontend.

[0064] In this embodiment, after receiving the task, the slicing service cluster starts the multi-threaded task scheduler. Based on the number of available threads, it splits the 3D model into multiple sub-models containing local geometric data according to spatial regions, and assigns an independent thread to each sub-model for slicing calculation. At the same time, it calls the model analysis tool to evaluate the model complexity by counting the total number of triangles in the STL file.

[0065] Each thread dynamically adjusts slicing parameters based on the model's complexity. For example, a smaller layer height is used for high-complexity sub-models to ensure printing accuracy, while a default layer height is used for low-complexity sub-models to improve efficiency. After each thread completes the slicing calculation, the sub-results are merged into complete GCode data, which is returned to the Spring Boot backend via gRPC. The backend then encapsulates the GCode data into a response message and forwards it to the Vue3 frontend, thus completing the entire slicing process. This implements 3D model slicing processing. The frontend uniformly encapsulates data sending requests to ensure data integrity. The slicing service cluster uses multi-threaded task scheduling and model region partitioning, leveraging the performance of multi-core processors to shorten the slicing time for complex models and improve system processing efficiency. This ensures both the printing quality of high-complexity models and the processing speed of low-complexity models, enhancing the user experience of the 3D printing system.

[0066] In one embodiment of the present invention, based on step S104, the following will provide a possible embodiment and its specific implementation will be described in a non-limiting manner. For example... Figure 6 As shown, step S104 specifically includes: Step S1041: After receiving the print command, the Spring Boot backend matches the printer based on the idle time of the printer cluster, the length of the task queue, the size of the print task model, and the type of consumables, and prioritizes the allocation of tasks to devices with low resource utilization and high compatibility.

[0067] Step S1042: If the task involves collaboration among multiple printers, the Spring Boot backend will split the task into sub-task units, and the shared subscription mechanism will broadcast the sub-tasks to the specified printers and record the dependencies between the sub-tasks to ensure sequential execution.

[0068] Step S1043: When the Spring Boot backend sends out GCode data, it performs secondary verification of the slicing parameters based on the printer's maximum feed speed and the heated bed temperature range, and adjusts non-critical instructions in the GCode to reduce the amount of data transmitted and improve sending efficiency.

[0069] Step S1044: Establish a two-way communication channel. When the Spring Boot backend pushes the printer status to the Vue3 frontend, it supports conflict detection and operation merging in multi-user collaborative scenarios, such as priority rules based on timestamps.

[0070] As can be seen, the above steps, which allocate tasks based on printer status and task attributes, effectively avoid waste of printer resources, improve equipment utilization, and enhance overall production efficiency. For complex multi-printer collaborative tasks, reasonable task splitting, broadcasting, and dependency management ensure that large tasks can be completed in an orderly manner.

[0071] Two-way communication and multi-user collaboration mechanisms enable users to monitor printer status in real time and handle abnormal situations promptly.

[0072] In some specific embodiments, step S1042 specifically includes: Step S10421: After the Spring Boot backend recognizes that a print job requires collaboration among multiple printers, it determines the splitting dimension based on the spatial distribution characteristics of the print job and generates a list of sub-tasks containing sub-task IDs, the coordinate range of the region to which they belong, and the required printer types.

[0073] The spatial distribution characteristics here can be the maximum extension length along the X / Y / Z axes. The splitting dimension is to generate subtask IDs by layering along the Z-axis or by dividing into blocks along the XY plane.

[0074] Step S10422: The Spring Boot backend broadcasts the subtask list to all online printers through the shared subscription function of the MQTT client; each printer matches the subscription topic according to its own identifier and only receives subtasks that match its own type and whose area coordinates are within its molding chamber range, thus avoiding invalid task distribution.

[0075] Step S10423: The Spring Boot backend creates a subtask dependency table in the database for each collaborative task, records the execution order between subtasks, and marks the expected start and end times of each subtask with timestamps; when the printer completes the current subtask, it reports the completion status to the backend, the backend updates the dependency table and triggers the push of the next subtask.

[0076] Step S10424: If a printer malfunctions during collaborative execution, the backend dynamically adjusts the dependencies, reassigns the unfinished subtasks of the malfunctioning printer to other online and compatible printers, and urgently pushes the adjusted subtasks to the newly assigned printers via MQTT to ensure that the overall printing task is not interrupted.

[0077] This embodiment determines the splitting dimension based on the maximum extension length of the task model along the X / Y / Z axes, such as layering along the Z-axis or dividing into blocks on the XY plane, generating a subtask list containing subtask IDs, area coordinates, and printer type requirements. Subsequently, the backend broadcasts the subtask list to all online printers via MQTT's shared subscription function. Each printer only receives tasks that match its own type and whose area coordinates are within its print chamber range, avoiding invalid distribution. Simultaneously, the backend creates a subtask dependency table in the database, recording the execution order and timestamps. When a printer completes a subtask, it reports its status to the backend, which then updates the dependency table and triggers the push of the next subtask. If a printer malfunctions during execution, the backend dynamically adjusts the dependencies, reassigning unfinished subtasks to other compatible devices to ensure uninterrupted task execution.

[0078] In this way, large-scale 3D printing tasks are broken down into parallel subtasks through spatial partitioning and multi-printer collaboration, avoiding excessive processing time on a single device and shortening the overall delivery cycle. Subtasks are matched based on printer type and molding chamber range, ensuring a precise match between the processing capacity of each device and task requirements, thus improving the overall utilization rate of cluster resources.

[0079] In some specific embodiments, step S1043 specifically includes: Step S10431: After generating complete GCode data, the backend calls the printer configuration database to query the hardware characteristic parameters of the target printer, including information such as maximum allowable layer height, minimum feed speed, upper / lower limit of heated bed temperature, and supported GCode instruction set version, to form a printer capability configuration list.

[0080] Step S10432: Compare and verify the original GCode data generated by slicing with the printer capability configuration list item by item. Focus on checking whether the layer height is less than or equal to the printer's maximum allowed layer height, whether the fill rate is within the percentage range supported by the device, and whether the layer switching command conforms to the printer instruction set specification. Mark non-compliant items and generate a verification report.

[0081] Step S10433: For non-critical instructions marked in the verification report, Huffman coding is used for optimization, and the comment content is compressed into short identifiers. Redundant layer-swapping marks are merged into a single instruction to reduce unnecessary data volume.

[0082] Step S10434: Send the optimized GCode data to the target printer. Before sending, use Base64 encoding to compress the data volume and adjust the transmission frequency according to the printer's current communication load to ensure the efficiency and stability of data delivery.

[0083] In one embodiment of the present invention, based on step S105, the following will provide a possible embodiment and its specific implementation will be described in a non-limiting manner. Step S105 specifically includes: Step S1051: The printer sends a status message to the Spring Boot backend. The message includes the temperature value, progress percentage, error code and description, and is accompanied by a timestamp and the printer's unique identifier to ensure data traceability.

[0084] Step S1052: After receiving the status message, the Spring Boot backend verifies the integrity of the message, queries the model ID and task priority of the current task based on the printer ID, and stores the status data in the printer status table of the database in association with the task.

[0085] Step S1053: The Spring Boot backend pushes a status update notification to the Vue3 frontend via the WebSocket service. The notification includes the task ID and status summary. After receiving the notification, the frontend matches the printing task that the user is currently interested in based on the task ID, and calls the reactive component to update the temperature curve, progress bar and other visual elements in the interface to achieve real-time display.

[0086] Step S1054: When multiple users are involved in collaborative editing, the Spring Boot backend receives operation instructions from different users via WebSocket, calls the detection service to compare the timestamps and priorities of the operations, retains the latest layer height settings, overwrites the old settings, and synchronizes the merged status to the front end of all participating users to ensure that the printer status and model parameters seen by multiple users are consistent.

[0087] Step S105 achieves efficient monitoring of printer status and ensures consistency in multi-user collaborative operations. Printer status messages are accompanied by timestamps and identifiers to ensure data traceability; backend verification and associated storage of messages improve data accuracy and standardization, providing a reliable basis for data analysis and decision-making. In multi-user collaborative scenarios, the operation merging mechanism based on timestamps and priorities effectively avoids data conflicts and chaos caused by simultaneous operations by multiple users, ensuring consistent information for all users and guaranteeing the smooth progress of 3D printing tasks in a multi-user collaborative environment.

[0088] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0089] like Figure 7 As shown, this application also provides an electronic device, including a display module 103, a memory 102, a processor 101, and a computer program stored in the memory and executable on the processor 101, wherein the processor 101 executes the program to implement the steps of a Vue3-based 3D printing method.

[0090] In embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments described and / or claimed herein.

[0091] In this embodiment, processor 101 may be implemented using at least one of an application-specific integrated circuit, a programmable logic device, a field-programmable gate array, a processor, a controller, a microcontroller, a microprocessor, or an electronic unit designed to perform the functions described herein. In some cases, such an implementation may be implemented within a controller. For software implementation, implementations such as processes or functions may be implemented with separate software modules that allow the performance of at least one function or operation. Software code may be implemented by a software application (or program) written in any suitable programming language, and the software code may be stored in memory and executed by the controller.

[0092] The display module 103 is used to display information input by the user or information provided to the user. The display module 103 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like.

[0093] The memory 102 can be used to store software programs and various data. The memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0094] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the Vue3-based 3D printing method.

[0095] The storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0096] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A 3D printing method based on Vue3, characterized in that the method... include: S101: The user terminal establishes a connection with the Vue3 frontend via HTTP / WS. The Vue3 frontend completes the interaction preparation with the Spring Boot backend based on the RESTful API, and builds the basic interaction link for 3D printing operations. S102: The Vue3 frontend obtains the STL file and uses reactive data binding to associate the printing parameters with the 3D model preview component, so as to realize the real-time linkage update of the 3D model preview when the parameters are adjusted. S103: The Vue3 frontend sends a slice request to the Spring Boot backend, and the Spring Boot backend calls the slice service via gRPC; S104: The Vue3 frontend sends printing commands to the Spring Boot backend, and based on the printer cluster status, issues print jobs to the specified printers, while also subscribing to printer status. S105: The printer reports status data to the Spring Boot backend, and the Spring Boot backend synchronizes the status to the Vue3 frontend and displays the printer status in real time. S106: Monitor the printed logs and status data, expand the slice service Pod according to the backlog of slice task queue, and realize load balancing of slice service requests through Service.

2. The 3D printing method based on Vue3 according to claim 1, characterized in that, Step S101 specifically includes: After the user terminal starts the 3D printing interactive application, it sends a connection request to the Vue3 front-end server via the HTTP protocol. After receiving a successful connection response, the Vue3 frontend sends an initialization request to the backend Spring Boot service based on the RESTful API specification. After verifying user permissions, the backend service returns initial configuration data containing API interface documentation, authentication token, and service status. Based on the received initialization configuration data, the Vue3 frontend loads the 3D model preview component and parameter control component, calls the browser's graphics interface to initialize the 3D rendering engine, sets the rendering canvas size, lighting parameters and interactive event listeners, and completes the construction of the visualization environment for the frontend interactive interface. After the Spring Boot backend completes the frontend initialization configuration and returns, it synchronously starts the communication module with the printer cluster and subscribes to the printer status topic.

3. The 3D printing method based on Vue3 according to claim 1, characterized in that, Step S102 specifically includes: Users select an STL file and submit it through the file upload component in the Vue3 frontend. The Vue3 frontend calls the browser's FileAPI to read the file's binary data, parses the file header to obtain the number of model vertices and triangles, checks the file format for illegal characters and whether the triangle index is out of bounds. After the checks pass, the file data is temporarily stored in the memory cache and the preview component initialization process is triggered. After receiving the parameter update event, the preview component calls the WebGL rendering engine to recalculate the model projection matrix, lighting intensity, and layered display range. Based on the layer height parameter, it adjusts the layer height value of the layered rendering, the number of layers, and the fill rate parameter to adjust the shading depth of the internal fill area, thus completing the real-time redraw of the preview screen.

4. The 3D printing method based on Vue3 according to claim 1, characterized in that, Step S103 specifically includes: After the user completes the printing parameter adjustment in the Vue3 frontend, the STL file binary data, printing parameters and user identifier are encapsulated into an HTTP request message and sent to the Spring Boot backend via the POST method; After receiving the request, the Spring Boot backend verifies the integrity of the STL file and the validity of the parameters. If the verification is successful, it calls the gRPC client to send a slice task request containing file data and parameters to the slice service cluster. After receiving the task, the slice service cluster starts the multi-threaded task scheduler and divides the model into multiple sub-models according to the spatial region based on the number of available threads. Each thread adjusts the slicing parameters according to the model complexity. After completing the slicing calculation for its respective region, the sub-results are merged into complete GCode data and returned to the Spring Boot backend via gRPC. The backend encapsulates the GCode data into a response message and forwards it to the Vue3 frontend.

5. The 3D printing method based on Vue3 according to claim 1, characterized in that, Step S104 specifically includes: Step S1041: After receiving the print command, the Spring Boot backend matches the printer based on the idle time of the printer cluster, the length of the task queue, the size of the print task model, and the type of consumables, and prioritizes the allocation of tasks to devices with low resource utilization and high compatibility. Step S1042: If the task involves multi-printer collaboration, the Spring Boot backend will split the task into sub-task units, and the shared subscription mechanism will broadcast the sub-tasks to the specified printers and record the dependencies between the sub-tasks to ensure sequential execution. Step S1043: When the Spring Boot backend sends out GCode data, it performs secondary verification of the slicing parameters in conjunction with the printer's maximum feed speed and the heated bed temperature range, and adjusts the non-critical instructions in the GCode.

6. The 3D printing method based on Vue3 according to claim 1, characterized in that, Step S1042 specifically includes: After the Spring Boot backend recognizes that a print job requires collaboration among multiple printers, it determines the splitting dimensions based on the spatial distribution characteristics of the print job and generates a list of sub-tasks. The Spring Boot backend broadcasts the subtask list to all online printers via the shared subscription feature of the MQTT client; The Spring Boot backend creates a subtask dependency table in the database for each collaborative task, records the execution order between subtasks, and marks the expected start and end times of each subtask with timestamps; If a printer malfunctions during collaborative execution, the backend dynamically adjusts dependencies, reassigning the unfinished subtasks of the malfunctioning printer to other online and compatible printers, and urgently pushing the adjusted subtasks to the newly assigned printers via MQTT.

7. The 3D printing method based on Vue3 according to claim 1, characterized in that, Step S1043 specifically includes: After generating complete GCode data, the backend calls the printer configuration database to query the hardware characteristic parameters of the target printer; The raw GCode data generated from the slices is compared and verified item by item with the printer capability configuration list, and a verification report is generated. For non-critical instructions marked in the verification report, Huffman coding is used for optimization, and the comment content is compressed into short identifiers, and redundant layer-swapping marks are merged into a single instruction. The optimized GCode data is sent to the target printer. Before sending, the data volume is compressed using Base64 encoding, and the transmission frequency is adjusted according to the printer's current communication load.

8. The 3D printing method based on Vue3 according to claim 1, characterized in that, Step S105 specifically includes: The printer sends status messages to the Spring Boot backend; After receiving the status message, the Spring Boot backend queries the model ID and task priority of the current task based on the printer ID, and stores the status data as associated with the task in the printer status table of the database. The Spring Boot backend pushes status update notifications to the Vue3 frontend via WebSocket service. The notifications include the task ID and status summary. After receiving the notification, the front end matches the printing task currently being followed by the user based on the task ID, and calls the responsive component to update the visual elements in the interface to achieve real-time display. When multiple users are involved in collaborative editing, the Spring Boot backend receives operation instructions from different users via WebSocket, calls the detection service to compare the timestamps and priorities of the operations, retains the latest layer height settings, overwrites the old settings, and synchronizes the merged state to the frontends of all participating users.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the Vue3-based 3D printing method as described in any one of claims 1 to 8.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the Vue3-based 3D printing method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Internet-based 3D printing system and method

    CN108673898A

  • Printing 3d-objects by inkjet

    US20240316862A1