Ball and curve contact simulation method and device, electronic equipment and storage medium

By determining the preset curve type value points of the curve model and calculating the projection vector to control the interaction force between the sphere and the curve, the problems of large calculation amount, insufficient accuracy or poor stability in traditional simulation are solved, and convenient and accurate contact simulation is achieved.

CN119808383APending Publication Date: 2025-04-11SUZHOU TONGYUAN SOFT CONTROL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411862194.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In traditional sphere contact simulation, there are problems such as large amount of calculation, insufficient accuracy or poor stability, especially when dealing with complex curves.

Method used

During the process of moving the sphere model toward the curve model, multiple preset curve type value points of the curve model are determined, based on these points, the simulation curve is obtained, the projection vector of the target mapping point is calculated, and the interaction force is determined to control the contact when the projection vector is less than the preset error.

Benefits of technology

It realizes a relatively convenient and accurate contact simulation processing between the sphere and the curve, improves simulation accuracy and stability, and is suitable for curves of different shapes and parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808383A_ABST
    Figure CN119808383A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a ball and curve contact simulation method and device, electronic equipment and a storage medium. The method comprises the steps that in the process that a sphere model moves towards a curve model, multiple preset curve type value points of the curve model are determined, and a simulation curve corresponding to the curve model is obtained based on the multiple preset curve type value points; the simulation curve comprises a curve mapping point corresponding to each preset curve type value point; determining a target curve type value point in the plurality of preset curve type value points, taking a curve mapping point corresponding to the target type value point as a target mapping point, and calculating a projection vector of the target mapping point in the tangential vector direction of the simulation curve; under the condition that the projection vector is smaller than the preset error, the interaction force between the curve model and the sphere model is determined based on the target distance and the projection vector, the sphere model and the curve model are controlled to make contact with each other through the interaction force, and simulation processing on contact between the sphere and the curve is achieved more conveniently and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer simulation technology, and in particular to a sphere and curve contact simulation method, device, electronic device and storage medium. Background Art

[0002] In the process of engineering design, physical simulation and control system development, it is often necessary to determine whether a sphere in space is in contact with a given curve. Therefore, contact simulation between the sphere and the curve is very important.

[0003] In traditional sphere-curve contact simulation, the contact judgment between sphere and curve often relies on complex geometric calculations or numerical iterations, which have problems such as large amount of calculation, insufficient precision or poor stability. These problems are particularly prominent when dealing with complex curves (such as nonlinear and parameterized curves). Therefore, a sphere-curve contact simulation method is proposed to simulate the contact between sphere and curve. Summary of the invention

[0004] The present invention provides a sphere and curve contact simulation method, device, electronic equipment and storage medium to realize relatively convenient and accurate simulation processing of the contact between the sphere and the curve.

[0005] According to one aspect of the present invention, a sphere and curve contact simulation method is provided, the method comprising:

[0006] In the process of the spherical model moving toward the curve model, a plurality of preset curve type value points of the curve model are determined, and based on the plurality of preset curve type value points, a simulation curve corresponding to the curve model is obtained; wherein the simulation curve includes a curve mapping point corresponding to each preset curve type value point;

[0007] Determine a target curve value point among the plurality of preset curve value points, take the curve mapping point corresponding to the target value point as the target mapping point, and calculate the projection vector of the target mapping node in the tangent vector direction of the simulation curve;

[0008] When the projection vector is smaller than a preset error, an interaction force between the curve model and the spherical model is determined based on the target distance and the projection vector, and the spherical model and the curve model are controlled to contact with each other with the interaction force.

[0009] Optionally, determining a target curve type value point among the plurality of preset curve type value points comprises: for each preset curve type value point, calculating a distance value between the spherical model and the preset curve type value point; and determining a target curve type value point among the plurality of preset curve type value points based on the plurality of distance values.

[0010] Optionally, determining a target curve value point among a plurality of preset curve value points based on a plurality of the distance values ​​includes: determining a minimum distance value among the plurality of the distance values, and taking the preset curve value point corresponding to the minimum distance value as the target curve point.

