Online generation method and device for personalized parts
By constructing and modifying the drawing data of 2D parts in the visual interactive interface and generating corresponding 3D models, the problem of inability to personalize parts in the existing technology is solved, and flexible component generation is achieved.
Patent Information
- Application Number
- CN202311389498.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art cannot personalize the 2D drawings and corresponding 3D models, and cannot meet the flexible requirements of different users for component attribute information.
By responding to the 2D component construction operation triggered by the visual interactive interface, the 2D component drawing data is obtained, and the modified data is received and processed in the preset drawing interface, and the corresponding 3D model is determined based on the modified 2D data.
The online generation of personalized parts is realized, which meets the personalized needs of different users and solves the defects in the existing technology that cannot be flexible and personalized customized parts.
Smart Images

Figure CN119885313A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to an online generation method and device for personalized parts. Background Art
[0002] There are many types of parts, and different users have different requirements for the types and attribute information of parts.
[0003] In the related art, it is impossible to personalize 2D drawings and corresponding 3D models. Summary of the invention
[0004] The main purpose of this application is to provide a method and device for online generation of personalized parts to solve the technical problems existing in the related art.
[0005] In order to achieve the above-mentioned objectives, in a first aspect, the present application provides an online generation method for personalized parts, comprising: in response to a 2D part construction operation being triggered on a visual interactive interface, obtaining 2D part drawing data; when the 2D part drawing data is called to a preset drawing modification interface, receiving modification data of the 2D part drawing data; modifying the 2D part drawing data based on the modification data, and determining a corresponding 3D model based on the modified 2D part drawing data.
[0006] Optionally, in response to the visualization interaction interface being triggered to carry out a personalized 2D component construction operation, obtaining the 2D component drawing data includes: in response to the component elements in the visualization interaction interface being selected to splice the personalized 2D component, determining the position data of each spliced component element; when the 2D component drawing data is called to a preset drawing modification interface, receiving modification data of the 2D component drawing data includes: receiving size modification information for the 2D component elements.
[0007] Optionally, in response to the operation of selecting component elements in the visual interactive interface to splice personalized 2D components, determining the position data of each spliced component element includes: determining a vector based on the origin of the canvas in the visual interactive interface and the origin of each spliced component element; comparing the data of the origins of all the spliced component elements to determine the order of the component elements; and calculating the relative distance between the spliced component elements based on the sequence.
[0008] Optionally, determining the corresponding 3D model based on the modified 2D component drawing data includes: calling each 3D model template corresponding to each splicing component element used to splice the 2D component; combining the each 3D template based on the position data of the each splicing component element and the size modification information to obtain the 3D model corresponding to the 2D component.
[0009] Optionally, the method further comprises: storing the modified 2D component drawing data and the corresponding 3D model in a component element library.
[0010] Optionally, in response to the operation of splicing personalized 2D components by dragging component elements in the visual interactive interface, determining the position data of each spliced component element includes: in response to the component element being dragged to the editor in the visual interface, automatically capturing the capture point of the component element; when the component elements are combined, capturing the component elements based on the capture point.
[0011] In the second aspect, the present application also provides an online generation device for personalized parts, including a construction unit, configured to obtain 2D part drawing data in response to a 2D part construction operation being triggered on a visual interactive interface; a data acquisition unit, configured to receive modification data of the 2D part drawing data after the 2D part drawing data is called to a preset modification interface; a 3D model determination unit, configured to modify the 2D part drawing data based on the modification data, and determine the corresponding 3D model based on the modified 2D part drawing data.
[0012] In a third aspect, the present application also provides an electronic device, comprising: a memory for storing a computer program product; a processor for executing the computer program product stored in the memory, and when the computer program product is executed, the method in any of the above embodiments is implemented.
[0013] In a fourth aspect, the present application further provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method in any of the above embodiments.
[0014] The present application provides a method and device for online generation of personalized parts, wherein the method includes: in response to a 2D part construction operation being triggered on a visual interactive interface, obtaining 2D part drawing data; when the 2D part drawing data is called to a preset drawing modification interface, receiving modification data of the 2D part drawing data; modifying the 2D part drawing data based on the modification data, and determining a corresponding 3D model based on the modified 2D part drawing data. The construction of personalized parts is achieved in a visual manner. The defect of the related art that it is not possible to flexibly customize personalized parts is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The schematic embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0016] Figure 1 It is a flow chart of the online generation method of personalized parts of the present application;
[0017] Figure 2 It is an application schematic diagram of the online generation method of personalized parts of the present application;
[0018] Figure 3 It is another application diagram of the online generation method of the personalized parts itself;
[0019] Figure 4 It is a schematic diagram of components used in the present application for calculating the position data of 2D components;
[0020] Figure 5 It is a schematic diagram of the components used in this application to determine the 3D model.
[0021] Figure 6 It is a structural schematic diagram of an application embodiment of the electronic device of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] In the present application, the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings. These terms are mainly used to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation.
[0025] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to specific circumstances.
[0026] In addition, the term "plurality" shall mean two or more.
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] The execution subject of the method of the present application can be located on a processing device in the client or server. The device including the processing device can be connected to other devices in communication to obtain data from other devices and process the data according to the method of this embodiment, or it can obtain data locally and process it according to the method of this embodiment.
[0029] Reference below Figure 1 , Figure 1 A flowchart of an embodiment of the online generation method of personalized parts of the present application is shown. Figure 1 As shown, the process includes the following steps:
[0030] Step 101 : In response to a construction operation of a 2D component being triggered on a visual interactive interface, 2D component drawing data is obtained.
[0031] In this embodiment, a construction page of a 2D component can be constructed on a web page, in which personalized construction of personalized 2D components is implemented based on the personalized operation of the user. Figure 2 The visual interactive interface includes different types of parts and different sizes of the same type of parts. The categories and attribute information of the part elements are pre-built and stored. Users can select part elements in the visual interactive interface, and the selected parts are placed in the canvas and can be freely combined under the user's drag.
[0032] Furthermore, the component elements are pre-created and stored, so that the component elements can be dimensioned in the visual interface in response to the dimensioning action triggered by the user.
[0033] After the assembly is completed, the drawing data of the parts can be uniquely determined, and then preparations can be made for 3D assembly.
[0034] As an optional implementation method of this embodiment, in response to the operation of splicing personalized 2D components by selecting component elements in the visual interactive interface, determining the position data of each spliced component element includes: in response to the component elements being selected into the editor in the visual interface, automatically capturing the capture points of the component elements; when the component elements are combined, capturing the component elements based on the capture points.
[0035] In this optional implementation, each element can automatically snap to the snap point of the component element after being placed in the editor canvas. When two component elements are combined, the combination can be achieved by aligning the snap points. It should be understood that the combination can also be achieved in a variety of ways, such as free combination, grid snap, feature snap, etc. The snap points here can be the points surrounding the component.
[0036] Through this embodiment, the user can combine corresponding structural shapes according to his or her needs and achieve accurate positioning and capturing.
[0037] Step 102: After the 2D component drawing data is called to a preset drawing modification interface, modification data of the 2D component drawing data is received.
[0038] In this embodiment, reference Figure 3 When the constructed 2D parts are called into the preset drawing modification interface, the size of each part element can be modified. In addition to size modification, product attributes and gluing attributes can also be modified.
[0039] As an optional implementation method of this embodiment, in response to the visualization interaction interface being triggered to construct a personalized 2D component, obtaining the 2D component drawing data includes: in response to the component elements in the visualization interaction interface being selected to splice the personalized 2D component, determining the position data of each spliced component element; when the 2D component drawing data is called to a preset drawing modification interface, receiving modification data of the 2D component drawing data includes: receiving dimensional modification information for the 2D component elements.
[0040] In this optional implementation, you can select different types and sizes of components to combine in the canvas. Although the types of the combined component elements meet the user's needs, the size usually cannot meet the user's personalized needs, so the size can be modified in the preset image modification interface.
[0041] As an optional implementation method of this embodiment, in response to the operation of selecting a component element in a visual interactive interface to splice a personalized 2D component, determining the position data of each spliced component element includes: determining a vector based on the origin of the canvas in the visual interactive interface and the origin of each spliced component element; comparing the data of the origins of all the spliced component elements to determine the order of the component elements; and calculating the relative distance between the spliced component elements based on the sequence.
[0042] In this optional implementation, reference Figure 4 , you can calculate the x and y coordinate positions and rotation angles of all component element origins on the editor canvas origin, and then get the vector; compare the origin data of all component elements to determine the order of component elements; calculate the distance between the origin of the first component element and the origin of the second component element in order to get the relative distance between the origin of the second component element and the origin of the first component element; calculate the relative distance of other component elements relative to the origin of the first component element in turn. Although the angles after the elements are combined will be different, the relative distances and vectors between the component elements are consistent.
[0043] Step 103: modifying the 2D component drawing data based on the modification data, and determining a corresponding 3D model based on the modified 2D component drawing data.
[0044] In this embodiment, after the modification data is obtained, the 3D model corresponding to the personalized component can be determined. The 2D drawings and 3D models of the component elements correspond one to one. When the user combines the drawings of the 2D structure, the 3D model is accurately and automatically combined based on the relative position coordinate parameters between each structural element.
[0045] Furthermore, when the combined 3D model is presented, it is also presented based on the set product attributes and glue coating attributes.
[0046] As an optional implementation method of this embodiment, determining the corresponding 3D model based on the modified 2D component drawing data includes: calling each 3D model template corresponding to each splicing component element used to splice the 2D component; combining the each 3D template based on the position data of the each splicing component element and the size modification information to obtain the 3D model corresponding to the 2D component.
[0047] In this optional implementation method, when the user modifies the dimensional parameters in the 2D drawing data of the component, it is necessary to calculate the change pattern and value of the relative coordinate data between other connected elements, so as to accurately generate each 1:1 corresponding single element 3D model, and accurately combine the 3D model based on the calculated relative coordinate parameters.
[0048] In reference Figure 5 When combining 3D models, you only need to consider the change matrices in the x and y axis directions. The z axis is always 0 to ensure consistency with the situation in the element editor. The 3D model calculates the relative position changes of the origin one by one according to the order of the elements in the editor.
[0049] The x and y axis change formulas of different component elements can be preset to Figure 4 Take the component elements in as an example:
[0050] [x-direction change formula] Element 1: thickness K, Element 2: length L1, Element 3: length L3;
[0051] [Formula for change in y direction] Element 1: opposite side s / 2, Element 2: diameter d1 / 2, Element 3: diameter d2 / 2.
[0052] Determine the relative recorded values between the element origins recorded in the editor canvas: element 1 to 2 = 5, element 2 to 3 = 20, element 1 to 3 = 25;
[0053] The default values before the size modification are: Element 1: thickness K = 5, Element 2: length L1 = 20, Element 3 L3 = 10;
[0054] Modify the modified values: Element 1: thickness K = 8, Element 2: length L1 = 15, Element 3 L3 = 20;
[0055] Compare the actual modified size and the relative distance between the element origins to calculate the position matrix of the actual 3D model combination. The origin of element 1: always coincides with the origin in the 3D combination, so as to facilitate the calculation of the x and y axis coordinate positions of the subsequent element model; the x size of the origin of element 2 = the x-axis change formula of element 1 (modified thickness K), and at the same time compare it with the x-direction relative distance between element 1 and element 2 recorded in the editor. If they are not equal, use the modified value (such as 8); if they are equal, use the relative distance value recorded in the editor canvas (such as 5); the x size of the origin of element 3 = the x-axis change formula of element 1 (modified thickness K) + the x-axis change formula of element 2 (modified length L1), and at the same time compare it with the x-direction relative distance between element 1 and element 3 recorded in the editor canvas. If they are not equal, use the modified value (such as 8+15=23).
[0056] As an optional implementation of this embodiment, the method further includes: storing the modified 2D component drawing data and the corresponding 3D model in a component element library.
[0057] In this optional implementation, the complete data of the modified component element, such as attribute parameters and coordinate values, is stored in the element standard library. Then, a unique code is established based on the size and attribute parameters of the component element to achieve data embedding and product analysis.
[0058] A personalized component generation device is also provided based on the online generation method of personalized components of the present application, including: a construction unit, configured to obtain 2D component drawing data in response to a 2D component construction operation being triggered on a visual interactive interface; a data acquisition unit, configured to receive modification data of the 2D component drawing data after the 2D component drawing data is called to a preset modification interface; modify the 2D component drawing data based on the modification data, and determine a corresponding 3D model based on the modified 2D component drawing data.
[0059] As an optional implementation method of this embodiment, in response to the visualization interaction interface being triggered to construct a personalized 2D component, obtaining the 2D component drawing data includes: in response to the component elements in the visualization interaction interface being spliced with the personalized 2D component by dragging, determining the position data of each spliced component element; when the 2D component drawing data is called to a preset drawing modification interface, receiving modification data of the 2D component drawing data includes: receiving dimensional modification information for the 2D component elements.
[0060] As an optional implementation method of this embodiment, in response to the operation of selecting a component element in a visual interactive interface to splice a personalized 2D component, determining the position data of each spliced component element includes: determining a vector based on the origin of the canvas in the visual interactive interface and the origin of each spliced component element; comparing the data of the origins of all the spliced component elements to determine the order of the component elements; and calculating the relative distance between the spliced component elements based on the sequence.
[0061] As an optional implementation method of this embodiment, determining the corresponding 3D model based on the modified 2D component drawing data includes: calling each 3D model template corresponding to each splicing component element used to splice the 2D component; combining the each 3D template based on the position data of the each splicing component element and the size modification information to obtain the 3D model corresponding to the 2D component.
[0062] As an optional implementation of this embodiment, the method further includes: storing the modified 2D component drawing data and the corresponding 3D model in a component element library.
[0063] As an optional implementation method of this embodiment, in response to the operation of splicing personalized 2D components by dragging component elements in the visual interactive interface, determining the position data of each spliced component element includes: in response to the component element being dragged to the editor in the visual interface, automatically capturing the capture point of the component element; when the component elements are combined, capturing the component elements based on the capture point.
[0064] Below, reference Figure 6 An electronic device according to an embodiment of the present disclosure is described. Figure 6 This is a schematic diagram of the structure of an application embodiment of the electronic device provided by this application. Figure 6 As shown, the electronic device includes one or more processors and memory.
[0065] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0066] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the task generation method of each embodiment of the present application described above and / or other desired functions.
[0067] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0068] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.
[0069] The output device can output various information to the outside, including the determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0070] Of course, to simplify, Figure 6 Only some of the components in the electronic device related to the present application are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application conditions.
[0071] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the task generation method according to various embodiments of the present application described in the above part of this specification.
[0072] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0073] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the task generation method according to various embodiments of the present application described in the above part of this specification.
[0074] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0075] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0076] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0077] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for online generation of personalized parts, characterized in that: include: In response to the visual interactive interface being triggered to construct a 2D component, obtaining 2D component drawing data; When the 2D component drawing data is called to the preset drawing modification interface, receiving modification data of the 2D component drawing data; The 2D component drawing data is modified based on the modification data, and the corresponding 3D model is determined based on the modified 2D component drawing data.
2. The online generation method of personalized parts according to claim 1, characterized in that: In response to the visual interactive interface being triggered to construct a personalized 2D component, obtaining the 2D component drawing data includes: In response to a component element in the visual interactive interface being selected to assemble the personalized 2D component, determining position data of each assembled component element; When the 2D component drawing data is called to a preset drawing modification interface, receiving modification data for the 2D component drawing data includes: receiving size modification information for the 2D component element.
3. The online generation method of personalized parts according to claim 2, characterized in that: In response to a component element in the visual interactive interface being selected to assemble the personalized 2D component, determining the position data of each assembled component element includes: Determine a vector based on the origin of the canvas in the visual interactive interface and the origin of each splicing component element; Comparing the data of the origins of all the spliced component elements to determine the order of the component elements; The relative distances between the component elements to be spliced are calculated based on the sequence.
4. The method for online generation of personalized parts according to claim 2, characterized in that: Determining the corresponding 3D model based on the modified 2D component drawing data includes: Calling each 3D model template corresponding to each splicing component element used for splicing 2D components; The 3D templates are combined based on the position data of the various splicing component elements and the size modification information to obtain a 3D model corresponding to the 2D component.
5. The method for online generation of personalized parts according to claim 1, characterized in that: The method further comprises: The modified 2D component drawing data and the corresponding 3D model are stored in the component element library.
6. The method for online generation of personalized parts according to claim 1, characterized in that: In response to the operation of selecting a component element in the visual interactive interface to splice the personalized 2D component, determining the position data of each spliced component element includes: In response to the component element being selected into the editor in the visualization interface, automatically capturing the capture point of the component element; When the component elements are combined, the component elements are snapped based on snap points.
7. An online generation device for personalized parts, characterized in that: include: A construction unit is configured to obtain 2D component drawing data in response to a construction operation of a 2D component being triggered on the visual interactive interface; A data acquisition unit is configured to receive modification data of the 2D component drawing data after the 2D component drawing data is called to a preset drawing modification interface; The 3D model determination unit is configured to modify the 2D component drawing data based on the modification data, and determine the corresponding 3D model based on the modified 2D component drawing data.
8. The online generation device for personalized parts according to claim 7, characterized in that: In response to the visual interactive interface being triggered to construct a personalized 2D component, obtaining the 2D component drawing data includes: In response to the operation of dragging and dropping component elements in the visual interactive interface to splice the personalized 2D component, determining position data of each spliced component element; When the 2D component drawing data is called to a preset drawing modification interface, receiving modification data for the 2D component drawing data includes: receiving dimensional modification information for the 2D component element.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. An electronic device, characterized in that: include: a memory for storing a computer program product; A processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the method described in any one of claims 1 to 6 is implemented.