Geometry processing method and device, equipment and storage medium

By receiving mesh data and parameters of geometry, creating modeling data blocks, and automatically creating or modifying geometry using parameter sets and molders, the problem of low efficiency in creating or modifying geometry software in the existing technology is solved, and automation is achieved geometric processing.

CN119169220AActive Publication Date: 2024-12-20叁农数据(广州)有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311643177.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2024-12-20
Estimated Expiration
2043-12-01

AI Technical Summary

Technical Problem

The existing modeling tool software is inefficient in creating or modifying geometry, and requires input of all vertex and face data, and can only be created or modified manually.

Method used

By receiving mesh data and parameters of the geometry, create a modeling data block, and automatically create or modify the geometry using parameter sets and molders to achieve direct or indirect mesh data processing.

Benefits of technology

The efficiency of modeling tool software to create or modify geometry is improved, making automatic creation and modification based on geometric parameters possible, and solving the problem of inefficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169220A_ABST
    Figure CN119169220A_ABST
Patent Text Reader

Abstract

The invention discloses a geometry processing method and device, equipment and a storage medium, and belongs to the technical field of modeling. Grid data and parameters of a geometry needing to be generated are received, then a modeling data block is created on the basis of the grid data of the geometry, the modeling data block can automatically create or modify the geometry on the basis of the parameters of the geometry, and finally the parameters of the geometry are input into the created modeling data block. According to the method and the device, modeling tool software can automatically create or modify the geometry based on the parameters of the geometry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of modeling, and in particular to a method, device, equipment and storage medium for processing geometric bodies. Background Art

[0002] Geometry processing methods are key technologies in the field of modeling and are used in various modeling tool software to quickly complete modeling. Among them, the speed of geometry processing is particularly important.

[0003] In the prior art, since the steps of creating or modifying geometric bodies in various modeling tool software are complicated, all vertex and face data of the geometric bodies are required, and they can only be created or modified manually, the efficiency of creating or modifying geometric bodies using existing modeling tool software is low.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present application is to provide a method, device, equipment and storage medium for processing geometric bodies, aiming to solve the technical problem of low efficiency of modeling tool software in creating or modifying geometric bodies in the prior art.

[0006] To achieve the above object, the present application provides a geometric body processing method, which comprises the following steps:

[0007] Receive the mesh data and parameters of the geometry to be generated;

[0008] Creating a modeling data block based on the mesh data of the geometric body, wherein the modeling data block can automatically create or modify the geometric body based on the parameters of the geometric body;

[0009] The parameters of the geometric body are input into the created modeling data block to obtain the created geometric body.

[0010] Optionally, the step of creating a modeling data block based on the mesh data of the geometric body comprises:

[0011] Creating a parameter set, wherein the parameter set can record parameters of a geometric body;

[0012] Based on a preset control set, connecting the parameter set with default grid data, wherein the control set enables the parameter set to be bidirectionally synchronized with the grid data;

[0013] Creating a modeler based on the mesh data of the geometric body, wherein the modeler can generate the geometric body based on the parameters in the parameter set;

[0014] The parameter set, control set and modeler are combined to obtain a modeling data block.

[0015] Optionally, the step of connecting the parameter set with default grid data based on a preset control set comprises:

[0016] Obtaining default mesh data, and reading vertex position information of the mesh data;

[0017] Based on the vertex position information, a mesh data space is allocated, and an index value of the vertex position information is calculated;

[0018] Overwrite the vertex position information and index value into the parameter set;

[0019] Releases the allocated grid data space.

[0020] Optionally, the step of creating a modeler based on the mesh data of the geometric body comprises:

[0021] Read the type of the geometric body in the mesh data of the geometric body;

[0022] Determine whether a preset universal modeler can generate the geometric body of the type;

[0023] If the preset universal modeler can generate the geometric body of the type, then use the preset universal modeler as the modeler of the modeling data block;

[0024] If the preset universal modeler cannot generate the geometric body of the type, the structural characteristics of the geometric body are returned so that the user can set a dedicated modeler for the geometric body.

[0025] Optionally, the step of inputting the parameters of the geometric body into the created modeling data block to obtain the created geometric body comprises:

[0026] Inputting the parameters of the geometric body into a control set in a modeling data block so that the control set updates the data in a parameter set;