[0011] Optionally, the method also includes: when the projection vector is not less than a preset error, returning to execute the operation of determining a target curve type value point among the multiple preset curve type value points, taking the curve mapping point corresponding to the target curve type value point as the target mapping point, and calculating the projection vector of the target mapping node in the direction of the tangent vector of the simulation curve.

[0012] Optionally, obtaining a simulation curve corresponding to the curve model based on multiple preset curve type value points includes: obtaining multiple curve control points corresponding to the curve model based on multiple preset curve type value points; and constructing a simulation curve corresponding to the curve model based on multiple curve control points.

[0013] Optionally, obtaining a plurality of curve control points corresponding to the curve model based on a plurality of the preset curve type value points includes: determining a node mapping interval preset for the curve model; mapping a plurality of the preset curve type value points to the node mapping interval to obtain a curve mapping node corresponding to each of the preset curve type value points in the node mapping interval; and obtaining a plurality of curve control points corresponding to the curve model based on the plurality of the curve mapping nodes.

[0014] Optionally, constructing a simulation curve corresponding to the curve model based on the plurality of curve control points includes: interpolating the plurality of curve control points using a cubic B-spline curve algorithm to obtain a simulation curve corresponding to the curve model.

[0015] According to another aspect of the present invention, a sphere and curve contact simulation device is provided. The device comprises:

[0016] A simulation curve obtaining module, used for determining a plurality of preset curve type value points of the curve model during the process of the spherical model moving toward the curve model, and obtaining a simulation curve corresponding to the curve model based on the plurality of preset curve type value points; wherein the simulation curve includes a curve mapping point corresponding to each preset curve type value point;

[0017] A projection vector calculation module, used to determine a target curve value point among the plurality of preset curve value points, take the curve mapping point corresponding to the target value point as the target mapping point, and calculate the projection vector of the target mapping node in the tangent vector direction of the simulation curve;

[0018] The model contact control module is used to determine the interaction force between the curve model and the spherical model based on the target distance and the projection vector when the projection vector is smaller than a preset error, and control the spherical model and the curve model to contact with the interaction force.

[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0020] at least one processor; and

[0021] a memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the sphere and curve contact simulation method described in any embodiment of the present invention.

[0023] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sphere and curve contact simulation method described in any embodiment of the present invention when executed.

[0024] The technical solution of the embodiment of the present invention is that in the process of the spherical model moving toward the curve model, by determining a plurality of preset curve-type value points of the curve model, a simulation curve corresponding to the curve model is obtained based on the plurality of preset curve-type value points; wherein the simulation curve includes a curve mapping point corresponding to each preset curve-type value point; a target curve-type value point among the plurality of preset curve-type value points is determined, the curve mapping point corresponding to the target curve-type value point is used as the target mapping point, and the projection vector of the target mapping node in the tangent vector direction of the simulation curve is calculated; when the projection vector is less than a preset error, the interaction force between the curve model and the spherical model is determined based on the target distance and the projection vector, and the spherical model and the curve model are controlled to contact with the interaction force. The technical solution of the embodiment of the present invention realizes a more convenient and accurate simulation of the contact between the sphere and the curve.

[0025] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 A schematic diagram of a flow chart of a sphere and curve contact simulation method provided by an embodiment of the present invention;

[0028] Figure 2 A schematic diagram of a projection vector in a contact simulation method between a sphere and a curve provided by an embodiment of the present invention;

[0029] Figure 3 A schematic diagram of a cam transmission mechanism applicable to a spherical and curved contact simulation method provided by an embodiment of the present invention;

[0030] Figure 4 A simulation schematic diagram of a cam transmission mechanism applicable to a spherical and curved contact simulation method provided by an embodiment of the present invention;

[0031] Figure 5 A schematic diagram of the structure of a sphere and curve contact simulation device provided by an embodiment of the present invention;

[0032] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.

[0035] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0036] Figure 1 The present invention provides a schematic flow chart of a method for simulating contact between a sphere and a curve. The present invention can be applied to the case of simulating contact between a sphere and a curve. The method can be performed by a sphere and curve contact simulation device. The sphere and curve contact simulation device can be implemented in the form of hardware and / or software. The sphere and curve contact simulation device can be configured in an electronic device such as a computer or a server. Figure 1 As shown, the method of this embodiment includes:

[0037] S110. In the process of the spherical model moving toward the curve model, a plurality of preset curve type value points of the curve model are determined, and based on the plurality of preset curve type value points, a simulation curve corresponding to the curve model is obtained; wherein the simulation curve includes a curve mapping point corresponding to each preset curve type value point.

[0038] Wherein, the sphere model can be understood as a model or entity of a sphere shape as a contacting party. The curve model can be understood as a model or entity of a curve shape as a contacted party. In an embodiment of the present invention, the curve model can be a three-dimensional curve model. In an embodiment of the present invention, the material of the sphere model and the material of the curve model can include at least one of a plastic material, a wooden material, a metal material, etc. It should be noted that the material of the sphere model and the material of the curve model can be the same or different. In an embodiment of the present invention, a plurality of preset curve-type value points of the curve model can be understood as a plurality of pre-set data points for describing the geometric shape of the curve model. In an embodiment of the present invention, the curve model includes at least 3 preset curve-type value points. Wherein, the simulation curve can be understood as a curve obtained by simulating the shape of the curve model based on a plurality of the preset curve-type value points. In an embodiment of the present invention, the simulation curve includes a plurality of curve mapping points. Wherein, the curve mapping points on the simulation curve correspond to the preset curve-type value points on the curve model.

[0039] In an embodiment of the present invention, there are multiple ways to determine the multiple preset curve type value points of the curve model. For example, in response to a curve type value point setting operation for the curve model, multiple preset curve type value points of the curve model can be obtained based on the curve type value point setting operation. Among them, the curve type value point setting operation can be understood as an operation for setting the curve type value points on the curve model. Alternatively, a preset tool can be used to extract the edge contour points of the curve model as multiple preset curve type value points of the curve model. In an embodiment of the present invention, the multiple preset curve type value points of the curve model can at least include key points, turning points or points at specific positions of the curve.

[0040] In the embodiment of the present invention, the step of obtaining a simulation curve corresponding to the curve model based on the plurality of preset curve type value points may include: obtaining a plurality of curve control points corresponding to the curve model based on the plurality of preset curve type value points. Thus, a simulation curve corresponding to the curve model may be constructed based on the plurality of curve control points.

[0041] The curve control points can be understood as control points obtained based on a plurality of the preset curve type value points and used to define the overall shape and details of the curve. In the embodiment of the present invention, there can be a plurality of curve control points.

[0042] In an embodiment of the present invention, the method of obtaining a plurality of curve control points corresponding to the curve model based on a plurality of preset curve value points may include: determining a node mapping interval preset for the curve model. Then, the plurality of preset curve value points may be mapped to the node mapping interval, thereby obtaining a curve mapping node corresponding to each preset curve value point in the node mapping interval. Then, a plurality of curve control points corresponding to the curve model may be obtained based on the plurality of curve mapping nodes. Among them, the node mapping interval may be understood as an interval pre-set for the curve model for mapping preset curve value points on the curve model. For example, [-1,1]. The curve mapping node may be understood as a mapping node corresponding to a preset curve value point in the node mapping interval. The correspondence between the curve mapping node and the preset curve value point may be one-to-one.

[0043] In the embodiment of the present invention, the construction of the simulation curve corresponding to the curve model based on the plurality of curve control points may include: interpolating the plurality of curve control points using a cubic B-spline curve algorithm, thereby obtaining the simulation curve corresponding to the curve model. In the embodiment of the present invention, the plurality of curve control points are interpolated using a cubic B-spline curve algorithm, so that the simulation curve can smoothly transition between the control points without abrupt turns or jumps, thereby making the curve smoother.

[0044] S120, determining a target curve type value point among the plurality of preset curve type value points, taking a curve mapping point corresponding to the target curve type value point as a target mapping point, and calculating a projection vector of the target mapping node in the direction of the tangent vector of the simulation curve.

