Disclosure of Invention
In order to solve the above problems in the prior art, the present application provides a method, an apparatus, a device and a storage medium for generating particles, which are simple and versatile in operation.
In a first aspect, the present application provides a method of particle generation, comprising:
displaying a particle generation interface;
receiving input operation of a user on a particle generation interface, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a storage path of a data file;
determining the boundary of the solid model;
acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale;
determining the centroid of the grid cell as data of the SPH particle model;
the save path stores a data file containing data of the SPH particle model.
In a possible implementation manner, the obtaining the grid cells corresponding to the solid model according to the boundary of the solid model and the particle screening scale may include: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
In a possible embodiment, the determining the cutting reference plane of the solid model according to the boundary of the solid model and the particle screening scale may include: determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale; and obtaining a cutting reference surface of the solid model based on the boundary and the distance of the solid model in the preset dimension.
In a possible embodiment, the determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale includes: determining the difference between the maximum value and the minimum value of the boundary of the entity model in a preset dimension as a first intermediate value; taking the quotient integer of the first intermediate value and the particle screening scale as a second intermediate value; and determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
In a possible implementation manner, before saving the data of the centroids of the grid cells as the data of the SPH particle model, the method further includes: determining a material density of the solid model; the centroid of the grid cell is determined from the material density.
In a possible implementation manner, the particle generation interface includes a particle generation progress bar for reflecting a current particle generation progress, and the particle generation method further includes: determining the current particle generation progress; and presenting the current particle generation progress on the particle generation progress bar.
In a second aspect, the present application provides a particle generating apparatus comprising:
the display module is used for displaying the particle generation interface;
the interaction module is used for receiving input operation of a user on the particle generation interface, and the input operation is used for determining an entity model to be particlized, a particle networking scale and a data file storage path;
a processing module for determining a boundary of the solid model; acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale; and determining data of the SPH particle model of the grid cell;
and the saving module is used for saving the data file containing the data of the SPH particle model in the saving path.
In a possible implementation, the processing module is specifically configured to: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
In one possible embodiment, the processing module is further configured to: determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale; and obtaining a cutting reference surface of the solid model based on the boundary of the solid model in the preset dimension and the distance.
In one possible embodiment, the processing module is further configured to: determining the difference between the maximum value and the minimum value of the boundary of the entity model in a preset dimension as a first intermediate value; taking the quotient integer of the first intermediate value and the particle screening scale as a second intermediate value; and determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
In one possible embodiment, the processing module is further configured to: determining a material density of the solid model; the centroid of the grid cell is determined from the material density.
In one possible implementation, the particle generation interface comprises a particle generation progress bar for reflecting the current particle generation progress. The processing module is further configured to: determining the current particle generation progress; and presenting the current particle generation progress on the particle generation progress bar through the display module.
In a third aspect, the present application provides an electronic device, comprising: a processor and a memory;
wherein the memory is used for storing program instructions; the processor is adapted to invoke program instructions in the memory to perform the particle generation method as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program for implementing the particle generation method of the first aspect when the computer program is executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program for implementing the particle generation method of the first aspect when the computer program is executed by a processor.
The skilled person in the art can understand that, in the present application, when the solid model is converted into the particle model, after the solid model to be particlized is determined on the particle generation interface, the particle screening scale is set, and the storage path of the data file is received, the converted SPH particle model can be generated and stored in the data file by one key, the operation is simple, the basic theory of the particle generation algorithm does not need to be mastered, and the method is suitable for any relevant person including a beginner; in addition, the scheme does not limit the specific structure of the entity model and has universality.
Detailed Description
First, it should be understood by those skilled in the art that these embodiments are merely for explaining the technical principles of the present application, and are not intended to limit the scope of the present application. And can be modified as needed by those skilled in the art to suit particular applications.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the embodiments of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B, may be expressed as: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of additional like elements in a commodity or system comprising the element.
First, some technical terms related to the present application are explained:
a Voronoi diagram, also called a Thiessen polygon or Dirichlet diagram, is a polygon composite diagram, which is composed of a group of continuous polygons composed of perpendicular bisectors connecting two adjacent point straight lines.
Delaunay triangulation algorithm (also called Delaunay triangulation algorithm) is a basic method for mathematical analysis of geometric figures and planar figures. As may be used for Voronoi diagrams.
Gridless methods, i.e., modeling and analysis of protons without grid distribution, can be used in particle generation techniques.
The SPH algorithm is widely applied to computer graphics and scenes involving large deformation and large distortion, such as visualization, impact, cutting and the like, and the algorithm is realized on the premise that the granulation of a model is realized, and the calculation of the SPH algorithm can be carried out only after the granulation is finished.
The ABAQUS software is multifunctional finite element software and has powerful functions in engineering simulation and emulation.
An Application Programming Interface (API) function is a predefined function, and some complex operations can be simply and quickly completed by calling the API function during engineering operations.
At present, the existing particle model generation technologies such as a meshless method, a Delaunay triangulation algorithm and a Voronoi graph algorithm are complex in implementation, universality is not particularly good, and a beginner needs basic theory learning for a certain time to complete the granulation of an entity model.
Based on the foregoing problems, embodiments of the present application provide a particle generation method, apparatus, device, and storage medium to achieve the following objectives:
1. and the smooth particles are quickly generated, and the data file of the particle model is stored for the subsequent use of the SPH algorithm, so that the method is simpler and more convenient compared with other methods.
2. The plug-in development is realized, the generated data file of the SPH particle model can be generated and stored in one key, the basic theory of the particle generation algorithm does not need to be mastered, the operation is easy, and the universality is strong.
Fig. 1 is an illustration of an application field Jing Shi provided in the embodiments of the present application. As shown in fig. 1, in this application scenario, a plug-in for particlizing an entity model is installed in the computer 100, and after the entity model to be particlized is introduced into the plug-in, the particlized model and data are directly generated in one key in the plug-in, and the data are stored in the computer 100 or exported from the computer 100.
It should be noted that fig. 1 is only a schematic diagram of an application scenario provided in this embodiment, and this embodiment of the present application does not limit the devices included in fig. 1, and also does not limit the positional relationship between the devices in fig. 1. For example, in the application scenario shown in fig. 1, the application scenario may further include a data storage device, and the computer 100 may be a PC, i.e., a computer, a terminal device such as a mobile phone or a notebook, or another type of computer such as a server or a server cluster.
The following describes in detail the technical solutions of the embodiments of the present application and how to solve the above technical problems with specific embodiments. The following specific embodiments may be combined with each other, and some of the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a particle generation method according to an embodiment of the present application. The embodiment of the application provides a particle generation method which is suitable for electronic equipment provided with a plug-in for graining a solid model. As shown in fig. 2, the particle generation method includes:
and S201, displaying a particle generation interface.
In practical application, when a user has a requirement for particlization of the solid model, the plug-in can be started. And when the electronic equipment detects a starting instruction of the plug-in, displaying the particle generation interface.
Illustratively, as shown in fig. 3, the particle generation interface comprises the following parts: opening a particle model file option, saving an SPH file path option, setting a frame of particle division network scale values, determining a control and the like.
The option of opening the particle model file is used for importing the entity model, the path of the stored SPH file is used for representing the path of the entity model after the particle division is completed, and the setting frame of the particle division network scale value is used for manually presetting the particle division network scale value.
And setting the setting frame for opening the particle model file option, saving the SPH file path option and the particle sub-grid scale value on the particle generation interface, and then clicking the determining control to trigger the particle generation process.
Optionally, the particle generation interface may further include a particle generation progress bar. The particle generation progress bar can visually display the particle generation progress. In this case, the particle generation method may further include: determining the current particle generation progress; and presenting the current particle generation progress on the particle generation progress bar. Therefore, a user can visually know the particle generation progress, and the user experience is improved.
S202, receiving input operation of a user on the particle generation interface, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a data file storage path.
After a user introduces an entity model which is expected to be particlized into a particle generation interface, a particle networking scale set based on historical experience or actual requirements is input, and a data storage path of the entity model after the granulation is finished is set.
Illustratively, the solid model may be any solid structure of three-dimensional (3D) or two-dimensional (2D). The three-dimensional solid model may be a polyhedron or a curved body. In general practice, the three-dimensional solid model may be a cube or a cylinder-like body. For the two-dimensional solid model, the imported two-dimensional solid model may be a convex polygon, and a hollow structure exists inside the convex polygon, for example, a small ellipse part is cut out of the inside of a rectangle.
Regarding the particle screening scale, δ can be used to control the number of particles, and the unit set in the particle generation interface is usually millimeter (mm), and its physical meaning is the length of the particles obtained after granulation. In the example shown in fig. 3, the length is a uniform length, i.e. the length of the particles along any one of the coordinate axes is the same. In subsequent operation calculation, the user can adjust the particle screening scale according to actual needs. Optionally, the lengths of the particles along different coordinate axes may also be different, and in this case, the particle generation interface needs to include a plurality of particle screening scales corresponding to different coordinate axes, for example, the particle screening scale δ corresponding to the x-axis x And the particle screening scale delta corresponding to the y axis y And so on. Due to the length of the particles, i.e. the distance between two adjacent cutting reference surfaces, delta x The physical meaning of (1) is the distance of the cutting reference plane on the x-axis, and, similarly, delta y The physical meaning of (c) is the distance of the cut reference plane on the y-axis.
Illustratively, the path for storing the particle model data file is, for example, a folder in the disk D, and after the particle generation is completed, the data file is stored in the path, which facilitates the subsequent use of the SPH algorithm.
And S203, determining the boundary of the entity model.
From the imported solid model, the electronic device determines boundaries of the solid model, including determining coordinates of the boundaries. For example, for a 2D solid model, the coordinate axes are the x-axis and the y-axis, and the minimum value coordinate of the boundary is (x) min ,y min ) The maximum value coordinate of its boundary is (x) max ,y max ). For a 3D solid model, the minimum coordinate of its boundary is (x) min ,y min ,z min ) The maximum value coordinate of its boundary is (x) max ,y max ,z max ). The coordinate values are used for subsequent cutting surface calculation, and corresponding coordinate points can be found in the particle generation interface according to the boundary coordinates, as illustrated in fig. 3.
And S204, acquiring grid units corresponding to the entity model according to the boundary of the entity model and the particle networking scale.
Based on the solid model boundary and the particle screening scale determined in step S203, the solid model is cut to obtain grid cells, and the grid cells are particles.
It will be appreciated that each mesh cell size after the cut is substantially the same, i.e., the solid model is equally divided, but the mesh cells at the boundary of the solid model are related to the actual boundary shape of the solid model.
And S205, determining the centroid of the grid cell as the data of the SPH particle model.
The step is to perform data processing on the cut grid cells. Since each particle is of a size that cannot be directly viewed as a point ideally, the centroid of the particle needs to be determined. Specifically, from a physical perspective, when a particle of an object is determined, it can be analyzed for force. After the centroid of the particle is determined, the centroid can be equivalently substituted for the SPH particle model, so that the particle can be regarded as an ideal point to operate. Optionally, the process also needs to be implemented by an API function in the ABAQUS software.
In one specific implementation, before the step, the particle generation method may further include: determining a material density of the solid model; the centroid of the grid cell is determined from the material density. In some embodiments, if the density of the solid model is uniform, the center or the gravity center of the grid cell, etc. may also be determined as the data of the SPH particle model, such as the center of a square with uniform density. Illustratively, the centroid of a grid cell may be obtained using the API function carried by the ABAQUS software itself.
S206, storing the data file containing the data of the SPH particle model in the storage path.
The centroid coordinates of the particles are stored as stored data in the storage path set in step S202, and the data is used for the subsequent calculation of the SPH algorithm.
In the embodiment of the application, an input operation of a user on a particle generation interface is received, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a storage path of a data file; determining the boundary of the solid model; acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale; determining the centroid of the grid cell as the data of the SPH particle model; a data file containing data of the SPH particle model is stored in a storage path. When the entity model is converted into the particle model, the converted SPH particle model can be generated and stored into the data file by one key after the entity model to be particlized is determined on the particle generation interface, the particle networking scale is set and the storage path of the data file is received, so that the operation is simple, the basic theory of the particle generation algorithm does not need to be mastered, and the method is suitable for any relevant personnel including beginners; in addition, the scheme does not limit the specific structure of the entity model, and has strong universality.
On the basis of the above embodiment, in order to implement the operation of cutting the solid model into grid cells in step S204, the solid model may be subjected to a gridding operation by using a cutting function of a reference plane in the ABAQUS software. Optionally, in S204, obtaining a grid unit corresponding to the solid model according to the boundary of the solid model and the particle networking scale may include: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
Specifically, when the solid model is cut, a plurality of cutting reference surfaces are generated, for example, in a 3D solid model, three planes are required to determine a particle; in a 2D solid model, two planes are required to determine one particle.
In the embodiment of the application, the cutting reference surface is determined through the boundary of the particle solid model and the particle screening scale, the solid model can be cut into particles according to the cutting reference surface, and compared with other particle algorithms, the method is simpler and more convenient. On the basis of the above embodiment, in order to determine the cutting reference surfaces of the solid model, the distance between adjacent cutting reference surfaces needs to be calculated first. Fig. 4 is a schematic flow chart of a particle generation method according to another embodiment of the present application. As shown in fig. 4, the determining the cutting reference plane of the solid model according to the boundary of the solid model and the particle screening scale may further include:
s401, determining the difference between the maximum value and the minimum value of the boundary of the entity model in the preset dimension as a first intermediate value.
Illustratively, this step is formulated as (i) max -i min ) Where i may be x or y or z, and for example, where i is x, the formula represents the difference between two boundary values of the solid model on the x-axis. And obtaining a first intermediate value by taking the difference between the maximum value and the minimum value of the boundary coordinate values of the entity model in the same coordinate axis, wherein the physical meaning of the first intermediate value is the total length of the entity model in the coordinate axis. Illustratively, in the 3D model, there are three preset dimensions, namely, an x-axis, a y-axis, and a z-axis; in the 2D model, there are two preset dimensions, any two of the x-axis, y-axis and z-axis.
Illustratively, for a 3D model, (x) max -x min ) I.e. the length of the solid model in the x-axis,(y max -y min ) I.e. the length of the solid model in the y-axis, (z) max -z min ) I.e. the length of the solid model in the z-axis. The length of the mockup on different coordinate axes can be different from each other, i.e. (x) max -x min )≠(y max -y min )≠(z max -z min )。
It can be understood that the particle screening scale δ generally cannot ensure that the number of all particles after the solid model is cut is an integer value, and therefore mathematical rounding processing needs to be performed on the number of the particles. Therefore, in the embodiment of the application, the particle screening scale δ is adjusted through S403 and S403, so as to obtain the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension. Specifically, the method comprises the following steps:
s402, taking the quotient of the first intermediate value and the particle screening scale as a second intermediate value.
Illustratively, this step is formulated as int ((i) max -i min ) /δ), where int denotes taking an integer. And after the first intermediate value and the particle screening scale delta are subjected to division operation, the number of particles on one coordinate axis is obtained, the entity model is analyzed from a mathematical angle because the entity model has different lengths on different coordinate axes, the corresponding number of the particles is also different, and the quotient obtained after the division operation is taken as an integer as a second intermediate value, wherein the meaning of the second intermediate value is that the number of the particles on each coordinate axis is taken as an integer.
And S403, determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
Specifically, the step is formulated as δ i =(i max -i min )/int((i max -i min )/δ)。
Since the total length divided by the total number is equal to the unit length, dividing the first intermediate value by the second intermediate value obtained above results in the length of the particles after rounding. Because the adjacent distance of the cutting reference surface is the length of the particle, the delta obtained after the division operation i I.e. the spacing of adjacent cutting reference surfaces. In different coordinate axesNext, the distances between the cutting reference surfaces may be different, and need to be calculated respectively.
In other words, in S401 to S403, a specific implementation of how to determine the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale is provided.
S404, obtaining a cutting reference surface of the solid model based on the boundary and the distance of the solid model in the preset dimension.
After the distance between the cutting reference surfaces in the coordinate axis is determined, the solid model is cut at equal intervals along the determined coordinate axis, 3 mutually perpendicular cutting reference surfaces are needed for the 3D model, and two mutually perpendicular cutting reference lines are needed for the 2D model.
Illustratively, the cutting reference surface is formulated as x coor =x min +n*δ x ,y coor =y min +n*δ y ,z coor =z min +n*δ z Wherein n is a positive integer. Delta x The length of the particle on the x axis, namely the distance between adjacent cutting reference surfaces on the x axis; delta y The length of the particle on the y axis is the distance between adjacent cutting reference surfaces on the y axis; delta z Is the length of the particle in the z-axis, i.e., the distance of the adjacent cutting reference surfaces in the z-axis. The maximum value of n is the number of particles on the coordinate axis. Illustratively, when n takes a value of 0, the reference plane is the minimum boundary coordinate of the solid model. When n is 1, the first particle is cut out from the cutting reference surface, and so on.
In particular, for the same coordinate axis, each cutting reference surface is equally spaced, the spacing being the corresponding length of the particle on that coordinate axis. For example, taking a 3D solid model as an example, if the length of the particle in the z-axis is m, the distance between each cutting reference surface in the z-axis is m. Still further, the cutting reference surface spacing on different coordinate axes may be different, for example, if the length of the particle on the y-axis is n, then on the y-axis, the spacing of each cutting reference surface is n, and m ≠ n. The above calculation method is equally applicable to 2D models.
In the embodiment of the application, through carrying out mathematical processing on the preset particle screening scale, the number of particles on a certain coordinate axis is obtained through the preset particle screening scale, and the number of particles obtained after cutting cannot be guaranteed to be an integer by the preset particle screening scale, so that the number of particles needs to be rounded, and the length of the particles on the certain coordinate axis is recalculated. Since the number of particles is rounded, the length is also a normalized length. According to the method, after the manual preset particle screening scale is subjected to mathematical rounding processing, the number and the length of particles cut in software are calculated, complex operation does not need to be considered for a user, and the method is compatible with a particle modeling algorithm of the software.
In specific application, the particle generation method provided by the application can be realized based on powerful geometric model processing of ABAQUS software and rich API script functions, can be universally applied to various entity models, and is relatively quick and convenient in realization process.
Fig. 5 is a schematic flowchart of a particle generation method according to yet another embodiment of the present application. The embodiment mainly utilizes ABAQUS software as a running support of script codes to realize the model particlization, and realizes the particlization through the API function carried by the ABAQUS software. Since similar operations have already been described in detail in the embodiment of fig. 2, they are not described here again. The specific technical idea is as follows:
s501, importing the entity model (2D or 3D) through software.
And S502, extracting the boundary of the entity model.
And S503, setting a particle screening scale delta.
And S504, generating a cutting reference surface.
And S505, cutting the entity model.
And S506, setting materials.
And S507, determining the centroid coordinates of the particles.
And S508, storing the particlized model file.
In the embodiment of the application, the entity model is introduced into the software, and after the particle screening scale is artificially set, the software can automatically complete the particle generation and is used for the subsequent calculation of the SPH algorithm. For a user, the method is simple to operate, and complex particle algorithm operation is not needed.
The 2D model and the 3D model are then subjected to a particlization test by the particle generation method as described above. Fig. 6 is a diagram illustrating a test result of a 2D model of a particle generation method according to an embodiment of the present application; FIG. 7 is a graph illustrating test results of a 3D model of a particle generation method provided by an embodiment of the present application; fig. 8 is an exemplary graph of the algorithm test result of the 3D model of the particle generation method provided by another embodiment of the present application. Referring to fig. 6, 7 and 8, it can be seen that the particle generation method provided by the present application can quickly and efficiently complete the particlization of the entity model. The horizontal and vertical axes in fig. 6 are used to represent the size information of the particle model obtained by particlizing the solid model in two coordinate axis directions; fig. 7 shows an X-direction projection view, a Y-direction projection view, a Z-direction projection view, and an ISO view of the particle model obtained by particlizing the solid model, respectively; fig. 8 is a partially enlarged schematic view showing projection views in two directions and a projection view in one direction of a particle model obtained by particlizing a solid model.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 9 is a schematic structural diagram of a particle generating apparatus according to an embodiment of the present application. As shown in fig. 9, the particle generating apparatus 900 includes:
a display module 901, configured to display a particle generation interface;
an interaction module 902, configured to receive an input operation of a user on a particle generation interface, where the input operation is used to determine an entity model to be particlized, a particle networking scale, and a storage path of a data file;
a processing module 903 for determining the boundary of the solid model; acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale; determining the centroid of the grid cell as the data of the SPH particle model;
a saving module 904, configured to save a data file containing data of the SPH particle model in the saving path.
The apparatus provided in the embodiment of the present application may be used to execute the method in the embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In some embodiments, the processing module 903 is further specifically configured to: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
Optionally, the processing module 903 may further be configured to: determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale; and obtaining a cutting reference surface of the solid model based on the boundary and the distance of the solid model in the preset dimension.
In some embodiments, the processing module 903 may further be configured to: determining the difference between the maximum value and the minimum value of the boundary of the entity model in a preset dimension as a first intermediate value; taking the quotient integer of the first intermediate value and the particle screening scale as a second intermediate value; and determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
Alternatively, the processing module 903 may be further configured to: determining a material density of the solid model; the centroid of the grid cell is determined from the material density.
In some embodiments, the particle generation interface includes a particle generation progress bar for reflecting the current particle generation progress. The processing module 903 is further configured to: determining the current particle generation progress; the current particle generation progress is presented on the particle generation progress bar through the display module 901.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 10, the electronic device may be provided as a server or a computer, for example. Referring to fig. 10, the electronic device 1000 comprises a processing component 1001 that further comprises one or more processors and memory resources, represented by memory 1002, for storing instructions, e.g. applications, that are executable by the processing component 1001. The application programs stored in memory 1002 may include one or more modules that each correspond to a set of instructions. Furthermore, the processing component 1001 is configured to execute instructions to perform any of the method embodiments described above.
The electronic device 1000 may also include a power component 1003 configured to perform power management for the electronic device 1000, a wired or wireless network interface 1004 configured to connect the electronic device 1000 to a network, and an input/output (I/O) interface 1005. The electronic device 1000 may operate based on an operating system stored in the memory 1002, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
The Memory 1002 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processing component 1001 may be an integrated circuit chip having signal processing capabilities. The Processing module 1001 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and so on. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
An embodiment of the present application further provides a chip, including: a processor and a memory; the memory stores a computer program, and the processor implements the steps of the particle generation method in the above-described method embodiments when executing the computer program stored in the memory.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used for implementing the steps of the particle generation method in the above-mentioned method embodiments when being executed by a processor.
An embodiment of the present application further provides a computer program product, which contains a computer program, and the computer program is used for implementing the steps of the particle generation method in the above method embodiments when being executed by a processor.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, and the computer program may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
So far, the technical solutions of the present application have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present application is obviously not limited to these specific embodiments. Equivalent changes or substitutions can be made on the related technical features by those skilled in the art without departing from the principle of the application, and the technical scheme after the changes or substitutions will fall into the protection scope of the application.