[0027] Based on the information data in the parameter set, a geometry is generated using a modeler in the modeling data block.

[0028] Optionally, the step of generating a geometric body using a modeler in a modeling data block based on the information data in the parameter set comprises:

[0029] Reading segment information data and grid data in the parameter set;

[0030] Based on the segment information data, calculating the number of times a modeler needs to be called to generate the geometric body;

[0031] If the modeler needs to be called only once, the geometry is drawn based on the modeler and the data in the parameter set in the modeling data block;

[0032] If it is necessary to call the modeler multiple times, the geometric bodies are drawn one by one using the modeler, and the drawn geometric bodies are combined to obtain the final geometric body.

[0033] Optionally, if the modeler needs to be called multiple times, the step of using the modeler to draw geometric bodies one by one and combining the drawn geometric bodies to obtain the final geometric body includes:

[0034] Based on the segmentation information data, dividing the grid data into a plurality of segments;

[0035] Using the modeler to read the mesh data fragments one by one and draw the geometric body;

[0036] The drawn geometric body is based on the mesh data, and the faces with the same coordinates of each geometric body are connected to obtain the final geometric body.

[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a geometric body processing device, the device comprising:

[0038] A receiving module, used for receiving mesh data of a geometric body to be generated;

[0039] A creation module, for creating a modeling data block based on the mesh data of the geometric body, wherein the modeling data block is based on directly or indirectly modifying the mesh data to achieve a modeling goal;

[0040] The input module is used to input the parameters of the geometric body into the created modeling data block to obtain the created geometric body.

[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a geometry processing device, which includes: a memory, a processor, and a geometry processing program stored in the memory and executable on the processor, wherein the geometry processing program is configured to implement the steps of the geometry processing method as described above.

[0042] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, on which a geometry processing program is stored, and when the geometry processing program is executed by a processor, the steps of the geometry processing method as described above are implemented.

[0043] The present application provides a method, apparatus, device and storage medium for processing geometric bodies. Compared with the related art in which each modeling tool software has to create or modify geometric bodies in complicated steps, requires all vertex and face data of the geometric body, and can only be created or modified manually, resulting in low efficiency of existing modeling tool software in creating or modifying geometric bodies, the present application receives mesh data and parameters of the geometric body to be generated, and then creates a modeling data block based on the mesh data of the geometric body, wherein the modeling data block can automatically create or modify the geometric body based on the parameters of the geometric body, and finally inputs the parameters of the geometric body into the created modeling data block to obtain the created geometric body. It can be understood that the present application creates a modeling data block that can directly or indirectly create and modify mesh data processing geometric bodies, so that the modeling tool software can automatically create or modify the geometric body based on the parameters of the geometric body, thereby solving the problem of low efficiency in creating or modifying geometric bodies using modeling tool software. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a structural schematic diagram of a geometry processing device in a hardware operating environment involved in an embodiment of the present application;

[0045] Figure 2 This is a flow chart of the first embodiment of the present application;

[0046] Figure 3 A schematic diagram of the principle of creating geometric shapes for the modeling data block of this application;

[0047] Figure 4 A structural diagram of the relationship between the mesh data of the modeling data block and the geometric body for this application;

[0048] Figure 5 A simple modeling diagram of a three-segment wall created using the modeling data block of this application;

[0049] Figure 6 This is a flow chart of the second embodiment of the present application;

[0050] Figure 7 This is a structural block diagram of the geometry processing device of this application.

[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a geometry processing device in the hardware operating environment involved in the embodiment of the present application.

[0054] like Figure 1 As shown, the geometry processing device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0055] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the geometry processing device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0056] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a geometry processing program.

[0057] exist Figure 1 In the geometry processing device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the geometry processing device of the present application can be set in the geometry processing device, and the geometry processing device calls the geometry processing program stored in the memory 1005 through the processor 1001, and executes the geometry processing method provided in the embodiment of the present application.

[0058] The present application embodiment provides a method for processing geometric bodies. Figure 2 , the geometric body processing method comprises:

[0059] It should be noted that the method execution subject of this embodiment is a geometry processing device, which may be a modeling tool device or a terminal or other device with geometry data processing capabilities, and this application does not impose any specific restrictions.

[0060] It should be understood that the computer code of this embodiment is Python language. In specific implementation, the computer code can also use any computer language such as Java or C. This application does not impose specific restrictions. Among them, this embodiment uses Python language only to explain the calculation method of this solution.

[0061] It is understandable that if Figure 3 As shown, the present solution achieves the modeling purpose by directly or indirectly creating and modifying mesh data through modeling data blocks. The difference between the present solution and the prior art is that the prior art requires users to manually create or modify geometric bodies, and not only needs to input all vertex, edge and face information of the geometric body, but also needs to input the parameters of the geometric body. For example, a cube has 8 vertices, and every 4 vertices form a face, with a total of 6 faces. Manual creation requires input of all vertex information, face information and the relationship information between vertices and faces, while the present solution only needs to input the length, width and height data of the geometric body to generate the cube.

[0062] The following is a specific description of the modeling tool device as a geometry processing device.

[0063] Step S10: receiving mesh data and parameters of the geometric body to be generated.

[0064] In a specific implementation, a geometry processing device receives mesh data and parameters of a geometry to be generated.

[0065] It should be noted that the mesh data of the geometric body is the specific position of the geometric body in the three-dimensional space or the two-dimensional space. Based on the mesh data, the direction, orientation or rotation of the geometric body in the three-dimensional space or the two-dimensional space can be determined.

[0066] It should be understood that the parameters of the geometric body are the length, width and height data of the geometric body. If the geometric body is a complex shape or has multiple sides, the length, width and height data can be the side length data of each side. The units of the length, width and height data are not specifically limited and can be centimeters, millimeters or meters. The specific units can be manually set based on business needs.

[0067] Step S20: creating a modeling data block based on the mesh data of the geometric body, wherein the modeling data block can automatically create or modify the geometric body based on the parameters of the geometric body.

[0068] In a specific implementation, the geometry processing device creates a modeling data block based on the mesh data of the geometry.

[0069] It should be understood that the data and logic of the modeling data block are part of the geometry to be modeled, and the parameters of the geometry of the modeling object can be viewed at any time, and the geometry of the modeling object can be changed by modifying the parameters, such as Figure 4 As shown, the modeling data block includes a parameter set, a control set and a modeler, wherein the parameter set, the control set and the modeler cooperate with each other and use the mesh data of the geometric body to complete the creation or modification of the geometric body.

[0070] It should be understood that the parameter set is a set of parameters used to describe and represent the geometric body, and different types of geometric body components have different parameters. For example, walls have parameters such as length, height, width and thickness, and cylinders have parameters such as column type, bottom radius and height.

[0071] It should be noted that the control set is a logical set for synchronizing geometric mesh data and parameter sets. When the data in the geometric parameter set is changed, the mesh data of the geometric body is synchronously updated through the control set. Similarly, when the mesh data is updated (for example, a vertex or edge face of the geometric body is moved), the data in the geometric parameter set is synchronously updated.

[0072] It can be understood that the modeler is used to quickly process the complex shapes of constructed geometric bodies (for example, modeling such as geometric extension, folding or closing) and shape changes caused by mutual associated constraints (for example, associated constraints such as geometric trimming, fitting or adsorption), wherein the modeler is mainly composed of a series of data structures and methods, and there are slight differences between different types of geometric data structures and methods.

[0073] The step of creating a modeling data block based on the mesh data of the geometric body, wherein the modeling data block can automatically create or modify the geometric body based on the parameters of the geometric body, specifically includes:

[0074] Step S21: Create a parameter set, wherein the parameter set can record parameters of a geometric body.

[0075] In a specific implementation, the geometry processing device creates a parameter set.

[0076] It should be understood that the parameter set is only used to record the parameters of the geometric body. After the geometric body is created, the parameters of the geometric body should be bidirectionally associated with the mesh data. When the parameters of the geometric body change, the mesh data must change according to the data of the geometric body. When the mesh data changes, the data of the geometric body must change according to the mesh data.

[0077] It can be understood that the parameter set is a set of parameters summarized according to the characteristics of the geometric body, wherein the parameters are usually composed of a name, type, default value and control set method, and for specific types of parameters, also include maximum value, minimum value, unit, numerical precision and other data.

[0078] For example, name: an identifier used to represent and use the parameter, which is unique in the parameter set, where the names of parameters in parameter sets of different types of geometries can be the same.

[0079] Type: used to characterize the type of parameter. Parameters are divided into two types: basic and container. Basic type parameters include Int, Float, Bool, Enum, String, or Pointer. Container type parameters include Vector and Collection. Vector can store Int and Float type parameters. Collection can store any data type, which can be basic type parameters, container type parameters, custom type parameters, or even parameter sets.

[0080] Default value: The default value of a parameter, which is used to provide basic data for the parameter set during its creation process so that the parameter set can be created smoothly.

[0081] Control set method: a method for binding the parameter to the control set. When the parameter value changes, the method is automatically called, and the control set updates the grid data with the new parameter value.

[0082] Maximum value & minimum value: The upper and lower limits of the parameter value, used to limit the parameter range of the parameter set.

[0083] Units & numerical precision: Units include parameters such as length, angle, time, mass, etc., and numerical precision is used to define the number of decimal places for floating-point numbers.

[0084] Here, a wall with a length, width and height of 3×2×1 is defined, and its simple parameters are as follows:

[0085] class Wall_PropGroup:

[0086] length:FloatProperty(default=3,min=0.1,precision=2,unit='LENGTH',update=update_mesh)

[0087] width:FloatProperty(default=2,min=0.1,precision=2,unit='LENGTH',update=update_mesh)

[0088] height:FloatProperty(default=1,min=0.1,precision=2,unit='LENGTH',update=update_mesh)

[0089] Among them, Wall is used to represent the parameter name, PropGroup is the parameter type, default is used to represent the size of the default value, min is the minimum value of the parameter, precision is the precision, unit = 'LENGTH' is used to represent the unit of the parameter, and update = update_mesh indicates the control set method called.

[0090] Step S22: Based on a preset control set, the parameter set is connected with the default grid data, wherein the control set enables the parameter set to be bidirectionally synchronized with the grid data.

[0091] In a specific implementation, the geometry processing device connects the parameter set with the default mesh data based on a preset control set, so that the geometry parameters in the parameter set can be bidirectionally synchronized with the default mesh data.

[0092] It can be understood that the default mesh data is only used to create modeling data blocks and connect the parameter sets.

[0093] It should be noted that the control set contains multiple control set methods, which are used for bidirectional updates between the parameter set and mesh data. The main function is to calculate the positions of all vertices based on the parameter set and position information of the geometric body, and then combine the vertices into faces to finally form the geometric body. Conversely, with vertex position information, all parameter values ​​can be calculated according to the parameter definition.

[0094] The step of connecting the parameter set with the default grid data based on the preset control set, wherein the control set enables the parameter set to be bidirectionally synchronized with the grid data, specifically includes:

[0095] Step S221: Obtain default mesh data, and read vertex position information of the mesh data.

[0096] In a specific implementation, the geometry processing device obtains default mesh data and reads vertex position information of the mesh data.

[0097] Step S222: Based on the vertex position information, allocating mesh data space and calculating the index value of the vertex position information.

[0098] In a specific implementation, the geometry processing device allocates space based on the vertex position information and the mesh data, and calculates the index value of the vertex position information.

[0099] It should be noted that allocating space based on mesh data refers to allocating space in the two-dimensional space or three-dimensional space of the modeling tool software based on the mesh data, so that the geometry processing device can find the specific position of the vertex in the space based on the index value of the vertex position information.

[0100] Step S223: writing the vertex position information and index value into the parameter set.

[0101] In a specific implementation, the geometry processing device overwrites the vertex position information and index value into the parameter set.

[0102] It should be noted that, after receiving the vertex position information and index value to be saved, the parameter set deletes the originally saved data and then saves the vertex position information and index value.

[0103] Step S224: Release the allocated grid data space.

[0104] In a specific implementation, the geometry processing device releases the allocated mesh data space.

[0105] Step S23: creating a modeler based on the mesh data of the geometric body, wherein the modeler can generate the geometric body based on the parameters in the parameter set.

[0106] In a specific implementation, the geometry processing device creates a modeler based on the mesh data of the geometry.

[0107] It should be noted that the modeler will generate corresponding geometric bodies based on the parameters in the parameter set.

[0108] The step of creating a modeler based on the mesh data of the geometric body, wherein the modeler can generate the geometric body based on the parameters in the parameter set, specifically includes:

[0109] Step S231: Read the type of the geometric body in the mesh data of the geometric body.

[0110] In a specific implementation, the geometry processing device reads the type of the geometry in the mesh data of the geometry.

[0111] Step S232: Determine whether the preset universal modeler can generate the geometric body of the type.

[0112] In a specific implementation, the geometry processing device determines whether a preset universal modeler can generate the geometry of the type.

[0113] Step S233: If the preset universal modeler can generate the geometric body of the type, the preset universal modeler is used as the modeler of the modeling data block.

[0114] In a specific implementation, if a preset universal modeler can generate the type of geometry, the geometry processing device uses the preset universal modeler as the modeler of the modeling data block.

[0115] Step S234: If the preset universal modeler cannot generate the geometric body of the type, the structural characteristics of the geometric body are returned so that the user can set a dedicated modeler for the geometric body.

[0116] In a specific implementation, if the preset universal modeler cannot generate the geometric body of the type, the geometric body processing device returns the structural characteristics of the geometric body so that the user can set a dedicated modeler for the geometric body.

[0117] It should be noted that the exclusive styling tool is derived based on the universal styling tool.

[0118] Step S24: merging the parameter set, control set and modeler to obtain a modeling data block.

[0119] In a specific implementation, the geometry processing device binds and merges the parameter set, control set and modeler to obtain a usable modeling data block.

[0120] Step S30: inputting the parameters of the geometric body into the created modeling data block to obtain the created geometric body.

[0121] In a specific implementation, the geometry processing device inputs the parameters of the geometry into the created modeling data block, and obtains the created geometry.

[0122] It can be understood that the created geometric body should include a modeling data block. If the geometric body needs to be modified, the mesh data and parameter data of the geometric body are directly input into the modeling data block. The modeling data block will automatically update the parameters, draw the geometric body, and display the drawn geometric body in the three-dimensional space or two-dimensional space of the modeling tool software.

[0123] For example, Figure 5 As shown, the simple modeling content of a three-section wall is as follows:

[0124] The parameter set is no longer the length, width and height, but a container for storing all the wall segment parameters:

[0125] class Wall_Seg_PropGroup:

[0126] length:FloatProperty(default=3,min=0.1,precision=2,unit='LENGTH',update=update_mesh)

[0127] width:FloatProperty(default=2,min=0.1,precision=2,unit='LENGTH',update=update_mesh)

[0128] height:FloatProperty(default=1,min=0.1,precision=2,unit='LENGTH',update=update_mesh)

[0129] class Wall_PropGroup:

[0130] parts:CollectionProperty(type=Wall_Seg_PropGroup

[0131] Among them, the control set receives the vertex and face arrays, and the core method of updating the mesh data is as follows, o is the geometry itself, verts, faces, and edges are vertex, face, and edge arrays respectively. First, the mesh data space is allocated, and then the data structure and configuration are derived from the geometry. The mesh data is overwritten with the new vertex and face information and the vertex and face indexes are updated. Finally, the allocated memory space is released:

[0132]

[0133]

[0134] The modeler is divided into two levels of design. The general modeler includes segment structure, rotation matrix, and location information. The specific type of geometry is additionally designed based on the general modeler and its own structural characteristics. The core design of the general modeler is as follows, segs is the segment structure, rot is the rotation matrix, and location is the location information:

[0135]

[0136] The core design of the wall modeler is as follows, where outside is the outer contour of the wall, inside is the inner contour of the wall, and axis is the local coordinate system:

[0137]

[0138]

[0139] The shaper will draw shapes one by one according to the segment information in the parameter set. The core method is as follows, part is one of the segments, co is the starting point of the segment, radius and da are the radius and arc increment angle of the segment:

[0140]

[0141] The present application provides a method, apparatus, device and storage medium for processing a geometric body. In the present embodiment, the present application receives mesh data and parameters of a geometric body to be generated, and then creates a modeling data block based on the mesh data of the geometric body, wherein the modeling data block can automatically create or modify the geometric body based on the parameters of the geometric body, and finally the parameters of the geometric body are input into the created modeling data block to obtain the created geometric body. It can be understood that the present application creates a modeling data block that can directly or indirectly create and modify mesh data processing geometry, so that the modeling tool software can automatically create or modify the geometric body based on the parameters of the geometric body, thereby solving the problem of low efficiency in creating or modifying geometry using modeling tool software.

[0142] In addition, based on the first embodiment of the present application, a second embodiment of the present application is proposed, referring to Figure 6 , the step S30 specifically includes:

[0143] It should be noted that the modeling engine of this embodiment is designed to implement the associative constraints between complex shapes and geometric bodies. It is based on a common part and segment structure, and supports adding new features to existing geometric type modelers through scripts, and also supports adding new geometric type support.

[0144] Step S31: input the parameters of the geometric body into the control set in the modeling data block, so that the control set updates the data in the parameter set.

[0145] In a specific implementation, the geometry processing device inputs the parameters of the geometry into a control set in a modeling data block, so that the control set updates the data in the parameter set.

[0146] Step S32: Generate a geometric body using a modeler in a modeling data block based on the information data in the parameter set.

[0147] In a specific implementation, the geometry processing device generates the geometry using a modeler in the modeling data block based on the information data in the parameter set.

[0148] The step of generating a geometric body using a modeler in a modeling data block based on the information data in the parameter set specifically includes:

[0149] Step S321: Read the segment information data and grid data in the parameter set.

[0150] In a specific implementation, the geometry processing device reads the segment information data and mesh data in the parameter set.

[0151] It should be understood that the segmented information data is obtained by segmentation based on the geometric mesh data and parameters, wherein each segment of information data can be obtained by drawing once based on the modeler.

[0152] Step S322: Based on the segment information data, the number of times the modeler needs to be called to generate the geometric body is calculated.

[0153] In a specific implementation, the geometry processing device calculates the number of times a modeler needs to be called to generate the geometry based on the segmentation information data.

[0154] It should be understood that if the modeler can complete the drawing of the geometric body by drawing it only once, then the modeler is called only once. If the modeler cannot complete the drawing of the geometric body in one time, then the geometric body is split into several simple geometric bodies that the modeler can draw in one time, and then the simple geometric bodies are drawn one by one using the modeler. Finally, the simple geometric bodies are merged to obtain a complex geometric body.

[0155] Step S323: If the modeler only needs to be called once, the geometric body is drawn based on the modeler in the modeling data block and the data in the parameter set.

[0156] In a specific implementation, if the modeler only needs to be called once, the geometry processing device draws the geometry based on the modeler in the modeling data block and the data in the parameter set.

[0157] Step S324: If it is necessary to call the modeler multiple times, the modeler is used to draw the geometric bodies one by one, and the drawn geometric bodies are combined to obtain the final geometric body.

[0158] In a specific implementation, if it is necessary to call the modeler multiple times, the geometry processing device uses the modeler to draw the geometry one by one, and combines the drawn geometry to obtain the final geometry.

[0159] It should be understood that if the geometric body still needs to be drawn by the modeler multiple times to be obtained, the geometric body needs to be further split until the geometric body can be obtained by the modeler drawing once.

[0160] If the modeler needs to be called multiple times, the step of using the modeler to draw geometric bodies one by one and combining the drawn geometric bodies to obtain the final geometric body specifically includes:

[0161] Step S3241: Based on the segmentation information data, divide the grid data into multiple segments.

[0162] In a specific implementation, the geometry processing device divides the mesh data into multiple segments based on the segmentation information data.

[0163] It should be noted that the multiple fragments refer to data for dividing a complex geometric body into multiple simple geometric bodies, so that the modeler can draw the geometric body, wherein the mesh data and parameter data of each simple geometric body are the information data completed by the segmentation.

[0164] Step S3242: Use the modeler to read the mesh data fragments one by one and draw the geometric body.

[0165] In a specific implementation, the geometry processing device uses the modeler to read the mesh data fragments one by one and draw the geometry.

[0166] Step S3243: Based on the mesh data, the faces of the drawn geometric bodies with the same coordinates are connected to obtain the final geometric body.

[0167] It should be noted that the geometric body processing device obtains the coordinate data of the faces with the same coordinates of the drawn geometric body, puts the faces with the same coordinate data close together, calculates the contact points of the two geometric bodies, and finally retains the contact points. Then, the data faces with the same coordinates are deleted, so that two simple geometric bodies are merged into a complex geometric body.

[0168] In a specific implementation, the geometric body processing device connects the faces of the geometric bodies with the same coordinates based on the grid data to obtain the final geometric body.

[0169] In this embodiment, the parameters of the geometric body are input into the control set in the modeling data block so that the control set updates the data in the parameter set, and then the geometric body is generated based on the information data in the parameter set using the modeler in the modeling data block. This allows the geometric body processing device to not only generate simple geometric bodies by itself, but also use a specially set modeling engine to generate complex geometric bodies, thereby making the geometric body creation speed faster.

[0170] In addition, the present application also provides a geometric body processing device, referring to Figure 7 , the geometric body processing device comprises:

[0171] A receiving module 10 is used to receive mesh data and parameters of a geometric body to be generated;

[0172] A creation module 20, for creating a modeling data block based on the mesh data of the geometric body, wherein the modeling data block can automatically create or modify the geometric body based on the parameters of the geometric body;

[0173] The input module 30 is used to input the parameters of the geometric body into the created modeling data block to obtain the created geometric body.

[0174] Optionally, the creation module 20 includes:

[0175] A first creation unit is used to create a parameter set, wherein the parameter set can record the parameters of the geometric body;

[0176] A connection unit, configured to connect the parameter set with the default grid data based on a preset control set, wherein the control set enables the parameter set to be bidirectionally synchronized with the grid data;

[0177] A second creation unit is used to create a modeler based on the mesh data of the geometric body, wherein the modeler can generate the geometric body based on the parameters in the parameter set;

[0178] The merging unit is used to merge the parameter set, the control set and the modeler to obtain a modeling data block.

[0179] Optionally, the connecting unit includes:

[0180] A reading subunit, used to obtain default mesh data and read vertex position information of the mesh data;

[0181] A calculation subunit, used to allocate mesh data space based on the vertex position information and calculate the index value of the vertex position information;

[0182] A writing subunit, used to write the vertex position information and index value into the parameter set over the vertex position information and index value;

[0183] Release subunit, used to release the allocated grid data space.

[0184] Optionally, the second creating unit includes:

[0185] A judging subunit, used to judge whether a preset universal modeler can generate the geometric body of the type;

[0186] A using subunit is used for using a preset universal modeler as a modeler of the modeling data block if the preset universal modeler can generate the geometric body of the type;

[0187] The return subunit is used to return the structural characteristics of the geometric body if the preset universal modeler cannot generate the geometric body of the type, so as to allow the user to set a dedicated modeler for the geometric body.

[0188] Optionally, the input module 30 includes:

[0189] An input submodule, used for inputting the parameters of the geometric body into the control set in the modeling data block, so that the control set updates the data in the parameter set;

[0190] The generation submodule is used to generate a geometric body using a modeler in a modeling data block based on the information data in the parameter set.

[0191] Optionally, the generating submodule includes:

[0192] A reading unit, used for reading the segment information data and grid data in the parameter set;

[0193] A calculation unit, used for calculating the number of times a modeler needs to be called to generate the geometric body based on the segment information data;

[0194] A first drawing unit is used to draw the geometric body based on the modeler in the modeling data block and the data in the parameter set if the modeler only needs to be called once;

[0195] The second drawing unit is used for drawing geometric bodies one by one using the modeler if multiple modelers need to be called, and combining the drawn geometric bodies to obtain the final geometric body.

[0196] Optionally, the second drawing unit includes:

[0197] A segmentation subunit, used for dividing the grid data into a plurality of segments based on the segmentation information data;

[0198] A drawing subunit, used for reading the mesh data fragments one by one using the modeler, and drawing a geometric body;

[0199] The connection subunit is used to connect the faces of the geometric bodies with the same coordinates based on the grid data to obtain the final geometric body.

[0200] The specific implementation of the geometric body processing device of the present application is basically the same as the various embodiments of the geometric body processing method described above, and will not be repeated here.

[0201] An embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned geometry processing methods.

[0202] The specific implementation of the storage medium of the present application is basically the same as the embodiments of the above-mentioned geometric body processing method, and will not be repeated here.

[0203] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0204] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0206] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A geometric body processing method, characterized in that: The geometric body processing method comprises the following steps: Receive the mesh data and parameters of the geometry to be generated; Creating a modeling data block based on the mesh data of the geometric body, wherein the modeling data block can automatically create or modify the geometric body based on the parameters of the geometric body; The parameters of the geometric body are input into the created modeling data block to obtain the created geometric body.