[0045] The target curve value point can be understood as a curve value point among multiple preset curve value points. Optionally, the target curve value point can be a preset value point closest to the sphere model. The target mapping point can be understood as a curve mapping point among multiple curve mapping points corresponding to the target value point. The projection vector can be understood as the projection vector of the target mapping node in the direction of the tangent vector of the simulation curve (see Figure 2 ). It should be noted that Figure 2 The guide vector of the mid-mapping point can be understood as the tangent vector of the target mapping node on the simulation curve.

[0046] In an embodiment of the present invention, the determination of a target curve-type value point among the plurality of preset curve-type value points may include: for each preset curve-type value point, the distance value between the sphere model and the preset curve-type value point may be calculated. Thus, a plurality of distance values ​​may be obtained. Thus, the target curve-type value point among the plurality of preset curve-type value points may be determined based on the plurality of distance values. Optionally, the determination of a target curve-type value point among the plurality of preset curve-type value points based on the plurality of distance values ​​may specifically include: determining the minimum distance value among the plurality of distance values, and the preset curve-type value point corresponding to the minimum distance value may be used as the target curve-type point.

[0047] In the disclosed embodiment, calculating the projection vector of the target mapping node in the direction of the tangent vector of the simulation curve may include: first determining the tangent vector of the simulation curve at the target mapping node. After that, calculating the vector from the target mapping node to a certain point (usually the tangent point) on the curve, and projecting the vector onto the tangent vector, thereby obtaining the projection vector of the target mapping node in the direction of the tangent vector of the simulation curve.

[0048] S130. When the projection vector is smaller than a preset error, determine the interaction force between the curve model and the spherical model based on the target distance and the projection vector, and control the spherical model and the curve model to contact with each other using the interaction force.

[0049] The preset error can be set according to actual needs, and its value is not specifically limited here. The interaction force between the curve model and the sphere model may include a contact force and a contact friction force between the curve model and the sphere model.

[0050] In an embodiment of the present invention, determining the interaction force between the curve model and the spherical model based on the target distance and the projection vector may specifically include: bringing the target distance and the projection vector into a preset ball-to-ball contact algorithm, thereby determining the interaction force between the curve model and the spherical model.

[0051] Based on the above embodiment, the method also includes: when the projection vector is not less than a preset error, it can return to execute the operation of determining the target curve type value point among the multiple preset curve type value points, taking the curve mapping point corresponding to the target curve type value point as the target mapping point, and calculating the projection vector of the target mapping node in the direction of the tangent vector of the simulation curve.

[0052] It should be noted that the technical solution in the embodiment of the present invention can be applied to multi-body dynamics systems that require accurate simulation of the contact behavior between a ball and a curve, such as gear meshing and rolling bearing analysis in a mechanical system. The technical solution in the embodiment of the present invention can accurately solve the shortest distance contact point between a ball and a curve, can be applied to curves of different shapes and parameters, and can be easily extended to other types of contact problems.

[0053] It should also be noted that the modeling language of the sphere and curve contact simulation method of the embodiment of the present invention can be Modelica modeling language. Modelica modeling language can be easily integrated with other system components to achieve system-level multi-domain simulation analysis.

[0054] For example, see Figure 3 , a cam rotates to drive the ball up and down as the contact transmission process between the ball and the curve. Among them, the left endpoint of the ball and curve contact model is connected to the multi-body of the curve feature (cam multi-body), and the right side is connected to the ball multi-body. Among them, the cam multi-body is connected to the fixed coordinate system through a rotation pair, and a given rotation excitation source is used to drive the cam multi-body to rotate. The ball multi-body is connected to the earth coordinate system through a translation pair, and the ball multi-body can be translated along the earth coordinate system. Based on this, the initial conditions such as the relative position and attitude angle of the ball and the cam multi-body can be set in the ball and curve contact model. After that, the simulation algorithm and the simulation step size can be set to start the simulation. Exemplarily, the cam mechanism rotates at a constant speed of 1rad / s, and through the ball and curve contact model, the contact force is applied to the sphere to drive the ball to move up and down, thereby realizing the transmission process simulation of the cam and the ball (see Figure 4 ).

