Method and device for generating a shrink ring spring, and electronic device
Patent Information
- Application Number
- CN202611224325.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本申请提供一种缩圈弹簧的生成方法、装置及电子设备,以解决相关技术需要使用者通过CATIA界面手动完成建模操作,导致建模过程耗时长、效率低的问题,实现缩圈弹簧实体模型的快速生成
[0014]根据本申请实施例提出的缩圈弹簧的生成方法,通过基于弹簧设计参数分别构建缩圈弹簧的多个预设功能模块的中心线,将多个预设功能模块的中心线按照预设顺序进行接合,生成弹簧整体骨架线,并对弹簧整体骨架线进行曲线光顺处理,然后基于光顺处理后的弹簧整体骨架线,生成缩圈弹簧的完整外壁曲面,再将完整外壁曲面封闭,生成缩圈弹簧实体模型。由此,通过将缩圈弹簧分解为多个功能模块分别构建中心线并依次接合为整体骨架线,再对整体骨架线进行曲线光顺处理以消除接合处的几何不连续性,解决了相关技术需要使用者通过CATIA界面手动完成建模操作,导致建模过程耗时长、效率低的问题,实现缩圈弹簧实体模型的快速生成。
Smart Images

Figure CN122987208A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer-aided design technology, and in particular to a method, apparatus and electronic device for generating a coil spring. Background Technology
[0002] As a key load-bearing component in the automotive suspension system, the rapid generation of the geometric model of the spring is of great significance for the early design of the suspension system's spatial layout and motion interference verification.
[0003] In related technologies, the spring is divided into three parts: the upper coil, the middle coil, and the lower coil. The axes of each spring wire are drawn and then joined together. The spring is then swept into a solid shape using the rib command. The geometric parameters are associated with the feature parameters using the built-in formula function of CATIA (Computer Aided Three-dimensional Interactive Application), thereby achieving parametric-driven modeling.
[0004] However, this method requires users to manually complete the modeling operation through the CATIA interface, which makes the entire modeling process time-consuming and inefficient, and urgently needs to be solved. Summary of the Invention
[0005] This application provides a method, apparatus, and electronic device for generating a coil spring, in order to solve the problem that related technologies require users to manually complete the modeling operation through the CATIA interface, resulting in a long modeling process and low efficiency, and to achieve rapid generation of a solid model of a coil spring.
[0006] To achieve the above objectives, the first aspect of this application proposes a method for generating a coil spring, comprising the following steps: Obtain the spring design parameters, and construct the center lines of multiple preset functional modules of the coil-shrinking spring based on the spring design parameters; The center lines of the multiple preset functional modules are joined together in a preset order to generate the overall skeleton line of the spring; The overall skeleton line of the spring is smoothed, and based on the smoothed overall skeleton line of the spring, the complete outer wall surface of the coil spring is generated. The complete outer wall surface is then closed to generate a solid model of the coil spring.
[0007] According to one embodiment of this application, the spring design parameters include at least one of wire diameter, outer diameter, total spring height, effective number of coils, total number of coils, inner diameter of the upper coil, and inner diameter of the lower coil; the plurality of preset functional modules include a first flat coil module, a first lift module, an equal diameter module, a second lift module, and a second flat coil module.
[0008] According to one embodiment of this application, generating the complete outer wall surface of the contraction spring based on the smoothed overall spring skeleton line includes: Using half the wire diameter as the radius and the smoothed overall skeleton line of the spring as the target sweep path, a sweep operation is performed to generate the complete outer wall surface of the coiled spring.
[0009] According to one embodiment of this application, the preset functional module is a first flat coil module, and the center line of the plurality of preset functional modules that construct the coil-shrinking spring includes: Determine the circumferential radius of the first flat ring module; Using the rotation center axis of the spring's overall skeleton line as the reference axis, an arc with a first preset angle is constructed based on the reference axis and the circumference radius of the first flat ring module, and the center line of the first flat ring module is obtained based on the arc with the first preset angle.
[0010] According to one embodiment of this application, the preset functional module is a first lift module, and the center line of the plurality of preset functional modules that construct the coil spring includes: Starting from the end point of the first flat ring module, based on the reference axis, a first spiral line is constructed with a radius that changes from the circumference of the first flat ring module to the outer diameter at a preset rate of change, and the center line of the first lift module is obtained based on the first spiral line.
[0011] According to one embodiment of this application, the preset functional module is the equal-diameter module, and the centerline of the plurality of preset functional modules for constructing the coil spring includes: The height of the equal-diameter module is calculated based on the effective number of revolutions and the total number of revolutions; Starting from the end point of the first lift module, a second spiral with a constant radius is constructed based on the reference axis, and the center line of the equal diameter module is obtained based on the second spiral.
[0012] According to one embodiment of this application, the preset functional module is the second lift module, and the centerline of the plurality of preset functional modules that construct the coil spring includes: Starting from the end point of the equal diameter module, based on the reference axis, a third spiral with a radius that changes from the outer diameter to the sum of the inner diameter of the lower end ring and the wire diameter at the preset rate of change is constructed, and the center line of the second lift module is obtained based on the third spiral.
[0013] According to one embodiment of this application, the preset functional module is a second flat coil module, and the center line of the plurality of preset functional modules that construct the coil-shrinking spring includes: Determine the circumferential radius of the second flat ring module; An arc with a second preset angle is constructed based on the reference axis and the circumference radius of the second flat ring module, and the center line of the second flat ring module is obtained based on the arc with the second preset angle.
[0014] According to the method for generating a coiled spring proposed in this application, the center lines of multiple preset functional modules of the coiled spring are constructed based on the spring design parameters. These center lines are then joined in a preset order to generate the overall skeleton line of the spring. The overall skeleton line is then smoothed. Based on the smoothed overall skeleton line, the complete outer wall surface of the coiled spring is generated. Finally, the complete outer wall surface is closed to generate a solid model of the coiled spring. Thus, by decomposing the coiled spring into multiple functional modules, constructing center lines for each module, and sequentially joining them to form the overall skeleton line, and then smoothing the overall skeleton line to eliminate geometric discontinuities at the joints, this method solves the problem of time-consuming and inefficient modeling processes caused by requiring users to manually complete modeling operations through the CATIA interface. This method achieves rapid generation of a solid model of the coiled spring.
[0015] To achieve the above objectives, a second aspect of this application provides an apparatus for generating a coil spring, comprising: A construction module is used to obtain spring design parameters and construct the center lines of multiple preset functional modules of the coil-shrinking spring based on the spring design parameters. The first generation module is used to connect the center lines of the multiple preset functional modules in a preset order to generate the overall skeleton line of the spring. The second generation module is used to smooth the curve of the overall spring skeleton line, and based on the smoothed overall spring skeleton line, generate the complete outer wall surface of the coil spring, close the complete outer wall surface, and generate the solid model of the coil spring.
[0016] According to one embodiment of this application, the spring design parameters include at least one of wire diameter, outer diameter, total spring height, effective number of coils, total number of coils, inner diameter of the upper coil, and inner diameter of the lower coil; the plurality of preset functional modules include a first flat coil module, a first lift module, an equal diameter module, a second lift module, and a second flat coil module.
[0017] According to one embodiment of this application, the second generation module, which generates the complete outer wall surface of the coil-reducing spring based on the smoothed overall spring skeleton line, is specifically used for: Using half the wire diameter as the radius and the smoothed overall skeleton line of the spring as the target sweep path, a sweep operation is performed to generate the complete outer wall surface of the coiled spring.
[0018] According to one embodiment of this application, the preset functional module is a first flat coil module, the center line of the plurality of preset functional modules that construct the coil-shrinking spring, and the constructing module is specifically used for: Determine the circumferential radius of the first flat ring module; Using the rotation center axis of the spring's overall skeleton line as the reference axis, an arc with a first preset angle is constructed based on the reference axis and the circumference radius of the first flat ring module, and the center line of the first flat ring module is obtained based on the arc with the first preset angle.
[0019] According to one embodiment of this application, the preset functional module is a first lift module, the center line of the plurality of preset functional modules that construct the coil spring, and the constructing module is specifically used for: Starting from the end point of the first flat ring module, based on the reference axis, a first spiral line is constructed with a radius that changes from the circumference of the first flat ring module to the outer diameter at a preset rate of change, and the center line of the first lift module is obtained based on the first spiral line.
[0020] According to one embodiment of this application, the preset functional module is the equal-diameter module, the centerline of the plurality of preset functional modules that construct the coil spring, and the construction module is specifically used for: The height of the equal-diameter module is calculated based on the effective number of revolutions and the total number of revolutions; Starting from the end point of the first lift module, a second spiral with a constant radius is constructed based on the reference axis, and the center line of the equal diameter module is obtained based on the second spiral.
[0021] According to one embodiment of this application, the preset functional module is the second lift module, the center line of the plurality of preset functional modules that construct the coil spring, and the construction module is specifically used for: Starting from the end point of the equal diameter module, based on the reference axis, a third spiral with a radius that changes from the outer diameter to the sum of the inner diameter of the lower end ring and the wire diameter at the preset rate of change is constructed, and the center line of the second lift module is obtained based on the third spiral.
[0022] According to one embodiment of this application, the preset functional module is a second flat ring module, the center line of the plurality of preset functional modules that construct the coil spring, and the constructing module is specifically used for: Determine the circumferential radius of the second flat ring module; An arc with a second preset angle is constructed based on the reference axis and the circumference radius of the second flat ring module, and the center line of the second flat ring module is obtained based on the arc with the second preset angle.
[0023] The device for generating a coiled spring according to the embodiments of this application constructs centerlines for multiple preset functional modules of the coiled spring based on spring design parameters, joins the centerlines of the multiple preset functional modules in a preset order to generate the overall skeleton line of the spring, and performs curve smoothing processing on the overall skeleton line of the spring. Then, based on the smoothed overall skeleton line of the spring, a complete outer wall surface of the coiled spring is generated, and the complete outer wall surface is closed to generate a solid model of the coiled spring. Thus, by decomposing the coiled spring into multiple functional modules, constructing centerlines for each, and sequentially joining them to form an overall skeleton line, and then performing curve smoothing processing on the overall skeleton line to eliminate geometric discontinuities at the joints, the device solves the problem of long and inefficient modeling processes caused by users having to manually complete the modeling operation through the CATIA interface, thereby achieving rapid generation of a solid model of the coiled spring.
[0024] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the method for generating a coiled spring as described in the above embodiments.
[0025] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the method for generating a coiled spring as described in the above embodiments.
[0026] To achieve the above objectives, a fifth aspect of this application provides a computer program product comprising a computer program that, when executed by a processor, is used to implement the method for generating a coiled spring as described in the above embodiments.
[0027] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0028] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a method for generating a coil spring according to an embodiment of this application; Figure 2 A schematic diagram of a solid model of a coil spring according to an embodiment of this application; Figure 3 This is a block diagram of a coil spring generating apparatus according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0029] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0030] The following description, with reference to the accompanying drawings, describes a method, apparatus, and electronic device for generating a coil spring according to embodiments of this application.
[0031] Before introducing the method for generating the coiled spring proposed in the embodiments of this application, let's briefly introduce the relevant technical background.
[0032] While CATIA software offers basic spring modeling capabilities, users must manually define helical parameters such as pitch and height. Generating coiled springs involves complex joining, segmentation operations, and specialized spring design knowledge, making the modeling process cumbersome, demanding a high level of user skill, and prone to failure if parameters are not set correctly. Furthermore, in vehicle suspension engineering, related technologies often employ ADAMS (Automatic Dynamic Analysis of Mechanical Systems) for suspension dynamics simulation, then import the resulting spring motion envelope data into modeling software such as CATIA or SolidWorks (a 3D mechanical design software).
[0033] However, the aforementioned methods and technologies still have the following shortcomings: First, the modeling efficiency is low and the operation process is cumbersome. Manual modeling requires users to have strong modeling skills and be familiar with the specific representation of spring parameters in the digital model. Especially for coiled springs, they usually need to be divided into five parts: coiled section, lift section, constant diameter section, lift section, and coiled section, which is extremely cumbersome for most users. Second, the parameter correlation is poor, and the cost of design changes is high. Although some software provides parametric design functions, the constraint relationships between parameters need to be predefined and maintained by the user. Once the geometric topology of the spring changes, the original model often needs to be rebuilt. Moreover, the creation of parametric models is highly specialized for ordinary designers and difficult to master quickly. Third, there is a lack of batch processing capabilities. Related technologies generally cannot support batch spring modeling based on parameter tables or external data sources. When multiple specifications or installation positions of spring models need to be generated simultaneously, they can only be modeled or the parameters modified one by one, which is difficult to meet the efficiency requirements of multi-scheme iteration in the early design stage.
[0034] Based on the above problems, this application proposes a method for generating coiled springs. By using the VBA (Visual Basic for Applications) programming language to perform secondary development on CATIA, users only need to input the spring design parameters, and the system can automatically execute the modeling process and support the batch generation of coiled spring solid models. At the same time, the system can also quickly and conveniently modify and update the three-dimensional digital model by fine-tuning the parameters.
[0035] Next, the method for generating the coiled spring proposed in the embodiments of this application will be described in detail.
[0036] Figure 1 This is a flowchart of a method for generating a coiled spring according to an embodiment of this application.
[0037] Examples such as Figure 1 As shown, the method for manufacturing this coil spring includes the following steps: In step S101, the spring design parameters are obtained, and the center lines of multiple preset functional modules of the coil spring are constructed based on the spring design parameters.
[0038] As can be understood, in this embodiment, a coil spring refers to a type of helical spring where the diameter of the coil at the end gradually decreases, forming a tapered transition structure at the end. It is commonly used in vehicle suspension systems where end-mounting space constraints must be met. Spring design parameters are the key values used to define the spring's geometry. Preset functional modules refer to multiple geometric building blocks decomposed from the structural characteristics of the coil spring. A coil spring can be divided into multiple functional regions along its axial direction, each region having a specific geometric shape (such as an end planar coil section, a tapered transition section, a central equal-diameter section, etc.), and each region corresponds to a preset functional module. The centerline refers to the trajectory curve of the spring wire axis in space, i.e., the helical path formed along the center of the spring wire. In 3D spring modeling, the spatial trajectory of the spring wire centerline is usually constructed first, and then the spring wire entity is generated along this trajectory.
[0039] In other words, when a user runs a CATIA macro program, the CATIA software system can obtain the user-inputted spring design parameters to uniquely determine the geometry of the target coil spring. Since the coil spring is composed of multiple functional regions with different geometric features along its axis, the CATIA software system can independently calculate the spatial trajectory of the centerline of each preset functional module. The centerline of each preset functional module is an independent three-dimensional curve, and the centerlines of all preset functional modules together completely describe the spatial orientation of the coil spring's overall wire axis.
[0040] By constructing the center lines of each preset functional module in sequence, the modeling task of the complex geometry of the coiled spring can be decomposed into several relatively simple sub-tasks, thereby reducing the overall modeling difficulty and laying the data foundation for combining the center lines of each module into a complete spring skeleton line.
[0041] Optionally, in some embodiments, the spring design parameters include at least one of wire diameter, outer diameter, total spring height, effective number of coils, total number of coils, inner diameter of the upper coil, and inner diameter of the lower coil; the multiple preset functional modules include a first flat coil module, a first lift module, an equal diameter module, a second lift module, and a second flat coil module.
[0042] It is understood that in this embodiment, wire diameter refers to the diameter of the spring wire itself, that is, the cross-sectional diameter of the metal wire (or round bar) used to manufacture the spring. This parameter is one of the fundamental parameters determining the spring's strength and stiffness. Outer diameter refers to the outer boundary diameter of the spring's helical profile, that is, the maximum diameter of the overall outer profile of the spring. In the modeling process, the outer diameter usually corresponds to the diameter of the centerline of the spring wire in the working coil segment (equal diameter segment) plus one wire diameter. Total spring height refers to the total axial height of the spring in its free state, that is, the total length of the spring from the lower end face to the upper end face along the axial direction. This parameter is the core parameter constraining the axial dimensions of each functional module. Effective coils refer to the number of helical coils in the spring that participate in elastic deformation and bear load, excluding the parallel coils used for support and fixation at the ends. Total coils refer to the total number of complete helical coils from one end to the other, including the effective coils and the end support coils. The difference between the total coils and the effective coils is the number of end support coils (parallel coils). The inner diameter of the upper coil refers to the inner diameter of the upper coil section of the shrinking coil spring, that is, the diameter of the circle formed by the inner sides of the upper coil spring wire. It is used to determine the installation interface size between the upper end of the spring and the surrounding mating parts (such as the upper soft pad). The inner diameter of the lower coil refers to the inner diameter of the lower coil section of the shrinking coil spring, that is, the diameter of the circle formed by the inner sides of the lower coil spring wire. It is used to determine the installation interface size between the lower end of the spring and the surrounding mating parts (such as the lower soft pad). The first flat coil module refers to the coil section at one end of the shrinking coil spring (such as the upper coil section). This section of the spring coil extends in an arc in the plane, and the axial distance between adjacent coils is zero or very small. It is mainly used to form the support and mounting plane of the spring end. The first lift module refers to the conical transition section adjacent to the first flat coil module. This section of the spring gradually transitions from the end coil radius to the radius of the equal diameter section. The center line of the spring wire rises in a spiral with a changing diameter, constituting one of the "shrinking" characteristic areas of the shrinking coil spring. The equal-diameter module refers to the working section in the middle of the spring. The radius of this section remains constant along the axial direction, and the centerline of the spring wire extends in a helical pattern with equal pitch. This is the main elastic working area of the spring. The second lift module refers to the tapered transition section adjacent to the equal-diameter module. This section of the spring gradually transitions from the radius of the equal-diameter section to the radius of the other end coil, symmetrically forming another "coil-shrinking" characteristic area of the coil-shrinking spring with the first lift module. The second flat coil module refers to the coiled section at the other end of the coil-shrinking spring (as shown in the lower flat coil section). Similar in structure to the first flat coil module, it is located at the other end of the spring and serves to form the support and mounting plane for the other end of the spring.
[0043] In other words, spring design parameters include, but are not limited to, at least one of the following: wire diameter, outer diameter, total spring height, effective number of coils, total number of coils, inner diameter of the upper coil, and inner diameter of the lower coil. These parameters work together to form the input data that uniquely determines the geometry of the coil-reducing spring: the wire diameter determines the thickness of the spring wire, the outer diameter determines the contour boundary of the working coil segment, the total spring height constrains the axial distribution range of each functional module, the effective number of coils and the total number of coils together determine the coil distribution of each helical segment, and the inner diameters of the upper and lower coils respectively determine the internal radial dimensions of the coil segments at both ends of the coil-reducing spring. Furthermore, the CATIA software system's preset functional modules include a first flat coil module, a first lift module, an equal diameter module, a second lift module, and a second flat coil module, totaling five modules. The first and second flat coil modules correspond to the coiled sections at both ends of the spring, forming the end support structure. The first and second lift modules correspond to the tapered transition area between the coiled sections at both ends and the middle working section, enabling the spring radius to gradually change from the inner diameter to the outer diameter of the end coils. The equal-diameter module corresponds to the equal-radius working section in the middle of the spring, constituting the main elastic deformation area of the spring. These five modules are distributed along the axial direction of the spring in the order of the first flat coil module, the first lift module, the equal-diameter module, the second lift module, and the second flat coil module, collectively covering the entire axial range of the coiled spring from one end to the other.
[0044] By decomposing the complete coil spring into these five independent preset functional modules, the centerline can be constructed independently for each module during the subsequent modeling process, thereby decomposing the overall modeling task into several relatively simple sub-tasks.
[0045] As one possible implementation, in some embodiments, the preset functional module is a first flat coil module. The centerline of multiple preset functional modules of the coil spring is constructed, including: determining the circumferential radius of the first flat coil module; taking the rotation center axis of the overall spring skeleton line as the reference axis, constructing an arc with a first preset angle based on the reference axis and the circumferential radius of the first flat coil module, and obtaining the centerline of the first flat coil module based on the arc with the first preset angle.
[0046] It is understood that in this embodiment, the circumferential radius refers to the radius of the arc containing the centerline of the first flat coil module. In the spring, the centerline of the flat coil module is an arc, the radius of which is determined by the inner diameter of the end coil and the wire diameter (half the inner diameter of the end coil plus the wire diameter), used to determine the curvature and spatial range of the arc. The rotation center axis of the overall spring skeleton (i.e., the Z-axis in the CATIA modeling environment) is the central axis of the overall spring structure, that is, the axis of symmetry of the spring helix around which it rotates. In the coil-reducing spring, the centerlines of all preset functional modules extend around this axis, which serves as the reference line for the entire modeling process. The first preset angle refers to the central angle corresponding to the arc of the first flat coil module. In the coil-reducing spring, the flat coil (parallel coil segment) at the end is usually an arc larger than a semicircle but smaller than a full circle, and this angle can be preset according to design requirements.
[0047] Specifically, when the CATIA software system constructs the centerline of the first flat ring module, it first calculates the circumferential radius of the module's centerline based on the inner diameter of the upper ring and the wire diameter. This is achieved by adding half the inner diameter of the upper ring to the wire diameter; the resulting value is the radius of the arc containing the centerline of the first flat ring module. This circumferential radius determines the curvature and radial dimension of the centerline in space. Then, using the rotation axis of the spring's overall skeleton as a reference axis (perpendicular to the plane containing the flat ring module), the CATIA software system constructs an arc with a first preset angle (e.g., 220°) within a plane perpendicular to the reference axis, with the center of the first flat ring module as the rotation center and the determined circumferential radius as the radius. This arc is located at one end of the spring, with its center on the reference axis, thus precisely determining the orientation of the flat ring module's centerline in space. After the arc is constructed, the CATIA software system directly uses the arc as the center line of the first flat circle module, thus completing the construction of the center line of the first flat circle module.
[0048] In this way, the CATIA software system abstracts the coiled section (support coil) at one end of the coil spring into a planar arc with a preset angle. This arc has clear geometric elements (center, radius, angle), so that the center lines of subsequent modules can be geometrically connected precisely.
[0049] As one possible implementation, in some embodiments, the preset functional module is a first lift module, and the center line of multiple preset functional modules of the coil spring is constructed, including: taking the end point of the first flat coil module as the starting point, based on the reference axis, constructing a first spiral line whose radius changes from the circumference radius of the first flat coil module to the outer diameter at a preset rate of change, and obtaining the center line of the first lift module based on the first spiral line.
[0050] It is understood that, in this embodiment, the end point of the first flat ring module refers to the end point of the centerline of the first flat ring module (i.e., the arc of the preset angle). Since the centerline of the first flat ring module is an arc with a preset angle (e.g., 220°) rather than a complete circle, it has a clear starting and ending point. This ending point is the end point of the first flat ring module and also the starting point of the first lift module. The preset rate of change refers to the variation of the helical radius within a unit distance along the axial direction, used to describe how quickly the centerline of the first lift module transitions from the end ring radius to the outer diameter. This rate of change determines the taper of the conical transition section of the coil spring. The larger the rate of change, the larger the cone angle of the transition section, and the more rapid the coil contraction; the smaller the rate of change, the smaller the cone angle of the transition section, and the smoother the coil contraction. In a specific embodiment, this rate of change can be determined by calculation based on the height of the first lift module and the effective number of coils. The first helix is the centerline of the first lift module, which is a helix whose radius changes with the axial position (i.e., a variable pitch or variable diameter helix). The radius of the first spiral changes continuously along the axial direction from the starting end (i.e. the end of the first flat coil module) to the ending end (i.e. the starting end of the equal diameter module), thus forming a conical transition structure of the coil spring.
[0051] Specifically, when constructing the centerline of the first lift module, the CATIA software system first calculates the axial height of the first lift module based on the effective number of coils to determine the travel range of the module in the reference axis direction. Simultaneously, the CATIA software system calculates the draft angle based on the circumferential radius and outer diameter of the first flat coil module. This draft angle is essentially a cone angle obtained by geometrically calculating the trapezoid formed by the circumferential radius and half of the outer diameter of the first flat coil module, used to determine the rate of change (i.e., the preset rate of change) of the centerline radius of the first lift module from the starting end to the ending end. Then, the CATIA software system can determine the starting position of the first lift module, that is, taking the end point of the first flat coil module as the starting point of the centerline of the first lift module. This end point is the end of the arc of the first flat coil module and also the geometric connection point where the coiling spring enters the conical transition section from the end coil section. Next, the CATIA software system uses the rotation center axis (i.e., the reference axis) of the spring's integral skeleton line as a rotation reference. Starting from this point, according to the calculated axial height and draft angle, it constructs a first helix with a radius that gradually changes axially from the circumference of the first flat ring module to its outer diameter at a preset rate. This helix extends spirally along the reference axis, its radius continuously changing within the axial stroke, thus forming a tapered transition structure connecting the end ring segment and the intermediate working segment. After the first helix is constructed, the CATIA software system uses this helix as the centerline of the first lift module. At this point, the centerline of the first lift module is complete. One end of this centerline precisely connects to the end point of the first flat ring module, while the other end provides the starting position for constructing the centerline of the subsequent constant diameter module.
[0052] In this way, the CATIA software system constructs a conical transition path for the expansion of the coil spring from the end coil radius to the outer diameter in the form of a spiral, providing a geometric basis for realizing the continuous change of the spring radius from small to large (or from large to small).
[0053] As one possible implementation, in some embodiments, the preset functional module is an equal-diameter module, and the centerline of multiple preset functional modules of the coil spring is constructed, including: calculating the height of the equal-diameter module based on the effective number of coils and the total number of coils; taking the end point of the first lift module as the starting point, constructing a second helix with a constant radius based on the reference axis, and obtaining the centerline of the equal-diameter module based on the second helix.
[0054] It is understood that, in this embodiment, the height of the equal-diameter module is the axial length of the equal-diameter module along the reference axis, that is, the axial distance between the end of the first lift module and the beginning of the second lift module in the middle working section of the spring. The second helix is the centerline of the equal-diameter module, which is a helix with a constant radius along the axial direction (i.e., a constant-pitch helix). Unlike the variable-diameter helix with a continuously changing radius in the first lift module, the radius of the second helix remains constant throughout the axial stroke, thus forming the equal-diameter working section in the middle of the spring.
[0055] Specifically, when constructing the centerline of the equal-diameter module, the CATIA software system first calculates the height of the equal-diameter module based on the effective number of turns and the total number of turns, thus determining the axial travel range of the equal-diameter module along the reference axis. Then, using the reference axis as the rotation centerline and the end point of the first lift module as the starting point of the equal-diameter module's centerline, the CATIA software system constructs a second helix with a constant radius. This helix extends spirally along the reference axis, its radius remaining unchanged within the axial travel, thus forming a constant-radius working segment in the middle of the spring, which is the spring's main elastic deformation area. After the second helix is constructed, the CATIA software system uses this helix as the centerline of the equal-diameter module. One end of this centerline precisely connects to the end point of the first lift module, while the other end provides the starting position for constructing the subsequent centerline of the second lift module.
[0056] In this way, the system constructs the equal-diameter working section in the middle of the coil spring in the form of an equal-pitch helix, providing a geometric basis for the main load-bearing and deformation areas of the spring.
[0057] As one possible implementation, in some embodiments, the preset functional module is the second lift module, and the center line of multiple preset functional modules of the coil spring is constructed, including: taking the end point of the equal diameter module as the starting point, based on the reference axis, constructing a third spiral with a radius that changes from the outer diameter to the sum of the inner diameter of the lower end coil and the wire diameter at a preset rate of change, and obtaining the center line of the second lift module based on the third spiral.
[0058] It is understood that in this embodiment, the third spiral is the centerline of the second lift module, which is a spiral (i.e., a variable diameter spiral) whose radius changes continuously along the axial direction at a preset rate. The spiral extends spirally from the end point of the constant diameter module, and its radius gradually changes along the reference axis from the outer diameter to the sum of the inner diameter of the lower coil and the wire diameter, thereby forming a tapered transition structure at the other end of the coil spring (lower end).
[0059] Specifically, when constructing the centerline of the second lift module, the CATIA software system can first use the end point of the equal-diameter module as the starting point of the centerline of the second lift module. This point is the geometric connection point where the coil spring enters the top conical coil section from the middle equal-diameter working section. Then, the CATIA software system can use the reference axis as the rotation centerline, the outer diameter of the equal-diameter module as the starting diameter of the helix, and the inner diameter of the lower coil as the ending diameter. Based on the height of the second lift module and the effective number of turns, two pitches (i.e., the starting pitch and the ending pitch) are calculated. Using a variable pitch method, the total number of turns of the helix is defined according to the effective number of turns, constructing a third helix with a radius that gradually changes from the outer diameter to the sum of the inner diameter of the lower coil and the wire diameter at a preset rate of change. This helix extends spirally along the reference axis, and its radius changes continuously within the axial travel, thus forming a conical coil structure at the top of the coil spring where it transitions from the equal-diameter working section to the end coil section. After the third spiral is constructed, the CATIA software system can use this spiral as the centerline of the second lift module. One end of this centerline is precisely connected to the end point of the equal diameter module, and the other end provides the starting position for the construction of the centerline of the subsequent second flat ring module.
[0060] In this way, the CATIA software system constructs a tapered transition path for the shrinking spring in the form of a variable diameter spiral, from the constant diameter section to the inner diameter. This achieves a continuous change in the spring radius from the outer diameter to the inner diameter of the end coil, providing a geometric transition for the construction of the coiled section at the other end of the spring.
[0061] In one possible implementation, in some embodiments, the preset functional module is a second flat ring module. The centerline of multiple preset functional modules for constructing the coil spring includes: determining the circumferential radius of the second flat ring module; constructing an arc with a second preset angle based on the reference axis and the circumferential radius of the second flat ring module; and obtaining the centerline of the second flat ring module based on the arc with the second preset angle.
[0062] It is understood that, in the embodiments of this application, the second preset angle refers to the central angle corresponding to the arc of the second flat ring module. Similar to the first preset angle, this angle can be preset according to design needs, so that the arc of the second flat ring module has a clear start end and end end, which facilitates a smooth connection with the end point of the second lift module.
[0063] Specifically, when constructing the centerline of the second flat coil module, the CATIA software system first calculates the circumference radius of the second flat coil module based on the inner diameter and wire diameter of the lower coil. This radius determines the curvature and radial dimension of the centerline of the second flat coil module in space. Then, using the plane containing the centerline of the first flat coil module (i.e., the XY plane) as a reference, the CATIA software system translates the total height of the spring along the reference axis to construct a target plane. The intersection of this target plane and the reference axis is the center position of the second flat coil module. Next, using this center position as the center and the calculated circumference radius as the radius, the CATIA software system constructs an arc with a second preset angle (e.g., 220°) within a plane perpendicular to the reference axis (i.e., the target plane). During construction, the CATIA software system precisely connects the starting endpoint of this arc to the ending endpoint of the centerline of the second lift module. After the arc is constructed, the CATIA software system uses this arc as the centerline of the second flat coil module, thus completing the construction of the centerlines of all five preset functional modules of the coil spring.
[0064] In the above manner, the system abstracts the coiled segment at the other end of the coiling spring into a planar arc with a preset angle. This arc is precisely connected to the end point of the second lift module, thus completing the construction of the complete center line of the coiling spring from one end to the other.
[0065] The above describes the construction process of the center lines of the five functional modules of the coil spring, which includes the preset angle arcs of two flat coil modules, the variable pitch helical lines of two lift modules, and the constant pitch helical line of one equal diameter module. It should be noted that all the geometric elements such as points, lines, and surfaces mentioned above must be created in a newly created geometric set and completed using the generative shape design module to facilitate subsequent joining and surface generation operations.
[0066] In step S102, the center lines of multiple preset functional modules are joined in a preset order to generate the overall skeleton line of the spring.
[0067] It is understood that in this embodiment, the preset order is the predetermined arrangement of the center lines of the five preset functional modules of the coil spring, that is, according to the axial arrangement of the spring from one end to the other, the modules are: the first flat coil module, the first lift module, the equal diameter module, the second lift module, and the second flat coil module. This order is consistent with the actual structural order of the spring, ensuring the geometric correctness of the spring skeleton line after assembly. The overall spring skeleton line refers to the complete single curve formed by sequentially assembling the center lines of each preset functional module of the coil spring. This curve completely describes the spatial trajectory of the spring wire axis from one end to the other and serves as the guiding path for the subsequent generation of the spring's outer wall surface.
[0068] Specifically, when joining the centerlines of the five preset functional modules, because the joining operation in CATIA VBA needs to consider the order, it is impossible to join all five centerlines simultaneously. The CATIA software system can sequentially join the first and second centerlines in the order of the first flat coil module, the first lift module, the equal diameter module, the second lift module, and the second flat coil module, using the AddNewJoin command (used to create a joining object and add the first geometric element) and the AddElement command (used to continue adding geometric elements to an existing joining object). The merge distance is set to 0.001 to ensure the accuracy of the joint. In this way, the CATIA software system merges the originally independent five centerlines into a single complete curve, which is the overall spring skeleton line, completely describing the spatial trajectory of the coil spring's wire axis from one end to the other.
[0069] In step S103, the overall skeleton line of the spring is smoothed, and based on the smoothed overall skeleton line of the spring, the complete outer wall surface of the coil spring is generated. The complete outer wall surface is closed to generate the solid model of the coil spring.
[0070] It is understood that, in the embodiments of this application, the complete outer wall surface refers to the contour surface of the spring, which is used to generate the spring solid model in the future.
[0071] Specifically, since the overall spring skeleton is formed by sequentially joining the centerlines of five preset functional modules, it only has C0 point continuity at the joining point (i.e., the two curves are only positionally continuous at the connection point, meaning they are end-to-end). Its tangent and curvature may abruptly change at the joining point. Directly using this for sweeping operations can easily lead to sweep failure or an unsmooth surface. Therefore, the CATIA software system can use the curve smoothing command, setting the smoothing mode to curvature continuity, the maximum deviation to 0.001, and selecting the curve simplification command. This ensures that the overall spring skeleton achieves C2 curvature continuity at the joining point (i.e., the two curves are not only positionally and tangentially continuous at the connection point, but also have continuous curvature values, resulting in a smooth curve without abrupt changes at that point). This eliminates the geometric discontinuities caused by segmented joining, ensuring the smoothness of the entire skeleton. Then, the CATIA software system can use the sweep command to generate the complete outer wall surface of the coiled spring based on the smoothed overall spring skeleton.
[0072] Since CATIA VBA does not have a direct "convert surface to solid" command, the CATIA software system can add a new geometry as a container using the Add command, use the InWorkObject command (used to switch the current work object to the specified geometry) to define the work object as this geometry, and then use the AddNewCloseSurface command (used to convert a closed surface into a solid model) to select the complete outer wall surface generated by the sweep, thus closing the surface into a solid model of a coiled spring with volume.
[0073] Through the above methods, the CATIA software system solved the geometric discontinuity problem caused by segmented joining, ensuring the success rate of the sweep operation and the quality of the generated surface, and finally obtaining a solid digital model of the coiled spring that can be directly used for subsequent interference checks.
[0074] As one possible implementation, in some embodiments, the complete outer wall surface of the shrinking spring is generated based on the smoothed overall spring skeleton line, including: performing a sweep operation with half the wire diameter as the radius and the smoothed overall spring skeleton line as the target sweep path to generate the complete outer wall surface of the shrinking spring.
[0075] Specifically, the CATIA software system uses half the wire diameter as the radius of the swept section circle, which determines the thickness of the spring wire. Then, the CATIA system uses the smoothed overall spring skeleton line as the target swept path (i.e., the ridge line), which completely describes the three-dimensional spatial orientation of the coiled spring wire axis from one end to the other. Next, the CATIA system sweeps the circular section along the target swept path, thereby generating the complete outer wall surface of the coiled spring, which completely covers the outer surface of the spring. During the sweeping process, the CATIA system disables smoothing mode, fills self-intersecting regions, and sets the indentation ratio to 2%.
[0076] In this way, the system uses a sweep operation to expand the one-dimensional overall skeleton line of the spring into a three-dimensional outer wall surface of the spring, providing a geometric basis for subsequent closure into a solid model.
[0077] After the spring solid model is generated, the CATIA software system can use the VisProperties command (used to select specified geometric elements) and the selection command (used to control the visibility of the selected geometric elements) to hide all intermediate geometric elements generated during the modeling process (including points, lines, surfaces, joints, curve smoothing, and sweeping results, etc.), retaining only the final spring solid model for easy viewing by the user. Through these steps, a complete coiled spring model can be obtained, such as... Figure 2 As shown, the entire modeling process is executed automatically by a VBA program. Users only need to input the spring design parameters; no in-depth knowledge of spring modeling or design is required. A high-quality digital model of a coiled spring can be generated quickly within approximately 5 seconds. Simultaneously, users can easily update the model by fine-tuning the parameters, effectively simplifying the engineering design steps and significantly shortening the digital model generation cycle in the early design phase. This allows designers to shift their focus to core engineering tasks such as interference checks on peripheral components after the spring digital model is generated, significantly improving overall development efficiency.
[0078] According to the method for generating a coiled spring proposed in this application, the center lines of multiple preset functional modules of the coiled spring are constructed based on the spring design parameters. These center lines are then joined in a preset order to generate the overall skeleton line of the spring. The overall skeleton line is then smoothed. Based on the smoothed overall skeleton line, the complete outer wall surface of the coiled spring is generated. Finally, the complete outer wall surface is closed to generate a solid model of the coiled spring. Thus, by decomposing the coiled spring into multiple functional modules, constructing center lines for each module, and sequentially joining them to form the overall skeleton line, and then smoothing the overall skeleton line to eliminate geometric discontinuities at the joints, this method solves the problem of time-consuming and inefficient modeling processes caused by requiring users to manually complete modeling operations through the CATIA interface. This method achieves rapid generation of a solid model of the coiled spring.
[0079] Next, the apparatus for generating a coiled spring according to an embodiment of this application is described with reference to the accompanying drawings.
[0080] Figure 3 This is a block diagram of a coil spring generating device according to an embodiment of this application.
[0081] like Figure 3 As shown, the coil spring generating device 10 includes: a building module 100, a first generating module 200, and a second generating module 300.
[0082] Among them, the construction module 100 is used to obtain the spring design parameters and construct the center lines of multiple preset functional modules of the coil spring based on the spring design parameters; The first generation module 200 is used to connect the center lines of multiple preset functional modules in a preset order to generate the overall skeleton line of the spring. The second generation module 300 is used to smooth the curve of the overall spring skeleton line, and based on the smoothed overall spring skeleton line, generate the complete outer wall surface of the shrinking spring, close the complete outer wall surface, and generate the solid model of the shrinking spring.
[0083] Optionally, in some embodiments, the spring design parameters include at least one of wire diameter, outer diameter, total spring height, effective number of coils, total number of coils, inner diameter of the upper coil, and inner diameter of the lower coil; the multiple preset functional modules include a first flat coil module, a first lift module, an equal diameter module, a second lift module, and a second flat coil module.
[0084] Optionally, in some embodiments, based on the smoothed overall skeleton line of the spring, a complete outer wall surface of the coil spring is generated. The second generation module 300 is specifically used for: Using half the wire diameter as the radius and the smoothed overall skeleton line of the spring as the target sweep path, perform a sweep operation to generate the complete outer wall surface of the coil spring.
[0085] Optionally, in some embodiments, the preset functional module is a first flat coil module, and the center line of multiple preset functional modules for constructing the coil spring is constructed. The construction module 100 is specifically used for: Determine the circumference radius of the first flat circle module; Using the rotation center axis of the spring's overall skeleton line as the reference axis, an arc with a first preset angle is constructed based on the reference axis and the circumference radius of the first flat ring module, and the center line of the first flat ring module is obtained based on the arc with the first preset angle.
[0086] Optionally, in some embodiments, the preset functional module is a first lift module, and the center line of multiple preset functional modules for constructing the coil spring is constructed. The construction module 100 is specifically used for: Starting from the end point of the first flat ring module, based on the reference axis, a first spiral line is constructed with a radius that changes from the circumference of the first flat ring module to the outer diameter at a preset rate of change, and the center line of the first lift module is obtained based on the first spiral line.
[0087] Optionally, in some embodiments, the preset functional module is an equal-diameter module, and the center line of multiple preset functional modules for constructing the coil spring is constructed. The construction module 100 is specifically used for: Calculate the height of the equal-diameter module based on the effective number of revolutions and the total number of revolutions; Starting from the end point of the first lift module, a second spiral with a constant radius is constructed based on the reference axis, and the center line of the equal diameter module is obtained based on the second spiral.
[0088] Optionally, in some embodiments, the preset functional module is a second lift module, constructing the centerline of multiple preset functional modules of the coil spring. The construction module 100 is specifically used for: Starting from the end point of the equal diameter module, based on the reference axis, a third spiral with a radius that changes from the outer diameter to the sum of the inner diameter and the wire diameter of the lower end ring at a preset rate of change is constructed, and the center line of the second lift module is obtained based on the third spiral.
[0089] Optionally, in some embodiments, the preset functional module is a second flat coil module, which constructs the center line of multiple preset functional modules of the coil-shrinking spring. The construction module 100 is specifically used for: Determine the circumference radius of the second flat circle module; Based on the reference axis and the circumference radius of the second flat circle module, an arc with a second preset angle is constructed, and the center line of the second flat circle module is obtained based on the arc with the second preset angle.
[0090] It should be noted that the foregoing explanation of the method for generating the coil spring also applies to the apparatus for generating the coil spring in this embodiment, and will not be repeated here.
[0091] The device for generating a coiled spring according to the embodiments of this application constructs centerlines for multiple preset functional modules of the coiled spring based on spring design parameters, joins the centerlines of the multiple preset functional modules in a preset order to generate the overall skeleton line of the spring, and performs curve smoothing processing on the overall skeleton line of the spring. Then, based on the smoothed overall skeleton line of the spring, a complete outer wall surface of the coiled spring is generated, and the complete outer wall surface is closed to generate a solid model of the coiled spring. Thus, by decomposing the coiled spring into multiple functional modules, constructing centerlines for each, and sequentially joining them to form an overall skeleton line, and then performing curve smoothing processing on the overall skeleton line to eliminate geometric discontinuities at the joints, the device solves the problem of long and inefficient modeling processes caused by users having to manually complete the modeling operation through the CATIA interface, thereby achieving rapid generation of a solid model of the coiled spring.
[0092] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.
[0093] When the processor 402 executes the program, it implements the method for generating the coiled spring provided in the above embodiments.
[0094] Furthermore, electronic devices also include: Communication interface 403 is used for communication between memory 401 and processor 402.
[0095] The memory 401 is used to store computer programs that can run on the processor 402.
[0096] The memory 401 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0097] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0098] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.
[0099] Processor 402 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0100] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating a coiled spring.
[0101] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for generating a coiled spring.
[0102] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0103] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0104] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for manufacturing a coiled spring, characterized in that, Includes the following steps: Obtain the spring design parameters, and construct the center lines of multiple preset functional modules of the coil-shrinking spring based on the spring design parameters; The center lines of the multiple preset functional modules are joined together in a preset order to generate the overall skeleton line of the spring; The overall skeleton line of the spring is smoothed, and based on the smoothed overall skeleton line of the spring, the complete outer wall surface of the coil spring is generated. The complete outer wall surface is then closed to generate a solid model of the coil spring.
2. The method according to claim 1, characterized in that, The spring design parameters include at least one of wire diameter, outer diameter, total spring height, effective number of coils, total number of coils, inner diameter of the upper coil, and inner diameter of the lower coil; the multiple preset functional modules include a first flat coil module, a first lift module, an equal diameter module, a second lift module, and a second flat coil module.
3. The method according to claim 2, characterized in that, The process of generating the complete outer wall surface of the contraction spring based on the smoothed overall spring skeleton line includes: Using half the wire diameter as the radius and the smoothed overall skeleton line of the spring as the target sweep path, a sweep operation is performed to generate the complete outer wall surface of the coiled spring.
4. The method according to claim 2, characterized in that, The preset functional module is the first flat coil module, and the center lines of the multiple preset functional modules that construct the coil-shrinking spring include: Determine the circumferential radius of the first flat ring module; Using the rotation center axis of the spring's overall skeleton line as the reference axis, an arc with a first preset angle is constructed based on the reference axis and the circumference radius of the first flat ring module, and the center line of the first flat ring module is obtained based on the arc with the first preset angle.
5. The method according to claim 4, characterized in that, The preset functional module is the first lift module, and the centerline of the multiple preset functional modules that construct the coil spring includes: Starting from the end point of the first flat ring module, based on the reference axis, a first spiral line is constructed with a radius that changes from the circumference of the first flat ring module to the outer diameter at a preset rate of change, and the center line of the first lift module is obtained based on the first spiral line.
6. The method according to claim 5, characterized in that, The preset functional module is the equal-diameter module, and the centerline of the multiple preset functional modules that construct the coil spring includes: The height of the equal-diameter module is calculated based on the effective number of revolutions and the total number of revolutions; Starting from the end point of the first lift module, a second spiral with a constant radius is constructed based on the reference axis, and the center line of the equal diameter module is obtained based on the second spiral.
7. The method according to claim 6, characterized in that, The preset functional module is the second lift module, and the centerline of the plurality of preset functional modules that construct the coil spring includes: Starting from the end point of the equal diameter module, based on the reference axis, a third spiral with a radius that changes from the outer diameter to the sum of the inner diameter of the lower end ring and the wire diameter at the preset rate of change is constructed, and the center line of the second lift module is obtained based on the third spiral.
8. The method according to claim 7, characterized in that, The preset functional module is the second flat ring module, and the center line of the multiple preset functional modules that construct the coil spring includes: Determine the circumferential radius of the second flat ring module; An arc with a second preset angle is constructed based on the reference axis and the circumference radius of the second flat ring module, and the center line of the second flat ring module is obtained based on the arc with the second preset angle.
9. A device for generating a coiled spring, characterized in that, include: A construction module is used to obtain spring design parameters and construct the center lines of multiple preset functional modules of the coil-shrinking spring based on the spring design parameters. The first generation module is used to connect the center lines of the multiple preset functional modules in a preset order to generate the overall skeleton line of the spring. The second generation module is used to smooth the curve of the overall spring skeleton line, and based on the smoothed overall spring skeleton line, generate the complete outer wall surface of the coil spring, close the complete outer wall surface, and generate the solid model of the coil spring.
10. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, the processor executing the program to implement the method for generating a coil spring as described in any one of claims 1-8.