2. The geometric body processing method according to claim 1, characterized in that: The step of creating a modeling data block based on the mesh data of the geometric body comprises: Creating a parameter set, wherein the parameter set can record parameters of a geometric body; Based on a preset control set, connecting the parameter set with default grid data, wherein the control set enables the parameter set to be bidirectionally synchronized with the grid data; Creating a modeler based on the mesh data of the geometric body, wherein the modeler can generate the geometric body based on the parameters in the parameter set; The parameter set, control set and modeler are combined to obtain a modeling data block.

3. The geometric body processing method according to claim 2, characterized in that: The step of connecting the parameter set with the default grid data based on the preset control set comprises: Obtaining default mesh data, and reading vertex position information of the mesh data; Based on the vertex position information, a mesh data space is allocated, and an index value of the vertex position information is calculated; Overwrite the vertex position information and index value into the parameter set; Releases the allocated grid data space.

4. The geometric body processing method according to claim 2, characterized in that: The step of creating a modeler based on the mesh data of the geometric body comprises: Read the type of the geometric body in the mesh data of the geometric body; Determine whether a preset universal modeler can generate the geometric body of the type; If the preset universal modeler can generate the geometric body of the type, then use the preset universal modeler as the modeler of the modeling data block; If the preset universal modeler cannot generate the geometric body of the type, the structural characteristics of the geometric body are returned so that the user can set a dedicated modeler for the geometric body.