[0055] The technical solution of the embodiment of the present invention is that in the process of the spherical model moving toward the curve model, by determining a plurality of preset curve-type value points of the curve model, a simulation curve corresponding to the curve model is obtained based on the plurality of preset curve-type value points; wherein the simulation curve includes a curve mapping point corresponding to each preset curve-type value point; a target curve-type value point among the plurality of preset curve-type value points is determined, the curve mapping point corresponding to the target curve-type value point is used as the target mapping point, and the projection vector of the target mapping node in the tangent vector direction of the simulation curve is calculated; when the projection vector is less than a preset error, the interaction force between the curve model and the spherical model is determined based on the target distance and the projection vector, and the spherical model and the curve model are controlled to contact with the interaction force. The technical solution of the embodiment of the present invention realizes a more convenient and accurate simulation of the contact between the sphere and the curve.

[0056] Figure 5 The structure diagram of a sphere and curve contact simulation device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device includes: a simulation curve obtaining module 210, a projection vector calculating module 220 and a control model contact module 230.

[0057] Among them, the simulation curve acquisition module 210 is used to determine a plurality of preset curve type value points of the curve model in the process of the spherical model moving toward the curve model, and obtain a simulation curve corresponding to the curve model based on the plurality of preset curve type value points; wherein the simulation curve includes a curve mapping point corresponding to each preset curve type value point; the projection vector calculation module 220 is used to determine a target curve type value point among the plurality of preset curve type value points, and use the curve mapping point corresponding to the target type value point as the target mapping point, and calculate the projection vector of the target mapping node in the tangent vector direction of the simulation curve; the control model contact module 230 is used to determine the interaction force between the curve model and the spherical model based on the target distance and the projection vector when the projection vector is less than a preset error, and control the spherical model and the curve model to contact with the interaction force.

[0058] The technical solution of the embodiment of the present invention is to determine multiple preset curve value points of the curve model through the simulation curve acquisition module during the process of the sphere model moving toward the curve model, and obtain a simulation curve corresponding to the curve model based on the multiple preset curve value points; wherein the simulation curve includes a curve mapping point corresponding to each preset curve value point; determine the target curve value point among the multiple preset curve value points through the projection vector calculation module, take the curve mapping point corresponding to the target value point as the target mapping point, and calculate the projection vector of the target mapping node in the tangent vector direction of the simulation curve; and control the model contact module to determine the interaction force between the curve model and the sphere model based on the target distance and the projection vector when the projection vector is less than the preset error, and control the sphere model and the curve model to contact with the interaction force. The technical solution of the embodiment of the present invention realizes a more convenient and accurate simulation of the contact between the sphere and the curve.

[0059] Optionally, the projection vector calculation module 220 includes a target curve type value point unit; wherein the target curve type value point determination unit is used to calculate the distance value between the spherical model and the preset curve type value point for each preset curve type value point; and based on multiple distance values, determine the target curve type value point among multiple preset curve type value points.

[0060] Optionally, the target curve value point unit is used to determine the minimum distance value among the multiple distance values, and use the preset curve value point corresponding to the minimum distance value as the target curve point.

[0061] Optionally, the device also includes a simulation iteration module; wherein the simulation iteration module is used to return to execute the operation of determining the target curve type value point among the multiple preset curve type value points when the projection vector is not less than a preset error, taking the curve mapping point corresponding to the target type value point as the target mapping point, and calculating the projection vector of the target mapping node in the direction of the tangent vector of the simulation curve.

[0062] Optionally, the simulation curve obtaining module 210 is used to obtain a plurality of curve control points corresponding to the curve model based on a plurality of the preset curve type value points; and to construct a simulation curve corresponding to the curve model based on the plurality of the curve control points.

[0063] Optionally, the simulation curve obtaining module 210 is used to determine a node mapping interval preset for the curve model; map multiple preset curve type value points to the node mapping interval to obtain curve mapping nodes corresponding to each preset curve type value point in the node mapping interval; and obtain multiple curve control points corresponding to the curve model based on multiple curve mapping nodes.

[0064] Optionally, the simulation curve obtaining module 210 is used to interpolate multiple curve control points using a cubic B-spline curve algorithm to obtain a simulation curve corresponding to the curve model.