5. The geometric body processing method according to claim 1, characterized in that: The step of inputting the parameters of the geometric body into the created modeling data block to obtain the created geometric body comprises: Inputting the parameters of the geometric body into a control set in a modeling data block so that the control set updates the data in a parameter set; Based on the information data in the parameter set, a geometry is generated using a modeler in the modeling data block.

6. The geometric body processing method according to claim 5, characterized in that: The step of generating a geometric body using a modeler in a modeling data block based on the information data in the parameter set comprises: Reading segment information data and grid data in the parameter set; Based on the segment information data, calculating the number of times a modeler needs to be called to generate the geometric body; If the modeler needs to be called only once, the geometry is drawn based on the modeler and the data in the parameter set in the modeling data block; If it is necessary to call the modeler multiple times, the geometric bodies are drawn one by one using the modeler, and the drawn geometric bodies are combined to obtain the final geometric body.

7. The geometric body processing method according to claim 6, characterized in that: If the modeler needs to be called multiple times, the step of using the modeler to draw geometric bodies one by one and combining the drawn geometric bodies to obtain the final geometric body includes: Based on the segmentation information data, dividing the grid data into a plurality of segments; Using the modeler to read the mesh data fragments one by one and draw the geometric body; The drawn geometric body is based on the mesh data, and the faces with the same coordinates of each geometric body are connected to obtain the final geometric body.

8. A geometric body processing device, characterized in that: The device comprises: A receiving module, used for receiving mesh data of a geometric body to be generated; A creation module, for creating a modeling data block based on the mesh data of the geometric body, wherein the modeling data block is based on directly or indirectly modifying the mesh data to achieve a modeling goal; The input module is used to input the parameters of the geometric body into the created modeling data block to obtain the created geometric body.

9. A geometric body processing device, characterized in that: The device comprises: a memory, a processor, and a geometry processing program stored in the memory and executable on the processor, wherein the geometry processing program is configured to implement the steps of the geometry processing method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a geometry processing program, which, when executed by a processor, implements the steps of the geometry processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for rendering editable webpage three-dimensional (Web3D) geometric modeling

    CN101853162A

  • Electrostatic dust collector three-dimensional model construction method based on CATIA

    CN112861384A

  • Component editing method, device and equipment based on parameterized driving and storage medium

    CN114357574A

  • Solid modeling method and device, electronic equipment and storage medium

    CN115482347A

  • Garden rock block rockery parametric modeling method based on Grasshopper

    CN116702265A