[0065] The sphere and curve contact simulation device provided in the embodiment of the present invention can execute the sphere and curve contact simulation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0066] It is worth noting that the various units and modules included in the above-mentioned sphere and curve contact simulation device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0067] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0068] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0069] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0070] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a sphere and curve contact simulation method.

[0071] In some embodiments, the sphere and curve contact simulation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the sphere and curve contact simulation method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the sphere and curve contact simulation method in any other appropriate manner (for example, by means of firmware).

[0072] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0073] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0074] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0075] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0076] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0077] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0078] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0079] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A sphere and curve contact simulation method, characterized in that: include: In the process of the spherical model moving toward the curve model, a plurality of preset curve type value points of the curve model are determined, and based on the plurality of preset curve type value points, a simulation curve corresponding to the curve model is obtained; wherein the simulation curve includes a curve mapping point corresponding to each preset curve type value point; Determine a target curve value point among the plurality of preset curve value points, take the curve mapping point corresponding to the target value point as the target mapping point, and calculate the projection vector of the target mapping node in the tangent vector direction of the simulation curve; When the projection vector is smaller than a preset error, an interaction force between the curve model and the spherical model is determined based on the target distance and the projection vector, and the spherical model and the curve model are controlled to contact with each other with the interaction force.

2. The method according to claim 1, characterized in that The step of determining a target curve value point among the plurality of preset curve value points comprises: For each preset curve value point, calculating the distance value between the sphere model and the preset curve value point; Based on the multiple distance values, a target curve value point among the multiple preset curve value points is determined.

3. The method according to claim 2, characterized in that The step of determining a target curve value point among a plurality of preset curve value points based on the plurality of distance values ​​comprises: The smallest distance value among the multiple distance values ​​is determined, and the preset curve value point corresponding to the smallest distance value is used as the target curve point.

4. The method according to claim 1, characterized in that The method further comprises: When the projection vector is not less than the preset error, return to execute the operation of determining the target curve type value point among the multiple preset curve type value points, taking the curve mapping point corresponding to the target curve type value point as the target mapping point, and calculating the projection vector of the target mapping node in the direction of the tangent vector of the simulation curve.

5. The method according to claim 1, characterized in that The step of obtaining a simulation curve corresponding to the curve model based on the plurality of preset curve value points includes: Based on the plurality of preset curve type value points, a plurality of curve control points corresponding to the curve model are obtained; Based on the plurality of curve control points, a simulation curve corresponding to the curve model is constructed.

6. The method according to claim 5, characterized in that The step of obtaining a plurality of curve control points corresponding to the curve model based on the plurality of preset curve value points includes: Determining a node mapping interval preset for the curve model; Mapping a plurality of the preset curve value points to the node mapping interval to obtain a curve mapping node corresponding to each of the preset curve value points in the node mapping interval; A plurality of curve control points corresponding to the curve model are obtained based on the plurality of curve mapping nodes.

7. The method according to claim 5, characterized in that The step of constructing a simulation curve corresponding to the curve model based on the plurality of curve control points comprises: A plurality of the curve control points are interpolated using a cubic B-spline curve algorithm to obtain a simulation curve corresponding to the curve model.

8. A sphere and curve contact simulation device, characterized in that: include: A simulation curve obtaining module, used for determining a plurality of preset curve type value points of the curve model during the process of the spherical model moving toward the curve model, and obtaining a simulation curve corresponding to the curve model based on the plurality of preset curve type value points; wherein the simulation curve includes a curve mapping point corresponding to each preset curve type value point; A projection vector calculation module, used to determine a target curve value point among the plurality of preset curve value points, take the curve mapping point corresponding to the target value point as the target mapping point, and calculate the projection vector of the target mapping node in the tangent vector direction of the simulation curve; The model contact control module is used to determine the interaction force between the curve model and the spherical model based on the target distance and the projection vector when the projection vector is smaller than a preset error, and control the spherical model and the curve model to contact with the interaction force.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the sphere and curve contact simulation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sphere and curve contact simulation method according to any one of claims 1 to 7 when executed.